New upstream version 3.13.4
This commit is contained in:
		
							parent
							
								
									05c28beacd
								
							
						
					
					
						commit
						a8473d76f3
					
				@ -252,3 +252,29 @@ Changes made since CMake 3.13.0 include the following.
 | 
			
		||||
  directories to the ``moc`` tool for :prop_tgt:`AUTOMOC`.  This has
 | 
			
		||||
  been reverted due to regressing existing builds and will need
 | 
			
		||||
  further investigation before being re-introduced in a later release.
 | 
			
		||||
 | 
			
		||||
3.13.3
 | 
			
		||||
------
 | 
			
		||||
 | 
			
		||||
* The :generator:`Visual Studio 15 2017` generator has been fixed to work
 | 
			
		||||
  when VS 2019 is installed.
 | 
			
		||||
 | 
			
		||||
* CMake now checks that at least one of the source or binary directory
 | 
			
		||||
  is specified when running CMake and issues an error if both are missing.
 | 
			
		||||
  This has always been a documented requirement, but the implementation
 | 
			
		||||
  previously accidentally accepted cases in which neither are specified
 | 
			
		||||
  so long as some other argument is given, and silently used the current
 | 
			
		||||
  working directory as the source and build tree.
 | 
			
		||||
 | 
			
		||||
3.13.4
 | 
			
		||||
------
 | 
			
		||||
 | 
			
		||||
* The error added by 3.13.3 in cases that neither a source or binary
 | 
			
		||||
  directory is specified has been downgraded to a warning.  While this
 | 
			
		||||
  was never intended, documented, nor supported behavior, some projects
 | 
			
		||||
  relied on it.  The error has been downgraded to a warning for the
 | 
			
		||||
  remainder of the 3.13.x release series to allow a transition period,
 | 
			
		||||
  but it may become a fatal error again in a later release.  Scripts
 | 
			
		||||
  relying on the old behavior can be trivially fixed by specifying
 | 
			
		||||
  the path to the source tree (even if just ``.``) explicitly and
 | 
			
		||||
  continue to work with all versions of CMake.
 | 
			
		||||
 | 
			
		||||
@ -720,6 +720,9 @@ function(link_resolved_item_into_bundle resolved_item resolved_embedded_item)
 | 
			
		||||
  else()
 | 
			
		||||
    get_filename_component(target_dir "${resolved_embedded_item}" DIRECTORY)
 | 
			
		||||
    file(RELATIVE_PATH symlink_target "${target_dir}" "${resolved_item}")
 | 
			
		||||
    if (NOT EXISTS "${target_dir}")
 | 
			
		||||
      file(MAKE_DIRECTORY "${target_dir}")
 | 
			
		||||
    endif()
 | 
			
		||||
    execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${symlink_target}" "${resolved_embedded_item}")
 | 
			
		||||
  endif()
 | 
			
		||||
endfunction()
 | 
			
		||||
 | 
			
		||||
