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 16ea4be99cf2460abbe432e82971ba14816867a2 (commit) via 6c9d33562560333c123899c8ff3d2cd47fe386a1 (commit) from 14d771da2db3edad9b47c7565de805fab0c50ccc (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=16ea4be99cf2460abbe432e82971ba14816867a2 commit 16ea4be99cf2460abbe432e82971ba14816867a2 Merge: 14d771d 6c9d335 Author: Ben Boeckel <ben.boec...@kitware.com> AuthorDate: Mon Dec 1 12:57:51 2014 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Dec 1 12:57:51 2014 -0500 Merge topic 'icase-source-file-prop' into next 6c9d3356 test: test source file properties with case-insensitivity http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c9d33562560333c123899c8ff3d2cd47fe386a1 commit 6c9d33562560333c123899c8ff3d2cd47fe386a1 Author: Ben Boeckel <ben.boec...@kitware.com> AuthorDate: Fri Nov 21 13:21:55 2014 -0500 Commit: Ben Boeckel <ben.boec...@kitware.com> CommitDate: Mon Dec 1 12:57:41 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..6a9b744 --- /dev/null +++ b/Tests/SourceFileProperty/CMakeLists.txt @@ -0,0 +1,21 @@ + +cmake_minimum_required(VERSION 3.0) + +project(SourceFileProperty) + +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: Tests/CMakeLists.txt | 1 + Tests/SourceFileProperty/CMakeLists.txt | 21 +++++++++++++++++++++ Tests/SourceFileProperty/ICaseTest.c | 7 +++++++ Tests/SourceFileProperty/main.c | 13 +++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 Tests/SourceFileProperty/CMakeLists.txt create mode 100644 Tests/SourceFileProperty/ICaseTest.c create mode 100644 Tests/SourceFileProperty/main.c hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits