summaryrefslogtreecommitdiffstats
path: root/Tests/SubDirSpaces
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-02-27 20:11:47 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-02-27 20:11:47 (GMT)
commit73818126f32069337080e7f5ffa727bde48d5ce2 (patch)
tree19efc499927e75404f22f07b607149d4b11e450f /Tests/SubDirSpaces
parent5ae48cf852e700f5efc337ef293e96ac9a829736 (diff)
downloadCMake-73818126f32069337080e7f5ffa727bde48d5ce2.zip
CMake-73818126f32069337080e7f5ffa727bde48d5ce2.tar.gz
CMake-73818126f32069337080e7f5ffa727bde48d5ce2.tar.bz2
ENH: watcom wmake can not handle () in the path with cd command
Diffstat (limited to 'Tests/SubDirSpaces')
-rw-r--r--Tests/SubDirSpaces/CMakeLists.txt19
-rw-r--r--Tests/SubDirSpaces/ThirdSubDir/testfromauxsubdir.c4
2 files changed, 21 insertions, 2 deletions
diff --git a/Tests/SubDirSpaces/CMakeLists.txt b/Tests/SubDirSpaces/CMakeLists.txt
index d054b64..fb04f83 100644
--- a/Tests/SubDirSpaces/CMakeLists.txt
+++ b/Tests/SubDirSpaces/CMakeLists.txt
@@ -7,7 +7,20 @@ ENDIF("${CMAKE_SYSTEM}" MATCHES "IRIX|QNX")
# 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 @@ ELSE(WATCOM)
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)
diff --git a/Tests/SubDirSpaces/ThirdSubDir/testfromauxsubdir.c b/Tests/SubDirSpaces/ThirdSubDir/testfromauxsubdir.c
index b6d6b86..fa6c33c 100644
--- a/Tests/SubDirSpaces/ThirdSubDir/testfromauxsubdir.c
+++ b/Tests/SubDirSpaces/ThirdSubDir/testfromauxsubdir.c
@@ -4,12 +4,16 @@ void secondone();
void pair_stuff();
void pair_p_stuff();
void vcl_stuff();
+#ifdef CMAKE_PAREN
void testOdd();
+#endif
int main()
{
printf("Hello from subdirectory\n");
secondone();
+#ifdef CMAKE_PAREN
testOdd();
+#endif
pair_stuff();
pair_p_stuff();
vcl_stuff();