Ernest_Galbrun
Ernest_Galbrun

Reputation: 2654

(How) Can I execute a single .cmake file on windows?

I am working on windows 7 with visual studio 2010.

I have a cmake building environment that does not work exactly like I would like it to. In particular, it executes a .cmake file at some point that processes all the correct files except one. I would like to run it manually to process the last file, can I ? How ?

(Details: the program I try to compile is opencv, especially the ocl module. The .cmake script I want to execute is cl2cpp.cmake)

Upvotes: 10

Views: 17463

Answers (2)

pooya13
pooya13

Reputation: 2701

If you are using Cygwin or WSL, you might also be able to add a shebang line at the top of your script and run the script from the command line:

#!path_to_cmake_binary -P

Upvotes: 0

languitar
languitar

Reputation: 6784

You can run a cmake script with the -P option on the command line, e.g.:

cmake -P cl2cpp.cmake

Of course that scripts needs to be able to work stand-alone.

Upvotes: 18

Related Questions