summaryrefslogtreecommitdiffstats
path: root/Tests/SourceFileProperty/CMakeLists.txt
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-11-21 18:21:55 (GMT)
committerBrad King <brad.king@kitware.com>2014-12-02 15:56:36 (GMT)
commitb7d760aea20f70b221fcba7ecb2c7edf7751ffc2 (patch)
tree105bcbbb5bee7350ac2988704f6bb66a3aaa4ad4 /Tests/SourceFileProperty/CMakeLists.txt
parent3350e4d209b6a7ff758ca371af4d62844a66ab36 (diff)
downloadCMake-b7d760aea20f70b221fcba7ecb2c7edf7751ffc2.zip
CMake-b7d760aea20f70b221fcba7ecb2c7edf7751ffc2.tar.gz
CMake-b7d760aea20f70b221fcba7ecb2c7edf7751ffc2.tar.bz2
test: test source file properties with case-insensitivity
Some filesystems are case insensitive, so when setting properties on the files, this should be respected (modulo a policy decision).
Diffstat (limited to 'Tests/SourceFileProperty/CMakeLists.txt')
-rw-r--r--Tests/SourceFileProperty/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/SourceFileProperty/CMakeLists.txt b/Tests/SourceFileProperty/CMakeLists.txt
new file mode 100644
index 0000000..1b6506d
--- /dev/null
+++ b/Tests/SourceFileProperty/CMakeLists.txt
@@ -0,0 +1,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})