[CMake] Is it possible to obtain the exact cmake command line used to invoke cmake from within cmake?

Eric Noulard eric.noulard at gmail.com
Sun Oct 28 06:12:41 EDT 2007


2007/10/27, Alan W. Irwin <irwin at beluga.phys.uvic.ca>:
> As I respond to issues with the PLplot CMake-based build system that are
> reported by our users, I repeatedly find myself asking them to report the
> exact cmake command line that they used as well as full output from the
> cmake command.  If from within cmake we could print out a string
> corresponding to the exact cmake command line, then that simplifies my
> request to them for a full bug report.
>
> Is it possible to obtain the exact command line used to invoke cmake
> from within cmake?

I don't know if it's already possible or not but I would be very interested
in the feature too. Helping user to use the build system is of
great interest.

I think I would be useful to have the exact CMake command line

1) as a comment inside CMakeCache.txt
2) as a CMake string var something like:
    CMAKE_COMMAND_LINE

Note that may be  CMAKE_COMMAND_LINE should indicate
what CMake tool was used: cmake, CMakeSetup, ccmake etc...

Should on of us file a feature request?

-- 
Erk


More information about the CMake mailing list