I try to set a preprocessor macro in the command line of CMake. I\'ve tried:
set generator=\"Visual Studio 8 2005\" set params=-D MY_MACRO=1 cmake.exe -G %ge
Unless you have a good reason not to, you should use ADD_DEFINITIONS(=[, ...]).
ADD_DEFINITIONS(=[, ...])
Just add the following line to your CMakeLists.txt:
ADD_DEFINITIONS("MY_MACRO=1")
CMake will take care of the syntax of the switches (be it -D=, or /D=).
-D=
/D=