Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

windows

cmake

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)

like image 221
Ernest_Galbrun Avatar asked May 27 '13 08:05

Ernest_Galbrun


People also ask

How do I run a .CMake file?

Run cmake-gui.exe, which should be in your Start menu under Program Files, there may also be a shortcut on your desktop, or if you built from source, it will be in the build directory. A GUI will appear similar to what is shown below. The top two entries are the source code and binary directories.

How do I run a Cmakelist text file?

In Qt Creator, go to File → Open File or Project… and choose CMakeLists. txt from the source folder you want to build. Qt Creator will prompt you for the location of the binary folder, calling it the “build directory”. By default, it suggests a path adjacent to the source folder.

What can I do with CMakeLists txt?

CMakeLists. txt file is placed at the source of the project you want to build. CMakeLists. txt is placed at the root of the source tree of any application, library it will work for.


1 Answers

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.

like image 135
languitar Avatar answered Sep 30 '22 05:09

languitar