Tell unittests to use native file convention for EXAMPLE_DIR
[mussa.git] / alg / test / CMakeLists.txt
index 681d4e2df9766dbd0061460cd84f864b5043a638..17e2c26ddd36b798fa833e0d7c68871463846532 100644 (file)
@@ -12,6 +12,10 @@ GET_MUSSA_LINK_FLAGS(ALG_TEST_LDFLAGS)
 # dont you love the number of \ you need to make sure the " shows up in
 # the C compiler?
 SET(EXAMPLE_DIR ${CMAKE_SOURCE_DIR}/examples)
+IF(WIN32)
+  STRING(REGEX REPLACE "/" "\\\\\\\\\\\\\\\\" EXAMPLE_DIR ${EXAMPLE_DIR})
+ENDIF(WIN32)
+
 SET_SOURCE_FILES_PROPERTIES(
   ${SOURCES} 
   COMPILE_FLAGS "-DEXAMPLE_DIR=\\\"${EXAMPLE_DIR}\\\" ${ALG_TEST_CFLAGS}"