CMakeLists.txt 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. PROJECT(SUBDIR)
  2. SUBDIRS("Executable Sources" EXCLUDE_FROM_ALL "Some 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. "Another Subdir/pair_int.int.c"
  8. vcl_algorithm_vcl_pair_double.foo.c)
  9. ELSE(WATCOM)
  10. SET(PLUS_NAME_FILES
  11. "Another Subdir/pair+int.int.c"
  12. vcl_algorithm+vcl_pair+double.foo.c)
  13. ENDIF(WATCOM)
  14. ADD_EXECUTABLE(TestFromSubdir
  15. "Another Subdir/testfromsubdir.c"
  16. "Another Subdir/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. ENDIF("${f}" STREQUAL "ThirdSubDir/pair_int.int1.c")
  36. ENDFOREACH(f)
  37. SET(SOURCES ${SOURCES2})
  38. SET(SOURCES ${SOURCES}
  39. vcl_algorithm+vcl_pair+double.foo.c)
  40. ENDIF(WATCOM)
  41. ADD_EXECUTABLE(TestWithAuxSourceDir ${SOURCES})