[CMake] Selecting /Ox when compiling with VisualC++

Radio młodych bandytów radiomlodychbandytow at o2.pl
Thu Oct 13 03:27:00 EDT 2011


I have code like below:
IF(MSVC)
     set(CMAKE_CXX_FLAGS /Ox)
     set(CMAKE_C_FLAGS   /Ox)
ENDIF(MSVC)

However, the flag is ignored and CMake generates projects that use /O2.
How can I fix it?

-- 
Twoje radio



More information about the CMake mailing list