[Cmake-commits] CMake branch, master, updated. v3.13.3-924-g67422bf

Kitware Robot kwrobot at kitware.com
Tue Jan 15 13:23:03 EST 2019


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  67422bf579e5c274794f131f008bec4ec1e7d4b9 (commit)
       via  d7835e4d0e6858eeff12c6e8d09a42db6acad4bd (commit)
       via  1d328d8119482ca658434c7eddc07178fd363ae0 (commit)
       via  88b90fb1ff8b5cef816cedcf6dd378cc706806d6 (commit)
       via  4cf301ca77ccb487f0ef5172d6525667896dc84a (commit)
       via  bf1a1caefeceaaad8f86e613e086b244a569456b (commit)
       via  11e43a19a47797ed539924022d7c54b2f92125e9 (commit)
       via  e01d04b3a1aade55f4e086c47624869b77639544 (commit)
       via  414aa6c81ec62ab2f728fab31aa189ce674484a4 (commit)
       via  59c408d053cfe90273db04c3804ed91d7ad59d8f (commit)
       via  214a0bc924b35cc18adddc603bea58d456e74e64 (commit)
       via  77303314dcd58cc820c5e9ad9c30c0428d59b45a (commit)
       via  57862079d8956d30711559eadbf0da31b39917f1 (commit)
       via  4308eb3d165dfc473182021c12ec877e388f60a2 (commit)
       via  5b1364a2e39cd799d663c597bafa4222be888088 (commit)
       via  10a1477b631d9173a32827a315aebf1941c87564 (commit)
       via  971d490e5b22449a9d770e8675799698f857a452 (commit)
      from  b2084a330d73f92b7d55d22921b2e2d9e1d462cc (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=67422bf579e5c274794f131f008bec4ec1e7d4b9
commit 67422bf579e5c274794f131f008bec4ec1e7d4b9
Merge: d7835e4 414aa6c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 15 18:21:14 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Jan 15 13:21:21 2019 -0500

    Merge topic 'simplify-boolean-expr'
    
    414aa6c81e clang-tidy: Simplify boolean expressions
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2740


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d7835e4d0e6858eeff12c6e8d09a42db6acad4bd
commit d7835e4d0e6858eeff12c6e8d09a42db6acad4bd
Merge: 1d328d8 7730331
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 15 18:19:56 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Jan 15 13:20:01 2019 -0500

    Merge topic 'fix-source-group-CMakeLists.txt'
    
    77303314dc Restore support for a custom source group for CMakeLists.txt
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2803


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1d328d8119482ca658434c7eddc07178fd363ae0
commit 1d328d8119482ca658434c7eddc07178fd363ae0
Merge: 88b90fb 59c408d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 15 18:18:34 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Jan 15 13:18:54 2019 -0500

    Merge topic 'extendwhitelist'
    
    59c408d053 cmTargetPropertyComputer: whitelist 'MANUALLY_ADDED_DEPENDENCIES'.
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2808


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=88b90fb1ff8b5cef816cedcf6dd378cc706806d6
commit 88b90fb1ff8b5cef816cedcf6dd378cc706806d6
Merge: 4cf301c 214a0bc
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 15 18:17:58 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Jan 15 13:18:04 2019 -0500

    Merge topic 'rel-win7'
    
    214a0bc924 Utilities/Release: Build for Windows 7 and above
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2807


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4cf301ca77ccb487f0ef5172d6525667896dc84a
commit 4cf301ca77ccb487f0ef5172d6525667896dc84a
Merge: bf1a1ca 5b1364a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 15 18:16:41 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Jan 15 13:16:46 2019 -0500

    Merge topic 'vs10_cs_cf_support'
    
    5b1364a2e3 cmVisualStudio10TargetGenerator: Fix .NET Compact Framework projects.
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2715


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf1a1caefeceaaad8f86e613e086b244a569456b
commit bf1a1caefeceaaad8f86e613e086b244a569456b
Merge: 11e43a1 10a1477
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 15 18:15:37 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Jan 15 13:15:44 2019 -0500

    Merge topic 'check-fortran-run'
    
    10a1477b63 CheckFortranSourceRuns: Add module to check if Fortran code runs
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2714


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=11e43a19a47797ed539924022d7c54b2f92125e9
commit 11e43a19a47797ed539924022d7c54b2f92125e9
Merge: e01d04b 5786207
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 15 18:12:42 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Jan 15 13:14:25 2019 -0500

    Merge topic 'refactor-cmDocumentation'
    
    57862079d8 cmDocumentation: Get rid of raw pointers in AllSections map
    4308eb3d16 cmDocumentationSection: Remove unused parameter in constructor
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2692


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e01d04b3a1aade55f4e086c47624869b77639544
commit e01d04b3a1aade55f4e086c47624869b77639544
Merge: b2084a3 971d490
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 15 18:12:05 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Jan 15 13:13:17 2019 -0500

    Merge topic 'curl-IPv6'
    
    971d490e5b curl: do not disable IPv6 support
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2762


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=414aa6c81ec62ab2f728fab31aa189ce674484a4
commit 414aa6c81ec62ab2f728fab31aa189ce674484a4
Author:     Regina Pfeifer <regina at mailbox.org>
AuthorDate: Thu Dec 13 19:41:05 2018 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jan 15 11:40:25 2019 -0500

    clang-tidy: Simplify boolean expressions

diff --git a/.clang-tidy b/.clang-tidy
index dc60714..3ae249f 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -32,7 +32,6 @@ readability-*,\
 -readability-inconsistent-declaration-parameter-name,\
 -readability-named-parameter,\
 -readability-redundant-declaration,\
--readability-simplify-boolean-expr,\
 "
 HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$'
 CheckOptions:
diff --git a/Source/CPack/OSXScriptLauncher.cxx b/Source/CPack/OSXScriptLauncher.cxx
index d3de02b..4966d09 100644
--- a/Source/CPack/OSXScriptLauncher.cxx
+++ b/Source/CPack/OSXScriptLauncher.cxx
@@ -46,8 +46,7 @@ int main(int argc, char* argv[])
 
   // get the file system path of the url as a cstring
   // in an encoding suitable for posix apis
-  if (CFURLGetFileSystemRepresentation(scriptFileURL, true, path, PATH_MAX) ==
-      false) {
+  if (!CFURLGetFileSystemRepresentation(scriptFileURL, true, path, PATH_MAX)) {
     DebugError("CFURLGetFileSystemRepresentation failed");
     return 1;
   }
diff --git a/Source/CPack/cmCPackFreeBSDGenerator.cxx b/Source/CPack/cmCPackFreeBSDGenerator.cxx
index 2fcd1a8..1e6b118 100644
--- a/Source/CPack/cmCPackFreeBSDGenerator.cxx
+++ b/Source/CPack/cmCPackFreeBSDGenerator.cxx
@@ -257,13 +257,8 @@ void cmCPackFreeBSDGenerator::write_manifest_fields(
 static bool ignore_file(const std::string& filename)
 {
   struct stat statbuf;
-
-  if (!((stat(filename.c_str(), &statbuf) >= 0) &&
-        ((statbuf.st_mode & S_IFMT) == S_IFREG))) {
-    return true;
-  }
-  // May be other reasons to return false
-  return false;
+  return stat(filename.c_str(), &statbuf) < 0 ||
+    (statbuf.st_mode & S_IFMT) != S_IFREG;
 }
 
 // Write the given list of @p files to the manifest stream @p s,
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index 56eb2bf..5d6f301 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -55,7 +55,7 @@ void cmGeneratorExpressionDAGChecker::Initialize()
 
   if (CheckResult == DAG &&
       (CM_FOR_EACH_TRANSITIVE_PROPERTY_METHOD(
-        TEST_TRANSITIVE_PROPERTY_METHOD) false)) // NOLINT(clang-tidy)
+        TEST_TRANSITIVE_PROPERTY_METHOD) false)) // NOLINT(*)
 #undef TEST_TRANSITIVE_PROPERTY_METHOD
   {
     std::map<cmGeneratorTarget const*, std::set<std::string>>::const_iterator
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index eb3df16..627e66d 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -1257,7 +1257,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
 #define TRANSITIVE_PROPERTY_COMPARE(PROPERTY)                                 \
   (#PROPERTY == propertyName || "INTERFACE_" #PROPERTY == propertyName) ||
         if (CM_FOR_EACH_TRANSITIVE_PROPERTY_NAME(
-              TRANSITIVE_PROPERTY_COMPARE) false) { // NOLINT(clang-tidy)
+              TRANSITIVE_PROPERTY_COMPARE) false) { // NOLINT(*)
           reportError(
             context, content->GetOriginalExpression(),
             "$<TARGET_PROPERTY:...> expression in link libraries "
diff --git a/Source/cmMachO.cxx b/Source/cmMachO.cxx
index 7294c1c..7368812 100644
--- a/Source/cmMachO.cxx
+++ b/Source/cmMachO.cxx
@@ -52,10 +52,7 @@ bool peek(cmsys::ifstream& fin, T& v)
 template <typename T>
 bool read(cmsys::ifstream& fin, T& v)
 {
-  if (!fin.read(reinterpret_cast<char*>(&v), sizeof(T))) {
-    return false;
-  }
-  return true;
+  return !!fin.read(reinterpret_cast<char*>(&v), sizeof(T));
 }
 
 // read from the file and fill multiple data structures where
@@ -67,10 +64,7 @@ bool read(cmsys::ifstream& fin, std::vector<T>& v)
   if (v.empty()) {
     return true;
   }
-  if (!fin.read(reinterpret_cast<char*>(&v[0]), sizeof(T) * v.size())) {
-    return false;
-  }
-  return true;
+  return !!fin.read(reinterpret_cast<char*>(&v[0]), sizeof(T) * v.size());
 }
 }
 
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index e4d2c82..5ac080a 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -1231,11 +1231,7 @@ bool cmQtAutoGenInitializer::SetupCustomTargets()
   }
 
   // Write AUTORCC info files
