[Cmake] space-separated compiler flags, cmake command line

Bill Hoffman bill.hoffman at kitware.com
Wed Jun 12 10:56:56 EDT 2002


No, not really, the best thing to do is to create the cache file before running cmake...

-Bill


At 10:44 AM 6/12/2002 -0400, Wheeler, Fred (Research) wrote:

>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
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake 




More information about the CMake mailing list