summaryrefslogtreecommitdiffstats
path: root/Tests/SourceFileProperty/CMakeLists.txt
blob: 1b6506da57f011033cb325ef9795636a8849d0c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
cmake_minimum_required(VERSION 3.0)
project(SourceFileProperty C)

set(sources)

if (EXISTS icasetest.c)
  # If a file exists by this name, use it.
  set_source_files_properties(icasetest.c
    PROPERTIES
      COMPILE_FLAGS -DNEEDED_TO_WORK)
else ()
  # Work on case-sensitive file systems as well.
  set_source_files_properties(main.c
    PROPERTIES
      COMPILE_FLAGS -DNO_NEED_TO_CALL)
endif ()
list(APPEND sources ICaseTest.c)

add_executable(SourceFileProperty main.c ${sources})