diff options
-rw-r--r-- | Help/release/dev/frontend-variant-always.rst | 6 | ||||
-rw-r--r-- | Help/variable/CMAKE_LANG_COMPILER_FRONTEND_VARIANT.rst | 4 | ||||
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 6 | ||||
-rw-r--r-- | Modules/FindBoost.cmake | 5 | ||||
-rw-r--r-- | Modules/FindMatlab.cmake | 2 | ||||
-rw-r--r-- | Modules/FindwxWindows.cmake | 2 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestBuildAndTestHandler.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestCurl.cxx | 6 | ||||
-rw-r--r-- | Source/CTest/cmCTestGenericHandler.cxx | 16 | ||||
-rw-r--r-- | Source/CTest/cmCTestGenericHandler.h | 12 | ||||
-rw-r--r-- | Source/CTest/cmCTestHandlerCommand.cxx | 4 | ||||
-rw-r--r-- | Source/cmCTest.cxx | 50 | ||||
-rw-r--r-- | Source/cmCTest.h | 2 | ||||
-rw-r--r-- | Utilities/cmzlib/cm_zlib_mangle.h | 3 |
15 files changed, 62 insertions, 60 deletions
diff --git a/Help/release/dev/frontend-variant-always.rst b/Help/release/dev/frontend-variant-always.rst new file mode 100644 index 0000000..111175c --- /dev/null +++ b/Help/release/dev/frontend-variant-always.rst @@ -0,0 +1,6 @@ +frontend-variant-always +----------------------- + +* The :variable:`CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT` variable is now + set for ``GNU``, ``MSVC``, and ``AppleClang`` compilers that have only + one frontend variant. diff --git a/Help/variable/CMAKE_LANG_COMPILER_FRONTEND_VARIANT.rst b/Help/variable/CMAKE_LANG_COMPILER_FRONTEND_VARIANT.rst index 128b1fb..a414463 100644 --- a/Help/variable/CMAKE_LANG_COMPILER_FRONTEND_VARIANT.rst +++ b/Help/variable/CMAKE_LANG_COMPILER_FRONTEND_VARIANT.rst @@ -16,3 +16,7 @@ the compiler whose frontend it resembles. .. note:: In other words, this variable describes what command line options and language extensions the compiler frontend expects. + +.. versionchanged:: 3.26 + This variable is set for ``GNU``, ``MSVC``, and ``AppleClang`` + compilers that have only one frontend variant. diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 73c775a..7f392c8 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -243,8 +243,12 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) else() set(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT "GNU") endif() - elseif("x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xFujitsuClang") + elseif("x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xGNU" + OR "x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xAppleClang" + OR "x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xFujitsuClang") set(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT "GNU") + elseif("x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xMSVC") + set(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT "MSVC") else() set(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT "") endif() diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 0cea239..72a9a4c 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1380,7 +1380,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret) set(_Boost_TIMER_DEPENDENCIES chrono) set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono atomic) set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) - if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.81.0 AND NOT Boost_NO_WARN_NEW_VERSIONS) + if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.82.0 AND NOT Boost_NO_WARN_NEW_VERSIONS) message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets") endif() endif() @@ -1466,6 +1466,7 @@ function(_Boost_COMPONENT_HEADERS component _hdrs) set(_Boost_TIMER_HEADERS "boost/timer.hpp") set(_Boost_TYPE_ERASURE_HEADERS "boost/type_erasure/config.hpp") set(_Boost_UNIT_TEST_FRAMEWORK_HEADERS "boost/test/framework.hpp") + set(_Boost_URL_HEADERS "boost/url.hpp") set(_Boost_WAVE_HEADERS "boost/wave.hpp") set(_Boost_WSERIALIZATION_HEADERS "boost/archive/text_wiarchive.hpp") set(_Boost_BZIP2_HEADERS "boost/iostreams/filter/bzip2.hpp") @@ -1653,7 +1654,7 @@ else() # _Boost_COMPONENT_HEADERS. See the instructions at the top of # _Boost_COMPONENT_DEPENDENCIES. set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} - "1.80.0" "1.80" "1.79.0" "1.79" + "1.81.0" "1.81" "1.80.0" "1.80" "1.79.0" "1.79" "1.78.0" "1.78" "1.77.0" "1.77" "1.76.0" "1.76" "1.75.0" "1.75" "1.74.0" "1.74" "1.73.0" "1.73" "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" diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 07a9adf..fe8f198 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -1187,7 +1187,7 @@ function(matlab_add_mex) ${${prefix}_UNPARSED_ARGUMENTS}) endif() - target_include_directories(${${prefix}_NAME} PRIVATE ${Matlab_INCLUDE_DIRS}) + target_include_directories(${${prefix}_NAME} SYSTEM PRIVATE ${Matlab_INCLUDE_DIRS}) if(NOT ${prefix}_NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES) if(Matlab_HAS_CPP_API) diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake index 2d46dbd..15dacbb 100644 --- a/Modules/FindwxWindows.cmake +++ b/Modules/FindwxWindows.cmake @@ -648,7 +648,7 @@ else() # set CXXFLAGS to be fed into CMAKE_CXX_FLAGS by the user: if (HAVE_ISYSTEM) # does the compiler support -isystem ? - if (NOT APPLE) # -isystem seem sto be unsuppored on Mac + if (NOT APPLE) # -isystem seems to be unsupported on Mac if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX ) if (CMAKE_CXX_COMPILER MATCHES g\\+\\+) set(CMAKE_WXWINDOWS_CXX_FLAGS "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} --cxxflags|sed -e s/-I/-isystem/g`") diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7a73883..8aad0ae 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 25) -set(CMake_VERSION_PATCH 20230109) +set(CMake_VERSION_PATCH 20230112) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index a39c52f..643bc6f 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -165,7 +165,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) if (outstring) { *outstring = "--build-and-test requires that the generator " "be provided using the --build-generator " - "command line option. "; + "command line option.\n"; } return 1; } diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx index 69c5793..84161f9 100644 --- a/Source/CTest/cmCTestCurl.cxx +++ b/Source/CTest/cmCTestCurl.cxx @@ -112,7 +112,7 @@ bool cmCTestCurl::UploadFile(std::string const& local_file, { response.clear(); if (!this->InitCurl()) { - cmCTestLog(this->CTest, ERROR_MESSAGE, "Initialization of curl failed"); + cmCTestLog(this->CTest, ERROR_MESSAGE, "Initialization of curl failed\n"); return false; } /* enable uploading */ @@ -176,7 +176,7 @@ bool cmCTestCurl::UploadFile(std::string const& local_file, if (response.empty()) { cmCTestLog(this->CTest, ERROR_MESSAGE, "No response from server.\n" - << curlDebug); + << curlDebug << std::endl); return false; } return true; @@ -192,7 +192,7 @@ bool cmCTestCurl::HttpRequest(std::string const& url, << "fields " << fields << "\n", this->Quiet); if (!this->InitCurl()) { - cmCTestLog(this->CTest, ERROR_MESSAGE, "Initialization of curl failed"); + cmCTestLog(this->CTest, ERROR_MESSAGE, "Initialization of curl failed\n"); return false; } curl_easy_setopt(this->Curl, CURLOPT_POST, 1); diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx index 1c292c7..dd69968 100644 --- a/Source/CTest/cmCTestGenericHandler.cxx +++ b/Source/CTest/cmCTestGenericHandler.cxx @@ -26,13 +26,8 @@ namespace { * is non-null, otherwise removing key `op` (if it exists). */ void SetMapValue(cmCTestGenericHandler::t_StringToString& map, - const std::string& op, const char* value) + const std::string& op, const std::string& value) { - if (!value) { - map.erase(op); - return; - } - map[op] = value; } void SetMapValue(cmCTestGenericHandler::t_StringToString& map, @@ -47,7 +42,8 @@ void SetMapValue(cmCTestGenericHandler::t_StringToString& map, } } -void cmCTestGenericHandler::SetOption(const std::string& op, const char* value) +void cmCTestGenericHandler::SetOption(const std::string& op, + const std::string& value) { SetMapValue(this->Options, op, value); } @@ -57,7 +53,7 @@ void cmCTestGenericHandler::SetOption(const std::string& op, cmValue value) } void cmCTestGenericHandler::SetPersistentOption(const std::string& op, - const char* value) + const std::string& value) { this->SetOption(op, value); SetMapValue(this->PersistentOptions, op, value); @@ -121,7 +117,7 @@ bool cmCTestGenericHandler::StartResultingXML(cmCTest::Part part, if (!name) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create resulting XML file without providing the name" - << std::endl;); + << std::endl); return false; } std::ostringstream ostr; @@ -157,7 +153,7 @@ bool cmCTestGenericHandler::StartLogFile(const char* name, if (!name) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create log file without providing the name" - << std::endl;); + << std::endl); return false; } std::ostringstream ostr; diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h index 4bdb9c2..a0197d6 100644 --- a/Source/CTest/cmCTestGenericHandler.h +++ b/Source/CTest/cmCTestGenericHandler.h @@ -85,17 +85,9 @@ public: * so calling a single-getter for a key that has only been set * as a multi-value will return nullptr. */ - void SetPersistentOption(const std::string& op, const char* value); - void SetPersistentOption(const std::string& op, const std::string& value) - { - this->SetPersistentOption(op, cmValue(value)); - } + void SetPersistentOption(const std::string& op, const std::string& value); void SetPersistentOption(const std::string& op, cmValue value); - void SetOption(const std::string& op, const char* value); - void SetOption(const std::string& op, const std::string& value) - { - this->SetOption(op, cmValue(value)); - } + void SetOption(const std::string& op, const std::string& value); void SetOption(const std::string& op, cmValue value); cmValue GetOption(const std::string& op); diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx index be952cd..c377d68 100644 --- a/Source/CTest/cmCTestHandlerCommand.cxx +++ b/Source/CTest/cmCTestHandlerCommand.cxx @@ -143,7 +143,7 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args, "BuildDirectory", cmSystemTools::CollapseFullPath(bdir), this->Quiet); } else { cmCTestLog(this->CTest, ERROR_MESSAGE, - "CTEST_BINARY_DIRECTORY not set" << std::endl;); + "CTEST_BINARY_DIRECTORY not set" << std::endl); } } if (!this->Source.empty()) { @@ -164,7 +164,7 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args, this->CTest->SetCTestConfiguration("ChangeId", *changeId, this->Quiet); } - cmCTestLog(this->CTest, DEBUG, "Initialize handler" << std::endl;); + cmCTestLog(this->CTest, DEBUG, "Initialize handler" << std::endl); cmCTestGenericHandler* handler = this->InitializeHandler(); if (!handler) { cmCTestLog(this->CTest, ERROR_MESSAGE, diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index f60a1e9..b00fa73 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -410,7 +410,8 @@ cmCTest::Part cmCTest::GetPartFromName(const std::string& name) return PartCount; } -int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command) +int cmCTest::Initialize(const std::string& binary_dir, + cmCTestStartCommand* command) { bool quiet = false; if (command && command->ShouldBeQuiet()) { @@ -683,7 +684,7 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command) this->SetCTestConfigurationFromCMakeVariable( mf, "BuildName", "CTEST_BUILD_NAME", command->ShouldBeQuiet()); - if (!this->Initialize(bld_dir.c_str(), command)) { + if (!this->Initialize(bld_dir, command)) { return false; } cmCTestOptionalLog(this, OUTPUT, @@ -943,8 +944,7 @@ int cmCTest::ProcessSteps() (this->GetRemainingTimeAllowed() > std::chrono::minutes(2))) { cmCTestUpdateHandler* uphandler = this->GetUpdateHandler(); uphandler->SetPersistentOption( - "SourceDirectory", - this->GetCTestConfiguration("SourceDirectory").c_str()); + "SourceDirectory", this->GetCTestConfiguration("SourceDirectory")); update_count = uphandler->ProcessHandler(); if (update_count < 0) { res |= cmCTest::UPDATE_ERRORS; @@ -1691,7 +1691,7 @@ bool cmCTest::SubmitExtraFiles(std::vector<std::string> const& files) if (!cmSystemTools::FileExists(file)) { cmCTestLog(this, ERROR_MESSAGE, "Cannot find extra file: " << file << " to submit." - << std::endl;); + << std::endl); return false; } this->AddSubmitFile(PartExtraFiles, file); @@ -2139,9 +2139,9 @@ bool cmCTest::HandleCommandLineArguments(size_t& i, i < args.size() - 1) { i++; this->GetTestHandler()->SetPersistentOption("TestsToRunInformation", - args[i].c_str()); + args[i]); this->GetMemCheckHandler()->SetPersistentOption("TestsToRunInformation", - args[i].c_str()); + args[i]); } else if (this->CheckArgument(arg, "-U"_s, "--union")) { this->GetTestHandler()->SetPersistentOption("UseUnion", "true"); this->GetMemCheckHandler()->SetPersistentOption("UseUnion", "true"); @@ -2149,9 +2149,9 @@ bool cmCTest::HandleCommandLineArguments(size_t& i, i < args.size() - 1) { i++; this->GetTestHandler()->SetPersistentOption("IncludeRegularExpression", - args[i].c_str()); + args[i]); this->GetMemCheckHandler()->SetPersistentOption("IncludeRegularExpression", - args[i].c_str()); + args[i]); } else if (this->CheckArgument(arg, "-L"_s, "--label-regex") && i < args.size() - 1) { i++; @@ -2172,41 +2172,40 @@ bool cmCTest::HandleCommandLineArguments(size_t& i, i < args.size() - 1) { i++; this->GetTestHandler()->SetPersistentOption("ExcludeRegularExpression", - args[i].c_str()); + args[i]); this->GetMemCheckHandler()->SetPersistentOption("ExcludeRegularExpression", - args[i].c_str()); + args[i]); } else if (this->CheckArgument(arg, "-FA"_s, "--fixture-exclude-any") && i < args.size() - 1) { i++; this->GetTestHandler()->SetPersistentOption( - "ExcludeFixtureRegularExpression", args[i].c_str()); + "ExcludeFixtureRegularExpression", args[i]); this->GetMemCheckHandler()->SetPersistentOption( - "ExcludeFixtureRegularExpression", args[i].c_str()); + "ExcludeFixtureRegularExpression", args[i]); } else if (this->CheckArgument(arg, "-FS"_s, "--fixture-exclude-setup") && i < args.size() - 1) { i++; this->GetTestHandler()->SetPersistentOption( - "ExcludeFixtureSetupRegularExpression", args[i].c_str()); + "ExcludeFixtureSetupRegularExpression", args[i]); this->GetMemCheckHandler()->SetPersistentOption( - "ExcludeFixtureSetupRegularExpression", args[i].c_str()); + "ExcludeFixtureSetupRegularExpression", args[i]); } else if (this->CheckArgument(arg, "-FC"_s, "--fixture-exclude-cleanup") && i < args.size() - 1) { i++; this->GetTestHandler()->SetPersistentOption( - "ExcludeFixtureCleanupRegularExpression", args[i].c_str()); + "ExcludeFixtureCleanupRegularExpression", args[i]); this->GetMemCheckHandler()->SetPersistentOption( - "ExcludeFixtureCleanupRegularExpression", args[i].c_str()); + "ExcludeFixtureCleanupRegularExpression", args[i]); } else if (this->CheckArgument(arg, "--resource-spec-file"_s) && i < args.size() - 1) { i++; - this->GetTestHandler()->SetPersistentOption("ResourceSpecFile", - args[i].c_str()); + this->GetTestHandler()->SetPersistentOption("ResourceSpecFile", args[i]); this->GetMemCheckHandler()->SetPersistentOption("ResourceSpecFile", - args[i].c_str()); + args[i]); } else if (this->CheckArgument(arg, "--rerun-failed"_s)) { @@ -2314,8 +2313,8 @@ void cmCTest::SetPersistentOptionIfNotEmpty(const std::string& value, const std::string& optionName) { if (!value.empty()) { - this->GetTestHandler()->SetPersistentOption(optionName, value.c_str()); - this->GetMemCheckHandler()->SetPersistentOption(optionName, value.c_str()); + this->GetTestHandler()->SetPersistentOption(optionName, value); + this->GetMemCheckHandler()->SetPersistentOption(optionName, value); } } @@ -2758,8 +2757,9 @@ int cmCTest::Run(std::vector<std::string>& args, std::string* output) // intended for (auto& handler : this->Impl->GetTestingHandlers()) { if (!handler->ProcessCommandLineArguments(arg, i, args)) { - cmCTestLog(this, ERROR_MESSAGE, - "Problem parsing command line arguments within a handler"); + cmCTestLog( + this, ERROR_MESSAGE, + "Problem parsing command line arguments within a handler\n"); return 0; } } @@ -2903,7 +2903,7 @@ int cmCTest::ExecuteTests() } } - if (!this->Initialize(workDir.c_str(), nullptr)) { + if (!this->Initialize(workDir, nullptr)) { res = 12; cmCTestLog(this, ERROR_MESSAGE, "Problem initializing the dashboard." << std::endl); diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 0017b3e..9a8d5a6 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -481,7 +481,7 @@ private: * call this method because it sets CTEST_COMMAND to drive a build * through the ctest command line. */ - int Initialize(const char* binary_dir, cmCTestStartCommand* command); + int Initialize(const std::string& binary_dir, cmCTestStartCommand* command); /** parse the option after -D and convert it into the appropriate steps */ bool AddTestsForDashboardType(std::string& targ); diff --git a/Utilities/cmzlib/cm_zlib_mangle.h b/Utilities/cmzlib/cm_zlib_mangle.h index 1461e2f..d75405d 100644 --- a/Utilities/cmzlib/cm_zlib_mangle.h +++ b/Utilities/cmzlib/cm_zlib_mangle.h @@ -19,7 +19,7 @@ # define compress2 cm_zlib_compress2 # define compressBound cm_zlib_compressBound #endif -#define crc32 z_crc32 +#define crc32 cm_zlib_crc32 #define crc32_combine cm_zlib_crc32_combine #define crc32_combine64 cm_zlib_crc32_combine64 #define crc32_z cm_zlib_crc32_z @@ -126,7 +126,6 @@ #define crc32_combine_gen cm_zlib_crc32_combine_gen #define crc32_combine_op cm_zlib_crc32_combine_op #define gz_error cm_zlib_gz_error -#define z_crc32 cm_zlib_z_crc32 #define z_errmsg cm_zlib_z_errmsg #endif |