[Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-1010-gafed2be
Brad King
brad.king at kitware.com
Tue Dec 2 10:56:56 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via afed2be65cc751881b1bd24ef998c0d9df35fe75 (commit)
via b7d760aea20f70b221fcba7ecb2c7edf7751ffc2 (commit)
from 6ea42d6a63567671bca372b1abfa02d6eb907066 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=afed2be65cc751881b1bd24ef998c0d9df35fe75
commit afed2be65cc751881b1bd24ef998c0d9df35fe75
Merge: 6ea42d6 b7d760a
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 2 10:56:55 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Dec 2 10:56:55 2014 -0500
Merge topic 'icase-source-file-prop' into next
b7d760ae test: test source file properties with case-insensitivity
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7d760aea20f70b221fcba7ecb2c7edf7751ffc2
commit b7d760aea20f70b221fcba7ecb2c7edf7751ffc2
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Nov 21 13:21:55 2014 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Dec 2 10:56:36 2014 -0500
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).
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index c9d9568..fda9359 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -291,6 +291,7 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(ConfigSources ConfigSources)
endif()
ADD_TEST_MACRO(SourcesProperty SourcesProperty)
+ ADD_TEST_MACRO(SourceFileProperty SourceFileProperty)
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU
AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
set(runCxxDialectTest 1)
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})
diff --git a/Tests/SourceFileProperty/ICaseTest.c b/Tests/SourceFileProperty/ICaseTest.c
new file mode 100644
index 0000000..454c721
--- /dev/null
+++ b/Tests/SourceFileProperty/ICaseTest.c
@@ -0,0 +1,7 @@
+
+#ifdef NEEDED_TO_WORK
+int icasetest()
+{
+ return 0;
+}
+#endif
diff --git a/Tests/SourceFileProperty/main.c b/Tests/SourceFileProperty/main.c
new file mode 100644
index 0000000..b853408
--- /dev/null
+++ b/Tests/SourceFileProperty/main.c
@@ -0,0 +1,13 @@
+
+#ifndef NO_NEED_TO_CALL
+extern int icasetest();
+#endif
+
+int main(int argc, char** argv)
+{
+#ifdef NO_NEED_TO_CALL
+ return 0;
+#else
+ return icasetest();
+#endif
+}
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list