[Cmake-commits] CMake branch, master, updated. v3.10.0-516-ge841ae8

Kitware Robot kwrobot at kitware.com
Mon Dec 4 10:55:04 EST 2017


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, master has been updated
       via  e841ae823edc3021aaa5b297be715344a9bca47e (commit)
       via  d5681e353ad94db8cfd0343bd50b090a6cda8c71 (commit)
       via  8c97382c8e2f5699be72089371c67949c7e49461 (commit)
       via  d8290531a9c98773ef233c23b81af76e8a7e099c (commit)
       via  caa1c4967a29feee1789a7fc548f5bdf1eb44781 (commit)
       via  411397f913d93e988da9bf1b1a4305c55fe78d5f (commit)
       via  64713d4ca0ae864958ecdeaee9642488c3f2cbc7 (commit)
       via  f25d87db9e406eda77aa62f583e1ceeb7b145381 (commit)
       via  4c40ab261c94a72ba5dcd9fab47c035d94a22964 (commit)
       via  be8ec418965b89dd4b05412d78be7395ad4b4a56 (commit)
       via  740ccb1f1de5d7d764bf98bd3c322e5c6b07f70b (commit)
       via  4d611868dfe37e73aaba4cdfde37b17e8a2ec7c1 (commit)
       via  8e654a37857b7cefabf142b16fe8a6e03b75b5df (commit)
      from  5f87ea160378265c70c97d1f627c23e6faf02378 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e841ae823edc3021aaa5b297be715344a9bca47e
commit e841ae823edc3021aaa5b297be715344a9bca47e
Merge: d5681e3 4c40ab2
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 4 15:53:02 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Dec 4 10:53:07 2017 -0500

    Merge topic 'add_library-mention-xcode-objlib-behavior'
    
    4c40ab26 add_library: mention that Xcode requires a real source file
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Acked-by: Tom Hughes <tomtheengineer at gmail.com>
    Merge-request: !1549


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5681e353ad94db8cfd0343bd50b090a6cda8c71
commit d5681e353ad94db8cfd0343bd50b090a6cda8c71
Merge: 8c97382 4d61186
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 4 15:52:41 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Dec 4 10:52:47 2017 -0500

    Merge topic 'pragma-once'
    
    4d611868 Check*: Added include guards
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1327


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c97382c8e2f5699be72089371c67949c7e49461
commit 8c97382c8e2f5699be72089371c67949c7e49461
Merge: d829053 64713d4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 4 10:50:55 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Dec 4 10:50:55 2017 -0500

    Merge branch 'release-3.10'


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8290531a9c98773ef233c23b81af76e8a7e099c
commit d8290531a9c98773ef233c23b81af76e8a7e099c
Merge: caa1c49 f25d87d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 4 15:50:08 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Dec 4 10:50:33 2017 -0500

    Merge topic 'cpack-pkg-fix'
    
    f25d87db CPack: Fix macOS PKG component dependency information
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1547


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=caa1c4967a29feee1789a7fc548f5bdf1eb44781
commit caa1c4967a29feee1789a7fc548f5bdf1eb44781
Merge: 411397f 8e654a3
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 4 15:48:46 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Dec 4 10:48:53 2017 -0500

    Merge topic 'csharp_project_without_sources'
    
    8e654a37 VS: Enable generation of CSharp projects without initial .cs files
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1521


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=411397f913d93e988da9bf1b1a4305c55fe78d5f
commit 411397f913d93e988da9bf1b1a4305c55fe78d5f
Merge: 5f87ea1 be8ec41
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 4 15:46:32 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Dec 4 10:46:36 2017 -0500

    Merge topic 'update-kwsys'
    
    be8ec418 Merge branch 'upstream-KWSys' into update-kwsys
    740ccb1f KWSys 2017-12-01 (0f0023b1)
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1548


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c40ab261c94a72ba5dcd9fab47c035d94a22964
commit 4c40ab261c94a72ba5dcd9fab47c035d94a22964
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Dec 1 10:36:01 2017 -0500
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Fri Dec 1 10:37:15 2017 -0500

    add_library: mention that Xcode requires a real source file
    
    The docs mentioned that it happened, but not when. Mention Xcode since
    it is the culprit today.
    
    See #16524.

diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst
index 4e85d8c..3706153 100644
--- a/Help/command/add_library.rst
+++ b/Help/command/add_library.rst
@@ -111,9 +111,9 @@ may contain only sources that compile, header files, and other files
 that would not affect linking of a normal library (e.g. ``.txt``).
 They may contain custom commands generating such sources, but not
 ``PRE_BUILD``, ``PRE_LINK``, or ``POST_BUILD`` commands.  Object libraries
-cannot be linked.  Some native build systems may not like targets that
-have only object files, so consider adding at least one real source file
-to any target that references ``$<TARGET_OBJECTS:objlib>``.
+cannot be linked.  Some native build systems (such as Xcode) may not like
+targets that have only object files, so consider adding at least one real
+source file to any target that references ``$<TARGET_OBJECTS:objlib>``.
 
 Alias Libraries
 ^^^^^^^^^^^^^^^

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be8ec418965b89dd4b05412d78be7395ad4b4a56
commit be8ec418965b89dd4b05412d78be7395ad4b4a56
Merge: a4faf86 740ccb1
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 1 08:52:33 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Dec 1 08:52:33 2017 -0500

    Merge branch 'upstream-KWSys' into update-kwsys
    
    * upstream-KWSys:
      KWSys 2017-12-01 (0f0023b1)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=740ccb1f1de5d7d764bf98bd3c322e5c6b07f70b
commit 740ccb1f1de5d7d764bf98bd3c322e5c6b07f70b
Author:     KWSys Upstream <kwrobot at kitware.com>
AuthorDate: Fri Dec 1 07:54:10 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Dec 1 08:52:29 2017 -0500

    KWSys 2017-12-01 (0f0023b1)
    
    Code extracted from:
    
        https://gitlab.kitware.com/utils/kwsys.git
    
    at commit 0f0023b1be404cb4a4f893c116c2f8b5190bd743 (master).
    
    Upstream Shortlog
    -----------------
    
    Brad King (1):
          7b6fa277 ConsoleBuf: Add explicit switch case fallthrough markup

diff --git a/ConsoleBuf.hxx.in b/ConsoleBuf.hxx.in
index 46d65a8..cf68146 100644
--- a/ConsoleBuf.hxx.in
+++ b/ConsoleBuf.hxx.in
@@ -264,6 +264,7 @@ private:
         if (m_isConsoleInput) {
           break;
         }
+        @KWSYS_NAMESPACE at _FALLTHROUGH;
       case FILE_TYPE_PIPE:
         m_activeInputCodepage = input_pipe_codepage;
         break;
@@ -290,6 +291,7 @@ private:
         if (m_isConsoleOutput) {
           break;
         }
+        @KWSYS_NAMESPACE at _FALLTHROUGH;
       case FILE_TYPE_PIPE:
         m_activeOutputCodepage = output_pipe_codepage;
         break;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d611868dfe37e73aaba4cdfde37b17e8a2ec7c1
commit 4d611868dfe37e73aaba4cdfde37b17e8a2ec7c1
Author:     Cristian Adam <cristian.adam at gmail.com>
AuthorDate: Fri Sep 29 02:37:00 2017 +0200
Commit:     Cristian Adam <cristian.adam at gmail.com>
CommitDate: Fri Dec 1 13:05:02 2017 +0200

    Check*: Added include guards

diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index 5a7298b..9d2c74d 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -32,6 +32,7 @@ effect or even a specific one is beyond the scope of this module.
   in such variables may cause a false negative for this check.
 #]=======================================================================]
 
+include_guard(GLOBAL)
 include(CheckCSourceCompiles)
 include(CMakeCheckCompilerFlagCommonPatterns)
 
diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake
index 56e68d5..114213a 100644
--- a/Modules/CheckCSourceCompiles.cmake
+++ b/Modules/CheckCSourceCompiles.cmake
@@ -60,6 +60,7 @@ Check if given C source compiles and links into an executable.
 
 #]=======================================================================]
 
