[Cmake] space-separated compiler flags, cmake command line
Wheeler, Fred (Research)
wheeler at crd.ge.com
Wed Jun 12 10:44:57 EDT 2002
When I pass options like these to cmake
-DCMAKE_C_FLAGS:STRING="-02 -Wall -fprofile-arcs -ftest-coverage"
-DCMAKE_CXX_FLAGS:STRING="-O2 -Wall -fprofile-arcs -ftest-coverage"
I get escaped spaces in the cache file and makefiles,
% grep test-coverage *
[...]
CMakeCache.txt:CMAKE_CXX_FLAGS:STRING=-O2\ -Wall\ -fprofile-arcs\ -ftest-coverage
CMakeCache.txt:CMAKE_C_FLAGS:STRING=-02\ -Wall\ -fprofile-arcs\ -ftest-coverage
Makefile:CMAKE_C_FLAGS = -02\ -Wall\ -fprofile-arcs\ -ftest-coverage
Makefile:CMAKE_CXX_FLAGS = -O2\ -Wall\ -fprofile-arcs\ -ftest-coverage
[...]
Is there a way to pass a set of space-separated compiler flags to cmake via the command line?
Thanks,
Fred Wheeler
More information about the CMake
mailing list