From 068ff5878582743462341d0dae2b32fcdfb04099 Mon Sep 17 00:00:00 2001 From: KWSys Upstream Date: Mon, 22 May 2023 08:36:58 -0400 Subject: KWSys 2023-05-22 (df6f93a4) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit df6f93a430449816d1d8c112d0743cf30601c5b7 (master). Upstream Shortlog ----------------- Brad King (1): 199aa713 RegularExpression: Tell clang-analyzer that program memory is initialized --- RegularExpression.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RegularExpression.cxx b/RegularExpression.cxx index f2f5143..b51e16d 100644 --- a/RegularExpression.cxx +++ b/RegularExpression.cxx @@ -378,6 +378,10 @@ bool RegularExpression::compile(const char* exp) return false; } +#ifdef __clang_analyzer__ /* Convince it that the program is initialized. */ + memset(this->program, 0, comp.regsize); +#endif + // Second pass: emit code. comp.regparse = exp; comp.regnpar = 1; -- cgit v0.12 From 88f12c07c8eac6fb92b62b008d7a543a5f00dc76 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 18 May 2023 16:19:50 -0400 Subject: codespell: Skip more non-text files --- .codespellrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codespellrc b/.codespellrc index 0abd94e..9219d40 100644 --- a/.codespellrc +++ b/.codespellrc @@ -4,5 +4,5 @@ check-hidden = # Disable warnings about binary files quiet-level = 2 builtin = clear,rare,en-GB_to_en-US -skip = */.git,*/build,*/Copyright.txt,*/doxygen.config,*/Modules/Internal/CPack/NSIS.template.in,*/Source/CursesDialog/form/*,*/Source/kwsys/*,*/Tests/RunCMake/CPack/tests/DMG_SLA/German.*,*/Tests/RunCMake/ParseImplicitData/*.input,*/Utilities/cm* +skip = */.git,*/build,*/Copyright.txt,*/doxygen.config,*/Modules/Internal/CPack/NSIS.template.in,*/Source/CursesDialog/form/*,*/Source/kwsys/*,*/Tests/RunCMake/CPack/tests/DMG_SLA/German.*,*/Tests/RunCMake/ParseImplicitData/*.input,*/Tests/StringFileTest/test.utf8,*.pfx,*/Utilities/cm* ignore-words-list = aci,ake,ans,ba,cconfiguration,conly,dependees,dne,dum,earch,ect,filetest,fo,helpfull,hiden,isnt,keypair,nd,ned,nin,nknown,ot,pard,seh,ser,te,upto,varn,vas,wee -- cgit v0.12 From 2316ea6ac2a136c59f2453bff1ee076c28f16e5d Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 18 May 2023 16:38:38 -0400 Subject: codespell: Skip CTestCustom.cmake.in It has patterns that match messages we cannot control. --- .codespellrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codespellrc b/.codespellrc index 9219d40..2ac472f 100644 --- a/.codespellrc +++ b/.codespellrc @@ -4,5 +4,5 @@ check-hidden = # Disable warnings about binary files quiet-level = 2 builtin = clear,rare,en-GB_to_en-US -skip = */.git,*/build,*/Copyright.txt,*/doxygen.config,*/Modules/Internal/CPack/NSIS.template.in,*/Source/CursesDialog/form/*,*/Source/kwsys/*,*/Tests/RunCMake/CPack/tests/DMG_SLA/German.*,*/Tests/RunCMake/ParseImplicitData/*.input,*/Tests/StringFileTest/test.utf8,*.pfx,*/Utilities/cm* +skip = */.git,*/build,*/Copyright.txt,*/CTestCustom.cmake.in,*/doxygen.config,*/Modules/Internal/CPack/NSIS.template.in,*/Source/CursesDialog/form/*,*/Source/kwsys/*,*/Tests/RunCMake/CPack/tests/DMG_SLA/German.*,*/Tests/RunCMake/ParseImplicitData/*.input,*/Tests/StringFileTest/test.utf8,*.pfx,*/Utilities/cm* ignore-words-list = aci,ake,ans,ba,cconfiguration,conly,dependees,dne,dum,earch,ect,filetest,fo,helpfull,hiden,isnt,keypair,nd,ned,nin,nknown,ot,pard,seh,ser,te,upto,varn,vas,wee -- cgit v0.12 From 3728f079af64b4d4ea494ce7a8f723dee5f84a7a Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 18 May 2023 16:12:22 -0400 Subject: codespell: Avoid escape sequence that looks like misspelled "nodes" --- Source/cmGlobalGhsMultiGenerator.cxx | 10 +++---- Source/cmake.cxx | 32 +++++++++++----------- Tests/Module/ExternalData/Data1Check.cmake | 26 +++++++++--------- Tests/Module/ExternalData/Data2/Data2Check.cmake | 4 +-- Tests/Module/ExternalData/Data3/Data3Check.cmake | 4 +-- Tests/Module/ExternalData/Data4/Data4Check.cmake | 4 +-- Tests/Module/ExternalData/Data5/Data5Check.cmake | 2 +- .../DataNoSymlinks/DataNoSymlinksCheck.cmake | 2 +- .../RunCMake/File_Generate/CMP0070-NEW-check.cmake | 2 +- .../RunCMake/File_Generate/CMP0070-OLD-check.cmake | 2 +- .../File_Generate/CMP0070-WARN-check.cmake | 2 +- .../TestToolsetCustomFlagTableDir-check.cmake | 2 +- .../MacOSVersions/MacOSVersions-build-check.cmake | 2 +- .../Ninja/CustomCommandDepfile-check.cmake | 6 ++-- .../Ninja/CustomCommandJobPool-check.cmake | 4 +-- .../CustomCommandDepfile-check.cmake | 6 ++-- Tests/RunCMake/file/COPY_FILE-file-replace.cmake | 2 +- Tests/RunCMake/file/COPY_FILE-link-to-file.cmake | 2 +- Tests/RunCMake/file/RENAME-file-replace.cmake | 2 +- 19 files changed, 60 insertions(+), 56 deletions(-) diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 578e805..2453bfc 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -101,11 +101,11 @@ bool cmGlobalGhsMultiGenerator::SetGeneratorToolset(std::string const& ts, /* check if the toolset changed from last generate */ if (cmNonempty(prevTool) && !cmSystemTools::ComparePath(gbuild, *prevTool)) { - std::string const& e = - cmStrCat("toolset build tool: ", gbuild, - "\nDoes not match the previously used build tool: ", *prevTool, - "\nEither remove the CMakeCache.txt file and CMakeFiles " - "directory or choose a different binary directory."); + std::string const& e = cmStrCat( + "toolset build tool: ", gbuild, '\n', + "Does not match the previously used build tool: ", *prevTool, '\n', + "Either remove the CMakeCache.txt file and CMakeFiles " + "directory or choose a different binary directory."); mf->IssueMessage(MessageType::FATAL_ERROR, e); return false; } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 7b13552..284c5e7 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2369,11 +2369,11 @@ int cmake::ActualConfigure() cmValue genName = this->State->GetInitializedCacheValue("CMAKE_GENERATOR"); if (genName) { if (!this->GlobalGenerator->MatchesGeneratorName(*genName)) { - std::string message = - cmStrCat("Error: generator : ", this->GlobalGenerator->GetName(), - "\nDoes not match the generator used previously: ", *genName, - "\nEither remove the CMakeCache.txt file and CMakeFiles " - "directory or choose a different binary directory."); + std::string message = cmStrCat( + "Error: generator : ", this->GlobalGenerator->GetName(), '\n', + "Does not match the generator used previously: ", *genName, '\n', + "Either remove the CMakeCache.txt file and CMakeFiles " + "directory or choose a different binary directory."); cmSystemTools::Error(message); return -2; } @@ -2399,11 +2399,11 @@ int cmake::ActualConfigure() if (cmValue instance = this->State->GetInitializedCacheValue("CMAKE_GENERATOR_INSTANCE")) { if (this->GeneratorInstanceSet && this->GeneratorInstance != *instance) { - std::string message = - cmStrCat("Error: generator instance: ", this->GeneratorInstance, - "\nDoes not match the instance used previously: ", *instance, - "\nEither remove the CMakeCache.txt file and CMakeFiles " - "directory or choose a different binary directory."); + std::string message = cmStrCat( + "Error: generator instance: ", this->GeneratorInstance, '\n', + "Does not match the instance used previously: ", *instance, '\n', + "Either remove the CMakeCache.txt file and CMakeFiles " + "directory or choose a different binary directory."); cmSystemTools::Error(message); return -2; } @@ -2418,9 +2418,9 @@ int cmake::ActualConfigure() if (this->GeneratorPlatformSet && this->GeneratorPlatform != *platformName) { std::string message = cmStrCat( - "Error: generator platform: ", this->GeneratorPlatform, - "\nDoes not match the platform used previously: ", *platformName, - "\nEither remove the CMakeCache.txt file and CMakeFiles " + "Error: generator platform: ", this->GeneratorPlatform, '\n', + "Does not match the platform used previously: ", *platformName, '\n', + "Either remove the CMakeCache.txt file and CMakeFiles " "directory or choose a different binary directory."); cmSystemTools::Error(message); return -2; @@ -2434,9 +2434,9 @@ int cmake::ActualConfigure() this->State->GetInitializedCacheValue("CMAKE_GENERATOR_TOOLSET")) { if (this->GeneratorToolsetSet && this->GeneratorToolset != *tsName) { std::string message = - cmStrCat("Error: generator toolset: ", this->GeneratorToolset, - "\nDoes not match the toolset used previously: ", *tsName, - "\nEither remove the CMakeCache.txt file and CMakeFiles " + cmStrCat("Error: generator toolset: ", this->GeneratorToolset, '\n', + "Does not match the toolset used previously: ", *tsName, '\n', + "Either remove the CMakeCache.txt file and CMakeFiles " "directory or choose a different binary directory."); cmSystemTools::Error(message); return -2; diff --git a/Tests/Module/ExternalData/Data1Check.cmake b/Tests/Module/ExternalData/Data1Check.cmake index f60c209..7fe4389 100644 --- a/Tests/Module/ExternalData/Data1Check.cmake +++ b/Tests/Module/ExternalData/Data1Check.cmake @@ -1,24 +1,24 @@ file(STRINGS "${Data}" lines LIMIT_INPUT 1024) if(NOT "x${lines}" STREQUAL "xInput file already transformed.") - message(SEND_ERROR "Input file:\n ${Data}\ndoes not have expected content, but [[${lines}]]") + message(SEND_ERROR "Input file:\n ${Data}\n" "does not have expected content, but [[${lines}]]") endif() if(DEFINED DataSpace) file(STRINGS "${DataSpace}" lines LIMIT_INPUT 1024) if(NOT "x${lines}" STREQUAL "xInput file already transformed.") - message(SEND_ERROR "Input file:\n ${DataSpace}\ndoes not have expected content, but [[${lines}]]") + message(SEND_ERROR "Input file:\n ${DataSpace}\n" "does not have expected content, but [[${lines}]]") endif() endif() file(STRINGS "${DataScript}" lines LIMIT_INPUT 1024) if(NOT "x${lines}" STREQUAL "xDataScript") - message(SEND_ERROR "Input file:\n ${DataScript}\ndoes not have expected content, but [[${lines}]]") + message(SEND_ERROR "Input file:\n ${DataScript}\n" "does not have expected content, but [[${lines}]]") endif() file(STRINGS "${DataAlgoMapA}" lines LIMIT_INPUT 1024) if(NOT "x${lines}" STREQUAL "xDataAlgoMap") - message(SEND_ERROR "Input file:\n ${DataAlgoMapA}\ndoes not have expected content, but [[${lines}]]") + message(SEND_ERROR "Input file:\n ${DataAlgoMapA}\n" "does not have expected content, but [[${lines}]]") endif() file(STRINGS "${DataAlgoMapB}" lines LIMIT_INPUT 1024) if(NOT "x${lines}" STREQUAL "xDataAlgoMap") - message(SEND_ERROR "Input file:\n ${DataAlgoMapB}\ndoes not have expected content, but [[${lines}]]") + message(SEND_ERROR "Input file:\n ${DataAlgoMapB}\n" "does not have expected content, but [[${lines}]]") endif() if(DataMissing) if(EXISTS "${DataMissing}") @@ -54,7 +54,7 @@ foreach(s A B C D) foreach(n "" ${Series${s}l}) string(REGEX REPLACE "\\.dat$" "${n}.dat" file "${Series${s}}") if(NOT EXISTS "${file}") - message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${file}\n" "does not exist!") endif() endforeach() endforeach() @@ -62,45 +62,45 @@ foreach(s A B C D) foreach(n ${Series${s}l}) string(REGEX REPLACE "${Series${s}n1}$" "${n}.dat" file "${Series${s}n}") if(NOT EXISTS "${file}") - message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${file}\n" "does not exist!") endif() endforeach() endforeach() foreach(n .1 .2 .3 .4) string(REGEX REPLACE "\\.1\\.dat$" "${n}.dat" file "${SeriesMixed}") if(NOT EXISTS "${file}") - message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${file}\n" "does not exist!") endif() endforeach() foreach(n A B) string(REGEX REPLACE "A\\.dat$" "${n}.dat" file "${Paired}") if(NOT EXISTS "${file}") - message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${file}\n" "does not exist!") endif() endforeach() foreach(n Top A B C) string(REGEX REPLACE "Top\\.dat$" "${n}.dat" file "${Meta}") if(NOT EXISTS "${file}") - message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${file}\n" "does not exist!") endif() endforeach() foreach(n A B C) set(file "${Directory}/${n}.dat") if(NOT EXISTS "${file}") - message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${file}\n" "does not exist!") endif() endforeach() foreach(n A Sub1/A Sub2/Dir/A B Sub1/B Sub2/Dir/B C Sub1/C Sub2/Dir/C) set(file "${DirRecurse}/${n}.dat") if(NOT EXISTS "${file}") - message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${file}\n" "does not exist!") endif() endforeach() list(LENGTH Semicolons len) if("${len}" EQUAL 2) foreach(file ${Semicolons}) if(NOT EXISTS "${file}") - message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${file}\n" "does not exist!") endif() endforeach() else() diff --git a/Tests/Module/ExternalData/Data2/Data2Check.cmake b/Tests/Module/ExternalData/Data2/Data2Check.cmake index d5b0c7b..412593c 100644 --- a/Tests/Module/ExternalData/Data2/Data2Check.cmake +++ b/Tests/Module/ExternalData/Data2/Data2Check.cmake @@ -1,12 +1,12 @@ foreach(d "${Data2}" "${Data2b}") file(STRINGS "${d}" lines LIMIT_INPUT 1024) if(NOT "x${lines}" STREQUAL "xInput file already transformed.") - message(SEND_ERROR "Input file:\n ${d}\ndoes not have expected content, but [[${lines}]]") + message(SEND_ERROR "Input file:\n ${d}\n" "does not have expected content, but [[${lines}]]") endif() endforeach() foreach(n 1 2 3) string(REGEX REPLACE "_1_\\.my\\.dat$" "_${n}_.my.dat" SeriesCFile "${SeriesC}") if(NOT EXISTS "${SeriesCFile}") - message(SEND_ERROR "Input file:\n ${SeriesCFile}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${SeriesCFile}\n" "does not exist!") endif() endforeach() diff --git a/Tests/Module/ExternalData/Data3/Data3Check.cmake b/Tests/Module/ExternalData/Data3/Data3Check.cmake index de98839..da79fdb 100644 --- a/Tests/Module/ExternalData/Data3/Data3Check.cmake +++ b/Tests/Module/ExternalData/Data3/Data3Check.cmake @@ -1,8 +1,8 @@ if(NOT EXISTS "${Data}") - message(SEND_ERROR "Input file:\n ${Data}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${Data}\n" "does not exist!") endif() if(NOT EXISTS "${Other}") - message(SEND_ERROR "Input file:\n ${Other}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${Other}\n" "does not exist!") endif() # Verify that the 'Data' object was found in the second store location left # from Data1 target downloads and that the 'Other' object was downloaded to diff --git a/Tests/Module/ExternalData/Data4/Data4Check.cmake b/Tests/Module/ExternalData/Data4/Data4Check.cmake index e614cc4..a1d82d5 100644 --- a/Tests/Module/ExternalData/Data4/Data4Check.cmake +++ b/Tests/Module/ExternalData/Data4/Data4Check.cmake @@ -1,8 +1,8 @@ if(NOT EXISTS "${Data}") - message(SEND_ERROR "Input file:\n ${Data}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${Data}\n" "does not exist!") endif() if(NOT EXISTS "${Other}") - message(SEND_ERROR "Input file:\n ${Other}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${Other}\n" "does not exist!") endif() # Verify that the 'Data' object was found in the second store location left # from Data1 target downloads and that the 'Other' object was found in the diff --git a/Tests/Module/ExternalData/Data5/Data5Check.cmake b/Tests/Module/ExternalData/Data5/Data5Check.cmake index 4dea9a4..79c2161 100644 --- a/Tests/Module/ExternalData/Data5/Data5Check.cmake +++ b/Tests/Module/ExternalData/Data5/Data5Check.cmake @@ -1,4 +1,4 @@ file(STRINGS "${Data5}" lines LIMIT_INPUT 1024) if(NOT "x${lines}" STREQUAL "xInput file already transformed.") - message(SEND_ERROR "Input file:\n ${Data5}\ndoes not have expected content, but [[${lines}]]") + message(SEND_ERROR "Input file:\n ${Data5}\n" "does not have expected content, but [[${lines}]]") endif() diff --git a/Tests/Module/ExternalData/DataNoSymlinks/DataNoSymlinksCheck.cmake b/Tests/Module/ExternalData/DataNoSymlinks/DataNoSymlinksCheck.cmake index 2be3571..a73668a 100644 --- a/Tests/Module/ExternalData/DataNoSymlinks/DataNoSymlinksCheck.cmake +++ b/Tests/Module/ExternalData/DataNoSymlinks/DataNoSymlinksCheck.cmake @@ -1,5 +1,5 @@ if(NOT EXISTS "${Data}") - message(SEND_ERROR "Input file:\n ${Data}\ndoes not exist!") + message(SEND_ERROR "Input file:\n ${Data}\n" "does not exist!") endif() if(IS_SYMLINK "${Data}") message(SEND_ERROR "Input file:\n ${Data}\nis a symlink but should not be!") diff --git a/Tests/RunCMake/File_Generate/CMP0070-NEW-check.cmake b/Tests/RunCMake/File_Generate/CMP0070-NEW-check.cmake index 05ec26e..6183635 100644 --- a/Tests/RunCMake/File_Generate/CMP0070-NEW-check.cmake +++ b/Tests/RunCMake/File_Generate/CMP0070-NEW-check.cmake @@ -5,7 +5,7 @@ foreach(f if(EXISTS "${f}") file(READ "${f}" content) if(NOT content MATCHES "^relative-input-NEW[\r\n]*$") - string(APPEND RunCMake_TEST_FAILED "File\n ${f}\ndoes not have expected content.\n") + string(APPEND RunCMake_TEST_FAILED "File\n ${f}\n" "does not have expected content.\n") endif() else() string(APPEND RunCMake_TEST_FAILED "Missing\n ${f}\n") diff --git a/Tests/RunCMake/File_Generate/CMP0070-OLD-check.cmake b/Tests/RunCMake/File_Generate/CMP0070-OLD-check.cmake index a71d822..0f0fc09 100644 --- a/Tests/RunCMake/File_Generate/CMP0070-OLD-check.cmake +++ b/Tests/RunCMake/File_Generate/CMP0070-OLD-check.cmake @@ -5,7 +5,7 @@ foreach(f if(EXISTS "${f}") file(READ "${f}" content) if(NOT content MATCHES "^relative-input-OLD[\r\n]*$") - string(APPEND RunCMake_TEST_FAILED "File\n ${f}\ndoes not have expected content.\n") + string(APPEND RunCMake_TEST_FAILED "File\n ${f}\n" "does not have expected content.\n") endif() else() string(APPEND RunCMake_TEST_FAILED "Missing\n ${f}\n") diff --git a/Tests/RunCMake/File_Generate/CMP0070-WARN-check.cmake b/Tests/RunCMake/File_Generate/CMP0070-WARN-check.cmake index 1488df0..0ee4a82 100644 --- a/Tests/RunCMake/File_Generate/CMP0070-WARN-check.cmake +++ b/Tests/RunCMake/File_Generate/CMP0070-WARN-check.cmake @@ -5,7 +5,7 @@ foreach(f if(EXISTS "${f}") file(READ "${f}" content) if(NOT content MATCHES "^relative-input-WARN[\r\n]*$") - string(APPEND RunCMake_TEST_FAILED "File\n ${f}\ndoes not have expected content.\n") + string(APPEND RunCMake_TEST_FAILED "File\n ${f}\n" "does not have expected content.\n") endif() else() string(APPEND RunCMake_TEST_FAILED "Missing\n ${f}\n") diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir-check.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir-check.cmake index 79752b1..f95173b 100644 --- a/Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir-check.cmake +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir-check.cmake @@ -1,6 +1,6 @@ set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/main.vcxproj") if(NOT EXISTS "${vcProjectFile}") - set(RunCMake_TEST_FAILED "Project file\n ${vcProjectFile}\ndoes not exist.") + string(CONCAT RunCMake_TEST_FAILED "Project file\n ${vcProjectFile}\n" "does not exist.") return() endif() diff --git a/Tests/RunCMake/MacOSVersions/MacOSVersions-build-check.cmake b/Tests/RunCMake/MacOSVersions/MacOSVersions-build-check.cmake index c4faa8b..3eff573 100644 --- a/Tests/RunCMake/MacOSVersions/MacOSVersions-build-check.cmake +++ b/Tests/RunCMake/MacOSVersions/MacOSVersions-build-check.cmake @@ -21,7 +21,7 @@ foreach(ver [[compatibility version 2\.1\.0]] ) if(NOT "${out}" MATCHES "( |\n)${ver}( |\n)") - set(RunCMake_TEST_FAILED "Library file:\n ${lib}\ndoes not contain '${ver}'") + string(CONCAT RunCMake_TEST_FAILED "Library file:\n ${lib}\n" "does not contain '${ver}'") return() endif() endforeach() diff --git a/Tests/RunCMake/Ninja/CustomCommandDepfile-check.cmake b/Tests/RunCMake/Ninja/CustomCommandDepfile-check.cmake index 51f4f52..edde0c0 100644 --- a/Tests/RunCMake/Ninja/CustomCommandDepfile-check.cmake +++ b/Tests/RunCMake/Ninja/CustomCommandDepfile-check.cmake @@ -3,8 +3,10 @@ file(READ "${log}" build_file) set(RunCMake_TEST_FAILED) if(NOT "${build_file}" MATCHES "depfile = test\\.d") - list(APPEND RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: depfile = test.d") + string(CONCAT no_test_d "Log file:\n ${log}\n" "does not have expected line: depfile = test.d") + list(APPEND RunCMake_TEST_FAILED "${no_test_d}") endif() if(NOT "${build_file}" MATCHES "depfile = test_Debug\\.d") - list(APPEND RunCMake_TEST_FAILED "\nLog file:\n ${log}\ndoes not have expected line: depfile = test_Debug.d") + string(CONCAT no_test_Debug_d "\nLog file:\n ${log}\n" "does not have expected line: depfile = test_Debug.d") + list(APPEND RunCMake_TEST_FAILED "${no_test_Debug_d}") endif() diff --git a/Tests/RunCMake/Ninja/CustomCommandJobPool-check.cmake b/Tests/RunCMake/Ninja/CustomCommandJobPool-check.cmake index 7f7fa33..793b5d2 100644 --- a/Tests/RunCMake/Ninja/CustomCommandJobPool-check.cmake +++ b/Tests/RunCMake/Ninja/CustomCommandJobPool-check.cmake @@ -1,8 +1,8 @@ set(log "${RunCMake_BINARY_DIR}/CustomCommandJobPool-build/build.ninja") file(READ "${log}" build_file) if(NOT "${build_file}" MATCHES "pool = custom_command_pool") - set(RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: pool = custom_command_pool") + string(CONCAT RunCMake_TEST_FAILED "Log file:\n ${log}\n" "does not have expected line: pool = custom_command_pool") endif() if(NOT "${build_file}" MATCHES "pool = custom_target_pool") - set(RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: pool = custom_target_pool") + string(CONCAT RunCMake_TEST_FAILED "Log file:\n ${log}\n" "does not have expected line: pool = custom_target_pool") endif() diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile-check.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile-check.cmake index a7837ca..3674aba 100644 --- a/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile-check.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile-check.cmake @@ -3,8 +3,10 @@ file(READ "${log}" build_file) set(RunCMake_TEST_FAILED) if(NOT "${build_file}" MATCHES "depfile = test\\.d") - list(APPEND RunCMake_TEST_FAILED "Log file:\n ${log}\ndoes not have expected line: depfile = test.d") + string(CONCAT no_test_d "Log file:\n ${log}\n" "does not have expected line: depfile = test.d") + list(APPEND RunCMake_TEST_FAILED "${no_test_d}") endif() if(NOT "${build_file}" MATCHES "depfile = test_Debug\\.d") - list(APPEND RunCMake_TEST_FAILED "\nLog file:\n ${log}\ndoes not have expected line: depfile = test_Debug.d") + string(CONCAT no_test_Debug_d "\nLog file:\n ${log}\n" "does not have expected line: depfile = test_Debug.d") + list(APPEND RunCMake_TEST_FAILED "${no_test_Debug_d}") endif() diff --git a/Tests/RunCMake/file/COPY_FILE-file-replace.cmake b/Tests/RunCMake/file/COPY_FILE-file-replace.cmake index 40e4290..cdb06fa 100644 --- a/Tests/RunCMake/file/COPY_FILE-file-replace.cmake +++ b/Tests/RunCMake/file/COPY_FILE-file-replace.cmake @@ -5,5 +5,5 @@ file(WRITE "${newname}" "b") file(COPY_FILE "${oldname}" "${newname}") file(READ "${newname}" new) if(NOT "${new}" STREQUAL "a") - message(FATAL_ERROR "New name:\n ${newname}\ndoes not contain expected content 'a'.") + message(FATAL_ERROR "New name:\n ${newname}\n" "does not contain expected content 'a'.") endif() diff --git a/Tests/RunCMake/file/COPY_FILE-link-to-file.cmake b/Tests/RunCMake/file/COPY_FILE-link-to-file.cmake index 93a0204..53a6b11 100644 --- a/Tests/RunCMake/file/COPY_FILE-link-to-file.cmake +++ b/Tests/RunCMake/file/COPY_FILE-link-to-file.cmake @@ -6,5 +6,5 @@ file(CREATE_LINK "${lnkname}" "${oldname}") file(COPY_FILE "${oldname}" "${newname}") file(READ "${newname}" new) if(NOT "${new}" STREQUAL "a") - message(FATAL_ERROR "New name:\n ${newname}\ndoes not contain expected content 'a'.") + message(FATAL_ERROR "New name:\n ${newname}\n" "does not contain expected content 'a'.") endif() diff --git a/Tests/RunCMake/file/RENAME-file-replace.cmake b/Tests/RunCMake/file/RENAME-file-replace.cmake index efbfaed..454e27e 100644 --- a/Tests/RunCMake/file/RENAME-file-replace.cmake +++ b/Tests/RunCMake/file/RENAME-file-replace.cmake @@ -5,5 +5,5 @@ file(WRITE "${newname}" "b") file(RENAME "${oldname}" "${newname}") file(READ "${newname}" new) if(NOT "${new}" STREQUAL "a") - message(FATAL_ERROR "New name:\n ${newname}\ndoes not contain expected content 'a'.") + message(FATAL_ERROR "New name:\n ${newname}\n" "does not contain expected content 'a'.") endif() -- cgit v0.12 From 04b0d5c86291d14f485d1046957a6fcd22d65bee Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 18 May 2023 16:36:49 -0400 Subject: codespell: Fix typos --- .codespellrc | 2 +- Help/command/include_directories.rst | 2 +- Modules/CMakePackageConfigHelpers.cmake | 2 +- Modules/CPackComponent.cmake | 2 +- Modules/FindCUDA.cmake | 2 +- Modules/FindMPI.cmake | 2 +- Modules/FindMatlab.cmake | 2 +- Modules/FindOpenGL.cmake | 2 +- Modules/FindOpenSSL.cmake | 2 +- Modules/FindwxWindows.cmake | 2 +- Modules/Internal/CPack/CPackRPM.cmake | 2 +- Source/cmCPluginAPI.h | 2 +- Source/cmDependsFortran.cxx | 2 +- Source/cmDependsJavaParserHelper.cxx | 2 +- Source/cmGlobalVisualStudio7Generator.cxx | 2 +- Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey-stderr.txt | 2 +- Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey.cmake | 2 +- Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-stderr.txt | 2 +- Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument.cmake | 2 +- Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake | 2 +- Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake | 2 +- Tests/RunCMake/GoogleTest/GoogleTestXML.cmake | 4 ++-- Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake | 6 +++--- Tests/RunCMake/ctest_memcheck/testAddressSanitizer.cmake | 2 +- Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake | 6 +++--- Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake | 2 +- Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt | 2 +- Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake | 2 +- Tests/RunCMake/message/RunCMakeTest.cmake | 2 +- 29 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.codespellrc b/.codespellrc index 2ac472f..00c6c52 100644 --- a/.codespellrc +++ b/.codespellrc @@ -5,4 +5,4 @@ check-hidden = quiet-level = 2 builtin = clear,rare,en-GB_to_en-US skip = */.git,*/build,*/Copyright.txt,*/CTestCustom.cmake.in,*/doxygen.config,*/Modules/Internal/CPack/NSIS.template.in,*/Source/CursesDialog/form/*,*/Source/kwsys/*,*/Tests/RunCMake/CPack/tests/DMG_SLA/German.*,*/Tests/RunCMake/ParseImplicitData/*.input,*/Tests/StringFileTest/test.utf8,*.pfx,*/Utilities/cm* -ignore-words-list = aci,ake,ans,ba,cconfiguration,conly,dependees,dne,dum,earch,ect,filetest,fo,helpfull,hiden,isnt,keypair,nd,ned,nin,nknown,ot,pard,seh,ser,te,upto,varn,vas,wee +ignore-words-list = aci,ags,ake,ans,ba,ccompiler,cconfiguration,certi,conly,dependees,dne,dum,earch,ect,filetest,fo,helpfull,hiden,isnt,keypair,nd,ned,nin,nknown,ot,pard,seh,ser,te,upto,varn,vas,wee diff --git a/Help/command/include_directories.rst b/Help/command/include_directories.rst index d2948ed..e68bb81 100644 --- a/Help/command/include_directories.rst +++ b/Help/command/include_directories.rst @@ -25,7 +25,7 @@ prepending, independent of the default. If the ``SYSTEM`` option is given, the compiler will be told the directories are meant as system include directories on some platforms. -Signalling this setting might achieve effects such as the compiler +Signaling this setting might achieve effects such as the compiler skipping warnings, or these fixed-install system files not being considered in dependency calculations - see compiler docs. diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake index 1dc850a..581e65c 100644 --- a/Modules/CMakePackageConfigHelpers.cmake +++ b/Modules/CMakePackageConfigHelpers.cmake @@ -188,7 +188,7 @@ resulting version file. Depending on the ``COMPATIBILITY``, the corresponding ``BasicConfigVersion-.cmake.in`` file is used. Please note that these files are internal to CMake and you should not call :command:`configure_file()` on them yourself, but they can be used as starting -point to create more sophisticted custom ``ConfigVersion.cmake`` files. +point to create more sophisticated custom ``ConfigVersion.cmake`` files. Example Generating Package Files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/Modules/CPackComponent.cmake b/Modules/CPackComponent.cmake index 529f4e7..3b23b9f 100644 --- a/Modules/CPackComponent.cmake +++ b/Modules/CPackComponent.cmake @@ -149,7 +149,7 @@ installed or not. REQUIRED indicates that this component is required, and therefore will always be installed. It will be visible in the graphical installer, but it cannot be unselected. (Typically, required components are -shown greyed out). +shown grayed out). DISABLED indicates that this component should be disabled (unselected) by default. The user is free to select this component for diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index 220b9ab..0d7f1a4 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -1942,7 +1942,7 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options list(APPEND flags -Xcompiler ${f}) endforeach() - # Add our general CUDA_NVCC_FLAGS with the configuration specifig flags + # Add our general CUDA_NVCC_FLAGS with the configuration specific flags set(nvcc_flags ${CUDA_NVCC_FLAGS} ${config_specific_flags} ${nvcc_flags}) file(RELATIVE_PATH output_file_relative_path "${CMAKE_BINARY_DIR}" "${output_file}") diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 1fbb4f9..e3246c6 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -1554,7 +1554,7 @@ foreach(LANG IN ITEMS C CXX Fortran) endif() endif() - # We are on a Cray, environment identfier: PE_ENV is set (CRAY), and + # We are on a Cray, environment identifier: PE_ENV is set (CRAY), and # have NOT found an mpic++-like compiler wrapper (previous block), # and we do NOT use the Cray cc/CC compiler wrappers as CC/CXX CMake # compiler. diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index e111b79..3ab6bc1 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -951,7 +951,7 @@ function(matlab_add_unit_test) endif() # The option to run a batch program with MATLAB changes depending on the MATLAB version - # For MATLAB before R2019a (9.6), the only supported option is -r, afterwords the suggested option + # For MATLAB before R2019a (9.6), the only supported option is -r, afterwards the suggested option # is -batch as -r is deprecated set(maut_BATCH_OPTION "-r") if(NOT (Matlab_VERSION_STRING STREQUAL "")) diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index a773601..843f787 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -160,7 +160,7 @@ The value may be one of: .. versionchanged:: 3.11 This is the default, unless policy :policy:`CMP0072` is set to ``OLD`` - and no components are requeted (since components + and no components are requested (since components correspond to GLVND libraries). ``LEGACY`` diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index fd6886f..bf08d8a 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -107,7 +107,7 @@ The following variables may be set to control search behavior: ``ENV{PKG_CONFIG_PATH}`` On UNIX-like systems, ``pkg-config`` is used to locate the system OpenSSL. - Set the ``PKG_CONFIG_PATH`` environment varialbe to look in alternate + Set the ``PKG_CONFIG_PATH`` environment variable to look in alternate locations. Useful on multi-lib systems. #]=======================================================================] diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake index 15dacbb..6e4be91 100644 --- a/Modules/FindwxWindows.cmake +++ b/Modules/FindwxWindows.cmake @@ -613,7 +613,7 @@ else() option(WXWINDOWS_USE_SHARED_LIBS "Use shared versions (.so) of wxWindows libraries" ON) mark_as_advanced(WXWINDOWS_USE_SHARED_LIBS) - # JW removed option and force the develper th SET it. + # JW removed option and force the developer to SET it. # option(WXWINDOWS_USE_GL "use wxWindows with GL support (use additional # --gl-libs for wx-config)?" OFF) diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake index 8ac1f6b..36c0a3f 100644 --- a/Modules/Internal/CPack/CPackRPM.cmake +++ b/Modules/Internal/CPack/CPackRPM.cmake @@ -1150,7 +1150,7 @@ function(cpack_rpm_generate_package) endforeach() # CPACK_RPM_SPEC_INSTALL_POST - # May be used to define a RPM post intallation script + # May be used to define a RPM post installation script # for example setting it to "/bin/true" may prevent # rpmbuild from stripping binaries. if(CPACK_RPM_SPEC_INSTALL_POST) diff --git a/Source/cmCPluginAPI.h b/Source/cmCPluginAPI.h index 13a93b7..92dff57 100644 --- a/Source/cmCPluginAPI.h +++ b/Source/cmCPluginAPI.h @@ -32,7 +32,7 @@ cmCPLuginAPI.cxx typedef struct { /*========================================================================= - Here we define the set of functions that a plugin may call. The first goup + Here we define the set of functions that a plugin may call. The first group of functions are utility functions that are specific to the plugin API =========================================================================*/ /* set/Get the ClientData in the cmLoadedCommandInfo structure, this is how diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index aede3fe..d038db7 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -416,7 +416,7 @@ bool cmDependsFortran::WriteDependenciesReal(std::string const& obj, // file is not updated. In such case the stamp file will be always // older than its prerequisite and trigger cmake_copy_f90_mod // on each new build. This is expected behavior for incremental - // builds and can not be changed without preforming recursive make + // builds and can not be changed without performing recursive make // calls that would considerably slow down the building process. makeDepends << stampFileForMake << ": " << obj_m << '\n'; makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile diff --git a/Source/cmDependsJavaParserHelper.cxx b/Source/cmDependsJavaParserHelper.cxx index 0c5d310..6e617f6 100644 --- a/Source/cmDependsJavaParserHelper.cxx +++ b/Source/cmDependsJavaParserHelper.cxx @@ -155,7 +155,7 @@ void cmDependsJavaParserHelper::CheckEmpty( void cmDependsJavaParserHelper::PrepareElement( cmDependsJavaParserHelper::ParserType* me) { - // Inititalize self + // Initialize self me->str = nullptr; } diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 694698e..b254777 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -716,7 +716,7 @@ std::set cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild( cmGeneratorTarget const* target) { std::set activeConfigs; - // if it is a utilitiy target then only make it part of the + // if it is a utility target then only make it part of the // default build if another target depends on it int type = target->GetType(); if (type == cmStateEnums::GLOBAL_TARGET) { diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey-stderr.txt b/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey-stderr.txt index b9fbd38..4a3f601 100644 --- a/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey-stderr.txt +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey-stderr.txt @@ -1,7 +1,7 @@ CMake Error at .*/Modules/CheckStructHasMember.cmake:[0-9]+. \(message\): Unknown arguments: - LANGUAG;C + LANGUAG_;C Call Stack \(most recent call first\): CheckStructHasMemberWrongKey.cmake:[0-9]+ \(check_struct_has_member\) diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey.cmake b/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey.cmake index 900eb0a..fea0eb0 100644 --- a/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey.cmake +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey.cmake @@ -1,2 +1,2 @@ include(CheckStructHasMember) -check_struct_has_member("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC_K LANGUAG C) +check_struct_has_member("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC_K LANGUAG_ C) diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-stderr.txt b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-stderr.txt index 085488e..9227cc3 100644 --- a/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-stderr.txt +++ b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-stderr.txt @@ -1,7 +1,7 @@ CMake Error at .*/Modules/CheckTypeSize.cmake:[0-9]+. \(message\): Unknown argument: - LANGUAG + LANGUAG_ Call Stack \(most recent call first\): CheckTypeSizeUnknownArgument.cmake:[0-9]+ \(check_type_size\) diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument.cmake b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument.cmake index 6f24ee1..cf6f0fc 100644 --- a/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument.cmake +++ b/Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument.cmake @@ -1,2 +1,2 @@ include(CheckTypeSize) -check_type_size(int SIZEOF_INT BUILTIN_TYPES_ONLY LANGUAG CXX) +check_type_size(int SIZEOF_INT BUILTIN_TYPES_ONLY LANGUAG_ CXX) diff --git a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake index a001c5d..7b72ffe 100644 --- a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake +++ b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake @@ -130,7 +130,7 @@ endfunction() function(test_cmp0128_warn_unset) # For compilers that had CMAKE__EXTENSION_COMPILE_OPTION (only IAR) - # there is no behavioural change and thus no warning. + # there is no behavioral change and thus no warning. if(NOT "${${lang}_EXT_FLAG}" STREQUAL "") return() endif() diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake index 7df0e80..2ad45ba 100644 --- a/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake @@ -29,7 +29,7 @@ run_cmake(nested-compatible-features) run_cmake(nested-incompatible-features) run_cmake(only-targets) -# testing target propertes LINK_LIBRARY_OVERRIDE and LINK_LIBRARY_OVERRIDE_ +# testing target properties LINK_LIBRARY_OVERRIDE and LINK_LIBRARY_OVERRIDE_ run_cmake(override-features1) run_cmake(override-features2) run_cmake(override-features3) diff --git a/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake b/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake index 53eedc0..308bdbf 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake +++ b/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake @@ -5,13 +5,13 @@ enable_testing() include(xcode_sign_adhoc.cmake) -# This creates the folder structure for the paramterized tests +# This creates the folder structure for the parameterized tests # to avoid handling missing folders in C++ # # This must match the match the name defined in xml_output.cpp # for every instance of tests with GetParam. # -# The folder name is created fom the test name (output of the line +# The folder name is created from the test name (output of the line # without leading spaces: "GoogleTestXMLSpecial/cases.") and # the parts until the last slash ("case/"). These parts are concatenated. file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/GoogleTestXMLSpecial/cases.case") diff --git a/Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake index 58c94d7..2b49bbb 100644 --- a/Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake +++ b/Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake @@ -23,7 +23,7 @@ file(APPEND "${LOG_FILE}.2343" Direct leak of 4360 byte(s) in 1 object(s) allocated from: #0 0x46c669 in operator new[](unsigned long) (/home/kitware/msan/a.out+0x46c669) #1 0x4823b4 in main /home/kitware/msan/memcheck.cxx:12 - #2 0x7fa72bee476c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 + #2 0x7fa72bee476c in __libc_start_main /build/eglibc-2.15/csu/libc-start.c:226 SUMMARY: AddressSanitizer: 4436 byte(s) leaked in 2 allocation(s). ") @@ -35,13 +35,13 @@ Direct leak of 76 byte(s) in 1 object(s) allocated from: #0 0x46c669 in operator new[](unsigned long) (/home/kitware/msan/a.out+0x46c669) #1 0x4821b8 in foo() /home/kitware/msan/memcheck.cxx:4 #2 0x4823f2 in main /home/kitware/msan/memcheck.cxx:14 - #3 0x7fa72bee476c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 + #3 0x7fa72bee476c in __libc_start_main /build/eglibc-2.15/csu/libc-start.c:226 Indirect leak of 76 byte(s) in 1 object(s) allocated from: #0 0x46c669 in operator new[](unsigned long) (/home/kitware/msan/a.out+0x46c669) #1 0x4821b8 in foo() /home/kitware/msan/memcheck.cxx:4 #2 0x4823f2 in main /home/kitware/msan/memcheck.cxx:14 - #3 0x7fa72bee476c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 + #3 0x7fa72bee476c in __libc_start_main /build/eglibc-2.15/csu/libc-start.c:226 SUMMARY: AddressSanitizer: 4436 byte(s) leaked in 2 allocation(s). ") diff --git a/Tests/RunCMake/ctest_memcheck/testAddressSanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testAddressSanitizer.cmake index 8f18cd0..6612375 100644 --- a/Tests/RunCMake/ctest_memcheck/testAddressSanitizer.cmake +++ b/Tests/RunCMake/ctest_memcheck/testAddressSanitizer.cmake @@ -42,7 +42,7 @@ Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa - Heap righ redzone: fb + Heap right redzone: fb Freed Heap region: fd Stack left redzone: f1 Stack mid redzone: f2 diff --git a/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake index 4990792..45f3c45 100644 --- a/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake +++ b/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake @@ -23,7 +23,7 @@ file(APPEND "${LOG_FILE}.2343" Direct leak of 4360 byte(s) in 1 object(s) allocated from: #0 0x46c669 in operator new[](unsigned long) (/home/kitware/msan/a.out+0x46c669) #1 0x4823b4 in main /home/kitware/msan/memcheck.cxx:12 - #2 0x7fa72bee476c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 + #2 0x7fa72bee476c in __libc_start_main /build/eglibc-2.15/csu/libc-start.c:226 SUMMARY: LeakSanitizer: 4436 byte(s) leaked in 2 allocation(s). ") @@ -35,13 +35,13 @@ Direct leak of 76 byte(s) in 1 object(s) allocated from: #0 0x46c669 in operator new[](unsigned long) (/home/kitware/msan/a.out+0x46c669) #1 0x4821b8 in foo() /home/kitware/msan/memcheck.cxx:4 #2 0x4823f2 in main /home/kitware/msan/memcheck.cxx:14 - #3 0x7fa72bee476c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 + #3 0x7fa72bee476c in __libc_start_main /build/eglibc-2.15/csu/libc-start.c:226 Indirect leak of 76 byte(s) in 1 object(s) allocated from: #0 0x46c669 in operator new[](unsigned long) (/home/kitware/msan/a.out+0x46c669) #1 0x4821b8 in foo() /home/kitware/msan/memcheck.cxx:4 #2 0x4823f2 in main /home/kitware/msan/memcheck.cxx:14 - #3 0x7fa72bee476c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 + #3 0x7fa72bee476c in __libc_start_main /build/eglibc-2.15/csu/libc-start.c:226 SUMMARY: LeakSanitizer: 4436 byte(s) leaked in 2 allocation(s). ") diff --git a/Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake index 4a6adb1..4b5ef7e 100644 --- a/Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake +++ b/Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake @@ -19,7 +19,7 @@ file(APPEND "${LOG_FILE}.2343" "================================================================= ==28423== WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x7f4364210dd9 in main (/home/kitware/msan/msan-bin/umr+0x7bdd9) - #1 0x7f4362d9376c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 + #1 0x7f4362d9376c in __libc_start_main /build/eglibc-2.15/csu/libc-start.c:226 #2 0x7f4364210b0c in _start (/home/kitware/msan/msan-bin/umr+0x7bb0c) SUMMARY: MemorySanitizer: use-of-uninitialized-value ??:0 main diff --git a/Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt b/Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt index 85136b4..815ab5b 100644 --- a/Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt +++ b/Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt @@ -1,6 +1,6 @@ CMake Error at LOCK-error-guard-incorrect\.cmake:[0-9]+ \(file\): expected FUNCTION, FILE or PROCESS after GUARD, but got: - "FUNCTIO"\. + "FUNCTIO_"\. Call Stack \(most recent call first\): CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake b/Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake index 51daa7c..dddd4c0 100644 --- a/Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake +++ b/Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake @@ -1 +1 @@ -file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" GUARD FUNCTIO) +file(LOCK "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock" GUARD FUNCTIO_) diff --git a/Tests/RunCMake/message/RunCMakeTest.cmake b/Tests/RunCMake/message/RunCMakeTest.cmake index c54e8f2..786b49b 100644 --- a/Tests/RunCMake/message/RunCMakeTest.cmake +++ b/Tests/RunCMake/message/RunCMakeTest.cmake @@ -10,7 +10,7 @@ run_cmake(message-internal-warning) run_cmake(nomessage-internal-warning) run_cmake(warnmessage) -# Have to explicitly give the command for the working dir to be honoured +# Have to explicitly give the command for the working dir to be honored set(RunCMake_TEST_COMMAND_WORKING_DIRECTORY /) run_cmake_command( warnmessage-rootdir -- cgit v0.12 From 71817dc37c9c9013e475c856aec95a5fb27bce46 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 09:50:09 -0400 Subject: ccmake: Tell clang-analyzer a loop body runs at least once --- Source/CursesDialog/form/frm_def.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/CursesDialog/form/frm_def.c b/Source/CursesDialog/form/frm_def.c index 645b3ba..569057b 100644 --- a/Source/CursesDialog/form/frm_def.c +++ b/Source/CursesDialog/form/frm_def.c @@ -220,6 +220,10 @@ static int Connect_Fields(FORM * form, FIELD ** fields) for(page_nr = 0;page_nr < form->maxpage; page_nr++) { FIELD *fld = (FIELD *)0; + #ifdef __clang_analyzer__ + /* Tell clang-analyzer the loop body runs at least once. */ + assert(form->page[page_nr].pmin <= form->page[page_nr].pmax); + #endif for(j = form->page[page_nr].pmin;j <= form->page[page_nr].pmax;j++) { fields[j]->index = j; -- cgit v0.12 From e090f348d3d74f984bafd828ee36ed75b55d4076 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 09:57:06 -0400 Subject: curl: Avoid redundant getenv calls in curltest Also avoid using the result without checking for NULL. --- Utilities/cmcurl/curltest.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Utilities/cmcurl/curltest.c b/Utilities/cmcurl/curltest.c index f80e758..cb87fce 100644 --- a/Utilities/cmcurl/curltest.c +++ b/Utilities/cmcurl/curltest.c @@ -10,21 +10,24 @@ int test_curl(const char* url) CURLcode r; char proxy[1024]; int proxy_type = 0; + const char* env_HTTP_PROXY = getenv("HTTP_PROXY"); - if (getenv("HTTP_PROXY")) { + if (env_HTTP_PROXY) { + const char* env_HTTP_PROXY_PORT = getenv("HTTP_PROXY_PORT"); + const char* env_HTTP_PROXY_TYPE = getenv("HTTP_PROXY_TYPE"); proxy_type = 1; - if (getenv("HTTP_PROXY_PORT")) { - sprintf(proxy, "%s:%s", getenv("HTTP_PROXY"), getenv("HTTP_PROXY_PORT")); + if (env_HTTP_PROXY_PORT) { + sprintf(proxy, "%s:%s", env_HTTP_PROXY, env_HTTP_PROXY_PORT); } else { - sprintf(proxy, "%s", getenv("HTTP_PROXY")); + sprintf(proxy, "%s", env_HTTP_PROXY); } - if (getenv("HTTP_PROXY_TYPE")) { + if (env_HTTP_PROXY_TYPE) { /* HTTP/SOCKS4/SOCKS5 */ - if (strcmp(getenv("HTTP_PROXY_TYPE"), "HTTP") == 0) { + if (strcmp(env_HTTP_PROXY_TYPE, "HTTP") == 0) { proxy_type = 1; - } else if (strcmp(getenv("HTTP_PROXY_TYPE"), "SOCKS4") == 0) { + } else if (strcmp(env_HTTP_PROXY_TYPE, "SOCKS4") == 0) { proxy_type = 2; - } else if (strcmp(getenv("HTTP_PROXY_TYPE"), "SOCKS5") == 0) { + } else if (strcmp(env_HTTP_PROXY_TYPE, "SOCKS5") == 0) { proxy_type = 3; } } -- cgit v0.12 From 91e4d27765945e27b623fbb4e3a066ee9157970a Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 09:54:25 -0400 Subject: bzip2: Suppress clang-analyzer warnings --- Utilities/cmbzip2/bzlib.c | 4 ++++ Utilities/cmbzip2/compress.c | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/Utilities/cmbzip2/bzlib.c b/Utilities/cmbzip2/bzlib.c index 2178655..af3673d 100644 --- a/Utilities/cmbzip2/bzlib.c +++ b/Utilities/cmbzip2/bzlib.c @@ -444,6 +444,10 @@ int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action ) if (s->avail_in_expect != s->strm->avail_in) return BZ_SEQUENCE_ERROR; progress = handle_compress ( strm ); + #ifdef __clang_analyzer__ + /* Tolerate deadcode.DeadStores to avoid modifying upstream. */ + (void)progress; + #endif if (s->avail_in_expect > 0 || !isempty_RL(s) || s->state_out_pos < s->numZ) return BZ_FLUSH_OK; s->mode = BZ_M_RUNNING; diff --git a/Utilities/cmbzip2/compress.c b/Utilities/cmbzip2/compress.c index 5dfa002..a044c16 100644 --- a/Utilities/cmbzip2/compress.c +++ b/Utilities/cmbzip2/compress.c @@ -151,6 +151,10 @@ void generateMTFValues ( EState* s ) UChar* block = s->block; UInt16* mtfv = s->mtfv; +#ifdef __clang_analyzer__ + memset(yy, 0, sizeof(yy)); +#endif + makeMaps_e ( s ); EOB = s->nInUse+1; @@ -223,6 +227,10 @@ void generateMTFValues ( EState* s ) zPend = (zPend - 2) / 2; }; zPend = 0; + #ifdef __clang_analyzer__ + /* Tolerate deadcode.DeadStores to avoid modifying upstream. */ + (void)zPend; + #endif } mtfv[wr] = EOB; wr++; s->mtfFreq[EOB]++; -- cgit v0.12 From 48297cf770664e59283b3bf3a35a2ceab7b55f1f Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 09:58:08 -0400 Subject: libarchive: Suppress clang-analyzer warnings --- Utilities/cmlibarchive/libarchive/archive_acl.c | 10 ++++++++++ Utilities/cmlibarchive/libarchive/archive_match.c | 4 ++++ Utilities/cmlibarchive/libarchive/archive_ppmd8.c | 12 ++++++++++++ .../cmlibarchive/libarchive/archive_read_disk_posix.c | 11 +++++++++++ .../libarchive/archive_read_support_filter_uu.c | 7 +++++++ .../libarchive/archive_read_support_format_7zip.c | 10 ++++++++++ .../libarchive/archive_read_support_format_iso9660.c | 2 ++ .../libarchive/archive_read_support_format_rar.c | 7 ++++++- .../libarchive/archive_read_support_format_rar5.c | 15 +++++++++++++-- .../libarchive/archive_write_set_format_iso9660.c | 9 +++++++++ 10 files changed, 84 insertions(+), 3 deletions(-) diff --git a/Utilities/cmlibarchive/libarchive/archive_acl.c b/Utilities/cmlibarchive/libarchive/archive_acl.c index ead7e36..da471a5 100644 --- a/Utilities/cmlibarchive/libarchive/archive_acl.c +++ b/Utilities/cmlibarchive/libarchive/archive_acl.c @@ -37,6 +37,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef __clang_analyzer__ +#include +#endif + #include "archive_acl_private.h" #include "archive_entry.h" #include "archive_private.h" @@ -1209,6 +1213,9 @@ archive_acl_from_text_w(struct archive_acl *acl, const wchar_t *text, * to "user::rwx", etc. valid only for first field */ s = field[0].start; + #ifdef __clang_analyzer__ + assert(s); + #endif len = field[0].end - field[0].start; if (*s == L'd' && (len == 1 || (len >= 7 && wmemcmp((s + 1), L"efault", 6) == 0))) { @@ -1692,6 +1699,9 @@ archive_acl_from_text_l(struct archive_acl *acl, const char *text, * to "user::rwx", etc. valid only for first field */ s = field[0].start; + #ifdef __clang_analyzer__ + assert(s); + #endif len = field[0].end - field[0].start; if (*s == 'd' && (len == 1 || (len >= 7 && memcmp((s + 1), "efault", 6) == 0))) { diff --git a/Utilities/cmlibarchive/libarchive/archive_match.c b/Utilities/cmlibarchive/libarchive/archive_match.c index 04747b1..2de0045 100644 --- a/Utilities/cmlibarchive/libarchive/archive_match.c +++ b/Utilities/cmlibarchive/libarchive/archive_match.c @@ -606,6 +606,10 @@ add_pattern_from_file(struct archive_match *a, struct match_list *mlist, return (ARCHIVE_FATAL); } r = archive_read_support_format_raw(ar); +#ifdef __clang_analyzer__ + /* Tolerate deadcode.DeadStores to avoid modifying upstream. */ + (void)r; +#endif r = archive_read_support_format_empty(ar); if (r != ARCHIVE_OK) { archive_copy_error(&(a->archive), ar); diff --git a/Utilities/cmlibarchive/libarchive/archive_ppmd8.c b/Utilities/cmlibarchive/libarchive/archive_ppmd8.c index d177939..272ca4c 100644 --- a/Utilities/cmlibarchive/libarchive/archive_ppmd8.c +++ b/Utilities/cmlibarchive/libarchive/archive_ppmd8.c @@ -4,6 +4,10 @@ This code is based on PPMd var.I (2002): Dmitry Shkarin : Public domain */ #include "archive_platform.h" +#ifdef __clang_analyzer__ +#include +#endif + #include #include "archive_ppmd8_private.h" @@ -337,6 +341,9 @@ static void ExpandTextArea(CPpmd8 *p) static void SetSuccessor(CPpmd_State *p, CPpmd_Void_Ref v) { + #ifdef __clang_analyzer__ + assert(p); + #endif (p)->SuccessorLow = (UInt16)((UInt32)(v) & 0xFFFF); (p)->SuccessorHigh = (UInt16)(((UInt32)(v) >> 16) & 0xFFFF); } @@ -616,6 +623,11 @@ static CTX_PTR CreateSuccessors(CPpmd8 *p, Bool skip, CPpmd_State *s1, CTX_PTR c /* fixed over Shkarin's code. Maybe it could work without + 1 too. */ CPpmd_State *ps[PPMD8_MAX_ORDER + 1]; unsigned numPs = 0; + +#ifdef __clang_analyzer__ + memset(ps, 0, sizeof(ps)); +#endif + if (!skip) ps[numPs++] = p->FoundState; diff --git a/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c b/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c index 5a94ec5..c964d3f 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c @@ -92,6 +92,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef __clang_analyzer__ +#include +#endif + #include "archive.h" #include "archive_string.h" #include "archive_entry.h" @@ -742,6 +746,10 @@ _archive_read_data_block(struct archive *_a, const void **buff, else if (errno == EPERM) flags &= ~O_NOATIME; } +#ifdef __clang_analyzer__ + /* Tolerate deadcode.DeadStores to avoid modifying upstream. */ + (void)flags; +#endif #endif if (t->entry_fd < 0) { archive_set_error(&a->archive, errno, @@ -2347,6 +2355,9 @@ tree_pop(struct tree *t) if (t->stack == t->current && t->current != NULL) t->current = t->current->parent; te = t->stack; + #ifdef __clang_analyzer__ + assert(te); + #endif t->stack = te->next; t->dirname_length = te->dirname_length; t->basename = t->path.s + t->dirname_length; diff --git a/Utilities/cmlibarchive/libarchive/archive_read_support_filter_uu.c b/Utilities/cmlibarchive/libarchive/archive_read_support_filter_uu.c index 209b2a1..c66c247 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_support_filter_uu.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_support_filter_uu.c @@ -36,6 +36,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef __clang_analyzer__ +#include +#endif + #include "archive.h" #include "archive_private.h" #include "archive_read_private.h" @@ -467,6 +471,9 @@ read_more: if (ensure_in_buff_size(self, uudecode, avail_in + uudecode->in_cnt) != ARCHIVE_OK) return (ARCHIVE_FATAL); + #ifdef __clang_analyzer__ + assert(d); + #endif memcpy(uudecode->in_buff + uudecode->in_cnt, d, avail_in); d = uudecode->in_buff; diff --git a/Utilities/cmlibarchive/libarchive/archive_read_support_format_7zip.c b/Utilities/cmlibarchive/libarchive/archive_read_support_format_7zip.c index 722edf1..a4d9dcf 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_support_format_7zip.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_support_format_7zip.c @@ -42,6 +42,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef __clang_analyzer__ +#include +#endif + #include "archive.h" #include "archive_entry.h" #include "archive_entry_locale.h" @@ -757,6 +761,9 @@ archive_read_format_7zip_read_header(struct archive_read *a, return (ARCHIVE_FATAL); } symname = mem; + #ifdef __clang_analyzer__ + assert(buff); + #endif memcpy(symname+symsize, buff, size); symsize += size; } @@ -2500,6 +2507,9 @@ read_Header(struct archive_read *a, struct _7z_header_info *h, if ((p = header_bytes(a, 1)) == NULL) return (-1); ll--; + #ifdef __clang_analyzer__ + (void)*p; + #endif if ((ll & 1) || ll < zip->numFiles * 4) return (-1); diff --git a/Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c b/Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c index 380cbb8..91b9187 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c @@ -3015,6 +3015,7 @@ heap_add_entry(struct archive_read *a, struct heap_queue *heap, uint64_t file_key, parent_key; int hole, parent; +#ifndef __clang_analyzer__ /* It cannot see heap->files remains populated. */ /* Expand our pending files list as necessary. */ if (heap->used >= heap->allocated) { struct file_info **new_pending_files; @@ -3042,6 +3043,7 @@ heap_add_entry(struct archive_read *a, struct heap_queue *heap, heap->files = new_pending_files; heap->allocated = new_size; } +#endif file_key = file->key = key; diff --git a/Utilities/cmlibarchive/libarchive/archive_read_support_format_rar.c b/Utilities/cmlibarchive/libarchive/archive_read_support_format_rar.c index 1c9a057..41d6cb2 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_support_format_rar.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_support_format_rar.c @@ -35,6 +35,8 @@ #include /* crc32 */ #endif +#include + #include "archive.h" #ifndef HAVE_ZLIB_H #include "archive_crc32.h" @@ -3215,6 +3217,7 @@ parse_filter(struct archive_read *a, const uint8_t *bytes, uint16_t length, uint num = filters->lastfilternum; prog = filters->progs; + assert(num <= numprogs); for (i = 0; i < num; i++) prog = prog->next; if (prog) @@ -3320,8 +3323,10 @@ create_filter(struct rar_program_code *prog, const uint8_t *globaldata, uint32_t filter->prog = prog; filter->globaldatalen = globaldatalen > PROGRAM_SYSTEM_GLOBAL_SIZE ? globaldatalen : PROGRAM_SYSTEM_GLOBAL_SIZE; filter->globaldata = calloc(1, filter->globaldatalen); - if (!filter->globaldata) + if (!filter->globaldata) { + free(filter); return NULL; + } if (globaldata) memcpy(filter->globaldata, globaldata, globaldatalen); if (registers) diff --git a/Utilities/cmlibarchive/libarchive/archive_read_support_format_rar5.c b/Utilities/cmlibarchive/libarchive/archive_read_support_format_rar5.c index 548da4e..aa7b861 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_support_format_rar5.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_support_format_rar5.c @@ -388,7 +388,7 @@ static int cdeque_init(struct cdeque* d, int max_capacity_power_of_2) { return CDE_PARAM; cdeque_clear(d); - d->arr = malloc(sizeof(void*) * max_capacity_power_of_2); + d->arr = malloc(sizeof(*d->arr) * max_capacity_power_of_2); return d->arr ? CDE_OK : CDE_ALLOC; } @@ -2942,12 +2942,23 @@ static int parse_filter(struct archive_read* ar, const uint8_t* p) { if(filter_type == FILTER_DELTA) { int channels; - if(ARCHIVE_OK != (ret = read_consume_bits(ar, rar, p, 5, &channels))) + if(ARCHIVE_OK != (ret = read_consume_bits(ar, rar, p, 5, &channels))) { + #ifdef __clang_analyzer__ + /* Tell clang-analyzer that 'filt' does not leak. + add_new_filter passes off ownership. */ + free(filt); + #endif return ret; + } filt->channels = channels + 1; } + #ifdef __clang_analyzer__ + /* Tell clang-analyzer that 'filt' does not leak. + add_new_filter passes off ownership. */ + free(filt); + #endif return ARCHIVE_OK; } diff --git a/Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c b/Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c index 3190b46..ebd33c5 100644 --- a/Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c +++ b/Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c @@ -50,6 +50,10 @@ #include #endif +#ifdef __clang_analyzer__ +#include +#endif + #include "archive.h" #include "archive_endian.h" #include "archive_entry.h" @@ -6626,6 +6630,11 @@ isoent_collect_dirs(struct vdd *vdd, struct isoent *rootent, int depth) rootent = vdd->rootent; np = rootent; do { + #ifdef __clang_analyzer__ + /* Tell clang-analyzer that pathtbl[depth] is in bounds. */ + assert(depth < vdd->max_depth); + #endif + /* Register current directory to pathtable. */ path_table_add_entry(&(vdd->pathtbl[depth]), np); -- cgit v0.12 From e24c403816e38d4acf6cf998427d07ac5831a63a Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 09:58:44 -0400 Subject: liblzma: Suppress clang-analyzer warnings --- Utilities/cmliblzma/liblzma/common/index.c | 3 +++ Utilities/cmliblzma/liblzma/common/index_encoder.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Utilities/cmliblzma/liblzma/common/index.c b/Utilities/cmliblzma/liblzma/common/index.c index a41e8f3..4c463ec 100644 --- a/Utilities/cmliblzma/liblzma/common/index.c +++ b/Utilities/cmliblzma/liblzma/common/index.c @@ -263,6 +263,9 @@ index_tree_append(index_tree *tree, index_tree_node *node) up = ctz32(tree->count) + 2; do { node = node->parent; + #ifdef __clang_analyzer__ + assert(node); + #endif } while (--up > 0); // Rotate left using node as the rotation root. diff --git a/Utilities/cmliblzma/liblzma/common/index_encoder.c b/Utilities/cmliblzma/liblzma/common/index_encoder.c index ac97d0c..5e822cb 100644 --- a/Utilities/cmliblzma/liblzma/common/index_encoder.c +++ b/Utilities/cmliblzma/liblzma/common/index_encoder.c @@ -237,12 +237,15 @@ lzma_index_buffer_encode(const lzma_index *i, // Do the actual encoding. This should never fail, but store // the original *out_pos just in case. +#ifndef __clang_analyzer__ // Hide unreachable code from clang-analyzer. const size_t out_start = *out_pos; +#endif lzma_ret ret = index_encode(&coder, NULL, NULL, NULL, 0, out, out_pos, out_size, LZMA_RUN); if (ret == LZMA_STREAM_END) { ret = LZMA_OK; +#ifndef __clang_analyzer__ // Hide unreachable code from clang-analyzer. } else { // We should never get here, but just in case, restore the // output position and set the error accordingly if something @@ -250,6 +253,7 @@ lzma_index_buffer_encode(const lzma_index *i, assert(0); *out_pos = out_start; ret = LZMA_PROG_ERROR; +#endif } return ret; -- cgit v0.12 From 5ec464a76f763ab590ca49dffa595ba183df72dc Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 09:59:21 -0400 Subject: librhash: Suppress clang-analyzer warnings --- Utilities/cmlibrhash/librhash/hex.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Utilities/cmlibrhash/librhash/hex.c b/Utilities/cmlibrhash/librhash/hex.c index f0bbf04..cfd5892 100644 --- a/Utilities/cmlibrhash/librhash/hex.c +++ b/Utilities/cmlibrhash/librhash/hex.c @@ -110,6 +110,9 @@ size_t rhash_base64_url_encoded_helper(char* dst, const unsigned char* src, size { #define B64_CHUNK_SIZE 120 char buffer[164]; + #ifdef __clang_analyzer__ + memset(buffer, 0, sizeof(buffer)); + #endif assert((BASE64_LENGTH(B64_CHUNK_SIZE) + 4) <= sizeof(buffer)); assert((B64_CHUNK_SIZE % 6) == 0); if (url_encode) { -- cgit v0.12 From b18eca763c6fce2627e4c199632c6eb4a98a5210 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 09:59:44 -0400 Subject: libuv: Suppress clang-analyzer warnings --- Utilities/cmlibuv/src/unix/tty.c | 4 ++++ Utilities/cmlibuv/src/unix/udp.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/Utilities/cmlibuv/src/unix/tty.c b/Utilities/cmlibuv/src/unix/tty.c index 44fdb9c..d794bd5 100644 --- a/Utilities/cmlibuv/src/unix/tty.c +++ b/Utilities/cmlibuv/src/unix/tty.c @@ -354,6 +354,10 @@ uv_handle_type uv_guess_handle(uv_file file) { socklen_t len; int type; + #ifdef __clang_analyzer__ + memset(&ss, 0, sizeof(ss)); + #endif + if (file < 0) return UV_UNKNOWN_HANDLE; diff --git a/Utilities/cmlibuv/src/unix/udp.c b/Utilities/cmlibuv/src/unix/udp.c index 4d985b8..83acf13 100644 --- a/Utilities/cmlibuv/src/unix/udp.c +++ b/Utilities/cmlibuv/src/unix/udp.c @@ -194,6 +194,12 @@ static int uv__udp_recvmmsg(uv_udp_t* handle, uv_buf_t* buf) { int flags; size_t k; + #ifdef __clang_analyzer__ + /* Tell clang-analyzer the array is initialized. + The part we use is initialized below. */ + memset(iov, 0, sizeof(iov)); + #endif + /* prepare structures for recvmmsg */ chunks = buf->len / UV__UDP_DGRAM_MAXSIZE; if (chunks > ARRAY_SIZE(iov)) -- cgit v0.12 From 395f0cb69c8db2b4a36dc40d9776df9bea5afdb1 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 10:00:42 -0400 Subject: nghttp2: Suppress clang-analyzer warnings --- Utilities/cmnghttp2/lib/nghttp2_buf.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Utilities/cmnghttp2/lib/nghttp2_buf.c b/Utilities/cmnghttp2/lib/nghttp2_buf.c index a328447..ce51251 100644 --- a/Utilities/cmnghttp2/lib/nghttp2_buf.c +++ b/Utilities/cmnghttp2/lib/nghttp2_buf.c @@ -26,6 +26,10 @@ #include +#ifdef __clang_analyzer__ +#include +#endif + #include "nghttp2_helper.h" #include "nghttp2_debug.h" @@ -386,6 +390,10 @@ int nghttp2_bufs_addb(nghttp2_bufs *bufs, uint8_t b) { return rv; } +#ifdef __clang_analyzer__ + assert(bufs->cur->buf.last); +#endif + *bufs->cur->buf.last++ = b; return 0; @@ -399,6 +407,10 @@ int nghttp2_bufs_addb_hold(nghttp2_bufs *bufs, uint8_t b) { return rv; } +#ifdef __clang_analyzer__ + assert(bufs->cur->buf.last); +#endif + *bufs->cur->buf.last = b; return 0; @@ -412,6 +424,10 @@ int nghttp2_bufs_orb(nghttp2_bufs *bufs, uint8_t b) { return rv; } +#ifdef __clang_analyzer__ + assert(bufs->cur->buf.last); +#endif + *bufs->cur->buf.last++ |= b; return 0; -- cgit v0.12 From bba02b8b4beda4abacd5d3aa74d2d5e2ac1d717b Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 10:01:22 -0400 Subject: zlib: Suppress clang-analyzer warnings --- Utilities/cmzlib/gzread.c | 6 ++++++ Utilities/cmzlib/gzwrite.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Utilities/cmzlib/gzread.c b/Utilities/cmzlib/gzread.c index 22052dd..e3519e6 100644 --- a/Utilities/cmzlib/gzread.c +++ b/Utilities/cmzlib/gzread.c @@ -434,6 +434,12 @@ z_size_t ZEXPORT gzfread(buf, size, nitems, file) return 0; } +#ifdef __clang_analyzer__ + /* clang-analyzer does not see size==0 through len==0 below. */ + if (!size) + return 0; +#endif + /* read len or fewer bytes to buf, return the number of full items read */ return len ? gz_read(state, buf, len) / size : 0; } diff --git a/Utilities/cmzlib/gzwrite.c b/Utilities/cmzlib/gzwrite.c index a8ffc8f..33f4949 100644 --- a/Utilities/cmzlib/gzwrite.c +++ b/Utilities/cmzlib/gzwrite.c @@ -305,6 +305,12 @@ z_size_t ZEXPORT gzfwrite(buf, size, nitems, file) return 0; } +#ifdef __clang_analyzer__ + /* clang-analyzer does not see size==0 through len==0 below. */ + if (!size) + return 0; +#endif + /* write len bytes to buf, return the number of full items written */ return len ? gz_write(state, buf, len) / size : 0; } -- cgit v0.12 From d531b9e7d151124a2a31ff19ac7b5a25671da5c2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 10:01:45 -0400 Subject: zstd: Suppress clang-analyzer warnings --- Utilities/cmzstd/lib/common/bitstream.h | 2 ++ Utilities/cmzstd/lib/compress/fse_compress.c | 4 ++++ Utilities/cmzstd/lib/dictBuilder/divsufsort.c | 11 +++++++++++ 3 files changed, 17 insertions(+) diff --git a/Utilities/cmzstd/lib/common/bitstream.h b/Utilities/cmzstd/lib/common/bitstream.h index 2e5a933..136a188 100644 --- a/Utilities/cmzstd/lib/common/bitstream.h +++ b/Utilities/cmzstd/lib/common/bitstream.h @@ -14,6 +14,8 @@ #ifndef BITSTREAM_H_MODULE #define BITSTREAM_H_MODULE +#include + #if defined (__cplusplus) extern "C" { #endif diff --git a/Utilities/cmzstd/lib/compress/fse_compress.c b/Utilities/cmzstd/lib/compress/fse_compress.c index b4297ec..1b6a076 100644 --- a/Utilities/cmzstd/lib/compress/fse_compress.c +++ b/Utilities/cmzstd/lib/compress/fse_compress.c @@ -646,6 +646,10 @@ size_t FSE_compress_wksp (void* dst, size_t dstSize, const void* src, size_t src void* scratchBuffer = (void*)(CTable + CTableSize); size_t const scratchBufferSize = wkspSize - (CTableSize * sizeof(FSE_CTable)); +#ifdef __clang_analyzer__ + memset(norm, 0, sizeof(norm)); +#endif + /* init conditions */ if (wkspSize < FSE_COMPRESS_WKSP_SIZE_U32(tableLog, maxSymbolValue)) return ERROR(tableLog_tooLarge); if (srcSize <= 1) return 0; /* Not compressible */ diff --git a/Utilities/cmzstd/lib/dictBuilder/divsufsort.c b/Utilities/cmzstd/lib/dictBuilder/divsufsort.c index a2870fb..8d52b18 100644 --- a/Utilities/cmzstd/lib/dictBuilder/divsufsort.c +++ b/Utilities/cmzstd/lib/dictBuilder/divsufsort.c @@ -40,6 +40,10 @@ #include #include +#ifdef __clang_analyzer__ +#include +#endif + #include "divsufsort.h" /*- Constants -*/ @@ -1119,6 +1123,9 @@ tr_copy(int *ISA, const int *SA, v = b - SA - 1; for(c = first, d = a - 1; c <= d; ++c) { + #ifdef __clang_analyzer__ + assert(c); + #endif if((0 <= (s = *c - depth)) && (ISA[s] == v)) { *++d = s; ISA[s] = d - SA; @@ -1184,6 +1191,10 @@ tr_introsort(int *ISA, const int *ISAd, int limit, next; int ssize, trlink = -1; + #ifdef __clang_analyzer__ + memset(stack, 0, sizeof(stack)); + #endif + for(ssize = 0, limit = tr_ilg(last - first);;) { if(limit < 0) { -- cgit v0.12 From 7b3ec2b891d587828808845bfc390fb33aa120d9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 13:29:52 -0400 Subject: Tests: Avoid printing function address in FindOpenAL.Test --- Tests/FindOpenAL/Test/main.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tests/FindOpenAL/Test/main.cxx b/Tests/FindOpenAL/Test/main.cxx index 1396c60..27204fb 100644 --- a/Tests/FindOpenAL/Test/main.cxx +++ b/Tests/FindOpenAL/Test/main.cxx @@ -10,9 +10,10 @@ int main() { /* Reference an AL symbol without requiring a context at runtime. */ - printf("&alGetString = %p\n", &alGetString); + printf("AL_VERSION: %s\n", alGetString(AL_VERSION)); /* Reference an ALC symbol without requiring a context at runtime. */ - printf("&alcGetString = %p\n", &alcGetString); + printf("ALC_DEVICE_SPECIFIER: %s\n", + alcGetString(NULL, ALC_DEVICE_SPECIFIER)); return 0; } -- cgit v0.12 From 93ee2b369c8f2937d848026bad40b09586a5c487 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 13:17:41 -0400 Subject: Source: Fix -Wdangling-reference warnings exposed by gcc 13 --- Source/CPack/cmCPackInnoSetupGenerator.cxx | 2 +- Source/cmCommandArgumentParserHelper.cxx | 3 ++- Source/cmCommonTargetGenerator.cxx | 2 +- Source/cmConditionEvaluator.cxx | 4 ++-- Source/cmGlobalCommonGenerator.cxx | 6 +++--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Source/CPack/cmCPackInnoSetupGenerator.cxx b/Source/CPack/cmCPackInnoSetupGenerator.cxx index d8825d4..5d2c208 100644 --- a/Source/CPack/cmCPackInnoSetupGenerator.cxx +++ b/Source/CPack/cmCPackInnoSetupGenerator.cxx @@ -277,7 +277,7 @@ bool cmCPackInnoSetupGenerator::ProcessSetupSection() return false; } - const std::string& architecture = GetOption("CPACK_INNOSETUP_ARCHITECTURE"); + cmValue const architecture = GetOption("CPACK_INNOSETUP_ARCHITECTURE"); if (architecture != "x86" && architecture != "x64" && architecture != "arm64" && architecture != "ia64") { cmCPackLogger(cmCPackLog::LOG_ERROR, diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 2ed04e5..a20f5a5 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -96,7 +96,8 @@ const char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) } if (this->FileLine >= 0 && strcmp(var, "CMAKE_CURRENT_LIST_LINE") == 0) { std::string line; - cmListFileContext const& top = this->Makefile->GetBacktrace().Top(); + cmListFileBacktrace bt = this->Makefile->GetBacktrace(); + cmListFileContext const& top = bt.Top(); if (top.DeferId) { line = cmStrCat("DEFERRED:"_s, *top.DeferId); } else { diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 2615494..e635dd9 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -236,7 +236,7 @@ std::string cmCommonTargetGenerator::GetManifests(const std::string& config) manifests.reserve(manifest_srcs.size()); std::string lang = this->GeneratorTarget->GetLinkerLanguage(config); - std::string const& manifestFlag = + std::string manifestFlag = this->Makefile->GetDefinition("CMAKE_" + lang + "_LINKER_MANIFEST_FLAG"); for (cmSourceFile const* manifest_src : manifest_srcs) { manifests.push_back(manifestFlag + diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 288e107..6f9f541 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -741,8 +741,8 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList& newArgs, keyVERSION_LESS_EQUAL, keyVERSION_GREATER, keyVERSION_GREATER_EQUAL, keyVERSION_EQUAL))) { const auto op = MATCH2CMPOP[matchNo - 1]; - const std::string& lhs = this->GetVariableOrString(*args.current); - const std::string& rhs = this->GetVariableOrString(*args.nextnext); + const cmValue lhs = this->GetVariableOrString(*args.current); + const cmValue rhs = this->GetVariableOrString(*args.nextnext); const auto result = cmSystemTools::VersionCompare(op, lhs, rhs); newArgs.ReduceTwoArgs(result, args); } diff --git a/Source/cmGlobalCommonGenerator.cxx b/Source/cmGlobalCommonGenerator.cxx index 7a44452..513e3bf 100644 --- a/Source/cmGlobalCommonGenerator.cxx +++ b/Source/cmGlobalCommonGenerator.cxx @@ -34,8 +34,8 @@ cmGlobalCommonGenerator::ComputeDirectoryTargets() const { std::map dirTargets; for (const auto& lg : this->LocalGenerators) { - std::string const& currentBinaryDir( - lg->GetStateSnapshot().GetDirectory().GetCurrentBinary()); + std::string currentBinaryDir = + lg->GetStateSnapshot().GetDirectory().GetCurrentBinary(); DirectoryTarget& dirTarget = dirTargets[currentBinaryDir]; dirTarget.LG = lg.get(); const std::vector& configs = @@ -68,7 +68,7 @@ cmGlobalCommonGenerator::ComputeDirectoryTargets() const for (cmStateSnapshot dir = lg->GetStateSnapshot().GetBuildsystemDirectoryParent(); dir.IsValid(); dir = dir.GetBuildsystemDirectoryParent()) { - std::string const& d = dir.GetDirectory().GetCurrentBinary(); + std::string d = dir.GetDirectory().GetCurrentBinary(); dirTargets[d].Targets.emplace_back(t); } } -- cgit v0.12 From bd4ec7a71ea0033b6a4fd80956e6a84e40a5a5ef Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 14:31:59 -0400 Subject: clang-tidy: Fix modernize-loop-convert warnings --- Source/cmCustomCommandGenerator.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index 7623ccf..2c1480a 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -332,9 +332,9 @@ const char* cmCustomCommandGenerator::GetArgv0Location(unsigned int c) const bool cmCustomCommandGenerator::HasOnlyEmptyCommandLines() const { - for (size_t i = 0; i < this->CommandLines.size(); ++i) { - for (size_t j = 0; j < this->CommandLines[i].size(); ++j) { - if (!this->CommandLines[i][j].empty()) { + for (cmCustomCommandLine const& ccl : this->CommandLines) { + for (std::string const& cl : ccl) { + if (!cl.empty()) { return false; } } -- cgit v0.12 From 9ea7b4ac66fee01a840dba9071a8bd0a4a576e8d Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 14:32:45 -0400 Subject: clang-tidy: Fix readability-redundant-string-cstr warnings --- Source/cmGetTestPropertyCommand.cxx | 2 +- Source/cmMakefileLibraryTargetGenerator.cxx | 2 +- Source/cmQtAutoMocUic.cxx | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/cmGetTestPropertyCommand.cxx b/Source/cmGetTestPropertyCommand.cxx index a4ac9f6..36446c9 100644 --- a/Source/cmGetTestPropertyCommand.cxx +++ b/Source/cmGetTestPropertyCommand.cxx @@ -25,7 +25,7 @@ bool cmGetTestPropertyCommand(std::vector const& args, prop = test->GetProperty(args[1]); } if (prop) { - mf.AddDefinition(var, prop->c_str()); + mf.AddDefinition(var, prop); return true; } } diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index b07a74b..fc3caa1 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -785,7 +785,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( if (this->GeneratorTarget->HasSOName(this->GetConfigName())) { vars.SONameFlag = this->Makefile->GetSONameFlag(linkLanguage); targetOutSOName = this->LocalGenerator->ConvertToOutputFormat( - this->TargetNames.SharedObject.c_str(), cmOutputConverter::SHELL); + this->TargetNames.SharedObject, cmOutputConverter::SHELL); vars.TargetSOName = targetOutSOName.c_str(); } vars.LinkFlags = linkFlags.c_str(); diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index b7af859..a101a81 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -2272,10 +2272,9 @@ cmQtAutoMocUicT::JobDepFilesMergeT::initialDependencies() const void cmQtAutoMocUicT::JobDepFilesMergeT::Process() { if (this->Log().Verbose()) { - this->Log().Info( - GenT::MOC, - cmStrCat("Merging MOC dependencies into ", - this->MessagePath(this->BaseConst().DepFile.c_str()))); + this->Log().Info(GenT::MOC, + cmStrCat("Merging MOC dependencies into ", + this->MessagePath(this->BaseConst().DepFile))); } auto processDepFile = [this](const std::string& mocOutputFile) -> std::vector { -- cgit v0.12 From 2c27968619df59034af8b36d377d5f56aff3d484 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 17:13:45 -0400 Subject: clang-tidy: ignore warnings new in version 16 These warnings can be fixed in the future. Ignore them for now. --- .clang-tidy | 1 + 1 file changed, 1 insertion(+) diff --git a/.clang-tidy b/.clang-tidy index c790467..1b776e1 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -15,6 +15,7 @@ misc-*,\ -misc-no-recursion,\ -misc-non-private-member-variables-in-classes,\ -misc-static-assert,\ +-misc-use-anonymous-namespace,\ modernize-*,\ -modernize-avoid-c-arrays,\ -modernize-macro-to-enum,\ -- cgit v0.12 From ce3ec02bb285d551fbf98910cc8c86461501e328 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 13:35:09 -0400 Subject: clang-tidy module: Drop unused variable --- Utilities/ClangTidyModule/UsePragmaOnceCheck.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/Utilities/ClangTidyModule/UsePragmaOnceCheck.cxx b/Utilities/ClangTidyModule/UsePragmaOnceCheck.cxx index 7a42798..37ecd70 100644 --- a/Utilities/ClangTidyModule/UsePragmaOnceCheck.cxx +++ b/Utilities/ClangTidyModule/UsePragmaOnceCheck.cxx @@ -218,8 +218,6 @@ public: this ->EndIfs[this->Ifndefs[MacroEntry.first.getIdentifierInfo()].first]; - StringRef CurHeaderGuard = - MacroEntry.first.getIdentifierInfo()->getName(); std::vector FixIts; HeaderSearch& HeaderInfo = this->PP->getHeaderSearchInfo(); -- cgit v0.12 From fad150d314d11c3c0a8ff2619b1f872e2199fb41 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 13:35:25 -0400 Subject: clang-tidy module: Update to build against LLVM/Clang 16 --- Utilities/ClangTidyModule/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Utilities/ClangTidyModule/CMakeLists.txt b/Utilities/ClangTidyModule/CMakeLists.txt index 97c176f..582d54a 100644 --- a/Utilities/ClangTidyModule/CMakeLists.txt +++ b/Utilities/ClangTidyModule/CMakeLists.txt @@ -6,11 +6,15 @@ project(CMakeClangTidyModule C CXX) get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH) get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH) -set(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - find_package(Clang REQUIRED) +if(LLVM_VERSION_MAJOR GREATER_EQUAL 16) + set(CMAKE_CXX_STANDARD 17) +else() + set(CMAKE_CXX_STANDARD 14) +endif() +set(CMAKE_CXX_STANDARD_REQUIRED ON) + add_library(cmake-clang-tidy-module MODULE Module.cxx -- cgit v0.12 From d9d061d19f60a858e10ea24e19ba58003b487c7f Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 16:11:57 -0400 Subject: ci: Disable sccache in clang-analyzer job The `ccc-analyzer` compiler wrapper preprocesses differently for clang-analyzer than for normal compilation. In particular, the `__clang_analyzer__` preprocessor definition is added. This does not interact well with `sccache` because it indexes based on the compiler's normal preprocessing but stores results from the entire `ccc-analyzer` invocation. --- .gitlab/ci/configure_fedora37_clang_analyzer.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab/ci/configure_fedora37_clang_analyzer.cmake b/.gitlab/ci/configure_fedora37_clang_analyzer.cmake index f4c4cdd..943c926 100644 --- a/.gitlab/ci/configure_fedora37_clang_analyzer.cmake +++ b/.gitlab/ci/configure_fedora37_clang_analyzer.cmake @@ -1 +1,3 @@ +set(configure_no_sccache 1) + include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora37_common.cmake") -- cgit v0.12 From 9c388fb064cd4c0d177a088afd909934fca632c9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 08:26:20 -0400 Subject: ci: Remove nlohmann-json from Fedora base image Revert commit f24c6ae5b8 (ci: Add nlohmann-json to Fedora base image, 2023-05-17). The previously-upcoming dependency on nlohmann-json has been replaced with our existing dependency on jsoncpp. --- .gitlab/ci/docker/fedora37/deps_packages.lst | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab/ci/docker/fedora37/deps_packages.lst b/.gitlab/ci/docker/fedora37/deps_packages.lst index 68777f0..c7c1385 100644 --- a/.gitlab/ci/docker/fedora37/deps_packages.lst +++ b/.gitlab/ci/docker/fedora37/deps_packages.lst @@ -19,7 +19,6 @@ make bzip2-devel expat-devel jsoncpp-devel -json-devel libarchive-devel libcurl-devel libuv-devel -- cgit v0.12 From b69c63d3aa07f2e653091602b08140f782d01084 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 09:46:17 -0400 Subject: ci: update Linux image to Fedora 38 --- .gitlab/ci/docker/fedora37/Dockerfile | 58 -------------- .gitlab/ci/docker/fedora37/deps_packages.lst | 115 --------------------------- .gitlab/ci/docker/fedora37/install_deps.sh | 31 -------- .gitlab/ci/docker/fedora37/install_iwyu.sh | 42 ---------- .gitlab/ci/docker/fedora37/install_rvm.sh | 25 ------ .gitlab/ci/docker/fedora37/iwyu_packages.lst | 7 -- .gitlab/ci/docker/fedora37/rvm_packages.lst | 18 ----- .gitlab/ci/docker/fedora38/Dockerfile | 58 ++++++++++++++ .gitlab/ci/docker/fedora38/deps_packages.lst | 115 +++++++++++++++++++++++++++ .gitlab/ci/docker/fedora38/install_deps.sh | 31 ++++++++ .gitlab/ci/docker/fedora38/install_iwyu.sh | 42 ++++++++++ .gitlab/ci/docker/fedora38/install_rvm.sh | 25 ++++++ .gitlab/ci/docker/fedora38/iwyu_packages.lst | 7 ++ .gitlab/ci/docker/fedora38/rvm_packages.lst | 18 +++++ 14 files changed, 296 insertions(+), 296 deletions(-) delete mode 100644 .gitlab/ci/docker/fedora37/Dockerfile delete mode 100644 .gitlab/ci/docker/fedora37/deps_packages.lst delete mode 100755 .gitlab/ci/docker/fedora37/install_deps.sh delete mode 100755 .gitlab/ci/docker/fedora37/install_iwyu.sh delete mode 100755 .gitlab/ci/docker/fedora37/install_rvm.sh delete mode 100644 .gitlab/ci/docker/fedora37/iwyu_packages.lst delete mode 100644 .gitlab/ci/docker/fedora37/rvm_packages.lst create mode 100644 .gitlab/ci/docker/fedora38/Dockerfile create mode 100644 .gitlab/ci/docker/fedora38/deps_packages.lst create mode 100755 .gitlab/ci/docker/fedora38/install_deps.sh create mode 100755 .gitlab/ci/docker/fedora38/install_iwyu.sh create mode 100755 .gitlab/ci/docker/fedora38/install_rvm.sh create mode 100644 .gitlab/ci/docker/fedora38/iwyu_packages.lst create mode 100644 .gitlab/ci/docker/fedora38/rvm_packages.lst diff --git a/.gitlab/ci/docker/fedora37/Dockerfile b/.gitlab/ci/docker/fedora37/Dockerfile deleted file mode 100644 index 5439e9d..0000000 --- a/.gitlab/ci/docker/fedora37/Dockerfile +++ /dev/null @@ -1,58 +0,0 @@ -# syntax=docker/dockerfile:1 - -ARG BASE_IMAGE=fedora:37 - -FROM ${BASE_IMAGE} AS dnf-cache -# Populate DNF cache w/ the fresh metadata and prefetch packages. -RUN --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \ - --mount=type=bind,source=iwyu_packages.lst,target=/root/iwyu_packages.lst \ - --mount=type=bind,source=rvm_packages.lst,target=/root/rvm_packages.lst \ - --mount=type=tmpfs,target=/var/log \ - --mount=type=tmpfs,target=/tmp \ - dnf install \ - --setopt=install_weak_deps=False \ - --setopt=fastestmirror=True \ - --setopt=max_parallel_downloads=10 \ - --downloadonly \ - -y \ - $(grep -h '^[^#]\+$' /root/*.lst) - - -FROM ${BASE_IMAGE} AS rvm-build -LABEL maintainer="Ben Boeckel " - -RUN --mount=type=bind,source=install_rvm.sh,target=/root/install_rvm.sh \ - --mount=type=bind,source=rvm_packages.lst,target=/root/rvm_packages.lst \ - --mount=type=cache,from=dnf-cache,source=/var/cache/dnf,target=/var/cache/dnf,sharing=private \ - --mount=type=tmpfs,target=/var/log \ - --mount=type=tmpfs,target=/tmp \ - sh /root/install_rvm.sh - - -FROM ${BASE_IMAGE} AS iwyu-build -LABEL maintainer="Kyle Edwards " - -RUN --mount=type=bind,source=install_iwyu.sh,target=/root/install_iwyu.sh \ - --mount=type=bind,source=iwyu_packages.lst,target=/root/iwyu_packages.lst \ - --mount=type=cache,from=dnf-cache,source=/var/cache/dnf,target=/var/cache/dnf,sharing=private \ - --mount=type=tmpfs,target=/var/log \ - --mount=type=tmpfs,target=/tmp \ - sh /root/install_iwyu.sh - - -FROM ${BASE_IMAGE} -LABEL maintainer="Ben Boeckel " - -RUN --mount=type=bind,source=install_deps.sh,target=/root/install_deps.sh \ - --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \ - --mount=type=cache,from=dnf-cache,source=/var/cache/dnf,target=/var/cache/dnf,sharing=private \ - --mount=type=cache,target=/var/cache/pip \ - --mount=type=tmpfs,target=/var/log \ - --mount=type=tmpfs,target=/tmp \ - sh /root/install_deps.sh - -RUN --mount=type=bind,from=rvm-build,source=/root,target=/root \ - tar -C /usr/local -xf /root/rvm.tar - -RUN --mount=type=bind,from=iwyu-build,source=/root,target=/root \ - tar -C / -xf /root/iwyu.tar diff --git a/.gitlab/ci/docker/fedora37/deps_packages.lst b/.gitlab/ci/docker/fedora37/deps_packages.lst deleted file mode 100644 index c7c1385..0000000 --- a/.gitlab/ci/docker/fedora37/deps_packages.lst +++ /dev/null @@ -1,115 +0,0 @@ -# Install build requirements. -ncurses-devel -openssl-devel -qt5-qtbase-devel -qt6-qtbase-devel - -# Install development tools. -clang -clang-tools-extra -clang-tools-extra-devel -compiler-rt -flang -flang-devel -gcc-c++ -git-core -make - -# Install optional external build dependencies. -bzip2-devel -expat-devel -jsoncpp-devel -libarchive-devel -libcurl-devel -libuv-devel -libuv-devel -libzstd-devel -rhash-devel -xz-devel -zlib-devel - -# Install documentation tools. -python3-sphinx -texinfo -qt5-qttools-devel -qt6-qttools-devel - -# Install lint tools. -clang-analyzer -codespell - -# Tools needed for the test suite. -findutils -file -jq -which - -# Packages needed to test CTest. -breezy -subversion -mercurial - -# Packages needed to test CPack. -rpm-build - -# Packages needed to test find modules. -alsa-lib-devel -blas-devel -boost-devel boost-python3-devel -bzip2-devel -cups-devel -DevIL-devel -doxygen -expat-devel -fontconfig-devel -freeglut-devel -freetype-devel -gdal-devel -gettext -giflib-devel -glew-devel -gmock -gnutls-devel -grpc-devel grpc-plugins -gsl-devel -gtest-devel -gtk2-devel -hdf5-devel -hdf5-mpich-devel -hdf5-openmpi-devel -ImageMagick-c++-devel -java-11-openjdk-devel -jsoncpp-devel -lapack-devel -libarchive-devel -libcurl-devel -libicu-devel -libinput-devel systemd-devel -libjpeg-turbo-devel -libpng-devel -opensp-devel -postgresql-server-devel -libtiff-devel -libuv-devel -libxml2-devel -libxslt-devel -mpich-devel -openal-soft-devel -openmpi-devel -patch -perl -protobuf-devel protobuf-c-devel protobuf-lite-devel -pypy2 pypy2-devel -pypy3 pypy3-devel -python2 python2-devel -python3 python3-devel python3-numpy -python3-jsmin python3-jsonschema -ruby rubygems ruby-devel -SDL-devel -sqlite-devel -swig -unixODBC-devel -wxGTK-devel -xalan-c-devel -xerces-c-devel -xz-devel diff --git a/.gitlab/ci/docker/fedora37/install_deps.sh b/.gitlab/ci/docker/fedora37/install_deps.sh deleted file mode 100755 index cd2701e..0000000 --- a/.gitlab/ci/docker/fedora37/install_deps.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -set -e - -dnf install \ - --setopt=install_weak_deps=False \ - --setopt=fastestmirror=True \ - --setopt=max_parallel_downloads=10 \ - -y \ - $(grep '^[^#]\+$' /root/deps_packages.lst) - -# Fedora no longer packages python2 numpy. -curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o - | python2 -pip2.7 install --disable-pip-version-check --no-input --no-compile --cache-dir /var/cache/pip numpy - -# Remove demos and Python2 tests -for p in Demo test; do - rm -rf /usr/lib64/python2.7/${p} -done - -# Remove tests for numpy -for v in 2.7 3.11; do - find /usr/lib64/python${v}/site-packages/numpy -type d -a -name tests -exec rm -rf {} + -done - -# Remove some other packages tests -find /usr/lib64/python3.11/site-packages/breezy -type d -a -name tests -exec rm -rf {} + - -# Perforce -curl -L https://www.perforce.com/downloads/perforce/r21.2/bin.linux26x86_64/helix-core-server.tgz -o - \ - | tar -C /usr/local/bin -xvzf - -- p4 p4d diff --git a/.gitlab/ci/docker/fedora37/install_iwyu.sh b/.gitlab/ci/docker/fedora37/install_iwyu.sh deleted file mode 100755 index 684e355..0000000 --- a/.gitlab/ci/docker/fedora37/install_iwyu.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -set -e - -# Install development tools. -dnf install \ - --setopt=install_weak_deps=False \ - --setopt=fastestmirror=True \ - --setopt=max_parallel_downloads=10 \ - -y \ - $(grep '^[^#]\+$' /root/iwyu_packages.lst) - -cd /root -git clone "https://github.com/include-what-you-use/include-what-you-use.git" -cd include-what-you-use -readonly llvm_full_version="$( clang --version | head -n1 | cut -d' ' -f3 )" -readonly llvm_version="$( echo "$llvm_full_version" | cut -d. -f-1 )" -git checkout "clang_$llvm_version" -git apply < Date: Mon, 22 May 2023 12:50:13 -0400 Subject: ci: use Fedora 38 images and environments --- .gitlab-ci.yml | 68 +++++++------- .gitlab/ci/configure_fedora37_asan.cmake | 4 - .gitlab/ci/configure_fedora37_clang_analyzer.cmake | 3 - .gitlab/ci/configure_fedora37_common.cmake | 7 -- .gitlab/ci/configure_fedora37_common_clang.cmake | 6 -- .gitlab/ci/configure_fedora37_extdeps.cmake | 1 - .gitlab/ci/configure_fedora37_makefiles.cmake | 100 --------------------- .../ci/configure_fedora37_makefiles_clang.cmake | 1 - .gitlab/ci/configure_fedora37_ninja.cmake | 14 --- .gitlab/ci/configure_fedora37_ninja_clang.cmake | 1 - .gitlab/ci/configure_fedora37_ninja_multi.cmake | 5 -- .gitlab/ci/configure_fedora37_sphinx.cmake | 2 - .gitlab/ci/configure_fedora37_sphinx_package.cmake | 13 --- .gitlab/ci/configure_fedora37_tidy.cmake | 5 -- .gitlab/ci/configure_fedora38_asan.cmake | 4 + .gitlab/ci/configure_fedora38_clang_analyzer.cmake | 3 + .gitlab/ci/configure_fedora38_common.cmake | 7 ++ .gitlab/ci/configure_fedora38_common_clang.cmake | 6 ++ .gitlab/ci/configure_fedora38_extdeps.cmake | 1 + .gitlab/ci/configure_fedora38_makefiles.cmake | 100 +++++++++++++++++++++ .../ci/configure_fedora38_makefiles_clang.cmake | 1 + .gitlab/ci/configure_fedora38_ninja.cmake | 14 +++ .gitlab/ci/configure_fedora38_ninja_clang.cmake | 1 + .gitlab/ci/configure_fedora38_ninja_multi.cmake | 5 ++ .gitlab/ci/configure_fedora38_sphinx.cmake | 2 + .gitlab/ci/configure_fedora38_sphinx_package.cmake | 13 +++ .gitlab/ci/configure_fedora38_tidy.cmake | 5 ++ .gitlab/ci/ctest_memcheck_fedora37_asan.lsan.supp | 1 - .gitlab/ci/ctest_memcheck_fedora38_asan.lsan.supp | 1 + .gitlab/ci/env_fedora37_asan.sh | 2 - .gitlab/ci/env_fedora37_clang_analyzer.sh | 2 - .gitlab/ci/env_fedora37_common_clang.sh | 4 - .gitlab/ci/env_fedora37_extdeps.sh | 1 - .gitlab/ci/env_fedora37_makefiles.cmake | 1 - .gitlab/ci/env_fedora37_makefiles.sh | 8 -- .gitlab/ci/env_fedora37_makefiles_clang.sh | 1 - .gitlab/ci/env_fedora37_ninja.sh | 3 - .gitlab/ci/env_fedora37_ninja_clang.sh | 1 - .gitlab/ci/env_fedora37_ninja_multi.sh | 3 - .gitlab/ci/env_fedora38_asan.sh | 2 + .gitlab/ci/env_fedora38_clang_analyzer.sh | 2 + .gitlab/ci/env_fedora38_common_clang.sh | 4 + .gitlab/ci/env_fedora38_extdeps.sh | 1 + .gitlab/ci/env_fedora38_makefiles.cmake | 1 + .gitlab/ci/env_fedora38_makefiles.sh | 8 ++ .gitlab/ci/env_fedora38_makefiles_clang.sh | 1 + .gitlab/ci/env_fedora38_ninja.sh | 3 + .gitlab/ci/env_fedora38_ninja_clang.sh | 1 + .gitlab/ci/env_fedora38_ninja_multi.sh | 3 + .gitlab/ci/pre_build_fedora37_tidy.sh | 9 -- .gitlab/ci/pre_build_fedora38_tidy.sh | 9 ++ .gitlab/os-linux.yml | 76 ++++++++-------- .gitlab/upload.yml | 4 +- 53 files changed, 272 insertions(+), 272 deletions(-) delete mode 100644 .gitlab/ci/configure_fedora37_asan.cmake delete mode 100644 .gitlab/ci/configure_fedora37_clang_analyzer.cmake delete mode 100644 .gitlab/ci/configure_fedora37_common.cmake delete mode 100644 .gitlab/ci/configure_fedora37_common_clang.cmake delete mode 100644 .gitlab/ci/configure_fedora37_extdeps.cmake delete mode 100644 .gitlab/ci/configure_fedora37_makefiles.cmake delete mode 100644 .gitlab/ci/configure_fedora37_makefiles_clang.cmake delete mode 100644 .gitlab/ci/configure_fedora37_ninja.cmake delete mode 100644 .gitlab/ci/configure_fedora37_ninja_clang.cmake delete mode 100644 .gitlab/ci/configure_fedora37_ninja_multi.cmake delete mode 100644 .gitlab/ci/configure_fedora37_sphinx.cmake delete mode 100644 .gitlab/ci/configure_fedora37_sphinx_package.cmake delete mode 100644 .gitlab/ci/configure_fedora37_tidy.cmake create mode 100644 .gitlab/ci/configure_fedora38_asan.cmake create mode 100644 .gitlab/ci/configure_fedora38_clang_analyzer.cmake create mode 100644 .gitlab/ci/configure_fedora38_common.cmake create mode 100644 .gitlab/ci/configure_fedora38_common_clang.cmake create mode 100644 .gitlab/ci/configure_fedora38_extdeps.cmake create mode 100644 .gitlab/ci/configure_fedora38_makefiles.cmake create mode 100644 .gitlab/ci/configure_fedora38_makefiles_clang.cmake create mode 100644 .gitlab/ci/configure_fedora38_ninja.cmake create mode 100644 .gitlab/ci/configure_fedora38_ninja_clang.cmake create mode 100644 .gitlab/ci/configure_fedora38_ninja_multi.cmake create mode 100644 .gitlab/ci/configure_fedora38_sphinx.cmake create mode 100644 .gitlab/ci/configure_fedora38_sphinx_package.cmake create mode 100644 .gitlab/ci/configure_fedora38_tidy.cmake delete mode 100644 .gitlab/ci/ctest_memcheck_fedora37_asan.lsan.supp create mode 100644 .gitlab/ci/ctest_memcheck_fedora38_asan.lsan.supp delete mode 100644 .gitlab/ci/env_fedora37_asan.sh delete mode 100644 .gitlab/ci/env_fedora37_clang_analyzer.sh delete mode 100644 .gitlab/ci/env_fedora37_common_clang.sh delete mode 100644 .gitlab/ci/env_fedora37_extdeps.sh delete mode 100644 .gitlab/ci/env_fedora37_makefiles.cmake delete mode 100644 .gitlab/ci/env_fedora37_makefiles.sh delete mode 100644 .gitlab/ci/env_fedora37_makefiles_clang.sh delete mode 100644 .gitlab/ci/env_fedora37_ninja.sh delete mode 100644 .gitlab/ci/env_fedora37_ninja_clang.sh delete mode 100644 .gitlab/ci/env_fedora37_ninja_multi.sh create mode 100644 .gitlab/ci/env_fedora38_asan.sh create mode 100644 .gitlab/ci/env_fedora38_clang_analyzer.sh create mode 100644 .gitlab/ci/env_fedora38_common_clang.sh create mode 100644 .gitlab/ci/env_fedora38_extdeps.sh create mode 100644 .gitlab/ci/env_fedora38_makefiles.cmake create mode 100644 .gitlab/ci/env_fedora38_makefiles.sh create mode 100644 .gitlab/ci/env_fedora38_makefiles_clang.sh create mode 100644 .gitlab/ci/env_fedora38_ninja.sh create mode 100644 .gitlab/ci/env_fedora38_ninja_clang.sh create mode 100644 .gitlab/ci/env_fedora38_ninja_multi.sh delete mode 100644 .gitlab/ci/pre_build_fedora37_tidy.sh create mode 100644 .gitlab/ci/pre_build_fedora38_tidy.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 305c8d2..74c8104 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,7 +55,7 @@ p:source-package: p:doc-package: extends: - - .fedora37_sphinx_package + - .fedora38_sphinx_package - .cmake_prep_doc_linux - .linux_x86_64_tags - .cmake_doc_artifacts @@ -103,16 +103,16 @@ l:iwyu-debian10: - .linux_x86_64_tags - .run_automatically -l:tidy-fedora37: +l:tidy-fedora38: extends: - - .fedora37_tidy + - .fedora38_tidy - .cmake_build_linux - .linux_x86_64_tags - .run_automatically -l:sphinx-fedora37: +l:sphinx-fedora38: extends: - - .fedora37_sphinx + - .fedora38_sphinx - .cmake_build_linux - .cmake_sphinx_artifacts - .linux_x86_64_tags @@ -121,9 +121,9 @@ l:sphinx-fedora37: CMAKE_CI_JOB_CONTINUOUS: "true" CMAKE_CI_JOB_HELP: "true" -l:clang-analyzer-fedora37: +l:clang-analyzer-fedora38: extends: - - .fedora37_clang_analyzer + - .fedora38_clang_analyzer - .cmake_build_linux - .linux_x86_64_tags - .run_automatically @@ -195,9 +195,9 @@ t:debian10-makefiles-clang: variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:fedora37-ninja-clang: +t:fedora38-ninja-clang: extends: - - .fedora37_ninja_clang + - .fedora38_ninja_clang - .cmake_test_linux_release - .linux_x86_64_tags - .run_dependent @@ -205,9 +205,9 @@ t:fedora37-ninja-clang: variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:fedora37-makefiles-clang: +t:fedora38-makefiles-clang: extends: - - .fedora37_makefiles_clang + - .fedora38_makefiles_clang - .cmake_test_linux_release - .linux_x86_64_tags - .run_dependent @@ -215,17 +215,17 @@ t:fedora37-makefiles-clang: variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:fedora37-makefiles: +t:fedora38-makefiles: extends: - - .fedora37_makefiles + - .fedora38_makefiles - .cmake_test_linux_release - .linux_x86_64_tags - .run_dependent - .needs_centos6_x86_64 -t:fedora37-makefiles-nospace: +t:fedora38-makefiles-nospace: extends: - - .fedora37_makefiles + - .fedora38_makefiles - .cmake_test_linux_release - .linux_x86_64_tags - .cmake_junit_artifacts @@ -233,7 +233,7 @@ t:fedora37-makefiles-nospace: - .needs_centos6_x86_64 variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake-ci" - CMAKE_CI_BUILD_NAME: fedora37_makefiles_nospace + CMAKE_CI_BUILD_NAME: fedora38_makefiles_nospace CMAKE_CI_JOB_NIGHTLY: "true" t:nvhpc22.11-ninja: @@ -354,9 +354,9 @@ t:linux-clang-cxx-modules-ninja-multi: variables: CMAKE_CI_JOB_NIGHTLY: "true" -b:fedora37-ninja: +b:fedora38-ninja: extends: - - .fedora37_ninja + - .fedora38_ninja - .cmake_build_linux - .cmake_build_artifacts - .linux_x86_64_tags @@ -391,40 +391,40 @@ b:debian10-aarch64-extdeps: variables: CMAKE_CI_JOB_NIGHTLY: "true" -b:fedora37-extdeps: +b:fedora38-extdeps: extends: - - .fedora37_extdeps + - .fedora38_extdeps - .cmake_build_linux_standalone - .linux_x86_64_tags - .run_manually variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:fedora37-ninja: +t:fedora38-ninja: extends: - - .fedora37_ninja + - .fedora38_ninja - .cmake_test_linux - .linux_x86_64_tags_x11 - .cmake_test_artifacts - .run_dependent dependencies: - - b:fedora37-ninja + - b:fedora38-ninja needs: - - b:fedora37-ninja + - b:fedora38-ninja variables: CMAKE_CI_JOB_CONTINUOUS: "true" -t:fedora37-ninja-multi: +t:fedora38-ninja-multi: extends: - - .fedora37_ninja_multi + - .fedora38_ninja_multi - .cmake_test_linux_external - .linux_x86_64_tags - .cmake_junit_artifacts - .run_dependent dependencies: - - t:fedora37-ninja + - t:fedora38-ninja needs: - - t:fedora37-ninja + - t:fedora38-ninja t:intel2016-makefiles: extends: @@ -791,9 +791,9 @@ u:linux-aarch64-package: ## Sanitizer builds -b:fedora37-asan: +b:fedora38-asan: extends: - - .fedora37_asan + - .fedora38_asan - .cmake_build_linux - .cmake_build_artifacts - .linux_x86_64_tags @@ -801,16 +801,16 @@ b:fedora37-asan: variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:fedora37-asan: +t:fedora38-asan: extends: - - .fedora37_asan + - .fedora38_asan - .cmake_memcheck_linux - .linux_x86_64_tags - .run_dependent dependencies: - - b:fedora37-asan + - b:fedora38-asan needs: - - b:fedora37-asan + - b:fedora38-asan variables: CMAKE_CI_JOB_NIGHTLY: "true" diff --git a/.gitlab/ci/configure_fedora37_asan.cmake b/.gitlab/ci/configure_fedora37_asan.cmake deleted file mode 100644 index 363e953..0000000 --- a/.gitlab/ci/configure_fedora37_asan.cmake +++ /dev/null @@ -1,4 +0,0 @@ -set(CMAKE_C_FLAGS "-fsanitize=address" CACHE STRING "") -set(CMAKE_CXX_FLAGS "-fsanitize=address" CACHE STRING "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora37_common.cmake") diff --git a/.gitlab/ci/configure_fedora37_clang_analyzer.cmake b/.gitlab/ci/configure_fedora37_clang_analyzer.cmake deleted file mode 100644 index 943c926..0000000 --- a/.gitlab/ci/configure_fedora37_clang_analyzer.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set(configure_no_sccache 1) - -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora37_common.cmake") diff --git a/.gitlab/ci/configure_fedora37_common.cmake b/.gitlab/ci/configure_fedora37_common.cmake deleted file mode 100644 index 4484e26..0000000 --- a/.gitlab/ci/configure_fedora37_common.cmake +++ /dev/null @@ -1,7 +0,0 @@ -set(BUILD_CursesDialog ON CACHE BOOL "") -set(BUILD_QtDialog ON CACHE BOOL "") -set(CMake_QT_MAJOR_VERSION "5" CACHE STRING "") -set(CMake_TEST_JQ "/usr/bin/jq" CACHE PATH "") -set(CMake_TEST_JSON_SCHEMA ON CACHE BOOL "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_fedora37_common_clang.cmake b/.gitlab/ci/configure_fedora37_common_clang.cmake deleted file mode 100644 index 70c9df9..0000000 --- a/.gitlab/ci/configure_fedora37_common_clang.cmake +++ /dev/null @@ -1,6 +0,0 @@ -set(CMAKE_Fortran_COMPILER "/usr/bin/flang-new" CACHE FILEPATH "") -set(CMAKE_Fortran_COMPILER_ID "LLVMFlang" CACHE STRING "") -set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 "1" CACHE BOOL "") -set(CMAKE_Fortran_FLAGS "-flang-experimental-exec" CACHE STRING "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_fedora37_extdeps.cmake b/.gitlab/ci/configure_fedora37_extdeps.cmake deleted file mode 100644 index 8e545f5..0000000 --- a/.gitlab/ci/configure_fedora37_extdeps.cmake +++ /dev/null @@ -1 +0,0 @@ -include("${CMAKE_CURRENT_LIST_DIR}/configure_extdeps_common.cmake") diff --git a/.gitlab/ci/configure_fedora37_makefiles.cmake b/.gitlab/ci/configure_fedora37_makefiles.cmake deleted file mode 100644 index c2f9982..0000000 --- a/.gitlab/ci/configure_fedora37_makefiles.cmake +++ /dev/null @@ -1,100 +0,0 @@ -set(CMake_TEST_CTestUpdate_BZR "ON" CACHE BOOL "") -set(CMake_TEST_CTestUpdate_GIT "ON" CACHE BOOL "") -set(CMake_TEST_CTestUpdate_HG "ON" CACHE BOOL "") -set(CMake_TEST_CTestUpdate_SVN "ON" CACHE BOOL "") -if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") - set(CMake_TEST_CTestUpdate_P4 "ON" CACHE BOOL "") -endif() - -set(CMake_TEST_FindALSA "ON" CACHE BOOL "") -set(CMake_TEST_FindBLAS "All;static=1;Generic" CACHE STRING "") -set(CMake_TEST_FindBoost "ON" CACHE BOOL "") -set(CMake_TEST_FindBoost_Python "ON" CACHE BOOL "") -set(CMake_TEST_FindBZip2 "ON" CACHE BOOL "") -set(CMake_TEST_FindCups "ON" CACHE BOOL "") -set(CMake_TEST_FindCURL "ON" CACHE BOOL "") -set(CMake_TEST_FindDevIL "ON" CACHE BOOL "") -set(CMake_TEST_FindDoxygen_Dot "ON" CACHE BOOL "") -set(CMake_TEST_FindDoxygen "ON" CACHE BOOL "") -set(CMake_TEST_FindEXPAT "ON" CACHE BOOL "") -set(CMake_TEST_FindFontconfig "ON" CACHE BOOL "") -set(CMake_TEST_FindFreetype "ON" CACHE BOOL "") -set(CMake_TEST_FindGDAL "ON" CACHE BOOL "") -set(CMake_TEST_FindGIF "ON" CACHE BOOL "") -set(CMake_TEST_FindGit "ON" CACHE BOOL "") -set(CMake_TEST_FindGLEW "ON" CACHE BOOL "") -set(CMake_TEST_FindGLUT "ON" CACHE BOOL "") -set(CMake_TEST_FindGnuTLS "ON" CACHE BOOL "") -set(CMake_TEST_FindGSL "ON" CACHE BOOL "") -set(CMake_TEST_FindGTest "ON" CACHE BOOL "") -set(CMake_TEST_FindGTK2 "ON" CACHE BOOL "") -set(CMake_TEST_FindHDF5 "ON" CACHE BOOL "") -set(CMake_TEST_FindHDF5_MPICH_C_COMPILER "/usr/lib64/mpich/bin/h5pcc" CACHE FILEPATH "") -# set(CMake_TEST_FindHDF5_MPICH_CXX_COMPILER "/usr/lib64/mpich/bin/h5pc++" CACHE FILEPATH "") # h5pc++ does not exist -set(CMake_TEST_FindHDF5_MPICH_ENVMOD "PATH=path_list_prepend:/usr/lib64/mpich/bin;LD_LIBRARY_PATH=path_list_prepend:/usr/lib64/mpich/lib" CACHE STRING "") -set(CMake_TEST_FindHDF5_MPICH_Fortran_COMPILER "/usr/lib64/mpich/bin/h5pfc" CACHE FILEPATH "") -set(CMake_TEST_FindHDF5_OpenMPI_C_COMPILER "/usr/lib64/openmpi/bin/h5pcc" CACHE FILEPATH "") -set(CMake_TEST_FindHDF5_OpenMPI_ENVMOD "PATH=path_list_prepend:/usr/lib64/openmpi/bin;LD_LIBRARY_PATH=path_list_prepend:/usr/lib64/openmpi/lib" CACHE STRING "") -# set(CMake_TEST_FindHDF5_OpenMPI_CXX_COMPILER "/usr/lib64/openmpi/bin/h5pc++" CACHE FILEPATH "") # h5pc++ does not exist -set(CMake_TEST_FindHDF5_OpenMPI_Fortran_COMPILER "/usr/lib64/openmpi/bin/h5pfc" CACHE FILEPATH "") -set(CMake_TEST_FindHDF5_Serial_C_COMPILER "/usr/bin/h5cc" CACHE FILEPATH "") -set(CMake_TEST_FindHDF5_Serial_CXX_COMPILER "/usr/bin/h5c++" CACHE FILEPATH "") -set(CMake_TEST_FindHDF5_Serial_Fortran_COMPILER "/usr/bin/h5fc" CACHE FILEPATH "") -set(CMake_TEST_FindIconv "ON" CACHE BOOL "") -set(CMake_TEST_FindICU "ON" CACHE BOOL "") -set(CMake_TEST_FindImageMagick "ON" CACHE BOOL "") -set(CMake_TEST_FindIntl "ON" CACHE BOOL "") -set(CMake_TEST_FindJNI "ON" CACHE BOOL "") -set(CMake_TEST_FindJPEG "ON" CACHE BOOL "") -set(CMake_TEST_FindJsonCpp "ON" CACHE BOOL "") -set(CMake_TEST_FindLAPACK "All;static=1;Generic" CACHE STRING "") -set(CMake_TEST_FindLibArchive "ON" CACHE BOOL "") -set(CMake_TEST_FindLibinput "ON" CACHE BOOL "") -set(CMake_TEST_FindLibLZMA "ON" CACHE BOOL "") -set(CMake_TEST_FindLibUV "ON" CACHE BOOL "") -set(CMake_TEST_FindLibXml2 "ON" CACHE BOOL "") -set(CMake_TEST_FindLibXslt "ON" CACHE BOOL "") -set(CMake_TEST_FindMPI_C "ON" CACHE BOOL "") -set(CMake_TEST_FindMPI_CXX "ON" CACHE BOOL "") -set(CMake_TEST_FindMPI_Fortran "ON" CACHE BOOL "") -set(CMake_TEST_FindMPI_ENVMOD "PATH=path_list_prepend:/usr/lib64/mpich/bin;LD_LIBRARY_PATH=path_list_prepend:/usr/lib64/mpich/lib" CACHE STRING "") -set(CMake_TEST_FindMPI "ON" CACHE BOOL "") -set(CMake_TEST_FindODBC "ON" CACHE BOOL "") -set(CMake_TEST_FindOpenACC "ON" CACHE BOOL "") -set(CMake_TEST_FindOpenAL "ON" CACHE BOOL "") -set(CMake_TEST_FindOpenGL "ON" CACHE BOOL "") -set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "") -set(CMake_TEST_FindOpenMP_CXX "ON" CACHE BOOL "") -set(CMake_TEST_FindOpenMP_Fortran "ON" CACHE BOOL "") -set(CMake_TEST_FindOpenMP "ON" CACHE BOOL "") -set(CMake_TEST_FindOpenSP "ON" CACHE BOOL "") -set(CMake_TEST_FindOpenSSL "ON" CACHE BOOL "") -set(CMake_TEST_FindPatch "ON" CACHE BOOL "") -set(CMake_TEST_FindPNG "ON" CACHE BOOL "") -set(CMake_TEST_FindPostgreSQL "ON" CACHE BOOL "") -set(CMake_TEST_FindProtobuf "ON" CACHE BOOL "") -set(CMake_TEST_FindProtobuf_gRPC "ON" CACHE BOOL "") -set(CMake_TEST_FindPython "ON" CACHE BOOL "") -set(CMake_TEST_FindPython_NumPy "ON" CACHE BOOL "") -set(CMake_TEST_FindPython_PyPy "ON" CACHE BOOL "") -set(CMake_TEST_FindRuby "ON" CACHE BOOL "") -set(CMake_TEST_FindRuby_RVM "ON" CACHE BOOL "") -set(CMake_TEST_FindSDL "ON" CACHE BOOL "") -set(CMake_TEST_FindSQLite3 "ON" CACHE BOOL "") -set(CMake_TEST_FindTIFF "ON" CACHE BOOL "") -set(CMake_TEST_FindwxWidgets "ON" CACHE BOOL "") -set(CMake_TEST_FindX11 "ON" CACHE BOOL "") -set(CMake_TEST_FindXalanC "ON" CACHE BOOL "") -set(CMake_TEST_FindXercesC "ON" CACHE BOOL "") -set(CMake_TEST_Fortran_SUBMODULES "ON" CACHE BOOL "") -set(CMake_TEST_IPO_WORKS_C "ON" CACHE BOOL "") -set(CMake_TEST_IPO_WORKS_CXX "ON" CACHE BOOL "") -set(CMake_TEST_IPO_WORKS_Fortran "ON" CACHE BOOL "") -if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") - set(CMake_TEST_ISPC "ON" CACHE STRING "") -endif() -set(CMake_TEST_Qt5 "ON" CACHE BOOL "") -set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") -set(CMake_TEST_UseSWIG "ON" CACHE BOOL "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_fedora37_makefiles_clang.cmake b/.gitlab/ci/configure_fedora37_makefiles_clang.cmake deleted file mode 100644 index 7b82a9a..0000000 --- a/.gitlab/ci/configure_fedora37_makefiles_clang.cmake +++ /dev/null @@ -1 +0,0 @@ -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora37_common_clang.cmake") diff --git a/.gitlab/ci/configure_fedora37_ninja.cmake b/.gitlab/ci/configure_fedora37_ninja.cmake deleted file mode 100644 index 5b40677..0000000 --- a/.gitlab/ci/configure_fedora37_ninja.cmake +++ /dev/null @@ -1,14 +0,0 @@ -set(CMake_TEST_GUI "ON" CACHE BOOL "") -if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") - set(CMake_TEST_ISPC "ON" CACHE STRING "") -endif() -set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") - -# "Release" flags without "-DNDEBUG" so we get assertions. -set(CMAKE_C_FLAGS_RELEASE "-O3" CACHE STRING "") -set(CMAKE_CXX_FLAGS_RELEASE "-O3" CACHE STRING "") - -# Cover compilation with C++11 only and not higher standards. -set(CMAKE_CXX_STANDARD "11" CACHE STRING "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora37_common.cmake") diff --git a/.gitlab/ci/configure_fedora37_ninja_clang.cmake b/.gitlab/ci/configure_fedora37_ninja_clang.cmake deleted file mode 100644 index 7b82a9a..0000000 --- a/.gitlab/ci/configure_fedora37_ninja_clang.cmake +++ /dev/null @@ -1 +0,0 @@ -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora37_common_clang.cmake") diff --git a/.gitlab/ci/configure_fedora37_ninja_multi.cmake b/.gitlab/ci/configure_fedora37_ninja_multi.cmake deleted file mode 100644 index 94af721..0000000 --- a/.gitlab/ci/configure_fedora37_ninja_multi.cmake +++ /dev/null @@ -1,5 +0,0 @@ -if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") - set(CMake_TEST_ISPC "ON" CACHE STRING "") -endif() - -include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_fedora37_sphinx.cmake b/.gitlab/ci/configure_fedora37_sphinx.cmake deleted file mode 100644 index 90d159b..0000000 --- a/.gitlab/ci/configure_fedora37_sphinx.cmake +++ /dev/null @@ -1,2 +0,0 @@ -include("${CMAKE_CURRENT_LIST_DIR}/configure_sphinx.cmake") -include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_fedora37_sphinx_package.cmake b/.gitlab/ci/configure_fedora37_sphinx_package.cmake deleted file mode 100644 index e839de8..0000000 --- a/.gitlab/ci/configure_fedora37_sphinx_package.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# Disable formats not wanted in the package's documentation. -set(SPHINX_INFO OFF CACHE BOOL "") -set(SPHINX_SINGLEHTML OFF CACHE BOOL "") -set(SPHINX_TEXT OFF CACHE BOOL "") - -# Set the destination directory for docs that packages expect. -set(CMAKE_DOC_DIR "doc/cmake" CACHE STRING "") - -# Use a custom prefix to avoid conflicting with other builds. -set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install-doc" CACHE PATH "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_sphinx.cmake") -include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_fedora37_tidy.cmake b/.gitlab/ci/configure_fedora37_tidy.cmake deleted file mode 100644 index f8eb9ab..0000000 --- a/.gitlab/ci/configure_fedora37_tidy.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(CMake_RUN_CLANG_TIDY ON CACHE BOOL "") -set(CMake_USE_CLANG_TIDY_MODULE ON CACHE BOOL "") -set(CMake_CLANG_TIDY_MODULE "$ENV{CI_PROJECT_DIR}/Utilities/ClangTidyModule/build/libcmake-clang-tidy-module.so" CACHE FILEPATH "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora37_common.cmake") diff --git a/.gitlab/ci/configure_fedora38_asan.cmake b/.gitlab/ci/configure_fedora38_asan.cmake new file mode 100644 index 0000000..8eae500 --- /dev/null +++ b/.gitlab/ci/configure_fedora38_asan.cmake @@ -0,0 +1,4 @@ +set(CMAKE_C_FLAGS "-fsanitize=address" CACHE STRING "") +set(CMAKE_CXX_FLAGS "-fsanitize=address" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common.cmake") diff --git a/.gitlab/ci/configure_fedora38_clang_analyzer.cmake b/.gitlab/ci/configure_fedora38_clang_analyzer.cmake new file mode 100644 index 0000000..c11eef1 --- /dev/null +++ b/.gitlab/ci/configure_fedora38_clang_analyzer.cmake @@ -0,0 +1,3 @@ +set(configure_no_sccache 1) + +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common.cmake") diff --git a/.gitlab/ci/configure_fedora38_common.cmake b/.gitlab/ci/configure_fedora38_common.cmake new file mode 100644 index 0000000..4484e26 --- /dev/null +++ b/.gitlab/ci/configure_fedora38_common.cmake @@ -0,0 +1,7 @@ +set(BUILD_CursesDialog ON CACHE BOOL "") +set(BUILD_QtDialog ON CACHE BOOL "") +set(CMake_QT_MAJOR_VERSION "5" CACHE STRING "") +set(CMake_TEST_JQ "/usr/bin/jq" CACHE PATH "") +set(CMake_TEST_JSON_SCHEMA ON CACHE BOOL "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_fedora38_common_clang.cmake b/.gitlab/ci/configure_fedora38_common_clang.cmake new file mode 100644 index 0000000..70c9df9 --- /dev/null +++ b/.gitlab/ci/configure_fedora38_common_clang.cmake @@ -0,0 +1,6 @@ +set(CMAKE_Fortran_COMPILER "/usr/bin/flang-new" CACHE FILEPATH "") +set(CMAKE_Fortran_COMPILER_ID "LLVMFlang" CACHE STRING "") +set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 "1" CACHE BOOL "") +set(CMAKE_Fortran_FLAGS "-flang-experimental-exec" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_fedora38_extdeps.cmake b/.gitlab/ci/configure_fedora38_extdeps.cmake new file mode 100644 index 0000000..8e545f5 --- /dev/null +++ b/.gitlab/ci/configure_fedora38_extdeps.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_extdeps_common.cmake") diff --git a/.gitlab/ci/configure_fedora38_makefiles.cmake b/.gitlab/ci/configure_fedora38_makefiles.cmake new file mode 100644 index 0000000..c2f9982 --- /dev/null +++ b/.gitlab/ci/configure_fedora38_makefiles.cmake @@ -0,0 +1,100 @@ +set(CMake_TEST_CTestUpdate_BZR "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_GIT "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_HG "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_SVN "ON" CACHE BOOL "") +if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") + set(CMake_TEST_CTestUpdate_P4 "ON" CACHE BOOL "") +endif() + +set(CMake_TEST_FindALSA "ON" CACHE BOOL "") +set(CMake_TEST_FindBLAS "All;static=1;Generic" CACHE STRING "") +set(CMake_TEST_FindBoost "ON" CACHE BOOL "") +set(CMake_TEST_FindBoost_Python "ON" CACHE BOOL "") +set(CMake_TEST_FindBZip2 "ON" CACHE BOOL "") +set(CMake_TEST_FindCups "ON" CACHE BOOL "") +set(CMake_TEST_FindCURL "ON" CACHE BOOL "") +set(CMake_TEST_FindDevIL "ON" CACHE BOOL "") +set(CMake_TEST_FindDoxygen_Dot "ON" CACHE BOOL "") +set(CMake_TEST_FindDoxygen "ON" CACHE BOOL "") +set(CMake_TEST_FindEXPAT "ON" CACHE BOOL "") +set(CMake_TEST_FindFontconfig "ON" CACHE BOOL "") +set(CMake_TEST_FindFreetype "ON" CACHE BOOL "") +set(CMake_TEST_FindGDAL "ON" CACHE BOOL "") +set(CMake_TEST_FindGIF "ON" CACHE BOOL "") +set(CMake_TEST_FindGit "ON" CACHE BOOL "") +set(CMake_TEST_FindGLEW "ON" CACHE BOOL "") +set(CMake_TEST_FindGLUT "ON" CACHE BOOL "") +set(CMake_TEST_FindGnuTLS "ON" CACHE BOOL "") +set(CMake_TEST_FindGSL "ON" CACHE BOOL "") +set(CMake_TEST_FindGTest "ON" CACHE BOOL "") +set(CMake_TEST_FindGTK2 "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5 "ON" CACHE BOOL "") +set(CMake_TEST_FindHDF5_MPICH_C_COMPILER "/usr/lib64/mpich/bin/h5pcc" CACHE FILEPATH "") +# set(CMake_TEST_FindHDF5_MPICH_CXX_COMPILER "/usr/lib64/mpich/bin/h5pc++" CACHE FILEPATH "") # h5pc++ does not exist +set(CMake_TEST_FindHDF5_MPICH_ENVMOD "PATH=path_list_prepend:/usr/lib64/mpich/bin;LD_LIBRARY_PATH=path_list_prepend:/usr/lib64/mpich/lib" CACHE STRING "") +set(CMake_TEST_FindHDF5_MPICH_Fortran_COMPILER "/usr/lib64/mpich/bin/h5pfc" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_OpenMPI_C_COMPILER "/usr/lib64/openmpi/bin/h5pcc" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_OpenMPI_ENVMOD "PATH=path_list_prepend:/usr/lib64/openmpi/bin;LD_LIBRARY_PATH=path_list_prepend:/usr/lib64/openmpi/lib" CACHE STRING "") +# set(CMake_TEST_FindHDF5_OpenMPI_CXX_COMPILER "/usr/lib64/openmpi/bin/h5pc++" CACHE FILEPATH "") # h5pc++ does not exist +set(CMake_TEST_FindHDF5_OpenMPI_Fortran_COMPILER "/usr/lib64/openmpi/bin/h5pfc" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_Serial_C_COMPILER "/usr/bin/h5cc" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_Serial_CXX_COMPILER "/usr/bin/h5c++" CACHE FILEPATH "") +set(CMake_TEST_FindHDF5_Serial_Fortran_COMPILER "/usr/bin/h5fc" CACHE FILEPATH "") +set(CMake_TEST_FindIconv "ON" CACHE BOOL "") +set(CMake_TEST_FindICU "ON" CACHE BOOL "") +set(CMake_TEST_FindImageMagick "ON" CACHE BOOL "") +set(CMake_TEST_FindIntl "ON" CACHE BOOL "") +set(CMake_TEST_FindJNI "ON" CACHE BOOL "") +set(CMake_TEST_FindJPEG "ON" CACHE BOOL "") +set(CMake_TEST_FindJsonCpp "ON" CACHE BOOL "") +set(CMake_TEST_FindLAPACK "All;static=1;Generic" CACHE STRING "") +set(CMake_TEST_FindLibArchive "ON" CACHE BOOL "") +set(CMake_TEST_FindLibinput "ON" CACHE BOOL "") +set(CMake_TEST_FindLibLZMA "ON" CACHE BOOL "") +set(CMake_TEST_FindLibUV "ON" CACHE BOOL "") +set(CMake_TEST_FindLibXml2 "ON" CACHE BOOL "") +set(CMake_TEST_FindLibXslt "ON" CACHE BOOL "") +set(CMake_TEST_FindMPI_C "ON" CACHE BOOL "") +set(CMake_TEST_FindMPI_CXX "ON" CACHE BOOL "") +set(CMake_TEST_FindMPI_Fortran "ON" CACHE BOOL "") +set(CMake_TEST_FindMPI_ENVMOD "PATH=path_list_prepend:/usr/lib64/mpich/bin;LD_LIBRARY_PATH=path_list_prepend:/usr/lib64/mpich/lib" CACHE STRING "") +set(CMake_TEST_FindMPI "ON" CACHE BOOL "") +set(CMake_TEST_FindODBC "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenACC "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenAL "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenGL "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenMP_CXX "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenMP_Fortran "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenMP "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenSP "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenSSL "ON" CACHE BOOL "") +set(CMake_TEST_FindPatch "ON" CACHE BOOL "") +set(CMake_TEST_FindPNG "ON" CACHE BOOL "") +set(CMake_TEST_FindPostgreSQL "ON" CACHE BOOL "") +set(CMake_TEST_FindProtobuf "ON" CACHE BOOL "") +set(CMake_TEST_FindProtobuf_gRPC "ON" CACHE BOOL "") +set(CMake_TEST_FindPython "ON" CACHE BOOL "") +set(CMake_TEST_FindPython_NumPy "ON" CACHE BOOL "") +set(CMake_TEST_FindPython_PyPy "ON" CACHE BOOL "") +set(CMake_TEST_FindRuby "ON" CACHE BOOL "") +set(CMake_TEST_FindRuby_RVM "ON" CACHE BOOL "") +set(CMake_TEST_FindSDL "ON" CACHE BOOL "") +set(CMake_TEST_FindSQLite3 "ON" CACHE BOOL "") +set(CMake_TEST_FindTIFF "ON" CACHE BOOL "") +set(CMake_TEST_FindwxWidgets "ON" CACHE BOOL "") +set(CMake_TEST_FindX11 "ON" CACHE BOOL "") +set(CMake_TEST_FindXalanC "ON" CACHE BOOL "") +set(CMake_TEST_FindXercesC "ON" CACHE BOOL "") +set(CMake_TEST_Fortran_SUBMODULES "ON" CACHE BOOL "") +set(CMake_TEST_IPO_WORKS_C "ON" CACHE BOOL "") +set(CMake_TEST_IPO_WORKS_CXX "ON" CACHE BOOL "") +set(CMake_TEST_IPO_WORKS_Fortran "ON" CACHE BOOL "") +if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") + set(CMake_TEST_ISPC "ON" CACHE STRING "") +endif() +set(CMake_TEST_Qt5 "ON" CACHE BOOL "") +set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") +set(CMake_TEST_UseSWIG "ON" CACHE BOOL "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_fedora38_makefiles_clang.cmake b/.gitlab/ci/configure_fedora38_makefiles_clang.cmake new file mode 100644 index 0000000..ff30ad9 --- /dev/null +++ b/.gitlab/ci/configure_fedora38_makefiles_clang.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common_clang.cmake") diff --git a/.gitlab/ci/configure_fedora38_ninja.cmake b/.gitlab/ci/configure_fedora38_ninja.cmake new file mode 100644 index 0000000..ac6b9f6 --- /dev/null +++ b/.gitlab/ci/configure_fedora38_ninja.cmake @@ -0,0 +1,14 @@ +set(CMake_TEST_GUI "ON" CACHE BOOL "") +if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") + set(CMake_TEST_ISPC "ON" CACHE STRING "") +endif() +set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") + +# "Release" flags without "-DNDEBUG" so we get assertions. +set(CMAKE_C_FLAGS_RELEASE "-O3" CACHE STRING "") +set(CMAKE_CXX_FLAGS_RELEASE "-O3" CACHE STRING "") + +# Cover compilation with C++11 only and not higher standards. +set(CMAKE_CXX_STANDARD "11" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common.cmake") diff --git a/.gitlab/ci/configure_fedora38_ninja_clang.cmake b/.gitlab/ci/configure_fedora38_ninja_clang.cmake new file mode 100644 index 0000000..ff30ad9 --- /dev/null +++ b/.gitlab/ci/configure_fedora38_ninja_clang.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common_clang.cmake") diff --git a/.gitlab/ci/configure_fedora38_ninja_multi.cmake b/.gitlab/ci/configure_fedora38_ninja_multi.cmake new file mode 100644 index 0000000..94af721 --- /dev/null +++ b/.gitlab/ci/configure_fedora38_ninja_multi.cmake @@ -0,0 +1,5 @@ +if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") + set(CMake_TEST_ISPC "ON" CACHE STRING "") +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_fedora38_sphinx.cmake b/.gitlab/ci/configure_fedora38_sphinx.cmake new file mode 100644 index 0000000..90d159b --- /dev/null +++ b/.gitlab/ci/configure_fedora38_sphinx.cmake @@ -0,0 +1,2 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_sphinx.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_fedora38_sphinx_package.cmake b/.gitlab/ci/configure_fedora38_sphinx_package.cmake new file mode 100644 index 0000000..e839de8 --- /dev/null +++ b/.gitlab/ci/configure_fedora38_sphinx_package.cmake @@ -0,0 +1,13 @@ +# Disable formats not wanted in the package's documentation. +set(SPHINX_INFO OFF CACHE BOOL "") +set(SPHINX_SINGLEHTML OFF CACHE BOOL "") +set(SPHINX_TEXT OFF CACHE BOOL "") + +# Set the destination directory for docs that packages expect. +set(CMAKE_DOC_DIR "doc/cmake" CACHE STRING "") + +# Use a custom prefix to avoid conflicting with other builds. +set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install-doc" CACHE PATH "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_sphinx.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_fedora38_tidy.cmake b/.gitlab/ci/configure_fedora38_tidy.cmake new file mode 100644 index 0000000..5b062da --- /dev/null +++ b/.gitlab/ci/configure_fedora38_tidy.cmake @@ -0,0 +1,5 @@ +set(CMake_RUN_CLANG_TIDY ON CACHE BOOL "") +set(CMake_USE_CLANG_TIDY_MODULE ON CACHE BOOL "") +set(CMake_CLANG_TIDY_MODULE "$ENV{CI_PROJECT_DIR}/Utilities/ClangTidyModule/build/libcmake-clang-tidy-module.so" CACHE FILEPATH "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common.cmake") diff --git a/.gitlab/ci/ctest_memcheck_fedora37_asan.lsan.supp b/.gitlab/ci/ctest_memcheck_fedora37_asan.lsan.supp deleted file mode 100644 index 8ec1a03..0000000 --- a/.gitlab/ci/ctest_memcheck_fedora37_asan.lsan.supp +++ /dev/null @@ -1 +0,0 @@ -# Add 'leak:' lines here to suppress known leaks. diff --git a/.gitlab/ci/ctest_memcheck_fedora38_asan.lsan.supp b/.gitlab/ci/ctest_memcheck_fedora38_asan.lsan.supp new file mode 100644 index 0000000..8ec1a03 --- /dev/null +++ b/.gitlab/ci/ctest_memcheck_fedora38_asan.lsan.supp @@ -0,0 +1 @@ +# Add 'leak:' lines here to suppress known leaks. diff --git a/.gitlab/ci/env_fedora37_asan.sh b/.gitlab/ci/env_fedora37_asan.sh deleted file mode 100644 index e976486..0000000 --- a/.gitlab/ci/env_fedora37_asan.sh +++ /dev/null @@ -1,2 +0,0 @@ -export CC=/usr/bin/clang -export CXX=/usr/bin/clang++ diff --git a/.gitlab/ci/env_fedora37_clang_analyzer.sh b/.gitlab/ci/env_fedora37_clang_analyzer.sh deleted file mode 100644 index d732c0b..0000000 --- a/.gitlab/ci/env_fedora37_clang_analyzer.sh +++ /dev/null @@ -1,2 +0,0 @@ -export CC=/usr/libexec/ccc-analyzer -export CXX=/usr/libexec/c++-analyzer diff --git a/.gitlab/ci/env_fedora37_common_clang.sh b/.gitlab/ci/env_fedora37_common_clang.sh deleted file mode 100644 index b03b757..0000000 --- a/.gitlab/ci/env_fedora37_common_clang.sh +++ /dev/null @@ -1,4 +0,0 @@ -export CC=/usr/bin/clang-15 -export CXX=/usr/bin/clang++-15 -export FC=/usr/bin/flang-new -export FFLAGS=-flang-experimental-exec diff --git a/.gitlab/ci/env_fedora37_extdeps.sh b/.gitlab/ci/env_fedora37_extdeps.sh deleted file mode 100644 index 7076e18..0000000 --- a/.gitlab/ci/env_fedora37_extdeps.sh +++ /dev/null @@ -1 +0,0 @@ -source .gitlab/ci/env_extdeps_common.sh diff --git a/.gitlab/ci/env_fedora37_makefiles.cmake b/.gitlab/ci/env_fedora37_makefiles.cmake deleted file mode 100644 index ef13cda..0000000 --- a/.gitlab/ci/env_fedora37_makefiles.cmake +++ /dev/null @@ -1 +0,0 @@ -set(ENV{MY_RUBY_HOME} "/usr/local/rvm/rubies/ruby-3.0.4") diff --git a/.gitlab/ci/env_fedora37_makefiles.sh b/.gitlab/ci/env_fedora37_makefiles.sh deleted file mode 100644 index c482642..0000000 --- a/.gitlab/ci/env_fedora37_makefiles.sh +++ /dev/null @@ -1,8 +0,0 @@ -if test "$CMAKE_CI_NIGHTLY" = "true"; then - source .gitlab/ci/ispc-env.sh -fi - -# Patch HDF5 Fortran compiler wrappers to work around Fedora bug. -# https://bugzilla.redhat.com/show_bug.cgi?id=2183289 -sed -i '/^includedir=/ s|/mpich-x86_64||' /usr/lib64/mpich/bin/h5pfc -sed -i '/^includedir=/ s|/openmpi-x86_64||' /usr/lib64/openmpi/bin/h5pfc diff --git a/.gitlab/ci/env_fedora37_makefiles_clang.sh b/.gitlab/ci/env_fedora37_makefiles_clang.sh deleted file mode 100644 index 9ff1d84..0000000 --- a/.gitlab/ci/env_fedora37_makefiles_clang.sh +++ /dev/null @@ -1 +0,0 @@ -. .gitlab/ci/env_fedora37_common_clang.sh diff --git a/.gitlab/ci/env_fedora37_ninja.sh b/.gitlab/ci/env_fedora37_ninja.sh deleted file mode 100644 index 217ff30..0000000 --- a/.gitlab/ci/env_fedora37_ninja.sh +++ /dev/null @@ -1,3 +0,0 @@ -if test "$CMAKE_CI_NIGHTLY" = "true"; then - source .gitlab/ci/ispc-env.sh -fi diff --git a/.gitlab/ci/env_fedora37_ninja_clang.sh b/.gitlab/ci/env_fedora37_ninja_clang.sh deleted file mode 100644 index 9ff1d84..0000000 --- a/.gitlab/ci/env_fedora37_ninja_clang.sh +++ /dev/null @@ -1 +0,0 @@ -. .gitlab/ci/env_fedora37_common_clang.sh diff --git a/.gitlab/ci/env_fedora37_ninja_multi.sh b/.gitlab/ci/env_fedora37_ninja_multi.sh deleted file mode 100644 index 217ff30..0000000 --- a/.gitlab/ci/env_fedora37_ninja_multi.sh +++ /dev/null @@ -1,3 +0,0 @@ -if test "$CMAKE_CI_NIGHTLY" = "true"; then - source .gitlab/ci/ispc-env.sh -fi diff --git a/.gitlab/ci/env_fedora38_asan.sh b/.gitlab/ci/env_fedora38_asan.sh new file mode 100644 index 0000000..e976486 --- /dev/null +++ b/.gitlab/ci/env_fedora38_asan.sh @@ -0,0 +1,2 @@ +export CC=/usr/bin/clang +export CXX=/usr/bin/clang++ diff --git a/.gitlab/ci/env_fedora38_clang_analyzer.sh b/.gitlab/ci/env_fedora38_clang_analyzer.sh new file mode 100644 index 0000000..d732c0b --- /dev/null +++ b/.gitlab/ci/env_fedora38_clang_analyzer.sh @@ -0,0 +1,2 @@ +export CC=/usr/libexec/ccc-analyzer +export CXX=/usr/libexec/c++-analyzer diff --git a/.gitlab/ci/env_fedora38_common_clang.sh b/.gitlab/ci/env_fedora38_common_clang.sh new file mode 100644 index 0000000..fc9c041 --- /dev/null +++ b/.gitlab/ci/env_fedora38_common_clang.sh @@ -0,0 +1,4 @@ +export CC=/usr/bin/clang-16 +export CXX=/usr/bin/clang++-16 +export FC=/usr/bin/flang-new +export FFLAGS=-flang-experimental-exec diff --git a/.gitlab/ci/env_fedora38_extdeps.sh b/.gitlab/ci/env_fedora38_extdeps.sh new file mode 100644 index 0000000..7076e18 --- /dev/null +++ b/.gitlab/ci/env_fedora38_extdeps.sh @@ -0,0 +1 @@ +source .gitlab/ci/env_extdeps_common.sh diff --git a/.gitlab/ci/env_fedora38_makefiles.cmake b/.gitlab/ci/env_fedora38_makefiles.cmake new file mode 100644 index 0000000..ef13cda --- /dev/null +++ b/.gitlab/ci/env_fedora38_makefiles.cmake @@ -0,0 +1 @@ +set(ENV{MY_RUBY_HOME} "/usr/local/rvm/rubies/ruby-3.0.4") diff --git a/.gitlab/ci/env_fedora38_makefiles.sh b/.gitlab/ci/env_fedora38_makefiles.sh new file mode 100644 index 0000000..c482642 --- /dev/null +++ b/.gitlab/ci/env_fedora38_makefiles.sh @@ -0,0 +1,8 @@ +if test "$CMAKE_CI_NIGHTLY" = "true"; then + source .gitlab/ci/ispc-env.sh +fi + +# Patch HDF5 Fortran compiler wrappers to work around Fedora bug. +# https://bugzilla.redhat.com/show_bug.cgi?id=2183289 +sed -i '/^includedir=/ s|/mpich-x86_64||' /usr/lib64/mpich/bin/h5pfc +sed -i '/^includedir=/ s|/openmpi-x86_64||' /usr/lib64/openmpi/bin/h5pfc diff --git a/.gitlab/ci/env_fedora38_makefiles_clang.sh b/.gitlab/ci/env_fedora38_makefiles_clang.sh new file mode 100644 index 0000000..9f3edde --- /dev/null +++ b/.gitlab/ci/env_fedora38_makefiles_clang.sh @@ -0,0 +1 @@ +. .gitlab/ci/env_fedora38_common_clang.sh diff --git a/.gitlab/ci/env_fedora38_ninja.sh b/.gitlab/ci/env_fedora38_ninja.sh new file mode 100644 index 0000000..217ff30 --- /dev/null +++ b/.gitlab/ci/env_fedora38_ninja.sh @@ -0,0 +1,3 @@ +if test "$CMAKE_CI_NIGHTLY" = "true"; then + source .gitlab/ci/ispc-env.sh +fi diff --git a/.gitlab/ci/env_fedora38_ninja_clang.sh b/.gitlab/ci/env_fedora38_ninja_clang.sh new file mode 100644 index 0000000..9f3edde --- /dev/null +++ b/.gitlab/ci/env_fedora38_ninja_clang.sh @@ -0,0 +1 @@ +. .gitlab/ci/env_fedora38_common_clang.sh diff --git a/.gitlab/ci/env_fedora38_ninja_multi.sh b/.gitlab/ci/env_fedora38_ninja_multi.sh new file mode 100644 index 0000000..217ff30 --- /dev/null +++ b/.gitlab/ci/env_fedora38_ninja_multi.sh @@ -0,0 +1,3 @@ +if test "$CMAKE_CI_NIGHTLY" = "true"; then + source .gitlab/ci/ispc-env.sh +fi diff --git a/.gitlab/ci/pre_build_fedora37_tidy.sh b/.gitlab/ci/pre_build_fedora37_tidy.sh deleted file mode 100644 index 7580ef1..0000000 --- a/.gitlab/ci/pre_build_fedora37_tidy.sh +++ /dev/null @@ -1,9 +0,0 @@ -cmake \ - -G Ninja \ - -S Utilities/ClangTidyModule \ - -B Utilities/ClangTidyModule/build \ - -DCMAKE_BUILD_TYPE=Release \ - -DRUN_TESTS=ON \ - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -cmake --build Utilities/ClangTidyModule/build -ctest --test-dir Utilities/ClangTidyModule/build --output-on-failure diff --git a/.gitlab/ci/pre_build_fedora38_tidy.sh b/.gitlab/ci/pre_build_fedora38_tidy.sh new file mode 100644 index 0000000..7580ef1 --- /dev/null +++ b/.gitlab/ci/pre_build_fedora38_tidy.sh @@ -0,0 +1,9 @@ +cmake \ + -G Ninja \ + -S Utilities/ClangTidyModule \ + -B Utilities/ClangTidyModule/build \ + -DCMAKE_BUILD_TYPE=Release \ + -DRUN_TESTS=ON \ + -DCMAKE_CXX_COMPILER_LAUNCHER=sccache +cmake --build Utilities/ClangTidyModule/build +ctest --test-dir Utilities/ClangTidyModule/build --output-on-failure diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index 4ac7772..afce62b 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -5,7 +5,7 @@ ### Release .linux_prep_source: - image: "fedora:37" + image: "fedora:38" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" @@ -68,8 +68,8 @@ ### Fedora -.fedora37: - image: "kitware/cmake:ci-fedora37-x86_64-2023-05-17" +.fedora38: + image: "kitware/cmake:ci-fedora38-x86_64-2023-05-22" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci/long file name for testing purposes" @@ -77,37 +77,37 @@ #### Lint builds -.fedora37_tidy: - extends: .fedora37 +.fedora38_tidy: + extends: .fedora38 variables: - CMAKE_CONFIGURATION: fedora37_tidy + CMAKE_CONFIGURATION: fedora38_tidy CTEST_NO_WARNINGS_ALLOWED: 1 CMAKE_CI_NO_INSTALL: 1 -.fedora37_clang_analyzer: - extends: .fedora37 +.fedora38_clang_analyzer: + extends: .fedora38 variables: - CMAKE_CONFIGURATION: fedora37_clang_analyzer + CMAKE_CONFIGURATION: fedora38_clang_analyzer CMAKE_CI_BUILD_TYPE: Debug CTEST_NO_WARNINGS_ALLOWED: 1 CMAKE_CI_NO_INSTALL: 1 -.fedora37_sphinx: - extends: .fedora37 +.fedora38_sphinx: + extends: .fedora38 variables: - CMAKE_CONFIGURATION: fedora37_sphinx + CMAKE_CONFIGURATION: fedora38_sphinx CTEST_NO_WARNINGS_ALLOWED: 1 CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx" CMAKE_CI_NO_INSTALL: 1 -.fedora37_sphinx_package: - extends: .fedora37 +.fedora38_sphinx_package: + extends: .fedora38 variables: - CMAKE_CONFIGURATION: fedora37_sphinx_package + CMAKE_CONFIGURATION: fedora38_sphinx_package CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx" #### Build and test @@ -153,35 +153,35 @@ CMAKE_CI_BUILD_TYPE: Release CTEST_NO_WARNINGS_ALLOWED: 1 -.fedora37_extdeps: - extends: .fedora37 +.fedora38_extdeps: + extends: .fedora38 variables: - CMAKE_CONFIGURATION: fedora37_extdeps + CMAKE_CONFIGURATION: fedora38_extdeps CMAKE_CI_BUILD_TYPE: Release CTEST_NO_WARNINGS_ALLOWED: 1 -.fedora37_ninja: - extends: .fedora37 +.fedora38_ninja: + extends: .fedora38 variables: - CMAKE_CONFIGURATION: fedora37_ninja + CMAKE_CONFIGURATION: fedora38_ninja CMAKE_CI_BUILD_TYPE: Release CTEST_NO_WARNINGS_ALLOWED: 1 -.fedora37_ninja_multi: - extends: .fedora37 +.fedora38_ninja_multi: + extends: .fedora38 variables: - CMAKE_CONFIGURATION: fedora37_ninja_multi + CMAKE_CONFIGURATION: fedora38_ninja_multi CTEST_NO_WARNINGS_ALLOWED: 1 CMAKE_GENERATOR: "Ninja Multi-Config" -.fedora37_makefiles: - extends: .fedora37 +.fedora38_makefiles: + extends: .fedora38 variables: - CMAKE_CONFIGURATION: fedora37_makefiles + CMAKE_CONFIGURATION: fedora38_makefiles CTEST_NO_WARNINGS_ALLOWED: 1 CMAKE_GENERATOR: "Unix Makefiles" @@ -200,18 +200,18 @@ variables: CMAKE_CONFIGURATION: debian10_ninja_clang -.fedora37_makefiles_clang: - extends: .fedora37 +.fedora38_makefiles_clang: + extends: .fedora38 variables: - CMAKE_CONFIGURATION: fedora37_makefiles_clang + CMAKE_CONFIGURATION: fedora38_makefiles_clang CMAKE_GENERATOR: "Unix Makefiles" -.fedora37_ninja_clang: - extends: .fedora37 +.fedora38_ninja_clang: + extends: .fedora38 variables: - CMAKE_CONFIGURATION: fedora37_ninja_clang + CMAKE_CONFIGURATION: fedora38_ninja_clang ### Sanitizers @@ -226,13 +226,13 @@ CTEST_MEMORYCHECK_TYPE: AddressSanitizer CTEST_MEMORYCHECK_SANITIZER_OPTIONS: "" -.fedora37_asan: +.fedora38_asan: extends: - - .fedora37 + - .fedora38 - .fedora_asan_addon variables: - CMAKE_CONFIGURATION: fedora37_asan + CMAKE_CONFIGURATION: fedora38_asan ### Intel Compiler @@ -478,7 +478,7 @@ .cmake_codespell_linux: stage: build - extends: .fedora37 + extends: .fedora38 script: - .gitlab/ci/codespell.sh interruptible: true @@ -623,7 +623,7 @@ .cmake_org_help: stage: build extends: - - .fedora37 + - .fedora38 - .linux_x86_64_tags - .cmake_org_help_artifacts script: diff --git a/.gitlab/upload.yml b/.gitlab/upload.yml index 114808f..caa2119 100644 --- a/.gitlab/upload.yml +++ b/.gitlab/upload.yml @@ -1,7 +1,7 @@ # Steps for uploading artifacts .rsync_upload_package: - image: "fedora:37" + image: "fedora:38" stage: upload tags: - cmake @@ -21,7 +21,7 @@ .rsync_upload_help: stage: upload - image: "fedora:37" + image: "fedora:38" tags: - cmake - docker -- cgit v0.12 From 1689e0a118f37f62d198a213946d98624350cb4c Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 May 2023 13:41:30 -0400 Subject: ci: Subsume Clang C++ modules testing in main Fedora+Clang jobs Fedora 38 comes with LLVM/Clang 16.0, which supports the features we need for C++ modules. --- .gitlab-ci.yml | 30 ++++++----------- .gitlab/ci/configure_fedora38_ninja_clang.cmake | 3 ++ .../ci/configure_fedora38_ninja_multi_clang.cmake | 4 +++ .../configure_linux_clang_cxx_modules_ninja.cmake | 4 --- ...igure_linux_clang_cxx_modules_ninja_multi.cmake | 4 --- .gitlab/ci/docker/clang_cxx_modules/Dockerfile | 13 -------- .../docker/clang_cxx_modules/install_cmake_deps.sh | 7 ---- .../ci/docker/clang_cxx_modules/install_deps.sh | 7 ---- .../ci/docker/clang_cxx_modules/install_llvm.sh | 39 ---------------------- .gitlab/ci/env_fedora38_ninja_multi_clang.sh | 1 + .gitlab/os-linux.yml | 29 ++++------------ 11 files changed, 25 insertions(+), 116 deletions(-) create mode 100644 .gitlab/ci/configure_fedora38_ninja_multi_clang.cmake delete mode 100644 .gitlab/ci/configure_linux_clang_cxx_modules_ninja.cmake delete mode 100644 .gitlab/ci/configure_linux_clang_cxx_modules_ninja_multi.cmake delete mode 100644 .gitlab/ci/docker/clang_cxx_modules/Dockerfile delete mode 100755 .gitlab/ci/docker/clang_cxx_modules/install_cmake_deps.sh delete mode 100755 .gitlab/ci/docker/clang_cxx_modules/install_deps.sh delete mode 100755 .gitlab/ci/docker/clang_cxx_modules/install_llvm.sh create mode 100644 .gitlab/ci/env_fedora38_ninja_multi_clang.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 74c8104..6e0d01a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -205,6 +205,16 @@ t:fedora38-ninja-clang: variables: CMAKE_CI_JOB_NIGHTLY: "true" +t:fedora38-ninja-multi-clang: + extends: + - .fedora38_ninja_multi_clang + - .cmake_test_linux_release + - .linux_x86_64_tags + - .run_dependent + - .needs_centos6_x86_64 + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + t:fedora38-makefiles-clang: extends: - .fedora38_makefiles_clang @@ -334,26 +344,6 @@ t:linux-gcc-cxx-modules-ninja-multi: variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:linux-clang-cxx-modules-ninja: - extends: - - .clang_cxx_modules_ninja - - .cmake_test_linux_release - - .linux_x86_64_tags - - .run_dependent - - .needs_centos6_x86_64 - variables: - CMAKE_CI_JOB_NIGHTLY: "true" - -t:linux-clang-cxx-modules-ninja-multi: - extends: - - .clang_cxx_modules_ninja_multi - - .cmake_test_linux_release - - .linux_x86_64_tags - - .run_dependent - - .needs_centos6_x86_64 - variables: - CMAKE_CI_JOB_NIGHTLY: "true" - b:fedora38-ninja: extends: - .fedora38_ninja diff --git a/.gitlab/ci/configure_fedora38_ninja_clang.cmake b/.gitlab/ci/configure_fedora38_ninja_clang.cmake index ff30ad9..214a123 100644 --- a/.gitlab/ci/configure_fedora38_ninja_clang.cmake +++ b/.gitlab/ci/configure_fedora38_ninja_clang.cmake @@ -1 +1,4 @@ +set(CMake_TEST_MODULE_COMPILATION "named,collation,partitions,internal_partitions,export_bmi,install_bmi,shared" CACHE STRING "") +set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_clang.cmake" CACHE STRING "") + include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common_clang.cmake") diff --git a/.gitlab/ci/configure_fedora38_ninja_multi_clang.cmake b/.gitlab/ci/configure_fedora38_ninja_multi_clang.cmake new file mode 100644 index 0000000..214a123 --- /dev/null +++ b/.gitlab/ci/configure_fedora38_ninja_multi_clang.cmake @@ -0,0 +1,4 @@ +set(CMake_TEST_MODULE_COMPILATION "named,collation,partitions,internal_partitions,export_bmi,install_bmi,shared" CACHE STRING "") +set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_clang.cmake" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common_clang.cmake") diff --git a/.gitlab/ci/configure_linux_clang_cxx_modules_ninja.cmake b/.gitlab/ci/configure_linux_clang_cxx_modules_ninja.cmake deleted file mode 100644 index 671c625..0000000 --- a/.gitlab/ci/configure_linux_clang_cxx_modules_ninja.cmake +++ /dev/null @@ -1,4 +0,0 @@ -set(CMake_TEST_MODULE_COMPILATION "named,collation,partitions,internal_partitions,export_bmi,install_bmi,shared" CACHE STRING "") -set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_clang.cmake" CACHE STRING "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_linux_clang_cxx_modules_ninja_multi.cmake b/.gitlab/ci/configure_linux_clang_cxx_modules_ninja_multi.cmake deleted file mode 100644 index 671c625..0000000 --- a/.gitlab/ci/configure_linux_clang_cxx_modules_ninja_multi.cmake +++ /dev/null @@ -1,4 +0,0 @@ -set(CMake_TEST_MODULE_COMPILATION "named,collation,partitions,internal_partitions,export_bmi,install_bmi,shared" CACHE STRING "") -set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_clang.cmake" CACHE STRING "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/docker/clang_cxx_modules/Dockerfile b/.gitlab/ci/docker/clang_cxx_modules/Dockerfile deleted file mode 100644 index 4e58125..0000000 --- a/.gitlab/ci/docker/clang_cxx_modules/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM fedora:37 -MAINTAINER Ben Boeckel - -# Install build dependencies for packages. -COPY install_deps.sh /root/install_deps.sh -RUN sh /root/install_deps.sh - -COPY install_llvm.sh /root/install_llvm.sh -RUN sh /root/install_llvm.sh - -# Install build dependencies for CMake's CI. -COPY install_cmake_deps.sh /root/install_cmake_deps.sh -RUN sh /root/install_cmake_deps.sh diff --git a/.gitlab/ci/docker/clang_cxx_modules/install_cmake_deps.sh b/.gitlab/ci/docker/clang_cxx_modules/install_cmake_deps.sh deleted file mode 100755 index 465e125..0000000 --- a/.gitlab/ci/docker/clang_cxx_modules/install_cmake_deps.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -set -e - -dnf install -y --setopt=install_weak_deps=False \ - file git-core -dnf clean all diff --git a/.gitlab/ci/docker/clang_cxx_modules/install_deps.sh b/.gitlab/ci/docker/clang_cxx_modules/install_deps.sh deleted file mode 100755 index c1957c3..0000000 --- a/.gitlab/ci/docker/clang_cxx_modules/install_deps.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -set -e - -dnf install -y --setopt=install_weak_deps=False \ - gcc-c++ cmake ninja-build -dnf clean all diff --git a/.gitlab/ci/docker/clang_cxx_modules/install_llvm.sh b/.gitlab/ci/docker/clang_cxx_modules/install_llvm.sh deleted file mode 100755 index 35f925e..0000000 --- a/.gitlab/ci/docker/clang_cxx_modules/install_llvm.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -readonly revision="6d859df46e93e04bd7a4f90d9a9056763998f638" # llvmorg-16.0.0-rc2-31-g6d859df46e93 -readonly tarball="https://github.com/llvm/llvm-project/archive/$revision.tar.gz" - -readonly workdir="$HOME/llvm" -readonly srcdir="$workdir/llvm" -readonly builddir="$workdir/build" - -mkdir -p "$workdir" -cd "$workdir" -curl -L "$tarball" > "llvm-$revision.tar.gz" -tar xf "llvm-$revision.tar.gz" -mv "llvm-project-$revision" "$srcdir" -mkdir -p "$builddir" -cd "$builddir" -cmake -GNinja \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=ON \ - -DLLVM_ENABLE_BINDINGS=OFF \ - -DLLVM_INCLUDE_BENCHMARKS=OFF \ - -DLLVM_INCLUDE_DOCS=OFF \ - -DLLVM_INCLUDE_EXAMPLES=OFF \ - -DLLVM_INCLUDE_RUNTIMES=OFF \ - -DLLVM_INCLUDE_TESTS=OFF \ - -DLLVM_INCLUDE_UTILS=OFF \ - -DLLVM_TARGETS_TO_BUILD=X86 \ - -DLLVM_TOOL_CLANG_BUILD=ON \ - -DLLVM_USE_SYMLINKS=ON \ - "-DLLVM_EXTERNAL_CLANG_SOURCE_DIR=$srcdir/clang" \ - -DLLVM_PARALLEL_LINK_JOBS=1 \ - -DCLANG_BUILD_TOOLS=ON \ - "-DCMAKE_INSTALL_PREFIX=/opt/llvm-p1689" \ - "$srcdir/llvm" -ninja -ninja install/strip -rm -rf "$workdir" diff --git a/.gitlab/ci/env_fedora38_ninja_multi_clang.sh b/.gitlab/ci/env_fedora38_ninja_multi_clang.sh new file mode 100644 index 0000000..9f3edde --- /dev/null +++ b/.gitlab/ci/env_fedora38_ninja_multi_clang.sh @@ -0,0 +1 @@ +. .gitlab/ci/env_fedora38_common_clang.sh diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index afce62b..f4cc401 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -213,6 +213,13 @@ variables: CMAKE_CONFIGURATION: fedora38_ninja_clang +.fedora38_ninja_multi_clang: + extends: .fedora38 + + variables: + CMAKE_CONFIGURATION: fedora38_ninja_multi_clang + CMAKE_GENERATOR: "Ninja Multi-Config" + ### Sanitizers .fedora_memcheck: @@ -376,28 +383,6 @@ CMAKE_CONFIGURATION: linux_gcc_cxx_modules_ninja_multi CMAKE_GENERATOR: "Ninja Multi-Config" -.clang_cxx_modules_x86_64: - image: "kitware/cmake:ci-clang_cxx_modules-x86_64-2023-02-15" - - variables: - GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" - CMAKE_ARCH: x86_64 - CC: "/opt/llvm-p1689/bin/clang" - CXX: "/opt/llvm-p1689/bin/clang++" - -.clang_cxx_modules_ninja: - extends: .clang_cxx_modules_x86_64 - - variables: - CMAKE_CONFIGURATION: linux_clang_cxx_modules_ninja - -.clang_cxx_modules_ninja_multi: - extends: .clang_cxx_modules_x86_64 - - variables: - CMAKE_CONFIGURATION: linux_clang_cxx_modules_ninja_multi - CMAKE_GENERATOR: "Ninja Multi-Config" - ## Tags .linux_x86_64_tags: -- cgit v0.12