@ -24,7 +24,7 @@ set(DETECT_CXX14 "((__cplusplus >= 201300L) || ((__cplusplus == 201103L) && !def
 | 
			
		||||
unset(DETECT_BUGGY_ICC15)
 | 
			
		||||
 | 
			
		||||
set(Intel17_CXX14 "__INTEL_COMPILER >= 1700 && ${DETECT_CXX14}")
 | 
			
		||||
set(_cmake_feature_test_cxx_relaxed_constexpr "__cpp_constexpr >= 201304 || (${Intel17_CXX14} && __INTEL_COMPILER != 1800 && !defined(_MSC_VER))")
 | 
			
		||||
set(_cmake_feature_test_cxx_relaxed_constexpr "__cpp_constexpr >= 201304 || (${Intel17_CXX14} && !(__INTEL_COMPILER == 1800 && __INTEL_COMPILER_UPDATE < 5) && !defined(_MSC_VER))")
 | 
			
		||||
 | 
			
		||||
set(Intel16_CXX14 "__INTEL_COMPILER >= 1600 && ${DETECT_CXX14}")
 | 
			
		||||
set(_cmake_feature_test_cxx_aggregate_default_initializers "${Intel16_CXX14}")
 | 
			
		||||
 | 
			
		||||
@ -708,7 +708,9 @@ if(TARGET Doxygen::doxygen)
 | 
			
		||||
        if(_line MATCHES "([A-Z][A-Z0-9_]+)( *=)(.*)")
 | 
			
		||||
            set(_key "${CMAKE_MATCH_1}")
 | 
			
		||||
            set(_eql "${CMAKE_MATCH_2}")
 | 
			
		||||
            string(REPLACE ";" "\\\n" _value "${CMAKE_MATCH_3}")
 | 
			
		||||
            set(_value "${CMAKE_MATCH_3}")
 | 
			
		||||
            string(REPLACE "\\" "\\\\" _value "${_value}")
 | 
			
		||||
            string(REPLACE ";" "\\\n" _value "${_value}")
 | 
			
		||||
            list(APPEND _Doxygen_tpl_params "${_key}${_eql}${_value}")
 | 
			
		||||
        endif()
 | 
			
		||||
    endforeach()
 | 
			
		||||
 | 
			
		||||
@ -316,7 +316,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
 | 
			
		||||
    if (NOT ${_LIBRARIES})
 | 
			
		||||
      check_lapack_libraries(
 | 
			
		||||
        ${_LIBRARIES}
 | 
			
		||||
        BLAS
 | 
			
		||||
        LAPACK
 | 
			
		||||
        ${LAPACK_mkl_SEARCH_SYMBOL}
 | 
			
		||||
        ""
 | 
			
		||||
        ""
 | 
			
		||||
@ -329,7 +329,7 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
 | 
			
		||||
      if (NOT ${_LIBRARIES})
 | 
			
		||||
        check_lapack_libraries(
 | 
			
		||||
          ${_LIBRARIES}
 | 
			
		||||
          BLAS
 | 
			
		||||
          LAPACK
 | 
			
		||||
          ${LAPACK_mkl_SEARCH_SYMBOL}
 | 
			
		||||
          ""
 | 
			
		||||
          "${IT}"
 | 
			
		||||
 | 
			
		||||
@ -791,9 +791,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc"
 | 
			
		||||
  endif()
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
# On Apple we need CoreFoundation
 | 
			
		||||
# On Apple we need CoreFoundation and CoreServices
 | 
			
		||||
if(APPLE)
 | 
			
		||||
  target_link_libraries(CMakeLib "-framework CoreFoundation")
 | 
			
		||||
  target_link_libraries(CMakeLib "-framework CoreServices")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(WIN32 AND NOT UNIX)
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
# CMake version number components.
 | 
			
		||||
set(CMake_VERSION_MAJOR 3)
 | 
			
		||||
set(CMake_VERSION_MINOR 13)
 | 
			
		||||
set(CMake_VERSION_PATCH 2)
 | 
			
		||||
set(CMake_VERSION_PATCH 4)
 | 
			
		||||
#set(CMake_VERSION_RC 0)
 | 
			
		||||
 | 
			
		||||
@ -2906,10 +2906,6 @@ bool cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
 | 
			
		||||
  ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
 | 
			
		||||
  check_curl_result(res, "DOWNLOAD cannot set url: ");
 | 
			
		||||
 | 
			
		||||
  // enable auth
 | 
			
		||||
  res = ::curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
 | 
			
		||||
  check_curl_result(res, "DOWNLOAD cannot set httpauth: ");
 | 
			
		||||
 | 
			
		||||
  // enable HTTP ERROR parsing
 | 
			
		||||
  res = ::curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
 | 
			
		||||
  check_curl_result(res, "DOWNLOAD cannot set http failure option: ");
 | 
			
		||||
@ -3209,10 +3205,6 @@ bool cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
 | 
			
		||||
  res = ::curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
 | 
			
		||||
  check_curl_result(res, "UPLOAD cannot set url: ");
 | 
			
		||||
 | 
			
		||||
  // enable auth
 | 
			
		||||
  res = ::curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
 | 
			
		||||
  check_curl_result(res, "UPLOAD cannot set httpauth: ");
 | 
			
		||||
 | 
			
		||||
  res =
 | 
			
		||||
    ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cmWriteToMemoryCallback);
 | 
			
		||||
  check_curl_result(res, "UPLOAD cannot set write function: ");
 | 
			
		||||
 | 
			
		||||
@ -1500,6 +1500,31 @@ bool cmGlobalGenerator::QtAutoGen()
 | 
			
		||||
      auto qtVersion = cmQtAutoGenInitializer::GetQtVersion(target);
 | 
			
		||||
      // don't do anything if there is no Qt4 or Qt5Core (which contains moc)
 | 
			
		||||
      if (qtVersion.Major != 4 && qtVersion.Major != 5) {
 | 
			
		||||
        std::string msg = "AUTOGEN: No valid Qt version found for target ";
 | 
			
		||||
        msg += target->GetName();
 | 
			
		||||
        msg += ". ";
 | 
			
		||||
        {
 | 
			
		||||
          std::vector<std::string> lst;
 | 
			
		||||
          if (mocEnabled) {
 | 
			
		||||
            lst.emplace_back("AUTOMOC");
 | 
			
		||||
          }
 | 
			
		||||
          if (uicEnabled) {
 | 
			
		||||
            lst.emplace_back("AUTOUIC");
 | 
			
		||||
          }
 | 
			
		||||
          if (rccEnabled) {
 | 
			
		||||
            lst.emplace_back("AUTORCC");
 | 
			
		||||
          }
 | 
			
		||||
          msg += cmJoin(lst, ", ");
 | 
			
		||||
        }
 | 
			
		||||
        msg += " disabled.  ";
 | 
			
		||||
        msg += "Consider adding:\n";
 | 
			
		||||
        if (uicEnabled) {
 | 
			
		||||
          msg += "  find_package(Qt5 COMPONENTS Widgets)\n";
 | 
			
		||||
        } else {
 | 
			
		||||
          msg += "  find_package(Qt5 COMPONENTS Core)\n";
 | 
			
		||||
        }
 | 
			
		||||
        msg += "to your CMakeLists.txt file.";
 | 
			
		||||
        target->Makefile->IssueMessage(cmake::AUTHOR_WARNING, msg);
 | 
			
		||||
        continue;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -210,8 +210,29 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(
 | 
			
		||||
      // An import library looks like a static library.
 | 
			
		||||
      type = cmInstallType_STATIC_LIBRARY;
 | 
			
		||||
    } else if (this->Target->IsFrameworkOnApple()) {
 | 
			
		||||
      // There is a bug in cmInstallCommand if this fails.
 | 
			
		||||
      assert(this->NamelinkMode == NamelinkModeNone);
 | 
			
		||||
      // FIXME: In principle we should be able to
 | 
			
		||||
      //   assert(this->NamelinkMode == NamelinkModeNone);
 | 
			
		||||
      // but since the current install() command implementation checks
 | 
			
		||||
      // the FRAMEWORK property immediately instead of delaying until
 | 
			
		||||
      // generate time, it is possible for project code to set the
 | 
			
		||||
      // property after calling install().  In such a case, the install()
 | 
			
		||||
      // command will use the LIBRARY code path and create two install
 | 
			
		||||
      // generators, one for the namelink component (NamelinkModeOnly)
 | 
			
		||||
      // and one for the primary artifact component (NamelinkModeSkip).
 | 
			
		||||
      // Historically this was not diagnosed and resulted in silent
 | 
			
		||||
      // installation of a framework to the LIBRARY destination.
 | 
			
		||||
      // Retain that behavior.
 | 
			
		||||
      switch (this->NamelinkMode) {
 | 
			
		||||
        case NamelinkModeNone:
 | 
			
		||||
          // Normal case.
 | 
			
		||||
          break;
 | 
			
		||||
        case NamelinkModeOnly:
 | 
			
		||||
          // Assume the NamelinkModeSkip instance will install.
 | 
			
		||||
          return;
 | 
			
		||||
        case NamelinkModeSkip: {
 | 
			
		||||
          // Proceed to install in the LIBRARY destination for compatibility.
 | 
			
		||||
        } break;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      // Install the whole framework directory.
 | 
			
		||||
      type = cmInstallType_DIRECTORY;
 | 
			
		||||
 | 
			
		||||
@ -1281,6 +1281,12 @@ cmQtAutoGenInitializer::IntegerVersion cmQtAutoGenInitializer::GetQtVersion(
 | 
			
		||||
  if (qtMajor.empty()) {
 | 
			
		||||
    qtMajor = makefile->GetSafeDefinition("Qt5Core_VERSION_MAJOR");
 | 
			
		||||
  }
 | 
			
		||||
  if (qtMajor.empty()) {
 | 
			
		||||
    const char* dirprop = makefile->GetProperty("Qt5Core_VERSION_MAJOR");
 | 
			
		||||
    if (dirprop) {
 | 
			
		||||
      qtMajor = dirprop;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  {
 | 
			
		||||
    const char* targetQtVersion =
 | 
			
		||||
      target->GetLinkInterfaceDependentStringProperty("QT_MAJOR_VERSION", "");
 | 
			
		||||
@ -1294,6 +1300,12 @@ cmQtAutoGenInitializer::IntegerVersion cmQtAutoGenInitializer::GetQtVersion(
 | 
			
		||||
  if (!qtMajor.empty()) {
 | 
			
		||||
    if (qtMajor == "5") {
 | 
			
		||||
      qtMinor = makefile->GetSafeDefinition("Qt5Core_VERSION_MINOR");
 | 
			
		||||
      if (qtMinor.empty()) {
 | 
			
		||||
        const char* dirprop = makefile->GetProperty("Qt5Core_VERSION_MINOR");
 | 
			
		||||
        if (dirprop) {
 | 
			
		||||
          qtMinor = dirprop;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    if (qtMinor.empty()) {
 | 
			
		||||
      qtMinor = makefile->GetSafeDefinition("QT_VERSION_MINOR");
 | 
			
		||||
 | 
			
		||||
@ -295,6 +295,9 @@ bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance()
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // FIXME: Add a way for caller to specify other versions.
 | 
			
		||||
  std::wstring wantVersion = std::to_wstring(15) + L'.';
 | 
			
		||||
 | 
			
		||||
  SmartCOMPtr<ISetupInstance> instance;
 | 
			
		||||
  while (SUCCEEDED(enumInstances->Next(1, &instance, NULL)) && instance) {
 | 
			
		||||
    SmartCOMPtr<ISetupInstance2> instance2 = NULL;
 | 
			
		||||
@ -310,6 +313,12 @@ bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance()
 | 
			
		||||
    instance = instance2 = NULL;
 | 
			
		||||
 | 
			
		||||
    if (isInstalled) {
 | 
			
		||||
      // We are looking for a specific major version.
 | 
			
		||||
      if (instanceInfo.Version.size() < wantVersion.size() ||
 | 
			
		||||
          instanceInfo.Version.substr(0, wantVersion.size()) != wantVersion) {
 | 
			
		||||
        continue;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (!this->SpecifiedVSInstallLocation.empty()) {
 | 
			
		||||
        // We are looking for a specific instance.
 | 
			
		||||
        std::string currentVSLocation = instanceInfo.GetInstallLocation();
 | 
			
		||||
 | 
			
		||||
@ -609,16 +609,13 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Parse the args
 | 
			
		||||
void cmake::SetArgs(const std::vector<std::string>& args,
 | 
			
		||||
                    bool directoriesSetBefore)
 | 
			
		||||
void cmake::SetArgs(const std::vector<std::string>& args)
 | 
			
		||||
{
 | 
			
		||||
  bool directoriesSet = directoriesSetBefore;
 | 
			
		||||
  bool haveToolset = false;
 | 
			
		||||
  bool havePlatform = false;
 | 
			
		||||
  for (unsigned int i = 1; i < args.size(); ++i) {
 | 
			
		||||
    std::string const& arg = args[i];
 | 
			
		||||
    if (arg.find("-H", 0) == 0 || arg.find("-S", 0) == 0) {
 | 
			
		||||
      directoriesSet = true;
 | 
			
		||||
      std::string path = arg.substr(2);
 | 
			
		||||
      if (path.empty()) {
 | 
			
		||||
        ++i;
 | 
			
		||||
@ -639,7 +636,6 @@ void cmake::SetArgs(const std::vector<std::string>& args,
 | 
			
		||||
    } else if (arg.find("-O", 0) == 0) {
 | 
			
		||||
      // There is no local generate anymore.  Ignore -O option.
 | 
			
		||||
    } else if (arg.find("-B", 0) == 0) {
 | 
			
		||||
      directoriesSet = true;
 | 
			
		||||
      std::string path = arg.substr(2);
 | 
			
		||||
      if (path.empty()) {
 | 
			
		||||
        ++i;
 | 
			
		||||
@ -676,10 +672,25 @@ void cmake::SetArgs(const std::vector<std::string>& args,
 | 
			
		||||
#endif
 | 
			
		||||
    else if (arg.find("-D", 0) == 0) {
 | 
			
		||||
      // skip for now
 | 
			
		||||
      // in case '-D var=val' is given, also skip the next
 | 
			
		||||
      // in case '-Dvar=val' is given, don't skip the next
 | 
			
		||||
      if (arg.size() == 2) {
 | 
			
		||||
        ++i;
 | 
			
		||||
      }
 | 
			
		||||
    } else if (arg.find("-U", 0) == 0) {
 | 
			
		||||
      // skip for now
 | 
			
		||||
      // in case '-U var' is given, also skip the next
 | 
			
		||||
      // in case '-Uvar' is given, don't skip the next
 | 
			
		||||
      if (arg.size() == 2) {
 | 
			
		||||
        ++i;
 | 
			
		||||
      }
 | 
			
		||||
    } else if (arg.find("-C", 0) == 0) {
 | 
			
		||||
      // skip for now
 | 
			
		||||
      // in case '-C path' is given, also skip the next
 | 
			
		||||
      // in case '-Cpath' is given, don't skip the next
 | 
			
		||||
      if (arg.size() == 2) {
 | 
			
		||||
        ++i;
 | 
			
		||||
      }
 | 
			
		||||
    } else if (arg.find("-P", 0) == 0) {
 | 
			
		||||
      // skip for now
 | 
			
		||||
      i++;
 | 
			
		||||
@ -786,16 +797,30 @@ void cmake::SetArgs(const std::vector<std::string>& args,
 | 
			
		||||
        this->SetGlobalGenerator(gen);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    // no option assume it is the path to the source
 | 
			
		||||
    // no option assume it is the path to the source or an existing build
 | 
			
		||||
    else {
 | 
			
		||||
      directoriesSet = true;
 | 
			
		||||
      this->SetDirectoriesFromFile(arg.c_str());
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  if (!directoriesSet) {
 | 
			
		||||
    this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
 | 
			
		||||
 | 
			
		||||
  const bool haveSourceDir = !this->GetHomeDirectory().empty();
 | 
			
		||||
  const bool haveBinaryDir = !this->GetHomeOutputDirectory().empty();
 | 
			
		||||
 | 
			
		||||
  if (this->CurrentWorkingMode == cmake::NORMAL_MODE && !haveSourceDir &&
 | 
			
		||||
      !haveBinaryDir) {
 | 
			
		||||
    this->IssueMessage(
 | 
			
		||||
      cmake::WARNING,
 | 
			
		||||
      "No source or binary directory provided. Both will be assumed to be "
 | 
			
		||||
      "the same as the current working directory, but note that this "
 | 
			
		||||
      "warning will become a fatal error in future CMake releases.");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (!haveSourceDir) {
 | 
			
		||||
    this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
 | 
			
		||||
  }
 | 
			
		||||
  if (!haveBinaryDir) {
 | 
			
		||||
    this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void cmake::SetDirectoriesFromFile(const char* arg)
 | 
			
		||||
 | 
			
		||||
@ -275,8 +275,7 @@ public:
 | 
			
		||||
  int GetSystemInformation(std::vector<std::string>&);
 | 
			
		||||
 | 
			
		||||
  ///! Parse command line arguments
 | 
			
		||||
  void SetArgs(const std::vector<std::string>&,
 | 
			
		||||
               bool directoriesSetBefore = false);
 | 
			
		||||
  void SetArgs(const std::vector<std::string>& args);
 | 
			
		||||
 | 
			
		||||
  ///! Is this cmake running as a result of a TRY_COMPILE command
 | 
			
		||||
  bool GetIsInTryCompile() const;
 | 
			
		||||
 | 
			
		||||
@ -285,12 +285,12 @@ int do_cmake(int ac, char const* const* av)
 | 
			
		||||
    } else if (cmHasLiteralPrefix(av[i], "-P")) {
 | 
			
		||||
      if (i == ac - 1) {
 | 
			
		||||
        cmSystemTools::Error("No script specified for argument -P");
 | 
			
		||||
      } else {
 | 
			
		||||
        workingMode = cmake::SCRIPT_MODE;
 | 
			
		||||
        args.push_back(av[i]);
 | 
			
		||||
        i++;
 | 
			
		||||
        args.push_back(av[i]);
 | 
			
		||||
        return 1;
 | 
			
		||||
      }
 | 
			
		||||
      workingMode = cmake::SCRIPT_MODE;
 | 
			
		||||
      args.push_back(av[i]);
 | 
			
		||||
      i++;
 | 
			
		||||
      args.push_back(av[i]);
 | 
			
		||||
    } else if (cmHasLiteralPrefix(av[i], "--find-package")) {
 | 
			
		||||
      workingMode = cmake::FIND_PACKAGE_MODE;
 | 
			
		||||
      args.push_back(av[i]);
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3
									
								
								Tests/RunCMake/Autogen/CMakeLists.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								Tests/RunCMake/Autogen/CMakeLists.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
			
		||||
cmake_minimum_required(VERSION 3.13)
 | 
			
		||||
project(${RunCMake_TEST} NONE)
 | 
			
		||||
include(${RunCMake_TEST}.cmake)
 | 
			
		||||
							
								
								
									
										8
									
								
								Tests/RunCMake/Autogen/NoQt-stderr.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Tests/RunCMake/Autogen/NoQt-stderr.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,8 @@
 | 
			
		||||
^CMake Warning \(dev\) in CMakeLists.txt:
 | 
			
		||||
  AUTOGEN: No valid Qt version found for target main.  AUTOMOC, AUTOUIC,
 | 
			
		||||
  AUTORCC disabled.  Consider adding:
 | 
			
		||||
 | 
			
		||||
    find_package\(Qt5 COMPONENTS Widgets\)
 | 
			
		||||
 | 
			
		||||
  to your CMakeLists.txt file.
 | 
			
		||||
This warning is for project developers.  Use -Wno-dev to suppress it.
 | 
			
		||||
							
								
								
									
										6
									
								
								Tests/RunCMake/Autogen/NoQt.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								Tests/RunCMake/Autogen/NoQt.cmake
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,6 @@
 | 
			
		||||
enable_language(CXX)
 | 
			
		||||
 | 
			
		||||
add_executable(main empty.cpp)
 | 
			
		||||
set_property(TARGET main PROPERTY AUTOMOC 1)
 | 
			
		||||
set_property(TARGET main PROPERTY AUTORCC 1)
 | 
			
		||||
set_property(TARGET main PROPERTY AUTOUIC 1)
 | 
			
		||||
							
								
								
									
										13
									
								
								Tests/RunCMake/Autogen/QtInFunction.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								Tests/RunCMake/Autogen/QtInFunction.cmake
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
			
		||||
enable_language(CXX)
 | 
			
		||||
 | 
			
		||||
function (use_autogen target)
 | 
			
		||||
  find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
 | 
			
		||||
  set(Qt5Core_VERSION_MAJOR "${Qt5Core_VERSION_MAJOR}" PARENT_SCOPE)
 | 
			
		||||
  set(Qt5Core_VERSION_MINOR "${Qt5Core_VERSION_MINOR}" PARENT_SCOPE)
 | 
			
		||||
  set_property(TARGET "${target}" PROPERTY AUTOMOC 1)
 | 
			
		||||
  set_property(TARGET "${target}" PROPERTY AUTORCC 1)
 | 
			
		||||
  set_property(TARGET "${target}" PROPERTY AUTOUIC 1)
 | 
			
		||||
endfunction ()
 | 
			
		||||
 | 
			
		||||
add_executable(main empty.cpp)
 | 
			
		||||
use_autogen(main)
 | 
			
		||||
							
								
								
									
										8
									
								
								Tests/RunCMake/Autogen/QtInFunctionNested-stderr.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Tests/RunCMake/Autogen/QtInFunctionNested-stderr.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,8 @@
 | 
			
		||||
^CMake Warning \(dev\) in CMakeLists.txt:
 | 
			
		||||
  AUTOGEN: No valid Qt version found for target main.  AUTOMOC, AUTOUIC,
 | 
			
		||||
  AUTORCC disabled.  Consider adding:
 | 
			
		||||
 | 
			
		||||
    find_package\(Qt5 COMPONENTS Widgets\)
 | 
			
		||||
 | 
			
		||||
  to your CMakeLists.txt file.
 | 
			
		||||
This warning is for project developers.  Use -Wno-dev to suppress it.
 | 
			
		||||
							
								
								
									
										17
									
								
								Tests/RunCMake/Autogen/QtInFunctionNested.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								Tests/RunCMake/Autogen/QtInFunctionNested.cmake
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,17 @@
 | 
			
		||||
enable_language(CXX)
 | 
			
		||||
 | 
			
		||||
function (use_autogen target)
 | 
			
		||||
  find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
 | 
			
		||||
  set(Qt5Core_VERSION_MAJOR "${Qt5Core_VERSION_MAJOR}" PARENT_SCOPE)
 | 
			
		||||
  set(Qt5Core_VERSION_MINOR "${Qt5Core_VERSION_MINOR}" PARENT_SCOPE)
 | 
			
		||||
  set_property(TARGET "${target}" PROPERTY AUTOMOC 1)
 | 
			
		||||
  set_property(TARGET "${target}" PROPERTY AUTORCC 1)
 | 
			
		||||
  set_property(TARGET "${target}" PROPERTY AUTOUIC 1)
 | 
			
		||||
endfunction ()
 | 
			
		||||
 | 
			
		||||
function (wrap_autogen target)
 | 
			
		||||
  use_autogen("${target}")
 | 
			
		||||
endfunction ()
 | 
			
		||||
 | 
			
		||||
add_executable(main empty.cpp)
 | 
			
		||||
wrap_autogen(main)
 | 
			
		||||
							
								
								
									
										21
									
								
								Tests/RunCMake/Autogen/QtInFunctionProperty.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								Tests/RunCMake/Autogen/QtInFunctionProperty.cmake
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,21 @@
 | 
			
		||||
enable_language(CXX)
 | 
			
		||||
 | 
			
		||||
function (use_autogen target)
 | 
			
		||||
  find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
 | 
			
		||||
  set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
 | 
			
		||||
    PROPERTY
 | 
			
		||||
      Qt5Core_VERSION_MAJOR "${Qt5Core_VERSION_MAJOR}")
 | 
			
		||||
  set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
 | 
			
		||||
    PROPERTY
 | 
			
		||||
      Qt5Core_VERSION_MINOR "${Qt5Core_VERSION_MINOR}")
 | 
			
		||||
  set_property(TARGET "${target}" PROPERTY AUTOMOC 1)
 | 
			
		||||
  set_property(TARGET "${target}" PROPERTY AUTORCC 1)
 | 
			
		||||
  set_property(TARGET "${target}" PROPERTY AUTOUIC 1)
 | 
			
		||||
endfunction ()
 | 
			
		||||
 | 
			
		||||
function (wrap_autogen target)
 | 
			
		||||
  use_autogen("${target}")
 | 
			
		||||
endfunction ()
 | 
			
		||||
 | 
			
		||||
add_executable(main empty.cpp)
 | 
			
		||||
wrap_autogen(main)
 | 
			
		||||
							
								
								
									
										8
									
								
								Tests/RunCMake/Autogen/RunCMakeTest.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Tests/RunCMake/Autogen/RunCMakeTest.cmake
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,8 @@
 | 
			
		||||
include(RunCMake)
 | 
			
		||||
 | 
			
		||||
run_cmake(NoQt)
 | 
			
		||||
if (with_qt5)
 | 
			
		||||
  run_cmake(QtInFunction)
 | 
			
		||||
  run_cmake(QtInFunctionNested)
 | 
			
		||||
  run_cmake(QtInFunctionProperty)
 | 
			
		||||
endif ()
 | 
			
		||||
							
								
								
									
										0
									
								
								Tests/RunCMake/Autogen/empty.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								Tests/RunCMake/Autogen/empty.cpp
									
									
									
									
									
										Normal file
									
								
							@ -142,6 +142,14 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
add_RunCMake_test(AndroidTestUtilities)
 | 
			
		||||
set(autogen_with_qt5 FALSE)
 | 
			
		||||
if(CMake_TEST_Qt5)
 | 
			
		||||
  find_package(Qt5Widgets QUIET NO_MODULE)
 | 
			
		||||
endif()
 | 
			
		||||
if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND)
 | 
			
		||||
  set(autogen_with_qt5 TRUE)
 | 
			
		||||
endif ()
 | 
			
		||||
add_RunCMake_test(Autogen -Dwith_qt5=${autogen_with_qt5})
 | 
			
		||||
add_RunCMake_test(BuildDepends)
 | 
			
		||||
if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
 | 
			
		||||
  add_RunCMake_test(Byproducts)
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,3 @@
 | 
			
		||||
^CMake Error: Error processing file: nosuchcachefile.txt
 | 
			
		||||
CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/C-no-file-build/nosuchcachefile.txt" does not exist.
 | 
			
		||||
CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/C-no-file-build" does not appear to contain CMakeLists.txt.
 | 
			
		||||
Specify --help for usage, or press the help button on the CMake GUI.$
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								Tests/RunCMake/CommandLine/Cno-file-result.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								Tests/RunCMake/CommandLine/Cno-file-result.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
1
 | 
			
		||||
							
								
								
									
										3
									
								
								Tests/RunCMake/CommandLine/Cno-file-stderr.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								Tests/RunCMake/CommandLine/Cno-file-stderr.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
			
		||||
^CMake Error: Error processing file: nosuchcachefile.txt
 | 
			
		||||
CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/Cno-file-build" does not appear to contain CMakeLists.txt.
 | 
			
		||||
Specify --help for usage, or press the help button on the CMake GUI.$
 | 
			
		||||
							
								
								
									
										1
									
								
								Tests/RunCMake/CommandLine/D-no-src-result.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								Tests/RunCMake/CommandLine/D-no-src-result.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
1
 | 
			
		||||
							
								
								
									
										2
									
								
								Tests/RunCMake/CommandLine/D-no-src-stderr.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								Tests/RunCMake/CommandLine/D-no-src-stderr.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,2 @@
 | 
			
		||||
^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/D-no-src-build" does not appear to contain CMakeLists.txt.
 | 
			
		||||
Specify --help for usage, or press the help button on the CMake GUI.$
 | 
			
		||||
							
								
								
									
										1
									
								
								Tests/RunCMake/CommandLine/Dno-src-result.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								Tests/RunCMake/CommandLine/Dno-src-result.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
1
 | 
			
		||||
							
								
								
									
										2
									
								
								Tests/RunCMake/CommandLine/Dno-src-stderr.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								Tests/RunCMake/CommandLine/Dno-src-stderr.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,2 @@
 | 
			
		||||
^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/Dno-src-build" does not appear to contain CMakeLists.txt.
 | 
			
		||||
Specify --help for usage, or press the help button on the CMake GUI.$
 | 
			
		||||
@ -4,12 +4,17 @@ include(RunCMake)
 | 
			
		||||
 | 
			
		||||
run_cmake_command(NoArgs ${CMAKE_COMMAND})
 | 
			
		||||
run_cmake_command(Wizard ${CMAKE_COMMAND} -i)
 | 
			
		||||
run_cmake_command(C-no-arg ${CMAKE_COMMAND} -C)
 | 
			
		||||
run_cmake_command(C-no-file ${CMAKE_COMMAND} -C nosuchcachefile.txt)
 | 
			
		||||
run_cmake_command(C-no-arg ${CMAKE_COMMAND} -B DummyBuildDir -C)
 | 
			
		||||
run_cmake_command(C-no-file ${CMAKE_COMMAND} -B DummyBuildDir -C nosuchcachefile.txt)
 | 
			
		||||
run_cmake_command(Cno-file ${CMAKE_COMMAND} -B DummyBuildDir -Cnosuchcachefile.txt)
 | 
			
		||||
run_cmake_command(cache-no-file ${CMAKE_COMMAND} nosuchsubdir/CMakeCache.txt)
 | 
			
		||||
run_cmake_command(lists-no-file ${CMAKE_COMMAND} nosuchsubdir/CMakeLists.txt)
 | 
			
		||||
run_cmake_command(D-no-arg ${CMAKE_COMMAND} -D)
 | 
			
		||||
run_cmake_command(U-no-arg ${CMAKE_COMMAND} -U)
 | 
			
		||||
run_cmake_command(D-no-arg ${CMAKE_COMMAND} -B DummyBuildDir -D)
 | 
			
		||||
run_cmake_command(D-no-src ${CMAKE_COMMAND} -B DummyBuildDir -D VAR=VALUE)
 | 
			
		||||
run_cmake_command(Dno-src ${CMAKE_COMMAND} -B DummyBuildDir -DVAR=VALUE)
 | 
			
		||||
run_cmake_command(U-no-arg ${CMAKE_COMMAND} -B DummyBuildDir -U)
 | 
			
		||||
run_cmake_command(U-no-src ${CMAKE_COMMAND} -B DummyBuildDir -U VAR)
 | 
			
		||||
run_cmake_command(Uno-src ${CMAKE_COMMAND} -B DummyBuildDir -UVAR)
 | 
			
		||||
run_cmake_command(E-no-arg ${CMAKE_COMMAND} -E)
 | 
			
		||||
run_cmake_command(E_capabilities ${CMAKE_COMMAND} -E capabilities)
 | 
			
		||||
run_cmake_command(E_capabilities-arg ${CMAKE_COMMAND} -E capabilities --extra-arg)
 | 
			
		||||
@ -27,8 +32,8 @@ run_cmake_command(E___run_co_compile-bad-iwyu ${CMAKE_COMMAND} -E __run_co_compi
 | 
			
		||||
run_cmake_command(E___run_co_compile-no--- ${CMAKE_COMMAND} -E __run_co_compile --iwyu=iwyu-does-not-exist command-does-not-exist)
 | 
			
		||||
run_cmake_command(E___run_co_compile-no-cc ${CMAKE_COMMAND} -E __run_co_compile --iwyu=iwyu-does-not-exist --)
 | 
			
		||||
 | 
			
		||||
run_cmake_command(G_no-arg ${CMAKE_COMMAND} -G)
 | 
			
		||||
run_cmake_command(G_bad-arg ${CMAKE_COMMAND} -G NoSuchGenerator)
 | 
			
		||||
run_cmake_command(G_no-arg ${CMAKE_COMMAND} -B DummyBuildDir -G)
 | 
			
		||||
run_cmake_command(G_bad-arg ${CMAKE_COMMAND} -B DummyBuildDir -G NoSuchGenerator)
 | 
			
		||||
run_cmake_command(P_no-arg ${CMAKE_COMMAND} -P)
 | 
			
		||||
run_cmake_command(P_no-file ${CMAKE_COMMAND} -P nosuchscriptfile.cmake)
 | 
			
		||||
 | 
			
		||||
@ -49,6 +54,17 @@ run_cmake_command(cache-empty-entry
 | 
			
		||||
  ${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-empty-entry/)
 | 
			
		||||
 | 
			
		||||
function(run_ExplicitDirs)
 | 
			
		||||
  set(source_dir ${RunCMake_BINARY_DIR}/ExplicitDirsMissing)
 | 
			
		||||
 | 
			
		||||
  file(REMOVE_RECURSE "${source_dir}")
 | 
			
		||||
  file(MAKE_DIRECTORY "${source_dir}")
 | 
			
		||||
  file(WRITE ${source_dir}/CMakeLists.txt [=[
 | 
			
		||||
cmake_minimum_required(VERSION 3.13)
 | 
			
		||||
project(ExplicitDirsMissing LANGUAGES NONE)
 | 
			
		||||
]=])
 | 
			
		||||
  run_cmake_command(no-S-B ${CMAKE_COMMAND} -E chdir ${source_dir}
 | 
			
		||||
    ${CMAKE_COMMAND} -DFOO=BAR)
 | 
			
		||||
 | 
			
		||||
  set(source_dir ${RunCMake_SOURCE_DIR}/ExplicitDirs)
 | 
			
		||||
  set(binary_dir ${RunCMake_BINARY_DIR}/ExplicitDirs-build)
 | 
			
		||||
 | 
			
		||||
@ -323,9 +339,9 @@ set(RunCMake_TEST_OPTIONS -Wdev -Wno-dev)
 | 
			
		||||
run_cmake(Wno-dev)
 | 
			
		||||
unset(RunCMake_TEST_OPTIONS)
 | 
			
		||||
 | 
			
		||||
run_cmake_command(W_bad-arg1 ${CMAKE_COMMAND} -W)
 | 
			
		||||
run_cmake_command(W_bad-arg2 ${CMAKE_COMMAND} -Wno-)
 | 
			
		||||
run_cmake_command(W_bad-arg3 ${CMAKE_COMMAND} -Werror=)
 | 
			
		||||
run_cmake_command(W_bad-arg1 ${CMAKE_COMMAND} -B DummyBuildDir -W)
 | 
			
		||||
run_cmake_command(W_bad-arg2 ${CMAKE_COMMAND} -B DummyBuildDir -Wno-)
 | 
			
		||||
run_cmake_command(W_bad-arg3 ${CMAKE_COMMAND} -B DummyBuildDir -Werror=)
 | 
			
		||||
 | 
			
		||||
set(RunCMake_TEST_OPTIONS --debug-output)
 | 
			
		||||
run_cmake(debug-output)
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								Tests/RunCMake/CommandLine/U-no-src-result.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								Tests/RunCMake/CommandLine/U-no-src-result.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
1
 | 
			
		||||
							
								
								
									
										2
									
								
								Tests/RunCMake/CommandLine/U-no-src-stderr.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								Tests/RunCMake/CommandLine/U-no-src-stderr.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,2 @@
 | 
			
		||||
^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/U-no-src-build" does not appear to contain CMakeLists.txt.
 | 
			
		||||
Specify --help for usage, or press the help button on the CMake GUI.$
 | 
			
		||||
							
								
								
									
										1
									
								
								Tests/RunCMake/CommandLine/Uno-src-result.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								Tests/RunCMake/CommandLine/Uno-src-result.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
1
 | 
			
		||||
							
								
								
									
										2
									
								
								Tests/RunCMake/CommandLine/Uno-src-stderr.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								Tests/RunCMake/CommandLine/Uno-src-stderr.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,2 @@
 | 
			
		||||
^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/Uno-src-build" does not appear to contain CMakeLists.txt.
 | 
			
		||||
Specify --help for usage, or press the help button on the CMake GUI.$
 | 
			
		||||
							
								
								
									
										4
									
								
								Tests/RunCMake/CommandLine/no-S-B-stderr.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								Tests/RunCMake/CommandLine/no-S-B-stderr.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
			
		||||
CMake Warning:
 | 
			
		||||
  No source or binary directory provided.  Both will be assumed to be the
 | 
			
		||||
  same as the current working directory, but note that this warning will
 | 
			
		||||
  become a fatal error in future CMake releases.
 | 
			
		||||
							
								
								
									
										5
									
								
								Tests/RunCMake/Framework/InstallBeforeFramework.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								Tests/RunCMake/Framework/InstallBeforeFramework.cmake
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,5 @@
 | 
			
		||||
enable_language(C)
 | 
			
		||||
 | 
			
		||||
add_library(foo SHARED foo.c)
 | 
			
		||||
install(TARGETS foo LIBRARY DESTINATION lib)
 | 
			
		||||
set_property(TARGET foo PROPERTY FRAMEWORK TRUE)
 | 
			
		||||
@ -1,5 +1,7 @@
 | 
			
		||||
include(RunCMake)
 | 
			
		||||
 | 
			
		||||
run_cmake(InstallBeforeFramework)
 | 
			
		||||
 | 
			
		||||
function(framework_layout_test Name Toolchain Type)
 | 
			
		||||
  set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${Toolchain}${Type}FrameworkLayout-build)
 | 
			
		||||
  set(RunCMake_TEST_NO_CLEAN 1)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user