diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:14:22 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:14:22 +0900 |
commit | a29c56f9e049bc76021843cf77afe4474bc6a493 (patch) | |
tree | 8072473fe2a3c459537881c9d12dcdbed2f77d01 | |
parent | 2f958deaa9d4f34ff9c81d05b9b5deba6672e2f3 (diff) | |
download | cmake-a29c56f9e049bc76021843cf77afe4474bc6a493.tar.gz cmake-a29c56f9e049bc76021843cf77afe4474bc6a493.tar.bz2 cmake-a29c56f9e049bc76021843cf77afe4474bc6a493.zip |
Imported Upstream version 3.16.2upstream/3.16.2
-rw-r--r-- | CTestCustom.cmake.in | 1 | ||||
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 7 | ||||
-rw-r--r-- | Modules/FindBLAS.cmake | 8 | ||||
-rw-r--r-- | Modules/FindBoost.cmake | 20 | ||||
-rw-r--r-- | Modules/FindLAPACK.cmake | 2 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 4 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioVersionedGenerator.cxx | 23 | ||||
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 6 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 3 | ||||
-rw-r--r-- | Tests/CMakeLib/testCTestResourceSpec.cxx | 73 | ||||
-rw-r--r-- | Tests/QtAutogen/SameName/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/QtAutogen/SameName/main.cpp | 2 | ||||
-rw-r--r-- | Tests/QtAutogen/SameName/object.hh | 13 | ||||
-rw-r--r-- | Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake | 2 |
14 files changed, 89 insertions, 76 deletions
diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 823ee3cb7..d3ab9d3ef 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -49,6 +49,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "WarningMessagesDialog\\.cxx" "warning.*directory name.*CMake-Xcode.*/bin/.*does not exist.*" "stl_deque.h:1051" + "Tests/CMakeLib/testCTestResourceSpec.cxx:.*warning: missing initializer for member.*cmCTestResourceSpec::.*" # GCC 4.8 disagrees with later compilers on C++11 initializer list conversion "(Lexer|Parser).*warning.*conversion.*may (alter its value|change the sign)" "(Lexer|Parser).*warning.*(statement is unreachable|will never be executed)" "(Lexer|Parser).*warning.*variable.*was set but never used" diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 908e530bd..7b571c3c8 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -284,10 +284,11 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} set(id_cl icl.exe) endif() if(CMAKE_VS_PLATFORM_TOOLSET_VERSION) + set(id_sep "\\") if(CMAKE_VS_PLATFORM_TOOLSET_VERSION VERSION_GREATER_EQUAL "14.20") - set(id_sep ".") - else() - set(id_sep "\\") + if(EXISTS "${CMAKE_GENERATOR_INSTANCE}/VC/Auxiliary/Build.${CMAKE_VS_PLATFORM_TOOLSET_VERSION}/Microsoft.VCToolsVersion.${CMAKE_VS_PLATFORM_TOOLSET_VERSION}.props") + set(id_sep ".") + endif() endif() set(id_toolset_version_props "<Import Project=\"${CMAKE_GENERATOR_INSTANCE}\\VC\\Auxiliary\\Build${id_sep}${CMAKE_VS_PLATFORM_TOOLSET_VERSION}\\Microsoft.VCToolsVersion.${CMAKE_VS_PLATFORM_TOOLSET_VERSION}.props\" />") unset(id_sep) diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 77f9d0e40..d3acafcd9 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -481,8 +481,12 @@ if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") "" ) endif() - if(NOT BLAS_LIBRARIES) - find_package(Threads) + if(NOT BLAS_LIBRARIES AND (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED)) + if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED) + find_package(Threads) + else() + find_package(Threads REQUIRED) + endif() # OpenBLAS (http://www.openblas.net) check_fortran_libraries( BLAS_LIBRARIES diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index ef962bc16..0e84fabfc 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1129,7 +1129,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret) set(_Boost_TIMER_DEPENDENCIES chrono system) set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic) set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) - elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.70.0) + elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.70.0 AND Boost_VERSION_STRING VERSION_LESS 1.72.0) set(_Boost_CONTRACT_DEPENDENCIES thread chrono date_time) set(_Boost_COROUTINE_DEPENDENCIES context) set(_Boost_FIBER_DEPENDENCIES context) @@ -1143,7 +1143,21 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret) set(_Boost_TIMER_DEPENDENCIES chrono) set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic) set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) - if(NOT Boost_VERSION_STRING VERSION_LESS 1.72.0) + elseif(NOT Boost_VERSION_STRING VERSION_LESS 1.72.0) + set(_Boost_CONTRACT_DEPENDENCIES thread chrono date_time) + set(_Boost_COROUTINE_DEPENDENCIES context) + set(_Boost_FIBER_DEPENDENCIES context) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_LOG_DEPENDENCIES date_time log_setup filesystem thread regex chrono atomic) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l chrono atomic) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization) + set(_Boost_NUMPY_DEPENDENCIES python${component_python_version}) + set(_Boost_THREAD_DEPENDENCIES chrono date_time atomic) + set(_Boost_TIMER_DEPENDENCIES chrono) + set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + if(NOT Boost_VERSION_STRING VERSION_LESS 1.73.0) message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets") endif() endif() @@ -1415,7 +1429,7 @@ else() # _Boost_COMPONENT_HEADERS. See the instructions at the top of # _Boost_COMPONENT_DEPENDENCIES. set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} - "1.71.0" "1.71" "1.70.0" "1.70" "1.69.0" "1.69" + "1.72.0" "1.72" "1.71.0" "1.71" "1.70.0" "1.70" "1.69.0" "1.69" "1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65" "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 844d36ddc..3cb365394 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -174,7 +174,7 @@ if(_libraries_work) endif() if(_libraries_work) - if("${_list}" STREQUAL "") + if("${_list}${_blas}" STREQUAL "") set(${LIBRARIES} "${LIBRARIES}-PLACEHOLDER-FOR-EMPTY-LIBRARIES") else() set(${LIBRARIES} ${${LIBRARIES}} ${_blas} ${_threads}) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7020a5282..468df1376 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,7 +1,7 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 16) -set(CMake_VERSION_PATCH 1) +set(CMake_VERSION_PATCH 2) #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 [==[4771c4e447 CMake 3.16.1]==]) + set(git_info [==[512ab500f0 CMake 3.16.2]==]) # 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]* " diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx index 1eca1f600..a371633ed 100644 --- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx +++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx @@ -6,6 +6,7 @@ #include "cmDocumentationEntry.h" #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" +#include "cmStringAlgorithms.h" #include "cmVSSetupHelper.h" #include "cmake.h" @@ -388,15 +389,19 @@ std::string cmGlobalVisualStudioVersionedGenerator::GetAuxiliaryToolset() const if (version) { std::string instancePath; GetVSInstance(instancePath); - std::stringstream path; - path << instancePath; - path << "/VC/Auxiliary/Build"; - path << (cmSystemTools::VersionCompareGreaterEq(version, "14.20") ? '.' - : '/'); - path << version; - path << "/Microsoft.VCToolsVersion." << version << ".props"; - - std::string toolsetPath = path.str(); + std::string toolsetDir = instancePath + "/VC/Auxiliary/Build"; + char sep = '/'; + if (cmSystemTools::VersionCompareGreaterEq(version, "14.20")) { + std::string toolsetDot = + cmStrCat(toolsetDir, '.', version, "/Microsoft.VCToolsVersion.", + version, ".props"); + if (cmSystemTools::PathExists(toolsetDot)) { + sep = '.'; + } + } + std::string toolsetPath = + cmStrCat(toolsetDir, sep, version, "/Microsoft.VCToolsVersion.", version, + ".props"); cmSystemTools::ConvertToUnixSlashes(toolsetPath); return toolsetPath; } diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index a20f1060f..6b0fc1e93 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -764,7 +764,8 @@ bool cmQtAutoGenInitializer::InitScanFiles() // Register files that will be scanned by moc or uic if (this->MocOrUicEnabled()) { - if (cm->IsHeaderExtension(extLower)) { + // FIXME: Add a policy to include .hh files. + if (cm->IsHeaderExtension(extLower) && extLower != "hh") { addMUFile(makeMUFile(sf, fullPath, true), true); } else if (cm->IsSourceExtension(extLower)) { addMUFile(makeMUFile(sf, fullPath, true), false); @@ -876,7 +877,8 @@ bool cmQtAutoGenInitializer::InitScanFiles() std::string const& extLower = cmSystemTools::LowerCase(sf->GetExtension()); - if (cm->IsHeaderExtension(extLower)) { + // FIXME: Add a policy to include .hh files. + if (cm->IsHeaderExtension(extLower) && extLower != "hh") { if (!cmContains(this->AutogenTarget.Headers, sf)) { auto muf = makeMUFile(sf, fullPath, false); if (muf->SkipMoc || muf->SkipUic) { diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 5c0b881f6..53fc93cf6 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2399,6 +2399,9 @@ void cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( clOptions.AppendFlag("DisableSpecificWarnings", "%(DisableSpecificWarnings)"); } + if (clOptions.HasFlag("ForcedIncludeFiles")) { + clOptions.AppendFlag("ForcedIncludeFiles", "%(ForcedIncludeFiles)"); + } if (configDependentDefines) { clOptions.AddDefines( genexInterpreter.Evaluate(configDefines, "COMPILE_DEFINITIONS")); diff --git a/Tests/CMakeLib/testCTestResourceSpec.cxx b/Tests/CMakeLib/testCTestResourceSpec.cxx index b69003d5a..99bee56c0 100644 --- a/Tests/CMakeLib/testCTestResourceSpec.cxx +++ b/Tests/CMakeLib/testCTestResourceSpec.cxx @@ -21,43 +21,42 @@ static const std::vector<ExpectedSpec> expectedResourceSpecs = { {"threads", { }}, }}}}, - {"spec2.json", true, {{{ - }}}}, - {"spec3.json", false, {{{}}}}, - {"spec4.json", false, {{{}}}}, - {"spec5.json", false, {{{}}}}, - {"spec6.json", false, {{{}}}}, - {"spec7.json", false, {{{}}}}, - {"spec8.json", false, {{{}}}}, - {"spec9.json", false, {{{}}}}, - {"spec10.json", false, {{{}}}}, - {"spec11.json", false, {{{}}}}, - {"spec12.json", false, {{{}}}}, - {"spec13.json", false, {{{}}}}, - {"spec14.json", true, {{{}}}}, - {"spec15.json", true, {{{}}}}, - {"spec16.json", true, {{{}}}}, - {"spec17.json", false, {{{}}}}, - {"spec18.json", false, {{{}}}}, - {"spec19.json", false, {{{}}}}, - {"spec20.json", true, {{{}}}}, - {"spec21.json", false, {{{}}}}, - {"spec22.json", false, {{{}}}}, - {"spec23.json", false, {{{}}}}, - {"spec24.json", false, {{{}}}}, - {"spec25.json", false, {{{}}}}, - {"spec26.json", false, {{{}}}}, - {"spec27.json", false, {{{}}}}, - {"spec28.json", false, {{{}}}}, - {"spec29.json", false, {{{}}}}, - {"spec30.json", false, {{{}}}}, - {"spec31.json", false, {{{}}}}, - {"spec32.json", false, {{{}}}}, - {"spec33.json", false, {{{}}}}, - {"spec34.json", false, {{{}}}}, - {"spec35.json", false, {{{}}}}, - {"spec36.json", false, {{{}}}}, - {"noexist.json", false, {{{}}}}, + {"spec2.json", true, {}}, + {"spec3.json", false, {}}, + {"spec4.json", false, {}}, + {"spec5.json", false, {}}, + {"spec6.json", false, {}}, + {"spec7.json", false, {}}, + {"spec8.json", false, {}}, + {"spec9.json", false, {}}, + {"spec10.json", false, {}}, + {"spec11.json", false, {}}, + {"spec12.json", false, {}}, + {"spec13.json", false, {}}, + {"spec14.json", true, {}}, + {"spec15.json", true, {}}, + {"spec16.json", true, {}}, + {"spec17.json", false, {}}, + {"spec18.json", false, {}}, + {"spec19.json", false, {}}, + {"spec20.json", true, {}}, + {"spec21.json", false, {}}, + {"spec22.json", false, {}}, + {"spec23.json", false, {}}, + {"spec24.json", false, {}}, + {"spec25.json", false, {}}, + {"spec26.json", false, {}}, + {"spec27.json", false, {}}, + {"spec28.json", false, {}}, + {"spec29.json", false, {}}, + {"spec30.json", false, {}}, + {"spec31.json", false, {}}, + {"spec32.json", false, {}}, + {"spec33.json", false, {}}, + {"spec34.json", false, {}}, + {"spec35.json", false, {}}, + {"spec36.json", false, {}}, + {"noexist.json", false, {}}, /* clang-format on */ }; diff --git a/Tests/QtAutogen/SameName/CMakeLists.txt b/Tests/QtAutogen/SameName/CMakeLists.txt index 1919cc739..cd29a2a85 100644 --- a/Tests/QtAutogen/SameName/CMakeLists.txt +++ b/Tests/QtAutogen/SameName/CMakeLists.txt @@ -18,7 +18,6 @@ add_executable(sameName ccc/data.qrc item.cpp object.h - object.hh object.h++ object.hpp object.hxx diff --git a/Tests/QtAutogen/SameName/main.cpp b/Tests/QtAutogen/SameName/main.cpp index 725f4cd7b..19a6f6d1b 100644 --- a/Tests/QtAutogen/SameName/main.cpp +++ b/Tests/QtAutogen/SameName/main.cpp @@ -6,7 +6,6 @@ #include "item.hpp" #include "object.h" #include "object.h++" -#include "object.hh" #include "object.hpp" #include "object.hxx" #include "object_upper_ext.H" @@ -22,7 +21,6 @@ int main(int argv, char** args) ::ccc::Item ccc_item; // Object instances ::Object_h obj_h; - ::Object_hh obj_hh; ::Object_hplpl obj_hplpl; ::Object_hpp obj_hpp; ::Object_hxx obj_hxx; diff --git a/Tests/QtAutogen/SameName/object.hh b/Tests/QtAutogen/SameName/object.hh deleted file mode 100644 index 3e16f8332..000000000 --- a/Tests/QtAutogen/SameName/object.hh +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef OBJECT_HH -#define OBJECT_HH - -#include <QObject> - -class Object_hh : public QObject -{ - Q_OBJECT - Q_SLOT - void go(){}; -}; - -#endif diff --git a/Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake b/Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake index 27842f98e..91cea0ef8 100644 --- a/Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake +++ b/Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake @@ -31,7 +31,7 @@ foreach(line IN LISTS tgt_projects_strings) set(have_pch_header ON) endif() - if (line MATCHES "<ForcedIncludeFiles.*>.*${pch_header}</ForcedIncludeFiles>") + if (line MATCHES "<ForcedIncludeFiles.*>.*${pch_header}.*</ForcedIncludeFiles>") set(have_force_pch_header ON) endif() |