[Cmake-commits] CMake branch, next, updated. v2.8.3-1031-g6f38d6f

Bill Hoffman bill.hoffman at kitware.com
Mon Dec 20 15:34:39 EST 2010


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  6f38d6f0a00b5edba11dcd79445b4675f9d29077 (commit)
       via  f578381e6624b83843a1b9ff079a8073f7bc210f (commit)
      from  d8848f904db5473717f5c1fb99e454e22f4f8a59 (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=6f38d6f0a00b5edba11dcd79445b4675f9d29077
commit 6f38d6f0a00b5edba11dcd79445b4675f9d29077
Merge: d8848f9 f578381
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Mon Dec 20 15:34:35 2010 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Dec 20 15:34:35 2010 -0500

    Merge topic 'vs2010_header_only_fix' into next
    
    f578381 Fix vs2010 project generation error when HEADER_FILE_ONLY is set.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f578381e6624b83843a1b9ff079a8073f7bc210f
commit f578381e6624b83843a1b9ff079a8073f7bc210f
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Mon Dec 20 15:25:16 2010 -0500
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Mon Dec 20 15:25:16 2010 -0500

    Fix vs2010 project generation error when HEADER_FILE_ONLY is set.
    
    In vs2010 a bad project file could be generated if a .c or .cxx file
    was marked with HEADER_FILE_ONLY, if it was in a library that contained
    both c and c++ code.  This fixes the error in the code, and adds a test
    for this case.

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f78aeec..8d3416a 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -700,7 +700,7 @@ void cmVisualStudio10TargetGenerator::WriteCLSources()
         }
       (*this->BuildFileStream ) << sourceFile << "\"";
       // ouput any flags specific to this source file
-      if(cl && this->OutputSourceSpecificFlags(*source))
+      if(!header && cl && this->OutputSourceSpecificFlags(*source))
         {
         // if the source file has specific flags the tag
         // is ended on a new line
diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt
index 98b29bb..08cc7d4 100644
--- a/Tests/Complex/Executable/CMakeLists.txt
+++ b/Tests/Complex/Executable/CMakeLists.txt
@@ -49,10 +49,17 @@ LINK_LIBRARIES(${COMPLEX_LIBS})
 SET_SOURCE_FILES_PROPERTIES(complex_nobuild.cxx PROPERTIES
   HEADER_FILE_ONLY 1)
 
+# Test forcing a .c file to not build.
+# This makes sure a mixed language library is created
+# with header file only sources
+SET_SOURCE_FILES_PROPERTIES(complex_nobuild.c PROPERTIES
+  HEADER_FILE_ONLY 1)
+
 ADD_EXECUTABLE(A A.cxx A.hh A.h A.txt)
 ADD_EXECUTABLE(complex complex testcflags.c )
 #  Sub1/NameConflictTest.c Sub2/NameConflictTest.c)
-ADD_EXECUTABLE(complex.file complex.file.cxx complex_nobuild.cxx)
+ADD_EXECUTABLE(complex.file complex.file.cxx complex_nobuild.cxx
+  complex_nobuild.c)
 IF(COMPLEX_TEST_CMAKELIB)
   TARGET_LINK_LIBRARIES(complex CMakeLib cmsys cmexpat cmzlib cmlibarchive cmbzip2 cmcurl)
 ENDIF(COMPLEX_TEST_CMAKELIB)
diff --git a/Tests/Complex/Executable/complex_nobuild.c b/Tests/Complex/Executable/complex_nobuild.c
new file mode 100644
index 0000000..6b3c2c1
--- /dev/null
+++ b/Tests/Complex/Executable/complex_nobuild.c
@@ -0,0 +1 @@
+#error "This file should not be compiled."

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

Summary of changes:
 Source/cmVisualStudio10TargetGenerator.cxx         |    2 +-
 Tests/Complex/Executable/CMakeLists.txt            |    9 ++++++++-
 .../{complex_nobuild.cxx => complex_nobuild.c}     |    0
 3 files changed, 9 insertions(+), 2 deletions(-)
 copy Tests/Complex/Executable/{complex_nobuild.cxx => complex_nobuild.c} (100%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list