-  if (this->Rcc.Enabled && !this->SetupWriteRccInfo()) {
-    return false;
-  }
-
-  return true;
+  return !this->Rcc.Enabled || this->SetupWriteRccInfo();
 }
 
 bool cmQtAutoGenInitializer::SetupWriteAutogenInfo()
diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx
index fe0bdc9..f7d3879 100644
--- a/Source/cmServer.cxx
+++ b/Source/cmServer.cxx
@@ -417,7 +417,7 @@ static void __start_thread(void* arg)
   auto server = static_cast<cmServerBase*>(arg);
   std::string error;
   bool success = server->Serve(&error);
-  if (!success || error.empty() == false) {
+  if (!success || !error.empty()) {
     std::cerr << "Error during serve: " << error << std::endl;
   }
 }
diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx
index c3df313..08f4d1a 100644
--- a/Source/cmSourceGroupCommand.cxx
+++ b/Source/cmSourceGroupCommand.cxx
@@ -254,16 +254,12 @@ bool cmSourceGroupCommand::InitialPass(std::vector<std::string> const& args,
 bool cmSourceGroupCommand::checkArgumentsPreconditions(
   const ParsedArguments& parsedArguments, std::string& errorMsg) const
 {
-  if (!checkSingleParameterArgumentPreconditions(kPrefixOptionName,
-                                                 parsedArguments, errorMsg) ||
-      !checkSingleParameterArgumentPreconditions(kTreeOptionName,
-                                                 parsedArguments, errorMsg) ||
-      !checkSingleParameterArgumentPreconditions(kRegexOptionName,
-                                                 parsedArguments, errorMsg)) {
-    return false;
-  }
-
-  return true;
+  return checkSingleParameterArgumentPreconditions(
+           kPrefixOptionName, parsedArguments, errorMsg) &&
+    checkSingleParameterArgumentPreconditions(kTreeOptionName, parsedArguments,
+                                              errorMsg) &&
+    checkSingleParameterArgumentPreconditions(kRegexOptionName,
+                                              parsedArguments, errorMsg);
 }
 
 bool cmSourceGroupCommand::processTree(ParsedArguments& parsedArguments,
@@ -286,12 +282,8 @@ bool cmSourceGroupCommand::processTree(ParsedArguments& parsedArguments,
   std::set<std::string> sourceGroupPaths =
     getSourceGroupFilesPaths(root, filesVector);
 
-  if (!addFilesToItsSourceGroups(root, sourceGroupPaths, prefix,
-                                 *(this->Makefile), errorMsg)) {
-    return false;
-  }
-
-  return true;
+  return addFilesToItsSourceGroups(root, sourceGroupPaths, prefix,
+                                   *(this->Makefile), errorMsg);
 }
 
 bool cmSourceGroupCommand::checkSingleParameterArgumentPreconditions(

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=59c408d053cfe90273db04c3804ed91d7ad59d8f
commit 59c408d053cfe90273db04c3804ed91d7ad59d8f
Author:     Sebastian Lipponer <mail at sebastianlipponer.de>
AuthorDate: Mon Jan 14 19:46:59 2019 +0100
Commit:     Sebastian Lipponer <mail at sebastianlipponer.de>
CommitDate: Mon Jan 14 20:59:33 2019 +0100

    cmTargetPropertyComputer: whitelist 'MANUALLY_ADDED_DEPENDENCIES'.

diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst
index 4fc484b..a1328f2 100644
--- a/Help/manual/cmake-buildsystem.7.rst
+++ b/Help/manual/cmake-buildsystem.7.rst
@@ -978,6 +978,7 @@ are:
 * Built-in properties matching ``COMPATIBLE_INTERFACE_*``
 * ``EXPORT_NAME``
 * ``IMPORTED``
+* ``MANUALLY_ADDED_DEPENDENCIES``
 * ``NAME``
 * Properties matching ``IMPORTED_LIBNAME_*``
 * Properties matching ``MAP_IMPORTED_CONFIG_*``
diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx
index 06ce0b1..e1765ff 100644
--- a/Source/cmTargetPropertyComputer.cxx
+++ b/Source/cmTargetPropertyComputer.cxx
@@ -65,6 +65,7 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty(
     builtIns.insert("EXPORT_NAME");
     builtIns.insert("IMPORTED");
     builtIns.insert("IMPORTED_GLOBAL");
+    builtIns.insert("MANUALLY_ADDED_DEPENDENCIES");
     builtIns.insert("NAME");
     builtIns.insert("TYPE");
   }
diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt
index 3db210a..6aae09a 100644
--- a/Tests/InterfaceLibrary/CMakeLists.txt
+++ b/Tests/InterfaceLibrary/CMakeLists.txt
@@ -31,6 +31,7 @@ add_library(item_real STATIC item.cpp)
 add_library(item_iface INTERFACE IMPORTED)
 set_property(TARGET item_iface PROPERTY IMPORTED_LIBNAME item_real)
 add_dependencies(item_iface item_real)
+get_property(item_iface_dependencies TARGET item_iface PROPERTY MANUALLY_ADDED_DEPENDENCIES)
 link_directories(${CMAKE_CURRENT_BINARY_DIR})
 
 add_executable(InterfaceLibrary definetestexe.cpp)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=214a0bc924b35cc18adddc603bea58d456e74e64
commit 214a0bc924b35cc18adddc603bea58d456e74e64
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 14 14:16:22 2019 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 14 14:17:01 2019 -0500

    Utilities/Release: Build for Windows 7 and above
    
    Drop support for Windows XP and Windows Vista.  Upstream libuv has
    done this, and since that is a dependency of ours we will soon
    need to do so also.

diff --git a/Help/release/dev/rel-win7.rst b/Help/release/dev/rel-win7.rst
new file mode 100644
index 0000000..f7a745c
--- /dev/null
+++ b/Help/release/dev/rel-win7.rst
@@ -0,0 +1,6 @@
+rel-win7
+--------
+
+* Support for running CMake on Windows XP and Windows Vista has been dropped.
+  The precompiled Windows binaries provided on ``cmake.org`` now require
+  Windows 7 or higher.
diff --git a/Utilities/Release/win32_release.cmake b/Utilities/Release/win32_release.cmake
index 2e817d9..c03c665 100644
--- a/Utilities/Release/win32_release.cmake
+++ b/Utilities/Release/win32_release.cmake
@@ -25,13 +25,13 @@ BUILD_QtDialog:BOOL=TRUE
 CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
 CMAKE_C_FLAGS_RELEASE:STRING=-MT -O2 -Ob2 -DNDEBUG
 CMAKE_CXX_FLAGS_RELEASE:STRING=-MT -O2 -Ob2 -DNDEBUG
-CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x86 -subsystem:console,5.01
+CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x86 -subsystem:console,6.01
 CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES:STRING=${qt_win_libs}
 CMAKE_PREFIX_PATH:STRING=${qt_prefix}
 CMake_TEST_Qt4:BOOL=OFF
 CMake_TEST_Qt5:BOOL=OFF
 ")
-set(ppflags "-D_WIN32_WINNT=0x501 -DNTDDI_VERSION=0x05010000 -D_USING_V110_SDK71_")
+set(ppflags "-D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000 -D_USING_V110_SDK71_")
 set(CFLAGS "${ppflags}")
 set(CXXFLAGS "${ppflags}")
 set(ENV ". ~/rel/env32")
diff --git a/Utilities/Release/win64_release.cmake b/Utilities/Release/win64_release.cmake
index 33af830..8417206 100644
--- a/Utilities/Release/win64_release.cmake
+++ b/Utilities/Release/win64_release.cmake
@@ -25,13 +25,13 @@ BUILD_QtDialog:BOOL=TRUE
 CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
 CMAKE_C_FLAGS_RELEASE:STRING=-MT -O2 -Ob2 -DNDEBUG
 CMAKE_CXX_FLAGS_RELEASE:STRING=-MT -O2 -Ob2 -DNDEBUG
-CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x64 -subsystem:console,5.02
+CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x64 -subsystem:console,6.01
 CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES:STRING=${qt_win_libs}
 CMAKE_PREFIX_PATH:STRING=${qt_prefix}
 CMake_TEST_Qt4:BOOL=OFF
 CMake_TEST_Qt5:BOOL=OFF
 ")
-set(ppflags "-D_WIN32_WINNT=0x502 -DNTDDI_VERSION=0x05020000 -D_USING_V110_SDK71_")
+set(ppflags "-D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000 -D_USING_V110_SDK71_")
 set(CFLAGS "${ppflags}")
 set(CXXFLAGS "${ppflags}")
 set(ENV ". ~/rel/env64")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=77303314dcd58cc820c5e9ad9c30c0428d59b45a
commit 77303314dcd58cc820c5e9ad9c30c0428d59b45a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 14 08:25:12 2019 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 14 08:43:30 2019 -0500

    Restore support for a custom source group for CMakeLists.txt
    
    Since commit v3.11.0-rc1~467^2 (VS,Xcode: Add CMakeLists.txt sources
    without mutating targets, 2017-10-18) we do not add `CMakeLists.txt` to
    target sources but instead generate references to them directly.  This
    accidentally dropped generation of the `.vcxproj.filters` entry for a
    source group in which `CMakeLists.txt` is the only member.
    
    Fixes: #18795

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index b0e70ff..1b145d3 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1419,6 +1419,14 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
     groupsUsed.insert(sourceGroup);
   }
 
+  if (cmSourceFile const* srcCMakeLists =
+        this->LocalGenerator->CreateVCProjBuildRule()) {
+    std::string const& source = srcCMakeLists->GetFullPath();
+    cmSourceGroup* sourceGroup =
+      this->Makefile->FindSourceGroup(source, sourceGroups);
+    groupsUsed.insert(sourceGroup);
+  }
+
   this->AddMissingSourceGroups(groupsUsed, sourceGroups);
 
   // Write out group file
diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
index db375ae..c796840 100644
--- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
@@ -1,6 +1,7 @@
 include(RunCMake)
 
 run_cmake(ExplicitCMakeLists)
+run_cmake(SourceGroupCMakeLists)
 
 run_cmake(VsConfigurationType)
 run_cmake(VsTargetsFileReferences)
diff --git a/Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake b/Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake
new file mode 100644
index 0000000..c2a94bb
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake
@@ -0,0 +1,33 @@
+set(vcFiltersFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj.filters")
+if(NOT EXISTS "${vcFiltersFile}")
+  set(RunCMake_TEST_FAILED "Filters file ${vcFiltersFile} does not exist.")
+  return()
+endif()
+
+set(foundFileFilter 0)
+set(foundFilter 0)
+file(STRINGS "${vcFiltersFile}" lines)
+foreach(line IN LISTS lines)
+  if(line MATCHES "<Filter>CMakeListsSourceGroup</Filter>")
+    set(rule "${CMAKE_MATCH_1}")
+    if(foundFileFilter)
+      set(RunCMake_TEST_FAILED "Multiple files listed with filter for CMakeListsSourceGroup.")
+      return()
+    endif()
+    set(foundFileFilter 1)
+  endif()
+  if(line MATCHES "<Filter.*Include=\"CMakeListsSourceGroup\"")
+    set(rule "${CMAKE_MATCH_1}")
+    if(foundFilter)
+      set(RunCMake_TEST_FAILED "Multiple copies of CMakeListsSourceGroup filter listed.")
+      return()
+    endif()
+    set(foundFilter 1)
+  endif()
+endforeach()
+if(NOT foundFileFilter)
+  set(RunCMake_TEST_FAILED "File filter for CMakeListsSourceGroup not found.")
+endif()
+if(NOT foundFilter)
+  set(RunCMake_TEST_FAILED "Filter CMakeListsSourceGroup not found.")
+endif()
diff --git a/Tests/RunCMake/VS10Project/SourceGroupCMakeLists.cmake b/Tests/RunCMake/VS10Project/SourceGroupCMakeLists.cmake
new file mode 100644
index 0000000..4ad87ec
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/SourceGroupCMakeLists.cmake
@@ -0,0 +1,3 @@
+set(CMAKE_CONFIGURATION_TYPES Debug)
+add_custom_target(foo)
+source_group("CMakeListsSourceGroup" FILES CMakeLists.txt)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=57862079d8956d30711559eadbf0da31b39917f1
commit 57862079d8956d30711559eadbf0da31b39917f1
Author:     Artur Ryt <artur.ryt at gmail.com>
AuthorDate: Fri Nov 30 20:08:50 2018 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Jan 11 14:51:32 2019 -0500

    cmDocumentation: Get rid of raw pointers in AllSections map
    
    Also simplify a lot of logic around adding sections into it.
    Prefer move sematics over references.

diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index a85a134..fafb079 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -2,7 +2,6 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmDocumentation.h"
 
-#include "cmAlgorithms.h"
 #include "cmDocumentationEntry.h"
 #include "cmDocumentationSection.h"
 #include "cmRST.h"
@@ -55,11 +54,6 @@ cmDocumentation::cmDocumentation()
   this->ShowGenerators = true;
 }
 
-cmDocumentation::~cmDocumentation()
-{
-  cmDeleteAll(this->AllSections);
-}
-
 bool cmDocumentation::PrintVersion(std::ostream& os)
 {
   /* clang-format off */
@@ -174,20 +168,16 @@ void cmDocumentation::WarnFormFromFilename(
 
 void cmDocumentation::addCommonStandardDocSections()
 {
-  cmDocumentationSection* sec;
-
-  sec = new cmDocumentationSection("Options");
-  sec->Append(cmDocumentationStandardOptions);
-  this->AllSections["Options"] = sec;
+  cmDocumentationSection sec{ "Options" };
+  sec.Append(cmDocumentationStandardOptions);
+  this->AllSections.emplace("Options", std::move(sec));
 }
 
 void cmDocumentation::addCMakeStandardDocSections()
 {
-  cmDocumentationSection* sec;
-
-  sec = new cmDocumentationSection("Generators");
-  sec->Append(cmDocumentationGeneratorsHeader);
-  this->AllSections["Generators"] = sec;
+  cmDocumentationSection sec{ "Generators" };
+  sec.Append(cmDocumentationGeneratorsHeader);
+  this->AllSections.emplace("Generators", std::move(sec));
 }
 
 void cmDocumentation::addCTestStandardDocSections()
@@ -199,11 +189,7 @@ void cmDocumentation::addCTestStandardDocSections()
 
 void cmDocumentation::addCPackStandardDocSections()
 {
-  cmDocumentationSection* sec;
-
-  sec = new cmDocumentationSection("Generators");
-  sec->Append(cmDocumentationGeneratorsHeader);
-  this->AllSections["Generators"] = sec;
+  addCMakeStandardDocSections();
 }
 
 bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
@@ -364,85 +350,59 @@ void cmDocumentation::SetName(const std::string& name)
 }
 
 void cmDocumentation::SetSection(const char* name,
-                                 cmDocumentationSection* section)
+                                 cmDocumentationSection section)
 {
-  if (this->AllSections.find(name) != this->AllSections.end()) {
-    delete this->AllSections[name];
-  }
-  this->AllSections[name] = section;
+  this->SectionAtName(name) = std::move(section);
 }
 
 void cmDocumentation::SetSection(const char* name,
                                  std::vector<cmDocumentationEntry>& docs)
 {
-  cmDocumentationSection* sec = new cmDocumentationSection(name);
-  sec->Append(docs);
-  this->SetSection(name, sec);
+  cmDocumentationSection sec{ name };
+  sec.Append(docs);
+  this->SetSection(name, std::move(sec));
 }
 
 void cmDocumentation::SetSection(const char* name, const char* docs[][2])
 {
-  cmDocumentationSection* sec = new cmDocumentationSection(name);
-  sec->Append(docs);
-  this->SetSection(name, sec);
+  cmDocumentationSection sec{ name };
+  sec.Append(docs);
+  this->SetSection(name, std::move(sec));
 }
 
 void cmDocumentation::SetSections(
-  std::map<std::string, cmDocumentationSection*>& sections)
+  std::map<std::string, cmDocumentationSection> sections)
 {
-  for (auto const& s : sections) {
-    this->SetSection(s.first.c_str(), s.second);
+  for (auto& s : sections) {
+    this->SetSection(s.first.c_str(), std::move(s.second));
   }
 }
+cmDocumentationSection& cmDocumentation::SectionAtName(const char* name)
+{
+  return this->AllSections.emplace(name, cmDocumentationSection{ name })
+    .first->second;
+}
 
 void cmDocumentation::PrependSection(const char* name, const char* docs[][2])
 {
-  cmDocumentationSection* sec = nullptr;
-  if (this->AllSections.find(name) == this->AllSections.end()) {
-    sec = new cmDocumentationSection(name);
-    this->SetSection(name, sec);
-  } else {
-    sec = this->AllSections[name];
-  }
-  sec->Prepend(docs);
+  this->SectionAtName(name).Prepend(docs);
 }
 
 void cmDocumentation::PrependSection(const char* name,
                                      std::vector<cmDocumentationEntry>& docs)
 {
-  cmDocumentationSection* sec = nullptr;
-  if (this->AllSections.find(name) == this->AllSections.end()) {
-    sec = new cmDocumentationSection(name);
-    this->SetSection(name, sec);
-  } else {
-    sec = this->AllSections[name];
-  }
-  sec->Prepend(docs);
+  this->SectionAtName(name).Prepend(docs);
 }
 
 void cmDocumentation::AppendSection(const char* name, const char* docs[][2])
 {
-  cmDocumentationSection* sec = nullptr;
-  if (this->AllSections.find(name) == this->AllSections.end()) {
-    sec = new cmDocumentationSection(name);
-    this->SetSection(name, sec);
-  } else {
-    sec = this->AllSections[name];
-  }
-  sec->Append(docs);
+  this->SectionAtName(name).Append(docs);
 }
 
 void cmDocumentation::AppendSection(const char* name,
                                     std::vector<cmDocumentationEntry>& docs)
 {
-  cmDocumentationSection* sec = nullptr;
-  if (this->AllSections.find(name) == this->AllSections.end()) {
-    sec = new cmDocumentationSection(name);
-    this->SetSection(name, sec);
-  } else {
-    sec = this->AllSections[name];
-  }
-  sec->Append(docs);
+  this->SectionAtName(name).Append(docs);
 }
 
 void cmDocumentation::AppendSection(const char* name,
@@ -625,11 +585,10 @@ bool cmDocumentation::PrintHelpListPolicies(std::ostream& os)
 
 bool cmDocumentation::PrintHelpListGenerators(std::ostream& os)
 {
-  std::map<std::string, cmDocumentationSection*>::iterator si;
-  si = this->AllSections.find("Generators");
+  const auto si = this->AllSections.find("Generators");
   if (si != this->AllSections.end()) {
     this->Formatter.SetIndent("  ");
-    this->Formatter.PrintSection(os, *si->second);
+    this->Formatter.PrintSection(os, si->second);
   }
   return true;
 }
@@ -655,29 +614,27 @@ bool cmDocumentation::PrintHelpListVariables(std::ostream& os)
 
 bool cmDocumentation::PrintUsage(std::ostream& os)
 {
-  std::map<std::string, cmDocumentationSection*>::iterator si;
-  si = this->AllSections.find("Usage");
+  const auto si = this->AllSections.find("Usage");
   if (si != this->AllSections.end()) {
-    this->Formatter.PrintSection(os, *si->second);
+    this->Formatter.PrintSection(os, si->second);
   }
   return true;
 }
 
 bool cmDocumentation::PrintHelp(std::ostream& os)
 {
-  std::map<std::string, cmDocumentationSection*>::iterator si;
-  si = this->AllSections.find("Usage");
+  auto si = this->AllSections.find("Usage");
   if (si != this->AllSections.end()) {
-    this->Formatter.PrintSection(os, *si->second);
+    this->Formatter.PrintSection(os, si->second);
   }
   si = this->AllSections.find("Options");
   if (si != this->AllSections.end()) {
-    this->Formatter.PrintSection(os, *si->second);
+    this->Formatter.PrintSection(os, si->second);
   }
   if (this->ShowGenerators) {
     si = this->AllSections.find("Generators");
     if (si != this->AllSections.end()) {
-      this->Formatter.PrintSection(os, *si->second);
+      this->Formatter.PrintSection(os, si->second);
     }
   }
   return true;
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h
index 153bad6..b2ff01a 100644
--- a/Source/cmDocumentation.h
+++ b/Source/cmDocumentation.h
@@ -6,13 +6,13 @@
 #include "cmConfigure.h" // IWYU pragma: keep
 
 #include "cmDocumentationFormatter.h"
+#include "cmDocumentationSection.h"
 
 #include <iosfwd>
 #include <map>
 #include <string>
 #include <vector>
 
-class cmDocumentationSection;
 struct cmDocumentationEntry;
 
 /** Class to generate documentation.  */
@@ -21,8 +21,6 @@ class cmDocumentation : public cmDocumentationEnums
 public:
   cmDocumentation();
 
-  ~cmDocumentation();
-
   /**
    * Check command line arguments for documentation options.  Returns
    * true if documentation options are found, and false otherwise.
@@ -52,11 +50,11 @@ public:
 
   /** Set a section of the documentation. Typical sections include Name,
       Usage, Description, Options */
-  void SetSection(const char* sectionName, cmDocumentationSection* section);
+  void SetSection(const char* sectionName, cmDocumentationSection section);
   void SetSection(const char* sectionName,
                   std::vector<cmDocumentationEntry>& docs);
   void SetSection(const char* sectionName, const char* docs[][2]);
-  void SetSections(std::map<std::string, cmDocumentationSection*>& sections);
+  void SetSections(std::map<std::string, cmDocumentationSection> sections);
 
   /** Add the documentation to the beginning/end of the section */
   void PrependSection(const char* sectionName, const char* docs[][2]);
@@ -110,7 +108,8 @@ private:
   bool ShowGenerators;
 
   std::string NameString;
-  std::map<std::string, cmDocumentationSection*> AllSections;
+  std::map<std::string, cmDocumentationSection> AllSections;
+  cmDocumentationSection& SectionAtName(const char* name);
 
   std::string CurrentArgument;
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4308eb3d165dfc473182021c12ec877e388f60a2
commit 4308eb3d165dfc473182021c12ec877e388f60a2
Author:     Artur Ryt <artur.ryt at gmail.com>
AuthorDate: Fri Nov 30 20:08:44 2018 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Jan 11 14:51:30 2019 -0500

    cmDocumentationSection: Remove unused parameter in constructor

diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 2dfba04..a85a134 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -176,7 +176,7 @@ void cmDocumentation::addCommonStandardDocSections()
 {
   cmDocumentationSection* sec;
 
-  sec = new cmDocumentationSection("Options", "OPTIONS");
+  sec = new cmDocumentationSection("Options");
   sec->Append(cmDocumentationStandardOptions);
   this->AllSections["Options"] = sec;
 }
@@ -185,7 +185,7 @@ void cmDocumentation::addCMakeStandardDocSections()
 {
   cmDocumentationSection* sec;
 
-  sec = new cmDocumentationSection("Generators", "GENERATORS");
+  sec = new cmDocumentationSection("Generators");
   sec->Append(cmDocumentationGeneratorsHeader);
   this->AllSections["Generators"] = sec;
 }
@@ -201,7 +201,7 @@ void cmDocumentation::addCPackStandardDocSections()
 {
   cmDocumentationSection* sec;
 
-  sec = new cmDocumentationSection("Generators", "GENERATORS");
+  sec = new cmDocumentationSection("Generators");
   sec->Append(cmDocumentationGeneratorsHeader);
   this->AllSections["Generators"] = sec;
 }
@@ -375,16 +375,14 @@ void cmDocumentation::SetSection(const char* name,
 void cmDocumentation::SetSection(const char* name,
                                  std::vector<cmDocumentationEntry>& docs)
 {
-  cmDocumentationSection* sec =
-    new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
+  cmDocumentationSection* sec = new cmDocumentationSection(name);
   sec->Append(docs);
   this->SetSection(name, sec);
 }
 
 void cmDocumentation::SetSection(const char* name, const char* docs[][2])
 {
-  cmDocumentationSection* sec =
-    new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
+  cmDocumentationSection* sec = new cmDocumentationSection(name);
   sec->Append(docs);
   this->SetSection(name, sec);
 }
@@ -401,8 +399,7 @@ void cmDocumentation::PrependSection(const char* name, const char* docs[][2])
 {
   cmDocumentationSection* sec = nullptr;
   if (this->AllSections.find(name) == this->AllSections.end()) {
-    sec =
-      new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
+    sec = new cmDocumentationSection(name);
     this->SetSection(name, sec);
   } else {
     sec = this->AllSections[name];
@@ -415,8 +412,7 @@ void cmDocumentation::PrependSection(const char* name,
 {
   cmDocumentationSection* sec = nullptr;
   if (this->AllSections.find(name) == this->AllSections.end()) {
-    sec =
-      new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
+    sec = new cmDocumentationSection(name);
     this->SetSection(name, sec);
   } else {
     sec = this->AllSections[name];
@@ -428,8 +424,7 @@ void cmDocumentation::AppendSection(const char* name, const char* docs[][2])
 {
   cmDocumentationSection* sec = nullptr;
   if (this->AllSections.find(name) == this->AllSections.end()) {
-    sec =
-      new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
+    sec = new cmDocumentationSection(name);
     this->SetSection(name, sec);
   } else {
     sec = this->AllSections[name];
@@ -442,8 +437,7 @@ void cmDocumentation::AppendSection(const char* name,
 {
   cmDocumentationSection* sec = nullptr;
   if (this->AllSections.find(name) == this->AllSections.end()) {
-    sec =
-      new cmDocumentationSection(name, cmSystemTools::UpperCase(name).c_str());
+    sec = new cmDocumentationSection(name);
     this->SetSection(name, sec);
   } else {
     sec = this->AllSections[name];
diff --git a/Source/cmDocumentationSection.h b/Source/cmDocumentationSection.h
index d9e8187..7031b52 100644
--- a/Source/cmDocumentationSection.h
+++ b/Source/cmDocumentationSection.h
@@ -19,7 +19,7 @@ class cmDocumentationSection
 {
 public:
   /** Create a cmSection, with a special name for man-output mode. */
-  cmDocumentationSection(const char* name, const char*)
+  explicit cmDocumentationSection(const char* name)
     : Name(name)
   {
   }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5b1364a2e39cd799d663c597bafa4222be888088
commit 5b1364a2e39cd799d663c597bafa4222be888088
Author:     Wil Stark <wil_stark at keysight.com>
AuthorDate: Thu Dec 6 16:31:20 2018 -0800
Commit:     Wil Stark <wil_stark at keysight.com>
CommitDate: Fri Jan 11 09:08:55 2019 -0800

    cmVisualStudio10TargetGenerator: Fix .NET Compact Framework projects.
    
    Fixes: #18672

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index b0e70ff..5140648 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -297,6 +297,11 @@ std::ostream& cmVisualStudio10TargetGenerator::Elem::WriteString(
   "$(UserRootDir)\\Microsoft.CSharp.$(Platform).user.props"
 #define VS10_CSharp_TARGETS "$(MSBuildToolsPath)\\Microsoft.CSharp.targets"
 
+#define VS10_CSharp_NETCF_TARGETS                                             \
+  "$(MSBuildExtensionsPath)\\Microsoft\\$(TargetFrameworkIdentifier)\\"       \
+  "$(TargetFrameworkTargetsVersion)\\Microsoft.$(TargetFrameworkIdentifier)"  \
+  ".CSharp.targets"
+
 void cmVisualStudio10TargetGenerator::Generate()
 {
   // do not generate external ms projects
@@ -480,9 +485,31 @@ void cmVisualStudio10TargetGenerator::Generate()
           targetFrameworkVersion = this->GeneratorTarget->GetProperty(
             "DOTNET_TARGET_FRAMEWORK_VERSION");
         }
+        if (!targetFrameworkVersion && this->ProjectType == csproj &&
+            this->GlobalGenerator->TargetsWindowsCE() &&
+            this->GlobalGenerator->GetVersion() ==
+              cmGlobalVisualStudioGenerator::VS12) {
+          // VS12 .NETCF default to .NET framework 3.9
+          targetFrameworkVersion = "v3.9";
+        }
         if (targetFrameworkVersion) {
           e1.Element("TargetFrameworkVersion", targetFrameworkVersion);
         }
+        if (this->ProjectType == csproj &&
+            this->GlobalGenerator->TargetsWindowsCE()) {
+          const char* targetFrameworkId = this->GeneratorTarget->GetProperty(
+            "VS_TARGET_FRAMEWORK_IDENTIFIER");
+          if (!targetFrameworkId) {
+            targetFrameworkId = "WindowsEmbeddedCompact";
+          }
+          e1.Element("TargetFrameworkIdentifier", targetFrameworkId);
+          const char* targetFrameworkVer = this->GeneratorTarget->GetProperty(
+            "VS_TARGET_FRAMEWORKS_TARGET_VERSION");
+          if (!targetFrameworkVer) {
+            targetFrameworkVer = "v8.0";
+          }
+          e1.Element("TargetFrameworkTargetsVersion", targetFrameworkVer);
+        }
       }
 
       // Disable the project upgrade prompt that is displayed the first time a
@@ -638,7 +665,11 @@ void cmVisualStudio10TargetGenerator::Generate()
         Elem(e0, "Import").Attribute("Project", VS10_CXX_TARGETS);
         break;
       case csproj:
-        Elem(e0, "Import").Attribute("Project", VS10_CSharp_TARGETS);
+        if (this->GlobalGenerator->TargetsWindowsCE()) {
+          Elem(e0, "Import").Attribute("Project", VS10_CSharp_NETCF_TARGETS);
+        } else {
+          Elem(e0, "Import").Attribute("Project", VS10_CSharp_TARGETS);
+        }
         break;
     }
 
diff --git a/Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake b/Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake
index b35ee90..2c9067f 100644
--- a/Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake
@@ -6,3 +6,4 @@ set(RunCMake_GENERATOR_INSTANCE "")
 set(RunCMake_TEST_OPTIONS -DCMAKE_SYSTEM_NAME=WindowsCE  )
 
 run_cmake(VsCEDebuggerDeploy)
+run_cmake(VSCSharpCFProject)
diff --git a/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject-check.cmake b/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject-check.cmake
new file mode 100644
index 0000000..618896e
--- /dev/null
+++ b/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject-check.cmake
@@ -0,0 +1,54 @@
+#
+# Check C# Compact Framework project for required elements.
+#
+set(csProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.csproj")
+if(NOT EXISTS "${csProjectFile}")
+  set(RunCMake_TEST_FAILED "Project file ${csProjectFile} does not exist.")
+  return()
+endif()
+
+if( NOT ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsCE" )
+  set(RunCMake_TEST_FAILED "Test only valid for WindowsCE")
+  return()
+endif()
+
+set(FoundTargetFrameworkTargetsVersion FALSE)
+set(FoundDotNetFrameworkVersion FALSE)
+set(FoundTargetFrameworkIdentifier FALSE)
+set(FoundCFTargetsImport FALSE)
+
+
+file(STRINGS "${csProjectFile}" lines)
+foreach(line IN LISTS lines)
+  #message(STATUS ${line})
+  if(line MATCHES "^ *<TargetFrameworkIdentifier>WindowsEmbeddedCompact</TargetFrameworkIdentifier> *$")
+    set(FoundTargetFrameworkIdentifier TRUE)
+  elseif(line MATCHES " *<TargetFrameworkVersion>v3.9</TargetFrameworkVersion> *$")
+    set(FoundDotNetFrameworkVersion TRUE)
+  elseif(line MATCHES " *<TargetFrameworkTargetsVersion>v8.0</TargetFrameworkTargetsVersion> *$")
+    set(FoundTargetFrameworkTargetsVersion TRUE)
+  elseif( line MATCHES " *<Import Project=\"\\$\\(MSBuildExtensionsPath\\)\\\\Microsoft\\\\\\$\\(TargetFrameworkIdentifier\\)\\\\\\$\\(TargetFrameworkTargetsVersion\\)\\\\Microsoft\\.\\$\\(TargetFrameworkIdentifier\\)\\.CSharp\\.targets\" */> *" )
+    set(FoundCFTargetsImport TRUE)
+  endif()
+endforeach()
+
+
+if(NOT FoundTargetFrameworkTargetsVersion)
+  set(RunCMake_TEST_FAILED "TargetFrameworkIdentifier not found or not set correctly.")
+  return()
+endif()
+
+if(NOT FoundDotNetFrameworkVersion)
+  set(RunCMake_TEST_FAILED "TargetFrameworkVersion not found or not set correctly.")
+  return()
+endif()
+
+if(NOT FoundTargetFrameworkIdentifier)
+  set(RunCMake_TEST_FAILED "TargetFrameworkTargetsVersion not found or not set correctly.")
+  return()
+endif()
+
+if(NOT FoundCFTargetsImport)
+  set(RunCMake_TEST_FAILED "Import of Compact Framework targets file not found or not set correctly.")
+  return()
+endif()
diff --git a/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject.cmake b/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject.cmake
new file mode 100644
index 0000000..fb2acbb
--- /dev/null
+++ b/Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject.cmake
@@ -0,0 +1,8 @@
+enable_language(CSharp)
+
+add_library(foo SHARED foo.cs )
+
+set_target_properties(foo
+ PROPERTIES
+   DOTNET_TARGET_FRAMEWORK_VERSION "v3.9"
+)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=10a1477b631d9173a32827a315aebf1941c87564
commit 10a1477b631d9173a32827a315aebf1941c87564
Author:     Michael Hirsch, Ph.D <scivision at users.noreply.github.com>
AuthorDate: Thu Dec 6 15:09:54 2018 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 10 14:09:12 2019 -0500

    CheckFortranSourceRuns: Add module to check if Fortran code runs
    
    Add a Fortran equivalent to the existing `Check{C,CXX}SourceRuns`
    modules.

diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst
index 940186a..71a8b00 100644
--- a/Help/manual/cmake-modules.7.rst
+++ b/Help/manual/cmake-modules.7.rst
@@ -28,6 +28,7 @@ These modules are loaded using the :command:`include` command.
    /module/CheckFortranCompilerFlag
    /module/CheckFortranFunctionExists
    /module/CheckFortranSourceCompiles
+   /module/CheckFortranSourceRuns
    /module/CheckFunctionExists
    /module/CheckIPOSupported
    /module/CheckIncludeFileCXX
diff --git a/Help/module/CheckFortranSourceRuns.rst b/Help/module/CheckFortranSourceRuns.rst
new file mode 100644
index 0000000..a1bff70
--- /dev/null
+++ b/Help/module/CheckFortranSourceRuns.rst
@@ -0,0 +1 @@
+.. cmake-module:: ../../Modules/CheckFortranSourceRuns.cmake
diff --git a/Help/release/dev/check-fortran-run.rst b/Help/release/dev/check-fortran-run.rst
new file mode 100644
index 0000000..b5f6558
--- /dev/null
+++ b/Help/release/dev/check-fortran-run.rst
@@ -0,0 +1,6 @@
+check-fortran-run
+-----------------
+
+* A :module:`CheckFortranSourceRuns` module was added to provide a
+  :command:`check_fortran_source_runs` command to check if a Fortran
+  source snippet compiles and runs.
diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake
index b3e83dd..1820407 100644
--- a/Modules/CheckFortranSourceCompiles.cmake
+++ b/Modules/CheckFortranSourceCompiles.cmake
@@ -26,7 +26,8 @@ Check if given Fortran source compiles and links into an executable.
   if anything in the output matches any of the specified regular expressions.
 
   By default, the test source file will be given a ``.F`` file extension. The
-  ``SRC_EXT`` option can be used to override this with ``.<extension>`` instead.
+  ``SRC_EXT`` option can be used to override this with ``.<extension>`` instead--
+  ``.F90`` is a typical choice.
 
   The underlying check is performed by the :command:`try_compile` command. The
   compile and link commands can be influenced by setting any of the following
diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceRuns.cmake
similarity index 72%
copy from Modules/CheckFortranSourceCompiles.cmake
copy to Modules/CheckFortranSourceRuns.cmake
index b3e83dd..58d90d7 100644
--- a/Modules/CheckFortranSourceCompiles.cmake
+++ b/Modules/CheckFortranSourceRuns.cmake
@@ -2,35 +2,32 @@
 # file Copyright.txt or https://cmake.org/licensing for details.
 
 #[=======================================================================[.rst:
-CheckFortranSourceCompiles
---------------------------
+CheckFortranSourceRuns
+----------------------
 
-Check if given Fortran source compiles and links into an executable.
+Check if given Fortran source compiles and links into an executable and can
+subsequently be run.
 
-.. command:: check_fortran_source_compiles
+.. command:: check_fortran_source_runs
 
   .. code-block:: cmake
 
-    check_fortran_source_compiles(<code> <resultVar>
-        [FAIL_REGEX <regex>...]
-        [SRC_EXT <extension>]
-    )
+    check_fortran_source_runs(<code> <resultVar>
+        [SRC_EXT <extension>])
 
-  Checks that the source supplied in ``<code>`` can be compiled as a Fortran
-  source file and linked as an executable (so it must contain at least a
-  ``PROGRAM`` entry point). The result will be stored in the internal cache
-  variable ``<resultVar>``, with a boolean true value for success and boolean
-  false for failure.
+  Check that the source supplied in ``<code>`` can be compiled as a Fortran source
+  file, linked as an executable and then run. The ``<code>`` must contain at
+  least ``program; end program`` statements. If the ``<code>`` could be built and run
+  successfully, the internal cache variable specified by ``<resultVar>`` will
+  be set to 1, otherwise it will be set to an value that evaluates to boolean
+  false (e.g. an empty string or an error message).
 
-  If ``FAIL_REGEX`` is provided, then failure is determined by checking
-  if anything in the output matches any of the specified regular expressions.
-
-  By default, the test source file will be given a ``.F`` file extension. The
+  By default, the test source file will be given a ``.F90`` file extension. The
   ``SRC_EXT`` option can be used to override this with ``.<extension>`` instead.
 
-  The underlying check is performed by the :command:`try_compile` command. The
+  The underlying check is performed by the :command:`try_run` command. The
   compile and link commands can be influenced by setting any of the following
-  variables prior to calling ``check_fortran_source_compiles()``:
+  variables prior to calling ``check_fortran_source_runs()``:
 
   ``CMAKE_REQUIRED_FLAGS``
     Additional flags to pass to the compiler. Note that the contents of
@@ -46,17 +43,17 @@ Check if given Fortran source compiles and links into an executable.
   ``CMAKE_REQUIRED_INCLUDES``
     A :ref:`;-list <CMake Language Lists>` of header search paths to pass to
     the compiler. These will be the only header search paths used by
-    ``try_compile()``, i.e. the contents of the :prop_dir:`INCLUDE_DIRECTORIES`
+    ``try_run()``, i.e. the contents of the :prop_dir:`INCLUDE_DIRECTORIES`
     directory property will be ignored.
 
   ``CMAKE_REQUIRED_LINK_OPTIONS``
     A :ref:`;-list <CMake Language Lists>` of options to add to the link
-    command (see :command:`try_compile` for further details).
+    command (see :command:`try_run` for further details).
 
   ``CMAKE_REQUIRED_LIBRARIES``
     A :ref:`;-list <CMake Language Lists>` of libraries to add to the link
     command. These can be the name of system libraries or they can be
-    :ref:`Imported Targets <Imported Targets>` (see :command:`try_compile` for
+    :ref:`Imported Targets <Imported Targets>` (see :command:`try_run` for
     further details).
 
   ``CMAKE_REQUIRED_QUIET``
@@ -73,13 +70,12 @@ Check if given Fortran source compiles and links into an executable.
 
 include_guard(GLOBAL)
 
-macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR)
+macro(CHECK_Fortran_SOURCE_RUNS SOURCE VAR)
   if(NOT DEFINED "${VAR}")
-    set(_FAIL_REGEX)
     set(_SRC_EXT)
     set(_key)
     foreach(arg ${ARGN})
-      if("${arg}" MATCHES "^(FAIL_REGEX|SRC_EXT)$")
+      if("${arg}" MATCHES "^(SRC_EXT)$")
         set(_key "${arg}")
       elseif(_key)
         list(APPEND _${_key} "${arg}")
@@ -88,7 +84,7 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR)
       endif()
     endforeach()
     if(NOT _SRC_EXT)
-      set(_SRC_EXT F)
+      set(_SRC_EXT F90)
     endif()
     set(MACRO_CHECK_FUNCTION_DEFINITIONS
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
@@ -116,23 +112,23 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR)
     if(NOT CMAKE_REQUIRED_QUIET)
       message(STATUS "Performing Test ${VAR}")
     endif()
-    try_compile(${VAR}
+    try_run(${VAR}_EXITCODE ${VAR}_COMPILED
       ${CMAKE_BINARY_DIR}
       ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.${_SRC_EXT}
       COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
       ${CHECK_Fortran_SOURCE_COMPILES_ADD_LINK_OPTIONS}
       ${CHECK_Fortran_SOURCE_COMPILES_ADD_LIBRARIES}
       CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
+      -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}
       "${CHECK_Fortran_SOURCE_COMPILES_ADD_INCLUDES}"
-      OUTPUT_VARIABLE OUTPUT)
-
-    foreach(_regex ${_FAIL_REGEX})
-      if("${OUTPUT}" MATCHES "${_regex}")
-        set(${VAR} 0)
-      endif()
-    endforeach()
+      COMPILE_OUTPUT_VARIABLE OUTPUT)
 
-    if(${VAR})
+    # if it did not compile make the return value fail code of 1
+    if(NOT ${VAR}_COMPILED)
+      set(${VAR}_EXITCODE 1)
+    endif()
+    # if the return value was 0 then it worked
+    if("${${VAR}_EXITCODE}" EQUAL 0)
       set(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
       if(NOT CMAKE_REQUIRED_QUIET)
         message(STATUS "Performing Test ${VAR} - Success")
@@ -140,15 +136,22 @@ macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR)
       file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
         "Performing Fortran SOURCE FILE Test ${VAR} succeeded with the following output:\n"
         "${OUTPUT}\n"
+        "Return value: ${${VAR}}\n"
         "Source file was:\n${SOURCE}\n")
     else()
+      if(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES  "FAILED_TO_RUN")
+        set(${VAR} "${${VAR}_EXITCODE}")
+      else()
+        set(${VAR} "" CACHE INTERNAL "Test ${VAR}")
+      endif()
+
       if(NOT CMAKE_REQUIRED_QUIET)
         message(STATUS "Performing Test ${VAR} - Failed")
       endif()
-      set(${VAR} "" CACHE INTERNAL "Test ${VAR}")
       file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "Performing Fortran SOURCE FILE Test ${VAR} failed with the following output:\n"
         "${OUTPUT}\n"
+        "Return value: ${${VAR}_EXITCODE}\n"
         "Source file was:\n${SOURCE}\n")
     endif()
   endif()
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index 59e6d59..77f6041 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -70,8 +70,15 @@ if(NOT CMAKE_Fortran_COMPILER_ID STREQUAL XL)
   include(CheckFortranCompilerFlag)
   CHECK_Fortran_COMPILER_FLAG(-_this_is_not_a_flag_ Fortran_BOGUS_FLAG)
   if (Fortran_BOGUS_FLAG)
-    message (SEND_ERROR "CHECK_Fortran_COMPILER_FLAG() succeeded, but should have failed")
-  endif ()
+    message(SEND_ERROR "CHECK_Fortran_COMPILER_FLAG() succeeded, but should have failed")
+  endif()
+
+  unset(Fortran_RUN_FLAG CACHE)
+  include(CheckFortranSourceRuns)
+  check_fortran_source_runs("program a; end program" Fortran_RUN_FLAG SRC_EXT F90)
+  if(NOT Fortran_RUN_FLAG)
+    message(SEND_ERROR "CHECK_Fortran_SOURCE_RUNS() failed")
+  endif()
 endif()
 
 # Test generation of preprocessed sources.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=971d490e5b22449a9d770e8675799698f857a452
commit 971d490e5b22449a9d770e8675799698f857a452
Author:     Rechi Rechi <Rechi at users.noreply.github.com>
AuthorDate: Fri Dec 28 23:26:52 2018 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 10 13:54:25 2019 -0500

    curl: do not disable IPv6 support
    
    Allow curl's detection of IPv6 to proceed when building in CMake.

diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 9ae7aa3..1c96497 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -29,7 +29,7 @@ set(DISABLED_THREADSAFE OFF CACHE INTERNAL "Curl can use thread-safe functions")
 set(ENABLE_ARES OFF CACHE INTERNAL "No curl c-ares support")
 set(ENABLE_CURLDEBUG OFF CACHE INTERNAL "No curl TrackMemory features")
 set(ENABLE_DEBUG OFF CACHE INTERNAL "No curl debug features")
-set(ENABLE_IPV6 OFF CACHE INTERNAL "No curl IPv6 support")
+set(ENABLE_IPV6 ON CACHE INTERNAL "Enable curl IPv6 support detection")
 set(ENABLE_MANUAL OFF CACHE INTERNAL "No curl built-in manual")
 set(ENABLE_THREADED_RESOLVER OFF CACHE INTERNAL "No curl POSIX threaded DNS lookup")
 set(ENABLE_UNIX_SOCKETS OFF CACHE INTERNAL "No curl Unix domain sockets support")

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

Summary of changes:
 .clang-tidy                                        |   1 -
 Help/manual/cmake-buildsystem.7.rst                |   1 +
 Help/manual/cmake-modules.7.rst                    |   1 +
 Help/module/CheckFortranSourceRuns.rst             |   1 +
 Help/release/dev/check-fortran-run.rst             |   6 ++
 Help/release/dev/rel-win7.rst                      |   6 ++
 Modules/CheckFortranSourceCompiles.cmake           |   3 +-
 ...Compiles.cmake => CheckFortranSourceRuns.cmake} |  75 ++++++-------
 Source/CPack/OSXScriptLauncher.cxx                 |   3 +-
 Source/CPack/cmCPackFreeBSDGenerator.cxx           |   9 +-
 Source/cmDocumentation.cxx                         | 119 ++++++---------------
 Source/cmDocumentation.h                           |  11 +-
 Source/cmDocumentationSection.h                    |   2 +-
 Source/cmGeneratorExpressionDAGChecker.cxx         |   2 +-
 Source/cmGeneratorExpressionNode.cxx               |   2 +-
 Source/cmMachO.cxx                                 |  10 +-
 Source/cmQtAutoGenInitializer.cxx                  |   6 +-
 Source/cmServer.cxx                                |   2 +-
 Source/cmSourceGroupCommand.cxx                    |  24 ++---
 Source/cmTargetPropertyComputer.cxx                |   1 +
 Source/cmVisualStudio10TargetGenerator.cxx         |  41 ++++++-
 Tests/FortranOnly/CMakeLists.txt                   |  11 +-
 Tests/InterfaceLibrary/CMakeLists.txt              |   1 +
 Tests/RunCMake/VS10Project/RunCMakeTest.cmake      |   1 +
 .../VS10Project/SourceGroupCMakeLists-check.cmake  |  33 ++++++
 .../VS10Project/SourceGroupCMakeLists.cmake        |   3 +
 Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake |   1 +
 .../VS10ProjectWinCE/VsCSharpCFProject-check.cmake |  54 ++++++++++
 .../VS10ProjectWinCE/VsCSharpCFProject.cmake       |   8 ++
 Utilities/Release/win32_release.cmake              |   4 +-
 Utilities/Release/win64_release.cmake              |   4 +-
 Utilities/cmcurl/CMakeLists.txt                    |   2 +-
 32 files changed, 270 insertions(+), 178 deletions(-)
 create mode 100644 Help/module/CheckFortranSourceRuns.rst
 create mode 100644 Help/release/dev/check-fortran-run.rst
 create mode 100644 Help/release/dev/rel-win7.rst
 copy Modules/{CheckFortranSourceCompiles.cmake => CheckFortranSourceRuns.cmake} (72%)
 create mode 100644 Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake
 create mode 100644 Tests/RunCMake/VS10Project/SourceGroupCMakeLists.cmake
 create mode 100644 Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject-check.cmake
 create mode 100644 Tests/RunCMake/VS10ProjectWinCE/VsCSharpCFProject.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list