[CMake] Macro with strings: nmake/Visual

Peter Kümmel syntheticpp at gmx.net
Thu Jun 8 17:45:32 EDT 2006


When I use add_definitions I must
pass for nmake and the IDE different
string macro definitions:


1. source code: #define BOOST_USER_CONFIG=<config.h>

if(MSVC_IDE)
    add_definitions(-DBOOST_USER_CONFIG=&lt\;config.h&gt\;)
else(MSVC_IDE)
    add_definitions(-DBOOST_USER_CONFIG="<config.h>")
endif(MSVC_IDE)

2.  source code: #define DLOCALEDIR="."

if(MSVC_IDE)
	add_definitions(-DLOCALEDIR=".")
else(MSVC_IDE)
	add_definitions(-DLOCALEDIR=\\".\\" )
endif(MSVC_IDE)



Is there a simpler solution or is it a bug?

Peter


More information about the CMake mailing list