ENH: watcom wmake can not handle () in the path with cd command

This commit is contained in:
Bill Hoffman 2007-02-27 15:11:47 -05:00
parent 5ae48cf852
commit 73818126f3
2 changed files with 21 additions and 2 deletions

View File

@ -7,7 +7,20 @@ ENDIF("${CMAKE_SYSTEM}" MATCHES "IRIX|QNX")
# be able to see output from make on dashboards # be able to see output from make on dashboards
SET(CMAKE_VERBOSE_MAKEFILE 1) 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.") WRITE_FILE(${SUBDIR_BINARY_DIR}/ShouldBeHere "This file should exist.")
#WATCOM WMAKE does not support + in the name of a file! #WATCOM WMAKE does not support + in the name of a file!
IF(WATCOM) IF(WATCOM)
@ -49,5 +62,7 @@ ELSE(WATCOM)
vcl_algorithm+vcl_pair+double.foo.c) vcl_algorithm+vcl_pair+double.foo.c)
ENDIF(WATCOM) ENDIF(WATCOM)
ADD_EXECUTABLE(TestWithAuxSourceDir ${SOURCES}) ADD_EXECUTABLE(TestWithAuxSourceDir ${SOURCES})
target_link_libraries(TestWithAuxSourceDir testOddPath) IF(CMAKE_PAREN)
target_link_libraries(TestWithAuxSourceDir testOddPath)
ENDIF(CMAKE_PAREN)

View File

@ -4,12 +4,16 @@ void secondone();
void pair_stuff(); void pair_stuff();
void pair_p_stuff(); void pair_p_stuff();
void vcl_stuff(); void vcl_stuff();
#ifdef CMAKE_PAREN
void testOdd(); void testOdd();
#endif
int main() int main()
{ {
printf("Hello from subdirectory\n"); printf("Hello from subdirectory\n");
secondone(); secondone();
#ifdef CMAKE_PAREN
testOdd(); testOdd();
#endif
pair_stuff(); pair_stuff();
pair_p_stuff(); pair_p_stuff();
vcl_stuff(); vcl_stuff();