Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do dry run with CMake?

Tags:

makefile

cmake

With GNU make, a dry run can be performed via

make -n

Is there a similar option for CMake? The best I could come up with is

cmake ..
make -n | grep -vi cmake

However, I am being too restrictive and am wondering if there is an easier way to achieve this.

like image 993
Julian Helfferich Avatar asked Sep 19 '17 12:09

Julian Helfferich


1 Answers

According to the command line syntax, if you use -- on the command line with cmake, the parameters following that are passed directly to the native build tool. Eg. what you did is somewhat equivalent to this:

cmake ..
cmake --build -- -n
like image 135
MuertoExcobito Avatar answered Nov 15 '22 10:11

MuertoExcobito