Imported Upstream version 3.18.5 upstream/3.18.5
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:20:21 +0000 (09:20 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:20:21 +0000 (09:20 +0900)
26 files changed:
Modules/CMakeDetermineCCompiler.cmake
Modules/CMakeDetermineCXXCompiler.cmake
Modules/CMakeDetermineOBJCCompiler.cmake
Modules/CMakeDetermineOBJCXXCompiler.cmake
Modules/FindRuby.cmake
Source/CMakeLists.txt
Source/CMakeVersion.cmake
Source/CPack/cpack.cxx
Source/cmConsoleBuf.cxx [new file with mode: 0644]
Source/cmConsoleBuf.h [new file with mode: 0644]
Source/cmGeneratorTarget.cxx
Source/cmGeneratorTarget.h
Source/cmGlobalNinjaGenerator.cxx
Source/cmVisualStudio10TargetGenerator.cxx
Source/cmakemain.cxx
Source/cmcmd.cxx
Source/cmcmd.h
Source/ctest.cxx
Tests/RunCMake/CMP0104/CMP0104-Common.cmake
Tests/RunCMake/CMP0104/main.cxx [new file with mode: 0644]
Tests/RunCMake/CommandLine/E_cat_binary_files/binary.obj [new file with mode: 0644]
Tests/RunCMake/CommandLine/E_cat_good_binary_cat-stdout.txt [new file with mode: 0644]
Tests/RunCMake/CommandLine/RunCMakeTest.cmake
Tests/RunCMake/NinjaMultiConfig/PerConfigSources.cmake [new file with mode: 0644]
Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
bootstrap

index 86683d1..664d089 100644 (file)
@@ -109,7 +109,7 @@ if(NOT CMAKE_C_COMPILER_ID_RUN)
   #      ...
   #      /path/to/cc ...CompilerIdC/...
   # to extract the compiler front-end for the language.
-  set(CMAKE_C_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdC/(\\./)?(CompilerIdC.(framework|xctest)/)?CompilerIdC[ \t\n\\\"]")
+  set(CMAKE_C_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdC/(\\./)?(CompilerIdC.(framework|xctest|build/[^ \t\r\n]+)/)?CompilerIdC[ \t\n\\\"]")
   set(CMAKE_C_COMPILER_ID_TOOL_MATCH_INDEX 2)
 
   include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
index 662b831..ea241cf 100644 (file)
@@ -104,7 +104,7 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN)
   #      ...
   #      /path/to/cc ...CompilerIdCXX/...
   # to extract the compiler front-end for the language.
-  set(CMAKE_CXX_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdCXX/(\\./)?(CompilerIdCXX.(framework|xctest)/)?CompilerIdCXX[ \t\n\\\"]")
+  set(CMAKE_CXX_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdCXX/(\\./)?(CompilerIdCXX.(framework|xctest|build/[^ \t\r\n]+)/)?CompilerIdCXX[ \t\n\\\"]")
   set(CMAKE_CXX_COMPILER_ID_TOOL_MATCH_INDEX 2)
 
   include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
index 11b47fd..da09ebb 100644 (file)
@@ -115,7 +115,7 @@ if(NOT CMAKE_OBJC_COMPILER_ID_RUN)
   #      ...
   #      /path/to/cc ...CompilerIdOBJC/...
   # to extract the compiler front-end for the language.
-  set(CMAKE_OBJC_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdOBJC/(\\./)?(CompilerIdOBJC.(framework|xctest)/)?CompilerIdOBJC[ \t\n\\\"]")
+  set(CMAKE_OBJC_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdOBJC/(\\./)?(CompilerIdOBJC.(framework|xctest|build/[^ \t\r\n]+)/)?CompilerIdOBJC[ \t\n\\\"]")
   set(CMAKE_OBJC_COMPILER_ID_TOOL_MATCH_INDEX 2)
 
   include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
index 99ad6c3..f96394c 100644 (file)
@@ -120,7 +120,7 @@ if(NOT CMAKE_OBJCXX_COMPILER_ID_RUN)
   #      ...
   #      /path/to/cc ...CompilerIdOBJCXX/...
   # to extract the compiler front-end for the language.
-  set(CMAKE_OBJCXX_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdOBJCXX/(\\./)?(CompilerIdOBJCXX.(framework|xctest)/)?CompilerIdOBJCXX[ \t\n\\\"]")
+  set(CMAKE_OBJCXX_COMPILER_ID_TOOL_MATCH_REGEX "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerIdOBJCXX/(\\./)?(CompilerIdOBJCXX.(framework|xctest|build/[^ \t\r\n]+)/)?CompilerIdOBJCXX[ \t\n\\\"]")
   set(CMAKE_OBJCXX_COMPILER_ID_TOOL_MATCH_INDEX 2)
 
   include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
index 0559a69..a0cdf3b 100644 (file)
@@ -515,6 +515,7 @@ foreach(Camel
     Ruby_SITELIB_DIR
     Ruby_HAS_VENDOR_RUBY
     Ruby_VENDORARCH_DIR
+    Ruby_VENDORLIB_DIR
 
     )
     string(TOUPPER ${Camel} UPPER)
index 1b6bb00..2026ab1 100644 (file)
@@ -193,6 +193,8 @@ set(SRCS
   cmComputeLinkInformation.h
   cmComputeTargetDepends.h
   cmComputeTargetDepends.cxx
+  cmConsoleBuf.h
+  cmConsoleBuf.cxx
   cmCPackPropertiesGenerator.h
   cmCPackPropertiesGenerator.cxx
   cmCryptoHash.cxx
index 25b3521..7650cd6 100644 (file)
@@ -1,7 +1,7 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 18)
-set(CMake_VERSION_PATCH 4)
+set(CMake_VERSION_PATCH 5)
 #set(CMake_VERSION_RC 0)
 set(CMake_VERSION_IS_DIRTY 0)
 
@@ -21,7 +21,7 @@ endif()
 
 if(NOT CMake_VERSION_NO_GIT)
   # If this source was exported by 'git archive', use its commit info.
-  set(git_info [==[3cc3d42aba CMake 3.18.4]==])
+  set(git_info [==[1a059d91af CMake 3.18.5]==])
 
   # Otherwise, try to identify the current development source version.
   if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "
index 3a400b7..cc1ddf5 100644 (file)
@@ -1,12 +1,22 @@
 /* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
    file Copyright.txt or https://cmake.org/licensing for details.  */
 
+#include <cstddef>
+#include <iostream>
+#include <map>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <utility>
+#include <vector>
+
 #include "cmsys/CommandLineArguments.hxx"
 #include "cmsys/Encoding.hxx"
 
 #include "cmCPackGenerator.h"
 #include "cmCPackGeneratorFactory.h"
 #include "cmCPackLog.h"
+#include "cmConsoleBuf.h"
 #include "cmDocumentation.h"
 #include "cmDocumentationEntry.h"
 #include "cmDocumentationFormatter.h"
 #include "cmSystemTools.h"
 #include "cmake.h"
 
-#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
-#  include "cmsys/ConsoleBuf.hxx"
-#endif
-
-#include <cstddef>
-#include <iostream>
-#include <map>
-#include <memory>
-#include <sstream>
-#include <string>
-#include <utility>
-#include <vector>
-
 namespace {
 const char* cmDocumentationName[][2] = {
   { nullptr, "  cpack - Packaging driver provided by CMake." },
@@ -103,13 +100,11 @@ void cpackProgressCallback(const std::string& message, float /*unused*/)
 int main(int argc, char const* const* argv)
 {
   cmSystemTools::EnsureStdPipes();
-#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
+
   // Replace streambuf so we can output Unicode to console
-  cmsys::ConsoleBuf::Manager consoleOut(std::cout);
-  consoleOut.SetUTF8Pipes();
-  cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true);
-  consoleErr.SetUTF8Pipes();
-#endif
+  cmConsoleBuf consoleBuf;
+  consoleBuf.SetUTF8Pipes();
+
   cmsys::Encoding::CommandLineArguments args =
     cmsys::Encoding::CommandLineArguments::Main(argc, argv);
   argc = args.argc();
diff --git a/Source/cmConsoleBuf.cxx b/Source/cmConsoleBuf.cxx
new file mode 100644 (file)
index 0000000..70be481
--- /dev/null
@@ -0,0 +1,23 @@
+/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+   file Copyright.txt or https://cmake.org/licensing for details.  */
+#include "cmConsoleBuf.h"
+
+#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
+cmConsoleBuf::cmConsoleBuf()
+  : m_ConsoleOut(std::cout)
+  , m_ConsoleErr(std::cerr, true)
+{
+}
+#else
+cmConsoleBuf::cmConsoleBuf() = default;
+#endif
+
+cmConsoleBuf::~cmConsoleBuf() = default;
+
+void cmConsoleBuf::SetUTF8Pipes()
+{
+#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
+  m_ConsoleOut.SetUTF8Pipes();
+  m_ConsoleErr.SetUTF8Pipes();
+#endif
+}
diff --git a/Source/cmConsoleBuf.h b/Source/cmConsoleBuf.h
new file mode 100644 (file)
index 0000000..3564598
--- /dev/null
@@ -0,0 +1,23 @@
+/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+   file Copyright.txt or https://cmake.org/licensing for details.  */
+#pragma once
+
+#include "cmConfigure.h" // IWYU pragma: keep
+
+#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
+#  include "cmsys/ConsoleBuf.hxx"
+#endif
+
+class cmConsoleBuf
+{
+#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
+  cmsys::ConsoleBuf::Manager m_ConsoleOut;
+  cmsys::ConsoleBuf::Manager m_ConsoleErr;
+#endif
+public:
+  cmConsoleBuf();
+  ~cmConsoleBuf();
+  cmConsoleBuf(cmConsoleBuf const&) = delete;
+  cmConsoleBuf& operator=(cmConsoleBuf const&) = delete;
+  void SetUTF8Pipes();
+};
index ab6a26c..b7bf4a6 100644 (file)
@@ -6914,6 +6914,14 @@ void cmGeneratorTarget::GetLanguages(std::set<std::string>& languages,
   }
 }
 
+bool cmGeneratorTarget::IsLanguageUsed(std::string const& language,
+                                       std::string const& config) const
+{
+  std::set<std::string> languages;
+  this->GetLanguages(languages, config);
+  return languages.count(language);
+}
+
 bool cmGeneratorTarget::IsCSharpOnly() const
 {
   // Only certain target types may compile CSharp.
index 3aedbf5..ea3a684 100644 (file)
@@ -397,6 +397,8 @@ public:
   // until we have per-target object file properties.
   void GetLanguages(std::set<std::string>& languages,
                     std::string const& config) const;
+  bool IsLanguageUsed(std::string const& language,
+                      std::string const& config) const;
 
   bool IsCSharpOnly() const;
 
index 04155e0..2c152ce 100644 (file)
@@ -1202,7 +1202,9 @@ void cmGlobalNinjaGenerator::AddTargetAlias(const std::string& alias,
   std::string outputPath = this->NinjaOutputPath(alias);
   std::string buildAlias = this->BuildAlias(outputPath, config);
   cmNinjaDeps outputs;
-  this->AppendTargetOutputs(target, outputs, config);
+  if (config != "all") {
+    this->AppendTargetOutputs(target, outputs, config);
+  }
   // Mark the target's outputs as ambiguous to ensure that no other target
   // uses the output as an alias.
   for (std::string const& output : outputs) {
index f58c6fd..2ea2839 100644 (file)
@@ -3018,7 +3018,8 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions()
     return true;
   }
   for (std::string const& c : this->Configurations) {
-    if (!this->ComputeCudaOptions(c)) {
+    if (this->GeneratorTarget->IsLanguageUsed("CUDA", c) &&
+        !this->ComputeCudaOptions(c)) {
       return false;
     }
   }
@@ -3158,7 +3159,8 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
 void cmVisualStudio10TargetGenerator::WriteCudaOptions(
   Elem& e1, std::string const& configName)
 {
-  if (!this->MSTools || !this->GlobalGenerator->IsCudaEnabled()) {
+  if (!this->MSTools || !this->GlobalGenerator->IsCudaEnabled() ||
+      !this->GeneratorTarget->IsLanguageUsed("CUDA", configName)) {
     return;
   }
   Elem e2(e1, "CudaCompile");
index d662a9a..7e589c0 100644 (file)
@@ -9,12 +9,15 @@
 #include <cstring>
 #include <iostream>
 #include <string>
+#include <utility>
 #include <vector>
 
+#include <cm/memory>
 #include <cmext/algorithm>
 
 #include <cm3p/uv.h>
 
+#include "cmConsoleBuf.h"
 #include "cmDocumentationEntry.h" // IWYU pragma: keep
 #include "cmGlobalGenerator.h"
 #include "cmMakefile.h"
@@ -32,9 +35,6 @@
 #endif
 
 #include "cmsys/Encoding.hxx"
-#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
-#  include "cmsys/ConsoleBuf.hxx"
-#endif
 
 namespace {
 #ifndef CMAKE_BOOTSTRAP
@@ -109,13 +109,14 @@ const char* cmDocumentationOptions[][2] = {
 
 #endif
 
-int do_command(int ac, char const* const* av)
+int do_command(int ac, char const* const* av,
+               std::unique_ptr<cmConsoleBuf> consoleBuf)
 {
   std::vector<std::string> args;
   args.reserve(ac - 1);
   args.emplace_back(av[0]);
   cm::append(args, av + 2, av + ac);
-  return cmcmd::ExecuteCMakeCommand(args);
+  return cmcmd::ExecuteCMakeCommand(args, std::move(consoleBuf));
 }
 
 cmMakefile* cmakemainGetMakefile(cmake* cm)
@@ -687,13 +688,11 @@ int do_open(int ac, char const* const* av)
 int main(int ac, char const* const* av)
 {
   cmSystemTools::EnsureStdPipes();
-#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
+
   // Replace streambuf so we can output Unicode to console
-  cmsys::ConsoleBuf::Manager consoleOut(std::cout);
-  consoleOut.SetUTF8Pipes();
-  cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true);
-  consoleErr.SetUTF8Pipes();
-#endif
+  auto consoleBuf = cm::make_unique<cmConsoleBuf>();
+  consoleBuf->SetUTF8Pipes();
+
   cmsys::Encoding::CommandLineArguments args =
     cmsys::Encoding::CommandLineArguments::Main(ac, av);
   ac = args.argc();
@@ -712,7 +711,7 @@ int main(int ac, char const* const* av)
       return do_open(ac, av);
     }
     if (strcmp(av[1], "-E") == 0) {
-      return do_command(ac, av);
+      return do_command(ac, av, std::move(consoleBuf));
     }
   }
   int ret = do_cmake(ac, av);
index de76d73..a1fafcb 100644 (file)
@@ -7,6 +7,7 @@
 #include <cm3p/uv.h>
 #include <fcntl.h>
 
+#include "cmConsoleBuf.h"
 #include "cmDuration.h"
 #include "cmGlobalGenerator.h"
 #include "cmLocalGenerator.h"
 #  include "bindexplib.h"
 #endif
 
-#if !defined(CMAKE_BOOTSTRAP) && defined(_WIN32)
-#  include "cmsys/ConsoleBuf.hxx"
-#endif
-
 #if !defined(CMAKE_BOOTSTRAP) && defined(_WIN32) && !defined(__CYGWIN__)
 #  include "cmVisualStudioWCEPlatformParser.h"
 #endif
 #include <sstream>
 #include <utility>
 
+#ifdef _WIN32
+#  include <fcntl.h> // for _O_BINARY
+#  include <io.h>    // for _setmode
+#  include <stdio.h> // for std{out,err} and fileno
+#endif
+
 #include <cm/string_view>
 
 #include "cmsys/Directory.hxx"
@@ -181,6 +184,9 @@ static bool cmTarFilesFrom(std::string const& file,
 
 static void cmCatFile(const std::string& fileToAppend)
 {
+#ifdef _WIN32
+  _setmode(fileno(stdout), _O_BINARY);
+#endif
   cmsys::ifstream source(fileToAppend.c_str(),
                          (std::ios::binary | std::ios::in));
   std::cout << source.rdbuf();
@@ -500,7 +506,8 @@ int cmcmd::HandleCoCompileCommands(std::vector<std::string> const& args)
   return ret;
 }
 
-int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args)
+int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args,
+                               std::unique_ptr<cmConsoleBuf> consoleBuf)
 {
   // IF YOU ADD A NEW COMMAND, DOCUMENT IT ABOVE and in cmakemain.cxx
   if (args.size() > 1) {
@@ -954,6 +961,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args)
           cmSystemTools::Error(arg + ": no such file or directory (ignoring)");
           return_value = 1;
         } else {
+          // Destroy console buffers to drop cout/cerr encoding transform.
+          consoleBuf.reset();
           cmCatFile(arg);
         }
       }
@@ -1863,14 +1872,11 @@ private:
 // still works.
 int cmcmd::VisualStudioLink(std::vector<std::string> const& args, int type)
 {
-#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
   // Replace streambuf so we output in the system codepage. CMake is set up
   // to output in Unicode (see SetUTF8Pipes) but the Visual Studio linker
   // outputs using the system codepage so we need to change behavior when
   // we run the link command.
-  cmsys::ConsoleBuf::Manager consoleOut(std::cout);
-  cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true);
-#endif
+  cmConsoleBuf consoleBuf;
 
   if (args.size() < 2) {
     return -1;
index 5b6c813..ffadd5a 100644 (file)
@@ -5,11 +5,14 @@
 
 #include "cmConfigure.h" // IWYU pragma: keep
 
+#include <memory>
 #include <string>
 #include <vector>
 
 #include "cmCryptoHash.h"
 
+class cmConsoleBuf;
+
 class cmcmd
 {
 public:
@@ -17,7 +20,8 @@ public:
    * Execute commands during the build process. Supports options such
    * as echo, remove file etc.
    */
-  static int ExecuteCMakeCommand(std::vector<std::string> const&);
+  static int ExecuteCMakeCommand(std::vector<std::string> const&,
+                                 std::unique_ptr<cmConsoleBuf> consoleBuf);
 
 protected:
   static int HandleCoCompileCommands(std::vector<std::string> const& args);
index 3b5bf8c..d0bc061 100644 (file)
@@ -1,21 +1,20 @@
 /* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
    file Copyright.txt or https://cmake.org/licensing for details.  */
 
+#include <cstring>
+#include <iostream>
+#include <string>
+#include <vector>
+
 #include "cmsys/Encoding.hxx"
 
 #include "cmCTest.h"
+#include "cmConsoleBuf.h"
 #include "cmDocumentation.h"
 #include "cmSystemTools.h"
 
 #include "CTest/cmCTestLaunch.h"
 #include "CTest/cmCTestScriptHandler.h"
-#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
-#  include "cmsys/ConsoleBuf.hxx"
-#endif
-#include <cstring>
-#include <iostream>
-#include <string>
-#include <vector>
 
 static const char* cmDocumentationName[][2] = {
   { nullptr, "  ctest - Testing driver provided by CMake." },
@@ -154,13 +153,11 @@ static const char* cmDocumentationOptions[][2] = {
 int main(int argc, char const* const* argv)
 {
   cmSystemTools::EnsureStdPipes();
-#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
+
   // Replace streambuf so we can output Unicode to console
-  cmsys::ConsoleBuf::Manager consoleOut(std::cout);
-  consoleOut.SetUTF8Pipes();
-  cmsys::ConsoleBuf::Manager consoleErr(std::cerr, true);
-  consoleErr.SetUTF8Pipes();
-#endif
+  cmConsoleBuf consoleBuf;
+  consoleBuf.SetUTF8Pipes();
+
   cmsys::Encoding::CommandLineArguments encoding_args =
     cmsys::Encoding::CommandLineArguments::Main(argc, argv);
   argc = encoding_args.argc();
index b3568f1..ca4c1aa 100644 (file)
@@ -1,2 +1,6 @@
+# Make sure CMP0104 isn't issued for CXX targets created prior to enabling CUDA. See #21341.
+enable_language(CXX)
+add_library(cxx main.cxx)
+
 enable_language(CUDA)
 add_library(cuda main.cu)
diff --git a/Tests/RunCMake/CMP0104/main.cxx b/Tests/RunCMake/CMP0104/main.cxx
new file mode 100644 (file)
index 0000000..5047a34
--- /dev/null
@@ -0,0 +1,3 @@
+int main()
+{
+}
diff --git a/Tests/RunCMake/CommandLine/E_cat_binary_files/binary.obj b/Tests/RunCMake/CommandLine/E_cat_binary_files/binary.obj
new file mode 100644 (file)
index 0000000..73f1749
Binary files /dev/null and b/Tests/RunCMake/CommandLine/E_cat_binary_files/binary.obj differ
diff --git a/Tests/RunCMake/CommandLine/E_cat_good_binary_cat-stdout.txt b/Tests/RunCMake/CommandLine/E_cat_good_binary_cat-stdout.txt
new file mode 100644 (file)
index 0000000..0951d85
Binary files /dev/null and b/Tests/RunCMake/CommandLine/E_cat_good_binary_cat-stdout.txt differ
index 973391d..abb9050 100644 (file)
@@ -498,6 +498,9 @@ run_cmake_command(E_cat_good_cat
   ${CMAKE_COMMAND} -E cat "${out}/first_file.txt" "${out}/second_file.txt" "${out}/unicode_file.txt")
 unset(out)
 
+run_cmake_command(E_cat_good_binary_cat
+  ${CMAKE_COMMAND} -E cat "${RunCMake_SOURCE_DIR}/E_cat_binary_files/binary.obj" "${RunCMake_SOURCE_DIR}/E_cat_binary_files/binary.obj")
+
 run_cmake_command(E_env-no-command0 ${CMAKE_COMMAND} -E env)
 run_cmake_command(E_env-no-command1 ${CMAKE_COMMAND} -E env TEST_ENV=1)
 run_cmake_command(E_env-bad-arg1 ${CMAKE_COMMAND} -E env -bad-arg1)
diff --git a/Tests/RunCMake/NinjaMultiConfig/PerConfigSources.cmake b/Tests/RunCMake/NinjaMultiConfig/PerConfigSources.cmake
new file mode 100644 (file)
index 0000000..7483130
--- /dev/null
@@ -0,0 +1,8 @@
+enable_language(C)
+file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/main_$<CONFIG>.c" CONTENT
+[[int main(void)
+{
+  return 0;
+}
+]])
+add_executable(exe "${CMAKE_BINARY_DIR}/main_$<CONFIG>.c")
index 0aef2b9..8496d63 100644 (file)
@@ -246,6 +246,10 @@ unset(RunCMake_TEST_BINARY_DIR)
 
 run_cmake(CustomCommandDepfile)
 
+set(RunCMake_TEST_OPTIONS "-DCMAKE_CROSS_CONFIGS=all")
+run_cmake(PerConfigSources)
+unset(RunCMake_TEST_OPTIONS)
+
 set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/PostfixAndLocation-build)
 set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release;-DCMAKE_CROSS_CONFIGS=all")
 run_cmake_configure(PostfixAndLocation)
index 04067dc..1362f9d 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -299,6 +299,7 @@ CMAKE_CXX_SOURCES="\
   cmComputeLinkDepends \
   cmComputeLinkInformation \
   cmComputeTargetDepends \
+  cmConsoleBuf \
   cmConditionEvaluator \
   cmConfigureFileCommand \
   cmContinueCommand \