diff options
87 files changed, 544 insertions, 259 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5258ab3..8f26508 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1100,3 +1100,40 @@ u:windows-i386-package: - k:windows-i386-package needs: - k:windows-i386-package + +b:windows-arm64-package: + extends: + - .windows_arm64_package + - .cmake_build_windows + - .cmake_build_package_artifacts + - .windows_tags_nonconcurrent_vs2022_arm64 + - .run_only_for_package + dependencies: + - p:doc-package + needs: + - p:doc-package + variables: + CMAKE_CI_ARTIFACTS_NAME: "artifacts-windows-arm64-build" + +k:windows-arm64-package: + extends: + - .windows_arm64_package + - .cmake_package_windows + - .cmake_release_artifacts + - .windows_tags_nonconcurrent_vs2022_arm64 + - .run_only_for_package + dependencies: + - b:windows-arm64-package + needs: + - b:windows-arm64-package + variables: + CMAKE_CI_ARTIFACTS_NAME: "artifacts-windows-arm64" + +u:windows-arm64-package: + extends: + - .rsync_upload_package + - .run_only_for_package + dependencies: + - k:windows-arm64-package + needs: + - k:windows-arm64-package diff --git a/.gitlab/artifacts.yml b/.gitlab/artifacts.yml index e0c8252..1b5384f 100644 --- a/.gitlab/artifacts.yml +++ b/.gitlab/artifacts.yml @@ -105,6 +105,7 @@ - build/cmake-*-macos*-universal.* - build/cmake-*-windows-x86_64.* - build/cmake-*-windows-i386.* + - build/cmake-*-windows-arm64.* # Any source packages made. - build/cmake-*.tar.gz - build/cmake-*.zip diff --git a/.gitlab/ci/cmake.ps1 b/.gitlab/ci/cmake.ps1 index fd8e29f..bea3286 100755 --- a/.gitlab/ci/cmake.ps1 +++ b/.gitlab/ci/cmake.ps1 @@ -1,7 +1,7 @@ $erroractionpreference = "stop" -$version = "3.23.1" -$sha256sum = "9B509CC4EB7191DC128CFA3F2170036F9CBC7D9D5F93FF7FAFC5B2D77B3B40DC" +$version = "3.24.0-rc1" +$sha256sum = "8D075F5C663263713008FB77E31956C808D3A30074C3655F16EB76A0800F99D6" $filename = "cmake-$version-windows-x86_64" $tarball = "$filename.zip" diff --git a/.gitlab/ci/cmake.sh b/.gitlab/ci/cmake.sh index 7d964ee..0d52e19 100755 --- a/.gitlab/ci/cmake.sh +++ b/.gitlab/ci/cmake.sh @@ -2,22 +2,22 @@ set -e -readonly version="3.23.1" +readonly version="3.24.0-rc1" case "$(uname -s)-$(uname -m)" in Linux-x86_64) shatool="sha256sum" - sha256sum="f3c654b2e226b9d43369e0bd8487c51618d4dbe5a1af929dd32af7e6ca432d60" + sha256sum="183ff011a2177d0a683e81d645d02c0ed8ff790449158522928ef069775091cc" platform="linux-x86_64" ;; Linux-aarch64) shatool="sha256sum" - sha256sum="74062efddeb935bce3d33694a4db534cef9a650f77a9a153a9f217d9dc385c75" + sha256sum="f26642d5bc503de6bf7dd2d06afb8777d5862aa44e556cdf4155fec60e534d04" platform="linux-aarch64" ;; Darwin-*) shatool="shasum -a 256" - sha256sum="f794ed92ccb4e9b6619a77328f313497d7decf8fb7e047ba35a348b838e0e1e2" + sha256sum="417fde30f2cf96f53eaf27b1e510924ce441f0449e53974f2156cb19d32978b9" platform="macos-universal" ;; *) diff --git a/.gitlab/ci/configure_windows_arm64_package.cmake b/.gitlab/ci/configure_windows_arm64_package.cmake new file mode 100644 index 0000000..f3ce853 --- /dev/null +++ b/.gitlab/ci/configure_windows_arm64_package.cmake @@ -0,0 +1,16 @@ +# CPack package file name component for this platform. +set(CPACK_SYSTEM_NAME "windows-arm64" CACHE STRING "") + +# Tell WiX to package for this architecture. +set(CPACK_WIX_ARCHITECTURE "arm64" CACHE STRING "") + +# Use APIs from at most Windows 7 +set(CMAKE_C_FLAGS "-D_WIN32_WINNT=0x0A00 -DNTDDI_VERSION=0x0A000008" CACHE STRING "") +set(CMAKE_CXX_FLAGS "-GR -EHsc -D_WIN32_WINNT=0x0A00 -DNTDDI_VERSION=0x0A000008" CACHE STRING "") +set(CMAKE_EXE_LINKER_FLAGS "-machine:arm64 -subsystem:console,6.02" CACHE STRING "") + +set(qt "$ENV{CI_PROJECT_DIR}/.gitlab/qt") +set(qt_host "$ENV{CI_PROJECT_DIR}/.gitlab/qt-host") +set(CMAKE_PREFIX_PATH "${qt};${qt_host}" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_package_common.cmake") diff --git a/.gitlab/ci/configure_windows_i386_package.cmake b/.gitlab/ci/configure_windows_i386_package.cmake index 279f5cf..65e1dcb 100644 --- a/.gitlab/ci/configure_windows_i386_package.cmake +++ b/.gitlab/ci/configure_windows_i386_package.cmake @@ -6,4 +6,5 @@ set(CMAKE_C_FLAGS "-D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000" CACHE STRING set(CMAKE_CXX_FLAGS "-GR -EHsc -D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000" CACHE STRING "") set(CMAKE_EXE_LINKER_FLAGS "-machine:x86 -subsystem:console,6.01" CACHE STRING "") +include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_package_common_x86.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_package_common.cmake") diff --git a/.gitlab/ci/configure_windows_package_common.cmake b/.gitlab/ci/configure_windows_package_common.cmake index cea0ba0..46c0a3e 100644 --- a/.gitlab/ci/configure_windows_package_common.cmake +++ b/.gitlab/ci/configure_windows_package_common.cmake @@ -6,22 +6,9 @@ set(CMAKE_DOC_DIR "doc/cmake" CACHE STRING "") # Link C/C++ runtime library statically. set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" CACHE STRING "") -# Enable cmake-gui with static qt plugins +# Enable cmake-gui. set(BUILD_QtDialog "TRUE" CACHE BOOL "") set(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL "3" CACHE STRING "") -set(qt "$ENV{CI_PROJECT_DIR}/.gitlab/qt") -set(CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES - ${qt}/plugins/platforms/qwindows.lib - ${qt}/plugins/styles/qwindowsvistastyle.lib - ${qt}/lib/Qt5EventDispatcherSupport.lib - ${qt}/lib/Qt5FontDatabaseSupport.lib - ${qt}/lib/Qt5ThemeSupport.lib - ${qt}/lib/qtfreetype.lib - ${qt}/lib/qtlibpng.lib - imm32.lib - wtsapi32.lib - CACHE STRING "") -set(CMAKE_PREFIX_PATH "${qt}" CACHE STRING "") # Disable ccmake. set(BUILD_CursesDialog "OFF" CACHE BOOL "") diff --git a/.gitlab/ci/configure_windows_package_common_x86.cmake b/.gitlab/ci/configure_windows_package_common_x86.cmake new file mode 100644 index 0000000..a8b5928 --- /dev/null +++ b/.gitlab/ci/configure_windows_package_common_x86.cmake @@ -0,0 +1,13 @@ +set(qt "$ENV{CI_PROJECT_DIR}/.gitlab/qt") +set(CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES + ${qt}/plugins/platforms/qwindows.lib + ${qt}/plugins/styles/qwindowsvistastyle.lib + ${qt}/lib/Qt5EventDispatcherSupport.lib + ${qt}/lib/Qt5FontDatabaseSupport.lib + ${qt}/lib/Qt5ThemeSupport.lib + ${qt}/lib/qtfreetype.lib + ${qt}/lib/qtlibpng.lib + imm32.lib + wtsapi32.lib + CACHE STRING "") +set(CMAKE_PREFIX_PATH "${qt}" CACHE STRING "") diff --git a/.gitlab/ci/configure_windows_x86_64_package.cmake b/.gitlab/ci/configure_windows_x86_64_package.cmake index b7bba85..3a141a7 100644 --- a/.gitlab/ci/configure_windows_x86_64_package.cmake +++ b/.gitlab/ci/configure_windows_x86_64_package.cmake @@ -6,4 +6,5 @@ set(CMAKE_C_FLAGS "-D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000" CACHE STRING set(CMAKE_CXX_FLAGS "-GR -EHsc -D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000" CACHE STRING "") set(CMAKE_EXE_LINKER_FLAGS "-machine:x64 -subsystem:console,6.01" CACHE STRING "") +include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_package_common_x86.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_package_common.cmake") diff --git a/.gitlab/ci/download_qt.cmake b/.gitlab/ci/download_qt.cmake index 90c2187..b02ceb0 100644 --- a/.gitlab/ci/download_qt.cmake +++ b/.gitlab/ci/download_qt.cmake @@ -12,17 +12,22 @@ set(qt_version_nodot "${qt_version_major}${qt_version_minor}${qt_version_patch}" # Files needed to download. set(qt_files) if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows.*package") + set(qt_url_root "https://cmake.org/files/dependencies") + set(qt_url_path "") if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows_x86_64_package") list(APPEND qt_files "qt-5.12.1-win-x86_64-msvc_v142-1.zip") set(qt_subdir "qt-5.12.1-win-x86_64-msvc_v142-1") elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows_i386_package") list(APPEND qt_files "qt-5.12.1-win-i386-msvc_v142-1.zip") set(qt_subdir "qt-5.12.1-win-i386-msvc_v142-1") + elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows_arm64_package") + list(APPEND qt_files "qt-6.3.0-win-arm64-msvc_v143-1.zip") + set(qt_subdir "qt-6.3.0-win-arm64-msvc_v143-1") + list(APPEND qt_files "qt-6.3.0-win-x86_64-msvc_v143-1.zip") + set(qt_host_subdir "qt-6.3.0-win-x86_64-msvc_v143-1") else () message(FATAL_ERROR "Unknown arch to use for Qt") endif() - set(qt_url_root "https://cmake.org/files/dependencies") - set(qt_url_path "") elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows") # Determine the ABI to fetch for Qt. if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2015") @@ -146,3 +151,8 @@ endif () file(RENAME ".gitlab/${qt_subdir}" ".gitlab/qt") +if(qt_host_subdir) + file(RENAME + ".gitlab/${qt_host_subdir}" + ".gitlab/qt-host") +endif() diff --git a/.gitlab/ci/download_qt_hashes.cmake b/.gitlab/ci/download_qt_hashes.cmake index d19d284..c4b0bd1 100644 --- a/.gitlab/ci/download_qt_hashes.cmake +++ b/.gitlab/ci/download_qt_hashes.cmake @@ -15,3 +15,7 @@ set("qt-5.15.2-macosx10.13-x86_64-arm64.tar.xz_hash" 7b9463a01c8beeee5bf8d01c70d set("qt-5.12.1-win-i386-msvc_v142-1.zip_hash" aa78711fdaa5d9b146bf7ddcf15983f9fbb3f995462f2d043f8cca74b40ddd11) set("qt-5.12.1-win-x86_64-msvc_v142-1.zip_hash" c2fc068b9dac40bb420e28e1ee15ce4f2ccfc866d767f3b99b6bb435b7c4f44b) + +set("qt-6.3.0-win-arm64-msvc_v143-1.zip_hash" 0950db703b0d305ff2855c69d8553e10036ebe5c65f95c4a850cf1f703410798) +set("qt-6.3.0-win-i386-msvc_v143-1.zip_hash" 52d68ff3b8a045222b59ebe12878b8597e97019c2ae930e846ec816ce6df18db) +set("qt-6.3.0-win-x86_64-msvc_v143-1.zip_hash" 3764a3076cf2331ec28bd88d6bddcab1578b1bb1329157bfe33ea02c2c63c6e1) diff --git a/.gitlab/ci/wix.ps1 b/.gitlab/ci/wix.ps1 index a9322b6..a690533 100755 --- a/.gitlab/ci/wix.ps1 +++ b/.gitlab/ci/wix.ps1 @@ -1,14 +1,14 @@ $erroractionpreference = "stop" -$release = "wix3112rtm" -$sha256sum = "2C1888D5D1DBA377FC7FA14444CF556963747FF9A0A289A3599CF09DA03B9E2E" -$filename = "wix311-binaries" +$release = "v3.14.0.6526" +$sha256sum = "4C89898DF3BCAB13E12F7CA54399C35AD273475AD2CB6284611D00AE2D063C2C" +$filename = "wix314-binaries" $tarball = "$filename.zip" $outdir = $pwd.Path $outdir = "$outdir\.gitlab" $ProgressPreference = 'SilentlyContinue' -Invoke-WebRequest -Uri "https://github.com/wixtoolset/wix3/releases/download/$release/$tarball" -OutFile "$outdir\$tarball" +Invoke-WebRequest -Uri "https://wixtoolset.org/downloads/$release/$tarball" -OutFile "$outdir\$tarball" $hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256 if ($hash.Hash -ne $sha256sum) { exit 1 diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml index d55035f..b9b91fb 100644 --- a/.gitlab/os-windows.yml +++ b/.gitlab/os-windows.yml @@ -43,6 +43,12 @@ VCVARSPLATFORM: "x86" VCVARSVERSION: "14.32.31326" +.windows_vcvarsall_vs2022_x64_arm64: + variables: + VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat" + VCVARSPLATFORM: "x64_arm64" + VCVARSVERSION: "14.32.31326" + .windows_vs2022_x64_ninja: extends: - .windows_build_ninja @@ -75,6 +81,14 @@ variables: CMAKE_CONFIGURATION: windows_i386_package +.windows_arm64_package: + extends: + - .windows_package + - .windows_vcvarsall_vs2022_x64_arm64 + + variables: + CMAKE_CONFIGURATION: windows_arm64_package + ### External testing .windows_vs2022_x64: @@ -221,6 +235,15 @@ - msvc-19.32 - nonconcurrent +.windows_tags_nonconcurrent_vs2022_arm64: + tags: + - cmake # Since this is a bare runner, pin to a project. + - windows + - shell + - vs2022 + - msvc-19.32-arm64 + - nonconcurrent + .windows_tags_concurrent_vs2022: tags: - cmake # Since this is a bare runner, pin to a project. diff --git a/CMakeLists.txt b/CMakeLists.txt index 9de5338..4d9d3ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -cmake_minimum_required(VERSION 3.13...3.22 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13...3.23 FATAL_ERROR) set(CMAKE_USER_MAKE_RULES_OVERRIDE_C ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideC.cmake) set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideCXX.cmake) diff --git a/Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst b/Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst index 6718ecf..ca3a769 100644 --- a/Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst +++ b/Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst @@ -13,9 +13,16 @@ the current directory scope or above, see the The variable value will be true in: * the top-level directory of the project -* the top-level directory of an external project added by :module:`ExternalProject` +* the top-level directory of an external project added by + :module:`ExternalProject` +* a directory added by :command:`add_subdirectory` that does not also contain + a :command:`project` call +* a directory added by :command:`FetchContent_MakeAvailable`, + if the fetched content does not contain a :command:`project` call The variable value will be false in: -* a directory added by :command:`add_subdirectory` -* a directory added by :module:`FetchContent` +* a directory added by :command:`add_subdirectory` that also contains + a :command:`project` call +* a directory added by :command:`FetchContent_MakeAvailable`, + if the fetched content contains a :command:`project` call diff --git a/Help/variable/PROJECT_IS_TOP_LEVEL.rst b/Help/variable/PROJECT_IS_TOP_LEVEL.rst index 7e40704..871dfdb 100644 --- a/Help/variable/PROJECT_IS_TOP_LEVEL.rst +++ b/Help/variable/PROJECT_IS_TOP_LEVEL.rst @@ -24,9 +24,16 @@ options: The variable value will be true in: * the top-level directory of the project -* the top-level directory of an external project added by :module:`ExternalProject` +* the top-level directory of an external project added by + :module:`ExternalProject` +* a directory added by :command:`add_subdirectory` that does not also contain + a :command:`project` call +* a directory added by :command:`FetchContent_MakeAvailable`, + if the fetched content does not contain a :command:`project` call The variable value will be false in: -* a directory added by :command:`add_subdirectory` -* a directory added by :module:`FetchContent` +* a directory added by :command:`add_subdirectory` that also contains + a :command:`project` call +* a directory added by :command:`FetchContent_MakeAvailable`, + if the fetched content contains a :command:`project` call diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index af5f798..470111f 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -799,7 +799,9 @@ if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}") unset(CUDA_VERSION CACHE) endif() -if(NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${CUDA_TOOLKIT_TARGET_DIR_INTERNAL}") +# If CUDA_TOOLKIT_TARGET_DIR exists, check if it has changed. +if(DEFINED CUDA_TOOLKIT_TARGET_DIR + AND NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${CUDA_TOOLKIT_TARGET_DIR_INTERNAL}") cuda_unset_include_and_libraries() endif() diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 09743d6..963a7cf 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 24) -set(CMake_VERSION_PATCH 20220613) +set(CMake_VERSION_PATCH 20220615) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 594f408..5dae966 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -151,7 +151,7 @@ bool cmCPackWIXGenerator::RunLightCommand(std::string const& objectFiles) int cmCPackWIXGenerator::PackageFiles() { - if (!PackageFilesImpl() || cmSystemTools::GetErrorOccuredFlag()) { + if (!PackageFilesImpl() || cmSystemTools::GetErrorOccurredFlag()) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Fatal WiX Generator Error" << std::endl); return false; diff --git a/Source/CPack/cmCPackExternalGenerator.cxx b/Source/CPack/cmCPackExternalGenerator.cxx index 157ee1d..edd8490 100644 --- a/Source/CPack/cmCPackExternalGenerator.cxx +++ b/Source/CPack/cmCPackExternalGenerator.cxx @@ -73,7 +73,7 @@ int cmCPackExternalGenerator::PackageFiles() bool res = this->MakefileMap->ReadListFile(packageScript); - if (cmSystemTools::GetErrorOccuredFlag() || !res) { + if (cmSystemTools::GetErrorOccurredFlag() || !res) { return 0; } diff --git a/Source/CPack/cmCPackFreeBSDGenerator.cxx b/Source/CPack/cmCPackFreeBSDGenerator.cxx index b5d41fc..607d797 100644 --- a/Source/CPack/cmCPackFreeBSDGenerator.cxx +++ b/Source/CPack/cmCPackFreeBSDGenerator.cxx @@ -290,7 +290,7 @@ void cmCPackFreeBSDGenerator::write_manifest_fields( cmExpandedList(var_lookup("CPACK_FREEBSD_PACKAGE_LICENSE")); std::string licenselogic("single"); if (licenses.empty()) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } else if (licenses.size() > 1) { licenselogic = var_lookup("CPACK_FREEBSD_PACKAGE_LICENSE_LOGIC"); } diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 7ddb103..90d15f8 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -525,7 +525,7 @@ int cmCPackGenerator::InstallProjectViaInstallScript( this->SetOptionIfNotSet("CMAKE_CURRENT_SOURCE_DIR", tempInstallDirectory); bool res = this->MakefileMap->ReadListFile(installScript); - if (cmSystemTools::GetErrorOccuredFlag() || !res) { + if (cmSystemTools::GetErrorOccurredFlag() || !res) { return 0; } } @@ -973,7 +973,7 @@ int cmCPackGenerator::InstallCMakeProject( } } } - if (cmSystemTools::GetErrorOccuredFlag() || !res) { + if (cmSystemTools::GetErrorOccurredFlag() || !res) { return 0; } return 1; @@ -985,7 +985,7 @@ bool cmCPackGenerator::ReadListFile(const char* moduleName) std::string fullPath = this->MakefileMap->GetModulesFile(moduleName); retval = this->MakefileMap->ReadListFile(fullPath); // include FATAL_ERROR and ERROR in the return status - retval = retval && (!cmSystemTools::GetErrorOccuredFlag()); + retval = retval && (!cmSystemTools::GetErrorOccurredFlag()); return retval; } @@ -1117,7 +1117,7 @@ int cmCPackGenerator::DoPackage() this->MakefileMap->SetPolicyVersion(cmVersion::GetCMakeVersion(), std::string()); - if (!this->PackageFiles() || cmSystemTools::GetErrorOccuredFlag()) { + if (!this->PackageFiles() || cmSystemTools::GetErrorOccurredFlag()) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem compressing the directory" << std::endl); return 0; @@ -1214,7 +1214,7 @@ int cmCPackGenerator::Initialize(const std::string& name, cmMakefile* mf) mf->ReadListFile(config); } int result = this->InitializeInternal(); - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { return 0; } diff --git a/Source/CPack/cmCPackLog.cxx b/Source/CPack/cmCPackLog.cxx index 49e4113..d37531b 100644 --- a/Source/CPack/cmCPackLog.cxx +++ b/Source/CPack/cmCPackLog.cxx @@ -159,6 +159,6 @@ void cmCPackLog::Log(int tag, const char* file, int line, const char* msg, } if (error) { - cmSystemTools::SetErrorOccured(); + cmSystemTools::SetErrorOccurred(); } } diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 6c6d0ca..221f7dd 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -473,7 +473,7 @@ int main(int argc, char const* const* argv) return doc.PrintRequestedDocumentation(std::cout) ? 0 : 1; } - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { return 1; } diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index e09b4dd..a39c52f 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -44,9 +44,9 @@ int cmCTestBuildAndTestHandler::ProcessHandler() { this->Output.clear(); std::string output; - cmSystemTools::ResetErrorOccuredFlag(); + cmSystemTools::ResetErrorOccurredFlag(); int retv = this->RunCMakeAndTest(&this->Output); - cmSystemTools::ResetErrorOccuredFlag(); + cmSystemTools::ResetErrorOccurredFlag(); return retv; } diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx index 6e7c9e1..71787ea 100644 --- a/Source/CTest/cmCTestBuildCommand.cxx +++ b/Source/CTest/cmCTestBuildCommand.cxx @@ -84,7 +84,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler() std::string e = cmStrCat("could not create generator named \"", *cmakeGeneratorName, '"'); this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return nullptr; } } diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx index 9800192..1c292c7 100644 --- a/Source/CTest/cmCTestGenericHandler.cxx +++ b/Source/CTest/cmCTestGenericHandler.cxx @@ -137,7 +137,7 @@ bool cmCTestGenericHandler::StartResultingXML(cmCTest::Part part, "maybe you forgot to call ctest_start() before calling " "ctest_configure()." << std::endl); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } if (!this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(), ostr.str(), diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx index ea8feaa..5494d20 100644 --- a/Source/CTest/cmCTestHandlerCommand.cxx +++ b/Source/CTest/cmCTestHandlerCommand.cxx @@ -29,8 +29,8 @@ class SaveRestoreErrorState public: SaveRestoreErrorState() { - this->InitialErrorState = cmSystemTools::GetErrorOccuredFlag(); - cmSystemTools::ResetErrorOccuredFlag(); // rest the error state + this->InitialErrorState = cmSystemTools::GetErrorOccurredFlag(); + cmSystemTools::ResetErrorOccurredFlag(); // rest the error state this->CaptureCMakeErrorValue = false; } // if the function has a CAPTURE_CMAKE_ERROR then we should restore @@ -44,21 +44,21 @@ public: // otherwise leave it be what it is if (!this->CaptureCMakeErrorValue) { if (this->InitialErrorState) { - cmSystemTools::SetErrorOccured(); + cmSystemTools::SetErrorOccurred(); } return; } // if we have saved the error in a return variable // then put things back exactly like they were - bool currentState = cmSystemTools::GetErrorOccuredFlag(); + bool currentState = cmSystemTools::GetErrorOccurredFlag(); // if the state changed during this command we need // to handle it, if not then nothing needs to be done if (currentState != this->InitialErrorState) { // restore the initial error state if (this->InitialErrorState) { - cmSystemTools::SetErrorOccured(); + cmSystemTools::SetErrorOccurred(); } else { - cmSystemTools::ResetErrorOccuredFlag(); + cmSystemTools::ResetErrorOccurredFlag(); } } } @@ -212,7 +212,7 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args, // log the error message if there was an error if (captureCMakeError) { const char* returnString = "0"; - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { returnString = "-1"; std::string const& err = status.GetError(); // print out the error if it is not "unknown error" which means diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 16c0a0e..5a66f82 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -277,7 +277,7 @@ void cmCTestScriptHandler::CreateCMake() int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg) { // Reset the error flag so that the script is read in no matter what - cmSystemTools::ResetErrorOccuredFlag(); + cmSystemTools::ResetErrorOccurredFlag(); // if the argument has a , in it then it needs to be broken into the fist // argument (which is the script) and the second argument which will be @@ -341,7 +341,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg) std::string systemFile = this->Makefile->GetModulesFile("CTestScriptMode.cmake"); if (!this->Makefile->ReadListFile(systemFile) || - cmSystemTools::GetErrorOccuredFlag()) { + cmSystemTools::GetErrorOccurredFlag()) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read:" << systemFile << "\n"); return 2; @@ -356,10 +356,10 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg) // finally read in the script if (!this->Makefile->ReadListFile(script) || - cmSystemTools::GetErrorOccuredFlag()) { + cmSystemTools::GetErrorOccurredFlag()) { // Reset the error flag so that it can run more than // one script with an error when you use ctest_run_script. - cmSystemTools::ResetErrorOccuredFlag(); + cmSystemTools::ResetErrorOccurredFlag(); return 2; } diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 248533a..d1fad62 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1818,7 +1818,7 @@ bool cmCTestTestHandler::GetListOfTests() if (!mf.ReadListFile(testFilename)) { return false; } - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { // SEND_ERROR or FATAL_ERROR in CTestTestfile or TEST_INCLUDE_FILES return false; } diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 5a8e40f..a1b2149 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -494,21 +494,21 @@ int cmCursesMainForm::Configure(int noconfigure) if (retVal != 0 || this->HasNonStatusOutputs) { // see if there was an error - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { this->OkToGenerate = false; } int xx; int yy; getmaxyx(stdscr, yy, xx); const char* title = "Configure produced the following output"; - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { title = "Configure failed with the following output"; } cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm( this->Outputs, title, cmCursesLongMessageForm::ScrollBehavior::ScrollDown); // reset error condition - cmSystemTools::ResetErrorOccuredFlag(); + cmSystemTools::ResetErrorOccurredFlag(); CurrentForm = msgs; msgs->Render(1, 1, xx, yy); msgs->HandleInput(); @@ -547,16 +547,16 @@ int cmCursesMainForm::Generate() if (retVal != 0 || this->HasNonStatusOutputs) { // see if there was an error - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { this->OkToGenerate = false; } // reset error condition - cmSystemTools::ResetErrorOccuredFlag(); + cmSystemTools::ResetErrorOccurredFlag(); int xx; int yy; getmaxyx(stdscr, yy, xx); const char* title = "Generate produced the following output"; - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { title = "Generate failed with the following output"; } cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm( diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 5420d8d..6b3cb9f 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -252,7 +252,7 @@ void QCMake::configure() this->CMakeInstance->PreLoadCMakeFiles(); InterruptFlag = 0; - cmSystemTools::ResetErrorOccuredFlag(); + cmSystemTools::ResetErrorOccurredFlag(); err = this->CMakeInstance->Configure(); @@ -277,7 +277,7 @@ void QCMake::generate() #endif InterruptFlag = 0; - cmSystemTools::ResetErrorOccuredFlag(); + cmSystemTools::ResetErrorOccurredFlag(); err = this->CMakeInstance->Generate(); @@ -297,7 +297,7 @@ void QCMake::open() #endif InterruptFlag = 0; - cmSystemTools::ResetErrorOccuredFlag(); + cmSystemTools::ResetErrorOccurredFlag(); auto successful = this->CMakeInstance->Open(this->BinaryDirectory.toStdString(), false); diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx b/Source/cmCMakeHostSystemInformationCommand.cxx index 2a019b1..0750eea 100644 --- a/Source/cmCMakeHostSystemInformationCommand.cxx +++ b/Source/cmCMakeHostSystemInformationCommand.cxx @@ -338,7 +338,7 @@ std::map<std::string, std::string> GetOSReleaseVariables( // include FATAL_ERROR and ERROR in the return status if (!makefile.ReadListFile(script) || - cmSystemTools::GetErrorOccuredFlag()) { + cmSystemTools::GetErrorOccurredFlag()) { // Ok, no worries... go try the next script. continue; } diff --git a/Source/cmCMakeLanguageCommand.cxx b/Source/cmCMakeLanguageCommand.cxx index 7d05e88..a2aaa2a 100644 --- a/Source/cmCMakeLanguageCommand.cxx +++ b/Source/cmCMakeLanguageCommand.cxx @@ -29,7 +29,7 @@ namespace { bool FatalError(cmExecutionStatus& status, std::string const& error) { status.SetError(error); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } diff --git a/Source/cmCMakeMinimumRequired.cxx b/Source/cmCMakeMinimumRequired.cxx index 1b03873..c6a0c9a 100644 --- a/Source/cmCMakeMinimumRequired.cxx +++ b/Source/cmCMakeMinimumRequired.cxx @@ -103,7 +103,7 @@ bool cmCMakeMinimumRequired(std::vector<std::string> const& args, << " or higher is required. You are running version " << cmVersion::GetCMakeVersion(); status.GetMakefile().IssueMessage(MessageType::FATAL_ERROR, e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 9638a72..66507a7 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1391,7 +1391,7 @@ void cmCTest::StartXML(cmXMLWriter& xml, bool append) "Current Tag empty, this may mean" " NightlStartTime was not set correctly." << std::endl); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } // find out about the system @@ -3022,17 +3022,17 @@ int cmCTest::ReadCustomConfigurationFileTree(const std::string& dir, cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: " << fname << std::endl); - bool erroroc = cmSystemTools::GetErrorOccuredFlag(); - cmSystemTools::ResetErrorOccuredFlag(); + bool erroroc = cmSystemTools::GetErrorOccurredFlag(); + cmSystemTools::ResetErrorOccurredFlag(); - if (!mf->ReadListFile(fname) || cmSystemTools::GetErrorOccuredFlag()) { + if (!mf->ReadListFile(fname) || cmSystemTools::GetErrorOccurredFlag()) { cmCTestLog(this, ERROR_MESSAGE, "Problem reading custom configuration: " << fname << std::endl); } found = true; if (erroroc) { - cmSystemTools::SetErrorOccured(); + cmSystemTools::SetErrorOccurred(); } } @@ -3047,7 +3047,7 @@ int cmCTest::ReadCustomConfigurationFileTree(const std::string& dir, cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: " << file << std::endl); - if (!mf->ReadListFile(file) || cmSystemTools::GetErrorOccuredFlag()) { + if (!mf->ReadListFile(file) || cmSystemTools::GetErrorOccurredFlag()) { cmCTestLog(this, ERROR_MESSAGE, "Problem reading custom configuration: " << file << std::endl); @@ -3661,7 +3661,7 @@ void cmCTest::Log(int logType, const char* file, int line, const char* msg, cmCTestLogOutputFileLine(err); err << msg; err.flush(); - cmSystemTools::SetErrorOccured(); + cmSystemTools::SetErrorOccurred(); break; default: cmCTestLogOutputFileLine(out); diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx index 12b2925..bf83b38 100644 --- a/Source/cmConfigureFileCommand.cxx +++ b/Source/cmConfigureFileCommand.cxx @@ -53,7 +53,7 @@ bool cmConfigureFileCommand(std::vector<std::string> const& args, std::string e = "attempted to configure a file: " + outputFile + " into a source directory."; status.SetError(e); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } std::string errorMessage; diff --git a/Source/cmContinueCommand.cxx b/Source/cmContinueCommand.cxx index bb63dff..c6cecbe 100644 --- a/Source/cmContinueCommand.cxx +++ b/Source/cmContinueCommand.cxx @@ -16,7 +16,7 @@ bool cmContinueCommand(std::vector<std::string> const& args, MessageType::FATAL_ERROR, "A CONTINUE command was found outside of a " "proper FOREACH or WHILE loop scope."); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } @@ -27,7 +27,7 @@ bool cmContinueCommand(std::vector<std::string> const& args, MessageType::FATAL_ERROR, "The CONTINUE command does not accept any " "arguments."); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 27ff708..6776056 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -983,8 +983,8 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv, } } - bool erroroc = cmSystemTools::GetErrorOccuredFlag(); - cmSystemTools::ResetErrorOccuredFlag(); + bool erroroc = cmSystemTools::GetErrorOccurredFlag(); + cmSystemTools::ResetErrorOccurredFlag(); std::string output; // actually do the try compile now that everything is setup int res = this->Makefile->TryCompile( @@ -992,7 +992,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv, this->SrcFileSignature, cmake::NO_BUILD_PARALLEL_LEVEL, &cmakeFlags, output); if (erroroc) { - cmSystemTools::SetErrorOccured(); + cmSystemTools::SetErrorOccurred(); } // set the result var to the return value to indicate success or failure diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index 3b990cc..222ea80 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -113,7 +113,7 @@ bool cmExecuteProcessCommand(std::vector<std::string> const& args, if (!status.GetMakefile().CanIWriteThisFile(arguments.OutputFile)) { status.SetError("attempted to output into a file: " + arguments.OutputFile + " into a source directory."); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -438,7 +438,7 @@ bool cmExecuteProcessCommand(std::vector<std::string> const& args, } if (!ret) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } } @@ -470,7 +470,7 @@ bool cmExecuteProcessCommand(std::vector<std::string> const& args, break; } if (!ret) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } } diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 452eb99..c4cffa2 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -932,13 +932,13 @@ void cmExportFileGenerator::GeneratePolicyHeaderCode(std::ostream& os) // Isolate the file policy level. // Support CMake versions as far back as 2.6 but also support using NEW - // policy settings for up to CMake 3.22 (this upper limit may be reviewed + // policy settings for up to CMake 3.23 (this upper limit may be reviewed // and increased from time to time). This reduces the opportunity for CMake // warnings when an older export file is later used with newer CMake // versions. /* clang-format off */ os << "cmake_policy(PUSH)\n" - << "cmake_policy(VERSION 2.8.3...3.22)\n"; + << "cmake_policy(VERSION 2.8.3...3.23)\n"; /* clang-format on */ } diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 26006d8..7d05347 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -87,7 +87,7 @@ bool HandleWriteImpl(std::vector<std::string> const& args, bool append, std::string e = "attempted to write a file: " + fileName + " into a source directory."; status.SetError(e); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } std::string dir = cmSystemTools::GetFilenamePath(fileName); @@ -835,7 +835,7 @@ bool HandleMakeDirectoryCommand(std::vector<std::string> const& args, std::string e = "attempted to create a directory: " + *cdir + " into a source directory."; status.SetError(e); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } if (!cmSystemTools::MakeDirectory(*cdir)) { @@ -865,7 +865,7 @@ bool HandleTouchImpl(std::vector<std::string> const& args, bool create, std::string e = "attempted to touch a file: " + tfile + " in a source directory."; status.SetError(e); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } if (!cmSystemTools::Touch(tfile, create)) { @@ -2762,7 +2762,7 @@ bool HandleLockCommand(std::vector<std::string> const& args, MessageType::FATAL_ERROR, cmStrCat("directory\n \"", parentDir, "\"\ncreation failed (check permissions).")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } FILE* file = cmsys::SystemTools::Fopen(path, "w"); @@ -2771,7 +2771,7 @@ bool HandleLockCommand(std::vector<std::string> const& args, MessageType::FATAL_ERROR, cmStrCat("file\n \"", path, "\"\ncreation failed (check permissions).")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } fclose(file); @@ -2795,7 +2795,7 @@ bool HandleLockCommand(std::vector<std::string> const& args, fileLockResult = lockPool.LockProcessScope(path, timeout); break; default: - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } } @@ -2806,7 +2806,7 @@ bool HandleLockCommand(std::vector<std::string> const& args, status.GetMakefile().IssueMessage( MessageType::FATAL_ERROR, cmStrCat("error locking file\n \"", path, "\"\n", result, ".")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3041,7 +3041,7 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args, status.SetError( cmStrCat("GET_RUNTIME_DEPENDENCIES is not supported on system \"", platform, "\"")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3109,7 +3109,7 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args, auto argIt = unrecognizedArguments.begin(); if (argIt != unrecognizedArguments.end()) { status.SetError(cmStrCat("Unrecognized argument: \"", *argIt, "\"")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3131,7 +3131,7 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args, if (kwend != kwbegin) { status.SetError(cmStrCat("Keywords missing values:\n ", cmJoin(cmMakeRange(kwbegin, kwend), "\n "))); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3143,13 +3143,13 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args, std::move(parsedArgs.PostExcludeFiles), std::move(parsedArgs.PostExcludeFilesStrict)); if (!archive.Prepare()) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } if (!archive.GetRuntimeDependencies( parsedArgs.Executables, parsedArgs.Libraries, parsedArgs.Modules)) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3190,7 +3190,7 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args, e << "\n " << path; } status.SetError(e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } } @@ -3206,7 +3206,7 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args, e << "\n " << path; } status.SetError(e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } } @@ -3260,7 +3260,7 @@ bool HandleConfigureCommand(std::vector<std::string> const& args, if (argIt != unrecognizedArguments.end()) { status.SetError( cmStrCat("CONFIGURE Unrecognized argument: \"", *argIt, "\"")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3272,7 +3272,7 @@ bool HandleConfigureCommand(std::vector<std::string> const& args, e) != keywordsMissingArguments.end(); if (optionHasNoValue) { status.SetError(cmStrCat("CONFIGURE ", e, " option needs a value.")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } } @@ -3283,7 +3283,7 @@ bool HandleConfigureCommand(std::vector<std::string> const& args, parsedKeywords.end(); if (!optionGiven) { status.SetError(cmStrCat("CONFIGURE ", e, " option is mandatory.")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } } @@ -3398,7 +3398,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args, auto argIt = unrecognizedArguments.begin(); if (argIt != unrecognizedArguments.end()) { status.SetError(cmStrCat("Unrecognized argument: \"", *argIt, "\"")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3410,7 +3410,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args, if (kwend != kwbegin) { status.SetError(cmStrCat("Keywords missing values:\n ", cmJoin(cmMakeRange(kwbegin, kwend), "\n "))); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3422,7 +3422,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args, !cm::contains(knownFormats, parsedArgs.Format)) { status.SetError( cmStrCat("archive format ", parsedArgs.Format, " not supported")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3431,7 +3431,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args, cm::contains(zipFileFormats, parsedArgs.Format)) { status.SetError(cmStrCat("archive format ", parsedArgs.Format, " does not support COMPRESSION arguments")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3449,7 +3449,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args, } else if (!parsedArgs.Compression.empty()) { status.SetError(cmStrCat("compression type ", parsedArgs.Compression, " is not supported")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3460,7 +3460,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args, status.SetError(cmStrCat("compression level ", parsedArgs.CompressionLevel, " should be in range 0 to 9")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } compressionLevel = std::stoi(parsedArgs.CompressionLevel); @@ -3468,21 +3468,21 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args, status.SetError(cmStrCat("compression level ", parsedArgs.CompressionLevel, " should be in range 0 to 9")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } if (compress == cmSystemTools::TarCompressNone) { status.SetError(cmStrCat("compression level is not supported for " "compression \"None\"", parsedArgs.Compression)); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } } if (parsedArgs.Paths.empty()) { status.SetError("ARCHIVE_CREATE requires a non-empty list of PATHS"); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3490,7 +3490,7 @@ bool HandleArchiveCreateCommand(std::vector<std::string> const& args, parsedArgs.Verbose, parsedArgs.MTime, parsedArgs.Format, compressionLevel)) { status.SetError(cmStrCat("failed to compress: ", parsedArgs.Output)); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3526,7 +3526,7 @@ bool HandleArchiveExtractCommand(std::vector<std::string> const& args, auto argIt = unrecognizedArguments.begin(); if (argIt != unrecognizedArguments.end()) { status.SetError(cmStrCat("Unrecognized argument: \"", *argIt, "\"")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3537,7 +3537,7 @@ bool HandleArchiveExtractCommand(std::vector<std::string> const& args, if (kwend != kwbegin) { status.SetError(cmStrCat("Keywords missing values:\n ", cmJoin(cmMakeRange(kwbegin, kwend), "\n "))); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3547,7 +3547,7 @@ bool HandleArchiveExtractCommand(std::vector<std::string> const& args, if (!cmSystemTools::ListTar(inFile, parsedArgs.Patterns, parsedArgs.Verbose)) { status.SetError(cmStrCat("failed to list: ", inFile)); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } } else { @@ -3561,7 +3561,7 @@ bool HandleArchiveExtractCommand(std::vector<std::string> const& args, if (!cmSystemTools::MakeDirectory(destDir)) { status.SetError(cmStrCat("failed to create directory: ", destDir)); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3575,7 +3575,7 @@ bool HandleArchiveExtractCommand(std::vector<std::string> const& args, if (workdir.Failed()) { status.SetError( cmStrCat("failed to change working directory to: ", destDir)); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3585,7 +3585,7 @@ bool HandleArchiveExtractCommand(std::vector<std::string> const& args, : cmSystemTools::cmTarExtractTimestamps::Yes, parsedArgs.Verbose)) { status.SetError(cmStrCat("failed to extract: ", inFile)); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } } @@ -3599,7 +3599,7 @@ bool ValidateAndConvertPermissions(const std::vector<std::string>& permissions, for (const auto& i : permissions) { if (!cmFSPermissions::stringToModeT(i, perms)) { status.SetError(i + " is an invalid permission specifier"); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } } @@ -3611,7 +3611,7 @@ bool SetPermissions(const std::string& filename, const mode_t& perms, { if (!cmSystemTools::SetPermissions(filename, perms)) { status.SetError("Failed to set permissions for " + filename); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } return true; @@ -3651,7 +3651,7 @@ bool HandleChmodCommandImpl(std::vector<std::string> const& args, bool recurse, parsedArgs.DirectoryPermissions.empty()) // no permissions given { status.SetError("No permissions given"); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -3660,14 +3660,14 @@ bool HandleChmodCommandImpl(std::vector<std::string> const& args, bool recurse, { status.SetError("Remove either PERMISSIONS or FILE_PERMISSIONS or " "DIRECTORY_PERMISSIONS from the invocation"); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } if (!keywordsMissingValues.empty()) { for (const auto& i : keywordsMissingValues) { status.SetError(i + " is not given any arguments"); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } return false; } @@ -3706,7 +3706,7 @@ bool HandleChmodCommandImpl(std::vector<std::string> const& args, bool recurse, for (const auto& i : allPathEntries) { if (!(cmSystemTools::FileExists(i) || cmSystemTools::FileIsDirectory(i))) { status.SetError(cmStrCat("does not exist:\n ", i)); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 702d9fe..4dfbef9 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -516,7 +516,7 @@ void cmFindBase::StoreFindResult(const std::string& value) ? "files" : "names"), ": ", cmJoin(this->Names, ", "))); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } } diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index e41d5e4..8c6a0aa 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -1197,7 +1197,7 @@ bool cmFindPackageCommand::HandlePackageMode( : MessageType::WARNING, e.str()); if (this->Required) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } if (!aw.str().empty()) { diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index da82675..b9400c9 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -271,7 +271,7 @@ auto cmForEachFunctionBlocker::invoke( if (status.GetContinueInvoked()) { break; } - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { result.Restore = false; result.Break = true; break; @@ -382,13 +382,13 @@ bool TryParseInteger(cmExecutionStatus& status, const std::string& str, int& i) std::ostringstream e; e << "Invalid integer: '" << str << "'"; status.SetError(e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } catch (std::out_of_range&) { std::ostringstream e; e << "Integer out of range: '" << str << "'"; status.SetError(e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -452,7 +452,7 @@ bool cmForEachCommand(std::vector<std::string> const& args, status.SetError( cmStrCat("called with incorrect range specification: start ", start, ", stop ", stop, ", step ", step)); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index 9fae15a..8f3ed4d 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.cxx +++ b/Source/cmGeneratorExpressionEvaluationFile.cxx @@ -182,7 +182,7 @@ void cmGeneratorExpressionEvaluationFile::Generate(cmLocalGenerator* lg) for (std::string const& li : allConfigs) { this->Generate(lg, li, le, inputExpression.get(), outputFiles, this->Permissions); - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { return; } } diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ff148a2..8a7215b 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -433,7 +433,7 @@ cmValue cmGeneratorTarget::GetProperty(const std::string& prop) const cmTargetPropertyComputer::GetProperty(this, prop, *this->Makefile)) { return result; } - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { return nullptr; } return this->Target->GetProperty(prop); @@ -5698,7 +5698,7 @@ void checkPropertyConsistency(cmGeneratorTarget const* depender, if (emitted.insert(p).second) { getLinkInterfaceDependentProperty<PropertyType>(depender, p, config, t, nullptr); - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { return; } } @@ -5777,25 +5777,25 @@ void cmGeneratorTarget::CheckPropertyCompatibility( checkPropertyConsistency<bool>(this, dep.Target, strBool, emittedBools, config, BoolType, nullptr); - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { return; } checkPropertyConsistency<const char*>(this, dep.Target, strString, emittedStrings, config, StringType, nullptr); - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { return; } checkPropertyConsistency<const char*>(this, dep.Target, strNumMin, emittedMinNumbers, config, NumberMinType, nullptr); - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { return; } checkPropertyConsistency<const char*>(this, dep.Target, strNumMax, emittedMaxNumbers, config, NumberMaxType, nullptr); - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { return; } } diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx index abe7d32..1815c4d 100644 --- a/Source/cmGetFilenameComponentCommand.cxx +++ b/Source/cmGetFilenameComponentCommand.cxx @@ -15,7 +15,7 @@ bool cmGetFilenameComponentCommand(std::vector<std::string> const& args, { if (args.size() < 3) { status.SetError("called with incorrect number of arguments"); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -116,7 +116,7 @@ bool cmGetFilenameComponentCommand(std::vector<std::string> const& args, } else { std::string err = "unknown component " + args[2]; status.SetError(err); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 9d61de9..4cb541a 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -441,7 +441,7 @@ bool cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) << this->GetName() << "\". CMAKE_MAKE_PROGRAM is not set. You " << "probably need to select a different build tool."; cmSystemTools::Error(err.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } std::string makeProgram = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); @@ -531,7 +531,7 @@ void cmGlobalGenerator::EnableLanguage( if (languages.empty()) { cmSystemTools::Error("EnableLanguage must have a lang specified!"); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return; } @@ -543,7 +543,7 @@ void cmGlobalGenerator::EnableLanguage( << "' is currently being enabled. " "Recursive call not allowed."; mf->IssueMessage(MessageType::FATAL_ERROR, e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return; } } @@ -560,7 +560,7 @@ void cmGlobalGenerator::EnableLanguage( << " which is not enabled."; this->TryCompileOuterMakefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return; } } @@ -659,28 +659,28 @@ void cmGlobalGenerator::EnableLanguage( // Tell the generator about the instance, if any. std::string instance = mf->GetSafeDefinition("CMAKE_GENERATOR_INSTANCE"); if (!this->SetGeneratorInstance(instance, mf)) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return; } // Tell the generator about the target system. std::string system = mf->GetSafeDefinition("CMAKE_SYSTEM_NAME"); if (!this->SetSystemName(system, mf)) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return; } // Tell the generator about the platform, if any. std::string platform = mf->GetSafeDefinition("CMAKE_GENERATOR_PLATFORM"); if (!this->SetGeneratorPlatform(platform, mf)) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return; } // Tell the generator about the toolset, if any. std::string toolset = mf->GetSafeDefinition("CMAKE_GENERATOR_TOOLSET"); if (!this->SetGeneratorToolset(toolset, false, mf)) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return; } @@ -785,7 +785,7 @@ void cmGlobalGenerator::EnableLanguage( cmSystemTools::Error("Could not find cmake module file: " + determineCompiler); } - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { return; } needTestLanguage[lang] = true; @@ -954,7 +954,7 @@ void cmGlobalGenerator::EnableLanguage( } if (fatalError) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } for (std::string const& lang : cur_languages) { @@ -1374,7 +1374,7 @@ void cmGlobalGenerator::Configure() if (this->CMakeInstance->GetWorkingMode() == cmake::NORMAL_MODE) { std::ostringstream msg; - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { msg << "Configuring incomplete, errors occurred!"; const char* logs[] = { "CMakeOutput.log", "CMakeError.log", nullptr }; for (const char** log = logs; *log; ++log) { @@ -1645,7 +1645,7 @@ void cmGlobalGenerator::Generate() for (auto& buildExpSet : this->BuildExportSets) { if (!buildExpSet.second->GenerateImportFile()) { - if (!cmSystemTools::GetErrorOccuredFlag()) { + if (!cmSystemTools::GetErrorOccurredFlag()) { this->GetCMakeInstance()->IssueMessage(MessageType::FATAL_ERROR, "Could not write export file."); } diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index 55748cf..eabacf6 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -61,7 +61,7 @@ bool cmGlobalNMakeMakefileGenerator::FindMakeProgram(cmMakefile* mf) "'\n" "failed with:\n ", err)); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } cmsys::RegularExpression regex( diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 3726aa4..acaed36 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -604,7 +604,7 @@ void cmGlobalNinjaGenerator::Generate() this->WriteUnknownExplicitDependencies(*this->GetCommonFileStream()); this->WriteBuiltinTargets(*this->GetCommonFileStream()); - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { this->RulesFileStream->setstate(std::ios::failbit); for (auto const& config : this->Makefiles[0]->GetGeneratorConfigs( cmMakefile::IncludeEmptyConfig)) { @@ -651,7 +651,7 @@ void cmGlobalNinjaGenerator::CleanMetaData() "'\n" "failed with:\n ", error)); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } }; @@ -710,7 +710,7 @@ bool cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf) "'\n" "failed with:\n ", error)); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } this->NinjaVersion = cmTrimWhitespace(version); @@ -790,7 +790,7 @@ void cmGlobalNinjaGenerator::CheckNinjaCodePage() "'\n" "failed with:\n ", error)); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } else if (result == 0) { std::istringstream outputStream(output); std::string line; @@ -837,7 +837,7 @@ bool cmGlobalNinjaGenerator::CheckLanguages( mf->IssueMessage(MessageType::FATAL_ERROR, "multiple values for CMAKE_OSX_ARCHITECTURES not " "supported with Swift"); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } } @@ -870,7 +870,7 @@ bool cmGlobalNinjaGenerator::CheckCxxModuleSupport() ; /* clang-format on */ this->GetCMakeInstance()->IssueMessage(MessageType::FATAL_ERROR, e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } return false; } @@ -891,7 +891,7 @@ bool cmGlobalNinjaGenerator::CheckFortran(cmMakefile* mf) const ; /* clang-format on */ mf->IssueMessage(MessageType::FATAL_ERROR, e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -912,7 +912,7 @@ bool cmGlobalNinjaGenerator::CheckISPC(cmMakefile* mf) const ; /* clang-format on */ mf->IssueMessage(MessageType::FATAL_ERROR, e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 35448ee..155efde 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -254,7 +254,7 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset( "that is not an absolute path to an existing directory."; /* clang-format on */ mf->IssueMessage(MessageType::FATAL_ERROR, e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -955,7 +955,7 @@ bool cmGlobalVisualStudio10Generator::FindVCTargetsPath(cmMakefile* mf) if (!cmSystemTools::MakeDirectory(wd)) { std::string e = "Failed to make directory:\n " + wd; mf->IssueMessage(MessageType::FATAL_ERROR, e); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -1086,7 +1086,7 @@ bool cmGlobalVisualStudio10Generator::FindVCTargetsPath(cmMakefile* mf) e << "Exit code: " << ret << "\n"; } mf->IssueMessage(MessageType::FATAL_ERROR, e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } this->VCTargetsPath = regex.match(1); @@ -1327,7 +1327,7 @@ bool cmGlobalVisualStudio10Generator::Find64BitTools(cmMakefile* mf) << " http://msdn.microsoft.com/en-us/windows/bb980924.aspx"; /* clang-format on */ mf->IssueMessage(MessageType::FATAL_ERROR, e.str().c_str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } } diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 1c10fb3..f7f7317 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -298,7 +298,7 @@ void cmGlobalVisualStudio7Generator::Generate() this->OutputSLNFile(); // If any solution or project files changed during the generation, // tell Visual Studio to reload them... - if (!cmSystemTools::GetErrorOccuredFlag() && + if (!cmSystemTools::GetErrorOccurredFlag() && !this->LocalGenerators.empty()) { this->CallVisualStudioMacro(MacroReload, GetSLNFile(this->LocalGenerators[0].get())); diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx index 1c05d36..fb76f7a 100644 --- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx +++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx @@ -885,7 +885,7 @@ cmGlobalVisualStudioVersionedGenerator::FindMSBuildCommandEarly(cmMakefile* mf) { std::string instance = mf->GetSafeDefinition("CMAKE_GENERATOR_INSTANCE"); if (!this->SetGeneratorInstance(instance, mf)) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return {}; } return this->cmGlobalVisualStudio14Generator::FindMSBuildCommandEarly(mf); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index d53c3d5..d5783ef 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -556,7 +556,7 @@ void cmGlobalXCodeGenerator::AddExtraIDETargets() void cmGlobalXCodeGenerator::Generate() { this->cmGlobalGenerator::Generate(); - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { return; } diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index 9cd1943..0da72b1 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -81,7 +81,7 @@ bool cmIfFunctionBlocker::Replay(std::vector<cmListFileFunction> functions, mf.GetCMakeInstance()->IssueMessage( MessageType::FATAL_ERROR, "A duplicate ELSE command was found inside an IF block.", elseBT); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } @@ -103,7 +103,7 @@ bool cmIfFunctionBlocker::Replay(std::vector<cmListFileFunction> functions, mf.GetCMakeInstance()->IssueMessage( MessageType::FATAL_ERROR, "An ELSEIF command was found after an ELSE command.", elseifBT); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } @@ -133,7 +133,7 @@ bool cmIfFunctionBlocker::Replay(std::vector<cmListFileFunction> functions, cmStrCat(cmIfCommandError(expandedArguments), errorString); mf.GetCMakeInstance()->IssueMessage(messType, err, elseifBT); if (messType == MessageType::FATAL_ERROR) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } } @@ -188,7 +188,7 @@ bool cmIfCommand(std::vector<cmListFileArgument> const& args, cmStrCat("if ", cmIfCommandError(expandedArguments), errorString); if (status == MessageType::FATAL_ERROR) { makefile.IssueMessage(MessageType::FATAL_ERROR, err); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } makefile.IssueMessage(status, err); diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx index 7b0320c..9242344 100644 --- a/Source/cmIncludeCommand.cxx +++ b/Source/cmIncludeCommand.cxx @@ -177,7 +177,7 @@ bool cmIncludeCommand(std::vector<std::string> const& args, resultVarName, readit ? fname_abs.c_str() : "NOTFOUND"); } - if (!optional && !readit && !cmSystemTools::GetFatalErrorOccured()) { + if (!optional && !readit && !cmSystemTools::GetFatalErrorOccurred()) { std::string m = cmStrCat("could not load requested file:\n ", fname); status.SetError(m); return false; diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 4485ac6..91157cb 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -78,7 +78,7 @@ void cmListFileParser::IssueError(const std::string& text) const cmListFileBacktrace lfbt = this->Backtrace; lfbt = lfbt.Push(lfc); this->Messenger->IssueMessage(MessageType::FATAL_ERROR, text, lfbt); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } bool cmListFileParser::ParseFile(const char* filename) @@ -174,7 +174,7 @@ bool cmListFileParser::Parse() MessageType::FATAL_ERROR, "Flow control statements are not properly nested.", this->Backtrace.Push(*badNesting)); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index 2080b40..1f18ff2 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -91,7 +91,7 @@ struct LoadedCommandImpl : cmLoadedCommandInfo { if (this->Destructor) { SignalHandlerGuard guard(this->Name); -#if defined(__NVCOMPILER) +#if defined(__NVCOMPILER) || defined(__LCC__) static_cast<void>(guard); // convince compiler var is used #endif this->Destructor(this); @@ -107,7 +107,7 @@ struct LoadedCommandImpl : cmLoadedCommandInfo int DoInitialPass(cmMakefile* mf, int argc, char* argv[]) { SignalHandlerGuard guard(this->Name); -#if defined(__NVCOMPILER) +#if defined(__NVCOMPILER) || defined(__LCC__) static_cast<void>(guard); // convince compiler var is used #endif return this->InitialPass(this, mf, argc, argv); @@ -116,7 +116,7 @@ struct LoadedCommandImpl : cmLoadedCommandInfo void DoFinalPass(cmMakefile* mf) { SignalHandlerGuard guard(this->Name); -#if defined(__NVCOMPILER) +#if defined(__NVCOMPILER) || defined(__LCC__) static_cast<void>(guard); // convince compiler var is used #endif this->FinalPass(this, mf); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 7928a46..67c8bf2 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -399,7 +399,7 @@ void cmLocalGenerator::ProcessEvaluationFiles( { for (const auto& geef : this->Makefile->GetEvaluationFiles()) { geef->Generate(this); - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { return; } std::vector<std::string> files = geef->GetFiles(); @@ -1982,7 +1982,7 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags, "CMAKE_" + lang + "_COMPILER_ID") == "MSVC" || this->Makefile->GetSafeDefinition( "CMAKE_" + lang + "_SIMULATE_ID") == "MSVC") && - !cmSystemTools::GetErrorOccuredFlag()) { + !cmSystemTools::GetErrorOccurredFlag()) { // The compiler uses the MSVC ABI so it needs a known runtime library. this->IssueMessage(MessageType::FATAL_ERROR, "MSVC_RUNTIME_LIBRARY value '" + @@ -2013,7 +2013,7 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags, "CMAKE_" + lang + "_COMPILER_ID") == "OpenWatcom" || this->Makefile->GetSafeDefinition( "CMAKE_" + lang + "_SIMULATE_ID") == "OpenWatcom") && - !cmSystemTools::GetErrorOccuredFlag()) { + !cmSystemTools::GetErrorOccurredFlag()) { // The compiler uses the Watcom ABI so it needs a known runtime // library. this->IssueMessage(MessageType::FATAL_ERROR, diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 97a275a..e125470 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1332,7 +1332,7 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies( { // read in the target info file if (!this->Makefile->ReadListFile(tgtInfo) || - cmSystemTools::GetErrorOccuredFlag()) { + cmSystemTools::GetErrorOccurredFlag()) { cmSystemTools::Error("Target DependInfo.cmake file not found"); } @@ -1497,7 +1497,7 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies( cmStrCat(this->GetCurrentBinaryDirectory(), "/CMakeFiles/CMakeDirectoryInformation.cmake"); if (mf->ReadListFile(dirInfoFile) && - !cmSystemTools::GetErrorOccuredFlag()) { + !cmSystemTools::GetErrorOccurredFlag()) { haveDirectoryInfo = true; } } diff --git a/Source/cmMakeDirectoryCommand.cxx b/Source/cmMakeDirectoryCommand.cxx index cdde6f9..ec8b826 100644 --- a/Source/cmMakeDirectoryCommand.cxx +++ b/Source/cmMakeDirectoryCommand.cxx @@ -18,7 +18,7 @@ bool cmMakeDirectoryCommand(std::vector<std::string> const& args, std::string e = "attempted to create a directory: " + args[0] + " into a source directory."; status.SetError(e); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } cmSystemTools::MakeDirectory(args[0]); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index b5df459..97a3db9 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -417,7 +417,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, std::ostringstream e; e << "Maximum recursion depth of " << depth << " exceeded"; this->IssueMessage(MessageType::FATAL_ERROR, e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } @@ -425,7 +425,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, if (cmState::Command command = this->GetState()->GetCommandByExactName(lff.LowerCaseName())) { // Decide whether to invoke the command. - if (!cmSystemTools::GetFatalErrorOccured()) { + if (!cmSystemTools::GetFatalErrorOccurred()) { // if trace is enabled, print out invoke information if (this->GetCMakeInstance()->GetTrace()) { this->PrintCommandTrace(lff, this->Backtrace); @@ -442,17 +442,17 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, } result = false; if (this->GetCMakeInstance()->GetWorkingMode() != cmake::NORMAL_MODE) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } } } } else { - if (!cmSystemTools::GetFatalErrorOccured()) { + if (!cmSystemTools::GetFatalErrorOccurred()) { std::string error = cmStrCat("Unknown CMake command \"", lff.OriginalName(), "\"."); this->IssueMessage(MessageType::FATAL_ERROR, error); result = false; - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } } @@ -610,7 +610,7 @@ bool cmMakefile::ReadDependentFile(const std::string& filename, } this->RunListFile(listFile, filenametoread); - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { incScope.Quiet(); } return true; @@ -711,7 +711,7 @@ bool cmMakefile::ReadListFile(const std::string& filename) } this->RunListFile(listFile, filenametoread); - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { scope.Quiet(); } return true; @@ -732,7 +732,7 @@ bool cmMakefile::ReadListFileAsString(const std::string& content, } this->RunListFile(listFile, filenametoread); - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { scope.Quiet(); } return true; @@ -762,7 +762,7 @@ void cmMakefile::RunListFile(cmListFile const& listFile, for (size_t i = 0; i < numberFunctions; ++i) { cmExecutionStatus status(*this); this->ExecuteCommand(listFile.Functions[i], status); - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { break; } if (status.GetReturnInvoked()) { @@ -792,7 +792,7 @@ void cmMakefile::RunListFile(cmListFile const& listFile, cmExecutionStatus status(*this); this->ExecuteCommand(d.Command, status, std::move(id)); - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { break; } } @@ -838,7 +838,7 @@ void cmMakefile::EnforceDirectoryLevelRules() const // NEW behavior is to issue an error. this->GetCMakeInstance()->IssueMessage(MessageType::FATAL_ERROR, msg.str(), this->Backtrace); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); break; } } @@ -1685,7 +1685,7 @@ void cmMakefile::Configure() this->Defer = cm::make_unique<DeferCommands>(); this->RunListFile(listFile, currentStart, this->Defer.get()); this->Defer.reset(); - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { scope.Quiet(); } @@ -2618,7 +2618,7 @@ const std::string& cmMakefile::ExpandVariablesInString( // If it's an error in either case, just report the error... if (mtype != MessageType::LOG) { if (mtype == MessageType::FATAL_ERROR) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } this->IssueMessage(mtype, errorstr); } @@ -3282,7 +3282,7 @@ bool cmMakefile::ExpandArguments(std::vector<cmListFileArgument> const& inArgs, cmExpandList(value, outArgs); } } - return !cmSystemTools::GetFatalErrorOccured(); + return !cmSystemTools::GetFatalErrorOccurred(); } bool cmMakefile::ExpandArguments( @@ -3314,7 +3314,7 @@ bool cmMakefile::ExpandArguments( } } } - return !cmSystemTools::GetFatalErrorOccured(); + return !cmSystemTools::GetFatalErrorOccurred(); } void cmMakefile::AddFunctionBlocker(std::unique_ptr<cmFunctionBlocker> fb) @@ -3509,7 +3509,7 @@ int cmMakefile::TryCompile(const std::string& srcdir, this->IssueMessage(MessageType::FATAL_ERROR, "Failed to set working directory to " + bindir + " : " + std::strerror(workdir.GetLastResult())); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); this->IsSourceFileTryCompile = false; return 1; } @@ -3525,7 +3525,7 @@ int cmMakefile::TryCompile(const std::string& srcdir, "Global generator '" + this->GetGlobalGenerator()->GetName() + "' could not be created."); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); this->IsSourceFileTryCompile = false; return 1; } @@ -3597,7 +3597,7 @@ int cmMakefile::TryCompile(const std::string& srcdir, if (cm.Configure() != 0) { this->IssueMessage(MessageType::FATAL_ERROR, "Failed to configure test project build system."); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); this->IsSourceFileTryCompile = false; return 1; } @@ -3605,7 +3605,7 @@ int cmMakefile::TryCompile(const std::string& srcdir, if (cm.Generate() != 0) { this->IssueMessage(MessageType::FATAL_ERROR, "Failed to generate test project build system."); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); this->IsSourceFileTryCompile = false; return 1; } @@ -4431,7 +4431,7 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id, } // Deprecate old policies. - if (status == cmPolicies::OLD && id <= cmPolicies::CMP0097 && + if (status == cmPolicies::OLD && id <= cmPolicies::CMP0102 && !(this->GetCMakeInstance()->GetIsInTryCompile() && ( // Policies set by cmCoreTryCompile::TryCompileCode. diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx index c7bb9a7..cd57600 100644 --- a/Source/cmMessageCommand.cxx +++ b/Source/cmMessageCommand.cxx @@ -222,7 +222,7 @@ bool cmMessageCommand(std::vector<std::string> const& args, } if (fatal) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } return true; } diff --git a/Source/cmMessenger.cxx b/Source/cmMessenger.cxx index 6dd192e..333003b 100644 --- a/Source/cmMessenger.cxx +++ b/Source/cmMessenger.cxx @@ -143,7 +143,7 @@ static void displayMessage(MessageType t, std::ostringstream& msg) md.desiredColor = getMessageColor(t); if (t == MessageType::FATAL_ERROR || t == MessageType::INTERNAL_ERROR || t == MessageType::DEPRECATION_ERROR || t == MessageType::AUTHOR_ERROR) { - cmSystemTools::SetErrorOccured(); + cmSystemTools::SetErrorOccurred(); md.title = "Error"; cmSystemTools::Message(msg.str(), md); } else { diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index 9f3fd00..95f3e7e 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -127,7 +127,7 @@ bool cmParseArgumentsCommand(std::vector<std::string> const& args, status.GetMakefile().IssueMessage( MessageType::FATAL_ERROR, "PARSE_ARGV must be called with exactly 6 arguments."); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } parseFromArgV = true; @@ -136,7 +136,7 @@ bool cmParseArgumentsCommand(std::vector<std::string> const& args, status.GetMakefile().IssueMessage(MessageType::FATAL_ERROR, "PARSE_ARGV index '" + *argIter + "' is not an unsigned integer"); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } argIter++; // move past N @@ -190,7 +190,7 @@ bool cmParseArgumentsCommand(std::vector<std::string> const& args, "PARSE_ARGV called with ARGC='" + argc + "' that is not an unsigned integer"); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } for (unsigned long i = argvStart; i < count; ++i) { @@ -201,7 +201,7 @@ bool cmParseArgumentsCommand(std::vector<std::string> const& args, status.GetMakefile().IssueMessage(MessageType::FATAL_ERROR, "PARSE_ARGV called with " + argName.str() + " not set"); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } list.emplace_back(*arg); diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 03ae44e..da5f5e5 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -314,7 +314,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer, // Make sure the project does not use any ancient policies. if (!ancientPolicies.empty()) { DiagnoseAncientPolicies(ancientPolicies, majorVer, minorVer, patchVer, mf); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index 4b65fb9..249fe2d 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -102,7 +102,7 @@ bool cmProjectCommand(std::vector<std::string> const& args, if (haveLanguages) { mf.IssueMessage(MessageType::FATAL_ERROR, "LANGUAGES may be specified at most once."); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } haveLanguages = true; @@ -121,7 +121,7 @@ bool cmProjectCommand(std::vector<std::string> const& args, if (haveVersion) { mf.IssueMessage(MessageType::FATAL_ERROR, "VERSION may be specified at most once."); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } haveVersion = true; @@ -140,7 +140,7 @@ bool cmProjectCommand(std::vector<std::string> const& args, if (haveDescription) { mf.IssueMessage(MessageType::FATAL_ERROR, "DESCRIPTION may be specified at most once."); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } haveDescription = true; @@ -159,7 +159,7 @@ bool cmProjectCommand(std::vector<std::string> const& args, if (haveHomepage) { mf.IssueMessage(MessageType::FATAL_ERROR, "HOMEPAGE_URL may be specified at most once."); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } haveHomepage = true; @@ -200,7 +200,7 @@ bool cmProjectCommand(std::vector<std::string> const& args, mf.IssueMessage(MessageType::FATAL_ERROR, "project with VERSION, DESCRIPTION or HOMEPAGE_URL must " "use LANGUAGES before language names."); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } if (haveLanguages && languages.empty()) { @@ -214,7 +214,7 @@ bool cmProjectCommand(std::vector<std::string> const& args, if (cmp0048 == cmPolicies::OLD || cmp0048 == cmPolicies::WARN) { mf.IssueMessage(MessageType::FATAL_ERROR, "VERSION not allowed unless CMP0048 is set to NEW"); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } @@ -223,7 +223,7 @@ bool cmProjectCommand(std::vector<std::string> const& args, if (!vx.find(version)) { std::string e = R"(VERSION ")" + version + R"(" format invalid.)"; mf.IssueMessage(MessageType::FATAL_ERROR, e); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return true; } @@ -380,7 +380,7 @@ static bool IncludeByVariable(cmExecutionStatus& status, return true; } - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { return true; } diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index 6e8ada1..a7125b1 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -2789,7 +2789,7 @@ void cmQtAutoMocUicT::CreateParseJobs(SourceFileMapT const& sourceMap) std::string cmQtAutoMocUicT::CollapseFullPathTS(std::string const& path) const { std::lock_guard<std::mutex> guard(this->CMakeLibMutex_); -#if defined(__NVCOMPILER) +#if defined(__NVCOMPILER) || defined(__LCC__) static_cast<void>(guard); // convince compiler var is used #endif return cmSystemTools::CollapseFullPath(path, @@ -3031,7 +3031,7 @@ std::vector<std::string> cmQtAutoMocUicT::dependenciesFromDepFile( const char* filePath) { std::lock_guard<std::mutex> guard(this->CMakeLibMutex_); -#if defined(__NVCOMPILER) +#if defined(__NVCOMPILER) || defined(__LCC__) static_cast<void>(guard); // convince compiler var is used #endif auto const content = cmReadGccDepfile(filePath); diff --git a/Source/cmState.cxx b/Source/cmState.cxx index b753373..3d38e73 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -503,7 +503,7 @@ bool cmState::AddScriptedCommand(std::string const& name, BT<Command> command, cmStrCat("Built-in flow control command \"", sName, "\" cannot be overridden."), command.Backtrace); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 512a5fa..351386a 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -156,8 +156,8 @@ static int cm_archive_read_open_file(struct archive* a, const char* file, bool cmSystemTools::s_RunCommandHideConsole = false; bool cmSystemTools::s_DisableRunCommandOutput = false; -bool cmSystemTools::s_ErrorOccured = false; -bool cmSystemTools::s_FatalErrorOccured = false; +bool cmSystemTools::s_ErrorOccurred = false; +bool cmSystemTools::s_FatalErrorOccurred = false; bool cmSystemTools::s_ForceUnixPaths = false; // replace replace with with as many times as it shows up in source. @@ -212,7 +212,7 @@ std::string cmSystemTools::HelpFileName(cm::string_view str) void cmSystemTools::Error(const std::string& m) { std::string message = "CMake Error: " + m; - cmSystemTools::s_ErrorOccured = true; + cmSystemTools::s_ErrorOccurred = true; cmSystemTools::Message(message, "Error"); } diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 4865a4b..5f7a5ec 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -77,28 +77,28 @@ public: static bool GetInterruptFlag(); //! Return true if there was an error at any point. - static bool GetErrorOccuredFlag() + static bool GetErrorOccurredFlag() { - return cmSystemTools::s_ErrorOccured || - cmSystemTools::s_FatalErrorOccured || GetInterruptFlag(); + return cmSystemTools::s_ErrorOccurred || + cmSystemTools::s_FatalErrorOccurred || GetInterruptFlag(); } //! If this is set to true, cmake stops processing commands. - static void SetFatalErrorOccured() + static void SetFatalErrorOccurred() { - cmSystemTools::s_FatalErrorOccured = true; + cmSystemTools::s_FatalErrorOccurred = true; } - static void SetErrorOccured() { cmSystemTools::s_ErrorOccured = true; } + static void SetErrorOccurred() { cmSystemTools::s_ErrorOccurred = true; } //! Return true if there was an error at any point. - static bool GetFatalErrorOccured() + static bool GetFatalErrorOccurred() { - return cmSystemTools::s_FatalErrorOccured || GetInterruptFlag(); + return cmSystemTools::s_FatalErrorOccurred || GetInterruptFlag(); } //! Set the error occurred flag and fatal error back to false - static void ResetErrorOccuredFlag() + static void ResetErrorOccurredFlag() { - cmSystemTools::s_FatalErrorOccured = false; - cmSystemTools::s_ErrorOccured = false; + cmSystemTools::s_FatalErrorOccurred = false; + cmSystemTools::s_ErrorOccurred = false; } //! Return true if the path is a framework @@ -541,7 +541,7 @@ public: private: static bool s_ForceUnixPaths; static bool s_RunCommandHideConsole; - static bool s_ErrorOccured; - static bool s_FatalErrorOccured; + static bool s_ErrorOccurred; + static bool s_FatalErrorOccurred; static bool s_DisableRunCommandOutput; }; diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index e1a6c78..ba901d0 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -130,7 +130,7 @@ bool cmTargetLinkLibrariesCommand(std::vector<std::string> const& args, break; case MessageType::FATAL_ERROR: mf.IssueMessage(MessageType::FATAL_ERROR, e.str()); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); break; default: break; @@ -361,7 +361,7 @@ bool cmTargetLinkLibrariesCommand(std::vector<std::string> const& args, mf.IssueMessage(MessageType::FATAL_ERROR, cmStrCat("The \"", LinkLibraryTypeNames[llt], "\" argument must be followed by a library.")); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } const cmPolicies::PolicyStatus policy22Status = diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h index 82c6355..a14a3f0 100644 --- a/Source/cmTargetPropertyComputer.h +++ b/Source/cmTargetPropertyComputer.h @@ -23,7 +23,7 @@ public: if (cmValue loc = GetLocation(tgt, prop, mf)) { return loc; } - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { return nullptr; } if (prop == "SOURCES") { diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index 68d5a9a..fb94273 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -105,7 +105,7 @@ bool cmWhileFunctionBlocker::Replay(std::vector<cmListFileFunction> functions, if (status.GetContinueInvoked()) { break; } - if (cmSystemTools::GetFatalErrorOccured()) { + if (cmSystemTools::GetFatalErrorOccurred()) { return true; } } @@ -145,7 +145,7 @@ bool cmWhileFunctionBlocker::Replay(std::vector<cmListFileFunction> functions, } mf.GetCMakeInstance()->IssueMessage(messageType, err, whileBT); if (messageType == MessageType::FATAL_ERROR) { - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); } } diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx index 666ba87..8ed9ea7 100644 --- a/Source/cmWriteFileCommand.cxx +++ b/Source/cmWriteFileCommand.cxx @@ -38,7 +38,7 @@ bool cmWriteFileCommand(std::vector<std::string> const& args, std::string e = "attempted to write a file: " + fileName + " into a source directory."; status.SetError(e); - cmSystemTools::SetFatalErrorOccured(); + cmSystemTools::SetFatalErrorOccurred(); return false; } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index d9ae75a..e6fa219 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2002,7 +2002,7 @@ int cmake::HandleDeleteCacheVariables(const std::string& var) } cmSystemTools::Message(warning.str()); // avoid reconfigure if there were errors - if (!cmSystemTools::GetErrorOccuredFlag()) { + if (!cmSystemTools::GetErrorOccurredFlag()) { // re-run configure return this->Configure(); } @@ -2287,7 +2287,7 @@ int cmake::ActualConfigure() this->State->SaveVerificationScript(this->GetHomeOutputDirectory(), this->Messenger.get()); this->SaveCache(this->GetHomeOutputDirectory()); - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { return -1; } return 0; @@ -2401,7 +2401,7 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure) { // Process the arguments this->SetArgs(args); - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { return -1; } if (this->GetWorkingMode() == HELP_MODE) { @@ -2458,7 +2458,7 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure) // In script mode we terminate after running the script. if (this->GetWorkingMode() != NORMAL_MODE) { - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { return -1; } return 0; @@ -2532,7 +2532,7 @@ int cmake::Generate() if (this->WarnUnusedCli) { this->RunCheckForUnusedVariables(); } - if (cmSystemTools::GetErrorOccuredFlag()) { + if (cmSystemTools::GetErrorOccurredFlag()) { return -1; } // Save the cache again after a successful Generate so that any internal @@ -2892,7 +2892,7 @@ int cmake::CheckBuildSystem() cmGlobalGenerator gg(&cm); cmMakefile mf(&gg, cm.GetCurrentSnapshot()); if (!mf.ReadListFile(this->CheckBuildSystemArgument) || - cmSystemTools::GetErrorOccuredFlag()) { + cmSystemTools::GetErrorOccurredFlag()) { if (verbose) { std::ostringstream msg; msg << "Re-run cmake error reading : " << this->CheckBuildSystemArgument diff --git a/Tests/Fortran/myc.c b/Tests/Fortran/myc.c index 1a4d5a4..689d90c 100644 --- a/Tests/Fortran/myc.c +++ b/Tests/Fortran/myc.c @@ -1,5 +1,6 @@ #include "foo.h" extern void F_test_mod_sub(void); +extern void F_my_sub(void); extern void F_mysub(void); int myc(void) { diff --git a/Tests/RunCMake/CMP0102/CMP0102-OLD-stderr.txt b/Tests/RunCMake/CMP0102/CMP0102-OLD-stderr.txt new file mode 100644 index 0000000..5d09fcf --- /dev/null +++ b/Tests/RunCMake/CMP0102/CMP0102-OLD-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0102-OLD.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0102 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/CMakeRelease/FileTable-stdout.txt b/Tests/RunCMake/CMakeRelease/FileTable-stdout.txt index 37eb91e..2960eeb 100644 --- a/Tests/RunCMake/CMakeRelease/FileTable-stdout.txt +++ b/Tests/RunCMake/CMakeRelease/FileTable-stdout.txt @@ -17,6 +17,8 @@ "cmake-@version@-windows-i386\.zip" "cmake-@version@-windows-x86_64\.msi" "cmake-@version@-windows-x86_64\.zip" +"cmake-@version@-windows-arm64\.msi" +"cmake-@version@-windows-arm64\.zip" "cmake-@version@\.tar\.gz" "cmake-@version@\.zip" -- query: \.files\[\] \| select\(\.os\[\] \| \. == "source"\) \| \.name diff --git a/Tests/RunCMake/target_compile_options/CMP0101-BEFORE_keyword-stderr.txt b/Tests/RunCMake/target_compile_options/CMP0101-BEFORE_keyword-stderr.txt new file mode 100644 index 0000000..f04e43f --- /dev/null +++ b/Tests/RunCMake/target_compile_options/CMP0101-BEFORE_keyword-stderr.txt @@ -0,0 +1,10 @@ +^CMake Deprecation Warning at CMP0101-BEFORE_keyword.cmake:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0101 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt index b712c27..bc16350 100644 --- a/Utilities/Doxygen/CMakeLists.txt +++ b/Utilities/Doxygen/CMakeLists.txt @@ -3,7 +3,7 @@ if(NOT CMake_SOURCE_DIR) set(CMakeDeveloperReference_STANDALONE 1) - cmake_minimum_required(VERSION 3.13...3.22 FATAL_ERROR) + cmake_minimum_required(VERSION 3.13...3.23 FATAL_ERROR) get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH) get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH) include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake) diff --git a/Utilities/KWIML/test/test_int_format.h b/Utilities/KWIML/test/test_int_format.h index 2e0310c..e139bdb 100644 --- a/Utilities/KWIML/test/test_int_format.h +++ b/Utilities/KWIML/test/test_int_format.h @@ -24,6 +24,12 @@ # define STATIC_CAST(t,v) (t)(v) #endif +#if defined(_MSC_VER) && _MSC_VER < 1900 +# define SNPRINTF(buf, sz, fmt, x) sprintf(buf, fmt, x) +#else +# define SNPRINTF(buf, sz, fmt, x) snprintf(buf, sz, fmt, x) +#endif + #define VALUE(T, U) STATIC_CAST(T, STATIC_CAST(U, 0xab) << ((sizeof(T)-1)<<3)) #define TEST_C_(C, V, PRI, T, U) \ @@ -48,7 +54,7 @@ { \ T const x = VALUE(T, U); \ char const* str = STR; \ - sprintf(buf, "%" KWIML_INT_PRI##PRI, x); \ + SNPRINTF(buf, sizeof(buf), "%" KWIML_INT_PRI##PRI, x); \ printf(LANG "KWIML_INT_PRI" #PRI ":" \ " expected [%s], got [%s]", str, buf); \ if(strcmp(str, buf) == 0) \ diff --git a/Utilities/Release/files-v1.json.in b/Utilities/Release/files-v1.json.in index aa6b15d..2f860d2 100644 --- a/Utilities/Release/files-v1.json.in +++ b/Utilities/Release/files-v1.json.in @@ -84,6 +84,18 @@ "name": "cmake-@version@-windows-x86_64.zip" }, { + "os": ["windows", "Windows"], + "architecture": ["arm64"], + "class": "installer", + "name": "cmake-@version@-windows-arm64.msi" + }, + { + "os": ["windows", "Windows"], + "architecture": ["arm64"], + "class": "archive", + "name": "cmake-@version@-windows-arm64.zip" + }, + { "os": ["source"], "architecture": [], "class": "archive", diff --git a/Utilities/Release/files-v1.rst b/Utilities/Release/files-v1.rst index ceebecc..f0064e8 100644 --- a/Utilities/Release/files-v1.rst +++ b/Utilities/Release/files-v1.rst @@ -76,7 +76,7 @@ The members are: Source packages have an empty list of architectures (``[]``). Binary packages have a non-empty list of architectures, with at least one name matching the output of ``uname -m`` on corresponding hosts. - On Windows, architecture names include ``x86_64`` and ``i386``. + On Windows, architecture names include ``x86_64``, ``i386``, and ``arm64``. On macOS, universal binary packages list all architectures, e.g. ``["arm64","x86_64"]``. diff --git a/Utilities/Release/win/qt-6.3.0-win-msvc.ps1 b/Utilities/Release/win/qt-6.3.0-win-msvc.ps1 new file mode 100755 index 0000000..265b26e --- /dev/null +++ b/Utilities/Release/win/qt-6.3.0-win-msvc.ps1 @@ -0,0 +1,135 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +# Run this script on a Windows host to generate Qt binaries. +# Set the PATH environment variable to contain the locations of cmake and git. + +param ( + [string]$cmake = 'cmake', + [string]$git = 'git', + [string]$ninja = 'ninja', + [switch]$trace +) + +if ($trace -eq $true) { + Set-PSDebug -Trace 1 +} + +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' + +if ($env:VSCMD_ARG_TGT_ARCH -eq "x64") { + $arch = "x86_64"; +} elseif ($env:VSCMD_ARG_TGT_ARCH -eq "x86") { + $arch = "i386"; +} elseif ($env:VSCMD_ARG_TGT_ARCH -eq "arm64") { + $arch = "arm64"; +} else { + Write-Host "VSCMD_ARG_TGT_ARCH env var not recognized. Run this from a Visual Studio Command Prompt." + exit 1 +} + +if ($env:VCToolsVersion -match '^(?<version>[0-9][0-9]\.[0-9])') { + $toolset = "msvc_v" + $Matches.version -replace '\.', '' +} else { + Write-Host "VCToolsVersion env var not set. Run this from a Visual Studio Command Prompt." +} + +$srcname = "qt-everywhere-src-6.3.0" +$pkgname = "qt-6.3.0-win-$arch-$toolset-1" +$pkgname_host = "qt-6.3.0-win-x86_64-$toolset-1" +$topdir = $pwd.Path +$srcdir = Join-Path $topdir $srcname +$blddir = Join-Path $topdir "$pkgname-build" +$prefix = Join-Path $topdir $pkgname +$prefix_host = Join-Path $topdir "$pkgname_host" + +# Qt Source +if ( -not (Test-Path -Path $srcdir)) { + Invoke-WebRequest -Uri "https://download.qt.io/official_releases/qt/6.3/6.3.0/single/qt-everywhere-src-6.3.0.tar.xz" -OutFile qt.tar.xz + if ($(Get-FileHash "qt.tar.xz").Hash -ne 'cd2789cade3e865690f3c18df58ffbff8af74cc5f01faae50634c12eb52dd85b') { + exit 1 + } + & $cmake -E tar xvf qt.tar.xz + Remove-Item qt.tar.xz +} + +# Build Qt +if ( -not (Test-Path -Path $blddir)) { + New-Item -ItemType Directory -Path $blddir + Set-Location -Path "$blddir" + if ($arch -eq "arm64") { + $qt_platform = "win32-arm64-msvc" + $qt_host_path = "-qt-host-path", "$prefix_host" + } else { + $qt_platform = "win32-msvc" + $qt_host_path = $null + } + & ..\$srcname\configure.bat ` + -prefix $prefix ` + -static ` + -static-runtime ` + -release ` + -opensource -confirm-license ` + -platform $qt_platform ` + $qt_host_path ` + -gui ` + -widgets ` + -qt-doubleconversion ` + -qt-freetype ` + -qt-harfbuzz ` + -qt-pcre ` + -qt-zlib ` + -qt-libpng ` + -qt-libjpeg ` + -no-gif ` + -no-tiff ` + -no-webp ` + -no-icu ` + -no-pch ` + -no-opengl ` + -no-dbus ` + -no-accessibility ` + -no-feature-androiddeployqt ` + -no-feature-assistant ` + -no-feature-designer ` + -no-feature-linguist ` + -no-feature-pixeltool ` + -no-feature-printsupport ` + -no-feature-qtattributionsscanner ` + -no-feature-qtdiag ` + -no-feature-qtplugininfo ` + -no-feature-sql ` + -no-feature-windeployqt ` + -skip qtconnectivity ` + -skip qtdeclarative ` + -skip qtdoc ` + -skip qtlottie ` + -skip qtmqtt ` + -skip qtmultimedia ` + -skip qtopcua ` + -skip qtquick3d ` + -skip qtquicktimeline ` + -skip qtscxml ` + -skip qtsensors ` + -skip qtserialport ` + -skip qtsvg ` + -skip qtvirtualkeyboard ` + -skip qtwayland ` + -skip qtwebchannel ` + -skip qtwebengine ` + -skip qtwebsockets ` + -skip qtwebview ` + -nomake examples ` + -nomake tests + & $ninja +} + +# Install Qt +if ( -not (Test-Path -Path $prefix)) { + & $ninja install +} + +# Package Qt +Set-Location -Path $topdir +& $cmake -E tar cf "$pkgname.zip" "--format=zip" "$pkgname" diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt index fbce1c8..58c0573 100644 --- a/Utilities/Sphinx/CMakeLists.txt +++ b/Utilities/Sphinx/CMakeLists.txt @@ -3,7 +3,7 @@ if(NOT CMake_SOURCE_DIR) set(CMakeHelp_STANDALONE 1) - cmake_minimum_required(VERSION 3.13...3.22 FATAL_ERROR) + cmake_minimum_required(VERSION 3.13...3.23 FATAL_ERROR) get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH) get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH) include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake) |