[CMake] help with space in CMAKE_CXX_FLAGS

Philip Lowman philip at yhbt.com
Tue Oct 6 12:49:21 EDT 2009


I'm trying to do the following but CMake  treats each space in a filename 
as a separate flag:

set(sxsoverride "${CMAKE_CURRENT_SOURCE_DIR}/target_sxs.h")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FI ${sxsoverride}"

It fails if there are spaces in the path as CMake seems to expand the 
entry.  Anyone have any ideas?  Seems buggy to me:

Cmtrycompile CMakeError.log:

... /FI "C:/Documents" /FI "and" ...
(etc.)

-- 
Philip Lowman


More information about the CMake mailing list