CMakeLists.txt 487 B

12345678910111213141516171819
  1. cmake_minimum_required(VERSION 3.0)
  2. project(SourceFileProperty C)
  3. set(sources)
  4. if (EXISTS icasetest.c)
  5. # If a file exists by this name, use it.
  6. set_source_files_properties(icasetest.c
  7. PROPERTIES
  8. COMPILE_FLAGS -DNEEDED_TO_WORK)
  9. else ()
  10. # Work on case-sensitive file systems as well.
  11. set_source_files_properties(main.c
  12. PROPERTIES
  13. COMPILE_FLAGS -DNO_NEED_TO_CALL)
  14. endif ()
  15. list(APPEND sources ICaseTest.c)
  16. add_executable(SourceFileProperty main.c ${sources})