1
0

CMakeLists.txt 1.4 KB

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