[cmake-commits] hoffman committed CMakeLists.txt 1.6 1.7

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Feb 27 15:11:49 EST 2007


Update of /cvsroot/CMake/CMake/Tests/SubDirSpaces
In directory public:/mounts/ram/cvs-serv18062

Modified Files:
	CMakeLists.txt 
Log Message:
ENH: watcom wmake can not handle () in the path with cd command


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/SubDirSpaces/CMakeLists.txt,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- CMakeLists.txt	26 Feb 2007 15:46:19 -0000	1.6
+++ CMakeLists.txt	27 Feb 2007 20:11:47 -0000	1.7
@@ -7,7 +7,20 @@
 
 # be able to see output from make on dashboards
 SET(CMAKE_VERBOSE_MAKEFILE 1)
-SUBDIRS("Executable Sources" "Some(x86) Sources" EXCLUDE_FROM_ALL "Some Examples")
+message("${CMAKE_MAKE_PROGRAM}")
+set(CMAKE_PAREN TRUE)
+IF("${CMAKE_MAKE_PROGRAM}" MATCHES "wmake")
+  message("wmake does not support () in path")
+  set(CMAKE_PAREN FALSE)
+ENDIF("${CMAKE_MAKE_PROGRAM}" MATCHES "wmake")
+
+IF(CMAKE_PAREN)
+  ADD_DEFINITIONS(-DCMAKE_PAREN=1)
+  SUBDIRS("Executable Sources" "Some(x86) Sources" EXCLUDE_FROM_ALL "Some Examples")
+ELSE(CMAKE_PAREN)
+  SUBDIRS("Executable Sources" EXCLUDE_FROM_ALL "Some Examples")
+ENDIF(CMAKE_PAREN)
+
 WRITE_FILE(${SUBDIR_BINARY_DIR}/ShouldBeHere "This file should exist.")
 #WATCOM WMAKE does not support + in the name of a file!
 IF(WATCOM)
@@ -49,5 +62,7 @@
     vcl_algorithm+vcl_pair+double.foo.c)
 ENDIF(WATCOM)  
 ADD_EXECUTABLE(TestWithAuxSourceDir ${SOURCES})
-target_link_libraries(TestWithAuxSourceDir testOddPath)
+IF(CMAKE_PAREN)
+  target_link_libraries(TestWithAuxSourceDir testOddPath)
+ENDIF(CMAKE_PAREN)
 



More information about the Cmake-commits mailing list