summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy1
-rw-r--r--.codespellrc4
-rw-r--r--.gitlab-ci.yml118
-rw-r--r--.gitlab/ci/configure_common.cmake2
-rw-r--r--.gitlab/ci/configure_extdeps_common.cmake2
-rw-r--r--.gitlab/ci/configure_fedora37_clang_analyzer.cmake1
-rw-r--r--.gitlab/ci/configure_fedora37_makefiles_clang.cmake1
-rw-r--r--.gitlab/ci/configure_fedora37_ninja_clang.cmake1
-rw-r--r--.gitlab/ci/configure_fedora38_asan.cmake (renamed from .gitlab/ci/configure_fedora37_asan.cmake)2
-rw-r--r--.gitlab/ci/configure_fedora38_clang_analyzer.cmake3
-rw-r--r--.gitlab/ci/configure_fedora38_common.cmake (renamed from .gitlab/ci/configure_fedora37_common.cmake)0
-rw-r--r--.gitlab/ci/configure_fedora38_common_clang.cmake (renamed from .gitlab/ci/configure_fedora37_common_clang.cmake)0
-rw-r--r--.gitlab/ci/configure_fedora38_extdeps.cmake (renamed from .gitlab/ci/configure_fedora37_extdeps.cmake)0
-rw-r--r--.gitlab/ci/configure_fedora38_makefiles.cmake (renamed from .gitlab/ci/configure_fedora37_makefiles.cmake)0
-rw-r--r--.gitlab/ci/configure_fedora38_makefiles_clang.cmake1
-rw-r--r--.gitlab/ci/configure_fedora38_ninja.cmake (renamed from .gitlab/ci/configure_fedora37_ninja.cmake)2
-rw-r--r--.gitlab/ci/configure_fedora38_ninja_clang.cmake4
-rw-r--r--.gitlab/ci/configure_fedora38_ninja_multi.cmake (renamed from .gitlab/ci/configure_fedora37_ninja_multi.cmake)0
-rw-r--r--.gitlab/ci/configure_fedora38_ninja_multi_clang.cmake4
-rw-r--r--.gitlab/ci/configure_fedora38_sphinx.cmake (renamed from .gitlab/ci/configure_fedora37_sphinx.cmake)0
-rw-r--r--.gitlab/ci/configure_fedora38_sphinx_package.cmake (renamed from .gitlab/ci/configure_fedora37_sphinx_package.cmake)0
-rw-r--r--.gitlab/ci/configure_fedora38_tidy.cmake (renamed from .gitlab/ci/configure_fedora37_tidy.cmake)2
-rw-r--r--.gitlab/ci/configure_linux_clang_cxx_modules_ninja.cmake4
-rw-r--r--.gitlab/ci/configure_linux_clang_cxx_modules_ninja_multi.cmake4
-rw-r--r--.gitlab/ci/configure_macos_arm64_ninja_multi.cmake (renamed from .gitlab/ci/configure_macos_x86_64_ninja_multi.cmake)0
-rw-r--r--.gitlab/ci/configure_macos_arm64_xcode_ub.cmake (renamed from .gitlab/ci/configure_macos_x86_64_xcode_ub.cmake)0
-rw-r--r--.gitlab/ci/configure_macos_package_common.cmake2
-rw-r--r--.gitlab/ci/configure_windows_arm64_vs2022.cmake3
-rw-r--r--.gitlab/ci/configure_windows_clang_ninja.cmake2
-rw-r--r--.gitlab/ci/configure_windows_package_common.cmake2
-rw-r--r--.gitlab/ci/configure_windows_vs2022_x64.cmake2
-rw-r--r--.gitlab/ci/ctest_memcheck_fedora38_asan.lsan.supp (renamed from .gitlab/ci/ctest_memcheck_fedora37_asan.lsan.supp)0
-rw-r--r--.gitlab/ci/docker/clang_cxx_modules/Dockerfile13
-rwxr-xr-x.gitlab/ci/docker/clang_cxx_modules/install_cmake_deps.sh7
-rwxr-xr-x.gitlab/ci/docker/clang_cxx_modules/install_deps.sh7
-rwxr-xr-x.gitlab/ci/docker/clang_cxx_modules/install_llvm.sh39
-rw-r--r--.gitlab/ci/docker/fedora37/clang_tidy_headers_packages.lst4
-rwxr-xr-x.gitlab/ci/docker/fedora37/install_clang_tidy_headers.sh20
-rw-r--r--.gitlab/ci/docker/fedora38/Dockerfile (renamed from .gitlab/ci/docker/fedora37/Dockerfile)19
-rw-r--r--.gitlab/ci/docker/fedora38/deps_packages.lst (renamed from .gitlab/ci/docker/fedora37/deps_packages.lst)1
-rwxr-xr-x.gitlab/ci/docker/fedora38/install_deps.sh (renamed from .gitlab/ci/docker/fedora37/install_deps.sh)0
-rwxr-xr-x.gitlab/ci/docker/fedora38/install_iwyu.sh (renamed from .gitlab/ci/docker/fedora37/install_iwyu.sh)0
-rwxr-xr-x.gitlab/ci/docker/fedora38/install_rvm.sh (renamed from .gitlab/ci/docker/fedora37/install_rvm.sh)0
-rw-r--r--.gitlab/ci/docker/fedora38/iwyu_packages.lst (renamed from .gitlab/ci/docker/fedora37/iwyu_packages.lst)0
-rw-r--r--.gitlab/ci/docker/fedora38/rvm_packages.lst (renamed from .gitlab/ci/docker/fedora37/rvm_packages.lst)0
-rw-r--r--.gitlab/ci/env_fedora37_makefiles_clang.sh1
-rw-r--r--.gitlab/ci/env_fedora37_ninja_clang.sh1
-rw-r--r--.gitlab/ci/env_fedora38_asan.sh (renamed from .gitlab/ci/env_fedora37_asan.sh)0
-rw-r--r--.gitlab/ci/env_fedora38_clang_analyzer.sh (renamed from .gitlab/ci/env_fedora37_clang_analyzer.sh)0
-rw-r--r--.gitlab/ci/env_fedora38_common_clang.sh (renamed from .gitlab/ci/env_fedora37_common_clang.sh)4
-rw-r--r--.gitlab/ci/env_fedora38_extdeps.sh (renamed from .gitlab/ci/env_fedora37_extdeps.sh)0
-rw-r--r--.gitlab/ci/env_fedora38_makefiles.cmake (renamed from .gitlab/ci/env_fedora37_makefiles.cmake)0
-rw-r--r--.gitlab/ci/env_fedora38_makefiles.sh (renamed from .gitlab/ci/env_fedora37_makefiles.sh)0
-rw-r--r--.gitlab/ci/env_fedora38_makefiles_clang.sh1
-rw-r--r--.gitlab/ci/env_fedora38_ninja.sh (renamed from .gitlab/ci/env_macos_x86_64_ninja_multi.sh)0
-rw-r--r--.gitlab/ci/env_fedora38_ninja_clang.sh1
-rw-r--r--.gitlab/ci/env_fedora38_ninja_multi.sh (renamed from .gitlab/ci/env_fedora37_ninja_multi.sh)0
-rw-r--r--.gitlab/ci/env_fedora38_ninja_multi_clang.sh1
-rw-r--r--.gitlab/ci/env_macos_arm64_ninja_multi.sh (renamed from .gitlab/ci/env_fedora37_ninja.sh)0
-rw-r--r--.gitlab/ci/env_macos_arm64_xcode_ub.cmake1
-rw-r--r--.gitlab/ci/env_macos_x86_64_xcode_ub.cmake1
-rw-r--r--.gitlab/ci/pre_build_fedora38_tidy.sh (renamed from .gitlab/ci/pre_build_fedora37_tidy.sh)0
-rw-r--r--.gitlab/os-linux.yml105
-rw-r--r--.gitlab/os-macos.yml20
-rw-r--r--.gitlab/os-windows.yml22
-rw-r--r--.gitlab/upload.yml4
-rw-r--r--Auxiliary/vim/syntax/cmake.vim1
-rw-r--r--Help/command/add_custom_command.rst9
-rw-r--r--Help/command/configure_file.rst8
-rw-r--r--Help/command/include_directories.rst2
-rw-r--r--Help/manual/cmake-file-api.7.rst24
-rw-r--r--Help/manual/cmake-properties.7.rst1
-rw-r--r--Help/prop_sf/SKIP_LINTING.rst41
-rw-r--r--Help/prop_tgt/IMPORTED_NO_SYSTEM.rst2
-rw-r--r--Help/prop_tgt/LANG_CLANG_TIDY.rst9
-rw-r--r--Help/prop_tgt/LANG_CPPCHECK.rst9
-rw-r--r--Help/prop_tgt/LANG_CPPLINT.rst9
-rw-r--r--Help/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE.rst9
-rw-r--r--Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst15
-rw-r--r--Help/prop_tgt/SYSTEM.rst14
-rw-r--r--Help/release/3.26.rst4
-rw-r--r--Help/release/dev/FileAPI-Frameworks.rst7
-rw-r--r--Help/release/dev/System-Framework.rst4
-rw-r--r--Help/release/dev/skip-linting.rst5
-rw-r--r--Help/variable/MINGW.rst5
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake2
-rw-r--r--Modules/CMakeFindBinUtils.cmake15
-rw-r--r--Modules/CMakePackageConfigHelpers.cmake2
-rw-r--r--Modules/CPackComponent.cmake2
-rw-r--r--Modules/Compiler/Clang.cmake2
-rw-r--r--Modules/Compiler/IAR-ASM.cmake4
-rw-r--r--Modules/Compiler/IAR-C.cmake2
-rw-r--r--Modules/Compiler/IAR-CXX.cmake7
-rw-r--r--Modules/Compiler/IAR.cmake1
-rw-r--r--Modules/ExternalProject.cmake6
-rw-r--r--Modules/FindCUDA.cmake2
-rw-r--r--Modules/FindMPI.cmake2
-rw-r--r--Modules/FindMatlab.cmake2
-rw-r--r--Modules/FindOpenGL.cmake2
-rw-r--r--Modules/FindOpenSSL.cmake26
-rw-r--r--Modules/FindPython/Support.cmake2
-rw-r--r--Modules/FindwxWindows.cmake2
-rw-r--r--Modules/Internal/CPack/CPackRPM.cmake2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cmCPackInnoSetupGenerator.cxx2
-rw-r--r--Source/CursesDialog/form/frm_def.c4
-rw-r--r--Source/cmCMakeHostSystemInformationCommand.cxx1
-rw-r--r--Source/cmCPluginAPI.h2
-rw-r--r--Source/cmCommandArgumentParserHelper.cxx3
-rw-r--r--Source/cmCommonTargetGenerator.cxx167
-rw-r--r--Source/cmCommonTargetGenerator.h10
-rw-r--r--Source/cmConditionEvaluator.cxx4
-rw-r--r--Source/cmCustomCommandGenerator.cxx6
-rw-r--r--Source/cmCxxModuleMapper.cxx109
-rw-r--r--Source/cmCxxModuleMapper.h22
-rw-r--r--Source/cmDependsFortran.cxx2
-rw-r--r--Source/cmDependsJavaParserHelper.cxx2
-rw-r--r--Source/cmDyndepCollation.cxx17
-rw-r--r--Source/cmDyndepCollation.h2
-rw-r--r--Source/cmExternalMakefileProjectGenerator.cxx13
-rw-r--r--Source/cmFileAPI.cxx2
-rw-r--r--Source/cmFileAPICodemodel.cxx48
-rw-r--r--Source/cmGeneratorTarget.cxx63
-rw-r--r--Source/cmGetTestPropertyCommand.cxx2
-rw-r--r--Source/cmGlobalCommonGenerator.cxx6
-rw-r--r--Source/cmGlobalGenerator.cxx11
-rw-r--r--Source/cmGlobalGenerator.h26
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx10
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx56
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudioVersionedGenerator.cxx16
-rw-r--r--Source/cmGlobalVisualStudioVersionedGenerator.h2
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx4
-rw-r--r--Source/cmLinkLineComputer.cxx20
-rw-r--r--Source/cmLinkLineComputer.h4
-rw-r--r--Source/cmLocalGenerator.cxx40
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx2
-rw-r--r--Source/cmMakefileTargetGenerator.cxx245
-rw-r--r--Source/cmMakefileTargetGenerator.h4
-rw-r--r--Source/cmMessenger.cxx53
-rw-r--r--Source/cmNinjaTargetGenerator.cxx207
-rw-r--r--Source/cmNinjaTargetGenerator.h4
-rw-r--r--Source/cmQtAutoGenInitializer.cxx1
-rw-r--r--Source/cmQtAutoMocUic.cxx7
-rw-r--r--Source/cmState.cxx12
-rw-r--r--Source/cmString.cxx1
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx9
-rw-r--r--Source/cmake.cxx42
-rw-r--r--Source/kwsys/RegularExpression.cxx4
-rw-r--r--Tests/CMakeLib/testStringAlgorithms.cxx3
-rw-r--r--Tests/CMakeLists.txt33
-rw-r--r--Tests/FindOpenAL/Test/main.cxx5
-rw-r--r--Tests/ISPC/ChainedStaticLibraries/CMakeLists.txt11
-rw-r--r--Tests/ISPC/CustomHeaderSuffix/CMakeLists.txt6
-rw-r--r--Tests/ISPC/Defines/CMakeLists.txt7
-rw-r--r--Tests/ISPC/DynamicLibrary/CMakeLists.txt9
-rw-r--r--Tests/ISPC/ObjectGenex/CMakeLists.txt11
-rw-r--r--Tests/ISPC/ObjectLibrary/CMakeLists.txt6
-rw-r--r--Tests/ISPC/ResponseAndDefine/CMakeLists.txt12
-rw-r--r--Tests/ISPC/StaticLibrary/CMakeLists.txt10
-rw-r--r--Tests/ISPC/SystemIncludes/CMakeLists.txt11
-rw-r--r--Tests/Module/ExternalData/Data1Check.cmake26
-rw-r--r--Tests/Module/ExternalData/Data2/Data2Check.cmake4
-rw-r--r--Tests/Module/ExternalData/Data3/Data3Check.cmake4
-rw-r--r--Tests/Module/ExternalData/Data4/Data4Check.cmake4
-rw-r--r--Tests/Module/ExternalData/Data5/Data5Check.cmake2
-rw-r--r--Tests/Module/ExternalData/DataNoSymlinks/DataNoSymlinksCheck.cmake2
-rw-r--r--Tests/QtAutogen/AutoMocGeneratedFile/CMakeLists.txt23
-rw-r--r--Tests/QtAutogen/AutoMocGeneratedFile/main.cpp7
-rw-r--r--Tests/QtAutogen/Tests.cmake1
-rw-r--r--Tests/RunCMake/Autogen/AutogenSkipLinting-build-stderr.txt1
-rw-r--r--Tests/RunCMake/Autogen/AutogenSkipLinting.cmake16
-rw-r--r--Tests/RunCMake/Autogen/RunCMakeTest.cmake15
-rw-r--r--Tests/RunCMake/Autogen/SkipLinting.cxx6
-rw-r--r--Tests/RunCMake/Autogen/SkipLinting.h11
-rw-r--r--Tests/RunCMake/CMakeLists.txt7
-rw-r--r--Tests/RunCMake/CXXModules/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/CXXModules/examples/req-private-other-target-build-result.txt1
-rw-r--r--Tests/RunCMake/CXXModules/examples/req-private-other-target-build-stdout.txt1
-rw-r--r--Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt9
-rw-r--r--Tests/RunCMake/CXXModules/examples/req-private-other-target/CMakeLists.txt16
-rw-r--r--Tests/RunCMake/CXXModules/examples/req-private-other-target/lib.cxx1
-rw-r--r--Tests/RunCMake/CXXModules/examples/req-private-other-target/main.cxx7
-rw-r--r--Tests/RunCMake/CXXModules/examples/req-private-other-target/priv.cxx1
-rw-r--r--Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey-stderr.txt2
-rw-r--r--Tests/RunCMake/CheckModules/CheckStructHasMemberWrongKey.cmake2
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument-stderr.txt2
-rw-r--r--Tests/RunCMake/CheckModules/CheckTypeSizeUnknownArgument.cmake2
-rw-r--r--Tests/RunCMake/CommandLine/E_capabilities-stdout.txt2
-rw-r--r--Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-check.py65
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/framework.json17
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json29
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json3
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/framework.json15
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_framework.json90
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json12
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_exe_framework.json79
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_shared_framework.json9
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_static_framework.json9
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json7
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json3
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader.json2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_2arch.json3
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_multigen.json2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json7
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/exe_framework.json164
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/shared_framework.json102
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/static_framework.json87
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_framework.json73
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2.cmake1
-rw-r--r--Tests/RunCMake/FileAPI/framework/CMakeLists.txt17
-rw-r--r--Tests/RunCMake/File_Generate/CMP0070-NEW-check.cmake2
-rw-r--r--Tests/RunCMake/File_Generate/CMP0070-OLD-check.cmake2
-rw-r--r--Tests/RunCMake/File_Generate/CMP0070-WARN-check.cmake2
-rw-r--r--Tests/RunCMake/Framework/FrameworkSystemIncludeTest.cmake12
-rw-r--r--Tests/RunCMake/GenEx-LINK_LIBRARY/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetCustomFlagTableDir-check.cmake2
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTestXML.cmake4
-rw-r--r--Tests/RunCMake/MacOSVersions/MacOSVersions-build-check.cmake2
-rw-r--r--Tests/RunCMake/MultiLint/C-launch_skip_linting_ON.cmake3
-rw-r--r--Tests/RunCMake/MultiLint/CMakeLists copy.txt3
-rw-r--r--Tests/RunCMake/MultiLint/CXX-launch_skip_linting_ON.cmake3
-rw-r--r--Tests/RunCMake/MultiLint/CXX_skip_linting_OFF-Build-result.txt1
-rw-r--r--Tests/RunCMake/MultiLint/CXX_skip_linting_OFF.cmake7
-rw-r--r--Tests/RunCMake/MultiLint/CXX_skip_linting_ON.cmake7
-rw-r--r--Tests/RunCMake/MultiLint/C_skip_linting_OFF-Build-result.txt1
-rw-r--r--Tests/RunCMake/MultiLint/C_skip_linting_OFF.cmake7
-rw-r--r--Tests/RunCMake/MultiLint/C_skip_linting_ON.cmake7
-rw-r--r--Tests/RunCMake/MultiLint/RunCMakeTest.cmake19
-rw-r--r--Tests/RunCMake/Ninja/CustomCommandDepfile-check.cmake6
-rw-r--r--Tests/RunCMake/Ninja/CustomCommandJobPool-check.cmake4
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-check.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-stdout.txt1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC.cmake3
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile-check.cmake6
-rw-r--r--Tests/RunCMake/XcodeProject-Device/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/XcodeProject-Device/DeploymentTarget.c (renamed from Tests/RunCMake/XcodeProject/DeploymentTarget.c)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/DeploymentTarget.cmake (renamed from Tests/RunCMake/XcodeProject/DeploymentTarget.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/EffectivePlatformNameOFF.cmake (renamed from Tests/RunCMake/XcodeProject/EffectivePlatformNameOFF.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/RunCMakeTest.cmake303
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XCTestAddBundle.cmake (renamed from Tests/RunCMake/XcodeProject/XCTestAddBundle.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XCTestLookup.cmake (renamed from Tests/RunCMake/XcodeProject/XCTestLookup.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeBundles-install-check.cmake (renamed from Tests/RunCMake/XcodeProject/XcodeBundles-install-check.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeBundles.cmake (renamed from Tests/RunCMake/XcodeProject/XcodeBundles.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombined-cmakeinstall-check.cmake (renamed from Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-cmakeinstall-check.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombined-install-check.cmake (renamed from Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombined.cmake (renamed from Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedPrune-install-check.cmake (renamed from Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-check.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedPrune-install-stdout.txt2
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedPrune.cmake (renamed from Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch-cmakeinstall-check.cmake (renamed from Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-cmakeinstall-check.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch-install-check.cmake (renamed from Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch.cmake (renamed from Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeInstallIOS-install-stdout.txt (renamed from Tests/RunCMake/XcodeProject/XcodeInstallIOS-install-stdout.txt)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeInstallIOS.cmake (renamed from Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeMultiplatform.cmake (renamed from Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeRemoveExcessiveISystem.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeTbdStub-stdout.txt (renamed from Tests/RunCMake/XcodeProject/XcodeTbdStub-stdout.txt)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/XcodeTbdStub.cmake (renamed from Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/dummy_main.swift18
-rw-r--r--Tests/RunCMake/XcodeProject-Device/foo.cpp3
-rw-r--r--Tests/RunCMake/XcodeProject-Device/main.c0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/main.cpp4
-rw-r--r--Tests/RunCMake/XcodeProject-Device/main.m (renamed from Tests/RunCMake/XcodeProject/main.m)0
-rw-r--r--Tests/RunCMake/XcodeProject-Device/osx.cmake (renamed from Tests/RunCMake/XcodeProject/osx.cmake)0
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake309
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-stdout.txt2
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake7
-rw-r--r--Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake6
-rw-r--r--Tests/RunCMake/ctest_memcheck/testAddressSanitizer.cmake2
-rw-r--r--Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake6
-rw-r--r--Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake2
-rw-r--r--Tests/RunCMake/file/COPY_FILE-file-replace.cmake2
-rw-r--r--Tests/RunCMake/file/COPY_FILE-link-to-file.cmake2
-rw-r--r--Tests/RunCMake/file/LOCK-error-guard-incorrect-stderr.txt2
-rw-r--r--Tests/RunCMake/file/LOCK-error-guard-incorrect.cmake2
-rw-r--r--Tests/RunCMake/file/RENAME-file-replace.cmake2
-rw-r--r--Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake6
-rw-r--r--Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake6
-rw-r--r--Tests/RunCMake/message/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/showIncludes.c8
-rw-r--r--Utilities/ClangTidyModule/CMakeLists.txt10
-rw-r--r--Utilities/ClangTidyModule/UsePragmaOnceCheck.cxx2
-rw-r--r--Utilities/IWYU/mapping.imp1
-rw-r--r--Utilities/Release/linux/aarch64/cache.txt2
-rw-r--r--Utilities/Release/linux/x86_64/cache.txt2
-rw-r--r--Utilities/cmbzip2/bzlib.c4
-rw-r--r--Utilities/cmbzip2/compress.c8
-rw-r--r--Utilities/cmcurl/curltest.c19
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_acl.c10
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_match.c4
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_ppmd8.c12
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c11
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_filter_uu.c7
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_7zip.c10
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c2
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_rar.c7
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_support_format_rar5.c15
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c9
-rw-r--r--Utilities/cmliblzma/liblzma/common/index.c3
-rw-r--r--Utilities/cmliblzma/liblzma/common/index_encoder.c4
-rw-r--r--Utilities/cmlibrhash/librhash/hex.c3
-rw-r--r--Utilities/cmlibuv/src/unix/tty.c4
-rw-r--r--Utilities/cmlibuv/src/unix/udp.c6
-rw-r--r--Utilities/cmnghttp2/lib/nghttp2_buf.c16
-rw-r--r--Utilities/cmzlib/gzread.c6
-rw-r--r--Utilities/cmzlib/gzwrite.c6
-rw-r--r--Utilities/cmzstd/lib/common/bitstream.h2
-rw-r--r--Utilities/cmzstd/lib/compress/fse_compress.c4
-rw-r--r--Utilities/cmzstd/lib/dictBuilder/divsufsort.c11
341 files changed, 2760 insertions, 1352 deletions
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,\
diff --git a/.codespellrc b/.codespellrc
index 0abd94e..00c6c52 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*
-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
+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,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/.gitlab-ci.yml b/.gitlab-ci.yml
index 700e436..6e0d01a 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-ninja-multi-clang:
extends:
- - .fedora37_makefiles_clang
+ - .fedora38_ninja_multi_clang
- .cmake_test_linux_release
- .linux_x86_64_tags
- .run_dependent
@@ -215,17 +215,27 @@ t:fedora37-makefiles-clang:
variables:
CMAKE_CI_JOB_NIGHTLY: "true"
-t:fedora37-makefiles:
+t:fedora38-makefiles-clang:
extends:
- - .fedora37_makefiles
+ - .fedora38_makefiles_clang
- .cmake_test_linux_release
- .linux_x86_64_tags
- .run_dependent
- .needs_centos6_x86_64
+ variables:
+ CMAKE_CI_JOB_NIGHTLY: "true"
-t:fedora37-makefiles-nospace:
+t:fedora38-makefiles:
extends:
- - .fedora37_makefiles
+ - .fedora38_makefiles
+ - .cmake_test_linux_release
+ - .linux_x86_64_tags
+ - .run_dependent
+ - .needs_centos6_x86_64
+
+t:fedora38-makefiles-nospace:
+ extends:
+ - .fedora38_makefiles
- .cmake_test_linux_release
- .linux_x86_64_tags
- .cmake_junit_artifacts
@@ -233,7 +243,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:
@@ -334,29 +344,9 @@ 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:fedora37-ninja:
+b:fedora38-ninja:
extends:
- - .fedora37_ninja
+ - .fedora38_ninja
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_x86_64_tags
@@ -391,40 +381,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 +781,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 +791,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"
@@ -884,17 +874,17 @@ t:macos-x86_64-makefiles:
needs:
- b:macos-x86_64-makefiles
-t:macos-x86_64-ninja-multi:
+t:macos-arm64-ninja-multi:
extends:
- - .macos_x86_64_ninja_multi
+ - .macos_arm64_ninja_multi
- .cmake_test_macos_external
- - .macos_x86_64_tags_ext
+ - .macos_arm64_tags_ext
- .cmake_junit_artifacts
- .run_dependent
dependencies:
- - t:macos-x86_64-ninja
+ - t:macos-arm64-ninja
needs:
- - t:macos-x86_64-ninja
+ - t:macos-arm64-ninja
variables:
CMAKE_CI_JOB_NIGHTLY: "true"
@@ -938,17 +928,17 @@ t:macos-x86_64-ninja-ub:
variables:
CMAKE_CI_JOB_NIGHTLY: "true"
-t:macos-x86_64-xcode-ub:
+t:macos-arm64-xcode-ub:
extends:
- - .macos_x86_64_xcode_ub
+ - .macos_arm64_xcode_ub
- .cmake_test_macos_external
- - .macos_x86_64_tags_ext
+ - .macos_arm64_tags_ext
- .cmake_junit_artifacts
- .run_dependent
dependencies:
- - t:macos-x86_64-ninja
+ - t:macos-arm64-ninja
needs:
- - t:macos-x86_64-ninja
+ - t:macos-arm64-ninja
variables:
CMAKE_CI_JOB_NIGHTLY: "true"
diff --git a/.gitlab/ci/configure_common.cmake b/.gitlab/ci/configure_common.cmake
index ed3d18d..c207a74 100644
--- a/.gitlab/ci/configure_common.cmake
+++ b/.gitlab/ci/configure_common.cmake
@@ -2,7 +2,7 @@ if("$ENV{CMAKE_CI_BOOTSTRAP}")
# Launchers do not work during bootstrap: no ctest available.
set(CTEST_USE_LAUNCHERS "OFF" CACHE BOOL "")
# We configure by bootstrapping, so skip the BootstrapTest.
- set(CMAKE_SKIP_BOOTSTRAP_TEST ON CACHE BOOL "")
+ set(CMake_TEST_BOOTSTRAP OFF CACHE BOOL "")
else()
set(CTEST_USE_LAUNCHERS "ON" CACHE BOOL "")
endif()
diff --git a/.gitlab/ci/configure_extdeps_common.cmake b/.gitlab/ci/configure_extdeps_common.cmake
index 2c7d328..c06592c 100644
--- a/.gitlab/ci/configure_extdeps_common.cmake
+++ b/.gitlab/ci/configure_extdeps_common.cmake
@@ -1,5 +1,5 @@
set(CMAKE_USE_SYSTEM_LIBRARIES ON CACHE BOOL "")
-set(CMAKE_SKIP_BOOTSTRAP_TEST ON CACHE BOOL "")
+set(CMake_TEST_BOOTSTRAP OFF CACHE BOOL "")
set(CMake_TEST_Qt6 OFF CACHE BOOL "")
include("${CMAKE_CURRENT_LIST_DIR}/configure_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 f4c4cdd..0000000
--- a/.gitlab/ci/configure_fedora37_clang_analyzer.cmake
+++ /dev/null
@@ -1 +0,0 @@
-include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora37_common.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_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_asan.cmake b/.gitlab/ci/configure_fedora38_asan.cmake
index 363e953..8eae500 100644
--- a/.gitlab/ci/configure_fedora37_asan.cmake
+++ b/.gitlab/ci/configure_fedora38_asan.cmake
@@ -1,4 +1,4 @@
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")
+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_fedora37_common.cmake b/.gitlab/ci/configure_fedora38_common.cmake
index 4484e26..4484e26 100644
--- a/.gitlab/ci/configure_fedora37_common.cmake
+++ b/.gitlab/ci/configure_fedora38_common.cmake
diff --git a/.gitlab/ci/configure_fedora37_common_clang.cmake b/.gitlab/ci/configure_fedora38_common_clang.cmake
index 70c9df9..70c9df9 100644
--- a/.gitlab/ci/configure_fedora37_common_clang.cmake
+++ b/.gitlab/ci/configure_fedora38_common_clang.cmake
diff --git a/.gitlab/ci/configure_fedora37_extdeps.cmake b/.gitlab/ci/configure_fedora38_extdeps.cmake
index 8e545f5..8e545f5 100644
--- a/.gitlab/ci/configure_fedora37_extdeps.cmake
+++ b/.gitlab/ci/configure_fedora38_extdeps.cmake
diff --git a/.gitlab/ci/configure_fedora37_makefiles.cmake b/.gitlab/ci/configure_fedora38_makefiles.cmake
index c2f9982..c2f9982 100644
--- a/.gitlab/ci/configure_fedora37_makefiles.cmake
+++ b/.gitlab/ci/configure_fedora38_makefiles.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_fedora37_ninja.cmake b/.gitlab/ci/configure_fedora38_ninja.cmake
index 5b40677..ac6b9f6 100644
--- a/.gitlab/ci/configure_fedora37_ninja.cmake
+++ b/.gitlab/ci/configure_fedora38_ninja.cmake
@@ -11,4 +11,4 @@ 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")
+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..214a123
--- /dev/null
+++ b/.gitlab/ci/configure_fedora38_ninja_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_fedora37_ninja_multi.cmake b/.gitlab/ci/configure_fedora38_ninja_multi.cmake
index 94af721..94af721 100644
--- a/.gitlab/ci/configure_fedora37_ninja_multi.cmake
+++ b/.gitlab/ci/configure_fedora38_ninja_multi.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_fedora37_sphinx.cmake b/.gitlab/ci/configure_fedora38_sphinx.cmake
index 90d159b..90d159b 100644
--- a/.gitlab/ci/configure_fedora37_sphinx.cmake
+++ b/.gitlab/ci/configure_fedora38_sphinx.cmake
diff --git a/.gitlab/ci/configure_fedora37_sphinx_package.cmake b/.gitlab/ci/configure_fedora38_sphinx_package.cmake
index e839de8..e839de8 100644
--- a/.gitlab/ci/configure_fedora37_sphinx_package.cmake
+++ b/.gitlab/ci/configure_fedora38_sphinx_package.cmake
diff --git a/.gitlab/ci/configure_fedora37_tidy.cmake b/.gitlab/ci/configure_fedora38_tidy.cmake
index f8eb9ab..5b062da 100644
--- a/.gitlab/ci/configure_fedora37_tidy.cmake
+++ b/.gitlab/ci/configure_fedora38_tidy.cmake
@@ -2,4 +2,4 @@ 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")
+include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common.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 43bccdb..0000000
--- a/.gitlab/ci/configure_linux_clang_cxx_modules_ninja.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-set(CMake_TEST_MODULE_COMPILATION "named,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 43bccdb..0000000
--- a/.gitlab/ci/configure_linux_clang_cxx_modules_ninja_multi.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-set(CMake_TEST_MODULE_COMPILATION "named,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_macos_x86_64_ninja_multi.cmake b/.gitlab/ci/configure_macos_arm64_ninja_multi.cmake
index b22285c..b22285c 100644
--- a/.gitlab/ci/configure_macos_x86_64_ninja_multi.cmake
+++ b/.gitlab/ci/configure_macos_arm64_ninja_multi.cmake
diff --git a/.gitlab/ci/configure_macos_x86_64_xcode_ub.cmake b/.gitlab/ci/configure_macos_arm64_xcode_ub.cmake
index 1b976d2..1b976d2 100644
--- a/.gitlab/ci/configure_macos_x86_64_xcode_ub.cmake
+++ b/.gitlab/ci/configure_macos_arm64_xcode_ub.cmake
diff --git a/.gitlab/ci/configure_macos_package_common.cmake b/.gitlab/ci/configure_macos_package_common.cmake
index 3aa8ae2..8aab41b 100644
--- a/.gitlab/ci/configure_macos_package_common.cmake
+++ b/.gitlab/ci/configure_macos_package_common.cmake
@@ -10,12 +10,12 @@ set(CMAKE_CXX_FLAGS "-stdlib=libc++" CACHE STRING "")
set(CMAKE_C_STANDARD "11" CACHE STRING "")
set(CMAKE_CXX_STANDARD "14" CACHE STRING "")
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "")
-set(CMAKE_SKIP_BOOTSTRAP_TEST "TRUE" CACHE STRING "")
set(BUILD_CursesDialog "ON" CACHE BOOL "")
set(BUILD_QtDialog "TRUE" CACHE BOOL "")
set(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL "3" CACHE STRING "")
set(CMake_INSTALL_DEPENDENCIES "ON" CACHE BOOL "")
set(CMAKE_SKIP_RPATH "TRUE" CACHE BOOL "")
+set(CMake_TEST_BOOTSTRAP OFF CACHE BOOL "")
set(CMake_TEST_NO_FindPackageModeMakefileTest "TRUE" CACHE BOOL "")
# XXX(sccache): restore sccache when it works for multiple architectures:
diff --git a/.gitlab/ci/configure_windows_arm64_vs2022.cmake b/.gitlab/ci/configure_windows_arm64_vs2022.cmake
index c7d41ea..290d380 100644
--- a/.gitlab/ci/configure_windows_arm64_vs2022.cmake
+++ b/.gitlab/ci/configure_windows_arm64_vs2022.cmake
@@ -1 +1,4 @@
+set(CMake_TEST_MODULE_COMPILATION "named,partitions,internal_partitions" CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_msvc_cxx_modules_common.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_vs_common.cmake")
diff --git a/.gitlab/ci/configure_windows_clang_ninja.cmake b/.gitlab/ci/configure_windows_clang_ninja.cmake
index a66e302..f864dde 100644
--- a/.gitlab/ci/configure_windows_clang_ninja.cmake
+++ b/.gitlab/ci/configure_windows_clang_ninja.cmake
@@ -1,5 +1,5 @@
if("$ENV{CMAKE_CI_BUILD_NAME}" MATCHES "(^|_)gnu(_|$)")
- set(CMake_TEST_MODULE_COMPILATION "named,partitions,internal_partitions,export_bmi,install_bmi,shared" CACHE STRING "")
+ 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 "")
endif()
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_clang_common.cmake")
diff --git a/.gitlab/ci/configure_windows_package_common.cmake b/.gitlab/ci/configure_windows_package_common.cmake
index b3929a4..541a541 100644
--- a/.gitlab/ci/configure_windows_package_common.cmake
+++ b/.gitlab/ci/configure_windows_package_common.cmake
@@ -13,7 +13,7 @@ set(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL "3" CACHE STRING "")
# Disable ccmake.
set(BUILD_CursesDialog "OFF" CACHE BOOL "")
-set(CMAKE_SKIP_BOOTSTRAP_TEST "TRUE" CACHE STRING "")
+set(CMake_TEST_BOOTSTRAP OFF CACHE BOOL "")
set(CMake_TEST_Java OFF CACHE BOOL "")
set(CMake_TEST_Qt5 OFF CACHE BOOL "")
set(CMake_TEST_Qt6 OFF CACHE BOOL "")
diff --git a/.gitlab/ci/configure_windows_vs2022_x64.cmake b/.gitlab/ci/configure_windows_vs2022_x64.cmake
index 1e0f584..290d380 100644
--- a/.gitlab/ci/configure_windows_vs2022_x64.cmake
+++ b/.gitlab/ci/configure_windows_vs2022_x64.cmake
@@ -1,4 +1,4 @@
-set(CMake_TEST_MODULE_COMPILATION "named,partitions" CACHE STRING "")
+set(CMake_TEST_MODULE_COMPILATION "named,partitions,internal_partitions" CACHE STRING "")
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_msvc_cxx_modules_common.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_vs_common.cmake")
diff --git a/.gitlab/ci/ctest_memcheck_fedora37_asan.lsan.supp b/.gitlab/ci/ctest_memcheck_fedora38_asan.lsan.supp
index 8ec1a03..8ec1a03 100644
--- a/.gitlab/ci/ctest_memcheck_fedora37_asan.lsan.supp
+++ b/.gitlab/ci/ctest_memcheck_fedora38_asan.lsan.supp
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 <ben.boeckel@kitware.com>
-
-# 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/docker/fedora37/clang_tidy_headers_packages.lst b/.gitlab/ci/docker/fedora37/clang_tidy_headers_packages.lst
deleted file mode 100644
index fe86105..0000000
--- a/.gitlab/ci/docker/fedora37/clang_tidy_headers_packages.lst
+++ /dev/null
@@ -1,4 +0,0 @@
-dnf-command(download)
-rpm-build
-python3-devel
-clang-tools-extra
diff --git a/.gitlab/ci/docker/fedora37/install_clang_tidy_headers.sh b/.gitlab/ci/docker/fedora37/install_clang_tidy_headers.sh
deleted file mode 100755
index 200fa1e..0000000
--- a/.gitlab/ci/docker/fedora37/install_clang_tidy_headers.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# Packages for building the clang-tidy plugin.
-# TODO: Upstream this as a proper Fedora package.
-dnf install \
- --setopt=install_weak_deps=False \
- --setopt=fastestmirror=True \
- --setopt=max_parallel_downloads=10 \
- -y \
- $(grep '^[^#]\+$' /root/clang_tidy_headers_packages.lst)
-
-clang_source_rpm=$(rpm -q --queryformat '%{SOURCERPM}' clang-tools-extra)
-clang_version=$(rpm -q --queryformat '%{VERSION}' clang-tools-extra)
-dnf download --source -y clang
-rpm -i "$clang_source_rpm"
-rpmbuild -bp /root/rpmbuild/SPECS/clang.spec
-cd "/root/rpmbuild/BUILD/clang-tools-extra-$clang_version.src"
-find clang-tidy -name '*.h' | tar -cf /root/clang-tidy-headers.tar -T -
diff --git a/.gitlab/ci/docker/fedora37/Dockerfile b/.gitlab/ci/docker/fedora38/Dockerfile
index b36a17e..4918693 100644
--- a/.gitlab/ci/docker/fedora37/Dockerfile
+++ b/.gitlab/ci/docker/fedora38/Dockerfile
@@ -1,11 +1,10 @@
# syntax=docker/dockerfile:1
-ARG BASE_IMAGE=fedora:37
+ARG BASE_IMAGE=fedora:38
FROM ${BASE_IMAGE} AS dnf-cache
# Populate DNF cache w/ the fresh metadata and prefetch packages.
-RUN --mount=type=bind,source=clang_tidy_headers_packages.lst,target=/root/clang_tidy_headers_packages.lst \
- --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
+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 \
@@ -30,17 +29,6 @@ RUN --mount=type=bind,source=install_rvm.sh,target=/root/install_rvm.sh \
sh /root/install_rvm.sh
-FROM ${BASE_IMAGE} AS clang-tidy-headers
-LABEL maintainer="Kyle Edwards <kyle.edwards@kitware.com>"
-
-RUN --mount=type=bind,source=install_clang_tidy_headers.sh,target=/root/install_clang_tidy_headers.sh \
- --mount=type=bind,source=clang_tidy_headers_packages.lst,target=/root/clang_tidy_headers_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_clang_tidy_headers.sh
-
-
FROM ${BASE_IMAGE} AS iwyu-build
LABEL maintainer="Kyle Edwards <kyle.edwards@kitware.com>"
@@ -66,8 +54,5 @@ RUN --mount=type=bind,source=install_deps.sh,target=/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=clang-tidy-headers,source=/root,target=/root \
- tar -C /usr/include -xf /root/clang-tidy-headers.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/fedora38/deps_packages.lst
index 51f84ff..c7c1385 100644
--- a/.gitlab/ci/docker/fedora37/deps_packages.lst
+++ b/.gitlab/ci/docker/fedora38/deps_packages.lst
@@ -7,6 +7,7 @@ qt6-qtbase-devel
# Install development tools.
clang
clang-tools-extra
+clang-tools-extra-devel
compiler-rt
flang
flang-devel
diff --git a/.gitlab/ci/docker/fedora37/install_deps.sh b/.gitlab/ci/docker/fedora38/install_deps.sh
index cd2701e..cd2701e 100755
--- a/.gitlab/ci/docker/fedora37/install_deps.sh
+++ b/.gitlab/ci/docker/fedora38/install_deps.sh
diff --git a/.gitlab/ci/docker/fedora37/install_iwyu.sh b/.gitlab/ci/docker/fedora38/install_iwyu.sh
index 684e355..684e355 100755
--- a/.gitlab/ci/docker/fedora37/install_iwyu.sh
+++ b/.gitlab/ci/docker/fedora38/install_iwyu.sh
diff --git a/.gitlab/ci/docker/fedora37/install_rvm.sh b/.gitlab/ci/docker/fedora38/install_rvm.sh
index 10e7545..10e7545 100755
--- a/.gitlab/ci/docker/fedora37/install_rvm.sh
+++ b/.gitlab/ci/docker/fedora38/install_rvm.sh
diff --git a/.gitlab/ci/docker/fedora37/iwyu_packages.lst b/.gitlab/ci/docker/fedora38/iwyu_packages.lst
index e3551bd..e3551bd 100644
--- a/.gitlab/ci/docker/fedora37/iwyu_packages.lst
+++ b/.gitlab/ci/docker/fedora38/iwyu_packages.lst
diff --git a/.gitlab/ci/docker/fedora37/rvm_packages.lst b/.gitlab/ci/docker/fedora38/rvm_packages.lst
index 1dc852e..1dc852e 100644
--- a/.gitlab/ci/docker/fedora37/rvm_packages.lst
+++ b/.gitlab/ci/docker/fedora38/rvm_packages.lst
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_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_asan.sh b/.gitlab/ci/env_fedora38_asan.sh
index e976486..e976486 100644
--- a/.gitlab/ci/env_fedora37_asan.sh
+++ b/.gitlab/ci/env_fedora38_asan.sh
diff --git a/.gitlab/ci/env_fedora37_clang_analyzer.sh b/.gitlab/ci/env_fedora38_clang_analyzer.sh
index d732c0b..d732c0b 100644
--- a/.gitlab/ci/env_fedora37_clang_analyzer.sh
+++ b/.gitlab/ci/env_fedora38_clang_analyzer.sh
diff --git a/.gitlab/ci/env_fedora37_common_clang.sh b/.gitlab/ci/env_fedora38_common_clang.sh
index b03b757..fc9c041 100644
--- a/.gitlab/ci/env_fedora37_common_clang.sh
+++ b/.gitlab/ci/env_fedora38_common_clang.sh
@@ -1,4 +1,4 @@
-export CC=/usr/bin/clang-15
-export CXX=/usr/bin/clang++-15
+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_fedora37_extdeps.sh b/.gitlab/ci/env_fedora38_extdeps.sh
index 7076e18..7076e18 100644
--- a/.gitlab/ci/env_fedora37_extdeps.sh
+++ b/.gitlab/ci/env_fedora38_extdeps.sh
diff --git a/.gitlab/ci/env_fedora37_makefiles.cmake b/.gitlab/ci/env_fedora38_makefiles.cmake
index ef13cda..ef13cda 100644
--- a/.gitlab/ci/env_fedora37_makefiles.cmake
+++ b/.gitlab/ci/env_fedora38_makefiles.cmake
diff --git a/.gitlab/ci/env_fedora37_makefiles.sh b/.gitlab/ci/env_fedora38_makefiles.sh
index c482642..c482642 100644
--- a/.gitlab/ci/env_fedora37_makefiles.sh
+++ b/.gitlab/ci/env_fedora38_makefiles.sh
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_macos_x86_64_ninja_multi.sh b/.gitlab/ci/env_fedora38_ninja.sh
index 217ff30..217ff30 100644
--- a/.gitlab/ci/env_macos_x86_64_ninja_multi.sh
+++ b/.gitlab/ci/env_fedora38_ninja.sh
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_fedora37_ninja_multi.sh b/.gitlab/ci/env_fedora38_ninja_multi.sh
index 217ff30..217ff30 100644
--- a/.gitlab/ci/env_fedora37_ninja_multi.sh
+++ b/.gitlab/ci/env_fedora38_ninja_multi.sh
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/ci/env_fedora37_ninja.sh b/.gitlab/ci/env_macos_arm64_ninja_multi.sh
index 217ff30..217ff30 100644
--- a/.gitlab/ci/env_fedora37_ninja.sh
+++ b/.gitlab/ci/env_macos_arm64_ninja_multi.sh
diff --git a/.gitlab/ci/env_macos_arm64_xcode_ub.cmake b/.gitlab/ci/env_macos_arm64_xcode_ub.cmake
new file mode 100644
index 0000000..244f088
--- /dev/null
+++ b/.gitlab/ci/env_macos_arm64_xcode_ub.cmake
@@ -0,0 +1 @@
+set(ENV{CMAKE_OSX_ARCHITECTURES} "arm64;x86_64")
diff --git a/.gitlab/ci/env_macos_x86_64_xcode_ub.cmake b/.gitlab/ci/env_macos_x86_64_xcode_ub.cmake
deleted file mode 100644
index 4b5c401..0000000
--- a/.gitlab/ci/env_macos_x86_64_xcode_ub.cmake
+++ /dev/null
@@ -1 +0,0 @@
-set(ENV{CMAKE_OSX_ARCHITECTURES} "x86_64;arm64")
diff --git a/.gitlab/ci/pre_build_fedora37_tidy.sh b/.gitlab/ci/pre_build_fedora38_tidy.sh
index 7580ef1..7580ef1 100644
--- a/.gitlab/ci/pre_build_fedora37_tidy.sh
+++ b/.gitlab/ci/pre_build_fedora38_tidy.sh
diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml
index 3d62b01..f4cc401 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-03-29"
+.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,25 @@
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
+
+.fedora38_ninja_multi_clang:
+ extends: .fedora38
+
+ variables:
+ CMAKE_CONFIGURATION: fedora38_ninja_multi_clang
+ CMAKE_GENERATOR: "Ninja Multi-Config"
### Sanitizers
@@ -226,13 +233,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
@@ -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:
@@ -478,7 +463,7 @@
.cmake_codespell_linux:
stage: build
- extends: .fedora37
+ extends: .fedora38
script:
- .gitlab/ci/codespell.sh
interruptible: true
@@ -623,7 +608,7 @@
.cmake_org_help:
stage: build
extends:
- - .fedora37
+ - .fedora38
- .linux_x86_64_tags
- .cmake_org_help_artifacts
script:
diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml
index f6fea3d..09d7598 100644
--- a/.gitlab/os-macos.yml
+++ b/.gitlab/os-macos.yml
@@ -7,7 +7,7 @@
GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci ext/$CI_CONCURRENT_ID"
# TODO: Factor this out so that each job selects the Xcode version to
# use so that different versions can be tested in a single pipeline.
- DEVELOPER_DIR: "/Applications/Xcode-14.2.app/Contents/Developer"
+ DEVELOPER_DIR: "/Applications/Xcode-14.3.app/Contents/Developer"
# Avoid conflicting with other projects running on the same machine.
SCCACHE_SERVER_PORT: 4227
@@ -80,19 +80,19 @@
CMAKE_GENERATOR: Xcode
CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
-.macos_x86_64_xcode_ub:
+.macos_arm64_xcode_ub:
extends: .macos
variables:
- CMAKE_CONFIGURATION: macos_x86_64_xcode_ub
+ CMAKE_CONFIGURATION: macos_arm64_xcode_ub
CMAKE_GENERATOR: Xcode
CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
-.macos_x86_64_ninja_multi:
+.macos_arm64_ninja_multi:
extends: .macos
variables:
- CMAKE_CONFIGURATION: macos_x86_64_ninja_multi
+ CMAKE_CONFIGURATION: macos_arm64_ninja_multi
CMAKE_GENERATOR: "Ninja Multi-Config"
CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
@@ -110,7 +110,7 @@
- cmake # Since this is a bare runner, pin to a project.
- macos-x86_64
- shell
- - xcode-14.2
+ - xcode-14.3
- nonconcurrent
.macos_x86_64_tags_ext:
@@ -118,7 +118,7 @@
- cmake # Since this is a bare runner, pin to a project.
- macos-x86_64
- shell
- - xcode-14.2
+ - xcode-14.3
- concurrent
.macos_arm64_tags:
@@ -126,7 +126,7 @@
- cmake # Since this is a bare runner, pin to a project.
- macos-arm64
- shell
- - xcode-14.2
+ - xcode-14.3
- nonconcurrent
.macos_arm64_tags_ext:
@@ -134,7 +134,7 @@
- cmake # Since this is a bare runner, pin to a project.
- macos-arm64
- shell
- - xcode-14.2
+ - xcode-14.3
- concurrent
.macos_arm64_tags_package:
@@ -142,7 +142,7 @@
- cmake # Since this is a bare runner, pin to a project.
- macos-arm64
- shell
- - xcode-14.2
+ - xcode-14.3
- nonconcurrent
- finder
diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml
index 07a479e..026f2f4 100644
--- a/.gitlab/os-windows.yml
+++ b/.gitlab/os-windows.yml
@@ -35,25 +35,25 @@
variables:
VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat"
VCVARSPLATFORM: "x64"
- VCVARSVERSION: "14.35.32215"
+ VCVARSVERSION: "14.36.32532"
.windows_vcvarsall_vs2022_x86:
variables:
VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat"
VCVARSPLATFORM: "x86"
- VCVARSVERSION: "14.35.32215"
+ VCVARSVERSION: "14.36.32532"
.windows_vcvarsall_vs2022_x64_arm64:
variables:
VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat"
VCVARSPLATFORM: "x64_arm64"
- VCVARSVERSION: "14.35.32215"
+ VCVARSVERSION: "14.36.32532"
.windows_arm64_vcvarsall_vs2022:
variables:
VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat"
VCVARSPLATFORM: "arm64"
- VCVARSVERSION: "14.35.32215"
+ VCVARSVERSION: "14.36.32532"
.windows_vs2022_x64_ninja:
extends:
@@ -112,7 +112,7 @@
CMAKE_CONFIGURATION: windows_vs2022_x64
CMAKE_GENERATOR: "Visual Studio 17 2022"
CMAKE_GENERATOR_PLATFORM: "x64"
- CMAKE_GENERATOR_TOOLSET: "v143,version=14.35.32215"
+ CMAKE_GENERATOR_TOOLSET: "v143,version=14.36.32532"
CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
.windows_vs2019_x64:
@@ -261,7 +261,7 @@
CMAKE_CONFIGURATION: windows_arm64_vs2022
CMAKE_GENERATOR: "Visual Studio 17 2022"
CMAKE_GENERATOR_PLATFORM: "ARM64"
- CMAKE_GENERATOR_TOOLSET: "v143,version=14.35.32215"
+ CMAKE_GENERATOR_TOOLSET: "v143,version=14.36.32532"
CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
.mingw_osdn_io:
@@ -295,7 +295,7 @@
- windows-x86_64
- shell
- vs2022
- - msvc-19.35
+ - msvc-19.36
- nonconcurrent
.windows_x86_64_tags_nonconcurrent_vs2022_arm64:
@@ -304,7 +304,7 @@
- windows-x86_64
- shell
- vs2022
- - msvc-19.35-arm64
+ - msvc-19.36-arm64
- nonconcurrent
.windows_x86_64_tags_concurrent_vs2022:
@@ -313,7 +313,7 @@
- windows-x86_64
- shell
- vs2022
- - msvc-19.35
+ - msvc-19.36
- concurrent
.windows_x86_64_tags_concurrent_vs2019:
@@ -338,7 +338,7 @@
- windows-arm64
- shell
- vs2022
- - msvc-19.35
+ - msvc-19.36
- nonconcurrent
.windows_arm64_tags_concurrent_vs2022:
@@ -347,7 +347,7 @@
- windows-arm64
- shell
- vs2022
- - msvc-19.35
+ - msvc-19.36
- concurrent
## Windows-specific scripts
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
diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim
index aefdcee..bc8b06a 100644
--- a/Auxiliary/vim/syntax/cmake.vim
+++ b/Auxiliary/vim/syntax/cmake.vim
@@ -325,6 +325,7 @@ syn keyword cmakeProperty contained
\ SKIP_AUTORCC
\ SKIP_AUTOUIC
\ SKIP_BUILD_RPATH
+ \ SKIP_LINTING
\ SKIP_PRECOMPILE_HEADERS
\ SKIP_REGULAR_EXPRESSION
\ SKIP_RETURN_CODE
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst
index 1ccd434..7b3aa1a 100644
--- a/Help/command/add_custom_command.rst
+++ b/Help/command/add_custom_command.rst
@@ -489,9 +489,12 @@ When the command will happen is determined by which
of the following is specified:
``PRE_BUILD``
- On :ref:`Visual Studio Generators`, run before any other rules are
- executed within the target.
- On other generators, run just before ``PRE_LINK`` commands.
+ This option has unique behavior for the :ref:`Visual Studio Generators`.
+ When using one of the Visual Studio generators, the command will run before
+ any other rules are executed within the target. With all other generators,
+ this option behaves the same as ``PRE_LINK`` instead. Because of this,
+ it is recommended to avoid using ``PRE_BUILD`` except when it is known that
+ a Visual Studio generator is being used.
``PRE_LINK``
Run after sources have been compiled but before linking the binary
or running the librarian or archiver tool of a static library.
diff --git a/Help/command/configure_file.rst b/Help/command/configure_file.rst
index 6f4cedf..07dc2e1 100644
--- a/Help/command/configure_file.rst
+++ b/Help/command/configure_file.rst
@@ -12,10 +12,10 @@ Copy a file to another location and modify its contents.
[NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])
Copies an ``<input>`` file to an ``<output>`` file and substitutes
-variable values referenced as ``@VAR@`` or ``${VAR}`` in the input
-file content. Each variable reference will be replaced with the
-current value of the variable, or the empty string if the variable
-is not defined. Furthermore, input lines of the form
+variable values referenced as ``@VAR@``, ``${VAR}``, ``$CACHE{VAR}`` or
+``$ENV{VAR}`` in the input file content. Each variable reference will be
+replaced with the current value of the variable, or the empty string if
+the variable is not defined. Furthermore, input lines of the form
.. code-block:: c
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/Help/manual/cmake-file-api.7.rst b/Help/manual/cmake-file-api.7.rst
index 7ff9728..0bdb419 100644
--- a/Help/manual/cmake-file-api.7.rst
+++ b/Help/manual/cmake-file-api.7.rst
@@ -425,7 +425,7 @@ Version 1 does not exist to avoid confusion with that from
{
"kind": "codemodel",
- "version": { "major": 2, "minor": 5 },
+ "version": { "major": 2, "minor": 6 },
"paths": {
"source": "/path/to/top-level-source-dir",
"build": "/path/to/top-level-build-dir"
@@ -1211,6 +1211,28 @@ with members:
an unsigned integer 0-based index into the ``backtraceGraph``
member's ``nodes`` array.
+ ``frameworks``
+ Optional member that is present when, on Apple platforms, there are
+ frameworks. The value is a JSON array with an entry for each directory.
+ Each entry is a JSON object with members:
+
+ ``path``
+ A string specifying the path to the framework directory,
+ represented with forward slashes.
+
+ ``isSystem``
+ Optional member that is present with boolean value ``true`` if
+ the framework is marked as a system one.
+
+ ``backtrace``
+ Optional member that is present when a CMake language backtrace to
+ the :command:`target_link_libraries` or other command invocation
+ that added this framework is available. The value is
+ an unsigned integer 0-based index into the ``backtraceGraph``
+ member's ``nodes`` array.
+
+ This field was added in codemodel version 2.6.
+
``precompileHeaders``
Optional member that is present when :command:`target_precompile_headers`
or other command invocations set :prop_tgt:`PRECOMPILE_HEADERS` on the
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 8ee5573..b2a27a0 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -557,6 +557,7 @@ Properties on Source Files
/prop_sf/SKIP_AUTOMOC
/prop_sf/SKIP_AUTORCC
/prop_sf/SKIP_AUTOUIC
+ /prop_sf/SKIP_LINTING
/prop_sf/SKIP_PRECOMPILE_HEADERS
/prop_sf/SKIP_UNITY_BUILD_INCLUSION
/prop_sf/Swift_DEPENDENCIES_FILE
diff --git a/Help/prop_sf/SKIP_LINTING.rst b/Help/prop_sf/SKIP_LINTING.rst
new file mode 100644
index 0000000..19592a8
--- /dev/null
+++ b/Help/prop_sf/SKIP_LINTING.rst
@@ -0,0 +1,41 @@
+SKIP_LINTING
+------------
+
+.. versionadded:: 3.27
+
+This property allows you to exclude a specific source file
+from the linting process. The linting process involves running
+tools such as :prop_tgt:`<LANG>_CPPLINT`, :prop_tgt:`<LANG>_CLANG_TIDY`,
+:prop_tgt:`<LANG>_CPPCHECK`, and :prop_tgt:`<LANG>_INCLUDE_WHAT_YOU_USE`
+on the source files. By setting ``SKIP_LINTING`` on a source file,
+the mentioned linting tools will not be executed for that
+particular file.
+
+Example
+^^^^^^^
+
+Consider a C++ project that includes multiple source files,
+such as ``main.cpp``, ``things.cpp``, and ``generatedBindings.cpp``.
+In this example, you want to exclude the ``generatedBindings.cpp``
+file from the linting process. To achieve this, you can utilize
+the ``SKIP_LINTING`` property with the :command:`set_source_files_properties`
+command as shown below:
+
+.. code-block:: cmake
+
+ add_executable(MyApp main.cpp things.cpp generatedBindings.cpp)
+
+ set_source_files_properties(generatedBindings.cpp PROPERTIES
+ SKIP_LINTING ON
+ )
+
+In the provided code snippet, the ``SKIP_LINTING`` property is set to true
+for the ``generatedBindings.cpp`` source file. As a result, when the linting
+tools specified by :prop_tgt:`<LANG>_CPPLINT`, :prop_tgt:`<LANG>_CLANG_TIDY`,
+:prop_tgt:`<LANG>_CPPCHECK`, or :prop_tgt:`<LANG>_INCLUDE_WHAT_YOU_USE`
+are executed, they will skip analyzing the ``generatedBindings.cpp`` file.
+
+By using the ``SKIP_LINTING`` property, you can selectively exclude specific
+source files from the linting process. This allows you to focus the
+linting tools on the relevant parts of your project, enhancing the efficiency
+and effectiveness of the linting workflow.
diff --git a/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst b/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst
index c8ec8b5..e1fea37 100644
--- a/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst
+++ b/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst
@@ -25,6 +25,8 @@ system target. This has the following effects:
would be by default. Entries of
:prop_tgt:`INTERFACE_SYSTEM_INCLUDE_DIRECTORIES` are not affected,
and will always be treated as system include directories.
+* On Apple platforms, when the target is a framework, it will not be treated as
+ system.
This property can also be enabled on a non-imported target. Doing so does
not affect the build system, but does tell the :command:`install(EXPORT)` and
diff --git a/Help/prop_tgt/LANG_CLANG_TIDY.rst b/Help/prop_tgt/LANG_CLANG_TIDY.rst
index 1e10933..9ecdc57 100644
--- a/Help/prop_tgt/LANG_CLANG_TIDY.rst
+++ b/Help/prop_tgt/LANG_CLANG_TIDY.rst
@@ -30,3 +30,12 @@ when a target is created.
This property supports
:manual:`generator expressions <cmake-generator-expressions(7)>`.
+
+.. versionadded:: 3.27
+
+ :prop_sf:`SKIP_LINTING` can be set on individual source files to exclude
+ them from the linting tools defined by :prop_tgt:`<LANG>_CPPLINT`,
+ ``<LANG>_CLANG_TIDY``, :prop_tgt:`<LANG>_CPPCHECK`, and
+ :prop_tgt:`<LANG>_INCLUDE_WHAT_YOU_USE`. When :prop_sf:`SKIP_LINTING` is
+ set to true on a source file, those tools will not be run on that specific
+ file.
diff --git a/Help/prop_tgt/LANG_CPPCHECK.rst b/Help/prop_tgt/LANG_CPPCHECK.rst
index 0b2dee6..0628061 100644
--- a/Help/prop_tgt/LANG_CPPCHECK.rst
+++ b/Help/prop_tgt/LANG_CPPCHECK.rst
@@ -20,3 +20,12 @@ created.
This property supports
:manual:`generator expressions <cmake-generator-expressions(7)>`.
+
+.. versionadded:: 3.27
+
+ :prop_sf:`SKIP_LINTING` can be set on individual source files to exclude
+ them from the linting tools defined by :prop_tgt:`<LANG>_CPPLINT`,
+ :prop_tgt:`<LANG>_CLANG_TIDY`, ``<LANG>_CPPCHECK``, and
+ :prop_tgt:`<LANG>_INCLUDE_WHAT_YOU_USE`. When :prop_sf:`SKIP_LINTING` is
+ set to true on a source file, those tools will not be run on that specific
+ file.
diff --git a/Help/prop_tgt/LANG_CPPLINT.rst b/Help/prop_tgt/LANG_CPPLINT.rst
index 38a1669..02610da 100644
--- a/Help/prop_tgt/LANG_CPPLINT.rst
+++ b/Help/prop_tgt/LANG_CPPLINT.rst
@@ -18,3 +18,12 @@ created.
This property supports
:manual:`generator expressions <cmake-generator-expressions(7)>`.
+
+.. versionadded:: 3.27
+
+ :prop_sf:`SKIP_LINTING` can be set on individual source files to exclude
+ them from the linting tools defined by ``<LANG>_CPPLINT``,
+ :prop_tgt:`<LANG>_CLANG_TIDY`, :prop_tgt:`<LANG>_CPPCHECK`, and
+ :prop_tgt:`<LANG>_INCLUDE_WHAT_YOU_USE`. When :prop_sf:`SKIP_LINTING` is
+ set to true on a source file, those tools will not be run on that specific
+ file.
diff --git a/Help/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE.rst b/Help/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE.rst
index 19b97f7..2f51c8f 100644
--- a/Help/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE.rst
+++ b/Help/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE.rst
@@ -18,3 +18,12 @@ when a target is created.
This property supports
:manual:`generator expressions <cmake-generator-expressions(7)>`.
+
+.. versionadded:: 3.27
+
+ :prop_sf:`SKIP_LINTING` can be set on individual source files to exclude
+ them from the linting tools defined by :prop_tgt:`<LANG>_CPPLINT`,
+ :prop_tgt:`<LANG>_CLANG_TIDY`, :prop_tgt:`<LANG>_CPPCHECK`, and
+ ``<LANG>_INCLUDE_WHAT_YOU_USE``. When :prop_sf:`SKIP_LINTING` is
+ set to true on a source file, those tools will not be run on that specific
+ file.
diff --git a/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst b/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst
index a4c9b9f..458618b 100644
--- a/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst
+++ b/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst
@@ -4,13 +4,14 @@ NO_SYSTEM_FROM_IMPORTED
Do not treat include directories from the interfaces of consumed
:ref:`imported targets` as system directories.
-The contents of the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` target property
-are treated as system includes when the consumed target's :prop_tgt:`SYSTEM`
-property is set to true. By default, :prop_tgt:`SYSTEM` is true for imported
-targets and false for other target types. If the ``NO_SYSTEM_FROM_IMPORTED``
-property is set to true on a *consuming* target, compilation of sources in that
-consuming target will not treat the contents of the
-:prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of consumed imported targets as
+When the consumed target's :prop_tgt:`SYSTEM` property is set to true, the
+contents of the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` target property are
+treated as system includes or, on Apple platforms, when the target is a
+framework, it will be treated as system. By default, :prop_tgt:`SYSTEM` is
+true for imported targets and false for other target types. If the
+``NO_SYSTEM_FROM_IMPORTED`` property is set to true on a *consuming* target,
+compilation of sources in that consuming target will not treat the contents of
+the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of consumed imported targets as
system includes, even if that imported target's :prop_tgt:`SYSTEM` property
is false.
diff --git a/Help/prop_tgt/SYSTEM.rst b/Help/prop_tgt/SYSTEM.rst
index c7ae27e..f5c11bc 100644
--- a/Help/prop_tgt/SYSTEM.rst
+++ b/Help/prop_tgt/SYSTEM.rst
@@ -10,13 +10,17 @@ effects:
system include directories when compiling consumers.
Entries of :prop_tgt:`INTERFACE_SYSTEM_INCLUDE_DIRECTORIES` are not
affected, and will always be treated as system include directories.
+* On Apple platforms, If the :prop_tgt:`FRAMEWORK` target property is true,
+ the frameworks directory is treated as system.
For imported targets, this property defaults to true, which means
-that their :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` are treated
-as system directories by default. If their ``SYSTEM`` property is false,
-then their :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` will not be
-treated as system. Use the :prop_tgt:`EXPORT_NO_SYSTEM` property to change
-how a target's ``SYSTEM`` property is set when it is installed.
+that their :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` and, if the
+:prop_tgt:`FRAMEWORK` target property is true, frameworks directory are
+treated as system directories by default. If their ``SYSTEM`` property is
+false, then their :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` as well as
+frameworks will not be treated as system. Use the :prop_tgt:`EXPORT_NO_SYSTEM`
+property to change how a target's ``SYSTEM`` property is set when it is
+installed.
For non-imported targets, this target property is initialized from
the :prop_dir:`SYSTEM` directory property when the target is created.
diff --git a/Help/release/3.26.rst b/Help/release/3.26.rst
index 9e9327e..1cf37ca 100644
--- a/Help/release/3.26.rst
+++ b/Help/release/3.26.rst
@@ -175,8 +175,8 @@ Updates
Changes made since CMake 3.26.0 include the following.
-3.26.1, 3.26.2, 3.26.3
-----------------------
+3.26.1, 3.26.2, 3.26.3, 3.26.4
+------------------------------
* These versions made no changes to documented features or interfaces.
Some implementation updates were made to support ecosystem changes
diff --git a/Help/release/dev/FileAPI-Frameworks.rst b/Help/release/dev/FileAPI-Frameworks.rst
new file mode 100644
index 0000000..65cf043
--- /dev/null
+++ b/Help/release/dev/FileAPI-Frameworks.rst
@@ -0,0 +1,7 @@
+FileAPI-Frameworks
+------------------
+
+* The :manual:`cmake-file-api(7)` "codemodel" version 2 ``version`` field has
+ been updated to 2.6.
+* The :manual:`cmake-file-api(7)` "codemodel" version 2 "target" object gained
+ a new "frameworks" field in the "compileGroups" objects.
diff --git a/Help/release/dev/System-Framework.rst b/Help/release/dev/System-Framework.rst
new file mode 100644
index 0000000..106cf23
--- /dev/null
+++ b/Help/release/dev/System-Framework.rst
@@ -0,0 +1,4 @@
+System-Framework
+----------------
+
+* The :prop_tgt:`SYSTEM` target property is now honored for Apple Frameworks.
diff --git a/Help/release/dev/skip-linting.rst b/Help/release/dev/skip-linting.rst
new file mode 100644
index 0000000..199571c
--- /dev/null
+++ b/Help/release/dev/skip-linting.rst
@@ -0,0 +1,5 @@
+skip-linting
+------------
+
+* The :prop_sf:`SKIP_LINTING` source file property was added to suppress
+ target-wide code checks on specific sources.
diff --git a/Help/variable/MINGW.rst b/Help/variable/MINGW.rst
index 27c56ea..fc2af2d 100644
--- a/Help/variable/MINGW.rst
+++ b/Help/variable/MINGW.rst
@@ -3,6 +3,7 @@ MINGW
.. versionadded:: 3.2
-``True`` when using MinGW
+Set to a true value when at least one language is enabled
+with a compiler targeting the GNU ABI on Windows (MinGW).
-Set to ``true`` when the compiler is some version of MinGW.
+Otherwise, this variable is not set by CMake.
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 403766e..6c49096 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -1149,7 +1149,7 @@ function(CMAKE_DETERMINE_MSVC_SHOWINCLUDES_PREFIX lang userflags)
ENCODING AUTO # cl prints in console output code page
)
string(REPLACE "\n" "\n " msg " ${out}")
- if(res EQUAL 0 AND "${out}" MATCHES "(^|\n)([^:\n][^:\n]+:[^:\n]*[^: \n][^: \n]:?[ \t]+)([A-Za-z]:\\\\|\\./)")
+ if(res EQUAL 0 AND "${out}" MATCHES "(^|\n)([^:\n][^:\n]+:[^:\n]*[^: \n][^: \n]:?[ \t]+)([A-Za-z]:\\\\|\\./|/)")
set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_MATCH_2}" PARENT_SCOPE)
string(APPEND msg "\nFound prefix \"${CMAKE_MATCH_2}\"")
else()
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index 10e8ff3..461839a 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -121,9 +121,9 @@ elseif("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID}" MATCHES "^xIAR$")
set(_CMAKE_IAR_ITOOLS "ARM" "RX" "RH850" "RL78" "RISCV" "RISC-V" "STM8")
set(_CMAKE_IAR_XTOOLS "AVR" "MSP430" "V850" "8051")
- if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" IN_LIST _CMAKE_IAR_ITOOLS)
- string(TOLOWER "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" _CMAKE_IAR_LOWER_ARCHITECTURE_ID)
+ string(TOLOWER "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" _CMAKE_IAR_LOWER_ARCHITECTURE_ID)
+ if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" IN_LIST _CMAKE_IAR_ITOOLS)
__append_IAR_tool(AR "iarchive")
__append_IAR_tool(LINKER "ilink${_CMAKE_IAR_LOWER_ARCHITECTURE_ID}")
@@ -132,16 +132,21 @@ elseif("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID}" MATCHES "^xIAR$")
__append_IAR_tool(IAR_OBJMANIP "iobjmanip")
__append_IAR_tool(IAR_SYMEXPORT "isymexport")
- unset(_CMAKE_IAR_LOWER_ARCHITECTURE_ID)
-
elseif("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" IN_LIST _CMAKE_IAR_XTOOLS)
__append_IAR_tool(AR "xar")
- __append_IAR_tool(LINKER "xlink")
+ if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR" AND
+ (CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION VERSION_GREATER_EQUAL 8))
+ # IAR UBROF Linker V8.10+ for Microchip AVR is `xlinkavr`
+ __append_IAR_tool(LINKER "xlink${_CMAKE_IAR_LOWER_ARCHITECTURE_ID}")
+ else()
+ __append_IAR_tool(LINKER "xlink")
+ endif()
else()
message(FATAL_ERROR "Failed to find linker and librarian for ${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID} on ${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}.")
endif()
+ unset(_CMAKE_IAR_LOWER_ARCHITECTURE_ID)
unset(_CMAKE_IAR_ITOOLS)
unset(_CMAKE_IAR_XTOOLS)
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-<COMPATIBILITY>.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/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake
index a21ba43..46f5fc1 100644
--- a/Modules/Compiler/Clang.cmake
+++ b/Modules/Compiler/Clang.cmake
@@ -176,6 +176,8 @@ macro(__compiler_clang_cxx_standards lang)
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 17.0)
set(CMAKE_${lang}23_STANDARD_COMPILE_OPTION "-std=c++23")
set(CMAKE_${lang}23_EXTENSION_COMPILE_OPTION "-std=gnu++23")
+ set(CMAKE_${lang}26_STANDARD_COMPILE_OPTION "-std=c++26")
+ set(CMAKE_${lang}26_EXTENSION_COMPILE_OPTION "-std=gnu++26")
elseif(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 12.0)
set(CMAKE_${lang}23_STANDARD_COMPILE_OPTION "-std=c++2b")
set(CMAKE_${lang}23_EXTENSION_COMPILE_OPTION "-std=gnu++2b")
diff --git a/Modules/Compiler/IAR-ASM.cmake b/Modules/Compiler/IAR-ASM.cmake
index 4c0025c..5f1dac0 100644
--- a/Modules/Compiler/IAR-ASM.cmake
+++ b/Modules/Compiler/IAR-ASM.cmake
@@ -38,22 +38,26 @@ elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
__assembler_iar_deps("-y" 8)
set(_CMAKE_IAR_SILENCER_FLAG " -S")
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s90;asm;msa)
+ set(CMAKE_ASM_OUTPUT_EXTENSION ".r90")
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
__compiler_iar_xlink(ASM)
__assembler_iar_deps("-y" 8)
set(_CMAKE_IAR_SILENCER_FLAG " -S")
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s43;asm;msa)
+ set(CMAKE_ASM_OUTPUT_EXTENSION ".r43")
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850")
__compiler_iar_xlink(ASM)
set(_CMAKE_IAR_SILENCER_FLAG " -S")
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s85;asm;msa)
+ set(CMAKE_ASM_OUTPUT_EXTENSION ".r85")
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051")
__compiler_iar_xlink(ASM)
set(_CMAKE_IAR_SILENCER_FLAG " -S")
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s51;asm;msa)
+ set(CMAKE_ASM_OUTPUT_EXTENSION ".r51")
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "STM8")
__compiler_iar_ilink(ASM)
diff --git a/Modules/Compiler/IAR-C.cmake b/Modules/Compiler/IAR-C.cmake
index 0ef1a2a..c4907c5 100644
--- a/Modules/Compiler/IAR-C.cmake
+++ b/Modules/Compiler/IAR-C.cmake
@@ -59,7 +59,7 @@ elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "RISCV")
elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
__compiler_iar_xlink(C)
- __compiler_check_default_language_standard(C 7.10 99)
+ __compiler_check_default_language_standard(C 7.10 99 8.10 17)
set(CMAKE_C_OUTPUT_EXTENSION ".r90")
elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake
index 3f0ef1f..b598e36 100644
--- a/Modules/Compiler/IAR-CXX.cmake
+++ b/Modules/Compiler/IAR-CXX.cmake
@@ -68,7 +68,8 @@ elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "RISCV")
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
__compiler_iar_xlink(CXX)
- __compiler_check_default_language_standard(CXX 7.10 98)
+ __compiler_check_default_language_standard(CXX 7.10 98 8.10 17)
+ set(CMAKE_CXX_OUTPUT_EXTENSION ".r90")
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
__compiler_iar_xlink(CXX)
@@ -78,12 +79,12 @@ elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850")
__compiler_iar_xlink(CXX)
__compiler_check_default_language_standard(CXX 1.10 98)
- set(CMAKE_C_OUTPUT_EXTENSION ".r85")
+ set(CMAKE_CXX_OUTPUT_EXTENSION ".r85")
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051")
__compiler_iar_xlink(CXX)
__compiler_check_default_language_standard(CXX 6.10 98)
- set(CMAKE_C_OUTPUT_EXTENSION ".r51")
+ set(CMAKE_CXX_OUTPUT_EXTENSION ".r51")
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "STM8")
__compiler_iar_ilink(CXX)
diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake
index 32a7b3f5..8dadb76 100644
--- a/Modules/Compiler/IAR.cmake
+++ b/Modules/Compiler/IAR.cmake
@@ -23,6 +23,7 @@ macro(__compiler_iar_common lang)
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -Oh -r -DNDEBUG")
endif()
+ set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1)
set(CMAKE_${lang}_RESPONSE_FILE_FLAG "-f ")
set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-f ")
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index e2cc497..1fdd754 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -2447,7 +2447,7 @@ function(ExternalProject_Add_Step name step)
PROPERTY _EP_${step}_ALWAYS
)
if(always)
- set(touch)
+ set(maybe_COMMAND_touch "")
# Mark stamp files for all configs as SYMBOLIC since we do not create them.
# Remove any existing stamp in case the option changed in an existing tree.
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
@@ -2469,7 +2469,7 @@ function(ExternalProject_Add_Step name step)
file(REMOVE ${stamp_file})
endif()
else()
- set(touch ${CMAKE_COMMAND} -E touch ${stamp_file})
+ set(maybe_COMMAND_touch "COMMAND \${CMAKE_COMMAND} -E touch \${stamp_file}")
endif()
# Wrap with log script?
@@ -2497,7 +2497,7 @@ function(ExternalProject_Add_Step name step)
BYPRODUCTS \${byproducts}
COMMENT \${comment}
COMMAND ${__cmdQuoted}
- COMMAND \${touch}
+ ${maybe_COMMAND_touch}
DEPENDS \${depends}
WORKING_DIRECTORY \${work_dir}
VERBATIM
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 45dc9ac..426d00d 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -107,13 +107,13 @@ 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.
#]=======================================================================]
macro(_OpenSSL_test_and_find_dependencies ssl_library crypto_library)
unset(_OpenSSL_extra_static_deps)
- if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND
+ if(UNIX AND
(("${ssl_library}" MATCHES "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$") OR
("${crypto_library}" MATCHES "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$")))
set(_OpenSSL_has_dependencies TRUE)
@@ -140,7 +140,7 @@ macro(_OpenSSL_test_and_find_dependencies ssl_library crypto_library)
endif()
endforeach()
unset(_OPENSSL_DEP_LIB)
- else()
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(_OpenSSL_has_dependency_dl TRUE)
endif()
if(_OpenSSL_ldflags_other)
@@ -152,7 +152,7 @@ macro(_OpenSSL_test_and_find_dependencies ssl_library crypto_library)
endif()
endforeach()
unset(_OPENSSL_DEP_LDFLAG)
- else()
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(_OpenSSL_has_dependency_threads TRUE)
find_package(Threads)
endif()
@@ -230,13 +230,15 @@ else()
set(_OPENSSL_FIND_PATH_SUFFIX "include")
endif()
-if (MSVC)
+if ((DEFINED OPENSSL_ROOT_DIR) OR (DEFINED ENV{OPENSSL_ROOT_DIR}))
+ set(_OPENSSL_ROOT_HINTS HINTS ${OPENSSL_ROOT_DIR} ENV OPENSSL_ROOT_DIR)
+ set(_OPENSSL_ROOT_PATHS NO_DEFAULT_PATH)
+elseif (MSVC)
# http://www.slproweb.com/products/Win32OpenSSL.html
set(_OPENSSL_ROOT_HINTS
- ${OPENSSL_ROOT_DIR}
+ HINTS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]"
- ENV OPENSSL_ROOT_DIR
)
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
@@ -255,6 +257,7 @@ if (MSVC)
endif()
set(_OPENSSL_ROOT_PATHS
+ PATHS
"${_programfiles}/OpenSSL"
"${_programfiles}/OpenSSL-${_arch}"
"C:/OpenSSL/"
@@ -262,16 +265,11 @@ if (MSVC)
)
unset(_programfiles)
unset(_arch)
-else ()
- set(_OPENSSL_ROOT_HINTS
- ${OPENSSL_ROOT_DIR}
- ENV OPENSSL_ROOT_DIR
- )
endif ()
set(_OPENSSL_ROOT_HINTS_AND_PATHS
- HINTS ${_OPENSSL_ROOT_HINTS}
- PATHS ${_OPENSSL_ROOT_PATHS}
+ ${_OPENSSL_ROOT_HINTS}
+ ${_OPENSSL_ROOT_PATHS}
)
find_path(OPENSSL_INCLUDE_DIR
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index 60d2296..7f35e07 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -2110,7 +2110,7 @@ if ("Interpreter" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS)
# Use interpreter version and ABI for future searches to ensure consistency
set (_${_PYTHON_PREFIX}_FIND_VERSIONS ${${_PYTHON_PREFIX}_VERSION_MAJOR}.${${_PYTHON_PREFIX}_VERSION_MINOR})
- execute_process (COMMAND ${_${_PYTHON_PREFIX}_INTERPRETR_LAUNCHER} "${_${_PYTHON_PREFIX}_EXECUTABLE}" -c
+ execute_process (COMMAND ${_${_PYTHON_PREFIX}_INTERPRETER_LAUNCHER} "${_${_PYTHON_PREFIX}_EXECUTABLE}" -c
"import sys; sys.stdout.write(sys.abiflags)"
RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT
OUTPUT_VARIABLE _${_PYTHON_PREFIX}_ABIFLAGS
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/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 2470939..5c563c9 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 26)
-set(CMake_VERSION_PATCH 20230510)
+set(CMake_VERSION_PATCH 20230523)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
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/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;
diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx b/Source/cmCMakeHostSystemInformationCommand.cxx
index 8bfd7c8..1c00f15 100644
--- a/Source/cmCMakeHostSystemInformationCommand.cxx
+++ b/Source/cmCMakeHostSystemInformationCommand.cxx
@@ -8,7 +8,6 @@
#include <initializer_list>
#include <map>
#include <string>
-#include <type_traits>
#include <utility>
#include <cm/optional>
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/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 1cb62b3..e635dd9 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -26,6 +26,7 @@
#include "cmState.h"
#include "cmStateTypes.h"
#include "cmStringAlgorithms.h"
+#include "cmSystemTools.h"
#include "cmValue.h"
cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt)
@@ -235,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 +
@@ -291,6 +292,170 @@ void cmCommonTargetGenerator::AppendOSXVerFlag(std::string& flags,
}
}
+std::string cmCommonTargetGenerator::GetCompilerLauncher(
+ std::string const& lang, std::string const& config)
+{
+ std::string compilerLauncher;
+ if (lang == "C" || lang == "CXX" || lang == "Fortran" || lang == "CUDA" ||
+ lang == "HIP" || lang == "ISPC" || lang == "OBJC" || lang == "OBJCXX") {
+ std::string const clauncher_prop = cmStrCat(lang, "_COMPILER_LAUNCHER");
+ cmValue clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
+ std::string const evaluatedClauncher = cmGeneratorExpression::Evaluate(
+ *clauncher, this->GeneratorTarget->GetLocalGenerator(), config,
+ this->GeneratorTarget, nullptr, this->GeneratorTarget, lang);
+ if (!evaluatedClauncher.empty()) {
+ compilerLauncher = evaluatedClauncher;
+ }
+ }
+ return compilerLauncher;
+}
+
+std::string cmCommonTargetGenerator::GenerateCodeCheckRules(
+ cmSourceFile const& source, std::string& compilerLauncher,
+ std::string const& cmakeCmd, std::string const& config,
+ std::function<std::string(std::string const&)> const& pathConverter)
+{
+ auto const lang = source.GetLanguage();
+ std::string tidy;
+ std::string iwyu;
+ std::string cpplint;
+ std::string cppcheck;
+
+ auto evaluateProp = [&](std::string const& prop) -> std::string {
+ auto const value = this->GeneratorTarget->GetProperty(prop);
+ if (!value) {
+ return std::string{};
+ }
+ auto evaluatedProp = cmGeneratorExpression::Evaluate(
+ *value, this->GeneratorTarget->GetLocalGenerator(), config,
+ this->GeneratorTarget, nullptr, this->GeneratorTarget, lang);
+ if (!evaluatedProp.empty()) {
+ return evaluatedProp;
+ }
+ return *value;
+ };
+ std::string const tidy_prop = cmStrCat(lang, "_CLANG_TIDY");
+ tidy = evaluateProp(tidy_prop);
+
+ if (lang == "C" || lang == "CXX") {
+ std::string const iwyu_prop = cmStrCat(lang, "_INCLUDE_WHAT_YOU_USE");
+ iwyu = evaluateProp(iwyu_prop);
+
+ std::string const cpplint_prop = cmStrCat(lang, "_CPPLINT");
+ cpplint = evaluateProp(cpplint_prop);
+
+ std::string const cppcheck_prop = cmStrCat(lang, "_CPPCHECK");
+ cppcheck = evaluateProp(cppcheck_prop);
+ }
+ if (cmNonempty(iwyu) || cmNonempty(tidy) || cmNonempty(cpplint) ||
+ cmNonempty(cppcheck)) {
+ std::string code_check = cmakeCmd + " -E __run_co_compile";
+ if (!compilerLauncher.empty()) {
+ // In __run_co_compile case the launcher command is supplied
+ // via --launcher=<maybe-list> and consumed
+ code_check += " --launcher=";
+ code_check += this->GeneratorTarget->GetLocalGenerator()->EscapeForShell(
+ compilerLauncher);
+ compilerLauncher.clear();
+ }
+ if (cmNonempty(iwyu)) {
+ code_check += " --iwyu=";
+
+ // Only add --driver-mode if it is not already specified, as adding
+ // it unconditionally might override a user-specified driver-mode
+ if (iwyu.find("--driver-mode=") == std::string::npos) {
+ cmValue const p = this->Makefile->GetDefinition(
+ cmStrCat("CMAKE_", lang, "_INCLUDE_WHAT_YOU_USE_DRIVER_MODE"));
+ std::string driverMode;
+
+ if (cmNonempty(p)) {
+ driverMode = *p;
+ } else {
+ driverMode = lang == "C" ? "gcc" : "g++";
+ }
+
+ code_check +=
+ this->GeneratorTarget->GetLocalGenerator()->EscapeForShell(
+ cmStrCat(iwyu, ";--driver-mode=", driverMode));
+ } else {
+ code_check +=
+ this->GeneratorTarget->GetLocalGenerator()->EscapeForShell(iwyu);
+ }
+ }
+ if (cmNonempty(tidy)) {
+ code_check += " --tidy=";
+ cmValue const p = this->Makefile->GetDefinition(
+ "CMAKE_" + lang + "_CLANG_TIDY_DRIVER_MODE");
+ std::string driverMode;
+ if (cmNonempty(p)) {
+ driverMode = *p;
+ } else {
+ driverMode = lang == "C" ? "gcc" : "g++";
+ }
+
+ auto const generatorName = this->GeneratorTarget->GetLocalGenerator()
+ ->GetGlobalGenerator()
+ ->GetName();
+ auto const clangTidyExportFixedDir =
+ this->GeneratorTarget->GetClangTidyExportFixesDirectory(lang);
+ auto fixesFile = this->GetClangTidyReplacementsFilePath(
+ clangTidyExportFixedDir, source, config);
+ std::string exportFixes;
+ if (!clangTidyExportFixedDir.empty()) {
+ this->GlobalCommonGenerator->AddClangTidyExportFixesDir(
+ clangTidyExportFixedDir);
+ }
+ if (generatorName.find("Make") != std::string::npos) {
+ if (!clangTidyExportFixedDir.empty()) {
+ this->GlobalCommonGenerator->AddClangTidyExportFixesFile(fixesFile);
+ cmSystemTools::MakeDirectory(
+ cmSystemTools::GetFilenamePath(fixesFile));
+ fixesFile = this->GeneratorTarget->GetLocalGenerator()
+ ->MaybeRelativeToCurBinDir(fixesFile);
+ exportFixes = cmStrCat(";--export-fixes=", fixesFile);
+ }
+ code_check +=
+ this->GeneratorTarget->GetLocalGenerator()->EscapeForShell(
+ cmStrCat(tidy, ";--extra-arg-before=--driver-mode=", driverMode,
+ exportFixes));
+ } else if (generatorName.find("Ninja") != std::string::npos) {
+ if (!clangTidyExportFixedDir.empty()) {
+ this->GlobalCommonGenerator->AddClangTidyExportFixesFile(fixesFile);
+ cmSystemTools::MakeDirectory(
+ cmSystemTools::GetFilenamePath(fixesFile));
+ if (!pathConverter) {
+ fixesFile = pathConverter(fixesFile);
+ }
+ exportFixes = cmStrCat(";--export-fixes=", fixesFile);
+ }
+ code_check +=
+ this->GeneratorTarget->GetLocalGenerator()->EscapeForShell(
+ cmStrCat(tidy, ";--extra-arg-before=--driver-mode=", driverMode,
+ exportFixes));
+ }
+ }
+ if (cmNonempty(cpplint)) {
+ code_check += " --cpplint=";
+ code_check +=
+ this->GeneratorTarget->GetLocalGenerator()->EscapeForShell(cpplint);
+ }
+ if (cmNonempty(cppcheck)) {
+ code_check += " --cppcheck=";
+ code_check +=
+ this->GeneratorTarget->GetLocalGenerator()->EscapeForShell(cppcheck);
+ }
+ if (cmNonempty(tidy) || (cmNonempty(cpplint)) || (cmNonempty(cppcheck))) {
+ code_check += " --source=";
+ code_check +=
+ this->GeneratorTarget->GetLocalGenerator()->ConvertToOutputFormat(
+ source.GetFullPath(), cmOutputConverter::SHELL);
+ }
+ code_check += " -- ";
+ return code_check;
+ }
+ return "";
+}
+
std::string cmCommonTargetGenerator::GetLinkerLauncher(
const std::string& config)
{
diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h
index 2d23037..c9886d0 100644
--- a/Source/cmCommonTargetGenerator.h
+++ b/Source/cmCommonTargetGenerator.h
@@ -4,6 +4,7 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <functional>
#include <map>
#include <set>
#include <string>
@@ -53,6 +54,9 @@ protected:
virtual void AddIncludeFlags(std::string& flags, std::string const& lang,
const std::string& config) = 0;
+ virtual std::string GetClangTidyReplacementsFilePath(
+ std::string const& directory, cmSourceFile const& source,
+ std::string const& config) const = 0;
void AppendOSXVerFlag(std::string& flags, const std::string& lang,
const char* name, bool so);
@@ -63,7 +67,13 @@ protected:
std::string GetIncludes(std::string const& l, const std::string& config);
std::string GetManifests(const std::string& config);
std::string GetAIXExports(std::string const& config);
+ std::string GenerateCodeCheckRules(
+ cmSourceFile const& source, std::string& compilerLauncher,
+ std::string const& cmakeCmd, std::string const& config,
+ std::function<std::string(std::string const&)> const& pathConverter);
+ std::string GetCompilerLauncher(std::string const& lang,
+ std::string const& config);
std::vector<std::string> GetLinkedTargetDirectories(
const std::string& lang, const std::string& config) const;
std::string ComputeTargetCompilePDB(const std::string& config) const;
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/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;
}
}
diff --git a/Source/cmCxxModuleMapper.cxx b/Source/cmCxxModuleMapper.cxx
index 59bf4c7..e836a2a 100644
--- a/Source/cmCxxModuleMapper.cxx
+++ b/Source/cmCxxModuleMapper.cxx
@@ -17,13 +17,59 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
-cm::optional<std::string> CxxModuleLocations::BmiGeneratorPathForModule(
+CxxBmiLocation::CxxBmiLocation() = default;
+
+CxxBmiLocation::CxxBmiLocation(std::string path)
+ : BmiLocation(std::move(path))
+{
+}
+
+CxxBmiLocation CxxBmiLocation::Unknown()
+{
+ return {};
+}
+
+CxxBmiLocation CxxBmiLocation::Private()
+{
+ return { std::string{} };
+}
+
+CxxBmiLocation CxxBmiLocation::Known(std::string path)
+{
+ return { std::move(path) };
+}
+
+bool CxxBmiLocation::IsKnown() const
+{
+ return this->BmiLocation.has_value();
+}
+
+bool CxxBmiLocation::IsPrivate() const
+{
+ if (auto const& loc = this->BmiLocation) {
+ return loc->empty();
+ }
+ return false;
+}
+
+std::string const& CxxBmiLocation::Location() const
+{
+ if (auto const& loc = this->BmiLocation) {
+ return *loc;
+ }
+ static std::string empty;
+ return empty;
+}
+
+CxxBmiLocation CxxModuleLocations::BmiGeneratorPathForModule(
std::string const& logical_name) const
{
- if (auto l = this->BmiLocationForModule(logical_name)) {
- return this->PathForGenerator(std::move(*l));
+ auto bmi_loc = this->BmiLocationForModule(logical_name);
+ if (bmi_loc.IsKnown() && !bmi_loc.IsPrivate()) {
+ bmi_loc =
+ CxxBmiLocation::Known(this->PathForGenerator(bmi_loc.Location()));
}
- return {};
+ return bmi_loc;
}
namespace {
@@ -42,18 +88,21 @@ std::string CxxModuleMapContentClang(CxxModuleLocations const& loc,
// A series of flags which tell the compiler where to look for modules.
for (auto const& p : obj.Provides) {
- if (auto bmi_loc = loc.BmiGeneratorPathForModule(p.LogicalName)) {
+ auto bmi_loc = loc.BmiGeneratorPathForModule(p.LogicalName);
+ if (bmi_loc.IsKnown()) {
// Force the TU to be considered a C++ module source file regardless of
// extension.
mm << "-x c++-module\n";
- mm << "-fmodule-output=" << *bmi_loc << '\n';
+ mm << "-fmodule-output=" << bmi_loc.Location() << '\n';
break;
}
}
for (auto const& r : obj.Requires) {
- if (auto bmi_loc = loc.BmiGeneratorPathForModule(r.LogicalName)) {
- mm << "-fmodule-file=" << r.LogicalName << "=" << *bmi_loc << '\n';
+ auto bmi_loc = loc.BmiGeneratorPathForModule(r.LogicalName);
+ if (bmi_loc.IsKnown()) {
+ mm << "-fmodule-file=" << r.LogicalName << "=" << bmi_loc.Location()
+ << '\n';
}
}
@@ -76,13 +125,15 @@ std::string CxxModuleMapContentGcc(CxxModuleLocations const& loc,
mm << "$root " << loc.RootDirectory << "\n";
for (auto const& p : obj.Provides) {
- if (auto bmi_loc = loc.BmiGeneratorPathForModule(p.LogicalName)) {
- mm << p.LogicalName << ' ' << *bmi_loc << '\n';
+ auto bmi_loc = loc.BmiGeneratorPathForModule(p.LogicalName);
+ if (bmi_loc.IsKnown()) {
+ mm << p.LogicalName << ' ' << bmi_loc.Location() << '\n';
}
}
for (auto const& r : obj.Requires) {
- if (auto bmi_loc = loc.BmiGeneratorPathForModule(r.LogicalName)) {
- mm << r.LogicalName << ' ' << *bmi_loc << '\n';
+ auto bmi_loc = loc.BmiGeneratorPathForModule(r.LogicalName);
+ if (bmi_loc.IsKnown()) {
+ mm << r.LogicalName << ' ' << bmi_loc.Location() << '\n';
}
}
@@ -123,8 +174,9 @@ std::string CxxModuleMapContentMsvc(CxxModuleLocations const& loc,
mm << "-internalPartition\n";
}
- if (auto bmi_loc = loc.BmiGeneratorPathForModule(p.LogicalName)) {
- mm << "-ifcOutput " << *bmi_loc << '\n';
+ auto bmi_loc = loc.BmiGeneratorPathForModule(p.LogicalName);
+ if (bmi_loc.IsKnown()) {
+ mm << "-ifcOutput " << bmi_loc.Location() << '\n';
}
}
@@ -132,10 +184,11 @@ std::string CxxModuleMapContentMsvc(CxxModuleLocations const& loc,
std::set<std::string> transitive_usage_names;
for (auto const& r : obj.Requires) {
- if (auto bmi_loc = loc.BmiGeneratorPathForModule(r.LogicalName)) {
+ auto bmi_loc = loc.BmiGeneratorPathForModule(r.LogicalName);
+ if (bmi_loc.IsKnown()) {
auto flag = flag_for_method(r.Method);
- mm << flag << ' ' << r.LogicalName << '=' << *bmi_loc << "\n";
+ mm << flag << ' ' << r.LogicalName << '=' << bmi_loc.Location() << "\n";
transitive_usage_directs.insert(r.LogicalName);
// Insert transitive usages.
@@ -237,18 +290,28 @@ std::set<std::string> CxxModuleUsageSeed(
for (cmScanDepInfo const& object : objects) {
// Add references for each of the provided modules.
for (auto const& p : object.Provides) {
- if (auto bmi_loc = loc.BmiGeneratorPathForModule(p.LogicalName)) {
+ auto bmi_loc = loc.BmiGeneratorPathForModule(p.LogicalName);
+ if (bmi_loc.IsKnown()) {
// XXX(cxx-modules): How to support header units?
- usages.AddReference(p.LogicalName, *bmi_loc, LookupMethod::ByName);
+ usages.AddReference(p.LogicalName, bmi_loc.Location(),
+ LookupMethod::ByName);
}
}
// For each requires, pull in what is required.
for (auto const& r : object.Requires) {
- // Find transitive usages.
- auto transitive_usages = usages.Usage.find(r.LogicalName);
// Find the required name in the current target.
auto bmi_loc = loc.BmiGeneratorPathForModule(r.LogicalName);
+ if (bmi_loc.IsPrivate()) {
+ cmSystemTools::Error(
+ cmStrCat("Unable to use module '", r.LogicalName,
+ "' as it is 'PRIVATE' and therefore not accessible outside "
+ "of its owning target."));
+ continue;
+ }
+
+ // Find transitive usages.
+ auto transitive_usages = usages.Usage.find(r.LogicalName);
for (auto const& p : object.Provides) {
auto& this_usages = usages.Usage[p.LogicalName];
@@ -260,14 +323,14 @@ std::set<std::string> CxxModuleUsageSeed(
if (transitive_usages != usages.Usage.end()) {
this_usages.insert(transitive_usages->second.begin(),
transitive_usages->second.end());
- } else if (bmi_loc) {
+ } else if (bmi_loc.IsKnown()) {
// Mark that we need to update transitive usages later.
internal_usages[p.LogicalName].insert(r.LogicalName);
}
}
- if (bmi_loc) {
- usages.AddReference(r.LogicalName, *bmi_loc, r.Method);
+ if (bmi_loc.IsKnown()) {
+ usages.AddReference(r.LogicalName, bmi_loc.Location(), r.Method);
}
}
}
diff --git a/Source/cmCxxModuleMapper.h b/Source/cmCxxModuleMapper.h
index 0f453b0..ef01e48 100644
--- a/Source/cmCxxModuleMapper.h
+++ b/Source/cmCxxModuleMapper.h
@@ -22,6 +22,23 @@ enum class CxxModuleMapFormat
Msvc,
};
+struct CxxBmiLocation
+{
+ static CxxBmiLocation Unknown();
+ static CxxBmiLocation Private();
+ static CxxBmiLocation Known(std::string path);
+
+ bool IsKnown() const;
+ bool IsPrivate() const;
+ std::string const& Location() const;
+
+private:
+ CxxBmiLocation();
+ CxxBmiLocation(std::string path);
+
+ cm::optional<std::string> BmiLocation;
+};
+
struct CxxModuleLocations
{
// The path from which all relative paths should be computed. If
@@ -33,12 +50,11 @@ struct CxxModuleLocations
std::function<std::string(std::string)> PathForGenerator;
// Lookup the BMI location of a logical module name.
- std::function<cm::optional<std::string>(std::string const&)>
- BmiLocationForModule;
+ std::function<CxxBmiLocation(std::string const&)> BmiLocationForModule;
// Returns the generator path (if known) for the BMI given a
// logical module name.
- cm::optional<std::string> BmiGeneratorPathForModule(
+ CxxBmiLocation BmiGeneratorPathForModule(
std::string const& logical_name) const;
};
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/cmDyndepCollation.cxx b/Source/cmDyndepCollation.cxx
index 53a262b..f45d81b 100644
--- a/Source/cmDyndepCollation.cxx
+++ b/Source/cmDyndepCollation.cxx
@@ -623,3 +623,20 @@ bool cmDyndepCollation::WriteDyndepMetadata(
return result;
}
+
+bool cmDyndepCollation::IsObjectPrivate(
+ std::string const& object, cmCxxModuleExportInfo const& export_info)
+{
+#ifdef _WIN32
+ std::string output_path = object;
+ cmSystemTools::ConvertToUnixSlashes(output_path);
+#else
+ std::string const& output_path = object;
+#endif
+ auto fileset_info_itr = export_info.ObjectToFileSet.find(output_path);
+ if (fileset_info_itr == export_info.ObjectToFileSet.end()) {
+ return false;
+ }
+ auto const& file_set = fileset_info_itr->second;
+ return !cmFileSetVisibilityIsForInterface(file_set.Visibility);
+}
diff --git a/Source/cmDyndepCollation.h b/Source/cmDyndepCollation.h
index e70ac09..48afe2b 100644
--- a/Source/cmDyndepCollation.h
+++ b/Source/cmDyndepCollation.h
@@ -49,4 +49,6 @@ struct cmDyndepCollation
std::vector<cmScanDepInfo> const& objects,
cmCxxModuleExportInfo const& export_info,
cmDyndepMetadataCallbacks const& cb);
+ static bool IsObjectPrivate(std::string const& object,
+ cmCxxModuleExportInfo const& export_info);
};
diff --git a/Source/cmExternalMakefileProjectGenerator.cxx b/Source/cmExternalMakefileProjectGenerator.cxx
index 5895d66..5fecb35 100644
--- a/Source/cmExternalMakefileProjectGenerator.cxx
+++ b/Source/cmExternalMakefileProjectGenerator.cxx
@@ -17,14 +17,13 @@ void cmExternalMakefileProjectGenerator::EnableLanguage(
std::string cmExternalMakefileProjectGenerator::CreateFullGeneratorName(
const std::string& globalGenerator, const std::string& extraGenerator)
{
- std::string fullName;
- if (!globalGenerator.empty()) {
- if (!extraGenerator.empty()) {
- fullName = cmStrCat(extraGenerator, " - ");
- }
- fullName += globalGenerator;
+ if (globalGenerator.empty()) {
+ return {};
}
- return fullName;
+ if (extraGenerator.empty()) {
+ return globalGenerator;
+ }
+ return cmStrCat(extraGenerator, " - ", globalGenerator);
}
bool cmExternalMakefileProjectGenerator::Open(
diff --git a/Source/cmFileAPI.cxx b/Source/cmFileAPI.cxx
index d1d3d25..8b98916 100644
--- a/Source/cmFileAPI.cxx
+++ b/Source/cmFileAPI.cxx
@@ -728,7 +728,7 @@ std::string cmFileAPI::NoSupportedVersion(
// The "codemodel" object kind.
// Update Help/manual/cmake-file-api.7.rst when updating this constant.
-static unsigned int const CodeModelV2Minor = 5;
+static unsigned int const CodeModelV2Minor = 6;
void cmFileAPI::BuildClientRequestCodeModel(
ClientRequest& r, std::vector<RequestVersion> const& versions)
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx
index 4a8716f..280ebb0 100644
--- a/Source/cmFileAPICodemodel.cxx
+++ b/Source/cmFileAPICodemodel.cxx
@@ -328,6 +328,7 @@ struct CompileData
std::vector<JBT<std::string>> Defines;
std::vector<JBT<std::string>> PrecompileHeaders;
std::vector<IncludeEntry> Includes;
+ std::vector<IncludeEntry> Frameworks;
friend bool operator==(CompileData const& l, CompileData const& r)
{
@@ -335,7 +336,7 @@ struct CompileData
l.Flags == r.Flags && l.Defines == r.Defines &&
l.PrecompileHeaders == r.PrecompileHeaders &&
l.LanguageStandard == r.LanguageStandard &&
- l.Includes == r.Includes);
+ l.Includes == r.Includes && l.Frameworks == r.Frameworks);
}
};
}
@@ -356,6 +357,12 @@ struct hash<CompileData>
hash<Json::ArrayIndex>()(i.Path.Backtrace.Index) ^
(i.IsSystem ? std::numeric_limits<size_t>::max() : 0));
}
+ for (auto const& i : in.Frameworks) {
+ result = result ^
+ (hash<std::string>()(i.Path.Value) ^
+ hash<Json::ArrayIndex>()(i.Path.Backtrace.Index) ^
+ (i.IsSystem ? std::numeric_limits<size_t>::max() : 0));
+ }
for (auto const& i : in.Flags) {
result = result ^ hash<std::string>()(i.Value) ^
hash<Json::ArrayIndex>()(i.Backtrace.Index);
@@ -468,6 +475,7 @@ class Target
Json::Value DumpPaths();
Json::Value DumpCompileData(CompileData const& cd);
Json::Value DumpInclude(CompileData::IncludeEntry const& inc);
+ Json::Value DumpFramework(CompileData::IncludeEntry const& fw);
Json::Value DumpPrecompileHeader(JBT<std::string> const& header);
Json::Value DumpLanguageStandard(JBTs<std::string> const& standard);
Json::Value DumpDefine(JBT<std::string> const& def);
@@ -1294,9 +1302,15 @@ void Target::ProcessLanguage(std::string const& lang)
std::vector<BT<std::string>> includePathList =
lg->GetIncludeDirectories(this->GT, lang, this->Config);
for (BT<std::string> const& i : includePathList) {
- cd.Includes.emplace_back(
- this->ToJBT(i),
- this->GT->IsSystemIncludeDirectory(i.Value, this->Config, lang));
+ if (this->GT->IsApple() && cmSystemTools::IsPathToFramework(i.Value)) {
+ cd.Frameworks.emplace_back(
+ this->ToJBT(i),
+ this->GT->IsSystemIncludeDirectory(i.Value, this->Config, lang));
+ } else {
+ cd.Includes.emplace_back(
+ this->ToJBT(i),
+ this->GT->IsSystemIncludeDirectory(i.Value, this->Config, lang));
+ }
}
std::vector<BT<std::string>> precompileHeaders =
this->GT->GetPrecompileHeaders(this->Config, lang);
@@ -1408,7 +1422,11 @@ CompileData Target::BuildCompileData(cmSourceFile* sf)
bool const isSystemInclude =
this->GT->IsSystemIncludeDirectory(i, this->Config, fd.Language);
BT<std::string> include(i, tmpInclude.Backtrace);
- fd.Includes.emplace_back(this->ToJBT(include), isSystemInclude);
+ if (this->GT->IsApple() && cmSystemTools::IsPathToFramework(i)) {
+ fd.Frameworks.emplace_back(this->ToJBT(include), isSystemInclude);
+ } else {
+ fd.Includes.emplace_back(this->ToJBT(include), isSystemInclude);
+ }
}
}
}
@@ -1481,6 +1499,13 @@ CompileData Target::MergeCompileData(CompileData const& fd)
cd.Includes.insert(cd.Includes.end(), td.Includes.begin(),
td.Includes.end());
+ // Use source-specific frameworks followed by target-wide frameworks.
+ cd.Frameworks.reserve(fd.Frameworks.size() + td.Frameworks.size());
+ cd.Frameworks.insert(cd.Frameworks.end(), fd.Frameworks.begin(),
+ fd.Frameworks.end());
+ cd.Frameworks.insert(cd.Frameworks.end(), td.Frameworks.begin(),
+ td.Frameworks.end());
+
// Use target-wide defines followed by source-specific defines.
cd.Defines.reserve(td.Defines.size() + fd.Defines.size());
cd.Defines.insert(cd.Defines.end(), td.Defines.begin(), td.Defines.end());
@@ -1696,6 +1721,13 @@ Json::Value Target::DumpCompileData(CompileData const& cd)
}
result["includes"] = includes;
}
+ if (!cd.Frameworks.empty()) {
+ Json::Value frameworks = Json::arrayValue;
+ for (auto const& i : cd.Frameworks) {
+ frameworks.append(this->DumpFramework(i));
+ }
+ result["frameworks"] = frameworks;
+ }
if (!cd.Defines.empty()) {
Json::Value defines = Json::arrayValue;
for (JBT<std::string> const& d : cd.Defines) {
@@ -1729,6 +1761,12 @@ Json::Value Target::DumpInclude(CompileData::IncludeEntry const& inc)
return include;
}
+Json::Value Target::DumpFramework(CompileData::IncludeEntry const& fw)
+{
+ // for now, idem as include
+ return this->DumpInclude(fw);
+}
+
Json::Value Target::DumpPrecompileHeader(JBT<std::string> const& header)
{
Json::Value precompileHeader = Json::objectValue;
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 28ba60f..f8455c8 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -59,8 +59,6 @@
namespace {
using LinkInterfaceFor = cmGeneratorTarget::LinkInterfaceFor;
-const cmsys::RegularExpression FrameworkRegularExpression(
- "^(.*/)?([^/]*)\\.framework/(.*)$");
const std::string kINTERFACE_LINK_LIBRARIES = "INTERFACE_LINK_LIBRARIES";
const std::string kINTERFACE_LINK_LIBRARIES_DIRECT =
"INTERFACE_LINK_LIBRARIES_DIRECT";
@@ -794,6 +792,15 @@ void handleSystemIncludesDep(cmLocalGenerator* lg,
result.append(cmGeneratorExpression::Evaluate(
*dirs, lg, config, headTarget, dagChecker, depTgt, language));
}
+
+ if (depTgt->Target->IsFrameworkOnApple()) {
+ if (auto fwDescriptor = depTgt->GetGlobalGenerator()->SplitFrameworkPath(
+ depTgt->GetLocation(config),
+ cmGlobalGenerator::FrameworkFormat::Strict)) {
+ result.push_back(fwDescriptor->Directory);
+ result.push_back(fwDescriptor->GetFrameworkPath());
+ }
+ }
}
}
@@ -2425,11 +2432,10 @@ std::string cmGeneratorTarget::GetSOName(
}
// Use the soname given if any.
if (this->IsFrameworkOnApple()) {
- cmsys::RegularExpressionMatch match;
- if (FrameworkRegularExpression.find(info->SOName.c_str(), match)) {
- auto frameworkName = match.match(2);
- auto fileName = match.match(3);
- return cmStrCat(frameworkName, ".framework/", fileName);
+ auto fwDescriptor = this->GetGlobalGenerator()->SplitFrameworkPath(
+ info->SOName, cmGlobalGenerator::FrameworkFormat::Strict);
+ if (fwDescriptor) {
+ return fwDescriptor->GetVersionedName();
}
}
if (cmHasLiteralPrefix(info->SOName, "@rpath/")) {
@@ -3819,32 +3825,38 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetIncludeDirectories(
AddInterfaceEntries(this, config, "INTERFACE_INCLUDE_DIRECTORIES", lang,
&dagChecker, entries, IncludeRuntimeInterface::Yes);
+ processIncludeDirectories(this, entries, includes, uniqueIncludes,
+ debugIncludes);
+
if (this->IsApple()) {
if (cmLinkImplementationLibraries const* impl =
this->GetLinkImplementationLibraries(config,
LinkInterfaceFor::Usage)) {
for (cmLinkImplItem const& lib : impl->Libraries) {
- std::string libDir = cmSystemTools::CollapseFullPath(
- lib.AsStr(), this->Makefile->GetHomeOutputDirectory());
-
- static cmsys::RegularExpression frameworkCheck(
- "(.*\\.framework)(/Versions/[^/]+)?/[^/]+$");
- if (!frameworkCheck.find(libDir)) {
+ std::string libDir;
+ if (lib.Target == nullptr) {
+ libDir = cmSystemTools::CollapseFullPath(
+ lib.AsStr(), this->Makefile->GetHomeOutputDirectory());
+ } else if (lib.Target->Target->IsFrameworkOnApple()) {
+ libDir = lib.Target->GetLocation(config);
+ } else {
continue;
}
- libDir = frameworkCheck.match(1);
+ auto fwDescriptor =
+ this->GetGlobalGenerator()->SplitFrameworkPath(libDir);
+ if (!fwDescriptor) {
+ continue;
+ }
- EvaluatedTargetPropertyEntry ee(lib, cmListFileBacktrace());
- ee.Values.emplace_back(std::move(libDir));
- entries.Entries.emplace_back(std::move(ee));
+ auto fwInclude = fwDescriptor->GetFrameworkPath();
+ if (uniqueIncludes.insert(fwInclude).second) {
+ includes.emplace_back(fwInclude, cmListFileBacktrace());
+ }
}
}
}
- processIncludeDirectories(this, entries, includes, uniqueIncludes,
- debugIncludes);
-
this->IncludeDirectoriesCache.emplace(cacheKey, includes);
return includes;
}
@@ -7021,13 +7033,10 @@ std::string cmGeneratorTarget::GetDirectory(
if (this->IsImported()) {
auto fullPath = this->Target->ImportedGetFullPath(config, artifact);
if (this->IsFrameworkOnApple()) {
- cmsys::RegularExpressionMatch match;
- if (FrameworkRegularExpression.find(fullPath.c_str(), match)) {
- auto path = match.match(1);
- if (!path.empty()) {
- path.erase(path.length() - 1);
- }
- return path;
+ auto fwDescriptor = this->GetGlobalGenerator()->SplitFrameworkPath(
+ fullPath, cmGlobalGenerator::FrameworkFormat::Strict);
+ if (fwDescriptor) {
+ return fwDescriptor->Directory;
}
}
// Return the directory from which the target is imported.
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<std::string> 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/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<std::string, DirectoryTarget> 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<std::string>& 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);
}
}
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 040f500..5d0f8b2 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2598,14 +2598,14 @@ cmGlobalGenerator::SplitFrameworkPath(const std::string& path,
// or (/path/to/)?FwName.framework/FwName(.tbd)?
// or (/path/to/)?FwName.framework/Versions/*/FwName(.tbd)?
static cmsys::RegularExpression frameworkPath(
- "((.+)/)?(.+)\\.framework(/Versions/[^/]+)?(/(.+))?$");
+ "((.+)/)?([^/]+)\\.framework(/Versions/([^/]+))?(/(.+))?$");
auto ext = cmSystemTools::GetFilenameLastExtension(path);
if ((ext.empty() || ext == ".tbd" || ext == ".framework") &&
frameworkPath.find(path)) {
auto name = frameworkPath.match(3);
auto libname =
- cmSystemTools::GetFilenameWithoutExtension(frameworkPath.match(6));
+ cmSystemTools::GetFilenameWithoutExtension(frameworkPath.match(7));
if (format == FrameworkFormat::Strict && libname.empty()) {
return cm::nullopt;
}
@@ -2614,11 +2614,12 @@ cmGlobalGenerator::SplitFrameworkPath(const std::string& path,
}
if (libname.empty() || name.size() == libname.size()) {
- return FrameworkDescriptor{ frameworkPath.match(2), name };
+ return FrameworkDescriptor{ frameworkPath.match(2),
+ frameworkPath.match(5), name };
}
- return FrameworkDescriptor{ frameworkPath.match(2), name,
- libname.substr(name.size()) };
+ return FrameworkDescriptor{ frameworkPath.match(2), frameworkPath.match(5),
+ name, libname.substr(name.size()) };
}
if (format == FrameworkFormat::Extended) {
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 79fe52c..d657fc8 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -384,9 +384,17 @@ public:
, Name(std::move(name))
{
}
- FrameworkDescriptor(std::string directory, std::string name,
- std::string suffix)
+ FrameworkDescriptor(std::string directory, std::string version,
+ std::string name)
: Directory(std::move(directory))
+ , Version(std::move(version))
+ , Name(std::move(name))
+ {
+ }
+ FrameworkDescriptor(std::string directory, std::string version,
+ std::string name, std::string suffix)
+ : Directory(std::move(directory))
+ , Version(std::move(version))
, Name(std::move(name))
, Suffix(std::move(suffix))
{
@@ -400,6 +408,13 @@ public:
{
return cmStrCat(this->Name, ".framework/"_s, this->Name, this->Suffix);
}
+ std::string GetVersionedName() const
+ {
+ return this->Version.empty()
+ ? this->GetFullName()
+ : cmStrCat(this->Name, ".framework/Versions/"_s, this->Version, '/',
+ this->Name, this->Suffix);
+ }
std::string GetFrameworkPath() const
{
return this->Directory.empty()
@@ -412,8 +427,15 @@ public:
? this->GetFullName()
: cmStrCat(this->Directory, '/', this->GetFullName());
}
+ std::string GetVersionedPath() const
+ {
+ return this->Directory.empty()
+ ? this->GetVersionedName()
+ : cmStrCat(this->Directory, '/', this->GetVersionedName());
+ }
const std::string Directory;
+ const std::string Version;
const std::string Name;
const std::string Suffix;
};
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/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 7626fa3..8698e77 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -507,8 +507,18 @@ void cmGlobalNinjaGenerator::WriteVariable(std::ostream& os,
return;
}
+ std::string val;
+ static std::unordered_set<std::string> const variablesShouldNotBeTrimmed = {
+ "CODE_CHECK", "LAUNCHER"
+ };
+ if (variablesShouldNotBeTrimmed.find(name) ==
+ variablesShouldNotBeTrimmed.end()) {
+ val = cmTrimWhitespace(value);
+ } else {
+ val = value;
+ }
+
// Do not add a variable if the value is empty.
- std::string val = cmTrimWhitespace(value);
if (val.empty()) {
return;
}
@@ -2526,7 +2536,12 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
CxxModuleUsage usages;
// Map from module name to module file path, if known.
- std::map<std::string, std::string> mod_files;
+ struct AvailableModuleInfo
+ {
+ std::string BmiPath;
+ bool IsPrivate;
+ };
+ std::map<std::string, AvailableModuleInfo> mod_files;
// Populate the module map with those provided by linked targets first.
for (std::string const& linked_target_dir : linked_target_dirs) {
@@ -2550,7 +2565,15 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
Json::Value const& target_modules = ltm["modules"];
if (target_modules.isObject()) {
for (auto i = target_modules.begin(); i != target_modules.end(); ++i) {
- mod_files[i.key().asString()] = i->asString();
+ Json::Value const& visible_module = *i;
+ if (visible_module.isObject()) {
+ Json::Value const& bmi_path = visible_module["bmi"];
+ Json::Value const& is_private = visible_module["is-private"];
+ mod_files[i.key().asString()] = AvailableModuleInfo{
+ bmi_path.asString(),
+ is_private.asBool(),
+ };
+ }
}
}
Json::Value const& target_modules_references = ltm["references"];
@@ -2631,8 +2654,15 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
cmSystemTools::ReplaceString(safe_logical_name, ":", "-");
mod = cmStrCat(module_dir, safe_logical_name, module_ext);
}
- mod_files[p.LogicalName] = mod;
- target_modules[p.LogicalName] = mod;
+ mod_files[p.LogicalName] = AvailableModuleInfo{
+ mod,
+ false, // Always visible within our own target.
+ };
+ Json::Value& module_info = target_modules[p.LogicalName] =
+ Json::objectValue;
+ module_info["bmi"] = mod;
+ module_info["is-private"] =
+ cmDyndepCollation::IsObjectPrivate(object.PrimaryOutput, export_info);
}
}
@@ -2652,12 +2682,15 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
return path;
};
locs.BmiLocationForModule =
- [&mod_files](std::string const& logical) -> cm::optional<std::string> {
+ [&mod_files](std::string const& logical) -> CxxBmiLocation {
auto m = mod_files.find(logical);
if (m != mod_files.end()) {
- return m->second;
+ if (m->second.IsPrivate) {
+ return CxxBmiLocation::Private();
+ }
+ return CxxBmiLocation::Known(m->second.BmiPath);
}
- return {};
+ return CxxBmiLocation::Unknown();
};
// Insert information about the current target's modules.
@@ -2679,13 +2712,14 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
build.ImplicitOuts.clear();
for (auto const& p : object.Provides) {
build.ImplicitOuts.push_back(
- this->ConvertToNinjaPath(mod_files[p.LogicalName]));
+ this->ConvertToNinjaPath(mod_files[p.LogicalName].BmiPath));
}
build.ImplicitDeps.clear();
for (auto const& r : object.Requires) {
auto mit = mod_files.find(r.LogicalName);
if (mit != mod_files.end()) {
- build.ImplicitDeps.push_back(this->ConvertToNinjaPath(mit->second));
+ build.ImplicitDeps.push_back(
+ this->ConvertToNinjaPath(mit->second.BmiPath));
}
}
build.Variables.clear();
@@ -2751,7 +2785,7 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
[mod_files](std::string const& name) -> cm::optional<std::string> {
auto m = mod_files.find(name);
if (m != mod_files.end()) {
- return m->second;
+ return m->second.BmiPath;
}
return {};
};
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 6917ffc..38942cb 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -149,6 +149,8 @@ public:
virtual bool IsUtf8EncodingSupported() const { return false; }
+ virtual bool IsScanDependenciesSupported() const { return false; }
+
static std::string GetInstalledNsightTegraVersion();
/** Return the first two components of CMAKE_SYSTEM_VERSION. */
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<std::string> cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
cmGeneratorTarget const* target)
{
std::set<std::string> 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/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
index f28419a..602b42f 100644
--- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
@@ -739,6 +739,22 @@ bool cmGlobalVisualStudioVersionedGenerator::IsUtf8EncodingSupported() const
cmSystemTools::VersionCompareGreaterEq(*vsVer, vsVer16_10_P2));
}
+bool cmGlobalVisualStudioVersionedGenerator::IsScanDependenciesSupported()
+ const
+{
+ // Supported from Visual Studio 17.6 Preview 7.
+ if (this->Version > cmGlobalVisualStudioGenerator::VSVersion::VS17) {
+ return true;
+ }
+ if (this->Version < cmGlobalVisualStudioGenerator::VSVersion::VS17) {
+ return false;
+ }
+ static std::string const vsVer17_6_P7 = "17.6.33706.43";
+ cm::optional<std::string> vsVer = this->GetVSInstanceVersion();
+ return (vsVer &&
+ cmSystemTools::VersionCompareGreaterEq(*vsVer, vsVer17_6_P7));
+}
+
const char*
cmGlobalVisualStudioVersionedGenerator::GetAndroidApplicationTypeRevision()
const
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.h b/Source/cmGlobalVisualStudioVersionedGenerator.h
index fb4b1d7..558ea7c 100644
--- a/Source/cmGlobalVisualStudioVersionedGenerator.h
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.h
@@ -44,6 +44,8 @@ public:
bool IsUtf8EncodingSupported() const override;
+ bool IsScanDependenciesSupported() const override;
+
const char* GetAndroidApplicationTypeRevision() const override;
bool CheckCxxModuleSupport() override
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 60f46e5..110933e 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2765,7 +2765,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
if (emitted.insert(frameworkDir).second) {
std::string incpath = this->XCodeEscapePath(frameworkDir);
if (emitSystemIncludes &&
- gtgt->IsSystemIncludeDirectory(include, configName,
+ gtgt->IsSystemIncludeDirectory(frameworkDir, configName,
langForIncludes)) {
sysfdirs.Add(incpath);
} else {
@@ -3910,8 +3910,6 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
// otherwise we end up hard-coding a path to the wrong SDK for
// SDK-provided frameworks that are added by their full path.
std::set<std::string> emitted(cli->GetFrameworkPathsEmitted());
- const auto& fwPaths = cli->GetFrameworkPaths();
- emitted.insert(fwPaths.begin(), fwPaths.end());
BuildObjectListOrString libPaths(this, true);
BuildObjectListOrString fwSearchPaths(this, true);
for (auto const& libItem : configItemMap[configName]) {
diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx
index ba0c138..b7ee4fa 100644
--- a/Source/cmLinkLineComputer.cxx
+++ b/Source/cmLinkLineComputer.cxx
@@ -191,16 +191,24 @@ std::string cmLinkLineComputer::ComputeRPath(cmComputeLinkInformation& cli)
}
std::string cmLinkLineComputer::ComputeFrameworkPath(
- cmComputeLinkInformation& cli, std::string const& fwSearchFlag)
+ cmComputeLinkInformation& cli, cmValue fwSearchFlag, cmValue sysFwSearchFlag)
{
+ if (!fwSearchFlag && !sysFwSearchFlag) {
+ return std::string{};
+ }
+
std::string frameworkPath;
- if (!fwSearchFlag.empty()) {
- std::vector<std::string> const& fwDirs = cli.GetFrameworkPaths();
- for (std::string const& fd : fwDirs) {
+ auto const& fwDirs = cli.GetFrameworkPaths();
+ for (auto const& fd : fwDirs) {
+ if (sysFwSearchFlag &&
+ cli.GetTarget()->IsSystemIncludeDirectory(fd, cli.GetConfig(),
+ cli.GetLinkLanguage())) {
+ frameworkPath += sysFwSearchFlag;
+ } else {
frameworkPath += fwSearchFlag;
- frameworkPath += this->ConvertToOutputFormat(fd);
- frameworkPath += " ";
}
+ frameworkPath += this->ConvertToOutputFormat(fd);
+ frameworkPath += " ";
}
return frameworkPath;
}
diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h
index 9fb222c..4e285f2 100644
--- a/Source/cmLinkLineComputer.h
+++ b/Source/cmLinkLineComputer.h
@@ -9,6 +9,7 @@
#include <vector>
#include "cmStateDirectory.h"
+#include "cmValue.h"
class cmComputeLinkInformation;
class cmGeneratorTarget;
@@ -43,7 +44,8 @@ public:
std::vector<BT<std::string>>& linkPath);
std::string ComputeFrameworkPath(cmComputeLinkInformation& cli,
- std::string const& fwSearchFlag);
+ cmValue fwSearchFlag,
+ cmValue sysFwSearchFlag);
std::string ComputeLinkLibraries(cmComputeLinkInformation& cli,
std::string const& stdLibString);
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 4089fd4..63b2043 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -914,7 +914,7 @@ std::string cmLocalGenerator::GetIncludeFlags(
cmSystemTools::CollapseFullPath(cmStrCat(i, "/../"));
if (emitted.insert(frameworkDir).second) {
if (sysFwSearchFlag && target &&
- target->IsSystemIncludeDirectory(i, config, lang)) {
+ target->IsSystemIncludeDirectory(frameworkDir, config, lang)) {
includeFlags << *sysFwSearchFlag;
} else {
includeFlags << *fwSearchFlag;
@@ -1645,9 +1645,9 @@ std::vector<BT<std::string>> cmLocalGenerator::GetTargetCompileFlags(
return flags;
}
-static std::string GetFrameworkFlags(const std::string& lang,
- const std::string& config,
- cmGeneratorTarget* target)
+std::string cmLocalGenerator::GetFrameworkFlags(std::string const& lang,
+ std::string const& config,
+ cmGeneratorTarget* target)
{
cmLocalGenerator* lg = target->GetLocalGenerator();
cmMakefile* mf = lg->GetMakefile();
@@ -1656,10 +1656,13 @@ static std::string GetFrameworkFlags(const std::string& lang,
return std::string();
}
- std::string fwSearchFlagVar = "CMAKE_" + lang + "_FRAMEWORK_SEARCH_FLAG";
- cmValue fwSearchFlag = mf->GetDefinition(fwSearchFlagVar);
- if (!cmNonempty(fwSearchFlag)) {
- return std::string();
+ cmValue fwSearchFlag =
+ mf->GetDefinition(cmStrCat("CMAKE_", lang, "_FRAMEWORK_SEARCH_FLAG"));
+ cmValue sysFwSearchFlag = mf->GetDefinition(
+ cmStrCat("CMAKE_", lang, "_SYSTEM_FRAMEWORK_SEARCH_FLAG"));
+
+ if (!fwSearchFlag && !sysFwSearchFlag) {
+ return std::string{};
}
std::set<std::string> emitted;
@@ -1684,7 +1687,12 @@ static std::string GetFrameworkFlags(const std::string& lang,
std::vector<std::string> const& frameworks = cli->GetFrameworkPaths();
for (std::string const& framework : frameworks) {
if (emitted.insert(framework).second) {
- flags += *fwSearchFlag;
+ if (sysFwSearchFlag &&
+ target->IsSystemIncludeDirectory(framework, config, lang)) {
+ flags += *sysFwSearchFlag;
+ } else {
+ flags += *fwSearchFlag;
+ }
flags +=
lg->ConvertToOutputFormat(framework, cmOutputConverter::SHELL);
flags += " ";
@@ -1694,13 +1702,6 @@ static std::string GetFrameworkFlags(const std::string& lang,
return flags;
}
-std::string cmLocalGenerator::GetFrameworkFlags(std::string const& l,
- std::string const& config,
- cmGeneratorTarget* target)
-{
- return ::GetFrameworkFlags(l, config, target);
-}
-
void cmLocalGenerator::GetTargetDefines(cmGeneratorTarget const* target,
std::string const& config,
std::string const& lang,
@@ -1788,10 +1789,13 @@ void cmLocalGenerator::OutputLinkLibraries(
cmStrCat("CMAKE_", cli.GetLinkLanguage(), "_STANDARD_LIBRARIES"));
// Append the framework search path flags.
- std::string fwSearchFlag = this->Makefile->GetSafeDefinition(
+ cmValue fwSearchFlag = this->Makefile->GetDefinition(
cmStrCat("CMAKE_", linkLanguage, "_FRAMEWORK_SEARCH_FLAG"));
+ cmValue sysFwSearchFlag = this->Makefile->GetDefinition(
+ cmStrCat("CMAKE_", linkLanguage, "_SYSTEM_FRAMEWORK_SEARCH_FLAG"));
- frameworkPath = linkLineComputer->ComputeFrameworkPath(cli, fwSearchFlag);
+ frameworkPath =
+ linkLineComputer->ComputeFrameworkPath(cli, fwSearchFlag, sysFwSearchFlag);
linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator,
linkPath);
linkLineComputer->ComputeLinkLibraries(cli, stdLibString, linkLibraries);
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/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 02cdf57..c915e26 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -26,7 +26,6 @@
#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
-#include "cmGlobalCommonGenerator.h"
#include "cmGlobalUnixMakefileGenerator3.h"
#include "cmLinkLineComputer.h" // IWYU pragma: keep
#include "cmList.h"
@@ -420,7 +419,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
this->GeneratorTarget->HasLinkDependencyFile(this->GetConfigName());
if (compilerGenerateDeps || linkerGenerateDeps || ccGenerateDeps) {
- std::string compilerDependFile =
+ std::string const compilerDependFile =
cmStrCat(this->TargetBuildDirectoryFull, "/compiler_depend.make");
*this->BuildFileStream << "# Include any dependencies generated by the "
"compiler for this target.\n"
@@ -613,17 +612,17 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
}
// Use compiler to generate dependencies, if supported.
- bool compilerGenerateDeps =
+ bool const compilerGenerateDeps =
this->GlobalGenerator->SupportsCompilerDependencies() &&
cmIsOn(this->Makefile->GetDefinition(
cmStrCat("CMAKE_", lang, "_DEPENDS_USE_COMPILER")));
- auto scanner = compilerGenerateDeps ? cmDependencyScannerKind::Compiler
- : cmDependencyScannerKind::CMake;
+ auto const scanner = compilerGenerateDeps ? cmDependencyScannerKind::Compiler
+ : cmDependencyScannerKind::CMake;
// Get the full path name of the object file.
std::string const& objectName =
this->GeneratorTarget->GetObjectName(&source);
- std::string obj =
+ std::string const obj =
cmStrCat(this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget),
'/', objectName);
@@ -642,7 +641,7 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
// Create the directory containing the object file. This may be a
// subdirectory under the target's directory.
{
- std::string dir = cmSystemTools::GetFilenamePath(obj);
+ std::string const dir = cmSystemTools::GetFilenamePath(obj);
cmSystemTools::MakeDirectory(this->LocalGenerator->ConvertToFullPath(dir));
}
@@ -656,7 +655,7 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
std::string objFullPath =
cmStrCat(this->LocalGenerator->GetCurrentBinaryDirectory(), '/', obj);
objFullPath = cmSystemTools::CollapseFullPath(objFullPath);
- std::string srcFullPath =
+ std::string const srcFullPath =
cmSystemTools::CollapseFullPath(source.GetFullPath());
this->LocalGenerator->AddImplicitDepends(this->GeneratorTarget, lang,
objFullPath, srcFullPath, scanner);
@@ -669,8 +668,8 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
// generate the depend scanning rule
this->WriteObjectDependRules(source, depends);
- std::string config = this->GetConfigName();
- std::string configUpper = cmSystemTools::UpperCase(config);
+ std::string const config = this->GetConfigName();
+ std::string const configUpper = cmSystemTools::UpperCase(config);
// Add precompile headers dependencies
std::vector<std::string> architectures =
@@ -726,7 +725,8 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
this->GeneratorTarget->AddExplicitLanguageFlags(flags, source);
// Add language-specific flags.
- std::string langFlags = cmStrCat("$(", lang, "_FLAGS", filterArch, ")");
+ std::string const langFlags =
+ cmStrCat("$(", lang, "_FLAGS", filterArch, ")");
this->LocalGenerator->AppendFlags(flags, langFlags);
cmGeneratorExpressionInterpreter genexInterpreter(
@@ -745,7 +745,7 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
cmSystemTools::GetFilenameWithoutLastExtension(objectName);
ispcSource = cmSystemTools::GetFilenameWithoutLastExtension(ispcSource);
- cmValue ispcSuffixProp =
+ cmValue const ispcSuffixProp =
this->GeneratorTarget->GetProperty("ISPC_HEADER_SUFFIX");
assert(ispcSuffixProp);
@@ -784,7 +784,7 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
// Add precompile headers compile options.
if (!pchSources.empty() && !source.GetProperty("SKIP_PRECOMPILE_HEADERS")) {
std::string pchOptions;
- auto pchIt = pchSources.find(source.GetFullPath());
+ auto const pchIt = pchSources.find(source.GetFullPath());
if (pchIt != pchSources.end()) {
pchOptions = this->GeneratorTarget->GetPchCreateCompileOptions(
config, lang, pchIt->second);
@@ -830,7 +830,8 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
<< "_DEFINES = " << evaluatedDefs << "\n"
<< "\n";
}
- std::string defPropName = cmStrCat("COMPILE_DEFINITIONS_", configUpper);
+ std::string const defPropName =
+ cmStrCat("COMPILE_DEFINITIONS_", configUpper);
if (cmValue config_compile_defs = source.GetProperty(defPropName)) {
const std::string& evaluatedDefs =
genexInterpreter.Evaluate(*config_compile_defs, COMPILE_DEFINITIONS);
@@ -841,7 +842,7 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
}
// Get the output paths for source and object files.
- std::string sourceFile = this->LocalGenerator->ConvertToOutputFormat(
+ std::string const sourceFile = this->LocalGenerator->ConvertToOutputFormat(
source.GetFullPath(), cmOutputConverter::SHELL);
// Construct the build message.
@@ -897,7 +898,7 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
targetOutPathCompilePDB.back() = '/';
}
- std::string compilePdbOutputPath =
+ std::string const compilePdbOutputPath =
this->GeneratorTarget->GetCompilePDBDirectory(this->GetConfigName());
cmSystemTools::MakeDirectory(compilePdbOutputPath);
}
@@ -910,7 +911,7 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
vars.TargetPDB = targetOutPathPDB.c_str();
vars.TargetCompilePDB = targetOutPathCompilePDB.c_str();
vars.Source = sourceFile.c_str();
- std::string shellObj =
+ std::string const shellObj =
this->LocalGenerator->ConvertToOutputFormat(obj, cmOutputConverter::SHELL);
vars.Object = shellObj.c_str();
std::string objectDir = this->GeneratorTarget->GetSupportDirectory();
@@ -960,7 +961,7 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
// At the moment, it is assumed that C, C++, Fortran, and CUDA have both
// assembly and preprocessor capabilities. The same is true for the
// ability to export compile commands
- bool lang_has_preprocessor =
+ bool const lang_has_preprocessor =
((lang == "C") || (lang == "CXX") || (lang == "OBJC") ||
(lang == "OBJCXX") || (lang == "Fortran") || (lang == "CUDA") ||
lang == "ISPC" || lang == "HIP" || lang == "ASM");
@@ -1016,31 +1017,31 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
// no launcher for CMAKE_EXPORT_COMPILE_COMMANDS
rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator,
compileCommand, vars);
- std::string workingDirectory =
+ std::string const workingDirectory =
this->LocalGenerator->GetCurrentBinaryDirectory();
std::string::size_type lfPos = compileCommand.find(langFlags);
if (lfPos != std::string::npos) {
compileCommand.replace(lfPos, langFlags.size(),
this->GetFlags(lang, this->GetConfigName()));
}
- std::string langDefines = std::string("$(") + lang + "_DEFINES)";
- std::string::size_type ldPos = compileCommand.find(langDefines);
+ std::string const langDefines = std::string("$(") + lang + "_DEFINES)";
+ std::string::size_type const ldPos = compileCommand.find(langDefines);
if (ldPos != std::string::npos) {
compileCommand.replace(ldPos, langDefines.size(),
this->GetDefines(lang, this->GetConfigName()));
}
- std::string langIncludes = std::string("$(") + lang + "_INCLUDES)";
- std::string::size_type liPos = compileCommand.find(langIncludes);
+ std::string const langIncludes = std::string("$(") + lang + "_INCLUDES)";
+ std::string::size_type const liPos = compileCommand.find(langIncludes);
if (liPos != std::string::npos) {
compileCommand.replace(liPos, langIncludes.size(),
this->GetIncludes(lang, this->GetConfigName()));
}
- cmValue eliminate[] = {
+ cmValue const eliminate[] = {
this->Makefile->GetDefinition("CMAKE_START_TEMP_FILE"),
this->Makefile->GetDefinition("CMAKE_END_TEMP_FILE")
};
- for (cmValue el : eliminate) {
+ for (cmValue const& el : eliminate) {
if (el) {
cmSystemTools::ReplaceString(compileCommand, *el, "");
}
@@ -1052,150 +1053,16 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
// See if we need to use a compiler launcher like ccache or distcc
std::string compilerLauncher;
- if (!compileCommands.empty() &&
- (lang == "C" || lang == "CXX" || lang == "Fortran" || lang == "CUDA" ||
- lang == "HIP" || lang == "ISPC" || lang == "OBJC" ||
- lang == "OBJCXX")) {
- std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER";
- cmValue clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
- std::string evaluatedClauncher = cmGeneratorExpression::Evaluate(
- *clauncher, this->LocalGenerator, config, this->GeneratorTarget,
- nullptr, this->GeneratorTarget, lang);
- if (!evaluatedClauncher.empty()) {
- compilerLauncher = evaluatedClauncher;
- }
+ if (!compileCommands.empty()) {
+ compilerLauncher = GetCompilerLauncher(lang, config);
}
- // Maybe insert an include-what-you-use runner.
- if (!compileCommands.empty() &&
- (lang == "C" || lang == "CXX" || lang == "OBJC" || lang == "OBJCXX")) {
- cmValue tidy = nullptr;
- cmValue iwyu = nullptr;
- cmValue cpplint = nullptr;
- cmValue cppcheck = nullptr;
- std::string evaluatedTIDY;
- std::string evaluatedIWYU;
- std::string evaluatedCPPlint;
- std::string evaluatedCPPcheck;
-
- std::string const tidy_prop = cmStrCat(lang, "_CLANG_TIDY");
- tidy = this->GeneratorTarget->GetProperty(tidy_prop);
- evaluatedTIDY = cmGeneratorExpression::Evaluate(
- *tidy, this->LocalGenerator, config, this->GeneratorTarget, nullptr,
- this->GeneratorTarget, lang);
- if (!evaluatedTIDY.empty()) {
- tidy = cmValue(&evaluatedTIDY);
- }
-
- if (lang == "C" || lang == "CXX") {
- std::string const iwyu_prop = cmStrCat(lang, "_INCLUDE_WHAT_YOU_USE");
- iwyu = this->GeneratorTarget->GetProperty(iwyu_prop);
- evaluatedIWYU = cmGeneratorExpression::Evaluate(
- *iwyu, this->LocalGenerator, config, this->GeneratorTarget, nullptr,
- this->GeneratorTarget, lang);
- if (!evaluatedIWYU.empty()) {
- iwyu = cmValue(&evaluatedIWYU);
- }
-
- std::string const cpplint_prop = cmStrCat(lang, "_CPPLINT");
- cpplint = this->GeneratorTarget->GetProperty(cpplint_prop);
- evaluatedCPPlint = cmGeneratorExpression::Evaluate(
- *cpplint, this->LocalGenerator, config, this->GeneratorTarget,
- nullptr, this->GeneratorTarget, lang);
- if (!evaluatedCPPlint.empty()) {
- cpplint = cmValue(&evaluatedCPPlint);
- }
-
- std::string const cppcheck_prop = cmStrCat(lang, "_CPPCHECK");
- cppcheck = this->GeneratorTarget->GetProperty(cppcheck_prop);
- evaluatedCPPcheck = cmGeneratorExpression::Evaluate(
- *cppcheck, this->LocalGenerator, config, this->GeneratorTarget,
- nullptr, this->GeneratorTarget, lang);
- if (!evaluatedCPPcheck.empty()) {
- cppcheck = cmValue(&evaluatedCPPcheck);
- }
- }
- if (cmNonempty(iwyu) || cmNonempty(tidy) || cmNonempty(cpplint) ||
- cmNonempty(cppcheck)) {
- std::string run_iwyu = "$(CMAKE_COMMAND) -E __run_co_compile";
- if (!compilerLauncher.empty()) {
- // In __run_co_compile case the launcher command is supplied
- // via --launcher=<maybe-list> and consumed
- run_iwyu += " --launcher=";
- run_iwyu += this->LocalGenerator->EscapeForShell(compilerLauncher);
- compilerLauncher.clear();
- }
- if (cmNonempty(iwyu)) {
- run_iwyu += " --iwyu=";
-
- // Only add --driver-mode if it is not already specified, as adding
- // it unconditionally might override a user-specified driver-mode
- if (iwyu.Get()->find("--driver-mode=") == std::string::npos) {
- cmValue p = this->Makefile->GetDefinition(
- cmStrCat("CMAKE_", lang, "_INCLUDE_WHAT_YOU_USE_DRIVER_MODE"));
- std::string driverMode;
-
- if (cmNonempty(p)) {
- driverMode = *p;
- } else {
- driverMode = lang == "C" ? "gcc" : "g++";
- }
-
- run_iwyu += this->LocalGenerator->EscapeForShell(
- cmStrCat(*iwyu, ";--driver-mode=", driverMode));
- } else {
- run_iwyu += this->LocalGenerator->EscapeForShell(*iwyu);
- }
- }
- if (cmNonempty(tidy)) {
- run_iwyu += " --tidy=";
- cmValue p = this->Makefile->GetDefinition("CMAKE_" + lang +
- "_CLANG_TIDY_DRIVER_MODE");
- std::string driverMode;
- if (cmNonempty(p)) {
- driverMode = *p;
- } else {
- driverMode = lang == "C" ? "gcc" : "g++";
- }
- std::string d =
- this->GeneratorTarget->GetClangTidyExportFixesDirectory(lang);
- std::string exportFixes;
- if (!d.empty()) {
- this->GlobalCommonGenerator->AddClangTidyExportFixesDir(d);
- std::string fixesFile = cmSystemTools::CollapseFullPath(cmStrCat(
- d, '/',
- this->LocalGenerator->MaybeRelativeToTopBinDir(cmStrCat(
- this->LocalGenerator->GetCurrentBinaryDirectory(), '/',
- this->LocalGenerator->GetTargetDirectory(
- this->GeneratorTarget),
- '/', objectName, ".yaml"))));
- this->GlobalCommonGenerator->AddClangTidyExportFixesFile(
- fixesFile);
- cmSystemTools::MakeDirectory(
- cmSystemTools::GetFilenamePath(fixesFile));
- fixesFile =
- this->LocalGenerator->MaybeRelativeToCurBinDir(fixesFile);
- exportFixes = cmStrCat(";--export-fixes=", fixesFile);
- }
- run_iwyu += this->LocalGenerator->EscapeForShell(
- cmStrCat(*tidy, ";--extra-arg-before=--driver-mode=", driverMode,
- exportFixes));
- }
- if (cmNonempty(cpplint)) {
- run_iwyu += " --cpplint=";
- run_iwyu += this->LocalGenerator->EscapeForShell(*cpplint);
- }
- if (cmNonempty(cppcheck)) {
- run_iwyu += " --cppcheck=";
- run_iwyu += this->LocalGenerator->EscapeForShell(*cppcheck);
- }
- if (cmNonempty(tidy) || (cmNonempty(cpplint)) ||
- (cmNonempty(cppcheck))) {
- run_iwyu += " --source=";
- run_iwyu += sourceFile;
- }
- run_iwyu += " -- ";
- compileCommands.front().insert(0, run_iwyu);
+ cmValue const skipCodeCheck = source.GetProperty("SKIP_LINTING");
+ if (!skipCodeCheck.IsOn()) {
+ std::string const codeCheck = this->GenerateCodeCheckRules(
+ source, compilerLauncher, "$(CMAKE_COMMAND)", config, nullptr);
+ if (!codeCheck.empty()) {
+ compileCommands.front().insert(0, codeCheck);
}
}
@@ -1330,8 +1197,8 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
if (do_preprocess_rules) {
commands.clear();
- std::string relativeObjI = relativeObjBase + ".i";
- std::string objI = objBase + ".i";
+ std::string const relativeObjI = relativeObjBase + ".i";
+ std::string const objI = objBase + ".i";
std::string preprocessEcho =
cmStrCat("Preprocessing ", lang, " source to ", objI);
@@ -1423,7 +1290,7 @@ void cmMakefileTargetGenerator::WriteTargetCleanRules()
std::vector<std::string> commands;
// Construct the clean target name.
- std::string cleanTarget = cmStrCat(
+ std::string const cleanTarget = cmStrCat(
this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget),
"/clean");
@@ -1451,7 +1318,7 @@ bool cmMakefileTargetGenerator::WriteMakeRule(
}
// Check whether we need to bother checking for a symbolic output.
- bool need_symbolic = this->GlobalGenerator->GetNeedSymbolicMark();
+ bool const need_symbolic = this->GlobalGenerator->GetNeedSymbolicMark();
// Check whether the first output is marked as symbolic.
if (need_symbolic) {
@@ -1481,7 +1348,7 @@ bool cmMakefileTargetGenerator::WriteMakeRule(
bool o_symbolic = false;
if (need_symbolic) {
- if (cmSourceFile* sf = this->Makefile->GetSource(output)) {
+ if (cmSourceFile const* sf = this->Makefile->GetSource(output)) {
o_symbolic = sf->GetPropertyAsBool("SYMBOLIC");
}
}
@@ -1517,6 +1384,23 @@ void cmMakefileTargetGenerator::WriteTargetLinkDependRules()
this->GeneratorTarget->GetFullPath(this->GetConfigName()), depFile,
cmDependencyScannerKind::Compiler);
}
+std::string cmMakefileTargetGenerator::GetClangTidyReplacementsFilePath(
+ std::string const& directory, cmSourceFile const& source,
+ std::string const& config) const
+{
+ (void)config;
+ auto const& objectName = this->GeneratorTarget->GetObjectName(&source);
+ auto fixesFile = cmSystemTools::CollapseFullPath(cmStrCat(
+ directory, '/',
+ this->GeneratorTarget->GetLocalGenerator()->MaybeRelativeToTopBinDir(
+ cmStrCat(this->GeneratorTarget->GetLocalGenerator()
+ ->GetCurrentBinaryDirectory(),
+ '/',
+ this->GeneratorTarget->GetLocalGenerator()->GetTargetDirectory(
+ this->GeneratorTarget),
+ '/', objectName, ".yaml"))));
+ return fixesFile;
+}
void cmMakefileTargetGenerator::WriteTargetDependRules()
{
@@ -1559,7 +1443,7 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
"# Targets to which this target links which contain Fortran sources.\n"
"set(CMAKE_Fortran_TARGET_LINKED_INFO_FILES\n";
/* clang-format on */
- std::vector<std::string> dirs =
+ std::vector<std::string> const dirs =
this->GetLinkedTargetDirectories("Fortran", this->GetConfigName());
for (std::string const& d : dirs) {
*this->InfoFileStream << " \"" << d << "/DependInfo.cmake\"\n";
@@ -1591,7 +1475,7 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
std::vector<std::string> commands;
// Construct the name of the dependency generation target.
- std::string depTarget = cmStrCat(
+ std::string const depTarget = cmStrCat(
this->LocalGenerator->GetRelativeTargetDirectory(this->GeneratorTarget),
"/depend");
@@ -1701,7 +1585,7 @@ void cmMakefileTargetGenerator::WriteDeviceLinkRule(
deps.emplace_back(cmStrCat(relPath, obj));
}
- std::unordered_set<std::string> depsSet(deps.begin(), deps.end());
+ std::unordered_set<std::string> const depsSet(deps.begin(), deps.end());
deps.clear();
std::copy(depsSet.begin(), depsSet.end(), std::back_inserter(deps));
return deps;
@@ -1785,7 +1669,7 @@ void cmMakefileTargetGenerator::WriteDeviceLinkRule(
this->GetDeviceLinkFlags(linkFlags, "CUDA");
vars.LinkFlags = linkFlags.c_str();
- std::string flags = this->GetFlags("CUDA", this->GetConfigName());
+ std::string const flags = this->GetFlags("CUDA", this->GetConfigName());
vars.Flags = flags.c_str();
std::string compileCmd = this->GetLinkRule("CMAKE_CUDA_DEVICE_LINK_COMPILE");
@@ -1839,8 +1723,8 @@ void cmMakefileTargetGenerator::GenerateCustomRuleFile(
// Write the rule.
const std::vector<std::string>& outputs = ccg.GetOutputs();
- bool symbolic = this->WriteMakeRule(*this->BuildFileStream, nullptr, outputs,
- depends, commands);
+ bool const symbolic = this->WriteMakeRule(*this->BuildFileStream, nullptr,
+ outputs, depends, commands);
// Symbolic inputs are not expected to exist, so add dummy rules.
if (this->CMP0113New && !depends.empty()) {
@@ -2328,7 +2212,7 @@ void cmMakefileTargetGenerator::CreateObjectLists(
useWatcomQuote);
if (useResponseFile) {
// MSVC response files cannot exceed 128K.
- std::string::size_type const responseFileLimit = 131000;
+ std::string::size_type constexpr responseFileLimit = 131000;
// Construct the individual object list strings.
std::vector<std::string> object_strings;
@@ -2461,7 +2345,8 @@ std::string cmMakefileTargetGenerator::GetResponseFlag(
std::string responseFlag = "@";
std::string responseFlagVar;
- auto lang = this->GeneratorTarget->GetLinkerLanguage(this->GetConfigName());
+ auto const lang =
+ this->GeneratorTarget->GetLinkerLanguage(this->GetConfigName());
if (mode == cmMakefileTargetGenerator::ResponseFlagFor::Link) {
responseFlagVar = cmStrCat("CMAKE_", lang, "_RESPONSE_FILE_LINK_FLAG");
} else if (mode == cmMakefileTargetGenerator::ResponseFlagFor::DeviceLink) {
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index ef7a60f..08d6945 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -82,6 +82,10 @@ protected:
// write the depend rules for this target
void WriteTargetDependRules();
+ std::string GetClangTidyReplacementsFilePath(
+ std::string const& directory, cmSourceFile const& source,
+ std::string const& config) const override;
+
// write rules for macOS Application Bundle content.
struct MacOSXContentGeneratorType
: cmOSXBundleGenerator::MacOSXContentGeneratorType
diff --git a/Source/cmMessenger.cxx b/Source/cmMessenger.cxx
index ff513be..7de8936 100644
--- a/Source/cmMessenger.cxx
+++ b/Source/cmMessenger.cxx
@@ -18,51 +18,38 @@
MessageType cmMessenger::ConvertMessageType(MessageType t) const
{
- bool warningsAsErrors;
-
if (t == MessageType::AUTHOR_WARNING || t == MessageType::AUTHOR_ERROR) {
- warningsAsErrors = this->GetDevWarningsAsErrors();
- if (warningsAsErrors && t == MessageType::AUTHOR_WARNING) {
- t = MessageType::AUTHOR_ERROR;
- } else if (!warningsAsErrors && t == MessageType::AUTHOR_ERROR) {
- t = MessageType::AUTHOR_WARNING;
+ if (this->GetDevWarningsAsErrors()) {
+ return MessageType::AUTHOR_ERROR;
}
- } else if (t == MessageType::DEPRECATION_WARNING ||
- t == MessageType::DEPRECATION_ERROR) {
- warningsAsErrors = this->GetDeprecatedWarningsAsErrors();
- if (warningsAsErrors && t == MessageType::DEPRECATION_WARNING) {
- t = MessageType::DEPRECATION_ERROR;
- } else if (!warningsAsErrors && t == MessageType::DEPRECATION_ERROR) {
- t = MessageType::DEPRECATION_WARNING;
+ return MessageType::AUTHOR_WARNING;
+ }
+ if (t == MessageType::DEPRECATION_WARNING ||
+ t == MessageType::DEPRECATION_ERROR) {
+ if (this->GetDeprecatedWarningsAsErrors()) {
+ return MessageType::DEPRECATION_ERROR;
}
+ return MessageType::DEPRECATION_WARNING;
}
-
return t;
}
bool cmMessenger::IsMessageTypeVisible(MessageType t) const
{
- bool isVisible = true;
-
if (t == MessageType::DEPRECATION_ERROR) {
- if (!this->GetDeprecatedWarningsAsErrors()) {
- isVisible = false;
- }
- } else if (t == MessageType::DEPRECATION_WARNING) {
- if (this->GetSuppressDeprecatedWarnings()) {
- isVisible = false;
- }
- } else if (t == MessageType::AUTHOR_ERROR) {
- if (!this->GetDevWarningsAsErrors()) {
- isVisible = false;
- }
- } else if (t == MessageType::AUTHOR_WARNING) {
- if (this->GetSuppressDevWarnings()) {
- isVisible = false;
- }
+ return this->GetDeprecatedWarningsAsErrors();
+ }
+ if (t == MessageType::DEPRECATION_WARNING) {
+ return !this->GetSuppressDeprecatedWarnings();
+ }
+ if (t == MessageType::AUTHOR_ERROR) {
+ return this->GetDevWarningsAsErrors();
+ }
+ if (t == MessageType::AUTHOR_WARNING) {
+ return !this->GetSuppressDevWarnings();
}
- return isVisible;
+ return true;
}
static bool printMessagePreamble(MessageType t, std::ostream& msg)
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 5bf6a2b..25e00d3 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -29,7 +29,6 @@
#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
-#include "cmGlobalCommonGenerator.h"
#include "cmGlobalNinjaGenerator.h"
#include "cmList.h"
#include "cmLocalGenerator.h"
@@ -399,15 +398,15 @@ std::string cmNinjaTargetGenerator::GetObjectFilePath(
}
std::string cmNinjaTargetGenerator::GetClangTidyReplacementsFilePath(
- const std::string& directory, cmSourceFile const* source,
- const std::string& config) const
+ std::string const& directory, cmSourceFile const& source,
+ std::string const& config) const
{
- std::string path = this->LocalGenerator->GetHomeRelativeOutputPath();
+ auto path = this->LocalGenerator->GetHomeRelativeOutputPath();
if (!path.empty()) {
path += '/';
}
path = cmStrCat(directory, '/', path);
- std::string const& objectName = this->GeneratorTarget->GetObjectName(source);
+ auto const& objectName = this->GeneratorTarget->GetObjectName(&source);
path =
cmStrCat(std::move(path),
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget),
@@ -890,162 +889,9 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
const std::string& compileCmd = mf->GetRequiredDefinition(cmdVar);
cmList compileCmds(compileCmd);
- // See if we need to use a compiler launcher like ccache or distcc
- std::string compilerLauncher;
- if (!compileCmds.empty() &&
- (lang == "C" || lang == "CXX" || lang == "Fortran" || lang == "CUDA" ||
- lang == "HIP" || lang == "ISPC" || lang == "OBJC" ||
- lang == "OBJCXX")) {
- std::string const clauncher_prop = cmStrCat(lang, "_COMPILER_LAUNCHER");
- cmValue clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
- std::string evaluatedClauncher = cmGeneratorExpression::Evaluate(
- *clauncher, this->LocalGenerator, config, this->GeneratorTarget, nullptr,
- this->GeneratorTarget, lang);
- if (!evaluatedClauncher.empty()) {
- compilerLauncher = evaluatedClauncher;
- }
- }
-
- // Maybe insert an include-what-you-use runner.
- if (!compileCmds.empty() &&
- (lang == "C" || lang == "CXX" || lang == "OBJC" || lang == "OBJCXX")) {
- cmValue tidy = nullptr;
- cmValue iwyu = nullptr;
- cmValue cpplint = nullptr;
- cmValue cppcheck = nullptr;
- std::string evaluatedTIDY;
- std::string evaluatedIWYU;
- std::string evaluatedCPPlint;
- std::string evaluatedCPPcheck;
-
- std::string const tidy_prop = cmStrCat(lang, "_CLANG_TIDY");
- tidy = this->GeneratorTarget->GetProperty(tidy_prop);
- evaluatedTIDY = cmGeneratorExpression::Evaluate(
- *tidy, this->LocalGenerator, config, this->GeneratorTarget, nullptr,
- this->GeneratorTarget, lang);
- if (!evaluatedTIDY.empty()) {
- tidy = cmValue(&evaluatedTIDY);
- }
-
- if (lang == "C" || lang == "CXX") {
- std::string const iwyu_prop = cmStrCat(lang, "_INCLUDE_WHAT_YOU_USE");
- iwyu = this->GeneratorTarget->GetProperty(iwyu_prop);
- evaluatedIWYU = cmGeneratorExpression::Evaluate(
- *iwyu, this->LocalGenerator, config, this->GeneratorTarget, nullptr,
- this->GeneratorTarget, lang);
- if (!evaluatedIWYU.empty()) {
- iwyu = cmValue(&evaluatedIWYU);
- }
-
- std::string const cpplint_prop = cmStrCat(lang, "_CPPLINT");
- cpplint = this->GeneratorTarget->GetProperty(cpplint_prop);
- evaluatedCPPlint = cmGeneratorExpression::Evaluate(
- *cpplint, this->LocalGenerator, config, this->GeneratorTarget, nullptr,
- this->GeneratorTarget, lang);
- if (!evaluatedCPPlint.empty()) {
- cpplint = cmValue(&evaluatedCPPlint);
- }
-
- std::string const cppcheck_prop = cmStrCat(lang, "_CPPCHECK");
- cppcheck = this->GeneratorTarget->GetProperty(cppcheck_prop);
- evaluatedCPPcheck = cmGeneratorExpression::Evaluate(
- *cppcheck, this->LocalGenerator, config, this->GeneratorTarget,
- nullptr, this->GeneratorTarget, lang);
- if (!evaluatedCPPcheck.empty()) {
- cppcheck = cmValue(&evaluatedCPPcheck);
- }
- }
- if (cmNonempty(iwyu) || cmNonempty(tidy) || cmNonempty(cpplint) ||
- cmNonempty(cppcheck)) {
- std::string run_iwyu = cmStrCat(cmakeCmd, " -E __run_co_compile");
- if (!compilerLauncher.empty()) {
- // In __run_co_compile case the launcher command is supplied
- // via --launcher=<maybe-list> and consumed
- run_iwyu +=
- cmStrCat(" --launcher=",
- this->LocalGenerator->EscapeForShell(compilerLauncher));
- compilerLauncher.clear();
- }
- if (cmNonempty(iwyu)) {
- run_iwyu += " --iwyu=";
-
- // Only add --driver-mode if it is not already specified, as adding
- // it unconditionally might override a user-specified driver-mode
- if (iwyu.Get()->find("--driver-mode=") == std::string::npos) {
- cmValue p = this->Makefile->GetDefinition(
- cmStrCat("CMAKE_", lang, "_INCLUDE_WHAT_YOU_USE_DRIVER_MODE"));
- std::string driverMode;
-
- if (cmNonempty(p)) {
- driverMode = *p;
- } else {
- driverMode = lang == "C" ? "gcc" : "g++";
- }
-
- run_iwyu += this->LocalGenerator->EscapeForShell(
- cmStrCat(*iwyu, ";--driver-mode=", driverMode));
- } else {
- run_iwyu += this->LocalGenerator->EscapeForShell(*iwyu);
- }
- }
- if (cmNonempty(tidy)) {
- run_iwyu += " --tidy=";
- cmValue p = this->Makefile->GetDefinition(
- cmStrCat("CMAKE_", lang, "_CLANG_TIDY_DRIVER_MODE"));
- std::string driverMode;
- if (cmNonempty(p)) {
- driverMode = *p;
- } else {
- driverMode = lang == "C" ? "gcc" : "g++";
- }
- const bool haveClangTidyExportFixesDir =
- !this->GeneratorTarget->GetClangTidyExportFixesDirectory(lang)
- .empty();
- std::string exportFixes;
- if (haveClangTidyExportFixesDir) {
- exportFixes = ";--export-fixes=$CLANG_TIDY_EXPORT_FIXES";
- }
- run_iwyu += this->GetLocalGenerator()->EscapeForShell(
- cmStrCat(*tidy, ";--extra-arg-before=--driver-mode=", driverMode,
- exportFixes));
- if (haveClangTidyExportFixesDir) {
- std::string search = cmStrCat(
- this->GetLocalGenerator()->GetState()->UseWindowsShell() ? ""
- : "\\",
- "$$CLANG_TIDY_EXPORT_FIXES");
- auto loc = run_iwyu.rfind(search);
- run_iwyu.replace(loc, search.length(), "$CLANG_TIDY_EXPORT_FIXES");
- }
- }
- if (cmNonempty(cpplint)) {
- run_iwyu += cmStrCat(
- " --cpplint=", this->GetLocalGenerator()->EscapeForShell(*cpplint));
- }
- if (cmNonempty(cppcheck)) {
- run_iwyu +=
- cmStrCat(" --cppcheck=",
- this->GetLocalGenerator()->EscapeForShell(*cppcheck));
- }
- if (cmNonempty(tidy) || cmNonempty(cpplint) || cmNonempty(cppcheck)) {
- run_iwyu += " --source=$in";
- }
- run_iwyu += " -- ";
- compileCmds.front().insert(0, run_iwyu);
- }
- }
-
- // If compiler launcher was specified and not consumed above, it
- // goes to the beginning of the command line.
- if (!compileCmds.empty() && !compilerLauncher.empty()) {
- cmList args{ compilerLauncher, cmList::EmptyElements::Yes };
- if (!args.empty()) {
- args[0] = this->LocalGenerator->ConvertToOutputFormat(
- args[0], cmOutputConverter::SHELL);
- for (std::string& i : cmMakeRange(args.begin() + 1, args.end())) {
- i = this->LocalGenerator->EscapeForShell(i);
- }
- }
- compileCmds.front().insert(0, cmStrCat(args.join(" "), ' '));
+ if (!compileCmds.empty()) {
+ compileCmds.front().insert(0, "${CODE_CHECK}");
+ compileCmds.front().insert(0, "${LAUNCHER}");
}
if (!compileCmds.empty()) {
@@ -1374,6 +1220,33 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
vars["DEFINES"] = this->ComputeDefines(source, language, config);
vars["INCLUDES"] = this->ComputeIncludes(source, language, config);
+ auto compilerLauncher = this->GetCompilerLauncher(language, config);
+
+ cmValue const skipCodeCheck = source->GetProperty("SKIP_LINTING");
+ if (!skipCodeCheck.IsOn()) {
+ auto const cmakeCmd = this->GetLocalGenerator()->ConvertToOutputFormat(
+ cmSystemTools::GetCMakeCommand(), cmLocalGenerator::SHELL);
+ vars["CODE_CHECK"] =
+ this->GenerateCodeCheckRules(*source, compilerLauncher, cmakeCmd, config,
+ [this](const std::string& path) {
+ return this->ConvertToNinjaPath(path);
+ });
+ }
+
+ // If compiler launcher was specified and not consumed above, it
+ // goes to the beginning of the command line.
+ if (!compilerLauncher.empty()) {
+ cmList args{ compilerLauncher, cmList::EmptyElements::Yes };
+ if (!args.empty()) {
+ args[0] = this->LocalGenerator->ConvertToOutputFormat(
+ args[0], cmOutputConverter::SHELL);
+ for (std::string& i : cmMakeRange(args.begin() + 1, args.end())) {
+ i = this->LocalGenerator->EscapeForShell(i);
+ }
+ vars["LAUNCHER"] = args.join(" ") + " ";
+ }
+ }
+
if (this->GetMakefile()->GetSafeDefinition(
cmStrCat("CMAKE_", language, "_DEPFILE_FORMAT")) != "msvc"_s) {
bool replaceExt(false);
@@ -1397,18 +1270,6 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
}
}
- std::string d =
- this->GeneratorTarget->GetClangTidyExportFixesDirectory(language);
- if (!d.empty()) {
- this->GlobalCommonGenerator->AddClangTidyExportFixesDir(d);
- std::string fixesFile =
- this->GetClangTidyReplacementsFilePath(d, source, config);
- this->GlobalCommonGenerator->AddClangTidyExportFixesFile(fixesFile);
- cmSystemTools::MakeDirectory(cmSystemTools::GetFilenamePath(fixesFile));
- fixesFile = this->ConvertToNinjaPath(fixesFile);
- vars["CLANG_TIDY_EXPORT_FIXES"] = fixesFile;
- }
-
if (firstForConfig) {
this->ExportObjectCompileCommand(
language, sourceFilePath, objectDir, objectFileName, objectFileDir,
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index 8f4a764..8c38499 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -136,8 +136,8 @@ protected:
/// @return the clang-tidy replacements file path for the given @a source.
std::string GetClangTidyReplacementsFilePath(
- const std::string& directory, cmSourceFile const* source,
- const std::string& config) const;
+ std::string const& directory, cmSourceFile const& source,
+ std::string const& config) const override;
/// @return the dyndep file path for this target.
std::string GetDyndepFilePath(std::string const& lang,
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index d897f0e..76bb0cd 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -1834,6 +1834,7 @@ cmSourceFile* cmQtAutoGenInitializer::RegisterGeneratedSource(
cmSourceFile* gFile = this->Makefile->GetOrCreateSource(filename, true);
gFile->MarkAsGenerated();
gFile->SetProperty("SKIP_AUTOGEN", "1");
+ gFile->SetProperty("SKIP_LINTING", "ON");
return gFile;
}
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<std::string> {
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index f12f91f..bbafc92 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -101,11 +101,13 @@ cmStateEnums::CacheEntryType cmState::StringToCacheEntryType(
bool cmState::StringToCacheEntryType(const std::string& s,
cmStateEnums::CacheEntryType& type)
{
- for (size_t i = 0; i < cmCacheEntryTypes.size(); ++i) {
- if (s == cmCacheEntryTypes[i]) {
- type = static_cast<cmStateEnums::CacheEntryType>(i);
- return true;
- }
+ // NOLINTNEXTLINE(readability-qualified-auto)
+ auto const entry =
+ std::find(cmCacheEntryTypes.begin(), cmCacheEntryTypes.end(), s);
+ if (entry != cmCacheEntryTypes.end()) {
+ type = static_cast<cmStateEnums::CacheEntryType>(
+ entry - cmCacheEntryTypes.begin());
+ return true;
}
return false;
}
diff --git a/Source/cmString.cxx b/Source/cmString.cxx
index aefaa64..f7f6293 100644
--- a/Source/cmString.cxx
+++ b/Source/cmString.cxx
@@ -9,7 +9,6 @@
#include <ostream>
#include <stdexcept>
#include <string>
-#include <type_traits>
namespace cm {
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 7360bf5..6d62aff 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2802,7 +2802,14 @@ void cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
fs->GetType() == "CXX_MODULE_HEADER_UNITS"_s)) {
if (lang == "CXX"_s) {
if (fs->GetType() == "CXX_MODULES"_s) {
- compileAsPerConfig = "CompileAsCppModule";
+ if (shouldScanForModules &&
+ this->GlobalGenerator->IsScanDependenciesSupported()) {
+ // ScanSourceforModuleDependencies uses 'cl /scanDependencies' and
+ // can distinguish module interface units and internal partitions.
+ compileAsPerConfig = "CompileAsCpp";
+ } else {
+ compileAsPerConfig = "CompileAsCppModule";
+ }
} else {
compileAsPerConfig = "CompileAsHeaderUnit";
}
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 0fd7461..284c5e7 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2138,12 +2138,10 @@ int cmake::DoPreConfigureChecks()
std::string cacheStart =
cmStrCat(*this->State->GetInitializedCacheValue("CMAKE_HOME_DIRECTORY"),
"/CMakeLists.txt");
- std::string currentStart =
- cmStrCat(this->GetHomeDirectory(), "/CMakeLists.txt");
- if (!cmSystemTools::SameFile(cacheStart, currentStart)) {
+ if (!cmSystemTools::SameFile(cacheStart, srcList)) {
std::string message =
- cmStrCat("The source \"", currentStart,
- "\" does not match the source \"", cacheStart,
+ cmStrCat("The source \"", srcList, "\" does not match the source \"",
+ cacheStart,
"\" used to generate cache. Re-run cmake with a different "
"source directory.");
cmSystemTools::Error(message);
@@ -2371,16 +2369,16 @@ 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;
}
}
- if (!this->State->GetInitializedCacheValue("CMAKE_GENERATOR")) {
+ if (!genName) {
this->AddCacheEntry("CMAKE_GENERATOR", this->GlobalGenerator->GetName(),
"Name of generator.", cmStateEnums::INTERNAL);
this->AddCacheEntry(
@@ -2401,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;
}
@@ -2420,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;
@@ -2436,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/Source/kwsys/RegularExpression.cxx b/Source/kwsys/RegularExpression.cxx
index f2f5143..b51e16d 100644
--- a/Source/kwsys/RegularExpression.cxx
+++ b/Source/kwsys/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;
diff --git a/Tests/CMakeLib/testStringAlgorithms.cxx b/Tests/CMakeLib/testStringAlgorithms.cxx
index 1bb23df..78442ba 100644
--- a/Tests/CMakeLib/testStringAlgorithms.cxx
+++ b/Tests/CMakeLib/testStringAlgorithms.cxx
@@ -1,12 +1,11 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
-#include <cmConfigure.h> // IWYU pragma: keep
+#include "cmConfigure.h" // IWYU pragma: keep
#include <iostream>
#include <sstream>
#include <string>
-#include <type_traits>
#include <utility>
#include <vector>
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 2fa962e..5ef77fd 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -3310,18 +3310,20 @@ if(BUILD_TESTING)
endif()
endif()
- if(CMake_TEST_EXTERNAL_CMAKE)
- set(CMAKE_SKIP_BOOTSTRAP_TEST 1)
- endif()
- if("${CMAKE_GENERATOR}" MATCHES Xcode)
- set(CMAKE_SKIP_BOOTSTRAP_TEST 1)
- endif()
- if(EXISTS "${CMake_BINARY_DIR}/CMakeLists.txt")
- # If there is CMakeLists.txt in the binary tree, assume in-source build
- set(CMAKE_SKIP_BOOTSTRAP_TEST 1)
+ if(NOT DEFINED CMake_TEST_BOOTSTRAP)
+ if(CMAKE_RUN_LONG_TESTS
+ AND NOT CMAKE_SKIP_BOOTSTRAP_TEST
+ AND NOT CMake_TEST_EXTERNAL_CMAKE
+ AND NOT CMAKE_GENERATOR MATCHES "Xcode"
+ AND NOT EXISTS "${CMake_BINARY_DIR}/CMakeLists.txt"
+ )
+ set(CMake_TEST_BOOTSTRAP 1)
+ else()
+ set(CMake_TEST_BOOTSTRAP 0)
+ endif()
endif()
set(bootstrap "")
- if(CMAKE_RUN_LONG_TESTS AND NOT CMAKE_SKIP_BOOTSTRAP_TEST)
+ if(CMake_TEST_BOOTSTRAP)
if(UNIX)
set(bootstrap ${CMake_SOURCE_DIR}/bootstrap)
elseif(MSYS)
@@ -3340,13 +3342,12 @@ if(BUILD_TESTING)
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BootstrapTest")
# This test will use all processors.
- set_tests_properties(BootstrapTest PROPERTIES RUN_SERIAL 1)
-
- # provide more time for the bootstrap test
- get_test_property(BootstrapTest TIMEOUT PREVIOUS_TIMEOUT)
- if("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
- set_tests_properties(BootstrapTest PROPERTIES TIMEOUT 5400)
+ set_property(TEST BootstrapTest PROPERTY RUN_SERIAL 1)
+ # This test may take a long time.
+ if(NOT DEFINED CMake_TEST_BOOTSTRAP_TIMEOUT)
+ set(CMake_TEST_BOOTSTRAP_TIMEOUT 5400)
endif()
+ set_property(TEST BootstrapTest PROPERTY TIMEOUT "${CMake_TEST_BOOTSTRAP_TIMEOUT}")
endif()
if(CMAKE_Fortran_COMPILER)
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;
}
diff --git a/Tests/ISPC/ChainedStaticLibraries/CMakeLists.txt b/Tests/ISPC/ChainedStaticLibraries/CMakeLists.txt
index 9a255a0..a09f638 100644
--- a/Tests/ISPC/ChainedStaticLibraries/CMakeLists.txt
+++ b/Tests/ISPC/ChainedStaticLibraries/CMakeLists.txt
@@ -11,10 +11,15 @@ add_library(ispc_objects1 STATIC extra.ispc extra.cxx)
add_library(ispc_objects2 STATIC simple.ispc)
set_target_properties(ispc_objects1 PROPERTIES POSITION_INDEPENDENT_CODE ON)
-set_target_properties(ispc_objects1 PROPERTIES ISPC_INSTRUCTION_SETS "sse2-i32x4;avx1-i32x16;avx2-i32x4")
-
set_target_properties(ispc_objects2 PROPERTIES POSITION_INDEPENDENT_CODE ON)
-set_target_properties(ispc_objects2 PROPERTIES ISPC_INSTRUCTION_SETS "sse2-i32x4")
+
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ set_property(TARGET ispc_objects1 PROPERTY ISPC_INSTRUCTION_SETS "neon-i32x4")
+ set_property(TARGET ispc_objects2 PROPERTY ISPC_INSTRUCTION_SETS "neon-i32x4")
+else()
+ set_property(TARGET ispc_objects1 PROPERTY ISPC_INSTRUCTION_SETS "sse2-i32x4;avx1-i32x16;avx2-i32x4")
+ set_property(TARGET ispc_objects2 PROPERTY ISPC_INSTRUCTION_SETS "sse2-i32x4")
+endif()
target_link_libraries(ispc_objects2 PRIVATE ispc_objects1)
diff --git a/Tests/ISPC/CustomHeaderSuffix/CMakeLists.txt b/Tests/ISPC/CustomHeaderSuffix/CMakeLists.txt
index d20f88e..4cf5ca1 100644
--- a/Tests/ISPC/CustomHeaderSuffix/CMakeLists.txt
+++ b/Tests/ISPC/CustomHeaderSuffix/CMakeLists.txt
@@ -6,7 +6,11 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(CMAKE_ISPC_FLAGS "--arch=x86")
endif()
-set(CMAKE_ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i8x16")
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ set(CMAKE_ISPC_INSTRUCTION_SETS "neon-i32x4")
+else()
+ set(CMAKE_ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i8x16")
+endif()
set(CMAKE_ISPC_HEADER_SUFFIX ".ispc.h")
diff --git a/Tests/ISPC/Defines/CMakeLists.txt b/Tests/ISPC/Defines/CMakeLists.txt
index 7645804..2b99469 100644
--- a/Tests/ISPC/Defines/CMakeLists.txt
+++ b/Tests/ISPC/Defines/CMakeLists.txt
@@ -1,7 +1,12 @@
cmake_minimum_required(VERSION 3.18)
project(ISPCDefines CXX ISPC)
-set(CMAKE_ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i16x8;avx1-i32x16;avx2-i32x4;avx512knl-i32x16;avx512skx-i32x8")
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ set(CMAKE_ISPC_INSTRUCTION_SETS "neon-i32x4")
+else()
+ set(CMAKE_ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i16x8;avx1-i32x16;avx2-i32x4;avx512knl-i32x16;avx512skx-i32x8")
+endif()
+
set(CMAKE_ISPC_FLAGS -DM_PI=3.1415926535f)
add_compile_definitions([==[STRUCT_DEFINE=struct{uniform int a]==])
diff --git a/Tests/ISPC/DynamicLibrary/CMakeLists.txt b/Tests/ISPC/DynamicLibrary/CMakeLists.txt
index 4655090..516cdc1 100644
--- a/Tests/ISPC/DynamicLibrary/CMakeLists.txt
+++ b/Tests/ISPC/DynamicLibrary/CMakeLists.txt
@@ -13,8 +13,13 @@ target_sources(ispc_objects2 PRIVATE simple.cxx)
set_target_properties(ispc_objects1 PROPERTIES POSITION_INDEPENDENT_CODE ON)
-set_target_properties(ispc_objects1 PROPERTIES ISPC_INSTRUCTION_SETS "sse2-i32x4;avx1-i32x16;avx2-i32x4")
-set_target_properties(ispc_objects2 PROPERTIES ISPC_INSTRUCTION_SETS "sse2-i32x4")
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ set_property(TARGET ispc_objects1 PROPERTY ISPC_INSTRUCTION_SETS "neon-i32x4")
+ set_property(TARGET ispc_objects2 PROPERTY ISPC_INSTRUCTION_SETS "neon-i32x4")
+else()
+ set_property(TARGET ispc_objects1 PROPERTY ISPC_INSTRUCTION_SETS "sse2-i32x4;avx1-i32x16;avx2-i32x4")
+ set_property(TARGET ispc_objects2 PROPERTY ISPC_INSTRUCTION_SETS "sse2-i32x4")
+endif()
target_link_libraries(ispc_objects2 PUBLIC ispc_objects1)
diff --git a/Tests/ISPC/ObjectGenex/CMakeLists.txt b/Tests/ISPC/ObjectGenex/CMakeLists.txt
index bc0cbf6..5e64004 100644
--- a/Tests/ISPC/ObjectGenex/CMakeLists.txt
+++ b/Tests/ISPC/ObjectGenex/CMakeLists.txt
@@ -1,7 +1,14 @@
cmake_minimum_required(VERSION 3.18)
project(ISPCObjectGenex CXX ISPC)
-set(CMAKE_ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i16x8;avx1-i32x16;avx2-i32x4;avx512knl-i32x16;avx512skx-i32x8")
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ set(CMAKE_ISPC_INSTRUCTION_SETS "neon-i32x4")
+ set(numberOfTargets 1)
+else()
+ set(CMAKE_ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i16x8;avx1-i32x16;avx2-i32x4;avx512knl-i32x16;avx512skx-i32x8")
+ list(LENGTH CMAKE_ISPC_INSTRUCTION_SETS numberOfTargets)
+ math(EXPR numberOfTargets "${numberOfTargets}+1")
+endif()
add_library(ispc_objects OBJECT
simple.ispc
@@ -35,8 +42,6 @@ static std::string obj_paths = "$<TARGET_OBJECTS:ispc_objects>";
add_executable(ISPCObjectGenex main.cxx)
add_dependencies(ISPCObjectGenex ispc_objects)
-list(LENGTH CMAKE_ISPC_INSTRUCTION_SETS numberOfTargets)
-math(EXPR numberOfTargets "${numberOfTargets}+1")
target_compile_definitions(ISPCObjectGenex PRIVATE
"ExpectedISPCObjects=${numberOfTargets}"
"CONFIG_TYPE=gen_$<LOWER_CASE:$<CONFIG>>"
diff --git a/Tests/ISPC/ObjectLibrary/CMakeLists.txt b/Tests/ISPC/ObjectLibrary/CMakeLists.txt
index a4c81a9..60ce920 100644
--- a/Tests/ISPC/ObjectLibrary/CMakeLists.txt
+++ b/Tests/ISPC/ObjectLibrary/CMakeLists.txt
@@ -11,8 +11,12 @@ endif()
add_library(ispc_objects OBJECT simple.ispc subdir/extra.ispc)
set_target_properties(ispc_objects PROPERTIES POSITION_INDEPENDENT_CODE ON)
-set_target_properties(ispc_objects PROPERTIES ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i8x16")
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ set_property(TARGET ispc_objects PROPERTY ISPC_INSTRUCTION_SETS "neon-i32x4")
+else()
+ set_property(TARGET ispc_objects PROPERTY ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i8x16")
+endif()
add_executable(ISPCObjectLibrary main.cxx extra.cxx)
target_link_libraries(ISPCObjectLibrary PRIVATE ispc_objects)
diff --git a/Tests/ISPC/ResponseAndDefine/CMakeLists.txt b/Tests/ISPC/ResponseAndDefine/CMakeLists.txt
index 7539209..d29cb2a 100644
--- a/Tests/ISPC/ResponseAndDefine/CMakeLists.txt
+++ b/Tests/ISPC/ResponseAndDefine/CMakeLists.txt
@@ -14,13 +14,15 @@ add_executable(ISPCResponseAndDefine main.cxx simple.ispc)
set_target_properties(ISPCResponseAndDefine PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(ISPCResponseAndDefine PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
-target_compile_options(ISPCResponseAndDefine PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>")
-if(CMAKE_SIZEOF_VOID_P EQUAL 4)
- target_compile_options(ISPCResponseAndDefine PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--arch=x86>")
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ target_compile_options(ISPCResponseAndDefine PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=neon-i32x4>")
+else()
+ target_compile_options(ISPCResponseAndDefine PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>")
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ target_compile_options(ISPCResponseAndDefine PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--arch=x86>")
+ endif()
endif()
-
-
target_compile_definitions(ISPCResponseAndDefine PRIVATE
"$<$<COMPILE_LANGUAGE:ISPC>:STRUCT_DEFINE=struct{uniform int a>;M_PI=3.14159f")
target_include_directories(ISPCResponseAndDefine PRIVATE
diff --git a/Tests/ISPC/StaticLibrary/CMakeLists.txt b/Tests/ISPC/StaticLibrary/CMakeLists.txt
index ebe5960..76f78e5 100644
--- a/Tests/ISPC/StaticLibrary/CMakeLists.txt
+++ b/Tests/ISPC/StaticLibrary/CMakeLists.txt
@@ -4,9 +4,13 @@ project(ISPCStaticLibrary CXX ISPC)
add_library(ispc_objects STATIC simple.ispc)
-target_compile_options(ispc_objects PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>")
-if(CMAKE_SIZEOF_VOID_P EQUAL 4)
- target_compile_options(ispc_objects PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--arch=x86>")
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ target_compile_options(ispc_objects PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=neon-i32x4>")
+else()
+ target_compile_options(ispc_objects PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>")
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ target_compile_options(ispc_objects PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--arch=x86>")
+ endif()
endif()
set_target_properties(ispc_objects PROPERTIES POSITION_INDEPENDENT_CODE ON)
diff --git a/Tests/ISPC/SystemIncludes/CMakeLists.txt b/Tests/ISPC/SystemIncludes/CMakeLists.txt
index d94e75e..3b4c289 100644
--- a/Tests/ISPC/SystemIncludes/CMakeLists.txt
+++ b/Tests/ISPC/SystemIncludes/CMakeLists.txt
@@ -7,8 +7,11 @@ set_target_properties(ISPCSystemIncludes PROPERTIES POSITION_INDEPENDENT_CODE ON
set_target_properties(ISPCSystemIncludes PROPERTIES ISPC_HEADER_SUFFIX ".ispc.h")
target_include_directories(ISPCSystemIncludes SYSTEM PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
-
-target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>")
-if(CMAKE_SIZEOF_VOID_P EQUAL 4)
- target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--arch=x86>")
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=neon-i32x4>")
+else()
+ target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>")
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--arch=x86>")
+ endif()
endif()
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/QtAutogen/AutoMocGeneratedFile/CMakeLists.txt b/Tests/QtAutogen/AutoMocGeneratedFile/CMakeLists.txt
new file mode 100644
index 0000000..ce129a9
--- /dev/null
+++ b/Tests/QtAutogen/AutoMocGeneratedFile/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 3.26)
+project(AutoMocGeneratedFile)
+
+include("../AutogenCoreTest.cmake")
+
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/myConfig.h
+ CONTENT
+ "
+#ifndef MYCONFIG_H
+#define MYCONFIG_H
+
+inline void foo() {}
+
+#endif
+
+"
+)
+
+add_executable(testTarget
+ main.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/myConfig.h)
+target_include_directories(testTarget PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+set_property(TARGET testTarget PROPERTY AUTOMOC ON)
diff --git a/Tests/QtAutogen/AutoMocGeneratedFile/main.cpp b/Tests/QtAutogen/AutoMocGeneratedFile/main.cpp
new file mode 100644
index 0000000..e30d889
--- /dev/null
+++ b/Tests/QtAutogen/AutoMocGeneratedFile/main.cpp
@@ -0,0 +1,7 @@
+#include "myConfig.h"
+
+int main()
+{
+ foo();
+ return 0;
+}
diff --git a/Tests/QtAutogen/Tests.cmake b/Tests/QtAutogen/Tests.cmake
index 3e4f04d..7dd9c84 100644
--- a/Tests/QtAutogen/Tests.cmake
+++ b/Tests/QtAutogen/Tests.cmake
@@ -2,6 +2,7 @@
ADD_AUTOGEN_TEST(AutogenOriginDependsOff autogenOriginDependsOff)
ADD_AUTOGEN_TEST(AutogenOriginDependsOn)
ADD_AUTOGEN_TEST(AutogenTargetDepends)
+ADD_AUTOGEN_TEST(AutoMocGeneratedFile)
ADD_AUTOGEN_TEST(Complex QtAutogen)
ADD_AUTOGEN_TEST(GlobalAutogenSystemUseInclude)
ADD_AUTOGEN_TEST(GlobalAutogenTarget)
diff --git a/Tests/RunCMake/Autogen/AutogenSkipLinting-build-stderr.txt b/Tests/RunCMake/Autogen/AutogenSkipLinting-build-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/Autogen/AutogenSkipLinting-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/Autogen/AutogenSkipLinting.cmake b/Tests/RunCMake/Autogen/AutogenSkipLinting.cmake
new file mode 100644
index 0000000..3ce2092
--- /dev/null
+++ b/Tests/RunCMake/Autogen/AutogenSkipLinting.cmake
@@ -0,0 +1,16 @@
+enable_language(CXX)
+
+find_package(Qt${with_qt_version} REQUIRED COMPONENTS Core Widgets Gui)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "$<1:${PSEUDO_IWYU}>" -some -args)
+set(CMAKE_CXX_CLANG_TIDY "$<1:${PSEUDO_TIDY}>" -bad)
+set(CMAKE_CXX_CPPLINT "$<1:${PSEUDO_CPPLINT}>" --error)
+set(CMAKE_CXX_CPPCHECK "$<1:${PSEUDO_CPPCHECK}>" -error)
+
+add_executable(SkipLinting SkipLinting.cxx SkipLinting.h)
+set_source_files_properties(SkipLinting.cxx PROPERTIES SKIP_LINTING TRUE)
+
+target_link_libraries(SkipLinting Qt${with_qt_version}::Core
+ Qt${with_qt_version}::Widgets
+ Qt${with_qt_version}::Gui)
diff --git a/Tests/RunCMake/Autogen/RunCMakeTest.cmake b/Tests/RunCMake/Autogen/RunCMakeTest.cmake
index 4505132..97b64ed 100644
--- a/Tests/RunCMake/Autogen/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Autogen/RunCMakeTest.cmake
@@ -87,5 +87,20 @@ if (DEFINED with_qt_version)
message(STATUS "RunCMake_TEST_EXPECT_stdout: ${RunCMake_TEST_EXPECT_stdout}")
run_cmake_command(AutogenUseSystemIncludeOff ${CMAKE_COMMAND} --build . --config Debug --verbose)
endblock()
+
+ if(RunCMake_GENERATOR MATCHES "Make|Ninja")
+ block()
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/AutogenSkipLinting-build)
+ list(APPEND RunCMake_TEST_OPTIONS
+ "-DPSEUDO_CPPCHECK=${PSEUDO_CPPCHECK}"
+ "-DPSEUDO_CPPLINT=${PSEUDO_CPPLINT}"
+ "-DPSEUDO_IWYU=${PSEUDO_IWYU}"
+ "-DPSEUDO_TIDY=${PSEUDO_TIDY}")
+
+ run_cmake(AutogenSkipLinting)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(AutogenSkipLinting-build ${CMAKE_COMMAND} --build . --config Debug --verbose)
+ endblock()
+ endif()
endif()
endif ()
diff --git a/Tests/RunCMake/Autogen/SkipLinting.cxx b/Tests/RunCMake/Autogen/SkipLinting.cxx
new file mode 100644
index 0000000..9e09b27
--- /dev/null
+++ b/Tests/RunCMake/Autogen/SkipLinting.cxx
@@ -0,0 +1,6 @@
+#include "SkipLinting.h"
+
+int main()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/Autogen/SkipLinting.h b/Tests/RunCMake/Autogen/SkipLinting.h
new file mode 100644
index 0000000..def56a0
--- /dev/null
+++ b/Tests/RunCMake/Autogen/SkipLinting.h
@@ -0,0 +1,11 @@
+#ifndef SKIP_LINTING_H
+#define SKIP_LINTING_H
+
+#include <QObject>
+
+class SkipMe : public QObject
+{
+ Q_OBJECT
+};
+
+#endif
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 75f2d35..3997a74 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -266,6 +266,10 @@ if(CMake_TEST_Qt6 AND Qt6Widgets_FOUND)
-Dwith_qt_version=6
"-DQt6_DIR:PATH=${Qt6_DIR}"
"-DCMAKE_PREFIX_PATH:STRING=${base_dir}"
+ -DPSEUDO_TIDY=$<TARGET_FILE:pseudo_tidy>
+ -DPSEUDO_IWYU=$<TARGET_FILE:pseudo_iwyu>
+ -DPSEUDO_CPPLINT=$<TARGET_FILE:pseudo_cpplint>
+ -DPSEUDO_CPPCHECK=$<TARGET_FILE:pseudo_cppcheck>
)
set(want_NoQt_test FALSE)
endif ()
@@ -672,7 +676,9 @@ endif()
if(XCODE_VERSION)
add_RunCMake_test(XcodeProject -DXCODE_VERSION=${XCODE_VERSION}
+ -DCMAKE_HOST_SYSTEM_PROCESSOR=${CMAKE_HOST_SYSTEM_PROCESSOR}
-DCMake_TEST_Swift=${CMake_TEST_Swift})
+ add_RunCMake_test(XcodeProject-Device -DXCODE_VERSION=${XCODE_VERSION})
add_RunCMake_test(XcodeProject-Embed -DXCODE_VERSION=${XCODE_VERSION})
# This test can take a very long time due to lots of combinations.
@@ -790,6 +796,7 @@ endif()
add_RunCMake_test(install -DNO_NAMELINK=${NO_NAMELINK} -DCYGWIN=${CYGWIN} -DMSYS=${MSYS}
-DCMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN=${CMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN}
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
+ -DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}
-DCMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG=${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}
-DCMAKE_EXECUTABLE_FORMAT=${CMAKE_EXECUTABLE_FORMAT}
-DCMake_TEST_ISPC=${CMake_TEST_ISPC}
diff --git a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
index c1129ca..b088724 100644
--- a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
@@ -155,6 +155,9 @@ endif ()
# Tests which require collation work.
if ("collation" IN_LIST CMake_TEST_MODULE_COMPILATION)
run_cxx_module_test(public-req-private)
+ set(RunCMake_CXXModules_NO_TEST 1)
+ run_cxx_module_test(req-private-other-target)
+ unset(RunCMake_CXXModules_NO_TEST)
endif ()
# Tests which use named modules in shared libraries.
diff --git a/Tests/RunCMake/CXXModules/examples/req-private-other-target-build-result.txt b/Tests/RunCMake/CXXModules/examples/req-private-other-target-build-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CXXModules/examples/req-private-other-target-build-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CXXModules/examples/req-private-other-target-build-stdout.txt b/Tests/RunCMake/CXXModules/examples/req-private-other-target-build-stdout.txt
new file mode 100644
index 0000000..912c2e9
--- /dev/null
+++ b/Tests/RunCMake/CXXModules/examples/req-private-other-target-build-stdout.txt
@@ -0,0 +1 @@
+((Ninja generators)?(Unable to use module 'lib.priv' as it is 'PRIVATE' and therefore not accessible outside of its owning target.))
diff --git a/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt b/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt
new file mode 100644
index 0000000..5e4392a
--- /dev/null
+++ b/Tests/RunCMake/CXXModules/examples/req-private-other-target-stderr.txt
@@ -0,0 +1,9 @@
+CMake Warning \(dev\) at CMakeLists.txt:7 \(target_sources\):
+ CMake's C\+\+ module support is experimental. It is meant only for
+ experimentation and feedback to CMake developers.
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Warning \(dev\):
+ C\+\+20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is
+ experimental. It is meant only for compiler developers to try.
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CXXModules/examples/req-private-other-target/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/req-private-other-target/CMakeLists.txt
new file mode 100644
index 0000000..910c515
--- /dev/null
+++ b/Tests/RunCMake/CXXModules/examples/req-private-other-target/CMakeLists.txt
@@ -0,0 +1,16 @@
+cmake_minimum_required(VERSION 3.26)
+project(req_private_other_target CXX)
+
+include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake")
+
+add_library(lib)
+target_sources(lib
+ PUBLIC FILE_SET pub TYPE CXX_MODULES FILES lib.cxx
+ PRIVATE FILE_SET priv TYPE CXX_MODULES FILES priv.cxx
+)
+target_compile_features(lib PUBLIC cxx_std_20)
+
+add_executable(exe main.cxx)
+target_link_libraries(exe PRIVATE lib)
+
+add_test(NAME exe COMMAND exe)
diff --git a/Tests/RunCMake/CXXModules/examples/req-private-other-target/lib.cxx b/Tests/RunCMake/CXXModules/examples/req-private-other-target/lib.cxx
new file mode 100644
index 0000000..066c2e1
--- /dev/null
+++ b/Tests/RunCMake/CXXModules/examples/req-private-other-target/lib.cxx
@@ -0,0 +1 @@
+export module lib;
diff --git a/Tests/RunCMake/CXXModules/examples/req-private-other-target/main.cxx b/Tests/RunCMake/CXXModules/examples/req-private-other-target/main.cxx
new file mode 100644
index 0000000..08b08ff
--- /dev/null
+++ b/Tests/RunCMake/CXXModules/examples/req-private-other-target/main.cxx
@@ -0,0 +1,7 @@
+import lib;
+import lib.priv;
+
+int main(int argc, char const* argv[])
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/CXXModules/examples/req-private-other-target/priv.cxx b/Tests/RunCMake/CXXModules/examples/req-private-other-target/priv.cxx
new file mode 100644
index 0000000..a7cad3b
--- /dev/null
+++ b/Tests/RunCMake/CXXModules/examples/req-private-other-target/priv.cxx
@@ -0,0 +1 @@
+export module lib.priv;
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/CommandLine/E_capabilities-stdout.txt b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
index 597dbd4..e2f63cd 100644
--- a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
+++ b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
@@ -1 +1 @@
-^{"fileApi":{"requests":\[{"kind":"codemodel","version":\[{"major":2,"minor":5}]},{"kind":"configureLog","version":\[{"major":1,"minor":0}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":0}]},{"kind":"toolchains","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":false,"tls":(true|false),"version":{.*}}$
+^{"fileApi":{"requests":\[{"kind":"codemodel","version":\[{"major":2,"minor":6}]},{"kind":"configureLog","version":\[{"major":1,"minor":0}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":0}]},{"kind":"toolchains","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":false,"tls":(true|false),"version":{.*}}$
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_<LANG>_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/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
index eb52975..b669543 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
@@ -12,7 +12,7 @@ def read_codemodel_json_data(filename):
def check_objects(o, g):
assert is_list(o)
assert len(o) == 1
- check_index_object(o[0], "codemodel", 2, 5, check_object_codemodel(g))
+ check_index_object(o[0], "codemodel", 2, 6, check_object_codemodel(g))
def check_backtrace(t, b, backtrace):
btg = t["backtraceGraph"]
@@ -578,6 +578,30 @@ def check_target(c):
missing_exception=lambda e: "Include path: %s" % e["path"],
extra_exception=lambda a: "Include path: %s" % a["path"])
+ if expected["frameworks"] is not None:
+ expected_keys.append("frameworks")
+
+ def check_include(actual, expected):
+ assert is_dict(actual)
+ expected_keys = ["path"]
+
+ if expected["isSystem"] is not None:
+ expected_keys.append("isSystem")
+ assert is_bool(actual["isSystem"], expected["isSystem"])
+
+ if expected["backtrace"] is not None:
+ expected_keys.append("backtrace")
+ check_backtrace(obj, actual["backtrace"], expected["backtrace"])
+
+ assert sorted(actual.keys()) == sorted(expected_keys)
+
+ check_list_match(lambda a, e: matches(a["path"], e["path"]),
+ actual["frameworks"], expected["frameworks"],
+ check=check_include,
+ check_exception=lambda a, e: "Framework path: %s" % a["path"],
+ missing_exception=lambda e: "Framework path: %s" % e["path"],
+ extra_exception=lambda a: "Framework path: %s" % a["path"])
+
if "precompileHeaders" in expected:
expected_keys.append("precompileHeaders")
@@ -693,6 +717,7 @@ def gen_check_directories(c, g):
read_codemodel_json_data("directories/external.json"),
read_codemodel_json_data("directories/fileset.json"),
read_codemodel_json_data("directories/subdir.json"),
+ read_codemodel_json_data("directories/framework.json"),
]
if matches(g["name"], "^Visual Studio "):
@@ -776,6 +801,12 @@ def gen_check_targets(c, g, inSource):
read_codemodel_json_data("targets/cxx_object_lib.json"),
read_codemodel_json_data("targets/cxx_object_exe.json"),
+ read_codemodel_json_data("targets/all_build_framework.json"),
+ read_codemodel_json_data("targets/zero_check_framework.json"),
+ read_codemodel_json_data("targets/static_framework.json"),
+ read_codemodel_json_data("targets/shared_framework.json"),
+ read_codemodel_json_data("targets/exe_framework.json"),
+
read_codemodel_json_data("targets/all_build_imported.json"),
read_codemodel_json_data("targets/zero_check_imported.json"),
read_codemodel_json_data("targets/link_imported_exe.json"),
@@ -800,6 +831,21 @@ def gen_check_targets(c, g, inSource):
read_codemodel_json_data("targets/c_headers_2.json"),
]
+ if sys.platform == "darwin":
+ for e in expected:
+ if e["name"] == "static_framework":
+ apple_static_framework = read_codemodel_json_data("targets/apple_static_framework.json")
+ e["artifacts"] = apple_static_framework["artifacts"]
+ e["nameOnDisk"] = apple_static_framework["nameOnDisk"]
+ elif e["name"] == "shared_framework":
+ apple_shared_framework = read_codemodel_json_data("targets/apple_shared_framework.json")
+ e["artifacts"] = apple_shared_framework["artifacts"]
+ e["nameOnDisk"] = apple_shared_framework["nameOnDisk"]
+ elif e["name"] == "exe_framework":
+ apple_exe_framework = read_codemodel_json_data("targets/apple_exe_framework.json")
+ e["compileGroups"] = apple_exe_framework["compileGroups"]
+ e["link"] = apple_exe_framework["link"]
+
if cxx_compiler_id in ['Clang', 'AppleClang', 'LCC', 'GNU', 'Intel', 'IntelLLVM', 'MSVC', 'Embarcadero', 'IBMClang'] and g["name"] != "Xcode":
for e in expected:
if e["name"] == "cxx_exe":
@@ -926,6 +972,21 @@ def gen_check_targets(c, g, inSource):
],
},
{
+ "path": "^framework/CMakeLists\\.txt$",
+ "isGenerated": None,
+ "fileSetName": None,
+ "sourceGroupName": "",
+ "compileGroupLanguage": None,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": None,
+ "command": None,
+ "hasParent": False,
+ },
+ ],
+ },
+ {
"path": "^dir/CMakeLists\\.txt$",
"isGenerated": None,
"fileSetName": None,
@@ -1070,6 +1131,7 @@ def gen_check_targets(c, g, inSource):
"^codemodel-v2\\.cmake$",
"^custom/CMakeLists\\.txt$",
"^cxx/CMakeLists\\.txt$",
+ "^framework/CMakeLists\\.txt$",
"^dir/CMakeLists\\.txt$",
"^dir/dir/CMakeLists\\.txt$",
"^fileset/CMakeLists\\.txt$",
@@ -1144,6 +1206,7 @@ def gen_check_projects(c, g):
read_codemodel_json_data("projects/interface.json"),
read_codemodel_json_data("projects/custom.json"),
read_codemodel_json_data("projects/external.json"),
+ read_codemodel_json_data("projects/framework.json"),
]
if matches(g["name"], "^Visual Studio "):
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/framework.json
new file mode 100644
index 0000000..3affc02
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/framework.json
@@ -0,0 +1,17 @@
+{
+ "source": "^framework$",
+ "build": "^framework$",
+ "parentSource": "^\\.$",
+ "childSources": null,
+ "targetIds": [
+ "^ALL_BUILD::@217a96c3a62328a73ef4$",
+ "^ZERO_CHECK::@217a96c3a62328a73ef4$",
+ "^shared_framework::@217a96c3a62328a73ef4$",
+ "^static_framework::@217a96c3a62328a73ef4$",
+ "^exe_framework::@217a96c3a62328a73ef4$"
+ ],
+ "projectName": "Framework",
+ "minimumCMakeVersion": "3.13",
+ "hasInstallRule": null,
+ "installers": []
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
index aed07e2..a35d5e2 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
@@ -12,7 +12,8 @@
"^.*/Tests/RunCMake/FileAPIExternalSource$",
"^dir$",
"^fileset$",
- "^subdir$"
+ "^subdir$",
+ "^framework$"
],
"targetIds": [
"^ALL_BUILD::@6890427a1f51a3e7e1df$",
@@ -50,7 +51,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 42,
+ "line": 43,
"command": "install",
"hasParent": true
},
@@ -95,7 +96,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 45,
+ "line": 46,
"command": "install",
"hasParent": true
},
@@ -143,7 +144,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 45,
+ "line": 46,
"command": "install",
"hasParent": true
},
@@ -188,7 +189,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 45,
+ "line": 46,
"command": "install",
"hasParent": true
},
@@ -232,7 +233,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 45,
+ "line": 46,
"command": "install",
"hasParent": true
},
@@ -276,7 +277,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 50,
+ "line": 51,
"command": "install",
"hasParent": true
},
@@ -323,7 +324,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 52,
+ "line": 53,
"command": "install",
"hasParent": true
},
@@ -368,7 +369,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 53,
+ "line": 54,
"command": "install",
"hasParent": true
},
@@ -417,7 +418,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 54,
+ "line": 55,
"command": "install",
"hasParent": true
},
@@ -469,7 +470,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 55,
+ "line": 56,
"command": "install",
"hasParent": true
},
@@ -518,7 +519,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 56,
+ "line": 57,
"command": "install",
"hasParent": true
},
@@ -560,7 +561,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 57,
+ "line": 58,
"command": "install",
"hasParent": true
},
@@ -602,7 +603,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 58,
+ "line": 59,
"command": "install",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json
index 151c0a8..8d2712d 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json
@@ -8,7 +8,8 @@
"Imported",
"Interface",
"Object",
- "External"
+ "External",
+ "Framework"
],
"directorySources": [
"^\\.$",
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/framework.json
new file mode 100644
index 0000000..259ead1
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/framework.json
@@ -0,0 +1,15 @@
+{
+ "name": "Framework",
+ "parentName": "codemodel-v2",
+ "childNames": null,
+ "directorySources": [
+ "^framework$"
+ ],
+ "targetIds": [
+ "^ALL_BUILD::@217a96c3a62328a73ef4$",
+ "^ZERO_CHECK::@217a96c3a62328a73ef4$",
+ "^shared_framework::@217a96c3a62328a73ef4$",
+ "^static_framework::@217a96c3a62328a73ef4$",
+ "^exe_framework::@217a96c3a62328a73ef4$"
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_framework.json
new file mode 100644
index 0000000..a4d806a
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_framework.json
@@ -0,0 +1,90 @@
+{
+ "name": "ALL_BUILD",
+ "id": "^ALL_BUILD::@217a96c3a62328a73ef4$",
+ "directorySource": "^framework$",
+ "projectName": "Framework",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "fileSets": null,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/framework/CMakeFiles/ALL_BUILD$",
+ "isGenerated": true,
+ "fileSetName": null,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/framework/CMakeFiles/ALL_BUILD\\.rule$",
+ "isGenerated": true,
+ "fileSetName": null,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/framework/CMakeFiles/ALL_BUILD$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/framework/CMakeFiles/ALL_BUILD\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^framework$",
+ "source": "^framework$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@217a96c3a62328a73ef4$",
+ "backtrace": null
+ },
+ {
+ "id": "^shared_framework::@217a96c3a62328a73ef4$",
+ "backtrace": null
+ },
+ {
+ "id": "^static_framework::@217a96c3a62328a73ef4$",
+ "backtrace": null
+ },
+ {
+ "id": "^exe_framework::@217a96c3a62328a73ef4$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
index 46495ac..9d0007f 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
@@ -201,6 +201,18 @@
{
"id": "^c_headers_2::@6b8db101d64c125f29fe$",
"backtrace": null
+ },
+ {
+ "id": "^static_framework::@217a96c3a62328a73ef4$",
+ "backtrace": null
+ },
+ {
+ "id": "^shared_framework::@217a96c3a62328a73ef4$",
+ "backtrace": null
+ },
+ {
+ "id": "^exe_framework::@217a96c3a62328a73ef4$",
+ "backtrace": null
}
]
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_exe_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_exe_framework.json
new file mode 100644
index 0000000..6d320f4
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_exe_framework.json
@@ -0,0 +1,79 @@
+{
+ "compileGroups":
+ [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "frameworks":
+ [
+ {
+ "isSystem": null,
+ "path": "^.*/framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?static_framework.framework",
+ "backtrace": null
+ },
+ {
+ "isSystem": true,
+ "path": "^.+/framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?shared_framework.framework",
+ "backtrace": null
+ },
+ {
+ "isSystem": true,
+ "path": "/usr/Frameworks/Foo.framework",
+ "backtrace": null
+ }
+ ],
+ "compileCommandFragments": []
+ }
+ ],
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": [
+ {
+ "fragment": "-iframework .+/framework(/(Debug|Release|RelWithDebInfo|MinSizeRel))?\"? -iframework /usr/Frameworks$",
+ "role": "frameworkPath",
+ "backtrace": null
+ },
+ {
+ "fragment": ".*static_framework\\.framework/.+/static_framework",
+ "role": "libraries",
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "fragment": ".*shared_framework\\.framework/.+/shared_framework",
+ "role": "libraries",
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_shared_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_shared_framework.json
new file mode 100644
index 0000000..31104cf
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_shared_framework.json
@@ -0,0 +1,9 @@
+{
+ "nameOnDisk": "^shared_framework\\.framework/shared_framework$",
+ "artifacts": [
+ {
+ "path": "^framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?shared_framework\\.framework/shared_framework$",
+ "_dllExtra": false
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_static_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_static_framework.json
new file mode 100644
index 0000000..25ffd1a
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/apple_static_framework.json
@@ -0,0 +1,9 @@
+{
+ "nameOnDisk": "^static_framework\\.framework/static_framework$",
+ "artifacts": [
+ {
+ "path": "^framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?static_framework\\.framework/static_framework$",
+ "_dllExtra": false
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json
index a27d328..74b3287 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json
@@ -45,6 +45,7 @@
],
"includes": null,
"defines": null,
+ "frameworks": null,
"compileCommandFragments": null
}
],
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json
index 7cfc0f2..c6ff37a 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json
@@ -57,6 +57,7 @@
],
"includes": null,
"defines": null,
+ "frameworks": null,
"compileCommandFragments": null
}
],
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json
index 715514d..f6cfa9c 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_1.json
@@ -199,6 +199,7 @@
]
}
],
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json
index 4757a9c..591ba4f 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_headers_2.json
@@ -51,6 +51,7 @@
"^fileset/empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json
index 2bfc63f..dc74fdf 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json
@@ -56,6 +56,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json
index 6342191..3034e98 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json
@@ -71,6 +71,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json
index 3e1b03b..ec0fdc6 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json
@@ -44,6 +44,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json
index f7a8db4..5e92840 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json
@@ -56,6 +56,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json
index 9066053..85b5108 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json
@@ -56,6 +56,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": [
{
"define": "c_shared_lib_EXPORTS",
@@ -117,7 +118,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 45,
+ "line": 46,
"command": "install",
"hasParent": true
},
@@ -147,7 +148,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 45,
+ "line": 46,
"command": "install",
"hasParent": true
},
@@ -177,7 +178,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 50,
+ "line": 51,
"command": "install",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json
index 46c5bfe..df43319 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json
@@ -56,6 +56,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json
index df28479..6a51295 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json
@@ -56,6 +56,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json
index 4fa62e3..362caf9 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json
@@ -63,6 +63,7 @@
]
}
],
+ "frameworks": null,
"defines": [
{
"define": "SUBDIR",
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json
index 8d52ab8..449c261 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json
@@ -44,6 +44,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json
index b27fc5b..a2d3ca4 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json
@@ -44,6 +44,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
index 12b2551..73f9346 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
@@ -44,6 +44,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"precompileHeaders": [
{
@@ -138,7 +139,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 42,
+ "line": 43,
"command": "install",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader.json
index 3251777..ac6a1c0 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader.json
@@ -6,6 +6,7 @@
".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"precompileHeaders": [
{
@@ -52,6 +53,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"precompileHeaders": [
{
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_2arch.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_2arch.json
index 0ac40c2..311fe7a 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_2arch.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_2arch.json
@@ -6,6 +6,7 @@
".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"precompileHeaders": [
{
@@ -52,6 +53,7 @@
".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"precompileHeaders": [
{
@@ -98,6 +100,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"precompileHeaders": [
{
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_multigen.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_multigen.json
index 86168f1..adf979e 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_multigen.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_multigen.json
@@ -6,6 +6,7 @@
".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"precompileHeaders": [
{
@@ -52,6 +53,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"precompileHeaders": [
{
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json
index f665004..725cad9 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json
@@ -44,6 +44,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json
index 68c5dcc..6655215 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json
@@ -71,6 +71,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json
index 0438a49..cc2deeb 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json
@@ -44,6 +44,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json
index bb9989e..1858df7 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json
@@ -44,6 +44,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json
index d6d59a4..c92e573 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json
@@ -44,6 +44,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": [
{
"define": "cxx_shared_lib_EXPORTS",
@@ -93,7 +94,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 45,
+ "line": 46,
"command": "install",
"hasParent": true
},
@@ -123,7 +124,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 45,
+ "line": 46,
"command": "install",
"hasParent": true
},
@@ -153,7 +154,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 50,
+ "line": 51,
"command": "install",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json
index a6bacf7..5b07d5a 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json
@@ -64,6 +64,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json
index fe884e0..d9554f1 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json
@@ -64,6 +64,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json
index d904bd9..001eb8d 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json
@@ -44,6 +44,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json
index bced68a..38790dd 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json
@@ -44,6 +44,7 @@
"^empty\\.cxx$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/exe_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/exe_framework.json
new file mode 100644
index 0000000..d5d6522
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/exe_framework.json
@@ -0,0 +1,164 @@
+{
+ "name": "exe_framework",
+ "id": "^exe_framework::@217a96c3a62328a73ef4$",
+ "directorySource": "^framework$",
+ "projectName": "Framework",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "fileSets": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "fileSetName": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": 16,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "frameworks": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": 16,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^exe_framework(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?exe_framework(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?exe_framework\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^framework$",
+ "source": "^framework$",
+ "install": null,
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": [
+ {
+ "fragment": ".*static_framework.*",
+ "role": "libraries",
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "fragment": ".*shared_framework.*",
+ "role": "libraries",
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^static_framework::@217a96c3a62328a73ef4$",
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "id": "^shared_framework::@217a96c3a62328a73ef4$",
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "id": "^ZERO_CHECK::@217a96c3a62328a73ef4$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json
index 4b69682..f1ef8dd 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json
@@ -108,6 +108,7 @@
]
}
],
+ "frameworks": null,
"defines": [
{
"define": "EMPTY_C=1",
@@ -223,6 +224,7 @@
]
}
],
+ "frameworks": null,
"defines": [
{
"define": "GENERATED_EXE=1",
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json
index c0c3e79..521e464 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json
@@ -68,6 +68,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": [
{
"define": "interface_exe_EXPORTS",
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
index 45fb0a5..531d8dc 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
@@ -44,6 +44,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
index 74c179c..691edff 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
@@ -44,6 +44,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
index 6771747..555accc 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
@@ -44,6 +44,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
index 659e3fb..ead2362 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
@@ -44,6 +44,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
index 7bdaffb..26dc9db 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
@@ -44,6 +44,7 @@
"^empty\\.c$"
],
"includes": null,
+ "frameworks": null,
"defines": null,
"compileCommandFragments": null
}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/shared_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/shared_framework.json
new file mode 100644
index 0000000..41b5605
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/shared_framework.json
@@ -0,0 +1,102 @@
+{
+ "name": "shared_framework",
+ "id": "^shared_framework::@217a96c3a62328a73ef4$",
+ "directorySource": "^framework$",
+ "projectName": "Framework",
+ "type": "SHARED_LIBRARY",
+ "isGeneratorProvided": null,
+ "fileSets": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "fileSetName": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": 7,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "frameworks": null,
+ "defines": [
+ {
+ "define": "shared_framework_EXPORTS",
+ "backtrace": null
+ }
+ ],
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": 7,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^(lib|cyg|msys-)?shared_framework\\.(so|dylib|dll)$",
+ "artifacts": [
+ {
+ "path": "^framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg|msys-)?shared_framework\\.(so|dylib|dll)$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?shared_framework\\.(dll\\.a|lib)$",
+ "_dllExtra": true
+ },
+ {
+ "path": "^framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg|msys-)?shared_framework\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^framework$",
+ "source": "^framework$",
+ "install": null,
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@217a96c3a62328a73ef4$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/static_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/static_framework.json
new file mode 100644
index 0000000..00dd11e
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/static_framework.json
@@ -0,0 +1,87 @@
+{
+ "name": "static_framework",
+ "id": "^static_framework::@217a96c3a62328a73ef4$",
+ "directorySource": "^framework$",
+ "projectName": "Framework",
+ "type": "STATIC_LIBRARY",
+ "isGeneratorProvided": null,
+ "fileSets": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "fileSetName": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": 4,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "frameworks": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": 4,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^(lib)?static_framework\\.(a|lib)$",
+ "artifacts": [
+ {
+ "path": "^framework/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?static_framework\\.(a|lib)$",
+ "_dllExtra": false
+ }
+ ],
+ "build": "^framework$",
+ "source": "^framework$",
+ "install": null,
+ "link": null,
+ "archive": {
+ "lto": null
+ },
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@217a96c3a62328a73ef4$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_framework.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_framework.json
new file mode 100644
index 0000000..6206517
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_framework.json
@@ -0,0 +1,73 @@
+{
+ "name": "ZERO_CHECK",
+ "id": "^ZERO_CHECK::@217a96c3a62328a73ef4$",
+ "directorySource": "^framework$",
+ "projectName": "Framework",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "fileSets": null,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/framework/CMakeFiles/ZERO_CHECK$",
+ "isGenerated": true,
+ "fileSetName": null,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/framework/CMakeFiles/ZERO_CHECK\\.rule$",
+ "isGenerated": true,
+ "fileSetName": null,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/framework/CMakeFiles/ZERO_CHECK$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/framework/CMakeFiles/ZERO_CHECK\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^framework/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^framework$",
+ "source": "^framework$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2.cmake b/Tests/RunCMake/FileAPI/codemodel-v2.cmake
index 09db216..5f4019d 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2.cmake
+++ b/Tests/RunCMake/FileAPI/codemodel-v2.cmake
@@ -26,6 +26,7 @@ add_subdirectory(custom)
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../FileAPIExternalSource" "${CMAKE_CURRENT_BINARY_DIR}/../FileAPIExternalBuild")
add_subdirectory(dir)
add_subdirectory(fileset)
+add_subdirectory(framework)
set_property(TARGET c_shared_lib PROPERTY LIBRARY_OUTPUT_DIRECTORY lib)
set_property(TARGET c_shared_lib PROPERTY RUNTIME_OUTPUT_DIRECTORY lib)
diff --git a/Tests/RunCMake/FileAPI/framework/CMakeLists.txt b/Tests/RunCMake/FileAPI/framework/CMakeLists.txt
new file mode 100644
index 0000000..d69efbb
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/framework/CMakeLists.txt
@@ -0,0 +1,17 @@
+project(Framework)
+enable_language(CXX)
+
+add_library(static_framework STATIC ../empty.cxx)
+set_property(TARGET static_framework PROPERTY FRAMEWORK ON)
+
+add_library(shared_framework SHARED ../empty.cxx)
+set_property(TARGET shared_framework PROPERTY FRAMEWORK ON)
+set_property(TARGET shared_framework PROPERTY SYSTEM ON)
+
+add_library(import_framework SHARED IMPORTED)
+set_property(TARGET import_framework PROPERTY FRAMEWORK ON)
+set_property(TARGET import_framework PROPERTY IMPORTED_LOCATION /usr/Frameworks/Foo.framework/Foo)
+set_property(TARGET import_framework PROPERTY IMPORTED_IMPLIB /usr/Frameworks/Foo.framework/Foo.lib)
+
+add_executable(exe_framework ../empty.cxx)
+target_link_libraries(exe_framework PRIVATE static_framework shared_framework import_framework)
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/Framework/FrameworkSystemIncludeTest.cmake b/Tests/RunCMake/Framework/FrameworkSystemIncludeTest.cmake
index d172281..bcf6c29 100644
--- a/Tests/RunCMake/Framework/FrameworkSystemIncludeTest.cmake
+++ b/Tests/RunCMake/Framework/FrameworkSystemIncludeTest.cmake
@@ -10,3 +10,15 @@ set_target_properties(Example::Example PROPERTIES
add_library(testcase FrameworkSystemIncludeTest.c)
target_compile_options(testcase PRIVATE "-Werror=#pragma-messages")
target_link_libraries(testcase PRIVATE Example::Example)
+
+
+
+add_library(Example::Example2 SHARED IMPORTED)
+set_target_properties(Example::Example2 PROPERTIES
+ FRAMEWORK 1
+ IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/subdir/Example.framework/Example.tbd"
+)
+
+add_library(testcase2 FrameworkSystemIncludeTest.c)
+target_compile_options(testcase2 PRIVATE "-Werror=#pragma-messages")
+target_link_libraries(testcase2 PRIVATE Example::Example2)
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_<LIBRARY>
+# testing target properties LINK_LIBRARY_OVERRIDE and LINK_LIBRARY_OVERRIDE_<LIBRARY>
run_cmake(override-features1)
run_cmake(override-features2)
run_cmake(override-features3)
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/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/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/MultiLint/C-launch_skip_linting_ON.cmake b/Tests/RunCMake/MultiLint/C-launch_skip_linting_ON.cmake
new file mode 100644
index 0000000..d0d9866
--- /dev/null
+++ b/Tests/RunCMake/MultiLint/C-launch_skip_linting_ON.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(C_skip_linting_ON.cmake)
diff --git a/Tests/RunCMake/MultiLint/CMakeLists copy.txt b/Tests/RunCMake/MultiLint/CMakeLists copy.txt
new file mode 100644
index 0000000..93ee9df
--- /dev/null
+++ b/Tests/RunCMake/MultiLint/CMakeLists copy.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.5)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/MultiLint/CXX-launch_skip_linting_ON.cmake b/Tests/RunCMake/MultiLint/CXX-launch_skip_linting_ON.cmake
new file mode 100644
index 0000000..6347e60
--- /dev/null
+++ b/Tests/RunCMake/MultiLint/CXX-launch_skip_linting_ON.cmake
@@ -0,0 +1,3 @@
+set(CTEST_USE_LAUNCHERS 1)
+include(CTestUseLaunchers)
+include(CXX_skip_linting_ON.cmake)
diff --git a/Tests/RunCMake/MultiLint/CXX_skip_linting_OFF-Build-result.txt b/Tests/RunCMake/MultiLint/CXX_skip_linting_OFF-Build-result.txt
new file mode 100644
index 0000000..3beecb0
--- /dev/null
+++ b/Tests/RunCMake/MultiLint/CXX_skip_linting_OFF-Build-result.txt
@@ -0,0 +1 @@
+(1|2)
diff --git a/Tests/RunCMake/MultiLint/CXX_skip_linting_OFF.cmake b/Tests/RunCMake/MultiLint/CXX_skip_linting_OFF.cmake
new file mode 100644
index 0000000..a0311a6
--- /dev/null
+++ b/Tests/RunCMake/MultiLint/CXX_skip_linting_OFF.cmake
@@ -0,0 +1,7 @@
+enable_language(CXX)
+set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "$<1:${PSEUDO_IWYU}>" -some -args)
+set(CMAKE_CXX_CLANG_TIDY "$<1:${PSEUDO_TIDY}>" -bad)
+set(CMAKE_CXX_CPPLINT "$<1:${PSEUDO_CPPLINT}>" --error)
+set(CMAKE_CXX_CPPCHECK "$<1:${PSEUDO_CPPCHECK}>" -error)
+add_executable(main main.cxx)
+set_source_files_properties(main.cxx PROPERTIES SKIP_LINTING OFF)
diff --git a/Tests/RunCMake/MultiLint/CXX_skip_linting_ON.cmake b/Tests/RunCMake/MultiLint/CXX_skip_linting_ON.cmake
new file mode 100644
index 0000000..39cfe87
--- /dev/null
+++ b/Tests/RunCMake/MultiLint/CXX_skip_linting_ON.cmake
@@ -0,0 +1,7 @@
+enable_language(CXX)
+set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "$<1:${PSEUDO_IWYU}>" -some -args)
+set(CMAKE_CXX_CLANG_TIDY "$<1:${PSEUDO_TIDY}>" -bad)
+set(CMAKE_CXX_CPPLINT "$<1:${PSEUDO_CPPLINT}>" --error)
+set(CMAKE_CXX_CPPCHECK "$<1:${PSEUDO_CPPCHECK}>" -error)
+add_executable(main main.cxx)
+set_source_files_properties(main.cxx PROPERTIES SKIP_LINTING ON)
diff --git a/Tests/RunCMake/MultiLint/C_skip_linting_OFF-Build-result.txt b/Tests/RunCMake/MultiLint/C_skip_linting_OFF-Build-result.txt
new file mode 100644
index 0000000..3beecb0
--- /dev/null
+++ b/Tests/RunCMake/MultiLint/C_skip_linting_OFF-Build-result.txt
@@ -0,0 +1 @@
+(1|2)
diff --git a/Tests/RunCMake/MultiLint/C_skip_linting_OFF.cmake b/Tests/RunCMake/MultiLint/C_skip_linting_OFF.cmake
new file mode 100644
index 0000000..2968a21
--- /dev/null
+++ b/Tests/RunCMake/MultiLint/C_skip_linting_OFF.cmake
@@ -0,0 +1,7 @@
+enable_language(C)
+set(CMAKE_C_INCLUDE_WHAT_YOU_USE "${PSEUDO_IWYU}" -some -args)
+set(CMAKE_C_CLANG_TIDY "${PSEUDO_TIDY}" -bad)
+set(CMAKE_C_CPPLINT "${PSEUDO_CPPLINT}" --error)
+set(CMAKE_C_CPPCHECK "${PSEUDO_CPPCHECK}" -error)
+add_executable(main main.c)
+set_source_files_properties(main.c PROPERTIES SKIP_LINTING OFF)
diff --git a/Tests/RunCMake/MultiLint/C_skip_linting_ON.cmake b/Tests/RunCMake/MultiLint/C_skip_linting_ON.cmake
new file mode 100644
index 0000000..09fc761
--- /dev/null
+++ b/Tests/RunCMake/MultiLint/C_skip_linting_ON.cmake
@@ -0,0 +1,7 @@
+enable_language(C)
+set(CMAKE_C_INCLUDE_WHAT_YOU_USE "${PSEUDO_IWYU}" -some -args)
+set(CMAKE_C_CLANG_TIDY "${PSEUDO_TIDY}" -bad)
+set(CMAKE_C_CPPLINT "${PSEUDO_CPPLINT}" --error)
+set(CMAKE_C_CPPCHECK "${PSEUDO_CPPCHECK}" -error)
+add_executable(main main.c)
+set_source_files_properties(main.c PROPERTIES SKIP_LINTING ON)
diff --git a/Tests/RunCMake/MultiLint/RunCMakeTest.cmake b/Tests/RunCMake/MultiLint/RunCMakeTest.cmake
index afd98fd..9b7a6a9 100644
--- a/Tests/RunCMake/MultiLint/RunCMakeTest.cmake
+++ b/Tests/RunCMake/MultiLint/RunCMakeTest.cmake
@@ -25,3 +25,22 @@ if(NOT RunCMake_GENERATOR STREQUAL "Watcom WMake")
run_multilint(C-launch)
run_multilint(CXX-launch)
endif()
+
+function(run_skip_linting test_name)
+ set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${test_name}-build")
+ set(RunCMake_TEST_NO_CLEAN 1)
+
+ run_cmake(${test_name})
+ set(RunCMake_TEST_OUTPUT_MERGE 1)
+ run_cmake_command(${test_name}-Build ${CMAKE_COMMAND} --build .)
+endfunction()
+
+run_skip_linting(C_skip_linting_ON)
+run_skip_linting(CXX_skip_linting_ON)
+run_skip_linting(C_skip_linting_OFF)
+run_skip_linting(CXX_skip_linting_OFF)
+
+if(NOT RunCMake_GENERATOR STREQUAL "Watcom WMake")
+ run_skip_linting(C-launch_skip_linting_ON)
+ run_skip_linting(CXX-launch_skip_linting_ON)
+endif()
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/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index 619e94a..6eb0b1d 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -51,6 +51,7 @@ if(WIN32)
run_cmake_script(ShowIncludes-437-French -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
run_cmake_script(ShowIncludes-437-German -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
run_cmake_script(ShowIncludes-437-Italian -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
+ run_cmake_script(ShowIncludes-437-WineMSVC -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
run_cmake_script(ShowIncludes-54936-Chinese -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
run_cmake_script(ShowIncludes-65001-Chinese -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
run_cmake_script(ShowIncludes-65001-French -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-check.cmake
new file mode 100644
index 0000000..d4017ab
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-check.cmake
@@ -0,0 +1,3 @@
+# 'msvc-wine -showIncludes' prefix.
+set(expect "Note: including file: ")
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-stdout.txt
new file mode 100644
index 0000000..bda7eab
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-stdout.txt
@@ -0,0 +1 @@
+-- showIncludes='Note: including file: '
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC.cmake
new file mode 100644
index 0000000..59d3bf6
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC.cmake
@@ -0,0 +1,3 @@
+set(CODEPAGE 437)
+set(VSLANG "msvc-wine") # Special case for test, not a real VS value.
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
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/XcodeProject-Device/CMakeLists.txt b/Tests/RunCMake/XcodeProject-Device/CMakeLists.txt
new file mode 100644
index 0000000..93ee9df
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Device/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.5)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/XcodeProject/DeploymentTarget.c b/Tests/RunCMake/XcodeProject-Device/DeploymentTarget.c
index 5e0f40f..5e0f40f 100644
--- a/Tests/RunCMake/XcodeProject/DeploymentTarget.c
+++ b/Tests/RunCMake/XcodeProject-Device/DeploymentTarget.c
diff --git a/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake b/Tests/RunCMake/XcodeProject-Device/DeploymentTarget.cmake
index 234ceef..234ceef 100644
--- a/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/DeploymentTarget.cmake
diff --git a/Tests/RunCMake/XcodeProject/EffectivePlatformNameOFF.cmake b/Tests/RunCMake/XcodeProject-Device/EffectivePlatformNameOFF.cmake
index 4a3bf56..4a3bf56 100644
--- a/Tests/RunCMake/XcodeProject/EffectivePlatformNameOFF.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/EffectivePlatformNameOFF.cmake
diff --git a/Tests/RunCMake/XcodeProject-Device/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject-Device/RunCMakeTest.cmake
new file mode 100644
index 0000000..e2ed045
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Device/RunCMakeTest.cmake
@@ -0,0 +1,303 @@
+include(RunCMake)
+
+# Isolate device tests from host architecture selection.
+unset(ENV{CMAKE_OSX_ARCHITECTURES})
+
+if(NOT XCODE_VERSION VERSION_LESS 5)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeInstallIOS-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_SYSTEM_NAME=iOS"
+ "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_BINARY_DIR}/ios_install")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(XcodeInstallIOS)
+ run_cmake_command(XcodeInstallIOS-install ${CMAKE_COMMAND} --build . --target install)
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesOSX-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_SYSTEM_NAME=Darwin"
+ "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(XcodeBundles)
+ run_cmake_command(XcodeBundles-build-macOS ${CMAKE_COMMAND} --build .)
+ run_cmake_command(XcodeBundles-install-macOS ${CMAKE_COMMAND} --build . --target install)
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesIOS-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_SYSTEM_NAME=iOS"
+ "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(XcodeBundles)
+ run_cmake_command(XcodeBundles-build-iOS ${CMAKE_COMMAND} --build .)
+ run_cmake_command(XcodeBundles-install-iOS ${CMAKE_COMMAND} --build . --target install)
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+endif()
+
+if(NOT XCODE_VERSION VERSION_LESS 7)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesWatchOS-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_SYSTEM_NAME=watchOS"
+ "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(XcodeBundles)
+ run_cmake_command(XcodeBundles-build-watchOS ${CMAKE_COMMAND} --build .)
+ run_cmake_command(XcodeBundles-install-watchOS ${CMAKE_COMMAND} --build . --target install)
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+endif()
+
+if(NOT XCODE_VERSION VERSION_LESS 7.1)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesTvOS-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_SYSTEM_NAME=tvOS"
+ "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(XcodeBundles)
+ run_cmake_command(XcodeBundles-build-tvOS ${CMAKE_COMMAND} --build .)
+ run_cmake_command(XcodeBundles-install-tvOS ${CMAKE_COMMAND} --build . --target install)
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+endif()
+
+if(NOT XCODE_VERSION VERSION_LESS 7)
+ set(RunCMake_TEST_OPTIONS "-DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/osx.cmake")
+ run_cmake(XcodeTbdStub)
+ unset(RunCMake_TEST_OPTIONS)
+endif()
+
+if(XCODE_VERSION VERSION_GREATER_EQUAL 6)
+ # XcodeIOSInstallCombined
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombined-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_SYSTEM_NAME=iOS"
+ "-DCMAKE_IOS_INSTALL_COMBINED=YES"
+ "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(XcodeIOSInstallCombined)
+ run_cmake_command(XcodeIOSInstallCombined-build ${CMAKE_COMMAND} --build .)
+ if(XCODE_VERSION VERSION_LESS 12)
+ run_cmake_command(XcodeIOSInstallCombined-install ${CMAKE_COMMAND} --build . --target install)
+ endif()
+ # --build defaults to Debug, --install defaults to Release, so we have to
+ # specify the configuration explicitly
+ run_cmake_command(XcodeIOSInstallCombined-cmakeinstall
+ ${CMAKE_COMMAND} --install . --config Debug
+ )
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+
+ # XcodeIOSInstallCombinedPrune
+ # FIXME(#24011): Xcode 14 removed support for older architectures the test needs.
+ if(XCODE_VERSION VERSION_LESS 14)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedPrune-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_SYSTEM_NAME=iOS"
+ "-DCMAKE_IOS_INSTALL_COMBINED=YES"
+ "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(XcodeIOSInstallCombinedPrune)
+ run_cmake_command(XcodeIOSInstallCombinedPrune-build ${CMAKE_COMMAND} --build .)
+ if(XCODE_VERSION VERSION_LESS 12)
+ run_cmake_command(XcodeIOSInstallCombinedPrune-install ${CMAKE_COMMAND} --build . --target install)
+ endif()
+ # --build defaults to Debug, --install defaults to Release, so we have to
+ # specify the configuration explicitly
+ run_cmake_command(XcodeIOSInstallCombinedPrune-cmakeinstall
+ ${CMAKE_COMMAND} --install . --config Debug
+ )
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+ endif()
+
+ # XcodeIOSInstallCombinedSingleArch
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedSingleArch-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_SYSTEM_NAME=iOS"
+ "-DCMAKE_IOS_INSTALL_COMBINED=YES"
+ "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(XcodeIOSInstallCombinedSingleArch)
+ run_cmake_command(XcodeIOSInstallCombinedSingleArch-build ${CMAKE_COMMAND} --build .)
+ if(XCODE_VERSION VERSION_LESS 12)
+ run_cmake_command(XcodeIOSInstallCombinedSingleArch-install ${CMAKE_COMMAND} --build . --target install)
+ endif()
+ # --build defaults to Debug, --install defaults to Release, so we have to
+ # specify the configuration explicitly
+ run_cmake_command(XcodeIOSInstallCombinedSingleArch-cmakeinstall
+ ${CMAKE_COMMAND} --install . --config Debug
+ )
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+endif()
+
+if(NOT XCODE_VERSION VERSION_LESS 5)
+ # XcodeMultiplatform
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeMultiplatform-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS "${IOS_DEPLOYMENT_TARGET}")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(XcodeMultiplatform)
+
+ # build ios before macos
+ run_cmake_command(XcodeMultiplatform-iphonesimulator-build ${CMAKE_COMMAND} --build . -- -sdk iphonesimulator)
+ run_cmake_command(XcodeMultiplatform-iphonesimulator-install ${CMAKE_COMMAND} --build . --target install -- -sdk iphonesimulator DESTDIR=${RunCMake_TEST_BINARY_DIR}/_install_iphonesimulator)
+
+ run_cmake_command(XcodeMultiplatform-macosx-build ${CMAKE_COMMAND} --build . -- -sdk macosx)
+ run_cmake_command(XcodeMultiplatform-macosx-install ${CMAKE_COMMAND} --build . --target install -- -sdk macosx DESTDIR=${RunCMake_TEST_BINARY_DIR}/_install_macosx)
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+
+ # EffectivePlatformNameOFF
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/EffectivePlatformNameOFF-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS" "-DCMAKE_OSX_SYSROOT=iphonesimulator")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(EffectivePlatformNameOFF)
+
+ run_cmake_command(EffectivePlatformNameOFF-iphonesimulator-build ${CMAKE_COMMAND} --build .)
+ run_cmake_command(EffectivePlatformNameOFF-iphonesimulator-install ${CMAKE_COMMAND} --build . --target install -- DESTDIR=${RunCMake_TEST_BINARY_DIR}/_install_iphonesimulator)
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+endif()
+
+if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
+ function(deployment_target_test SystemName SDK)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/DeploymentTarget-${SDK}-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=${SystemName}" "-DCMAKE_OSX_SYSROOT=${SDK}")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(DeploymentTarget)
+ run_cmake_command(DeploymentTarget-${SDK} ${CMAKE_COMMAND} --build .)
+ endfunction()
+
+ deployment_target_test(Darwin macosx)
+ deployment_target_test(iOS iphoneos)
+ deployment_target_test(iOS iphonesimulator)
+ deployment_target_test(tvOS appletvos)
+ deployment_target_test(tvOS appletvsimulator)
+ deployment_target_test(watchOS watchos)
+ deployment_target_test(watchOS watchsimulator)
+endif()
+
+if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
+ function(xctest_lookup_test SystemName SDK)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XCTestLookup-${SDK}-build)
+ set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=${SystemName}" "-DCMAKE_OSX_SYSROOT=${SDK}")
+
+ run_cmake(XCTestLookup)
+ endfunction()
+
+ xctest_lookup_test(Darwin macosx)
+ xctest_lookup_test(iOS iphoneos)
+ xctest_lookup_test(iOS iphonesimulator)
+ xctest_lookup_test(tvOS appletvos)
+ xctest_lookup_test(tvOS appletvsimulator)
+endif()
+
+if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
+ function(XcodeRemoveExcessiveISystemSDK SDK)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeRemoveExcessiveISystemSDK-${SDK}-build)
+ set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS" "-DCMAKE_OSX_SYSROOT=${SDK}")
+ run_cmake(XcodeRemoveExcessiveISystem)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(XcodeRemoveExcessiveISystemSDK-${SDK}-build ${CMAKE_COMMAND} --build .)
+ endfunction()
+
+ XcodeRemoveExcessiveISystemSDK(iphoneos)
+ XcodeRemoveExcessiveISystemSDK(iphonesimulator)
+endif()
+
+if (XCODE_VERSION VERSION_GREATER_EQUAL 7.3)
+ function(xctest_add_bundle_test SystemName SDK BuildSystemVersion ExpectedOutputDir)
+ set(RunCMake_TEST_BINARY_DIR
+ ${RunCMake_BINARY_DIR}/DeploymentTarget-${SystemName}-${SDK}-${BuildSystemVersion}-build)
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_SYSTEM_NAME=${SystemName}"
+ "-DCMAKE_OSX_SYSROOT=${SDK}"
+ "-DTEST_EXPECTED_OUTPUT_DIR=${ExpectedOutputDir}")
+ unset(RunCMake_GENERATOR_TOOLSET)
+ if(BuildSystemVersion)
+ set(RunCMake_GENERATOR_TOOLSET "buildsystem=${BuildSystemVersion}")
+ endif()
+ run_cmake(XCTestAddBundle)
+ endfunction()
+
+ if(XCODE_VERSION VERSION_GREATER_EQUAL 12)
+ xctest_add_bundle_test(Darwin macosx "1" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+ xctest_add_bundle_test(Darwin macosx "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+ xctest_add_bundle_test(iOS iphonesimulator "1" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+ if (XCODE_VERSION VERSION_LESS 12.5)
+ xctest_add_bundle_test(iOS iphonesimulator "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>")
+ else()
+ xctest_add_bundle_test(iOS iphonesimulator "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+ endif()
+ else()
+ xctest_add_bundle_test(Darwin macosx "" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+ xctest_add_bundle_test(iOS iphonesimulator "" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+ endif()
+endif()
diff --git a/Tests/RunCMake/XcodeProject/XCTestAddBundle.cmake b/Tests/RunCMake/XcodeProject-Device/XCTestAddBundle.cmake
index 9114fee..9114fee 100644
--- a/Tests/RunCMake/XcodeProject/XCTestAddBundle.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XCTestAddBundle.cmake
diff --git a/Tests/RunCMake/XcodeProject/XCTestLookup.cmake b/Tests/RunCMake/XcodeProject-Device/XCTestLookup.cmake
index 77676e5..77676e5 100644
--- a/Tests/RunCMake/XcodeProject/XCTestLookup.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XCTestLookup.cmake
diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles-install-check.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeBundles-install-check.cmake
index 758d730..758d730 100644
--- a/Tests/RunCMake/XcodeProject/XcodeBundles-install-check.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeBundles-install-check.cmake
diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeBundles.cmake
index a9fafd2..a9fafd2 100644
--- a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeBundles.cmake
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-cmakeinstall-check.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombined-cmakeinstall-check.cmake
index a1ceb13..a1ceb13 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-cmakeinstall-check.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombined-cmakeinstall-check.cmake
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombined-install-check.cmake
index 60bc0d8..60bc0d8 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombined-install-check.cmake
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombined.cmake
index f8eccc7..f8eccc7 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombined.cmake
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-check.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedPrune-install-check.cmake
index 37bb4d5..37bb4d5 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-check.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedPrune-install-check.cmake
diff --git a/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedPrune-install-stdout.txt b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedPrune-install-stdout.txt
new file mode 100644
index 0000000..c87008a
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedPrune-install-stdout.txt
@@ -0,0 +1,2 @@
+.*Unexpected architecture `i386` detected.*
+.*Unexpected architecture `arm64` detected.*
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedPrune.cmake
index e719428..e719428 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedPrune.cmake
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-cmakeinstall-check.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch-cmakeinstall-check.cmake
index 3f7c379..3f7c379 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-cmakeinstall-check.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch-cmakeinstall-check.cmake
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch-install-check.cmake
index db8f869..db8f869 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch-install-check.cmake
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch.cmake
index cb22e51..cb22e51 100644
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeIOSInstallCombinedSingleArch.cmake
diff --git a/Tests/RunCMake/XcodeProject/XcodeInstallIOS-install-stdout.txt b/Tests/RunCMake/XcodeProject-Device/XcodeInstallIOS-install-stdout.txt
index f2478be..f2478be 100644
--- a/Tests/RunCMake/XcodeProject/XcodeInstallIOS-install-stdout.txt
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeInstallIOS-install-stdout.txt
diff --git a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeInstallIOS.cmake
index fccd4c6..fccd4c6 100644
--- a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeInstallIOS.cmake
diff --git a/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeMultiplatform.cmake
index b334b7d..b334b7d 100644
--- a/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeMultiplatform.cmake
diff --git a/Tests/RunCMake/XcodeProject-Device/XcodeRemoveExcessiveISystem.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeRemoveExcessiveISystem.cmake
new file mode 100644
index 0000000..b28a58e
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeRemoveExcessiveISystem.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/../XcodeProject/XcodeRemoveExcessiveISystem.cmake)
diff --git a/Tests/RunCMake/XcodeProject/XcodeTbdStub-stdout.txt b/Tests/RunCMake/XcodeProject-Device/XcodeTbdStub-stdout.txt
index 9d9e143..9d9e143 100644
--- a/Tests/RunCMake/XcodeProject/XcodeTbdStub-stdout.txt
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeTbdStub-stdout.txt
diff --git a/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake b/Tests/RunCMake/XcodeProject-Device/XcodeTbdStub.cmake
index 55dd1a7..55dd1a7 100644
--- a/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/XcodeTbdStub.cmake
diff --git a/Tests/RunCMake/XcodeProject-Device/dummy_main.swift b/Tests/RunCMake/XcodeProject-Device/dummy_main.swift
new file mode 100644
index 0000000..1aaee42
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Device/dummy_main.swift
@@ -0,0 +1,18 @@
+#if os(iOS)
+import UIKit
+
+@UIApplicationMain
+class MyApp: UIResponder, UIApplicationDelegate {
+}
+
+#elseif os(macOS)
+import SwiftUI
+
+@main
+struct MyApp: App {
+ var body: some Scene {
+ WindowGroup {
+ }
+ }
+}
+#endif
diff --git a/Tests/RunCMake/XcodeProject-Device/foo.cpp b/Tests/RunCMake/XcodeProject-Device/foo.cpp
new file mode 100644
index 0000000..3695dc9
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Device/foo.cpp
@@ -0,0 +1,3 @@
+void foo()
+{
+}
diff --git a/Tests/RunCMake/XcodeProject-Device/main.c b/Tests/RunCMake/XcodeProject-Device/main.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Device/main.c
diff --git a/Tests/RunCMake/XcodeProject-Device/main.cpp b/Tests/RunCMake/XcodeProject-Device/main.cpp
new file mode 100644
index 0000000..f8b643a
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject-Device/main.cpp
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/XcodeProject/main.m b/Tests/RunCMake/XcodeProject-Device/main.m
index 3e70e50..3e70e50 100644
--- a/Tests/RunCMake/XcodeProject/main.m
+++ b/Tests/RunCMake/XcodeProject-Device/main.m
diff --git a/Tests/RunCMake/XcodeProject/osx.cmake b/Tests/RunCMake/XcodeProject-Device/osx.cmake
index e021fcd..e021fcd 100644
--- a/Tests/RunCMake/XcodeProject/osx.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/osx.cmake
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 3910127..c124950 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -101,7 +101,7 @@ function(XcodeSchemaGeneration)
run_cmake(XcodeSchemaGeneration)
if (XCODE_VERSION VERSION_GREATER_EQUAL 13)
- set(maybe_destination -destination platform=macOS)
+ set(maybe_destination -destination platform=macOS,arch=${CMAKE_HOST_SYSTEM_PROCESSOR})
else()
set(maybe_destination "")
endif()
@@ -169,309 +169,4 @@ endfunction()
BundleLinkBundle()
-
-# Isolate device tests from host architecture selection.
-unset(ENV{CMAKE_OSX_ARCHITECTURES})
-
-# Use a single build tree for a few tests without cleaning.
-
-if(NOT XCODE_VERSION VERSION_LESS 5)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeInstallIOS-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=iOS"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_BINARY_DIR}/ios_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeInstallIOS)
- run_cmake_command(XcodeInstallIOS-install ${CMAKE_COMMAND} --build . --target install)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesOSX-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=Darwin"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeBundles)
- run_cmake_command(XcodeBundles-build-macOS ${CMAKE_COMMAND} --build .)
- run_cmake_command(XcodeBundles-install-macOS ${CMAKE_COMMAND} --build . --target install)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesIOS-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=iOS"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeBundles)
- run_cmake_command(XcodeBundles-build-iOS ${CMAKE_COMMAND} --build .)
- run_cmake_command(XcodeBundles-install-iOS ${CMAKE_COMMAND} --build . --target install)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-endif()
-
-if(NOT XCODE_VERSION VERSION_LESS 7)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesWatchOS-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=watchOS"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeBundles)
- run_cmake_command(XcodeBundles-build-watchOS ${CMAKE_COMMAND} --build .)
- run_cmake_command(XcodeBundles-install-watchOS ${CMAKE_COMMAND} --build . --target install)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-endif()
-
-if(NOT XCODE_VERSION VERSION_LESS 7.1)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesTvOS-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=tvOS"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeBundles)
- run_cmake_command(XcodeBundles-build-tvOS ${CMAKE_COMMAND} --build .)
- run_cmake_command(XcodeBundles-install-tvOS ${CMAKE_COMMAND} --build . --target install)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-endif()
-
-if(NOT XCODE_VERSION VERSION_LESS 7)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/osx.cmake")
- run_cmake(XcodeTbdStub)
- unset(RunCMake_TEST_OPTIONS)
-endif()
-
-if(XCODE_VERSION VERSION_GREATER_EQUAL 6)
- # XcodeIOSInstallCombined
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombined-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=iOS"
- "-DCMAKE_IOS_INSTALL_COMBINED=YES"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeIOSInstallCombined)
- run_cmake_command(XcodeIOSInstallCombined-build ${CMAKE_COMMAND} --build .)
- if(XCODE_VERSION VERSION_LESS 12)
- run_cmake_command(XcodeIOSInstallCombined-install ${CMAKE_COMMAND} --build . --target install)
- endif()
- # --build defaults to Debug, --install defaults to Release, so we have to
- # specify the configuration explicitly
- run_cmake_command(XcodeIOSInstallCombined-cmakeinstall
- ${CMAKE_COMMAND} --install . --config Debug
- )
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-
- # XcodeIOSInstallCombinedPrune
- # FIXME(#24011): Xcode 14 removed support for older architectures the test needs.
- if(XCODE_VERSION VERSION_LESS 14)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedPrune-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=iOS"
- "-DCMAKE_IOS_INSTALL_COMBINED=YES"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeIOSInstallCombinedPrune)
- run_cmake_command(XcodeIOSInstallCombinedPrune-build ${CMAKE_COMMAND} --build .)
- if(XCODE_VERSION VERSION_LESS 12)
- run_cmake_command(XcodeIOSInstallCombinedPrune-install ${CMAKE_COMMAND} --build . --target install)
- endif()
- # --build defaults to Debug, --install defaults to Release, so we have to
- # specify the configuration explicitly
- run_cmake_command(XcodeIOSInstallCombinedPrune-cmakeinstall
- ${CMAKE_COMMAND} --install . --config Debug
- )
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
- endif()
-
- # XcodeIOSInstallCombinedSingleArch
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedSingleArch-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=iOS"
- "-DCMAKE_IOS_INSTALL_COMBINED=YES"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeIOSInstallCombinedSingleArch)
- run_cmake_command(XcodeIOSInstallCombinedSingleArch-build ${CMAKE_COMMAND} --build .)
- if(XCODE_VERSION VERSION_LESS 12)
- run_cmake_command(XcodeIOSInstallCombinedSingleArch-install ${CMAKE_COMMAND} --build . --target install)
- endif()
- # --build defaults to Debug, --install defaults to Release, so we have to
- # specify the configuration explicitly
- run_cmake_command(XcodeIOSInstallCombinedSingleArch-cmakeinstall
- ${CMAKE_COMMAND} --install . --config Debug
- )
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-endif()
-
-if(NOT XCODE_VERSION VERSION_LESS 5)
- # XcodeMultiplatform
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeMultiplatform-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS "${IOS_DEPLOYMENT_TARGET}")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeMultiplatform)
-
- # build ios before macos
- run_cmake_command(XcodeMultiplatform-iphonesimulator-build ${CMAKE_COMMAND} --build . -- -sdk iphonesimulator)
- run_cmake_command(XcodeMultiplatform-iphonesimulator-install ${CMAKE_COMMAND} --build . --target install -- -sdk iphonesimulator DESTDIR=${RunCMake_TEST_BINARY_DIR}/_install_iphonesimulator)
-
- run_cmake_command(XcodeMultiplatform-macosx-build ${CMAKE_COMMAND} --build . -- -sdk macosx)
- run_cmake_command(XcodeMultiplatform-macosx-install ${CMAKE_COMMAND} --build . --target install -- -sdk macosx DESTDIR=${RunCMake_TEST_BINARY_DIR}/_install_macosx)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-
- # EffectivePlatformNameOFF
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/EffectivePlatformNameOFF-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS" "-DCMAKE_OSX_SYSROOT=iphonesimulator")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(EffectivePlatformNameOFF)
-
- run_cmake_command(EffectivePlatformNameOFF-iphonesimulator-build ${CMAKE_COMMAND} --build .)
- run_cmake_command(EffectivePlatformNameOFF-iphonesimulator-install ${CMAKE_COMMAND} --build . --target install -- DESTDIR=${RunCMake_TEST_BINARY_DIR}/_install_iphonesimulator)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-endif()
-
-if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
- function(deployment_target_test SystemName SDK)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/DeploymentTarget-${SDK}-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=${SystemName}" "-DCMAKE_OSX_SYSROOT=${SDK}")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(DeploymentTarget)
- run_cmake_command(DeploymentTarget-${SDK} ${CMAKE_COMMAND} --build .)
- endfunction()
-
- deployment_target_test(Darwin macosx)
- deployment_target_test(iOS iphoneos)
- deployment_target_test(iOS iphonesimulator)
- deployment_target_test(tvOS appletvos)
- deployment_target_test(tvOS appletvsimulator)
- deployment_target_test(watchOS watchos)
- deployment_target_test(watchOS watchsimulator)
-endif()
-
-if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
- function(xctest_lookup_test SystemName SDK)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XCTestLookup-${SDK}-build)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=${SystemName}" "-DCMAKE_OSX_SYSROOT=${SDK}")
-
- run_cmake(XCTestLookup)
- endfunction()
-
- xctest_lookup_test(Darwin macosx)
- xctest_lookup_test(iOS iphoneos)
- xctest_lookup_test(iOS iphonesimulator)
- xctest_lookup_test(tvOS appletvos)
- xctest_lookup_test(tvOS appletvsimulator)
-endif()
-
-if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
- function(XcodeRemoveExcessiveISystemSDK SDK)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeRemoveExcessiveISystemSDK-${SDK}-build)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS" "-DCMAKE_OSX_SYSROOT=${SDK}")
- run_cmake(XcodeRemoveExcessiveISystem)
- set(RunCMake_TEST_NO_CLEAN 1)
- run_cmake_command(XcodeRemoveExcessiveISystemSDK-${SDK}-build ${CMAKE_COMMAND} --build .)
- endfunction()
-
- XcodeRemoveExcessiveISystemSDK(iphoneos)
- XcodeRemoveExcessiveISystemSDK(iphonesimulator)
-endif()
-
-if (XCODE_VERSION VERSION_GREATER_EQUAL 7.3)
- function(xctest_add_bundle_test SystemName SDK BuildSystemVersion ExpectedOutputDir)
- set(RunCMake_TEST_BINARY_DIR
- ${RunCMake_BINARY_DIR}/DeploymentTarget-${SystemName}-${SDK}-${BuildSystemVersion}-build)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=${SystemName}"
- "-DCMAKE_OSX_SYSROOT=${SDK}"
- "-DTEST_EXPECTED_OUTPUT_DIR=${ExpectedOutputDir}")
- unset(RunCMake_GENERATOR_TOOLSET)
- if(BuildSystemVersion)
- set(RunCMake_GENERATOR_TOOLSET "buildsystem=${BuildSystemVersion}")
- endif()
- run_cmake(XCTestAddBundle)
- endfunction()
-
- if(XCODE_VERSION VERSION_GREATER_EQUAL 12)
- xctest_add_bundle_test(Darwin macosx "1" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
- xctest_add_bundle_test(Darwin macosx "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
- xctest_add_bundle_test(iOS iphonesimulator "1" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
- if (XCODE_VERSION VERSION_LESS 12.5)
- xctest_add_bundle_test(iOS iphonesimulator "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>")
- else()
- xctest_add_bundle_test(iOS iphonesimulator "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
- endif()
- else()
- xctest_add_bundle_test(Darwin macosx "" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
- xctest_add_bundle_test(iOS iphonesimulator "" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
- endif()
-endif()
-
-# Please add macOS-only tests above before the device-specific tests.
+# Please add device-specific tests to '../XcodeProject-Device/RunCMakeTest.cmake'.
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-stdout.txt b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-stdout.txt
deleted file mode 100644
index 28edadc..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-stdout.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-.*Unexpected architecture `i386` detected.*
-.*Unexpected architecture `arm64` detected.* \ No newline at end of file
diff --git a/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake b/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake
index 80107cb..6b09b51 100644
--- a/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake
@@ -1,3 +1,4 @@
+# This file is also included from '../XcodeProject-Device/XcodeRemoveExcessiveISystem.cmake'.
if(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]")
set(USE_SWIFT 1)
@@ -33,12 +34,12 @@ list(REMOVE_ITEM CMAKE_SYSTEM_PREFIX_PATH /usr/local /usr / /usr/X11R6 /usr/pkg
find_package(ZLIB REQUIRED)
add_library (framework_dependency STATIC)
-target_sources (framework_dependency PRIVATE use_cmath.cpp)
+target_sources (framework_dependency PRIVATE ${CMAKE_CURRENT_LIST_DIR}/use_cmath.cpp)
target_link_libraries(framework_dependency INTERFACE ZLIB::ZLIB)
-add_library (framework_test SHARED use_cmath.cpp)
+add_library (framework_test SHARED ${CMAKE_CURRENT_LIST_DIR}/use_cmath.cpp)
if(USE_SWIFT)
- target_sources(framework_test PRIVATE foo.swift)
+ target_sources(framework_test PRIVATE ${CMAKE_CURRENT_LIST_DIR}/foo.swift)
endif()
target_link_libraries (framework_test PRIVATE framework_dependency)
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/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/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/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()
diff --git a/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake b/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake
index 8750a76..2d4ce66 100644
--- a/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake
+++ b/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake
@@ -1,6 +1,10 @@
set(objs obj1 obj2)
-set(targets sse2 sse4 avx avx2)
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ set(targets "")
+else()
+ set(targets sse2 sse4 avx avx2)
+endif()
foreach(o IN LISTS objs)
set(item "objs/${o}\\.ispc\\.(o|obj)")
check_installed("${item}")
diff --git a/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake b/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake
index ad542ed..91ed458 100644
--- a/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake
+++ b/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake
@@ -1,4 +1,8 @@
enable_language(ISPC)
add_library(objs OBJECT obj1.ispc obj2.ispc)
-set_target_properties(objs PROPERTIES ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i16x8;avx1-i32x16;avx2-i32x4")
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ set_property(TARGET objs PROPERTY ISPC_INSTRUCTION_SETS "neon-i32x4")
+else()
+ set_property(TARGET objs PROPERTY ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i16x8;avx1-i32x16;avx2-i32x4")
+endif()
install(FILES $<TARGET_OBJECTS:objs> DESTINATION objs)
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
diff --git a/Tests/RunCMake/showIncludes.c b/Tests/RunCMake/showIncludes.c
index 5afe04a..7d467cf 100644
--- a/Tests/RunCMake/showIncludes.c
+++ b/Tests/RunCMake/showIncludes.c
@@ -36,6 +36,14 @@ int main()
}
}
+ // msvc-wine (special case for test, not a real VS value).
+ if (strcmp(vslang, "msvc-wine") == 0) {
+ if (cp == 437 || cp == 65001) {
+ printf("Note: including file: /c/foo.h\n");
+ return 0;
+ }
+ }
+
// German.
if (strcmp(vslang, "1031") == 0) {
if (cp == 437 || cp == 65001) {
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
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<FixItHint> FixIts;
HeaderSearch& HeaderInfo = this->PP->getHeaderSearchInfo();
diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp
index 6443632..366c517 100644
--- a/Utilities/IWYU/mapping.imp
+++ b/Utilities/IWYU/mapping.imp
@@ -99,6 +99,7 @@
{ symbol: [ "std::enable_if<true, std::chrono::duration<long, std::ratio<60, 1> > >::type", private, "\"cmConfigure.h\"", public ] },
{ symbol: [ "std::enable_if<true, std::chrono::duration<long, std::ratio<1, 1000> > >::type", private, "\"cmConfigure.h\"", public ] },
{ symbol: [ "__gnu_cxx::__enable_if<true, bool>::__type", private, "\"cmConfigure.h\"", public ] },
+ { symbol: [ "std::remove_reference<std::basic_string<char, std::char_traits<char>, std::allocator<char> > &>::type", private, "\"cmConfigure.h\"", public ] },
{ symbol: [ "std::remove_reference<Defer &>::type", private, "\"cmConfigure.h\"", public ] },
# Wrappers for 3rd-party libraries
diff --git a/Utilities/Release/linux/aarch64/cache.txt b/Utilities/Release/linux/aarch64/cache.txt
index 87851d5..70739d4 100644
--- a/Utilities/Release/linux/aarch64/cache.txt
+++ b/Utilities/Release/linux/aarch64/cache.txt
@@ -32,7 +32,7 @@ SPHINX_QTHELP:BOOL=ON
QHELPGENERATOR_EXECUTABLE:PATH=/opt/qt/bin/qhelpgenerator
# We bootstrap as part of the build so skip its test.
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
+CMake_TEST_BOOTSTRAP:BOOL=FALSE
# Skip Qt5 tests because our Qt is static.
CMake_TEST_Qt5:BOOL=FALSE
diff --git a/Utilities/Release/linux/x86_64/cache.txt b/Utilities/Release/linux/x86_64/cache.txt
index d32c3dd..0b9696b 100644
--- a/Utilities/Release/linux/x86_64/cache.txt
+++ b/Utilities/Release/linux/x86_64/cache.txt
@@ -32,7 +32,7 @@ SPHINX_QTHELP:BOOL=ON
QHELPGENERATOR_EXECUTABLE:PATH=/opt/qt/bin/qhelpgenerator
# We bootstrap as part of the build so skip its test.
-CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
+CMake_TEST_BOOTSTRAP:BOOL=FALSE
# Skip Qt5 tests because our Qt is static.
CMake_TEST_Qt5:BOOL=FALSE
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]++;
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;
}
}
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 <wchar.h>
#endif
+#ifdef __clang_analyzer__
+#include <assert.h>
+#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 <assert.h>
+#endif
+
#include <string.h>
#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 <sys/ioctl.h>
#endif
+#ifdef __clang_analyzer__
+#include <assert.h>
+#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 <string.h>
#endif
+#ifdef __clang_analyzer__
+#include <assert.h>
+#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 <cm3p/zlib.h>
#endif
+#ifdef __clang_analyzer__
+#include <assert.h>
+#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 <cm3p/zlib.h> /* crc32 */
#endif
+#include <assert.h>
+
#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 <cm3p/zlib.h>
#endif
+#ifdef __clang_analyzer__
+#include <assert.h>
+#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);
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;
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) {
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))
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 <stdio.h>
+#ifdef __clang_analyzer__
+#include <assert.h>
+#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;
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;
}
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 <assert.h>
+
#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 <stdio.h>
#include <stdlib.h>
+#ifdef __clang_analyzer__
+#include <string.h>
+#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) {