+include_guard(GLOBAL)
 
 macro(CHECK_C_SOURCE_COMPILES SOURCE VAR)
   if(NOT DEFINED "${VAR}")
diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake
index 8da9f1e..fa51346 100644
--- a/Modules/CheckCSourceRuns.cmake
+++ b/Modules/CheckCSourceRuns.cmake
@@ -60,6 +60,8 @@ subsequently be run.
 
 #]=======================================================================]
 
+include_guard(GLOBAL)
+
 macro(CHECK_C_SOURCE_RUNS SOURCE VAR)
   if(NOT DEFINED "${VAR}")
     set(MACRO_CHECK_FUNCTION_DEFINITIONS
diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake
index f731b70..dd60835 100644
--- a/Modules/CheckCXXCompilerFlag.cmake
+++ b/Modules/CheckCXXCompilerFlag.cmake
@@ -32,6 +32,7 @@ effect or even a specific one is beyond the scope of this module.
   in such variables may cause a false negative for this check.
 #]=======================================================================]
 
+include_guard(GLOBAL)
 include(CheckCXXSourceCompiles)
 include(CMakeCheckCompilerFlagCommonPatterns)
 
diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake
index 4634a7b..ed8661b 100644
--- a/Modules/CheckCXXSourceCompiles.cmake
+++ b/Modules/CheckCXXSourceCompiles.cmake
@@ -60,6 +60,8 @@ Check if given C++ source compiles and links into an executable.
 
 #]=======================================================================]
 
+include_guard(GLOBAL)
+
 macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
   if(NOT DEFINED "${VAR}")
     set(_FAIL_REGEX)
diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake
index 558708c..83bf2f2 100644
--- a/Modules/CheckCXXSourceRuns.cmake
+++ b/Modules/CheckCXXSourceRuns.cmake
@@ -60,6 +60,8 @@ subsequently be run.
 
 #]=======================================================================]
 
+include_guard(GLOBAL)
+
 macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
   if(NOT DEFINED "${VAR}")
     set(MACRO_CHECK_FUNCTION_DEFINITIONS
diff --git a/Modules/CheckCXXSymbolExists.cmake b/Modules/CheckCXXSymbolExists.cmake
index 8552154..117a458 100644
--- a/Modules/CheckCXXSymbolExists.cmake
+++ b/Modules/CheckCXXSymbolExists.cmake
@@ -32,6 +32,7 @@
 #   CMAKE_REQUIRED_LIBRARIES = list of libraries to link
 #   CMAKE_REQUIRED_QUIET = execute quietly without messages
 
+include_guard(GLOBAL)
 include(CheckSymbolExists)
 
 macro(CHECK_CXX_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
diff --git a/Modules/CheckFortranCompilerFlag.cmake b/Modules/CheckFortranCompilerFlag.cmake
index 8a1a8b9..2cb2532 100644
--- a/Modules/CheckFortranCompilerFlag.cmake
+++ b/Modules/CheckFortranCompilerFlag.cmake
@@ -32,6 +32,7 @@ effect or even a specific one is beyond the scope of this module.
   in such variables may cause a false negative for this check.
 #]=======================================================================]
 
+include_guard(GLOBAL)
 include(CheckFortranSourceCompiles)
 include(CMakeCheckCompilerFlagCommonPatterns)
 
diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake
index 5fc740a..f3ced93 100644
--- a/Modules/CheckFortranFunctionExists.cmake
+++ b/Modules/CheckFortranFunctionExists.cmake
@@ -24,6 +24,8 @@
 #
 #   CMAKE_REQUIRED_LIBRARIES = list of libraries to link
 
+include_guard(GLOBAL)
+
 macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
   if(NOT DEFINED ${VARIABLE})
     message(STATUS "Looking for Fortran ${FUNCTION}")
diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake
index 4df17e3..d2b0cca 100644
--- a/Modules/CheckFortranSourceCompiles.cmake
+++ b/Modules/CheckFortranSourceCompiles.cmake
@@ -66,6 +66,7 @@ Check if given Fortran source compiles and links into an executable.
 
 #]=======================================================================]
 
+include_guard(GLOBAL)
 
 macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR)
   if(NOT DEFINED "${VAR}")
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index ef08062..d00aa8a 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -38,6 +38,8 @@
 #   * ``check_function_exists()`` only verifies linking, it does not verify
 #     that the function is declared in system headers.
 
+include_guard(GLOBAL)
+
 macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
   if(NOT DEFINED "${VARIABLE}" OR "x${${VARIABLE}}" STREQUAL "x${VARIABLE}")
     set(MACRO_CHECK_FUNCTION_DEFINITIONS
diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake
index c566e14..e5554c4 100644
--- a/Modules/CheckIncludeFile.cmake
+++ b/Modules/CheckIncludeFile.cmake
@@ -34,6 +34,8 @@
 # at once.  See the :module:`CheckIncludeFileCXX` module to check for headers
 # using the ``CXX`` language.
 
+include_guard(GLOBAL)
+
 macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
   if(NOT DEFINED "${VARIABLE}")
     if(CMAKE_REQUIRED_INCLUDES)
diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake
index 19b1ef6..7948bab 100644
--- a/Modules/CheckIncludeFileCXX.cmake
+++ b/Modules/CheckIncludeFileCXX.cmake
@@ -33,6 +33,8 @@
 # See modules :module:`CheckIncludeFile` and :module:`CheckIncludeFiles`
 # to check for one or more ``C`` headers.
 
+include_guard(GLOBAL)
+
 macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
   if(NOT DEFINED "${VARIABLE}" OR "x${${VARIABLE}}" STREQUAL "x${VARIABLE}")
     if(CMAKE_REQUIRED_INCLUDES)
diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake
index bef11a5..56b7e32 100644
--- a/Modules/CheckIncludeFiles.cmake
+++ b/Modules/CheckIncludeFiles.cmake
@@ -34,6 +34,8 @@
 # See modules :module:`CheckIncludeFile` and :module:`CheckIncludeFileCXX`
 # to check for a single header file in ``C`` or ``CXX`` languages.
 
+include_guard(GLOBAL)
+
 macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
   if(NOT DEFINED "${VARIABLE}")
     set(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
diff --git a/Modules/CheckLanguage.cmake b/Modules/CheckLanguage.cmake
index 70c14d7..ce92bfe 100644
--- a/Modules/CheckLanguage.cmake
+++ b/Modules/CheckLanguage.cmake
@@ -31,6 +31,8 @@
 #     message(STATUS "No Fortran support")
 #   endif()
 
+include_guard(GLOBAL)
+
 macro(check_language lang)
   if(NOT DEFINED CMAKE_${lang}_COMPILER)
     set(_desc "Looking for a ${lang} compiler")
diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake
index 528a450..487cc59 100644
--- a/Modules/CheckLibraryExists.cmake
+++ b/Modules/CheckLibraryExists.cmake
@@ -29,6 +29,8 @@
 #   CMAKE_REQUIRED_LIBRARIES = list of libraries to link
 #   CMAKE_REQUIRED_QUIET = execute quietly without messages
 
+include_guard(GLOBAL)
+
 macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
   if(NOT DEFINED "${VARIABLE}")
     set(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
diff --git a/Modules/CheckPrototypeDefinition.cmake b/Modules/CheckPrototypeDefinition.cmake
index 7859594..ceb4d88 100644
--- a/Modules/CheckPrototypeDefinition.cmake
+++ b/Modules/CheckPrototypeDefinition.cmake
@@ -41,9 +41,9 @@
 
 #
 
-
 get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
 
+include_guard(GLOBAL)
 
 function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
 
diff --git a/Modules/CheckStructHasMember.cmake b/Modules/CheckStructHasMember.cmake
index 085b464..8689a5c 100644
--- a/Modules/CheckStructHasMember.cmake
+++ b/Modules/CheckStructHasMember.cmake
@@ -38,6 +38,7 @@
 # Example: CHECK_STRUCT_HAS_MEMBER("struct timeval" tv_sec sys/select.h
 # HAVE_TIMEVAL_TV_SEC LANGUAGE C)
 
+include_guard(GLOBAL)
 include(CheckCSourceCompiles)
 include(CheckCXXSourceCompiles)
 
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index 6d52d56..d9c9ae4 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -43,6 +43,8 @@ the way the check is run:
   execute quietly without messages
 #]=======================================================================]
 
+include_guard(GLOBAL)
+
 macro(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
   if(CMAKE_C_COMPILER_LOADED)
     __CHECK_SYMBOL_EXISTS_IMPL("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake
index fcf1df7..2b5deec 100644
--- a/Modules/CheckTypeSize.cmake
+++ b/Modules/CheckTypeSize.cmake
@@ -71,11 +71,13 @@
 include(CheckIncludeFile)
 include(CheckIncludeFileCXX)
 
+get_filename_component(__check_type_size_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
+
+include_guard(GLOBAL)
+
 cmake_policy(PUSH)
 cmake_policy(SET CMP0054 NEW)
 
-get_filename_component(__check_type_size_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
 #-----------------------------------------------------------------------------
 # Helper function.  DO NOT CALL DIRECTLY.
 function(__check_type_size_impl type var map builtin language)
diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake
index fd5c36c..ab456d1 100644
--- a/Modules/CheckVariableExists.cmake
+++ b/Modules/CheckVariableExists.cmake
@@ -32,6 +32,8 @@
 #   CMAKE_REQUIRED_LIBRARIES = list of libraries to link
 #   CMAKE_REQUIRED_QUIET = execute quietly without messages
 
+include_guard(GLOBAL)
+
 macro(CHECK_VARIABLE_EXISTS VAR VARIABLE)
   if(NOT DEFINED "${VARIABLE}")
     set(MACRO_CHECK_VARIABLE_DEFINITIONS

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e654a37857b7cefabf142b16fe8a6e03b75b5df
commit 8e654a37857b7cefabf142b16fe8a6e03b75b5df
Author:     Michael Stürmer <michael.stuermer at schaeffler.com>
AuthorDate: Thu Nov 23 14:18:23 2017 +0100
Commit:     Michael Stürmer <michael.stuermer at schaeffler.com>
CommitDate: Wed Nov 29 18:06:08 2017 +0100

    VS: Enable generation of CSharp projects without initial .cs files
    
    fixes #17388

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index caeeeb9..540d877 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -66,11 +66,14 @@ static bool cmVS10IsTargetsFile(std::string const& path)
   return cmSystemTools::Strucmp(ext.c_str(), ".targets") == 0;
 }
 
-static std::string computeProjectFileExtension(cmGeneratorTarget const* t)
+static std::string computeProjectFileExtension(cmGeneratorTarget const* t,
+                                               const std::string& config)
 {
   std::string res;
   res = ".vcxproj";
-  if (cmGlobalVisualStudioGenerator::TargetIsCSharpOnly(t)) {
+  std::string lang = t->GetLinkerLanguage(config);
+  if (cmGlobalVisualStudioGenerator::TargetIsCSharpOnly(t) ||
+      lang == "CSharp") {
     res = ".csproj";
   }
   return res;
@@ -199,8 +202,8 @@ void cmVisualStudio10TargetGenerator::Generate()
       this->GeneratorTarget->GetProperty("EXTERNAL_MSPROJECT")) {
     return;
   }
-  this->ProjectFileExtension =
-    computeProjectFileExtension(this->GeneratorTarget);
+  this->ProjectFileExtension = computeProjectFileExtension(
+    this->GeneratorTarget, *this->Configurations.begin());
   if (this->ProjectFileExtension == ".vcxproj") {
     this->ProjectType = vcxproj;
     this->Managed = false;
@@ -1393,7 +1396,8 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
   std::string path = this->LocalGenerator->GetCurrentBinaryDirectory();
   path += "/";
   path += this->Name;
-  path += computeProjectFileExtension(this->GeneratorTarget);
+  path += computeProjectFileExtension(this->GeneratorTarget,
+                                      *this->Configurations.begin());
   path += ".filters";
   cmGeneratedFileStream fout(path.c_str());
   fout.SetCopyIfDifferent(true);
@@ -3670,7 +3674,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences()
       path = lg->GetCurrentBinaryDirectory();
       path += "/";
       path += dt->GetName();
-      path += computeProjectFileExtension(dt);
+      path += computeProjectFileExtension(dt, *this->Configurations.begin());
     }
     this->ConvertToWindowsSlash(path);
     (*this->BuildFileStream) << cmVS10EscapeXML(path) << "\">\n";
diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
index 6e7c2f3..7100b31 100644
--- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
@@ -5,3 +5,4 @@ run_cmake(VsCustomProps)
 run_cmake(VsDebuggerWorkingDir)
 run_cmake(VsCSharpCustomTags)
 run_cmake(VsCSharpReferenceProps)
+run_cmake(VsCSharpWithoutSources)
diff --git a/Tests/RunCMake/VS10Project/VsCSharpWithoutSources-check.cmake b/Tests/RunCMake/VS10Project/VsCSharpWithoutSources-check.cmake
new file mode 100644
index 0000000..90ae7c3
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsCSharpWithoutSources-check.cmake
@@ -0,0 +1,5 @@
+set(csProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.csproj")
+if(NOT EXISTS "${csProjectFile}")
+  set(RunCMake_TEST_FAILED "Project file ${csProjectFile} does not exist.")
+  return()
+endif()
diff --git a/Tests/RunCMake/VS10Project/VsCSharpWithoutSources.cmake b/Tests/RunCMake/VS10Project/VsCSharpWithoutSources.cmake
new file mode 100644
index 0000000..5fdeaa0
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsCSharpWithoutSources.cmake
@@ -0,0 +1,7 @@
+enable_language(CSharp)
+
+add_library(foo SHARED
+  "${CMAKE_CURRENT_LIST_FILE}")
+
+set_target_properties(foo PROPERTIES
+  LINKER_LANGUAGE CSharp)

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

Summary of changes:
 Help/command/add_library.rst                           |    6 +++---
 Modules/CheckCCompilerFlag.cmake                       |    1 +
 Modules/CheckCSourceCompiles.cmake                     |    1 +
 Modules/CheckCSourceRuns.cmake                         |    2 ++
 Modules/CheckCXXCompilerFlag.cmake                     |    1 +
 Modules/CheckCXXSourceCompiles.cmake                   |    2 ++
 Modules/CheckCXXSourceRuns.cmake                       |    2 ++
 Modules/CheckCXXSymbolExists.cmake                     |    1 +
 Modules/CheckFortranCompilerFlag.cmake                 |    1 +
 Modules/CheckFortranFunctionExists.cmake               |    2 ++
 Modules/CheckFortranSourceCompiles.cmake               |    1 +
 Modules/CheckFunctionExists.cmake                      |    2 ++
 Modules/CheckIncludeFile.cmake                         |    2 ++
 Modules/CheckIncludeFileCXX.cmake                      |    2 ++
 Modules/CheckIncludeFiles.cmake                        |    2 ++
 Modules/CheckLanguage.cmake                            |    2 ++
 Modules/CheckLibraryExists.cmake                       |    2 ++
 Modules/CheckPrototypeDefinition.cmake                 |    2 +-
 Modules/CheckStructHasMember.cmake                     |    1 +
 Modules/CheckSymbolExists.cmake                        |    2 ++
 Modules/CheckTypeSize.cmake                            |    6 ++++--
 Modules/CheckVariableExists.cmake                      |    2 ++
 Source/CPack/cmCPackPKGGenerator.cxx                   |    2 +-
 Source/cmVisualStudio10TargetGenerator.cxx             |   16 ++++++++++------
 Source/kwsys/ConsoleBuf.hxx.in                         |    2 ++
 Tests/RunCMake/VS10Project/RunCMakeTest.cmake          |    1 +
 .../VS10Project/VsCSharpWithoutSources-check.cmake     |    5 +++++
 .../RunCMake/VS10Project/VsCSharpWithoutSources.cmake  |    7 +++++++
 28 files changed, 65 insertions(+), 13 deletions(-)
 create mode 100644 Tests/RunCMake/VS10Project/VsCSharpWithoutSources-check.cmake
 create mode 100644 Tests/RunCMake/VS10Project/VsCSharpWithoutSources.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list