Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Tests / SubDir / CMakeLists.txt
blob9cfbe25ce05d91205c400e99dde8043c81da4dd8
1 cmake_minimum_required (VERSION 2.6)
2 PROJECT(SUBDIR)
3 SUBDIRS(Executable EXCLUDE_FROM_ALL Examples)
4 WRITE_FILE(${SUBDIR_BINARY_DIR}/ShouldBeHere "This file should exist.")
5 #WATCOM WMAKE does not support + in the name of a file!
6 IF(WATCOM)
7   SET(PLUS_NAME_FILES 
8     AnotherSubdir/pair_int.int.c
9     vcl_algorithm_vcl_pair_double.foo.c)
10 ELSE(WATCOM)
11     SET(PLUS_NAME_FILES 
12     AnotherSubdir/pair+int.int.c
13     vcl_algorithm+vcl_pair+double.foo.c)
14 ENDIF(WATCOM)
16 ADD_EXECUTABLE(TestFromSubdir
17   AnotherSubdir/testfromsubdir.c
18   AnotherSubdir/secondone
19   ${PLUS_NAME_FILES}
20   )
22 AUX_SOURCE_DIRECTORY(ThirdSubDir SOURCES)
23 IF(WATCOM)
24   FOREACH(f ${SOURCES})
25     IF("${f}" STREQUAL "ThirdSubDir/pair+int.int1.c")
26     ELSE("${f}" STREQUAL "ThirdSubDir/pair+int.int1.c")
27       SET(SOURCES2 ${f} ${SOURCES2})
28     ENDIF("${f}" STREQUAL "ThirdSubDir/pair+int.int1.c")
29   ENDFOREACH(f)
30   SET(SOURCES ${SOURCES2})
31   SET(SOURCES ${SOURCES} 
32     vcl_algorithm_vcl_pair_double.foo.c)
33 ELSE(WATCOM)
34   FOREACH(f ${SOURCES})
35     IF("${f}" STREQUAL "ThirdSubDir/pair_int.int1.c")
36     ELSE("${f}" STREQUAL "ThirdSubDir/pair_int.int1.c")
37       SET(SOURCES2 ${f} ${SOURCES2})
38       MESSAGE("${f}")
39     ENDIF("${f}" STREQUAL "ThirdSubDir/pair_int.int1.c")
40   ENDFOREACH(f)
41   SET(SOURCES ${SOURCES2})
42   SET(SOURCES ${SOURCES} 
43     vcl_algorithm+vcl_pair+double.foo.c)
44 ENDIF(WATCOM)  
45 MESSAGE("Sources: ${SOURCES}")
46 ADD_EXECUTABLE(TestWithAuxSourceDir ${SOURCES})