[Cmake-commits] CMake branch, next, updated. v2.8.3-1146-gc96ea14

Brad King brad.king at kitware.com
Mon Jan 3 10:05:31 EST 2011


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  c96ea14e3d75df08638948783c89ccc47a0ddb1a (commit)
       via  b29eadd8f38fcfd7b0635501f5e1429e7cb69865 (commit)
      from  b13c21318c7551eb692b338f380bc30011346edc (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=c96ea14e3d75df08638948783c89ccc47a0ddb1a
commit c96ea14e3d75df08638948783c89ccc47a0ddb1a
Merge: b13c213 b29eadd
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 3 10:05:14 2011 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jan 3 10:05:14 2011 -0500

    Merge topic 'vs-force-multiple-include' into next
    
    b29eadd Map multiple /FI flags for VS < 10 (#11649)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b29eadd8f38fcfd7b0635501f5e1429e7cb69865
commit b29eadd8f38fcfd7b0635501f5e1429e7cb69865
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 3 10:02:16 2011 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 3 10:02:16 2011 -0500

    Map multiple /FI flags for VS < 10 (#11649)
    
    The /FI flag may be repeated so the flag table entry needs to be marked
    with SemicolonAppendable.  This was already the case for VS 10.

diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index b22c429..418b8b4 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -427,7 +427,7 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] =
   // The YX and Yu options are in a per-global-generator table because
   // their values differ based on the VS IDE version.
   {"ForcedIncludeFiles", "FI", "Forced include files", "",
-   cmVS7FlagTable::UserValueRequired},
+   cmVS7FlagTable::UserValueRequired | cmVS7FlagTable::SemicolonAppendable},
 
   // boolean flags
   {"BufferSecurityCheck", "GS", "Buffer security check", "TRUE", 0},
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 289e632..7aaa10a 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1044,6 +1044,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
   LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SubDir")
 
   IF(CMAKE_TEST_MSVC)
+    ADD_TEST_MACRO(ForceInclude foo)
     ADD_TEST_MACRO(PrecompiledHeader foo)
     ADD_TEST_MACRO(ModuleDefinition example_exe)
   ENDIF(CMAKE_TEST_MSVC)
diff --git a/Tests/ForceInclude/CMakeLists.txt b/Tests/ForceInclude/CMakeLists.txt
new file mode 100644
index 0000000..5c02ebb
--- /dev/null
+++ b/Tests/ForceInclude/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 2.8.3.20110103)
+project(ForceInclude C)
+
+# Make sure the proper compiler is in use.
+if(NOT MSVC AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$")
+  message(FATAL_ERROR "The ForceInclude test works only with MSVC or Intel")
+endif()
+
+add_executable(foo foo.c)
+set_property(SOURCE foo.c PROPERTY COMPILE_FLAGS "/FIfoo1.h /FIfoo2.h")
diff --git a/Tests/ForceInclude/foo.c b/Tests/ForceInclude/foo.c
new file mode 100644
index 0000000..af898f4
--- /dev/null
+++ b/Tests/ForceInclude/foo.c
@@ -0,0 +1,7 @@
+#ifndef FOO_1
+# error "foo1.h not included by /FI"
+#endif
+#ifndef FOO_2
+# error "foo2.h not included by /FI"
+#endif
+int main(void) { return 0; }
diff --git a/Tests/ForceInclude/foo1.h b/Tests/ForceInclude/foo1.h
new file mode 100644
index 0000000..2c1cb7b
--- /dev/null
+++ b/Tests/ForceInclude/foo1.h
@@ -0,0 +1 @@
+#define FOO_1
diff --git a/Tests/ForceInclude/foo2.h b/Tests/ForceInclude/foo2.h
new file mode 100644
index 0000000..e47524d
--- /dev/null
+++ b/Tests/ForceInclude/foo2.h
@@ -0,0 +1 @@
+#define FOO_2

-----------------------------------------------------------------------

Summary of changes:
 Source/cmLocalVisualStudio7Generator.cxx |    2 +-
 Tests/CMakeLists.txt                     |    1 +
 Tests/ForceInclude/CMakeLists.txt        |   10 ++++++++++
 Tests/ForceInclude/foo.c                 |    7 +++++++
 Tests/ForceInclude/foo1.h                |    1 +
 Tests/ForceInclude/foo2.h                |    1 +
 6 files changed, 21 insertions(+), 1 deletions(-)
 create mode 100644 Tests/ForceInclude/CMakeLists.txt
 create mode 100644 Tests/ForceInclude/foo.c
 create mode 100644 Tests/ForceInclude/foo1.h
 create mode 100644 Tests/ForceInclude/foo2.h


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list