summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml56
-rwxr-xr-x.gitlab/ci/borland.ps137
-rw-r--r--.gitlab/ci/configure_windows_borland5.5.cmake1
-rw-r--r--.gitlab/ci/configure_windows_borland5.8.cmake1
-rw-r--r--.gitlab/ci/configure_windows_borland_common.cmake2
-rw-r--r--.gitlab/ci/configure_windows_openwatcom1.9.cmake1
-rw-r--r--.gitlab/ci/configure_windows_openwatcom_common.cmake2
-rwxr-xr-x.gitlab/ci/openwatcom.ps125
-rw-r--r--.gitlab/os-windows.yml61
-rw-r--r--Auxiliary/cmake.m42
-rw-r--r--Auxiliary/vim/syntax/cmake.vim1
-rw-r--r--CMakeLists.txt7
-rw-r--r--Copyright.txt1
-rw-r--r--Help/command/file.rst4
-rw-r--r--Help/cpack_gen/ifw.rst44
-rw-r--r--Help/cpack_gen/wix.rst8
-rw-r--r--Help/guide/tutorial/Complete/CMakeLists.txt2
-rw-r--r--Help/guide/tutorial/Step11/CMakeLists.txt2
-rw-r--r--Help/guide/tutorial/Step12/CMakeLists.txt2
-rw-r--r--Help/manual/cmake-properties.7.rst1
-rw-r--r--Help/manual/cmake-variables.7.rst1
-rw-r--r--Help/manual/ctest.1.rst7
-rw-r--r--Help/prop_tgt/IMPORTED_NO_SYSTEM.rst17
-rw-r--r--Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst3
-rw-r--r--Help/release/dev/0-sample-topic.rst7
-rw-r--r--Help/release/dev/cpack-wix-skip-ui-ext.rst5
-rw-r--r--Help/release/dev/cpackifw-package-disable-command-line-interface.rst8
-rw-r--r--Help/release/dev/cpackifw-package-product-images.rst8
-rw-r--r--Help/release/dev/cpackifw-package-run-program.rst10
-rw-r--r--Help/release/dev/ctest_submit-inactivity-timeout.rst5
-rw-r--r--Help/release/dev/cuda-ptx-separable-compilation.rst5
-rw-r--r--Help/release/dev/imported-no-system.rst7
-rw-r--r--Help/release/dev/lcc-compiler.rst4
-rw-r--r--Help/release/index.rst2
-rw-r--r--Help/variable/CMAKE_LANG_COMPILER_ID.rst1
-rw-r--r--Help/variable/CTEST_SUBMIT_INACTIVITY_TIMEOUT.rst5
-rw-r--r--Modules/CMakeCUDAInformation.cmake19
-rw-r--r--Modules/CMakeCompilerIdDetection.cmake1
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineCompiler.cmake2
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake2
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake3
-rw-r--r--Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake4
-rw-r--r--Modules/CMakeFortranCompilerId.F.in7
-rw-r--r--Modules/CMakeParseImplicitLinkInfo.cmake4
-rw-r--r--Modules/Compiler/Clang-CUDA.cmake3
-rw-r--r--Modules/Compiler/LCC-C-DetermineCompiler.cmake11
-rw-r--r--Modules/Compiler/LCC-C-FeatureTests.cmake17
-rw-r--r--Modules/Compiler/LCC-C.cmake29
-rw-r--r--Modules/Compiler/LCC-CXX-DetermineCompiler.cmake11
-rw-r--r--Modules/Compiler/LCC-CXX-FeatureTests.cmake109
-rw-r--r--Modules/Compiler/LCC-CXX.cmake31
-rw-r--r--Modules/Compiler/LCC-FindBinUtils.cmake37
-rw-r--r--Modules/Compiler/LCC-Fortran.cmake26
-rw-r--r--Modules/Compiler/LCC.cmake95
-rw-r--r--Modules/Compiler/NVIDIA-CUDA.cmake3
-rw-r--r--Modules/DartConfiguration.tcl.in1
-rw-r--r--Modules/FindBLAS.cmake2
-rw-r--r--Modules/FindBoost.cmake4
-rw-r--r--Modules/FindHDF5.cmake2
-rw-r--r--Modules/FindOpenMP.cmake1
-rw-r--r--Modules/Internal/CPack/CPackDeb.cmake8
-rw-r--r--Modules/Platform/Generic-ELF.cmake7
-rw-r--r--Modules/Platform/Linux-LCC-C.cmake2
-rw-r--r--Modules/Platform/Linux-LCC-CXX.cmake2
-rw-r--r--Modules/Platform/Linux-LCC-Fortran.cmake3
-rw-r--r--Modules/Platform/Linux-LCC.cmake15
-rw-r--r--Modules/Platform/Windows-NVIDIA-CUDA.cmake8
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.cxx363
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.h6
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx237
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.h17
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx4
-rw-r--r--Source/CPack/cmCPackGenerator.cxx2
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx5
-rw-r--r--Source/CTest/cmCTestSubmitCommand.cxx3
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx33
-rw-r--r--Source/CTest/cmCTestSubmitHandler.h1
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx2
-rw-r--r--Source/Checks/cm_c11_thread_local.cmake2
-rw-r--r--Source/Checks/cm_cxx14_check.cmake2
-rw-r--r--Source/Checks/cm_cxx17_check.cmake2
-rw-r--r--Source/CursesDialog/form/CMakeLists.txt2
-rw-r--r--Source/cmCMakePresetsFile.h18
-rw-r--r--Source/cmExportFileGenerator.cxx10
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx6
-rw-r--r--Source/cmFileTime.h2
-rw-r--r--Source/cmFindCommon.cxx10
-rw-r--r--Source/cmGeneratorTarget.cxx3
-rw-r--r--Source/cmMakefile.cxx5
-rw-r--r--Source/cmMakefileTargetGenerator.cxx33
-rw-r--r--Source/cmNinjaTargetGenerator.cxx34
-rw-r--r--Source/cmRulePlaceholderExpander.cxx5
-rw-r--r--Source/cmRulePlaceholderExpander.h1
-rw-r--r--Source/cmSearchPath.h3
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx10
-rw-r--r--Source/cm_codecvt.cxx6
-rw-r--r--Source/cm_codecvt.hxx6
-rw-r--r--Source/kwsys/CTestConfig.cmake4
-rw-r--r--Source/kwsys/MD5.c3
-rw-r--r--Source/kwsys/SystemTools.cxx26
-rw-r--r--Source/kwsys/SystemTools.hxx.in7
-rw-r--r--Source/kwsys/testSystemTools.cxx10
-rw-r--r--Tests/Assembler/CMakeLists.txt2
-rw-r--r--Tests/CMakeCommands/add_compile_options/CMakeLists.txt2
-rw-r--r--Tests/CMakeCommands/target_compile_options/CMakeLists.txt16
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt2
-rw-r--r--Tests/CMakeLib/testUVRAII.cxx13
-rw-r--r--Tests/CMakeLists.txt16
-rw-r--r--Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt2
-rw-r--r--Tests/CompileFeatures/cxx_generalized_initializers.cpp7
-rw-r--r--Tests/CompileOptions/CMakeLists.txt12
-rw-r--r--Tests/CudaOnly/CMakeLists.txt1
-rw-r--r--Tests/CudaOnly/ExportPTX/CMakeLists.txt2
-rw-r--r--Tests/CudaOnly/SeparateCompilationPTX/CMakeLists.txt51
-rw-r--r--Tests/CudaOnly/SeparateCompilationPTX/kernels.cu14
-rw-r--r--Tests/CudaOnly/SeparateCompilationPTX/main.cu30
-rw-r--r--Tests/CudaOnly/utils/bin2c_wrapper.cmake (renamed from Tests/CudaOnly/ExportPTX/bin2c_wrapper.cmake)0
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt16
-rw-r--r--Tests/ExportImport/Export/include/testInterfaceIncludeUser/testInterfaceInclude.h1
-rw-r--r--Tests/ExportImport/Import/A/CMakeLists.txt15
-rw-r--r--Tests/ExportImport/Import/A/imp_testInterfaceInclude1.c6
-rw-r--r--Tests/ExportImport/Import/A/testInterfaceIncludeSystem/testInterfaceInclude.h1
-rw-r--r--Tests/Fortran/CMakeLists.txt4
-rw-r--r--Tests/IncludeDirectories/CMakeLists.txt8
-rw-r--r--Tests/LinkStatic/CMakeLists.txt4
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/BuildDepends/MakeDependencies.step1.cmake7
-rw-r--r--Tests/RunCMake/BuildDepends/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0119/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake27
-rw-r--r--Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/DEPENDENCIES/DEB-stderr.txt3
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake4
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake2
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake2
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake6
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-check.py2
-rw-r--r--Tests/RunCMake/FindBoost/CMP0093-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/MSVCRuntimeLibrary/CMP0091-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/MSVCWarningFlags/CMP0092-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake2
-rw-r--r--Tests/RunCMake/TargetSources/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/TargetSources/RelativePathInInterface-stdout.txt1
-rw-r--r--Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx-stdout.txt1
-rw-r--r--Tests/RunCMake/TargetSources/RelativePathInSubdirInclude-stdout.txt1
-rw-r--r--Tests/RunCMake/TargetSources/RelativePathInSubdirInterface-stdout.txt1
-rw-r--r--Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate-stdout.txt1
-rw-r--r--Tests/RunCMake/TargetSources/RunCMakeTest.cmake22
-rw-r--r--Tests/RunCMake/UnityBuild/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/VS10Project/RunCMakeTest.cmake15
-rw-r--r--Tests/RunCMake/VS10Project/UnityBuildPCH-build-check.cmake10
-rw-r--r--Tests/RunCMake/VS10Project/UnityBuildPCH.c4
-rw-r--r--Tests/RunCMake/VS10Project/UnityBuildPCH.cmake4
-rw-r--r--Tests/RunCMake/VS10Project/UnityBuildPCH.h1
-rw-r--r--Tests/RunCMake/find_package/FindRootPathAndPrefixPathAreEqual.cmake16
-rw-r--r--Tests/RunCMake/find_package/FindRootPathAndPrefixPathAreEqual/lib/cmake/Foo/FooConfig.cmake0
-rw-r--r--Tests/RunCMake/find_package/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/target_compile_options/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/target_sources/AddCustomTargetCheckProperty.cmake (renamed from Tests/RunCMake/TargetSources/AddCustomTargetCheckProperty.cmake)0
-rw-r--r--Tests/RunCMake/target_sources/AddCustomTargetGenx.cmake (renamed from Tests/RunCMake/TargetSources/AddCustomTargetGenx.cmake)0
-rw-r--r--Tests/RunCMake/target_sources/AddCustomTargetInterfaceSources-result.txt (renamed from Tests/RunCMake/TargetSources/AddCustomTargetInterfaceSources-result.txt)0
-rw-r--r--Tests/RunCMake/target_sources/AddCustomTargetInterfaceSources-stderr.txt (renamed from Tests/RunCMake/TargetSources/AddCustomTargetInterfaceSources-stderr.txt)0
-rw-r--r--Tests/RunCMake/target_sources/AddCustomTargetInterfaceSources.cmake (renamed from Tests/RunCMake/TargetSources/AddCustomTargetInterfaceSources.cmake)0
-rw-r--r--Tests/RunCMake/target_sources/AddCustomTargetPrivateSources.cmake (renamed from Tests/RunCMake/TargetSources/AddCustomTargetPrivateSources.cmake)0
-rw-r--r--Tests/RunCMake/target_sources/AddCustomTargetPublicSources-result.txt (renamed from Tests/RunCMake/TargetSources/AddCustomTargetPublicSources-result.txt)0
-rw-r--r--Tests/RunCMake/target_sources/AddCustomTargetPublicSources-stderr.txt (renamed from Tests/RunCMake/TargetSources/AddCustomTargetPublicSources-stderr.txt)0
-rw-r--r--Tests/RunCMake/target_sources/AddCustomTargetPublicSources.cmake (renamed from Tests/RunCMake/TargetSources/AddCustomTargetPublicSources.cmake)0
-rw-r--r--Tests/RunCMake/target_sources/AddCustomTargetSources-result.txt (renamed from Tests/RunCMake/TargetSources/AddCustomTargetSources-result.txt)0
-rw-r--r--Tests/RunCMake/target_sources/AddCustomTargetSources-stderr.txt (renamed from Tests/RunCMake/TargetSources/AddCustomTargetSources-stderr.txt)0
-rw-r--r--Tests/RunCMake/target_sources/AddCustomTargetSources.cmake (renamed from Tests/RunCMake/TargetSources/AddCustomTargetSources.cmake)0
-rw-r--r--Tests/RunCMake/target_sources/CMP0026-LOCATION-result.txt (renamed from Tests/RunCMake/TargetSources/CMP0026-LOCATION-result.txt)0
-rw-r--r--Tests/RunCMake/target_sources/CMP0026-LOCATION-stderr.txt (renamed from Tests/RunCMake/TargetSources/CMP0026-LOCATION-stderr.txt)0
-rw-r--r--Tests/RunCMake/target_sources/CMP0026-LOCATION.cmake (renamed from Tests/RunCMake/TargetSources/CMP0026-LOCATION.cmake)1
-rw-r--r--Tests/RunCMake/target_sources/CMP0076-OLD-result.txt (renamed from Tests/RunCMake/TargetSources/CMP0076-OLD-result.txt)0
-rw-r--r--Tests/RunCMake/target_sources/CMP0076-OLD-stderr.txt (renamed from Tests/RunCMake/TargetSources/CMP0076-OLD-stderr.txt)0
-rw-r--r--Tests/RunCMake/target_sources/CMP0076-OLD.cmake (renamed from Tests/RunCMake/TargetSources/CMP0076-OLD.cmake)0
-rw-r--r--Tests/RunCMake/target_sources/CMP0076-WARN-result.txt (renamed from Tests/RunCMake/TargetSources/CMP0076-WARN-result.txt)0
-rw-r--r--Tests/RunCMake/target_sources/CMP0076-WARN-stderr.txt (renamed from Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt)0
-rw-r--r--Tests/RunCMake/target_sources/CMP0076-WARN.cmake (renamed from Tests/RunCMake/TargetSources/CMP0076-WARN.cmake)0
-rw-r--r--Tests/RunCMake/target_sources/CMP0076-WARN/CMakeLists.txt (renamed from Tests/RunCMake/TargetSources/CMP0076-WARN/CMakeLists.txt)0
-rw-r--r--Tests/RunCMake/target_sources/CMP0076-WARN/subdir_empty_1.cpp (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate/subdir_empty_1.cpp)0
-rw-r--r--Tests/RunCMake/target_sources/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/target_sources/ConfigNotAllowed-result.txt (renamed from Tests/RunCMake/TargetSources/ConfigNotAllowed-result.txt)0
-rw-r--r--Tests/RunCMake/target_sources/ConfigNotAllowed-stderr.txt (renamed from Tests/RunCMake/TargetSources/ConfigNotAllowed-stderr.txt)6
-rw-r--r--Tests/RunCMake/target_sources/ConfigNotAllowed.cmake (renamed from Tests/RunCMake/TargetSources/ConfigNotAllowed.cmake)0
-rw-r--r--Tests/RunCMake/target_sources/EmptyKeywordArgs.cmake (renamed from Tests/RunCMake/target_sources/empty_keyword_args.cmake)0
-rw-r--r--Tests/RunCMake/target_sources/ExportBuild-result.txt (renamed from Tests/RunCMake/TargetSources/ExportBuild-result.txt)0
-rw-r--r--Tests/RunCMake/target_sources/ExportBuild.cmake (renamed from Tests/RunCMake/TargetSources/ExportBuild.cmake)0
-rw-r--r--Tests/RunCMake/target_sources/OriginDebug-result.txt (renamed from Tests/RunCMake/TargetSources/OriginDebug-result.txt)0
-rw-r--r--Tests/RunCMake/target_sources/OriginDebug-stderr.txt (renamed from Tests/RunCMake/TargetSources/OriginDebug-stderr.txt)8
-rw-r--r--Tests/RunCMake/target_sources/OriginDebug.cmake (renamed from Tests/RunCMake/TargetSources/OriginDebug.cmake)0
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInInterface-stdout.txt1
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInInterface.cmake (renamed from Tests/RunCMake/TargetSources/RelativePathInInterface.cmake)1
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirGenEx-stdout.txt1
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirGenEx.cmake (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx.cmake)1
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirGenEx/CMakeLists.txt (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx/CMakeLists.txt)0
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirGenEx/subdir_empty_1.cpp (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirInterface/subdir_empty_1.cpp)0
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirInclude-stdout.txt1
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirInclude.cmake (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirInclude.cmake)1
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirInclude/CMakeLists.txt (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirInclude/CMakeLists.txt)0
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirInclude/subdir_empty_1.cpp (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirInclude/subdir_empty_1.cpp)0
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirInterface-stdout.txt1
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirInterface.cmake (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirInterface.cmake)1
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirInterface/CMakeLists.txt (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirInterface/CMakeLists.txt)0
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirInterface/subdir_empty_1.cpp (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx/subdir_empty_1.cpp)0
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirInterface/subdir_empty_2.cpp (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate/subdir_empty_2.cpp)0
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirPrivate-stdout.txt1
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirPrivate.cmake (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate.cmake)1
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirPrivate/CMakeLists.txt (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate/CMakeLists.txt)0
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirPrivate/subdir_empty_1.cpp (renamed from Tests/RunCMake/TargetSources/CMP0076-WARN/subdir_empty_1.cpp)0
-rw-r--r--Tests/RunCMake/target_sources/RelativePathInSubdirPrivate/subdir_empty_2.cpp (renamed from Tests/RunCMake/TargetSources/RelativePathInSubdirInterface/subdir_empty_2.cpp)0
-rw-r--r--Tests/RunCMake/target_sources/RunCMakeTest.cmake22
-rw-r--r--Tests/RunCMake/target_sources/empty_1.cpp (renamed from Tests/RunCMake/TargetSources/empty_1.cpp)0
-rw-r--r--Tests/RunCMake/target_sources/empty_2.cpp (renamed from Tests/RunCMake/TargetSources/empty_2.cpp)0
-rw-r--r--Tests/RunCMake/target_sources/empty_3.cpp (renamed from Tests/RunCMake/TargetSources/empty_3.cpp)0
-rw-r--r--Tests/RunCMake/target_sources/empty_4.cpp (renamed from Tests/RunCMake/TargetSources/empty_4.cpp)0
-rw-r--r--Tests/RunCMake/target_sources/main.cpp (renamed from Tests/RunCMake/TargetSources/main.cpp)0
-rw-r--r--Tests/RunCMake/try_compile/RunCMakeTest.cmake6
-rw-r--r--Tests/RunCMake/try_run/RunCMakeTest.cmake2
-rw-r--r--Tests/SetLang/CMakeLists.txt2
-rw-r--r--Tests/TryCompile/CMakeLists.txt2
-rw-r--r--Utilities/Doxygen/CMakeLists.txt2
-rw-r--r--Utilities/Sphinx/CMakeLists.txt2
-rw-r--r--Utilities/cmbzip2/CMakeLists.txt2
-rw-r--r--Utilities/cmcurl/CMakeLists.txt4
-rw-r--r--Utilities/cmexpat/CMakeLists.txt2
-rw-r--r--Utilities/cmjsoncpp/CMakeLists.txt2
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt14
-rw-r--r--Utilities/cmliblzma/CMakeLists.txt4
-rw-r--r--Utilities/cmlibrhash/CMakeLists.txt2
-rw-r--r--Utilities/cmlibuv/CMakeLists.txt2
-rw-r--r--Utilities/cmlibuv/src/uv-common.c2
-rw-r--r--Utilities/cmnghttp2/CMakeLists.txt2
-rw-r--r--Utilities/cmzlib/CMakeLists.txt2
-rw-r--r--Utilities/cmzstd/CMakeLists.txt2
241 files changed, 1743 insertions, 499 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 708d80a..ed57278 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -52,7 +52,7 @@ prep:doc-package:
- .cmake_doc_artifacts
- .run_only_for_package
-.upload:source-package:
+upload:source-package:
extends:
- .rsync_upload_binary
- .run_only_for_package
@@ -70,7 +70,7 @@ build:help:master:
- .cmake_org_help
- .run_only_for_continuous_master
-.upload:help:master:
+upload:help:master:
extends:
- .rsync_upload_help
- .run_only_for_continuous_master
@@ -86,7 +86,7 @@ build:help:stage:
- .cmake_org_help
- .run_only_for_continuous_stage
-.upload:help:stage:
+upload:help:stage:
extends:
- .rsync_upload_help
- .run_only_for_continuous_stage
@@ -522,7 +522,7 @@ build:linux-x86_64-package:
needs:
- prep:doc-package
-.upload:linux-x86_64-package:
+upload:linux-x86_64-package:
extends:
- .rsync_upload_binary
- .run_only_for_package
@@ -546,7 +546,7 @@ build:linux-aarch64-package:
needs:
- prep:doc-package
-.upload:linux-aarch64-package:
+upload:linux-aarch64-package:
extends:
- .rsync_upload_binary
- .run_only_for_package
@@ -687,7 +687,7 @@ build:macos-package:
needs:
- prep:doc-package
-.upload:macos-package:
+upload:macos-package:
extends:
- .rsync_upload_binary
- .run_only_for_package
@@ -710,7 +710,7 @@ build:macos10.10-package:
needs:
- prep:doc-package
-.upload:macos10.10-package:
+upload:macos10.10-package:
extends:
- .rsync_upload_binary
- .run_only_for_package
@@ -754,3 +754,45 @@ test:windows-vs2019-x64:
- test:windows-vs2019-x64-ninja
needs:
- test:windows-vs2019-x64-ninja
+
+test:windows-borland5.5:
+ extends:
+ - .windows_borland5.5
+ - .cmake_test_windows_borland
+ - .windows_builder_ext_tags
+ - .cmake_junit_artifacts
+ - .run_dependent
+ dependencies:
+ - test:windows-vs2019-x64-ninja
+ needs:
+ - test:windows-vs2019-x64-ninja
+ variables:
+ CMAKE_CI_JOB_NIGHTLY: "true"
+
+test:windows-borland5.8:
+ extends:
+ - .windows_borland5.8
+ - .cmake_test_windows_borland
+ - .windows_builder_ext_tags
+ - .cmake_junit_artifacts
+ - .run_dependent
+ dependencies:
+ - test:windows-vs2019-x64-ninja
+ needs:
+ - test:windows-vs2019-x64-ninja
+ variables:
+ CMAKE_CI_JOB_NIGHTLY: "true"
+
+test:windows-openwatcom1.9:
+ extends:
+ - .windows_openwatcom1.9
+ - .cmake_test_windows_openwatcom
+ - .windows_builder_ext_tags
+ - .cmake_junit_artifacts
+ - .run_dependent
+ dependencies:
+ - test:windows-vs2019-x64-ninja
+ needs:
+ - test:windows-vs2019-x64-ninja
+ variables:
+ CMAKE_CI_JOB_NIGHTLY: "true"
diff --git a/.gitlab/ci/borland.ps1 b/.gitlab/ci/borland.ps1
new file mode 100755
index 0000000..146a047
--- /dev/null
+++ b/.gitlab/ci/borland.ps1
@@ -0,0 +1,37 @@
+$erroractionpreference = "stop"
+
+if ("$env:CMAKE_CONFIGURATION".Contains("borland5.5")) {
+ # Borland C++ 5.5 Free Command-line Tools
+ # https://web.archive.org/web/20110402064356/https://www.embarcadero.com/products/cbuilder/free-compiler
+ $filename = "bcc5.5-1"
+ $sha256sum = "895B76F8F1AD8030F31ACE239EBC623DC7379C121A540F55F611B93F3CB9AF52"
+} elseif ("$env:CMAKE_CONFIGURATION".Contains("borland5.8")) {
+ # Borland C++ Builder 2006
+ # https://web.archive.org/web/20060303030019/https://www.borland.com/us/products/cbuilder/index.html
+ $filename = "bcc5.8-1"
+ $sha256sum = "C30981BFD540C933E76D82D873DEE05E7482F34F68E309065DE0D181C95F77E3"
+} else {
+ throw ('unknown CMAKE_CONFIGURATION: ' + "$env:CMAKE_CONFIGURATION")
+}
+$tarball = "$filename.zip"
+
+$outdir = $pwd.Path
+$outdir = "$outdir\.gitlab"
+$ProgressPreference = 'SilentlyContinue'
+# This URL is only visible inside of Kitware's network. See above filename table.
+Invoke-WebRequest -Uri "https://cmake.org/files/dependencies/internal/$tarball" -OutFile "$outdir\$tarball"
+$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
+if ($hash.Hash -ne $sha256sum) {
+ exit 1
+}
+
+Add-Type -AssemblyName System.IO.Compression.FileSystem
+[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
+Move-Item -Path "$outdir\$filename" -Destination "$outdir\bcc"
+
+$tools = "bcc32", "ilink32"
+foreach ($tool in $tools) {
+ $cfg = Get-Content -path "$outdir\bcc\bin\$tool.cfg.in" -Raw
+ $cfg = $cfg -replace "@BCC_ROOT@","$outdir\bcc"
+ $cfg | Set-Content -path "$outdir\bcc\bin\$tool.cfg"
+}
diff --git a/.gitlab/ci/configure_windows_borland5.5.cmake b/.gitlab/ci/configure_windows_borland5.5.cmake
new file mode 100644
index 0000000..82c4178
--- /dev/null
+++ b/.gitlab/ci/configure_windows_borland5.5.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_borland_common.cmake")
diff --git a/.gitlab/ci/configure_windows_borland5.8.cmake b/.gitlab/ci/configure_windows_borland5.8.cmake
new file mode 100644
index 0000000..82c4178
--- /dev/null
+++ b/.gitlab/ci/configure_windows_borland5.8.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_borland_common.cmake")
diff --git a/.gitlab/ci/configure_windows_borland_common.cmake b/.gitlab/ci/configure_windows_borland_common.cmake
new file mode 100644
index 0000000..6d66a05
--- /dev/null
+++ b/.gitlab/ci/configure_windows_borland_common.cmake
@@ -0,0 +1,2 @@
+set(configure_no_sccache 1)
+include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")
diff --git a/.gitlab/ci/configure_windows_openwatcom1.9.cmake b/.gitlab/ci/configure_windows_openwatcom1.9.cmake
new file mode 100644
index 0000000..f29c3f4
--- /dev/null
+++ b/.gitlab/ci/configure_windows_openwatcom1.9.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_openwatcom_common.cmake")
diff --git a/.gitlab/ci/configure_windows_openwatcom_common.cmake b/.gitlab/ci/configure_windows_openwatcom_common.cmake
new file mode 100644
index 0000000..6d66a05
--- /dev/null
+++ b/.gitlab/ci/configure_windows_openwatcom_common.cmake
@@ -0,0 +1,2 @@
+set(configure_no_sccache 1)
+include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")
diff --git a/.gitlab/ci/openwatcom.ps1 b/.gitlab/ci/openwatcom.ps1
new file mode 100755
index 0000000..4f1012c
--- /dev/null
+++ b/.gitlab/ci/openwatcom.ps1
@@ -0,0 +1,25 @@
+$erroractionpreference = "stop"
+
+if ("$env:CMAKE_CONFIGURATION".Contains("openwatcom1.9")) {
+ # Open Watcom 1.9
+ # https://web.archive.org/web/20210312132437/http://www.openwatcom.org/download.php
+ $filename = "open-watcom-1.9-1"
+ $sha256sum = "FFE6F5BBA200912697C6EC26C4D3B2623A0358FBE7CBB23BD264CBF7D54E4988"
+} else {
+ throw ('unknown CMAKE_CONFIGURATION: ' + "$env:CMAKE_CONFIGURATION")
+}
+$tarball = "$filename.zip"
+
+$outdir = $pwd.Path
+$outdir = "$outdir\.gitlab"
+$ProgressPreference = 'SilentlyContinue'
+# This URL is only visible inside of Kitware's network. See above filename table.
+Invoke-WebRequest -Uri "https://cmake.org/files/dependencies/internal/$tarball" -OutFile "$outdir\$tarball"
+$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
+if ($hash.Hash -ne $sha256sum) {
+ exit 1
+}
+
+Add-Type -AssemblyName System.IO.Compression.FileSystem
+[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
+Move-Item -Path "$outdir\$filename" -Destination "$outdir\watcom"
diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml
index 8037b33..15d883d 100644
--- a/.gitlab/os-windows.yml
+++ b/.gitlab/os-windows.yml
@@ -52,6 +52,42 @@
CMAKE_GENERATOR_TOOLSET: "v142,version=14.29.30133"
CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
+.windows_borland:
+ extends: .windows
+
+ variables:
+ CMAKE_GENERATOR: "Borland Makefiles"
+ CMAKE_CI_BUILD_TYPE: Release
+ CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
+
+.windows_borland5.5:
+ extends: .windows_borland
+
+ variables:
+ CMAKE_CONFIGURATION: windows_borland5.5
+
+.windows_borland5.8:
+ extends: .windows_borland
+
+ variables:
+ CMAKE_CONFIGURATION: windows_borland5.8
+
+.windows_openwatcom:
+ extends: .windows
+
+ variables:
+ # Watcom does not support spaces in the path.
+ GIT_CLONE_PATH: "$CI_BUILDS_DIR\\cmake-ci-ext\\$CI_CONCURRENT_ID"
+ CMAKE_GENERATOR: "Watcom WMake"
+ CMAKE_CI_BUILD_TYPE: Release
+ CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
+
+.windows_openwatcom1.9:
+ extends: .windows_openwatcom
+
+ variables:
+ CMAKE_CONFIGURATION: windows_openwatcom1.9
+
## Tags
.windows_builder_tags:
@@ -123,3 +159,28 @@
- build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake
interruptible: true
+
+.cmake_test_windows_borland:
+ stage: test-ext
+
+ script:
+ - Invoke-Expression -Command .gitlab/ci/borland.ps1
+ - $pwdpath = $pwd.Path
+ - Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\bcc\bin;$env:PATH"
+ - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake
+
+ interruptible: true
+
+.cmake_test_windows_openwatcom:
+ stage: test-ext
+
+ script:
+ - Invoke-Expression -Command .gitlab/ci/openwatcom.ps1
+ - $pwdpath = $pwd.Path
+ - Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\watcom\binnt;$pwdpath\.gitlab\watcom\binw;$env:PATH"
+ - Set-Item -Force -Path "env:INCLUDE" -Value "$pwdpath\.gitlab\watcom\h;$pwdpath\.gitlab\watcom\h\nt"
+ - Set-Item -Force -Path "env:EDPATH" -Value "$pwdpath\.gitlab\watcom\eddat"
+ - Set-Item -Force -Path "env:WATCOM" -Value "$pwdpath\.gitlab\watcom"
+ - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake
+
+ interruptible: true
diff --git a/Auxiliary/cmake.m4 b/Auxiliary/cmake.m4
index a40c0ae..39826bc 100644
--- a/Auxiliary/cmake.m4
+++ b/Auxiliary/cmake.m4
@@ -13,7 +13,7 @@ fi
# $2: language (e.g. C/CXX/Fortran)
# $3: The compiler ID, defaults to GNU.
# Possible values are: GNU, Intel, Clang, SunPro, HP, XL, VisualAge, PGI,
-# PathScale, Cray, SCO, MSVC
+# PathScale, Cray, SCO, MSVC, LCC
# $4: optional extra arguments to cmake, e.g. "-DCMAKE_SIZEOF_VOID_P=8"
# $5: optional path to cmake binary
AC_DEFUN([CMAKE_FIND_PACKAGE], [
diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim
index 7a3e4ed..e09ecf3 100644
--- a/Auxiliary/vim/syntax/cmake.vim
+++ b/Auxiliary/vim/syntax/cmake.vim
@@ -1608,6 +1608,7 @@ syn keyword cmakeVariable contained
\ CTEST_SCP_COMMAND
\ CTEST_SITE
\ CTEST_SOURCE_DIRECTORY
+ \ CTEST_SUBMIT_INACTIVITY_TIMEOUT
\ CTEST_SUBMIT_URL
\ CTEST_SVN_COMMAND
\ CTEST_SVN_OPTIONS
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fdfe456..1e63f44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
-cmake_minimum_required(VERSION 3.1...3.20 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.1...3.21 FATAL_ERROR)
set(CMAKE_USER_MAKE_RULES_OVERRIDE_C ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideC.cmake)
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideCXX.cmake)
project(CMake)
@@ -633,7 +633,7 @@ macro (CMAKE_BUILD_UTILITIES)
message(FATAL_ERROR
"CMAKE_USE_SYSTEM_JSONCPP is ON but a JsonCpp is not found!")
endif()
- if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC|Clang")
set_property(TARGET JsonCpp::JsonCpp APPEND PROPERTY
INTERFACE_COMPILE_OPTIONS -Wno-deprecated-declarations)
endif()
@@ -820,7 +820,8 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND
NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS 3.0 AND
NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") OR
- CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
+ CMAKE_C_COMPILER_ID STREQUAL "AppleClang" OR
+ CMAKE_C_COMPILER_ID STREQUAL "LCC")
set(C_FLAGS_LIST -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts
-Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security
-Wmissing-format-attribute -fno-common -Wundef
diff --git a/Copyright.txt b/Copyright.txt
index 7f51293..b703193 100644
--- a/Copyright.txt
+++ b/Copyright.txt
@@ -63,6 +63,7 @@ The following individuals and institutions are among the Contributors:
* Ilya Lavrenov <ilya.lavrenov@itseez.com>
* Insight Software Consortium <insightsoftwareconsortium.org>
* Jan Woetzel
+* Jordan Williams <jordan@jwillikers.com>
* Julien Schueller
* Kelly Thompson <kgt@lanl.gov>
* Konstantin Podsvirov <konstantin@podsvirov.pro>
diff --git a/Help/command/file.rst b/Help/command/file.rst
index 5a3fd88..799b6ff 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -838,8 +838,8 @@ of their content even if options are used to select a subset of
files.
The ``INSTALL`` signature differs slightly from ``COPY``: it prints
-status messages (subject to the :variable:`CMAKE_INSTALL_MESSAGE` variable),
-and ``NO_SOURCE_PERMISSIONS`` is default.
+status messages, and ``NO_SOURCE_PERMISSIONS`` is default.
+
Installation scripts generated by the :command:`install` command
use this signature (with some undocumented options for internal use).
diff --git a/Help/cpack_gen/ifw.rst b/Help/cpack_gen/ifw.rst
index 6817eac..6b8bc26 100644
--- a/Help/cpack_gen/ifw.rst
+++ b/Help/cpack_gen/ifw.rst
@@ -195,6 +195,14 @@ Package
Is ``ON`` for QtIFW less 2.0 tools.
+.. variable:: CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE
+
+ .. versionadded:: 3.23
+
+ Set to ``ON`` if command line interface features should be disabled.
+
+ Is ``OFF`` by default, but will only have an effect if using QtIFW 4.0 or later.
+
.. variable:: CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH
.. versionadded:: 3.3
@@ -248,6 +256,42 @@ Package
By default is ``OFF`` or used value
from ``CPACK_DOWNLOAD_ALL`` if set
+.. variable:: CPACK_IFW_PACKAGE_PRODUCT_IMAGES
+
+ .. versionadded:: 3.23
+
+ A list of images to be shown on the ``PerformInstallationPage``.
+
+ This feature is available for QtIFW 4.0.0 or newer.
+
+.. variable:: CPACK_IFW_PACKAGE_RUN_PROGRAM
+
+ .. versionadded:: 3.23
+
+ Command executed after the installer is done if the user accepts the action.
+ Provide the full path to the application.
+
+ This feature is available for QtIFW 4.0.0 and newer.
+
+.. variable:: CPACK_IFW_PACKAGE_RUN_PROGRAM_ARGUMENTS
+
+ .. versionadded:: 3.23
+
+ List of arguments passed to the program specified in
+ :variable:`CPACK_IFW_PACKAGE_RUN_PROGRAM`.
+
+ This feature is available for QtIFW 4.0.0 and newer.
+
+.. variable:: CPACK_IFW_PACKAGE_RUN_PROGRAM_DESCRIPTION
+
+ .. versionadded:: 3.23
+
+ Text shown next to the check box for running the program after the
+ installation. If :variable:`CPACK_IFW_PACKAGE_RUN_PROGRAM` is set but no
+ description provided, the UI will display ``Run <Name> now``. instead.
+
+ This feature is available for QtIFW 4.0.0 and newer.
+
Components
""""""""""
diff --git a/Help/cpack_gen/wix.rst b/Help/cpack_gen/wix.rst
index 79f835e..e9d5af6 100644
--- a/Help/cpack_gen/wix.rst
+++ b/Help/cpack_gen/wix.rst
@@ -320,3 +320,11 @@ Windows using WiX.
name is the plain namespace without the usual xmlns: prefix and url is an unquoted
namespace url. A list of commonly known WiX schemata can be found here:
https://wixtoolset.org/documentation/manual/v3/xsd/
+
+.. variable:: CPACK_WIX_SKIP_WIX_UI_EXTENSION
+
+ .. versionadded:: 3.23
+
+ If this variable is set then the inclusion of WixUIExtensions is skipped,
+ i.e. the ``-ext "WixUIExtension"`` command line is not included during
+ the execution of the WiX light tool.
diff --git a/Help/guide/tutorial/Complete/CMakeLists.txt b/Help/guide/tutorial/Complete/CMakeLists.txt
index ac1d083..e4422c0 100644
--- a/Help/guide/tutorial/Complete/CMakeLists.txt
+++ b/Help/guide/tutorial/Complete/CMakeLists.txt
@@ -10,7 +10,7 @@ target_compile_features(tutorial_compiler_flags INTERFACE cxx_std_11)
# add compiler warning flags just when building this project via
# the BUILD_INTERFACE genex
-set(gcc_like_cxx "$<COMPILE_LANG_AND_ID:CXX,ARMClang,AppleClang,Clang,GNU>")
+set(gcc_like_cxx "$<COMPILE_LANG_AND_ID:CXX,ARMClang,AppleClang,Clang,GNU,LCC>")
set(msvc_cxx "$<COMPILE_LANG_AND_ID:CXX,MSVC>")
target_compile_options(tutorial_compiler_flags INTERFACE
"$<${gcc_like_cxx}:$<BUILD_INTERFACE:-Wall;-Wextra;-Wshadow;-Wformat=2;-Wunused>>"
diff --git a/Help/guide/tutorial/Step11/CMakeLists.txt b/Help/guide/tutorial/Step11/CMakeLists.txt
index 10f35ce..d20b391 100644
--- a/Help/guide/tutorial/Step11/CMakeLists.txt
+++ b/Help/guide/tutorial/Step11/CMakeLists.txt
@@ -8,7 +8,7 @@ target_compile_features(tutorial_compiler_flags INTERFACE cxx_std_11)
# add compiler warning flags just when building this project via
# the BUILD_INTERFACE genex
-set(gcc_like_cxx "$<COMPILE_LANG_AND_ID:CXX,ARMClang,AppleClang,Clang,GNU>")
+set(gcc_like_cxx "$<COMPILE_LANG_AND_ID:CXX,ARMClang,AppleClang,Clang,GNU,LCC>")
set(msvc_cxx "$<COMPILE_LANG_AND_ID:CXX,MSVC>")
target_compile_options(tutorial_compiler_flags INTERFACE
"$<${gcc_like_cxx}:$<BUILD_INTERFACE:-Wall;-Wextra;-Wshadow;-Wformat=2;-Wunused>>"
diff --git a/Help/guide/tutorial/Step12/CMakeLists.txt b/Help/guide/tutorial/Step12/CMakeLists.txt
index 634b84c..63f9643 100644
--- a/Help/guide/tutorial/Step12/CMakeLists.txt
+++ b/Help/guide/tutorial/Step12/CMakeLists.txt
@@ -8,7 +8,7 @@ target_compile_features(tutorial_compiler_flags INTERFACE cxx_std_11)
# add compiler warning flags just when building this project via
# the BUILD_INTERFACE genex
-set(gcc_like_cxx "$<COMPILE_LANG_AND_ID:CXX,ARMClang,AppleClang,Clang,GNU>")
+set(gcc_like_cxx "$<COMPILE_LANG_AND_ID:CXX,ARMClang,AppleClang,Clang,GNU,LCC>")
set(msvc_cxx "$<COMPILE_LANG_AND_ID:CXX,MSVC>")
target_compile_options(tutorial_compiler_flags INTERFACE
"$<${gcc_like_cxx}:$<BUILD_INTERFACE:-Wall;-Wextra;-Wshadow;-Wformat=2;-Wunused>>"
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index bb5dba3..435b2c6 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -239,6 +239,7 @@ Properties on Targets
/prop_tgt/IMPORTED_LOCATION_CONFIG
/prop_tgt/IMPORTED_NO_SONAME
/prop_tgt/IMPORTED_NO_SONAME_CONFIG
+ /prop_tgt/IMPORTED_NO_SYSTEM
/prop_tgt/IMPORTED_OBJECTS
/prop_tgt/IMPORTED_OBJECTS_CONFIG
/prop_tgt/IMPORTED_SONAME
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index a2103f7..ad96c09 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -665,6 +665,7 @@ Variables for CTest
/variable/CTEST_SCP_COMMAND
/variable/CTEST_SCRIPT_DIRECTORY
/variable/CTEST_SITE
+ /variable/CTEST_SUBMIT_INACTIVITY_TIMEOUT
/variable/CTEST_SUBMIT_URL
/variable/CTEST_SOURCE_DIRECTORY
/variable/CTEST_SVN_COMMAND
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index 03d8bf6..52e8009 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -1349,6 +1349,13 @@ Configuration settings include:
* :module:`CTest` module variable: ``SUBMIT_URL`` if set,
else ``CTEST_SUBMIT_URL``
+``SubmitInactivityTimeout``
+ The time to wait for the submission after which it is canceled
+ if not completed. Specify a zero value to disable timeout.
+
+ * `CTest Script`_ variable: :variable:`CTEST_SUBMIT_INACTIVITY_TIMEOUT`
+ * :module:`CTest` module variable: ``CTEST_SUBMIT_INACTIVITY_TIMEOUT``
+
``TriggerSite``
Legacy option. Not used.
diff --git a/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst b/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst
new file mode 100644
index 0000000..cc726d1
--- /dev/null
+++ b/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst
@@ -0,0 +1,17 @@
+IMPORTED_NO_SYSTEM
+------------------
+
+Specifies that an :ref:`Imported Target <Imported Targets>` is not
+a ``SYSTEM`` library. This has the following effects:
+
+* Entries of :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` are not treated
+ as ``SYSTEM`` include directories when compiling consumers, as they
+ would be by default.
+
+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
+:command:`export` commands to enable it on the imported targets they generate.
+
+See the :prop_tgt:`NO_SYSTEM_FROM_IMPORTED` target property to set this
+behavior on the target consuming the include directories rather than
+providing them.
diff --git a/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst b/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst
index 880343d..e5cc09b 100644
--- a/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst
+++ b/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst
@@ -13,3 +13,6 @@ imported targets as system includes.
This property is initialized by the value of the
:variable:`CMAKE_NO_SYSTEM_FROM_IMPORTED` variable if it is set when a target
is created.
+
+See the :prop_tgt:`IMPORTED_NO_SYSTEM` target property to set this behavior
+on the target providing the include directories rather than consuming them.
diff --git a/Help/release/dev/0-sample-topic.rst b/Help/release/dev/0-sample-topic.rst
new file mode 100644
index 0000000..e4cc01e
--- /dev/null
+++ b/Help/release/dev/0-sample-topic.rst
@@ -0,0 +1,7 @@
+0-sample-topic
+--------------
+
+* This is a sample release note for the change in a topic.
+ Developers should add similar notes for each topic branch
+ making a noteworthy change. Each document should be named
+ and titled to match the topic name to avoid merge conflicts.
diff --git a/Help/release/dev/cpack-wix-skip-ui-ext.rst b/Help/release/dev/cpack-wix-skip-ui-ext.rst
new file mode 100644
index 0000000..e139469
--- /dev/null
+++ b/Help/release/dev/cpack-wix-skip-ui-ext.rst
@@ -0,0 +1,5 @@
+cpack-wix-skip-ui-ext
+---------------------
+
+* An option to the WiX Generator was added to be able to skip
+ the inclusion of the WixUIExtensions
diff --git a/Help/release/dev/cpackifw-package-disable-command-line-interface.rst b/Help/release/dev/cpackifw-package-disable-command-line-interface.rst
new file mode 100644
index 0000000..2de222e
--- /dev/null
+++ b/Help/release/dev/cpackifw-package-disable-command-line-interface.rst
@@ -0,0 +1,8 @@
+cpackifw-package-disable-command-line-interface
+-----------------------------------------------
+
+* The :cpack_gen:`CPack IFW Generator` gained new
+ :variable:`CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE` variable to
+ prevents the user from passing any consumer command to installer, like
+ ``install``, ``update``, and ``remove``.
+ This feature is available for QtIFW 4.0 and newer.
diff --git a/Help/release/dev/cpackifw-package-product-images.rst b/Help/release/dev/cpackifw-package-product-images.rst
new file mode 100644
index 0000000..3a02534
--- /dev/null
+++ b/Help/release/dev/cpackifw-package-product-images.rst
@@ -0,0 +1,8 @@
+
+cpackifw-package-product-images
+-------------------------------
+
+* The :cpack_gen:`CPack IFW Generator` gained the new
+ :variable:`CPACK_IFW_PACKAGE_PRODUCT_IMAGES` variable for adding a list of
+ images to be shown on the ``PerformInstallationPage``.
+ This feature is available for QtIFW 4.0 and newer.
diff --git a/Help/release/dev/cpackifw-package-run-program.rst b/Help/release/dev/cpackifw-package-run-program.rst
new file mode 100644
index 0000000..5d6f1b2
--- /dev/null
+++ b/Help/release/dev/cpackifw-package-run-program.rst
@@ -0,0 +1,10 @@
+
+cpackifw-package-run-program
+----------------------------
+
+* The :cpack_gen:`CPack IFW Generator` gained the new
+ :variable:`CPACK_IFW_PACKAGE_RUN_PROGRAM`,
+ :variable:`CPACK_IFW_PACKAGE_RUN_PROGRAM_ARGUMENTS`, and
+ :variable:`CPACK_IFW_PACKAGE_RUN_PROGRAM_DESCRIPTION` variables for executing
+ a command after the installer is done if the user accepts the action.
+ This feature is available for QtIFW 4.0 and newer.
diff --git a/Help/release/dev/ctest_submit-inactivity-timeout.rst b/Help/release/dev/ctest_submit-inactivity-timeout.rst
new file mode 100644
index 0000000..3d4c408
--- /dev/null
+++ b/Help/release/dev/ctest_submit-inactivity-timeout.rst
@@ -0,0 +1,5 @@
+ctest_submit-inactivity-timeout
+-------------------------------
+
+* :manual:`ctest(1)` gained a new :variable:`CTEST_SUBMIT_INACTIVITY_TIMEOUT`
+ variable, which can be used to specify a timeout for submission inactivity.
diff --git a/Help/release/dev/cuda-ptx-separable-compilation.rst b/Help/release/dev/cuda-ptx-separable-compilation.rst
new file mode 100644
index 0000000..49c66c0
--- /dev/null
+++ b/Help/release/dev/cuda-ptx-separable-compilation.rst
@@ -0,0 +1,5 @@
+cuda-ptx-separable-compilation
+------------------------------
+
+* ``CUDA`` targets can now enable both :prop_tgt:`CUDA_SEPARABLE_COMPILATION` and
+ :prop_tgt:`CUDA_PTX_COMPILATION`.
diff --git a/Help/release/dev/imported-no-system.rst b/Help/release/dev/imported-no-system.rst
new file mode 100644
index 0000000..a35e8bb
--- /dev/null
+++ b/Help/release/dev/imported-no-system.rst
@@ -0,0 +1,7 @@
+imported-no-system
+------------------
+
+* The :prop_tgt:`IMPORTED_NO_SYSTEM` target property was added to
+ specify that an :ref:`Imported Target <Imported Targets>` should
+ not be treated as a system library (i.e. its include directories
+ are not automatically ``SYSTEM``).
diff --git a/Help/release/dev/lcc-compiler.rst b/Help/release/dev/lcc-compiler.rst
new file mode 100644
index 0000000..59deef8
--- /dev/null
+++ b/Help/release/dev/lcc-compiler.rst
@@ -0,0 +1,4 @@
+lcc-compiler
+------------
+
+* The MCST LCC compiler is now supported with compiler id ``LCC``.
diff --git a/Help/release/index.rst b/Help/release/index.rst
index 3d2ed43..131595a 100644
--- a/Help/release/index.rst
+++ b/Help/release/index.rst
@@ -7,6 +7,8 @@ CMake Release Notes
This file should include the adjacent "dev.txt" file
in development versions but not in release versions.
+.. include:: dev.txt
+
Releases
========
diff --git a/Help/variable/CMAKE_LANG_COMPILER_ID.rst b/Help/variable/CMAKE_LANG_COMPILER_ID.rst
index 0abedde..1db42c7 100644
--- a/Help/variable/CMAKE_LANG_COMPILER_ID.rst
+++ b/Help/variable/CMAKE_LANG_COMPILER_ID.rst
@@ -28,6 +28,7 @@ include:
IAR = IAR Systems (iar.com)
Intel = Intel Compiler (intel.com)
IntelLLVM = Intel LLVM-Based Compiler (intel.com)
+ LCC = MCST Elbrus C/C++/Fortran Compiler (mcst.ru)
MSVC = Microsoft Visual Studio (microsoft.com)
NVHPC = NVIDIA HPC SDK Compiler (nvidia.com)
NVIDIA = NVIDIA CUDA Compiler (nvidia.com)
diff --git a/Help/variable/CTEST_SUBMIT_INACTIVITY_TIMEOUT.rst b/Help/variable/CTEST_SUBMIT_INACTIVITY_TIMEOUT.rst
new file mode 100644
index 0000000..65976fa
--- /dev/null
+++ b/Help/variable/CTEST_SUBMIT_INACTIVITY_TIMEOUT.rst
@@ -0,0 +1,5 @@
+CTEST_SUBMIT_INACTIVITY_TIMEOUT
+-------------------------------
+
+Specify the CTest ``SubmitInactivityTimeout`` setting
+in a :manual:`ctest(1)` dashboard client script.
diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake
index e9cfed6..94b67dc 100644
--- a/Modules/CMakeCUDAInformation.cmake
+++ b/Modules/CMakeCUDAInformation.cmake
@@ -160,22 +160,9 @@ if(NOT DEFINED CMAKE_CUDA_ARCHIVE_FINISH)
set(CMAKE_CUDA_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
endif()
-#Specify how to compile when ptx has been requested
-if(NOT CMAKE_CUDA_COMPILE_PTX_COMPILATION)
- set(CMAKE_CUDA_COMPILE_PTX_COMPILATION
- "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} ${_CMAKE_CUDA_PTX_FLAG} <SOURCE> -o <OBJECT>")
-endif()
-
-#Specify how to compile when separable compilation has been requested
-if(NOT CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION)
- set(CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION
- "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} ${_CMAKE_CUDA_DEVICE_CODE} <SOURCE> -o <OBJECT>")
-endif()
-
-#Specify how to compile when whole compilation has been requested
-if(NOT CMAKE_CUDA_COMPILE_WHOLE_COMPILATION)
- set(CMAKE_CUDA_COMPILE_WHOLE_COMPILATION
- "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} -c <SOURCE> -o <OBJECT>")
+if(NOT CMAKE_CUDA_COMPILE_OBJECT)
+ set(CMAKE_CUDA_COMPILE_OBJECT
+ "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} <CUDA_COMPILE_MODE> <SOURCE> -o <OBJECT>")
endif()
# compile a cu file into an executable
diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake
index e6b3ee3..044326c 100644
--- a/Modules/CMakeCompilerIdDetection.cmake
+++ b/Modules/CMakeCompilerIdDetection.cmake
@@ -84,6 +84,7 @@ function(compiler_id_detection outvar lang)
)
list(APPEND ordered_compilers
Clang
+ LCC
GNU
MSVC
ADSP
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 15eab0f..f5298df 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -160,7 +160,7 @@ endif ()
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
if (NOT _CMAKE_TOOLCHAIN_PREFIX)
- if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|QCC")
+ if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|QCC|LCC")
get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
if (COMPILER_BASENAME MATCHES "^(.+-)?(clang|g?cc)(-cl)?(-[0-9]+(\\.[0-9]+)*)?(-[^.]+)?(\\.exe)?$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 72dc8d3..fd3d028 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -159,7 +159,7 @@ endif ()
if (NOT _CMAKE_TOOLCHAIN_PREFIX)
- if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|QCC")
+ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|QCC|LCC")
get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
if (COMPILER_BASENAME MATCHES "^(.+-)?(clang\\+\\+|[gc]\\+\\+|clang-cl)(-[0-9]+(\\.[0-9]+)*)?(-[^.]+)?(\\.exe)?$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
diff --git a/Modules/CMakeDetermineCompiler.cmake b/Modules/CMakeDetermineCompiler.cmake
index c967ab7..aec86d9 100644
--- a/Modules/CMakeDetermineCompiler.cmake
+++ b/Modules/CMakeDetermineCompiler.cmake
@@ -148,7 +148,7 @@ macro(_cmake_find_compiler_path lang)
endmacro()
function(_cmake_find_compiler_sysroot lang)
- if(CMAKE_${lang}_COMPILER_ID STREQUAL "GNU")
+ if(CMAKE_${lang}_COMPILER_ID STREQUAL "GNU" OR CMAKE_${lang}_COMPILER_ID STREQUAL "LCC")
execute_process(COMMAND "${CMAKE_${lang}_COMPILER}" -print-sysroot
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE _cmake_sysroot_run_out
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index fa283fe..6437be0 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -150,7 +150,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
endif()
endif()
- if (COMPILER_QNXNTO AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU")
+ if (COMPILER_QNXNTO AND (CMAKE_${lang}_COMPILER_ID STREQUAL "GNU" OR CMAKE_${lang}_COMPILER_ID STREQUAL "LCC"))
execute_process(
COMMAND "${CMAKE_${lang}_COMPILER}"
-V
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 6a8984b..33b8bf4 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -78,12 +78,13 @@ else()
set(CMAKE_Fortran_COMPILER_LIST
ftn
ifort ifc ifx efc pgf95 pgfortran lf95 xlf95 fort
- flang gfortran gfortran-4 g95 f90 pgf90
+ flang lfortran gfortran gfortran-4 g95 f90 pgf90
frt pgf77 xlf g77 f77 nag
)
endif()
# Vendor-specific compiler names.
+ set(_Fortran_COMPILER_NAMES_LCC lfortran gfortran)
set(_Fortran_COMPILER_NAMES_GNU gfortran gfortran-4 g95 g77)
set(_Fortran_COMPILER_NAMES_Intel ifort ifc efc ifx)
set(_Fortran_COMPILER_NAMES_Absoft af95 af90 af77)
diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
index f90301b..5d7d430 100644
--- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
+++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
@@ -88,7 +88,7 @@ set(ENV{LANG} C)
# Now check for C, works for gcc and Intel compiler at least
if (NOT CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS)
- if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES "Intel" OR CMAKE_C_COMPILER_ID MATCHES Clang)
+ if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES "LCC" OR CMAKE_C_COMPILER_ID MATCHES "Intel" OR CMAKE_C_COMPILER_ID MATCHES Clang)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs _defines)
set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories")
set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "C compiler system defined macros")
@@ -99,7 +99,7 @@ endif ()
# And now the same for C++
if (NOT CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS)
- if ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Clang)
+ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "LCC" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Clang)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs _defines)
set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "CXX compiler system include directories")
set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "CXX compiler system defined macros")
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index d0e0e46..969c841 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -95,6 +95,13 @@
# endif
#elif defined(__ABSOFT__)
PRINT *, 'INFO:compiler[Absoft]'
+#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))
+ PRINT *, 'INFO:compiler[LCC]'
+# define COMPILER_VERSION_MAJOR DEC(1)
+# define COMPILER_VERSION_MINOR DEC(__LCC__ - 100)
+# if defined(__LCC_MINOR__)
+# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__)
+# endif
#elif defined(__GNUC__)
PRINT *, 'INFO:compiler[GNU]'
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index a61f71b..6bdefde 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -58,6 +58,10 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
endif()
separate_arguments(args NATIVE_COMMAND "${line}")
list(GET args 0 cmd)
+ if("${cmd}" MATCHES "->")
+ # LCC has '-> ' in-front of the linker
+ list(GET args 1 cmd)
+ endif()
else()
#check to see if the link line is comma-separated instead of space separated
string(REGEX REPLACE "," " " line "${line}")
diff --git a/Modules/Compiler/Clang-CUDA.cmake b/Modules/Compiler/Clang-CUDA.cmake
index 0223081..b105518 100644
--- a/Modules/Compiler/Clang-CUDA.cmake
+++ b/Modules/Compiler/Clang-CUDA.cmake
@@ -18,8 +18,9 @@ __compiler_clang_cxx_standards(CUDA)
set(CMAKE_CUDA_COMPILER_HAS_DEVICE_LINK_PHASE TRUE)
set(_CMAKE_COMPILE_AS_CUDA_FLAG "-x cuda")
+set(_CMAKE_CUDA_WHOLE_FLAG "-c")
+set(_CMAKE_CUDA_RDC_FLAG "-fgpu-rdc")
set(_CMAKE_CUDA_PTX_FLAG "--cuda-device-only -S")
-set(_CMAKE_CUDA_DEVICE_CODE "-fgpu-rdc -c")
# RulePlaceholderExpander expands crosscompile variables like sysroot and target only for CMAKE_<LANG>_COMPILER. Override the default.
set(CMAKE_CUDA_LINK_EXECUTABLE "<CMAKE_CUDA_COMPILER> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICIT_LINKS}")
diff --git a/Modules/Compiler/LCC-C-DetermineCompiler.cmake b/Modules/Compiler/LCC-C-DetermineCompiler.cmake
new file mode 100644
index 0000000..6c7a08f
--- /dev/null
+++ b/Modules/Compiler/LCC-C-DetermineCompiler.cmake
@@ -0,0 +1,11 @@
+
+set(_compiler_id_pp_test "defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))")
+
+set(_compiler_id_version_compute "
+# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(1)
+# if defined(__LCC__)
+# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__LCC__- 100)
+# endif
+# if defined(__LCC_MINOR__)
+# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__LCC_MINOR__)
+# endif")
diff --git a/Modules/Compiler/LCC-C-FeatureTests.cmake b/Modules/Compiler/LCC-C-FeatureTests.cmake
new file mode 100644
index 0000000..0ab5265
--- /dev/null
+++ b/Modules/Compiler/LCC-C-FeatureTests.cmake
@@ -0,0 +1,17 @@
+
+set(_cmake_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 304")
+
+# GNU 4.7 correctly sets __STDC_VERSION__ to 201112L, but GNU 4.6 sets it
+# to 201000L. As the former is strictly greater than the latter, test only
+# for the latter. If in the future CMake learns about a C feature which was
+# introduced with GNU 4.7, that should test for the correct version, similar
+# to the distinction between __cplusplus and __GXX_EXPERIMENTAL_CXX0X__ tests.
+set(GNU46_C11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L")
+set(_cmake_feature_test_c_static_assert "${GNU46_C11}")
+# Since 3.4 at least:
+set(GNU34_C99 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L")
+set(_cmake_feature_test_c_restrict "${GNU34_C99}")
+set(_cmake_feature_test_c_variadic_macros "${GNU34_C99}")
+
+set(GNU_C90 "${_cmake_oldestSupported}")
+set(_cmake_feature_test_c_function_prototypes "${GNU_C90}")
diff --git a/Modules/Compiler/LCC-C.cmake b/Modules/Compiler/LCC-C.cmake
new file mode 100644
index 0000000..3dd6e68
--- /dev/null
+++ b/Modules/Compiler/LCC-C.cmake
@@ -0,0 +1,29 @@
+include(Compiler/LCC)
+__compiler_lcc(C)
+
+
+if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
+ AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
+ AND CMAKE_DEPFILE_FLAGS_C)
+ # dependencies are computed by the compiler itself
+ set(CMAKE_C_DEPFILE_FORMAT gcc)
+ set(CMAKE_C_DEPENDS_USE_COMPILER TRUE)
+endif()
+
+set(CMAKE_C_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c)
+
+set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90")
+set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90")
+set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
+set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99")
+set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99")
+set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
+set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
+set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
+set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
+set(CMAKE_C17_STANDARD_COMPILE_OPTION "-std=c17")
+set(CMAKE_C17_EXTENSION_COMPILE_OPTION "-std=gnu17")
+set(CMAKE_C23_STANDARD_COMPILE_OPTION "-std=c2x")
+set(CMAKE_C23_EXTENSION_COMPILE_OPTION "-std=gnu2x")
+
+__compiler_check_default_language_standard(C 1.23 90 1.20 11 1.26 17)
diff --git a/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake b/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake
new file mode 100644
index 0000000..6c7a08f
--- /dev/null
+++ b/Modules/Compiler/LCC-CXX-DetermineCompiler.cmake
@@ -0,0 +1,11 @@
+
+set(_compiler_id_pp_test "defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))")
+
+set(_compiler_id_version_compute "
+# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(1)
+# if defined(__LCC__)
+# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__LCC__- 100)
+# endif
+# if defined(__LCC_MINOR__)
+# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__LCC_MINOR__)
+# endif")
diff --git a/Modules/Compiler/LCC-CXX-FeatureTests.cmake b/Modules/Compiler/LCC-CXX-FeatureTests.cmake
new file mode 100644
index 0000000..45c5470
--- /dev/null
+++ b/Modules/Compiler/LCC-CXX-FeatureTests.cmake
@@ -0,0 +1,109 @@
+
+# Reference: http://gcc.gnu.org/projects/cxx0x.html
+# http://gcc.gnu.org/projects/cxx1y.html
+
+set(_cmake_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 404")
+
+set(GNU50_CXX14 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L")
+set(_cmake_feature_test_cxx_variable_templates "${GNU50_CXX14}")
+set(_cmake_feature_test_cxx_relaxed_constexpr "${GNU50_CXX14}")
+set(_cmake_feature_test_cxx_aggregate_default_initializers "${GNU50_CXX14}")
+
+# GNU 4.9 in c++14 mode sets __cplusplus to 201300L, so don't test for the
+# correct value of it below.
+# https://patchwork.ozlabs.org/patch/382470/
+set(GNU49_CXX14 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L")
+set(_cmake_feature_test_cxx_contextual_conversions "${GNU49_CXX14}")
+set(_cmake_feature_test_cxx_attribute_deprecated "${GNU49_CXX14}")
+set(_cmake_feature_test_cxx_decltype_auto "${GNU49_CXX14}")
+set(_cmake_feature_test_cxx_digit_separators "${GNU49_CXX14}")
+set(_cmake_feature_test_cxx_generic_lambdas "${GNU49_CXX14}")
+# GNU 4.3 supports binary literals as an extension, but may warn about
+# use of extensions prior to GNU 4.9
+# http://stackoverflow.com/questions/16334024/difference-between-gcc-binary-literals-and-c14-ones
+set(_cmake_feature_test_cxx_binary_literals "${GNU49_CXX14}")
+# The features below are documented as available in GNU 4.8 (by implementing an
+# earlier draft of the standard paper), but that version of the compiler
+# does not set __cplusplus to a value greater than 201103L until GNU 4.9:
+# http://gcc.gnu.org/onlinedocs/gcc-4.8.2/cpp/Standard-Predefined-Macros.html#Standard-Predefined-Macros
+# http://gcc.gnu.org/onlinedocs/gcc-4.9.0/cpp/Standard-Predefined-Macros.html#Standard-Predefined-Macros
+# So, CMake only reports availability for it with GNU 4.9 or later.
+set(_cmake_feature_test_cxx_return_type_deduction "${GNU49_CXX14}")
+set(_cmake_feature_test_cxx_lambda_init_captures "${GNU49_CXX14}")
+
+# Introduced in GCC 4.8.1
+set(GNU481_CXX11 "((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L")
+set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${GNU481_CXX11}")
+set(_cmake_feature_test_cxx_reference_qualified_functions "${GNU481_CXX11}")
+set(GNU48_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L")
+set(_cmake_feature_test_cxx_alignas "${GNU48_CXX11}")
+# The alignof feature works with GNU 4.7 and -std=c++11, but it is documented
+# as available with GNU 4.8, so treat that as true.
+set(_cmake_feature_test_cxx_alignof "${GNU48_CXX11}")
+set(_cmake_feature_test_cxx_attributes "${GNU48_CXX11}")
+set(_cmake_feature_test_cxx_inheriting_constructors "${GNU48_CXX11}")
+set(_cmake_feature_test_cxx_thread_local "${GNU48_CXX11}")
+set(GNU47_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L")
+set(_cmake_feature_test_cxx_alias_templates "${GNU47_CXX11}")
+set(_cmake_feature_test_cxx_delegating_constructors "${GNU47_CXX11}")
+set(_cmake_feature_test_cxx_extended_friend_declarations "${GNU47_CXX11}")
+set(_cmake_feature_test_cxx_final "${GNU47_CXX11}")
+set(_cmake_feature_test_cxx_nonstatic_member_init "${GNU47_CXX11}")
+set(_cmake_feature_test_cxx_override "${GNU47_CXX11}")
+set(_cmake_feature_test_cxx_user_literals "${GNU47_CXX11}")
+# NOTE: C++11 was ratified in September 2011. GNU 4.7 is the first minor
+# release following that (March 2012), and the first minor release to
+# support -std=c++11. Prior to that, support for C++11 features is technically
+# experiemental and possibly incomplete (see for example the note below about
+# cxx_variadic_template_template_parameters)
+# GNU does not define __cplusplus correctly before version 4.7.
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=1773
+# __GXX_EXPERIMENTAL_CXX0X__ is defined in prior versions, but may not be
+# defined in the future.
+set(GNU_CXX0X_DEFINED "(__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))")
+set(GNU46_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && ${GNU_CXX0X_DEFINED}")
+set(_cmake_feature_test_cxx_constexpr "${GNU46_CXX11}")
+set(_cmake_feature_test_cxx_defaulted_move_initializers "${GNU46_CXX11}")
+set(_cmake_feature_test_cxx_enum_forward_declarations "${GNU46_CXX11}")
+set(_cmake_feature_test_cxx_noexcept "${GNU46_CXX11}")
+set(_cmake_feature_test_cxx_nullptr "${GNU46_CXX11}")
+set(_cmake_feature_test_cxx_range_for "${GNU46_CXX11}")
+set(_cmake_feature_test_cxx_unrestricted_unions "${GNU46_CXX11}")
+set(GNU45_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && ${GNU_CXX0X_DEFINED}")
+set(_cmake_feature_test_cxx_explicit_conversions "${GNU45_CXX11}")
+set(_cmake_feature_test_cxx_lambdas "${GNU45_CXX11}")
+set(_cmake_feature_test_cxx_local_type_template_args "${GNU45_CXX11}")
+set(_cmake_feature_test_cxx_raw_string_literals "${GNU45_CXX11}")
+set(GNU44_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && ${GNU_CXX0X_DEFINED}")
+set(_cmake_feature_test_cxx_auto_type "${GNU44_CXX11}")
+set(_cmake_feature_test_cxx_defaulted_functions "${GNU44_CXX11}")
+set(_cmake_feature_test_cxx_deleted_functions "${GNU44_CXX11}")
+set(_cmake_feature_test_cxx_generalized_initializers "${GNU44_CXX11}")
+set(_cmake_feature_test_cxx_inline_namespaces "${GNU44_CXX11}")
+set(_cmake_feature_test_cxx_sizeof_member "${GNU44_CXX11}")
+set(_cmake_feature_test_cxx_strong_enums "${GNU44_CXX11}")
+set(_cmake_feature_test_cxx_trailing_return_types "${GNU44_CXX11}")
+set(_cmake_feature_test_cxx_unicode_literals "${GNU44_CXX11}")
+set(_cmake_feature_test_cxx_uniform_initialization "${GNU44_CXX11}")
+set(_cmake_feature_test_cxx_variadic_templates "${GNU44_CXX11}")
+# TODO: If features are ever recorded for GNU 4.3, there should possibly
+# be a new feature added like cxx_variadic_template_template_parameters,
+# which is implemented by GNU 4.4, but not 4.3. cxx_variadic_templates is
+# actually implemented by GNU 4.3, but variadic template template parameters
+# 'completes' it, so that is the version we record as having the variadic
+# templates capability in CMake. See
+# http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf
+# TODO: Should be supported by GNU 4.3
+set(GNU43_CXX11 "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
+set(_cmake_feature_test_cxx_decltype "${GNU43_CXX11}")
+set(_cmake_feature_test_cxx_default_function_template_args "${GNU43_CXX11}")
+set(_cmake_feature_test_cxx_long_long_type "${GNU43_CXX11}")
+set(_cmake_feature_test_cxx_right_angle_brackets "${GNU43_CXX11}")
+set(_cmake_feature_test_cxx_rvalue_references "${GNU43_CXX11}")
+set(_cmake_feature_test_cxx_static_assert "${GNU43_CXX11}")
+# TODO: Should be supported since GNU 3.4?
+set(_cmake_feature_test_cxx_extern_templates "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
+# TODO: Should be supported forever?
+set(_cmake_feature_test_cxx_func_identifier "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
+set(_cmake_feature_test_cxx_variadic_macros "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
+set(_cmake_feature_test_cxx_template_template_parameters "${_cmake_oldestSupported} && __cplusplus")
diff --git a/Modules/Compiler/LCC-CXX.cmake b/Modules/Compiler/LCC-CXX.cmake
new file mode 100644
index 0000000..b3bdd3c
--- /dev/null
+++ b/Modules/Compiler/LCC-CXX.cmake
@@ -0,0 +1,31 @@
+include(Compiler/LCC)
+__compiler_lcc(CXX)
+
+
+if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
+ AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
+ AND CMAKE_DEPFILE_FLAGS_CXX)
+ # dependencies are computed by the compiler itself
+ set(CMAKE_CXX_DEPFILE_FORMAT gcc)
+ set(CMAKE_CXX_DEPENDS_USE_COMPILER TRUE)
+endif()
+
+set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)
+
+set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
+
+set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98")
+set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
+set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON)
+set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11")
+set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11")
+set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON)
+set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14")
+set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14")
+set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
+set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++17")
+set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17")
+set(CMAKE_CXX20_STANDARD_COMPILE_OPTION "-std=c++2a")
+set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION "-std=gnu++2a")
+
+__compiler_check_default_language_standard(CXX 1.19 98 1.20 11 1.21 14 1.24 17 1.26 20)
diff --git a/Modules/Compiler/LCC-FindBinUtils.cmake b/Modules/Compiler/LCC-FindBinUtils.cmake
new file mode 100644
index 0000000..4dcdd53
--- /dev/null
+++ b/Modules/Compiler/LCC-FindBinUtils.cmake
@@ -0,0 +1,37 @@
+if(NOT DEFINED _CMAKE_PROCESSING_LANGUAGE OR _CMAKE_PROCESSING_LANGUAGE STREQUAL "")
+ message(FATAL_ERROR "Internal error: _CMAKE_PROCESSING_LANGUAGE is not set")
+endif()
+
+# Ubuntu 16.04:
+# * /usr/bin/gcc-ar-5
+# * /usr/bin/gcc-ranlib-5
+string(REGEX MATCH "^([0-9]+)" __version_x
+ "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION}")
+
+string(REGEX MATCH "^([0-9]+\\.[0-9]+)" __version_x_y
+ "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION}")
+
+# Try to find tools in the same directory as GCC itself
+get_filename_component(__gcc_hints "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER}" DIRECTORY)
+
+# http://manpages.ubuntu.com/manpages/wily/en/man1/gcc-ar.1.html
+find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR NAMES
+ "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x_y}"
+ "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${__version_x}"
+ "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar${_CMAKE_COMPILER_SUFFIX}"
+ HINTS ${__gcc_hints}
+ NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH
+ DOC "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler"
+)
+mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR)
+
+# http://manpages.ubuntu.com/manpages/wily/en/man1/gcc-ranlib.1.html
+find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES
+ "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x_y}"
+ "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${__version_x}"
+ "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib${_CMAKE_COMPILER_SUFFIX}"
+ HINTS ${__gcc_hints}
+ NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH
+ DOC "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler"
+)
+mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB)
diff --git a/Modules/Compiler/LCC-Fortran.cmake b/Modules/Compiler/LCC-Fortran.cmake
new file mode 100644
index 0000000..8091b29
--- /dev/null
+++ b/Modules/Compiler/LCC-Fortran.cmake
@@ -0,0 +1,26 @@
+include(Compiler/LCC)
+__compiler_lcc(Fortran)
+
+set(CMAKE_Fortran_SUBMODULE_SEP "@")
+set(CMAKE_Fortran_SUBMODULE_EXT ".smod")
+
+set(CMAKE_Fortran_PREPROCESS_SOURCE
+ "<CMAKE_Fortran_COMPILER> -cpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> -o <PREPROCESSED_SOURCE>")
+
+set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
+set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
+
+set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-cpp")
+set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-nocpp")
+
+set(CMAKE_Fortran_POSTPROCESS_FLAG "-fpreprocessed")
+
+# No -DNDEBUG for Fortran.
+string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " -Os")
+string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " -O3")
+
+# No -isystem for Fortran because it will not find .mod files.
+unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran)
+
+# Fortran-specific feature flags.
+set(CMAKE_Fortran_MODDIR_FLAG -J)
diff --git a/Modules/Compiler/LCC.cmake b/Modules/Compiler/LCC.cmake
new file mode 100644
index 0000000..8353ab6
--- /dev/null
+++ b/Modules/Compiler/LCC.cmake
@@ -0,0 +1,95 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+
+# This module is shared by multiple languages; use include blocker.
+if(__COMPILER_LCC)
+ return()
+endif()
+set(__COMPILER_LCC 1)
+
+include(Compiler/CMakeCommonCompilerMacros)
+
+set(__pch_header_C "c-header")
+set(__pch_header_CXX "c++-header")
+set(__pch_header_OBJC "objective-c-header")
+set(__pch_header_OBJCXX "objective-c++-header")
+
+macro(__compiler_lcc lang)
+ # Feature flags.
+ set(CMAKE_${lang}_VERBOSE_FLAG "-v")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
+ set (_CMAKE_${lang}_PIE_MAY_BE_SUPPORTED_BY_LINKER NO)
+ set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
+ # Support of PIE at link stage depends on various elements : platform, compiler, linker
+ # so to activate it, module CheckPIESupported must be used.
+ set (_CMAKE_${lang}_PIE_MAY_BE_SUPPORTED_BY_LINKER YES)
+ set(CMAKE_${lang}_LINK_OPTIONS_PIE ${CMAKE_${lang}_COMPILE_OPTIONS_PIE} "-pie")
+ set(CMAKE_${lang}_LINK_OPTIONS_NO_PIE "-no-pie")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
+ set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
+ set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_SYSROOT "--sysroot=")
+
+ set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Wl,")
+ set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",")
+
+ # Older versions of gcc (< 4.5) contain a bug causing them to report a missing
+ # header file as a warning if depfiles are enabled, causing check_header_file
+ # tests to always succeed. Work around this by disabling dependency tracking
+ # in try_compile mode.
+ get_property(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
+ if(CMAKE_${lang}_COMPILER_ID STREQUAL "LCC" AND _IN_TC AND NOT CMAKE_FORCE_DEPFILES)
+ else()
+ # distcc does not transform -o to -MT when invoking the preprocessor
+ # internally, as it ought to. Work around this bug by setting -MT here
+ # even though it isn't strictly necessary.
+ set(CMAKE_DEPFILE_FLAGS_${lang} "-MD -MT <DEP_TARGET> -MF <DEP_FILE>")
+ endif()
+
+ # Initial configuration flags.
+ string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
+ string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
+ string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG")
+ string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3 -DNDEBUG")
+ string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG")
+ set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+ set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+ set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
+ set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES)
+ set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO)
+ set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES)
+ set(__lto_flags -flto)
+ list(APPEND __lto_flags -fno-fat-lto-objects)
+ set(CMAKE_${lang}_COMPILE_OPTIONS_IPO ${__lto_flags})
+
+ set(CMAKE_${lang}_ARCHIVE_CREATE_IPO
+ "\"${CMAKE_${lang}_COMPILER_AR}\" cr <TARGET> <LINK_FLAGS> <OBJECTS>"
+ )
+
+ set(CMAKE_${lang}_ARCHIVE_APPEND_IPO
+ "\"${CMAKE_${lang}_COMPILER_AR}\" r <TARGET> <LINK_FLAGS> <OBJECTS>"
+ )
+
+ set(CMAKE_${lang}_ARCHIVE_FINISH_IPO
+ "\"${CMAKE_${lang}_COMPILER_RANLIB}\" <TARGET>"
+ )
+
+ set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}")
+ if(CMAKE_${lang}_COMPILER_ARG1)
+ separate_arguments(_COMPILER_ARGS NATIVE_COMMAND "${CMAKE_${lang}_COMPILER_ARG1}")
+ list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND ${_COMPILER_ARGS})
+ unset(_COMPILER_ARGS)
+ endif()
+ list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
+
+ if(NOT "x${lang}" STREQUAL "xFortran")
+ set(CMAKE_PCH_EXTENSION .gch)
+ if (NOT CMAKE_GENERATOR MATCHES "Xcode")
+ set(CMAKE_PCH_PROLOGUE "#pragma GCC system_header")
+ endif()
+ set(CMAKE_${lang}_COMPILE_OPTIONS_INVALID_PCH -Winvalid-pch)
+ set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -include <PCH_HEADER>)
+ set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -x ${__pch_header_${lang}} -include <PCH_HEADER>)
+ endif()
+endmacro()
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake
index c2fe42d..2f12b43 100644
--- a/Modules/Compiler/NVIDIA-CUDA.cmake
+++ b/Modules/Compiler/NVIDIA-CUDA.cmake
@@ -5,8 +5,9 @@ set(CMAKE_CUDA_VERBOSE_FLAG "-v")
set(CMAKE_CUDA_VERBOSE_COMPILE_FLAG "-Xcompiler=-v")
set(_CMAKE_COMPILE_AS_CUDA_FLAG "-x cu")
+set(_CMAKE_CUDA_WHOLE_FLAG "-c")
+set(_CMAKE_CUDA_RDC_FLAG "-rdc=true")
set(_CMAKE_CUDA_PTX_FLAG "-ptx")
-set(_CMAKE_CUDA_DEVICE_CODE "-dc")
if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.2.89)
# The -forward-unknown-to-host-compiler flag was only
diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index e5b1e5d..afa36f7 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -21,6 +21,7 @@ LabelsForSubprojects: @CTEST_LABELS_FOR_SUBPROJECTS@
# Submission information
SubmitURL: @SUBMIT_URL@
+SubmitInactivityTimeout: @CTEST_SUBMIT_INACTIVITY_TIMEOUT@
# Dashboard start time
NightlyStartTime: @NIGHTLY_START_TIME@
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 308138f..8ed7558 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -437,7 +437,7 @@ if(BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
set(BLAS_mkl_END_GROUP "")
endif()
# Switch to GNU Fortran support layer if needed (but not on Apple, where MKL does not provide it)
- if(CMAKE_Fortran_COMPILER_LOADED AND CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT APPLE)
+ if(CMAKE_Fortran_COMPILER_LOADED AND (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" OR CMAKE_Fortran_COMPILER_ID STREQUAL "LCC") AND NOT APPLE)
set(BLAS_mkl_INTFACE "gf")
set(BLAS_mkl_THREADING "gnu")
set(BLAS_mkl_OMP "gomp")
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 38faca2..b63f010 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -917,14 +917,14 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret)
if(NOT Boost_VERSION_STRING VERSION_LESS 1.69.0)
# From GCC 5 and clang 4, versioning changes and minor becomes patch.
# For those compilers, patch is exclude from compiler tag in Boost 1.69+ library naming.
- if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND _boost_COMPILER_VERSION_MAJOR VERSION_GREATER 4)
+ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND _boost_COMPILER_VERSION_MAJOR VERSION_GREATER 4) OR CMAKE_CXX_COMPILER_ID STREQUAL "LCC")
set(_boost_COMPILER_VERSION "${_boost_COMPILER_VERSION_MAJOR}")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND _boost_COMPILER_VERSION_MAJOR VERSION_GREATER 3)
set(_boost_COMPILER_VERSION "${_boost_COMPILER_VERSION_MAJOR}")
endif()
endif()
- if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "LCC")
if(Boost_VERSION_STRING VERSION_LESS 1.34)
set(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34
else()
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index e335355..020af5a 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -873,7 +873,7 @@ if( NOT HDF5_FOUND )
# Add library-based search paths for Fortran modules.
if (NOT _hdf5_main_library STREQUAL "")
# gfortran module directory
- if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+ if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" OR CMAKE_Fortran_COMPILER_ID STREQUAL "LCC")
get_filename_component(_hdf5_library_dir "${_hdf5_main_library}" DIRECTORY)
list(APPEND _hdf5_inc_extra_paths "${_hdf5_library_dir}")
unset(_hdf5_library_dir)
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index 929a809..ecfb7f9 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -102,6 +102,7 @@ function(_OPENMP_FLAG_CANDIDATES LANG)
unset(OpenMP_FLAG_CANDIDATES)
set(OMP_FLAG_GNU "-fopenmp")
+ set(OMP_FLAG_LCC "-fopenmp")
set(OMP_FLAG_Clang "-fopenmp=libomp" "-fopenmp=libiomp5" "-fopenmp" "-Xclang -fopenmp")
set(OMP_FLAG_AppleClang "-Xclang -fopenmp")
set(OMP_FLAG_HP "+Oopenmp")
diff --git a/Modules/Internal/CPack/CPackDeb.cmake b/Modules/Internal/CPack/CPackDeb.cmake
index c115f00..958a6db 100644
--- a/Modules/Internal/CPack/CPackDeb.cmake
+++ b/Modules/Internal/CPack/CPackDeb.cmake
@@ -332,6 +332,14 @@ function(cpack_deb_prepare_package_vars)
RESULT_VARIABLE SHLIBDEPS_RESULT
ERROR_VARIABLE SHLIBDEPS_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE )
+
+ # E2K OSL 6.0.1 and prior has broken dpkg-shlibdeps. CPack will deal with that (mocking SHLIBDEPS_OUTPUT), but inform user of this.
+ if("${SHLIBDEPS_ERROR}" MATCHES "unknown gcc system type e2k.*, falling back to default")
+ message(WARNING "CPackDeb: broken dpkg-shlibdeps on E2K detected, will fall back to minimal dependencies.\n"
+ "You should expect that dependencies list in the package will be incomplete.")
+ set(SHLIBDEPS_OUTPUT "shlibs:Depends=libc6, lcc-libs")
+ endif()
+
if(CPACK_DEBIAN_PACKAGE_DEBUG)
# dpkg-shlibdeps will throw some warnings if some input files are not binary
message( "CPackDeb Debug: dpkg-shlibdeps warnings \n${SHLIBDEPS_ERROR}")
diff --git a/Modules/Platform/Generic-ELF.cmake b/Modules/Platform/Generic-ELF.cmake
new file mode 100644
index 0000000..943cb6b
--- /dev/null
+++ b/Modules/Platform/Generic-ELF.cmake
@@ -0,0 +1,7 @@
+# This is a platform definition file for platforms without
+# an operating system using the ELF executable format.
+# It is used when CMAKE_SYSTEM_NAME is set to "Generic-ELF"
+
+include(Platform/Generic)
+
+set(CMAKE_EXECUTABLE_SUFFIX .elf)
diff --git a/Modules/Platform/Linux-LCC-C.cmake b/Modules/Platform/Linux-LCC-C.cmake
new file mode 100644
index 0000000..b204c55
--- /dev/null
+++ b/Modules/Platform/Linux-LCC-C.cmake
@@ -0,0 +1,2 @@
+include(Platform/Linux-LCC)
+__linux_compiler_lcc(C)
diff --git a/Modules/Platform/Linux-LCC-CXX.cmake b/Modules/Platform/Linux-LCC-CXX.cmake
new file mode 100644
index 0000000..cf2fa35
--- /dev/null
+++ b/Modules/Platform/Linux-LCC-CXX.cmake
@@ -0,0 +1,2 @@
+include(Platform/Linux-LCC)
+__linux_compiler_lcc(CXX)
diff --git a/Modules/Platform/Linux-LCC-Fortran.cmake b/Modules/Platform/Linux-LCC-Fortran.cmake
new file mode 100644
index 0000000..d3a4cf4
--- /dev/null
+++ b/Modules/Platform/Linux-LCC-Fortran.cmake
@@ -0,0 +1,3 @@
+include(Platform/Linux-LCC)
+__linux_compiler_lcc(Fortran)
+set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-llfortran")
diff --git a/Modules/Platform/Linux-LCC.cmake b/Modules/Platform/Linux-LCC.cmake
new file mode 100644
index 0000000..a375461
--- /dev/null
+++ b/Modules/Platform/Linux-LCC.cmake
@@ -0,0 +1,15 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+
+# This module is shared by multiple languages; use include blocker.
+if(__LINUX_COMPILER_LCC)
+ return()
+endif()
+set(__LINUX_COMPILER_LCC 1)
+
+macro(__linux_compiler_lcc lang)
+ # We pass this for historical reasons. Projects may have
+ # executables that use dlopen but do not set ENABLE_EXPORTS.
+ set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-rdynamic")
+endmacro()
diff --git a/Modules/Platform/Windows-NVIDIA-CUDA.cmake b/Modules/Platform/Windows-NVIDIA-CUDA.cmake
index b83932e..6c1699b 100644
--- a/Modules/Platform/Windows-NVIDIA-CUDA.cmake
+++ b/Modules/Platform/Windows-NVIDIA-CUDA.cmake
@@ -1,11 +1,7 @@
include(Platform/Windows-MSVC)
-set(CMAKE_CUDA_COMPILE_PTX_COMPILATION
- "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} -ptx <SOURCE> -o <OBJECT> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
-set(CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION
- "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} -dc <SOURCE> -o <OBJECT> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
-set(CMAKE_CUDA_COMPILE_WHOLE_COMPILATION
- "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} -c <SOURCE> -o <OBJECT> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
+set(CMAKE_CUDA_COMPILE_OBJECT
+ "<CMAKE_CUDA_COMPILER> ${_CMAKE_CUDA_EXTRA_FLAGS} <DEFINES> <INCLUDES> <FLAGS> ${_CMAKE_COMPILE_AS_CUDA_FLAG} <CUDA_COMPILE_MODE> <SOURCE> -o <OBJECT> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
set(__IMPLICIT_LINKS)
foreach(dir ${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES})
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 0c01b00..c39bea6 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,8 +1,8 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 22)
-set(CMake_VERSION_PATCH 0)
-set(CMake_VERSION_RC 1)
+set(CMake_VERSION_PATCH 20211021)
+#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
# Start with the full version number used in tags. It has no dev info.
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
index b375ba6..9b33eec 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
@@ -38,202 +38,233 @@ int cmCPackIFWGenerator::PackageFiles()
std::string ifwTLD = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
std::string ifwTmpFile = cmStrCat(ifwTLD, "/IFWOutput.log");
- // Run repogen
- if (!this->Installer.RemoteRepositories.empty()) {
- std::vector<std::string> ifwCmd;
- std::string ifwArg;
+ // Create repositories
+ if (!this->RunRepogen(ifwTmpFile)) {
+ return 0;
+ }
- ifwCmd.emplace_back(this->RepoGen);
+ // Create installer
+ if (!this->RunBinaryCreator(ifwTmpFile)) {
+ return 0;
+ }
- if (this->IsVersionLess("2.0.0")) {
- ifwCmd.emplace_back("-c");
- ifwCmd.emplace_back(this->toplevel + "/config/config.xml");
- }
+ return 1;
+}
- ifwCmd.emplace_back("-p");
- ifwCmd.emplace_back(this->toplevel + "/packages");
+std::vector<std::string> cmCPackIFWGenerator::BuildRepogenCommand()
+{
+ std::vector<std::string> ifwCmd;
+ std::string ifwArg;
- if (!this->PkgsDirsVector.empty()) {
- for (std::string const& it : this->PkgsDirsVector) {
- ifwCmd.emplace_back("-p");
- ifwCmd.emplace_back(it);
- }
+ ifwCmd.emplace_back(this->RepoGen);
+
+ if (this->IsVersionLess("2.0.0")) {
+ ifwCmd.emplace_back("-c");
+ ifwCmd.emplace_back(this->toplevel + "/config/config.xml");
+ }
+
+ ifwCmd.emplace_back("-p");
+ ifwCmd.emplace_back(this->toplevel + "/packages");
+
+ if (!this->PkgsDirsVector.empty()) {
+ for (std::string const& it : this->PkgsDirsVector) {
+ ifwCmd.emplace_back("-p");
+ ifwCmd.emplace_back(it);
}
+ }
- if (!this->RepoDirsVector.empty()) {
- if (!this->IsVersionLess("3.1")) {
- for (std::string const& rd : this->RepoDirsVector) {
- ifwCmd.emplace_back("--repository");
- ifwCmd.emplace_back(rd);
- }
- } else {
- cmCPackIFWLogger(WARNING,
- "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
- << "variable is set, but content will be skipped, "
- << "because this feature available only since "
- << "QtIFW 3.1. Please update your QtIFW instance."
- << std::endl);
+ if (!this->RepoDirsVector.empty()) {
+ if (!this->IsVersionLess("3.1")) {
+ for (std::string const& rd : this->RepoDirsVector) {
+ ifwCmd.emplace_back("--repository");
+ ifwCmd.emplace_back(rd);
}
+ } else {
+ cmCPackIFWLogger(WARNING,
+ "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
+ << "variable is set, but content will be skipped, "
+ << "because this feature available only since "
+ << "QtIFW 3.1. Please update your QtIFW instance."
+ << std::endl);
}
+ }
- if (!this->OnlineOnly && !this->DownloadedPackages.empty()) {
- ifwCmd.emplace_back("-i");
- auto it = this->DownloadedPackages.begin();
- ifwArg = (*it)->Name;
+ if (!this->OnlineOnly && !this->DownloadedPackages.empty()) {
+ ifwCmd.emplace_back("-i");
+ auto it = this->DownloadedPackages.begin();
+ ifwArg = (*it)->Name;
+ ++it;
+ while (it != this->DownloadedPackages.end()) {
+ ifwArg += "," + (*it)->Name;
++it;
- while (it != this->DownloadedPackages.end()) {
- ifwArg += "," + (*it)->Name;
- ++it;
- }
- ifwCmd.emplace_back(ifwArg);
- }
- ifwCmd.emplace_back(this->toplevel + "/repository");
- cmCPackIFWLogger(VERBOSE,
- "Execute: " << cmSystemTools::PrintSingleCommand(ifwCmd)
- << std::endl);
- std::string output;
- int retVal = 1;
- cmCPackIFWLogger(OUTPUT, "- Generate repository" << std::endl);
- bool res = cmSystemTools::RunSingleCommand(
- ifwCmd, &output, &output, &retVal, nullptr, this->GeneratorVerbose,
- cmDuration::zero());
- if (!res || retVal) {
- cmGeneratedFileStream ofs(ifwTmpFile);
- ofs << "# Run command: " << cmSystemTools::PrintSingleCommand(ifwCmd)
- << std::endl
- << "# Output:" << std::endl
- << output << std::endl;
- cmCPackIFWLogger(
- ERROR,
- "Problem running IFW command: "
- << cmSystemTools::PrintSingleCommand(ifwCmd) << std::endl
- << "Please check \"" << ifwTmpFile << "\" for errors" << std::endl);
- return 0;
}
+ ifwCmd.emplace_back(ifwArg);
+ }
+ ifwCmd.emplace_back(this->toplevel + "/repository");
- if (!this->Repository.RepositoryUpdate.empty() &&
- !this->Repository.PatchUpdatesXml()) {
- cmCPackIFWLogger(WARNING,
- "Problem patch IFW \"Updates\" "
- << "file: \"" << this->toplevel
- << "/repository/Updates.xml\"" << std::endl);
- }
+ return ifwCmd;
+}
- cmCPackIFWLogger(OUTPUT,
- "- repository: \"" << this->toplevel
- << "/repository\" generated"
- << std::endl);
+int cmCPackIFWGenerator::RunRepogen(const std::string& ifwTmpFile)
+{
+ if (this->Installer.RemoteRepositories.empty()) {
+ return 1;
+ }
+
+ std::vector<std::string> ifwCmd = this->BuildRepogenCommand();
+ cmCPackIFWLogger(VERBOSE,
+ "Execute: " << cmSystemTools::PrintSingleCommand(ifwCmd)
+ << std::endl);
+ std::string output;
+ int retVal = 1;
+ cmCPackIFWLogger(OUTPUT, "- Generate repository" << std::endl);
+ bool res = cmSystemTools::RunSingleCommand(ifwCmd, &output, &output, &retVal,
+ nullptr, this->GeneratorVerbose,
+ cmDuration::zero());
+ if (!res || retVal) {
+ cmGeneratedFileStream ofs(ifwTmpFile);
+ ofs << "# Run command: " << cmSystemTools::PrintSingleCommand(ifwCmd)
+ << std::endl
+ << "# Output:" << std::endl
+ << output << std::endl;
+ cmCPackIFWLogger(
+ ERROR,
+ "Problem running IFW command: "
+ << cmSystemTools::PrintSingleCommand(ifwCmd) << std::endl
+ << "Please check \"" << ifwTmpFile << "\" for errors" << std::endl);
+ return 0;
}
- // Run binary creator
- {
- std::vector<std::string> ifwCmd;
- std::string ifwArg;
-
- ifwCmd.emplace_back(this->BinCreator);
+ if (!this->Repository.RepositoryUpdate.empty() &&
+ !this->Repository.PatchUpdatesXml()) {
+ cmCPackIFWLogger(WARNING,
+ "Problem patch IFW \"Updates\" "
+ << "file: \"" << this->toplevel
+ << "/repository/Updates.xml\"" << std::endl);
+ }
- ifwCmd.emplace_back("-c");
- ifwCmd.emplace_back(this->toplevel + "/config/config.xml");
+ cmCPackIFWLogger(OUTPUT,
+ "- repository: \"" << this->toplevel
+ << "/repository\" generated"
+ << std::endl);
+ return 1;
+}
- if (!this->Installer.Resources.empty()) {
- ifwCmd.emplace_back("-r");
- auto it = this->Installer.Resources.begin();
- std::string path = this->toplevel + "/resources/";
- ifwArg = path + *it;
+std::vector<std::string> cmCPackIFWGenerator::BuildBinaryCreatorCommmand()
+{
+ std::vector<std::string> ifwCmd;
+ std::string ifwArg;
+
+ ifwCmd.emplace_back(this->BinCreator);
+
+ ifwCmd.emplace_back("-c");
+ ifwCmd.emplace_back(this->toplevel + "/config/config.xml");
+
+ if (!this->Installer.Resources.empty()) {
+ ifwCmd.emplace_back("-r");
+ auto it = this->Installer.Resources.begin();
+ std::string path = this->toplevel + "/resources/";
+ ifwArg = path + *it;
+ ++it;
+ while (it != this->Installer.Resources.end()) {
+ ifwArg += "," + path + *it;
++it;
- while (it != this->Installer.Resources.end()) {
- ifwArg += "," + path + *it;
- ++it;
- }
- ifwCmd.emplace_back(ifwArg);
}
+ ifwCmd.emplace_back(ifwArg);
+ }
- ifwCmd.emplace_back("-p");
- ifwCmd.emplace_back(this->toplevel + "/packages");
+ ifwCmd.emplace_back("-p");
+ ifwCmd.emplace_back(this->toplevel + "/packages");
- if (!this->PkgsDirsVector.empty()) {
- for (std::string const& it : this->PkgsDirsVector) {
- ifwCmd.emplace_back("-p");
- ifwCmd.emplace_back(it);
- }
+ if (!this->PkgsDirsVector.empty()) {
+ for (std::string const& it : this->PkgsDirsVector) {
+ ifwCmd.emplace_back("-p");
+ ifwCmd.emplace_back(it);
}
+ }
- if (!this->RepoDirsVector.empty()) {
- if (!this->IsVersionLess("3.1")) {
- for (std::string const& rd : this->RepoDirsVector) {
- ifwCmd.emplace_back("--repository");
- ifwCmd.emplace_back(rd);
- }
- } else {
- cmCPackIFWLogger(WARNING,
- "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
- << "variable is set, but content will be skipped, "
- << "because this feature available only since "
- << "QtIFW 3.1. Please update your QtIFW instance."
- << std::endl);
+ if (!this->RepoDirsVector.empty()) {
+ if (!this->IsVersionLess("3.1")) {
+ for (std::string const& rd : this->RepoDirsVector) {
+ ifwCmd.emplace_back("--repository");
+ ifwCmd.emplace_back(rd);
}
+ } else {
+ cmCPackIFWLogger(WARNING,
+ "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
+ << "variable is set, but content will be skipped, "
+ << "because this feature available only since "
+ << "QtIFW 3.1. Please update your QtIFW instance."
+ << std::endl);
}
+ }
- if (this->OnlineOnly) {
- ifwCmd.emplace_back("--online-only");
- } else if (!this->DownloadedPackages.empty() &&
- !this->Installer.RemoteRepositories.empty()) {
- ifwCmd.emplace_back("-e");
- auto it = this->DownloadedPackages.begin();
- ifwArg = (*it)->Name;
+ if (this->OnlineOnly) {
+ ifwCmd.emplace_back("--online-only");
+ } else if (!this->DownloadedPackages.empty() &&
+ !this->Installer.RemoteRepositories.empty()) {
+ ifwCmd.emplace_back("-e");
+ auto it = this->DownloadedPackages.begin();
+ ifwArg = (*it)->Name;
+ ++it;
+ while (it != this->DownloadedPackages.end()) {
+ ifwArg += "," + (*it)->Name;
++it;
- while (it != this->DownloadedPackages.end()) {
- ifwArg += "," + (*it)->Name;
- ++it;
- }
- ifwCmd.emplace_back(ifwArg);
- } else if (!this->DependentPackages.empty()) {
- ifwCmd.emplace_back("-i");
- ifwArg.clear();
- // Binary
- auto bit = this->BinaryPackages.begin();
- while (bit != this->BinaryPackages.end()) {
- ifwArg += (*bit)->Name + ",";
- ++bit;
- }
- // Depend
- auto it = this->DependentPackages.begin();
- ifwArg += it->second.Name;
- ++it;
- while (it != this->DependentPackages.end()) {
- ifwArg += "," + it->second.Name;
- ++it;
- }
- ifwCmd.emplace_back(ifwArg);
}
- // TODO: set correct name for multipackages
- if (!this->packageFileNames.empty()) {
- ifwCmd.emplace_back(this->packageFileNames[0]);
- } else {
- ifwCmd.emplace_back("installer" + this->OutputExtension);
+ ifwCmd.emplace_back(ifwArg);
+ } else if (!this->DependentPackages.empty()) {
+ ifwCmd.emplace_back("-i");
+ ifwArg.clear();
+ // Binary
+ auto bit = this->BinaryPackages.begin();
+ while (bit != this->BinaryPackages.end()) {
+ ifwArg += (*bit)->Name + ",";
+ ++bit;
}
- cmCPackIFWLogger(VERBOSE,
- "Execute: " << cmSystemTools::PrintSingleCommand(ifwCmd)
- << std::endl);
- std::string output;
- int retVal = 1;
- cmCPackIFWLogger(OUTPUT, "- Generate package" << std::endl);
- bool res = cmSystemTools::RunSingleCommand(
- ifwCmd, &output, &output, &retVal, nullptr, this->GeneratorVerbose,
- cmDuration::zero());
- if (!res || retVal) {
- cmGeneratedFileStream ofs(ifwTmpFile);
- ofs << "# Run command: " << cmSystemTools::PrintSingleCommand(ifwCmd)
- << std::endl
- << "# Output:" << std::endl
- << output << std::endl;
- cmCPackIFWLogger(
- ERROR,
- "Problem running IFW command: "
- << cmSystemTools::PrintSingleCommand(ifwCmd) << std::endl
- << "Please check \"" << ifwTmpFile << "\" for errors" << std::endl);
- return 0;
+ // Depend
+ auto it = this->DependentPackages.begin();
+ ifwArg += it->second.Name;
+ ++it;
+ while (it != this->DependentPackages.end()) {
+ ifwArg += "," + it->second.Name;
+ ++it;
}
+ ifwCmd.emplace_back(ifwArg);
+ }
+ // TODO: set correct name for multipackages
+ if (!this->packageFileNames.empty()) {
+ ifwCmd.emplace_back(this->packageFileNames[0]);
+ } else {
+ ifwCmd.emplace_back("installer" + this->OutputExtension);
+ }
+
+ return ifwCmd;
+}
+
+int cmCPackIFWGenerator::RunBinaryCreator(const std::string& ifwTmpFile)
+{
+ std::vector<std::string> ifwCmd = this->BuildBinaryCreatorCommmand();
+ cmCPackIFWLogger(VERBOSE,
+ "Execute: " << cmSystemTools::PrintSingleCommand(ifwCmd)
+ << std::endl);
+ std::string output;
+ int retVal = 1;
+ cmCPackIFWLogger(OUTPUT, "- Generate package" << std::endl);
+ bool res = cmSystemTools::RunSingleCommand(ifwCmd, &output, &output, &retVal,
+ nullptr, this->GeneratorVerbose,
+ cmDuration::zero());
+ if (!res || retVal) {
+ cmGeneratedFileStream ofs(ifwTmpFile);
+ ofs << "# Run command: " << cmSystemTools::PrintSingleCommand(ifwCmd)
+ << std::endl
+ << "# Output:" << std::endl
+ << output << std::endl;
+ cmCPackIFWLogger(
+ ERROR,
+ "Problem running IFW command: "
+ << cmSystemTools::PrintSingleCommand(ifwCmd) << std::endl
+ << "Please check \"" << ifwTmpFile << "\" for errors" << std::endl);
+ return 0;
}
return 1;
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h
index 024d25d..902ebaf 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.h
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.h
@@ -140,6 +140,12 @@ protected:
std::map<cmCPackComponentGroup*, cmCPackIFWPackage*> GroupPackages;
private:
+ std::vector<std::string> BuildRepogenCommand();
+ int RunRepogen(const std::string& ifwTmpFile);
+
+ std::vector<std::string> BuildBinaryCreatorCommmand();
+ int RunBinaryCreator(const std::string& ifwTmpFile);
+
std::string RepoGen;
std::string BinCreator;
std::string FrameworkVersion;
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 7ee6300..a94ca48 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -254,6 +254,16 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
}
}
+ // DisableCommandLineInterface
+ if (this->GetOption("CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE")) {
+ if (this->IsOn("CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE")) {
+ this->DisableCommandLineInterface = "true";
+ } else if (this->IsSetToOff(
+ "CPACK_IFW_PACKAGE_DISABLE_COMMAND_LINE_INTERFACE")) {
+ this->DisableCommandLineInterface = "false";
+ }
+ }
+
// Space in path
if (this->GetOption("CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH")) {
if (this->IsOn("CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH")) {
@@ -275,6 +285,27 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
this->Resources.clear();
cmExpandList(optIFW_PACKAGE_RESOURCES, this->Resources);
}
+
+ // ProductImages
+ if (cmValue productImages =
+ this->GetOption("CPACK_IFW_PACKAGE_PRODUCT_IMAGES")) {
+ this->ProductImages.clear();
+ cmExpandList(productImages, this->ProductImages);
+ }
+
+ // Run program, run program arguments, and run program description
+ if (cmValue program = this->GetOption("CPACK_IFW_PACKAGE_RUN_PROGRAM")) {
+ this->RunProgram = *program;
+ }
+ if (cmValue arguments =
+ this->GetOption("CPACK_IFW_PACKAGE_RUN_PROGRAM_ARGUMENTS")) {
+ this->RunProgramArguments.clear();
+ cmExpandList(arguments, this->RunProgramArguments);
+ }
+ if (cmValue description =
+ this->GetOption("CPACK_IFW_PACKAGE_RUN_PROGRAM_DESCRIPTION")) {
+ this->RunProgramDescription = *description;
+ }
}
/** \class cmCPackIFWResourcesParser
@@ -362,29 +393,11 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
xout.Element("ProductUrl", this->ProductUrl);
}
- // ApplicationIcon
- if (!this->InstallerApplicationIcon.empty()) {
- std::string name =
- cmSystemTools::GetFilenameName(this->InstallerApplicationIcon);
- std::string path = this->Directory + "/config/" + name;
- name = cmSystemTools::GetFilenameWithoutExtension(name);
- cmsys::SystemTools::CopyFileIfDifferent(this->InstallerApplicationIcon,
- path);
- xout.Element("InstallerApplicationIcon", name);
- }
-
- // WindowIcon
- if (!this->InstallerWindowIcon.empty()) {
- std::string name =
- cmSystemTools::GetFilenameName(this->InstallerWindowIcon);
- std::string path = this->Directory + "/config/" + name;
- cmsys::SystemTools::CopyFileIfDifferent(this->InstallerWindowIcon, path);
- xout.Element("InstallerWindowIcon", name);
- }
-
// Logo
if (!this->Logo.empty()) {
- std::string name = cmSystemTools::GetFilenameName(this->Logo);
+ std::string srcName = cmSystemTools::GetFilenameName(this->Logo);
+ std::string suffix = cmSystemTools::GetFilenameLastExtension(srcName);
+ std::string name = "cm_logo." + suffix;
std::string path = this->Directory + "/config/" + name;
cmsys::SystemTools::CopyFileIfDifferent(this->Logo, path);
xout.Element("Logo", name);
@@ -414,42 +427,81 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
xout.Element("Background", name);
}
- // WizardStyle
- if (!this->WizardStyle.empty()) {
- xout.Element("WizardStyle", this->WizardStyle);
- }
+ // Attributes introduced in QtIFW 1.4.0
+ if (!this->IsVersionLess("1.4")) {
+ // ApplicationIcon
+ if (!this->InstallerApplicationIcon.empty()) {
+ std::string srcName =
+ cmSystemTools::GetFilenameName(this->InstallerApplicationIcon);
+ std::string suffix = cmSystemTools::GetFilenameLastExtension(srcName);
+ std::string name = "cm_appicon." + suffix;
+ std::string path = this->Directory + "/config/" + name;
+ cmsys::SystemTools::CopyFileIfDifferent(this->InstallerApplicationIcon,
+ path);
+ // The actual file is looked up by attaching a '.icns' (macOS),
+ // '.ico' (Windows). No functionality on Unix.
+ name = cmSystemTools::GetFilenameWithoutExtension(name);
+ xout.Element("InstallerApplicationIcon", name);
+ }
- // Stylesheet
- if (!this->StyleSheet.empty()) {
- std::string name = cmSystemTools::GetFilenameName(this->StyleSheet);
- std::string path = this->Directory + "/config/" + name;
- cmsys::SystemTools::CopyFileIfDifferent(this->StyleSheet, path);
- xout.Element("StyleSheet", name);
+ // WindowIcon
+ if (!this->InstallerWindowIcon.empty()) {
+ std::string srcName =
+ cmSystemTools::GetFilenameName(this->InstallerWindowIcon);
+ std::string suffix = cmSystemTools::GetFilenameLastExtension(srcName);
+ std::string name = "cm_winicon." + suffix;
+ std::string path = this->Directory + "/config/" + name;
+ cmsys::SystemTools::CopyFileIfDifferent(this->InstallerWindowIcon, path);
+ xout.Element("InstallerWindowIcon", name);
+ }
}
- // WizardDefaultWidth
- if (!this->WizardDefaultWidth.empty()) {
- xout.Element("WizardDefaultWidth", this->WizardDefaultWidth);
- }
+ // Attributes introduced in QtIFW 2.0.0
+ if (!this->IsVersionLess("2.0")) {
+ // WizardDefaultWidth
+ if (!this->WizardDefaultWidth.empty()) {
+ xout.Element("WizardDefaultWidth", this->WizardDefaultWidth);
+ }
- // WizardDefaultHeight
- if (!this->WizardDefaultHeight.empty()) {
- xout.Element("WizardDefaultHeight", this->WizardDefaultHeight);
- }
+ // WizardDefaultHeight
+ if (!this->WizardDefaultHeight.empty()) {
+ xout.Element("WizardDefaultHeight", this->WizardDefaultHeight);
+ }
- // WizardShowPageList
- if (!this->IsVersionLess("4.0") && !this->WizardShowPageList.empty()) {
- xout.Element("WizardShowPageList", this->WizardShowPageList);
- }
+ // Start menu directory
+ if (!this->StartMenuDir.empty()) {
+ xout.Element("StartMenuDir", this->StartMenuDir);
+ }
- // TitleColor
- if (!this->TitleColor.empty()) {
- xout.Element("TitleColor", this->TitleColor);
- }
+ // Maintenance tool
+ if (!this->MaintenanceToolName.empty()) {
+ xout.Element("MaintenanceToolName", this->MaintenanceToolName);
+ }
- // Start menu
- if (!this->IsVersionLess("2.0")) {
- xout.Element("StartMenuDir", this->StartMenuDir);
+ // Maintenance tool ini file
+ if (!this->MaintenanceToolIniFile.empty()) {
+ xout.Element("MaintenanceToolIniFile", this->MaintenanceToolIniFile);
+ }
+
+ if (!this->AllowNonAsciiCharacters.empty()) {
+ xout.Element("AllowNonAsciiCharacters", this->AllowNonAsciiCharacters);
+ }
+ if (!this->AllowSpaceInPath.empty()) {
+ xout.Element("AllowSpaceInPath", this->AllowSpaceInPath);
+ }
+
+ // Control script (copy to config dir)
+ if (!this->ControlScript.empty()) {
+ std::string name = cmSystemTools::GetFilenameName(this->ControlScript);
+ std::string path = this->Directory + "/config/" + name;
+ cmsys::SystemTools::CopyFileIfDifferent(this->ControlScript, path);
+ xout.Element("ControlScript", name);
+ }
+ } else {
+ // CPack IFW default policy
+ xout.Comment("CPack IFW default policy for QtIFW less 2.0");
+ xout.Element("AllowNonAsciiCharacters", "true");
+ xout.Element("AllowSpaceInPath", "true");
}
// Target dir
@@ -471,41 +523,74 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
xout.EndElement();
}
- // Maintenance tool
- if (!this->IsVersionLess("2.0") && !this->MaintenanceToolName.empty()) {
- xout.Element("MaintenanceToolName", this->MaintenanceToolName);
+ // Attributes introduced in QtIFW 3.0.0
+ if (!this->IsVersionLess("3.0")) {
+ // WizardStyle
+ if (!this->WizardStyle.empty()) {
+ xout.Element("WizardStyle", this->WizardStyle);
+ }
+
+ // Stylesheet (copy to config dir)
+ if (!this->StyleSheet.empty()) {
+ std::string name = cmSystemTools::GetFilenameName(this->StyleSheet);
+ std::string path = this->Directory + "/config/" + name;
+ cmsys::SystemTools::CopyFileIfDifferent(this->StyleSheet, path);
+ xout.Element("StyleSheet", name);
+ }
+
+ // TitleColor
+ if (!this->TitleColor.empty()) {
+ xout.Element("TitleColor", this->TitleColor);
+ }
}
- // Maintenance tool ini file
- if (!this->IsVersionLess("2.0") && !this->MaintenanceToolIniFile.empty()) {
- xout.Element("MaintenanceToolIniFile", this->MaintenanceToolIniFile);
+ // Attributes introduced in QtIFW 4.0.0
+ if (!this->IsVersionLess("4.0")) {
+ // WizardShowPageList
+ if (!this->WizardShowPageList.empty()) {
+ xout.Element("WizardShowPageList", this->WizardShowPageList);
+ }
+
+ // DisableCommandLineInterface
+ if (!this->DisableCommandLineInterface.empty()) {
+ xout.Element("DisableCommandLineInterface",
+ this->DisableCommandLineInterface);
+ }
+
+ // RunProgram
+ if (!this->RunProgram.empty()) {
+ xout.Element("RunProgram", this->RunProgram);
+ }
+
+ // RunProgramArguments
+ if (!this->RunProgramArguments.empty()) {
+ xout.StartElement("RunProgramArguments");
+ for (const auto& arg : this->RunProgramArguments) {
+ xout.Element("Argument", arg);
+ }
+ xout.EndElement();
+ }
+
+ // RunProgramDescription
+ if (!this->RunProgramDescription.empty()) {
+ xout.Element("RunProgramDescription", this->RunProgramDescription);
+ }
}
if (!this->RemoveTargetDir.empty()) {
xout.Element("RemoveTargetDir", this->RemoveTargetDir);
}
- // Different allows
- if (this->IsVersionLess("2.0")) {
- // CPack IFW default policy
- xout.Comment("CPack IFW default policy for QtIFW less 2.0");
- xout.Element("AllowNonAsciiCharacters", "true");
- xout.Element("AllowSpaceInPath", "true");
- } else {
- if (!this->AllowNonAsciiCharacters.empty()) {
- xout.Element("AllowNonAsciiCharacters", this->AllowNonAsciiCharacters);
- }
- if (!this->AllowSpaceInPath.empty()) {
- xout.Element("AllowSpaceInPath", this->AllowSpaceInPath);
+ // Product images (copy to config dir)
+ if (!this->IsVersionLess("4.0") && !this->ProductImages.empty()) {
+ xout.StartElement("ProductImages");
+ for (auto const& srcImg : this->ProductImages) {
+ std::string name = cmSystemTools::GetFilenameName(srcImg);
+ std::string dstImg = this->Directory + "/config/" + name;
+ cmsys::SystemTools::CopyFileIfDifferent(srcImg, dstImg);
+ xout.Element("Image", name);
}
- }
-
- // Control script (copy to config dir)
- if (!this->IsVersionLess("2.0") && !this->ControlScript.empty()) {
- std::string name = cmSystemTools::GetFilenameName(this->ControlScript);
- std::string path = this->Directory + "/config/" + name;
- cmsys::SystemTools::CopyFileIfDifferent(this->ControlScript, path);
- xout.Element("ControlScript", name);
+ xout.EndElement();
}
// Resources (copy to resources dir)
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h
index a031fc2..0ace099 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.h
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.h
@@ -109,6 +109,9 @@ public:
/// uninstalling
std::string RemoveTargetDir;
+ /// Set to true if command line interface features should be disabled
+ std::string DisableCommandLineInterface;
+
/// Set to false if the installation path cannot contain space characters
std::string AllowSpaceInPath;
@@ -118,6 +121,20 @@ public:
/// List of resources to include in the installer binary
std::vector<std::string> Resources;
+ /// A list of images to be shown on PerformInstallationPage.
+ std::vector<std::string> ProductImages;
+
+ /// Command executed after the installer is done if the user accepts the
+ /// action
+ std::string RunProgram;
+
+ /// Arguments passed to the program specified in <RunProgram>
+ std::vector<std::string> RunProgramArguments;
+
+ /// Text shown next to the check box for running the program after the
+ /// installation
+ std::string RunProgramDescription;
+
public:
// Internal implementation
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index d03239b..6a0095b 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -219,7 +219,9 @@ bool cmCPackWIXGenerator::InitializeWiXConfiguration()
CollectExtensions("CPACK_WIX_EXTENSIONS", this->CandleExtensions);
CollectExtensions("CPACK_WIX_CANDLE_EXTENSIONS", this->CandleExtensions);
- this->LightExtensions.insert("WixUIExtension");
+ if (!cmIsOn(GetOption("CPACK_WIX_SKIP_WIX_UI_EXTENSION"))) {
+ this->LightExtensions.insert("WixUIExtension");
+ }
CollectExtensions("CPACK_WIX_EXTENSIONS", this->LightExtensions);
CollectExtensions("CPACK_WIX_LIGHT_EXTENSIONS", this->LightExtensions);
CollectXmlNamespaces("CPACK_WIX_CUSTOM_XMLNS", this->CustomXmlNamespaces);
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 2f700b4..7ddb103 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -186,7 +186,7 @@ int cmCPackGenerator::InstallProject()
std::string bareTempInstallDirectory =
this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY");
std::string tempInstallDirectoryStr = bareTempInstallDirectory;
- bool setDestDir = cmIsOn(this->GetOption("CPACK_SET_DESTDIR")) |
+ bool setDestDir = cmIsOn(this->GetOption("CPACK_SET_DESTDIR")) ||
cmIsInternallyOn(this->GetOption("CPACK_SET_DESTDIR"));
if (!setDestDir) {
tempInstallDirectoryStr += this->GetPackagingInstallPrefix();
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index f9c4a8e..2aba79d 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -81,6 +81,7 @@ static const char* cmCTestErrorMatches[] = {
"^The project cannot be built\\.",
"^\\[ERROR\\]",
"^Command .* failed with exit code",
+ "lcc: \"([^\"]+)\", (line|строка) ([0-9]+): (error|ошибка)",
nullptr
};
@@ -122,6 +123,7 @@ static const char* cmCTestWarningMatches[] = {
"cc-[0-9]* CC: REMARK File = .*, Line = [0-9]*",
"^CMake Warning.*:",
"^\\[WARNING\\]",
+ "lcc: \"([^\"]+)\", (line|строка) ([0-9]+): (warning|предупреждение)",
nullptr
};
@@ -160,6 +162,9 @@ static cmCTestBuildCompileErrorWarningRex cmCTestWarningErrorFileLine[] = {
{ "^([a-zA-Z./0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 },
{ "\"([a-zA-Z./0-9_+ ~-]+)\", line ([0-9]+)", 1, 2 },
{ "File = ([a-zA-Z./0-9_+ ~-]+), Line = ([0-9]+)", 1, 2 },
+ { "lcc: \"([^\"]+)\", (line|строка) ([0-9]+): "
+ "(error|ошибка|warning|предупреждение)",
+ 1, 3 },
{ nullptr, 0, 0 }
};
diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx
index c4f87e9..a2dc615 100644
--- a/Source/CTest/cmCTestSubmitCommand.cxx
+++ b/Source/CTest/cmCTestSubmitCommand.cxx
@@ -58,6 +58,9 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
this->CTest->SetCTestConfigurationFromCMakeVariable(
this->Makefile, "CurlOptions", "CTEST_CURL_OPTIONS", this->Quiet);
+ this->CTest->SetCTestConfigurationFromCMakeVariable(
+ this->Makefile, "SubmitInactivityTimeout",
+ "CTEST_SUBMIT_INACTIVITY_TIMEOUT", this->Quiet);
cmValue notesFilesVariable =
this->Makefile->GetDefinition("CTEST_NOTES_FILES");
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index b99bb79..fae5e30 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -7,6 +7,7 @@
#include <cstdlib>
#include <sstream>
+#include <cm/iomanip>
#include <cmext/algorithm>
#include <cm3p/curl/curl.h>
@@ -216,8 +217,11 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
// if there is little to no activity for too long stop submitting
::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1);
- ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME,
- SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT);
+ auto submitInactivityTimeout = this->GetSubmitInactivityTimeout();
+ if (submitInactivityTimeout != 0) {
+ ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME,
+ submitInactivityTimeout);
+ }
/* HTTP PUT please */
::curl_easy_setopt(curl, CURLOPT_PUT, 1);
@@ -499,7 +503,10 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
std::string curlopt(this->CTest->GetCTestConfiguration("CurlOptions"));
std::vector<std::string> args = cmExpandedList(curlopt);
curl.SetCurlOptions(args);
- curl.SetTimeOutSeconds(SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT);
+ auto submitInactivityTimeout = this->GetSubmitInactivityTimeout();
+ if (submitInactivityTimeout != 0) {
+ curl.SetTimeOutSeconds(submitInactivityTimeout);
+ }
curl.SetHttpHeaders(this->HttpHeaders);
std::string url = this->CTest->GetSubmitURL();
if (!cmHasLiteralPrefix(url, "http://") &&
@@ -893,6 +900,26 @@ void cmCTestSubmitHandler::SelectParts(std::set<cmCTest::Part> const& parts)
}
}
+int cmCTestSubmitHandler::GetSubmitInactivityTimeout()
+{
+ int submitInactivityTimeout = SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT;
+ std::string const& timeoutStr =
+ this->CTest->GetCTestConfiguration("SubmitInactivityTimeout");
+ if (!timeoutStr.empty()) {
+ unsigned long timeout;
+ if (cmStrToULong(timeoutStr, &timeout)) {
+ submitInactivityTimeout = static_cast<int>(timeout);
+ } else {
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "SubmitInactivityTimeout is invalid: "
+ << cm::quoted(timeoutStr) << "."
+ << " Using a default value of "
+ << SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT << "." << std::endl);
+ }
+ }
+ return submitInactivityTimeout;
+}
+
void cmCTestSubmitHandler::SelectFiles(std::set<std::string> const& files)
{
this->Files.insert(files.begin(), files.end());
diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h
index 809c615..0c7253c 100644
--- a/Source/CTest/cmCTestSubmitHandler.h
+++ b/Source/CTest/cmCTestSubmitHandler.h
@@ -63,6 +63,7 @@ private:
void ParseResponse(cmCTestSubmitHandlerVectorOfChar chunk);
std::string GetSubmitResultsPrefix();
+ int GetSubmitInactivityTimeout();
class ResponseParser;
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 6e97a83..34088d2 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -59,6 +59,8 @@ public:
}
virtual ~cmCTestCommand() = default;
+ cmCTestCommand(const cmCTestCommand&) = default;
+ cmCTestCommand& operator=(const cmCTestCommand&) = default;
bool operator()(std::vector<cmListFileArgument> const& args,
cmExecutionStatus& status)
diff --git a/Source/Checks/cm_c11_thread_local.cmake b/Source/Checks/cm_c11_thread_local.cmake
index 2263be3..f59688d 100644
--- a/Source/Checks/cm_c11_thread_local.cmake
+++ b/Source/Checks/cm_c11_thread_local.cmake
@@ -1,5 +1,5 @@
set(CMake_C11_THREAD_LOCAL_BROKEN 0)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_C11_STANDARD_COMPILE_OPTION)
+if((CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "LCC") AND CMAKE_C11_STANDARD_COMPILE_OPTION)
if(NOT DEFINED CMake_C11_THREAD_LOCAL_WORKS)
include(${CMAKE_CURRENT_LIST_DIR}/cm_message_checks_compat.cmake)
cm_message_checks_compat(
diff --git a/Source/Checks/cm_cxx14_check.cmake b/Source/Checks/cm_cxx14_check.cmake
index e5656bf..abf232a 100644
--- a/Source/Checks/cm_cxx14_check.cmake
+++ b/Source/Checks/cm_cxx14_check.cmake
@@ -1,5 +1,5 @@
set(CMake_CXX14_BROKEN 0)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|PGI|Intel")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC|Clang|PGI|Intel")
if(NOT CMAKE_CXX14_STANDARD_COMPILE_OPTION)
set(CMake_CXX14_WORKS 0)
endif()
diff --git a/Source/Checks/cm_cxx17_check.cmake b/Source/Checks/cm_cxx17_check.cmake
index dba3eaf..78a2382 100644
--- a/Source/Checks/cm_cxx17_check.cmake
+++ b/Source/Checks/cm_cxx17_check.cmake
@@ -1,5 +1,5 @@
set(CMake_CXX17_BROKEN 0)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|PGI|Intel")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC|Clang|PGI|Intel")
if(NOT CMAKE_CXX17_STANDARD_COMPILE_OPTION)
set(CMake_CXX17_WORKS 0)
endif()
diff --git a/Source/CursesDialog/form/CMakeLists.txt b/Source/CursesDialog/form/CMakeLists.txt
index 9202bc1..22a2e84 100644
--- a/Source/CursesDialog/form/CMakeLists.txt
+++ b/Source/CursesDialog/form/CMakeLists.txt
@@ -5,7 +5,7 @@ project(CMAKE_FORM)
# Disable warnings to avoid changing 3rd party code.
if(CMAKE_C_COMPILER_ID MATCHES
- "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
+ "^(GNU|LCC|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
diff --git a/Source/cmCMakePresetsFile.h b/Source/cmCMakePresetsFile.h
index 7aa9b6a..c48a1f8 100644
--- a/Source/cmCMakePresetsFile.h
+++ b/Source/cmCMakePresetsFile.h
@@ -60,18 +60,20 @@ public:
class Preset
{
public:
-#if __cplusplus < 201703L && (!defined(_MSVC_LANG) || _MSVC_LANG < 201703L)
+ Preset() = default;
+ Preset(Preset&& /*other*/) = default;
+ Preset(const Preset& /*other*/) = default;
+ Preset& operator=(const Preset& /*other*/) = default;
+ virtual ~Preset() = default;
+#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
+ Preset& operator=(Preset&& /*other*/) = default;
+#else
// The move assignment operators for several STL classes did not become
// noexcept until C++17, which causes some tools to warn about this move
- // assignment operator throwing an exception when it shouldn't. Disable the
- // move assignment operator until C++17 is enabled.
- // Explicitly defining a copy assignment operator prevents the compiler
- // from automatically generating a move assignment operator.
- Preset& operator=(const Preset& /*other*/) = default;
+ // assignment operator throwing an exception when it shouldn't.
+ Preset& operator=(Preset&& /*other*/) = delete;
#endif
- virtual ~Preset() = default;
-
std::string Name;
std::vector<std::string> Inherits;
bool Hidden;
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 8ca9a66..0eda92c 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -924,13 +924,13 @@ void cmExportFileGenerator::GeneratePolicyHeaderCode(std::ostream& os)
// Isolate the file policy level.
// Support CMake versions as far back as 2.6 but also support using NEW
- // policy settings for up to CMake 3.20 (this upper limit may be reviewed
+ // policy settings for up to CMake 3.21 (this upper limit may be reviewed
// and increased from time to time). This reduces the opportunity for CMake
// warnings when an older export file is later used with newer CMake
// versions.
/* clang-format off */
os << "cmake_policy(PUSH)\n"
- << "cmake_policy(VERSION 2.6...3.20)\n";
+ << "cmake_policy(VERSION 2.6...3.21)\n";
/* clang-format on */
}
@@ -1072,6 +1072,12 @@ void cmExportFileGenerator::GenerateImportTargetCode(
os << "set_property(TARGET " << targetName << " PROPERTY DEPRECATION "
<< cmExportFileGeneratorEscape(target->GetDeprecation()) << ")\n";
}
+
+ if (target->GetPropertyAsBool("IMPORTED_NO_SYSTEM")) {
+ os << "set_property(TARGET " << targetName
+ << " PROPERTY IMPORTED_NO_SYSTEM 1)\n";
+ }
+
os << "\n";
}
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index e2c54d7..988c5c3 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -677,6 +677,12 @@ std::string cmExtraCodeBlocksGenerator::GetCBCompilerId(const cmMakefile* mf)
} else {
compiler = "pgi"; // does not exist as default in CodeBlocks 16.01
}
+ } else if (compilerId == "LCC") {
+ if (pureFortran) {
+ compiler = "lfortran";
+ } else {
+ compiler = "lcc";
+ }
} else if (compilerId == "GNU") {
if (pureFortran) {
compiler = "gfortran";
diff --git a/Source/cmFileTime.h b/Source/cmFileTime.h
index 4419880..ccc9633 100644
--- a/Source/cmFileTime.h
+++ b/Source/cmFileTime.h
@@ -24,6 +24,8 @@ public:
#endif
cmFileTime() = default;
~cmFileTime() = default;
+ cmFileTime(const cmFileTime&) = default;
+ cmFileTime& operator=(const cmFileTime&) = default;
/**
* @brief Loads the file time of fileName from the file system
diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx
index bdc9207..e896a87 100644
--- a/Source/cmFindCommon.cxx
+++ b/Source/cmFindCommon.cxx
@@ -240,14 +240,20 @@ void cmFindCommon::RerootPaths(std::vector<std::string>& paths)
std::vector<std::string> unrootedPaths = paths;
paths.clear();
+ auto isSameDirectoryOrSubDirectory = [](std::string const& l,
+ std::string const& r) {
+ return (cmSystemTools::GetRealPath(l) == cmSystemTools::GetRealPath(r)) ||
+ cmSystemTools::IsSubDirectory(l, r);
+ };
+
for (std::string const& r : roots) {
for (std::string const& up : unrootedPaths) {
// Place the unrooted path under the current root if it is not
// already inside. Skip the unrooted path if it is relative to
// a user home directory or is empty.
std::string rootedDir;
- if (cmSystemTools::IsSubDirectory(up, r) ||
- (stagePrefix && cmSystemTools::IsSubDirectory(up, *stagePrefix))) {
+ if (isSameDirectoryOrSubDirectory(up, r) ||
+ (stagePrefix && isSameDirectoryOrSubDirectory(up, *stagePrefix))) {
rootedDir = up;
} else if (!up.empty() && up[0] != '~') {
// Start with the new root.
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 8033ef5..fc02a47 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -747,6 +747,9 @@ void handleSystemIncludesDep(cmLocalGenerator* lg,
if (!depTgt->IsImported() || excludeImported) {
return;
}
+ if (depTgt->GetPropertyAsBool("IMPORTED_NO_SYSTEM")) {
+ return;
+ }
if (cmValue dirs = depTgt->GetProperty("INTERFACE_INCLUDE_DIRECTORIES")) {
cmExpandList(cmGeneratorExpression::Evaluate(*dirs, lg, config, headTarget,
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 83984f7..23b97ed 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4427,11 +4427,12 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id,
}
// Deprecate old policies.
- if (status == cmPolicies::OLD && id <= cmPolicies::CMP0088 &&
+ if (status == cmPolicies::OLD && id <= cmPolicies::CMP0094 &&
!(this->GetCMakeInstance()->GetIsInTryCompile() &&
(
// Policies set by cmCoreTryCompile::TryCompileCode.
- id == cmPolicies::CMP0065 || id == cmPolicies::CMP0083))) {
+ id == cmPolicies::CMP0065 || id == cmPolicies::CMP0083 ||
+ id == cmPolicies::CMP0091))) {
this->IssueMessage(MessageType::DEPRECATION_WARNING,
cmPolicies::GetPolicyDeprecatedWarning(id));
}
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 8edadd3..9f2ae19 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -897,28 +897,31 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
// Construct the compile rules.
{
- std::vector<std::string> compileCommands;
+ std::string cudaCompileMode;
if (lang == "CUDA") {
- std::string cmdVar;
if (this->GeneratorTarget->GetPropertyAsBool(
"CUDA_SEPARABLE_COMPILATION")) {
- cmdVar = "CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION";
- } else if (this->GeneratorTarget->GetPropertyAsBool(
- "CUDA_PTX_COMPILATION")) {
- cmdVar = "CMAKE_CUDA_COMPILE_PTX_COMPILATION";
+ const std::string& rdcFlag =
+ this->Makefile->GetRequiredDefinition("_CMAKE_CUDA_RDC_FLAG");
+ cudaCompileMode = cmStrCat(cudaCompileMode, rdcFlag, " ");
+ }
+ if (this->GeneratorTarget->GetPropertyAsBool("CUDA_PTX_COMPILATION")) {
+ const std::string& ptxFlag =
+ this->Makefile->GetRequiredDefinition("_CMAKE_CUDA_PTX_FLAG");
+ cudaCompileMode = cmStrCat(cudaCompileMode, ptxFlag);
} else {
- cmdVar = "CMAKE_CUDA_COMPILE_WHOLE_COMPILATION";
+ const std::string& wholeFlag =
+ this->Makefile->GetRequiredDefinition("_CMAKE_CUDA_WHOLE_FLAG");
+ cudaCompileMode = cmStrCat(cudaCompileMode, wholeFlag);
}
- const std::string& compileRule =
- this->Makefile->GetRequiredDefinition(cmdVar);
- cmExpandList(compileRule, compileCommands);
- } else {
- const std::string cmdVar = "CMAKE_" + lang + "_COMPILE_OBJECT";
- const std::string& compileRule =
- this->Makefile->GetRequiredDefinition(cmdVar);
- cmExpandList(compileRule, compileCommands);
+ vars.CudaCompileMode = cudaCompileMode.c_str();
}
+ std::vector<std::string> compileCommands;
+ const std::string& compileRule = this->Makefile->GetRequiredDefinition(
+ "CMAKE_" + lang + "_COMPILE_OBJECT");
+ cmExpandList(compileRule, compileCommands);
+
if (this->GeneratorTarget->GetPropertyAsBool("EXPORT_COMPILE_COMMANDS") &&
lang_can_export_cmds && compileCommands.size() == 1) {
std::string compileCommand = compileCommands[0];
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 57fc020..2c45e1b 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -605,6 +605,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
vars.TargetCompilePDB = "$TARGET_COMPILE_PDB";
vars.ObjectDir = "$OBJECT_DIR";
vars.ObjectFileDir = "$OBJECT_FILE_DIR";
+ vars.CudaCompileMode = "$CUDA_COMPILE_MODE";
vars.ISPCHeader = "$ISPC_HEADER_FILE";
cmMakefile* mf = this->GetMakefile();
@@ -815,27 +816,32 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
vars.Flags = flags.c_str();
vars.DependencyFile = rule.DepFile.c_str();
- // Rule for compiling object file.
- std::vector<std::string> compileCmds;
+ std::string cudaCompileMode;
if (lang == "CUDA") {
- std::string cmdVar;
if (this->GeneratorTarget->GetPropertyAsBool(
"CUDA_SEPARABLE_COMPILATION")) {
- cmdVar = "CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION";
- } else if (this->GeneratorTarget->GetPropertyAsBool(
- "CUDA_PTX_COMPILATION")) {
- cmdVar = "CMAKE_CUDA_COMPILE_PTX_COMPILATION";
+ const std::string& rdcFlag =
+ this->Makefile->GetRequiredDefinition("_CMAKE_CUDA_RDC_FLAG");
+ cudaCompileMode = cmStrCat(cudaCompileMode, rdcFlag, " ");
+ }
+ if (this->GeneratorTarget->GetPropertyAsBool("CUDA_PTX_COMPILATION")) {
+ const std::string& ptxFlag =
+ this->Makefile->GetRequiredDefinition("_CMAKE_CUDA_PTX_FLAG");
+ cudaCompileMode = cmStrCat(cudaCompileMode, ptxFlag);
} else {
- cmdVar = "CMAKE_CUDA_COMPILE_WHOLE_COMPILATION";
+ const std::string& wholeFlag =
+ this->Makefile->GetRequiredDefinition("_CMAKE_CUDA_WHOLE_FLAG");
+ cudaCompileMode = cmStrCat(cudaCompileMode, wholeFlag);
}
- const std::string& compileCmd = mf->GetRequiredDefinition(cmdVar);
- cmExpandList(compileCmd, compileCmds);
- } else {
- const std::string cmdVar = cmStrCat("CMAKE_", lang, "_COMPILE_OBJECT");
- const std::string& compileCmd = mf->GetRequiredDefinition(cmdVar);
- cmExpandList(compileCmd, compileCmds);
+ vars.CudaCompileMode = cudaCompileMode.c_str();
}
+ // Rule for compiling object file.
+ std::vector<std::string> compileCmds;
+ const std::string cmdVar = cmStrCat("CMAKE_", lang, "_COMPILE_OBJECT");
+ const std::string& compileCmd = mf->GetRequiredDefinition(cmdVar);
+ cmExpandList(compileCmd, compileCmds);
+
// See if we need to use a compiler launcher like ccache or distcc
std::string compilerLauncher;
if (!compileCmds.empty() &&
diff --git a/Source/cmRulePlaceholderExpander.cxx b/Source/cmRulePlaceholderExpander.cxx
index 7480aeb..4cee09d 100644
--- a/Source/cmRulePlaceholderExpander.cxx
+++ b/Source/cmRulePlaceholderExpander.cxx
@@ -85,6 +85,11 @@ std::string cmRulePlaceholderExpander::ExpandRuleVariable(
return replaceValues.ObjectsQuoted;
}
}
+ if (replaceValues.CudaCompileMode) {
+ if (variable == "CUDA_COMPILE_MODE") {
+ return replaceValues.CudaCompileMode;
+ }
+ }
if (replaceValues.AIXExports) {
if (variable == "AIX_EXPORTS") {
return replaceValues.AIXExports;
diff --git a/Source/cmRulePlaceholderExpander.h b/Source/cmRulePlaceholderExpander.h
index c22e0fa..852954f 100644
--- a/Source/cmRulePlaceholderExpander.h
+++ b/Source/cmRulePlaceholderExpander.h
@@ -65,6 +65,7 @@ public:
const char* SwiftOutputFileMap = nullptr;
const char* SwiftSources = nullptr;
const char* ISPCHeader = nullptr;
+ const char* CudaCompileMode = nullptr;
const char* Fatbinary = nullptr;
const char* RegisterFile = nullptr;
const char* Launcher = nullptr;
diff --git a/Source/cmSearchPath.h b/Source/cmSearchPath.h
index c15cb97..09f9722 100644
--- a/Source/cmSearchPath.h
+++ b/Source/cmSearchPath.h
@@ -26,6 +26,9 @@ public:
cmSearchPath(cmFindCommon* findCmd = nullptr);
~cmSearchPath();
+ cmSearchPath(const cmSearchPath&) = default;
+ cmSearchPath& operator=(const cmSearchPath&) = default;
+
const std::vector<std::string>& GetPaths() const { return this->Paths; }
std::size_t size() const { return this->Paths.size(); }
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 1ea0461..4e93a4a 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2337,7 +2337,8 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0)
}
}
- if (si.Kind == cmGeneratorTarget::SourceKindObjectSource) {
+ if (si.Kind == cmGeneratorTarget::SourceKindObjectSource ||
+ si.Kind == cmGeneratorTarget::SourceKindUnityBatched) {
this->OutputSourceSpecificFlags(e2, si.Source);
}
if (si.Source->GetPropertyAsBool("SKIP_PRECOMPILE_HEADERS")) {
@@ -3210,18 +3211,17 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
// the default to not have any extension
cudaOptions.AddFlag("CompileOut", "$(IntDir)%(Filename).obj");
- bool notPtx = true;
if (this->GeneratorTarget->GetPropertyAsBool("CUDA_SEPARABLE_COMPILATION")) {
cudaOptions.AddFlag("GenerateRelocatableDeviceCode", "true");
- } else if (this->GeneratorTarget->GetPropertyAsBool(
- "CUDA_PTX_COMPILATION")) {
+ }
+ bool notPtx = true;
+ if (this->GeneratorTarget->GetPropertyAsBool("CUDA_PTX_COMPILATION")) {
cudaOptions.AddFlag("NvccCompilation", "ptx");
// We drop the %(Extension) component as CMake expects all PTX files
// to not have the source file extension at all
cudaOptions.AddFlag("CompileOut", "$(IntDir)%(Filename).ptx");
notPtx = false;
}
-
if (notPtx &&
cmSystemTools::VersionCompareGreaterEq(
"8.0", this->GlobalGenerator->GetPlatformToolsetCudaString())) {
diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx
index 216d3f0..df4440f 100644
--- a/Source/cm_codecvt.cxx
+++ b/Source/cm_codecvt.cxx
@@ -42,7 +42,7 @@ codecvt::codecvt(Encoding e)
codecvt::~codecvt() = default;
-bool codecvt::do_always_noconv() const throw()
+bool codecvt::do_always_noconv() const noexcept
{
return this->m_noconv;
}
@@ -234,12 +234,12 @@ void codecvt::BufferPartial(mbstate_t& state, int size,
}
#endif
-int codecvt::do_max_length() const throw()
+int codecvt::do_max_length() const noexcept
{
return 4;
}
-int codecvt::do_encoding() const throw()
+int codecvt::do_encoding() const noexcept
{
return 0;
}
diff --git a/Source/cm_codecvt.hxx b/Source/cm_codecvt.hxx
index b73204f..9af083f 100644
--- a/Source/cm_codecvt.hxx
+++ b/Source/cm_codecvt.hxx
@@ -24,14 +24,14 @@ public:
protected:
~codecvt() override;
- bool do_always_noconv() const throw() override;
+ bool do_always_noconv() const noexcept override;
result do_out(mbstate_t& state, const char* from, const char* from_end,
const char*& from_next, char* to, char* to_end,
char*& to_next) const override;
result do_unshift(mbstate_t& state, char* to, char*,
char*& to_next) const override;
- int do_max_length() const throw() override;
- int do_encoding() const throw() override;
+ int do_max_length() const noexcept override;
+ int do_encoding() const noexcept override;
private:
// The mbstate_t argument to do_out and do_unshift is responsible
diff --git a/Source/kwsys/CTestConfig.cmake b/Source/kwsys/CTestConfig.cmake
index 12347b6..6484cc2 100644
--- a/Source/kwsys/CTestConfig.cmake
+++ b/Source/kwsys/CTestConfig.cmake
@@ -3,9 +3,7 @@
set(CTEST_PROJECT_NAME "KWSys")
set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
-if (NOT CTEST_DROP_METHOD STREQUAL "https")
- set(CTEST_DROP_METHOD "http")
-endif ()
+set(CTEST_DROP_METHOD "https")
set(CTEST_DROP_SITE "open.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard")
set(CTEST_DROP_SITE_CDASH TRUE)
diff --git a/Source/kwsys/MD5.c b/Source/kwsys/MD5.c
index fb18a5b..76995e2 100644
--- a/Source/kwsys/MD5.c
+++ b/Source/kwsys/MD5.c
@@ -10,6 +10,7 @@
#endif
#include <stddef.h> /* size_t */
+#include <stdint.h> /* uintptr_t */
#include <stdlib.h> /* malloc, free */
#include <string.h> /* memcpy, strlen */
@@ -202,7 +203,7 @@ static void md5_process(md5_state_t* pms, const md5_byte_t* data /*[64]*/)
* On little-endian machines, we can process properly aligned
* data without copying it.
*/
- if (!((data - (const md5_byte_t*)0) & 3)) {
+ if (!((uintptr_t)data & 3)) {
/* data are properly aligned */
X = (const md5_word_t*)data;
} else {
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 930d84c..bd900fe 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -3767,6 +3767,32 @@ bool SystemTools::Split(const std::string& str,
return true;
}
+std::string SystemTools::Join(const std::vector<std::string>& list,
+ const std::string& separator)
+{
+ std::string result;
+ if (list.empty()) {
+ return result;
+ }
+
+ size_t total_size = separator.size() * (list.size() - 1);
+ for (const std::string& string : list) {
+ total_size += string.size();
+ }
+
+ result.reserve(total_size);
+ bool needs_separator = false;
+ for (const std::string& string : list) {
+ if (needs_separator) {
+ result += separator;
+ }
+ result += string;
+ needs_separator = true;
+ }
+
+ return result;
+}
+
/**
* Return path of a full filename (no trailing slashes).
* Warning: returned path is converted to Unix slashes format.
diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in
index e5d115e..dd0cb3b 100644
--- a/Source/kwsys/SystemTools.hxx.in
+++ b/Source/kwsys/SystemTools.hxx.in
@@ -214,6 +214,13 @@ public:
char separator);
/**
+ * Joins a vector of strings into a single string, with separator in between
+ * each string.
+ */
+ static std::string Join(const std::vector<std::string>& list,
+ const std::string& separator);
+
+ /**
* Return string with space added between capitalized words
* (i.e. EatMyShorts becomes Eat My Shorts )
* (note that IEatShorts becomes IEat Shorts)
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index 6ccc7a7..f96bd71 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -626,6 +626,16 @@ static bool CheckStringOperations()
res = false;
}
+ std::vector<std::string> linesToJoin = { "Mary", "Had", "A", "Little",
+ "Lamb." };
+ std::string joinResult = kwsys::SystemTools::Join(linesToJoin, " ");
+ if (joinResult != "Mary Had A Little Lamb.") {
+ std::cerr << "Problem with Join "
+ "\"Mary Had A Little Lamb.\""
+ << std::endl;
+ res = false;
+ }
+
if (kwsys::SystemTools::ConvertToWindowsOutputPath(
"L://Local Mojo/Hex Power Pack/Iffy Voodoo") !=
"\"L:\\Local Mojo\\Hex Power Pack\\Iffy Voodoo\"") {
diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt
index 0a2c819..65207d8 100644
--- a/Tests/Assembler/CMakeLists.txt
+++ b/Tests/Assembler/CMakeLists.txt
@@ -9,7 +9,7 @@ set(SRCS)
# and also generate assembler files from C:
if("${CMAKE_GENERATOR}" MATCHES "Makefile|Xcode|Ninja" AND
NOT CMAKE_OSX_ARCHITECTURES MATCHES ";")
- if((CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang|HP|SunPro|XL)$") OR (CMAKE_C_COMPILER_ID MATCHES "Intel" AND UNIX)
+ if((CMAKE_C_COMPILER_ID MATCHES "^(GNU|LCC|Clang|AppleClang|HP|SunPro|XL)$") OR (CMAKE_C_COMPILER_ID MATCHES "Intel" AND UNIX)
AND NOT (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND "x${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC"))
set(C_FLAGS "${CMAKE_C_FLAGS}")
separate_arguments(C_FLAGS)
diff --git a/Tests/CMakeCommands/add_compile_options/CMakeLists.txt b/Tests/CMakeCommands/add_compile_options/CMakeLists.txt
index b28d0be..6e5160b 100644
--- a/Tests/CMakeCommands/add_compile_options/CMakeLists.txt
+++ b/Tests/CMakeCommands/add_compile_options/CMakeLists.txt
@@ -6,7 +6,7 @@ add_compile_options(-DTEST_OPTION)
add_executable(add_compile_options main.cpp)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC")
target_compile_definitions(add_compile_options
PRIVATE
"DO_GNU_TESTS"
diff --git a/Tests/CMakeCommands/target_compile_options/CMakeLists.txt b/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
index 268c7eb..362133e 100644
--- a/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
@@ -7,14 +7,14 @@ add_executable(target_compile_options
"${CMAKE_CURRENT_SOURCE_DIR}/main.cpp"
)
target_compile_options(target_compile_options
- PRIVATE $<$<CXX_COMPILER_ID:AppleClang,Clang,GNU>:-DMY_PRIVATE_DEFINE>
- PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU>:-DMY_PUBLIC_DEFINE>
- PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>:-DMY_MUTLI_COMP_PUBLIC_DEFINE>
- INTERFACE $<$<CXX_COMPILER_ID:GNU>:-DMY_INTERFACE_DEFINE>
- INTERFACE $<$<CXX_COMPILER_ID:GNU,Clang,AppleClang>:-DMY_MULTI_COMP_INTERFACE_DEFINE>
+ PRIVATE $<$<CXX_COMPILER_ID:AppleClang,Clang,GNU,LCC>:-DMY_PRIVATE_DEFINE>
+ PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU,LCC>:-DMY_PUBLIC_DEFINE>
+ PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU,LCC,Clang,AppleClang>:-DMY_MUTLI_COMP_PUBLIC_DEFINE>
+ INTERFACE $<$<CXX_COMPILER_ID:GNU,LCC>:-DMY_INTERFACE_DEFINE>
+ INTERFACE $<$<CXX_COMPILER_ID:GNU,LCC,Clang,AppleClang>:-DMY_MULTI_COMP_INTERFACE_DEFINE>
)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC")
target_compile_definitions(target_compile_options
PRIVATE
"DO_GNU_TESTS"
@@ -47,10 +47,10 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio")
endif()
target_compile_options(consumer
- PRIVATE $<$<CXX_COMPILER_ID:GNU,Clang,AppleClang>:$<TARGET_PROPERTY:target_compile_options,INTERFACE_COMPILE_OPTIONS>>
+ PRIVATE $<$<CXX_COMPILER_ID:GNU,LCC,Clang,AppleClang>:$<TARGET_PROPERTY:target_compile_options,INTERFACE_COMPILE_OPTIONS>>
)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC")
target_compile_definitions(consumer
PRIVATE
"DO_GNU_TESTS"
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
index 741c73e..83103cf 100644
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
@@ -25,7 +25,7 @@ target_link_libraries(staticlib1 LINK_PUBLIC staticlib2)
# Try adding a private link item to be propagated out of a static lib.
set(private_link "")
-if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
+if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang OR CMAKE_CXX_COMPILER_ID MATCHES LCC)
if (CMAKE_SYSTEM_NAME STREQUAL "SunOS")
set(private_link "-Wl,-V")
else()
diff --git a/Tests/CMakeLib/testUVRAII.cxx b/Tests/CMakeLib/testUVRAII.cxx
index 7d21959..fd88e24 100644
--- a/Tests/CMakeLib/testUVRAII.cxx
+++ b/Tests/CMakeLib/testUVRAII.cxx
@@ -221,10 +221,15 @@ static bool testLoopDestructor()
int testUVRAII(int, char** const)
{
- if ((testAsyncShutdown() &&
- testAsyncDtor() & testAsyncMove() & testCrossAssignment() &
- testAllMoves() & testLoopReset() & testLoopDestructor()) == 0) {
+ if (!testAsyncShutdown()) {
return -1;
}
- return 0;
+ bool passed = true;
+ passed = testAsyncDtor() && passed;
+ passed = testAsyncMove() && passed;
+ passed = testCrossAssignment() && passed;
+ passed = testAllMoves() && passed;
+ passed = testLoopReset() && passed;
+ passed = testLoopDestructor() && passed;
+ return passed ? 0 : -1;
}
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index d1f7b69..7a8e362 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -531,8 +531,8 @@ if(BUILD_TESTING)
if (NOT CMAKE_GENERATOR STREQUAL "Xcode")
ADD_TEST_MACRO(SourceFileIncludeDirProperty SourceFileIncludeDirProperty)
endif()
- if(CMAKE_CXX_COMPILER_ID STREQUAL GNU
- AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "LCC" OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
+ AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7))
set(runCxxDialectTest 1)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL Clang
@@ -670,7 +670,7 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(Module.WriteCompilerDetectionHeader WriteCompilerDetectionHeader)
- if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "LCC")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-fPIE run_pic_test)
else()
@@ -687,9 +687,10 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(PositionIndependentTargets PositionIndependentTargets)
endif()
- if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") AND
+ if(CMAKE_CXX_COMPILER_ID MATCHES "LCC" OR
+ ((CMAKE_CXX_COMPILER_ID MATCHES "GNU") AND
(NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 4.2) AND
- (CMAKE_SYSTEM_NAME MATCHES "Linux"))
+ (CMAKE_SYSTEM_NAME MATCHES "Linux")))
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(
@@ -2004,7 +2005,7 @@ if(BUILD_TESTING)
set_tests_properties ( linkorder2 PROPERTIES DEPENDS linkorder1)
# Test static linking on toolchains known to support it.
- if(CMAKE_C_COMPILER_ID STREQUAL "GNU"
+ if((CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "LCC")
AND NOT APPLE AND NOT WIN32 AND NOT CYGWIN
AND EXISTS "/usr/lib/libm.a")
add_test(LinkStatic ${CMAKE_CTEST_COMMAND}
@@ -2019,7 +2020,7 @@ if(BUILD_TESTING)
)
endif()
- if(MAKE_SUPPORTS_SPACES AND NOT CMAKE_GENERATOR STREQUAL "Xcode")
+ if(MAKE_SUPPORTS_SPACES AND NOT CMAKE_GENERATOR STREQUAL "Xcode" AND NOT CMAKE_GENERATOR STREQUAL "Watcom WMake")
add_test(SubDirSpaces ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/SubDirSpaces"
@@ -3657,6 +3658,7 @@ if(BUILD_TESTING)
if(CMAKE_GENERATOR MATCHES "^((Unix|MSYS) Makefiles|Ninja)$" AND
((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4)
OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+ OR (CMAKE_CXX_COMPILER_ID STREQUAL "LCC")
OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")))
add_test(IncludeDirectoriesCPATH ${CMAKE_CTEST_COMMAND}
--build-and-test
diff --git a/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt b/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
index aca99ce..9c203c7 100644
--- a/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
@@ -57,7 +57,7 @@ else()
message("Unhandled Platform")
endif()
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC|Clang" AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
check_cxx_compiler_flag("-x c++" HAVE_X_CXX)
if(NOT HAVE_X_CXX)
message(FATAL_ERROR "${CMAKE_CXX_COMPILER_ID} compiler flag '-x c++' check failed")
diff --git a/Tests/CompileFeatures/cxx_generalized_initializers.cpp b/Tests/CompileFeatures/cxx_generalized_initializers.cpp
index bfe0d41..c4f47fe 100644
--- a/Tests/CompileFeatures/cxx_generalized_initializers.cpp
+++ b/Tests/CompileFeatures/cxx_generalized_initializers.cpp
@@ -11,8 +11,11 @@ class initializer_list
const _E* __begin_;
size_t __size_;
-#ifdef __INTEL_COMPILER
- // The Intel compiler internally asserts the constructor overloads, so
+#if defined(__INTEL_COMPILER) || \
+ (defined(__LCC__) && \
+ (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__)))
+ // Compilers based on EDG, such as Intel compiler and MCST LCC,
+ // internally assert the constructor overloads, so
// reproduce the constructor used in its <initializer_list> header.
initializer_list(const _E*, size_t) {}
#else
diff --git a/Tests/CompileOptions/CMakeLists.txt b/Tests/CompileOptions/CMakeLists.txt
index 1bedac0..e6db5b7 100644
--- a/Tests/CompileOptions/CMakeLists.txt
+++ b/Tests/CompileOptions/CMakeLists.txt
@@ -30,8 +30,8 @@ endif()
set_property(TARGET CompileOptions PROPERTY COMPILE_OPTIONS
"-DTEST_DEFINE"
"-DNEEDS_ESCAPE=\"E$CAPE\""
- "$<$<CXX_COMPILER_ID:GNU>:-DTEST_DEFINE_GNU>"
- "$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-DTEST_DEFINE_CXX_AND_GNU>"
+ "$<$<CXX_COMPILER_ID:GNU,LCC>:-DTEST_DEFINE_GNU>"
+ "$<$<COMPILE_LANG_AND_ID:CXX,GNU,LCC>:-DTEST_DEFINE_CXX_AND_GNU>"
"SHELL:" # produces no options
${c_tests}
${cxx_tests}
@@ -49,15 +49,15 @@ else()
)
endif()
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|Borland|Embarcadero" AND NOT "${CMAKE_GENERATOR}" MATCHES "NMake Makefiles")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC|Clang|Borland|Embarcadero" AND NOT "${CMAKE_GENERATOR}" MATCHES "NMake Makefiles")
set_property(TARGET CompileOptions APPEND PROPERTY COMPILE_OPTIONS
"-DTEST_OCTOTHORPE=\"#\""
)
endif()
-if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|AppleClang|MSVC)$")
+if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|LCC|AppleClang|MSVC)$")
target_compile_definitions(CompileOptions PRIVATE "DO_FLAG_TESTS")
- if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|AppleClang)$")
+ if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|LCC|AppleClang)$")
string(APPEND CMAKE_CXX_FLAGS " -w")
endif()
string(APPEND CMAKE_CXX_FLAGS " -DFLAG_A=1 -DFLAG_B=1")
@@ -79,7 +79,7 @@ endif()
target_link_libraries(CompileOptions testlib)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC")
target_compile_definitions(CompileOptions
PRIVATE
"DO_GNU_TESTS"
diff --git a/Tests/CudaOnly/CMakeLists.txt b/Tests/CudaOnly/CMakeLists.txt
index a3fb409..65dfebb 100644
--- a/Tests/CudaOnly/CMakeLists.txt
+++ b/Tests/CudaOnly/CMakeLists.txt
@@ -16,6 +16,7 @@ add_cuda_test_macro(CudaOnly.WithDefs CudaOnlyWithDefs)
add_cuda_test_macro(CudaOnly.CircularLinkLine CudaOnlyCircularLinkLine)
add_cuda_test_macro(CudaOnly.ResolveDeviceSymbols CudaOnlyResolveDeviceSymbols)
add_cuda_test_macro(CudaOnly.SeparateCompilation main/CudaOnlySeparateCompilation)
+add_cuda_test_macro(CudaOnly.SeparateCompilationPTX CudaOnlySeparateCompilationPTX)
if(CMake_TEST_CUDA AND NOT CMake_TEST_CUDA STREQUAL "Clang")
# Clang doesn't have flags for selecting the runtime.
diff --git a/Tests/CudaOnly/ExportPTX/CMakeLists.txt b/Tests/CudaOnly/ExportPTX/CMakeLists.txt
index e7e7bc4..f1667af 100644
--- a/Tests/CudaOnly/ExportPTX/CMakeLists.txt
+++ b/Tests/CudaOnly/ExportPTX/CMakeLists.txt
@@ -56,7 +56,7 @@ add_custom_command(
"-DBIN_TO_C_COMMAND=${bin_to_c}"
"-DOBJECTS=$<TARGET_OBJECTS:CudaPTX>"
"-DOUTPUT=${output_file}"
- -P ${CMAKE_CURRENT_SOURCE_DIR}/bin2c_wrapper.cmake
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/../utils/bin2c_wrapper.cmake
VERBATIM
DEPENDS $<TARGET_OBJECTS:CudaPTX>
COMMENT "Converting Object files to a C header"
diff --git a/Tests/CudaOnly/SeparateCompilationPTX/CMakeLists.txt b/Tests/CudaOnly/SeparateCompilationPTX/CMakeLists.txt
new file mode 100644
index 0000000..273f955
--- /dev/null
+++ b/Tests/CudaOnly/SeparateCompilationPTX/CMakeLists.txt
@@ -0,0 +1,51 @@
+cmake_minimum_required(VERSION 3.19)
+project (SeparateCompPTX CUDA)
+
+#Goal for this example:
+# How to generate PTX files with RDC enabled
+
+# PTX can be compiled only for a single virtual architecture at a time
+list(POP_FRONT CMAKE_CUDA_ARCHITECTURES temp)
+set(CMAKE_CUDA_ARCHITECTURES ${temp})
+string(APPEND CMAKE_CUDA_ARCHITECTURES "-virtual")
+
+add_library(CudaPTX OBJECT kernels.cu)
+set_property(TARGET CudaPTX PROPERTY CUDA_PTX_COMPILATION ON)
+set_property(TARGET CudaPTX PROPERTY CUDA_SEPARABLE_COMPILATION ON)
+
+
+set(output_file ${CMAKE_CURRENT_BINARY_DIR}/embedded_objs.h)
+
+find_package(CUDAToolkit REQUIRED)
+find_program(bin_to_c
+ NAMES bin2c
+ PATHS ${CUDAToolkit_BIN_DIR}
+ )
+if(NOT bin_to_c)
+ message(FATAL_ERROR
+ "bin2c not found:\n"
+ " CUDAToolkit_BIN_DIR='${CUDAToolkit_BIN_DIR}'\n"
+ )
+endif()
+
+add_custom_command(
+ OUTPUT "${output_file}"
+ COMMAND ${CMAKE_COMMAND}
+ "-DBIN_TO_C_COMMAND=${bin_to_c}"
+ "-DOBJECTS=$<TARGET_OBJECTS:CudaPTX>"
+ "-DOUTPUT=${output_file}"
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/../utils/bin2c_wrapper.cmake
+ VERBATIM
+ DEPENDS $<TARGET_OBJECTS:CudaPTX>
+ COMMENT "Converting Object files to a C header"
+ )
+
+add_executable(CudaOnlySeparateCompilationPTX main.cu ${output_file})
+target_compile_features(CudaOnlySeparateCompilationPTX PRIVATE cuda_std_11)
+target_include_directories(CudaOnlySeparateCompilationPTX PRIVATE
+ ${CMAKE_CURRENT_BINARY_DIR} )
+target_link_libraries(CudaOnlySeparateCompilationPTX PRIVATE CUDA::cuda_driver)
+if(APPLE)
+ # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime.
+ set_property(TARGET CudaOnlySeparateCompilationPTX PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
+endif()
diff --git a/Tests/CudaOnly/SeparateCompilationPTX/kernels.cu b/Tests/CudaOnly/SeparateCompilationPTX/kernels.cu
new file mode 100644
index 0000000..f4a52d4
--- /dev/null
+++ b/Tests/CudaOnly/SeparateCompilationPTX/kernels.cu
@@ -0,0 +1,14 @@
+
+__global__ void kernelA(float* r, float* x, float* y, float* z, int size)
+{
+ for (int i = threadIdx.x; i < size; i += blockDim.x) {
+ r[i] = x[i] * y[i] + z[i];
+ }
+}
+
+__global__ void kernelB(float* r, float* x, float* y, float* z, int size)
+{
+ for (int i = threadIdx.x; i < size; i += blockDim.x) {
+ r[i] = x[i] * y[i] + z[i];
+ }
+}
diff --git a/Tests/CudaOnly/SeparateCompilationPTX/main.cu b/Tests/CudaOnly/SeparateCompilationPTX/main.cu
new file mode 100644
index 0000000..164cde5
--- /dev/null
+++ b/Tests/CudaOnly/SeparateCompilationPTX/main.cu
@@ -0,0 +1,30 @@
+#include <iostream>
+
+#include <cuda.h>
+
+#include "embedded_objs.h"
+
+int main()
+{
+ cuInit(0);
+ int count = 0;
+ cuDeviceGetCount(&count);
+ if (count == 0) {
+ std::cerr << "No CUDA devices found\n";
+ return 1;
+ }
+
+ CUdevice device;
+ cuDeviceGet(&device, 0);
+
+ CUcontext context;
+ cuCtxCreate(&context, 0, device);
+
+ CUmodule module;
+ cuModuleLoadData(&module, kernels);
+ if (module == nullptr) {
+ std::cerr << "Failed to load the embedded ptx" << std::endl;
+ return 1;
+ }
+ std::cout << module << std::endl;
+}
diff --git a/Tests/CudaOnly/ExportPTX/bin2c_wrapper.cmake b/Tests/CudaOnly/utils/bin2c_wrapper.cmake
index 0baf934..0baf934 100644
--- a/Tests/CudaOnly/ExportPTX/bin2c_wrapper.cmake
+++ b/Tests/CudaOnly/utils/bin2c_wrapper.cmake
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index a2968d4..3a490c2 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -145,6 +145,19 @@ set_property(TARGET testLibCycleA PROPERTY LINK_INTERFACE_MULTIPLICITY 3)
add_library(testLibNoSONAME SHARED testLibNoSONAME.c)
set_property(TARGET testLibNoSONAME PROPERTY NO_SONAME 1)
+add_library(testInterfaceIncludeUser INTERFACE)
+target_include_directories(testInterfaceIncludeUser
+ INTERFACE
+ "$<INSTALL_INTERFACE:include/testInterfaceIncludeUser>"
+ "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/testInterfaceIncludeUser>"
+)
+set_property(TARGET testInterfaceIncludeUser PROPERTY IMPORTED_NO_SYSTEM 1)
+install(
+ FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/include/testInterfaceIncludeUser/testInterfaceInclude.h"
+ DESTINATION include/testInterfaceIncludeUser
+)
+
cmake_policy(PUSH)
cmake_policy(SET CMP0022 NEW)
# Test exporting dependent libraries into different exports
@@ -286,6 +299,7 @@ set_property(TARGET testSharedLibRequired
set_property(TARGET testSharedLibRequired APPEND PROPERTY
INTERFACE_COMPILE_OPTIONS
$<$<CXX_COMPILER_ID:GNU>:-DCUSTOM_COMPILE_OPTION>
+ $<$<CXX_COMPILER_ID:LCC>:-DCUSTOM_COMPILE_OPTION>
)
add_library(testSharedLibRequiredUser SHARED testSharedLibRequiredUser.cpp)
@@ -531,6 +545,7 @@ install(
cmp0022NEW cmp0022OLD
TopDirLib SubDirLinkA
systemlib
+ testInterfaceIncludeUser
EXPORT exp
RUNTIME DESTINATION $<1:bin>$<0:/wrong>
LIBRARY DESTINATION $<1:lib>$<0:/wrong> NAMELINK_SKIP
@@ -590,6 +605,7 @@ export(TARGETS testExe1 testLib1 testLib2 testLib3
cmp0022NEW cmp0022OLD
TopDirLib SubDirLinkA
systemlib
+ testInterfaceIncludeUser
NAMESPACE bld_
FILE ExportBuildTree.cmake
)
diff --git a/Tests/ExportImport/Export/include/testInterfaceIncludeUser/testInterfaceInclude.h b/Tests/ExportImport/Export/include/testInterfaceIncludeUser/testInterfaceInclude.h
new file mode 100644
index 0000000..fa882cb
--- /dev/null
+++ b/Tests/ExportImport/Export/include/testInterfaceIncludeUser/testInterfaceInclude.h
@@ -0,0 +1 @@
+/* empty file */
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index 3cb3833..d6cc8d0 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -70,6 +70,10 @@ target_link_libraries(imp_testExe1
exp_testLibPerConfigDest
)
+add_library(imp_testInterfaceInclude1 STATIC imp_testInterfaceInclude1.c)
+target_include_directories(imp_testInterfaceInclude1 SYSTEM PRIVATE testInterfaceIncludeSystem)
+target_link_libraries(imp_testInterfaceInclude1 PRIVATE exp_testInterfaceIncludeUser)
+
# Try building a plugin to an executable imported from the install tree.
add_library(imp_mod1 MODULE imp_mod1.c)
target_link_libraries(imp_mod1 exp_testExe2)
@@ -110,6 +114,10 @@ target_link_libraries(imp_testExe1b
bld_testLibPerConfigDest
)
+add_library(imp_testInterfaceInclude1b STATIC imp_testInterfaceInclude1.c)
+target_include_directories(imp_testInterfaceInclude1b SYSTEM PRIVATE testInterfaceIncludeSystem)
+target_link_libraries(imp_testInterfaceInclude1b PRIVATE bld_testInterfaceIncludeUser)
+
add_custom_target(check_testLib1_genex ALL
COMMAND ${CMAKE_COMMAND} -DtestLib1=$<TARGET_FILE:exp_testLib1>
-Dprefix=${CMAKE_INSTALL_PREFIX}
@@ -325,14 +333,14 @@ target_compile_definitions(deps_shared_iface
$<$<STREQUAL:$<TARGET_PROPERTY:CUSTOM_STRING>,testcontent>:CUSTOM_STRING_IS_MATCH>
)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "LCC")
target_compile_definitions(deps_shared_iface
PRIVATE
"DO_GNU_TESTS"
)
endif()
-if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "LCC")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-fPIE run_pic_test)
else()
@@ -365,7 +373,7 @@ endif()
add_executable(deps_shared_iface2 deps_shared_iface.cpp)
target_link_libraries(deps_shared_iface2 bld_testSharedLibDepends bld_subdirlib)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "LCC")
target_compile_definitions(deps_shared_iface2
PRIVATE
"DO_GNU_TESTS"
@@ -413,6 +421,7 @@ endforeach()
unset(_configs)
if (((CMAKE_C_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.4)
+ OR CMAKE_C_COMPILER_ID MATCHES "LCC"
OR (CMAKE_C_COMPILER_ID STREQUAL Clang AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC"))
AND (CMAKE_GENERATOR STREQUAL "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL "Ninja"))
include(CheckCXXCompilerFlag)
diff --git a/Tests/ExportImport/Import/A/imp_testInterfaceInclude1.c b/Tests/ExportImport/Import/A/imp_testInterfaceInclude1.c
new file mode 100644
index 0000000..88a49b5
--- /dev/null
+++ b/Tests/ExportImport/Import/A/imp_testInterfaceInclude1.c
@@ -0,0 +1,6 @@
+#include "testInterfaceInclude.h"
+
+int imp_testInterfaceInclude1(void)
+{
+ return 0;
+}
diff --git a/Tests/ExportImport/Import/A/testInterfaceIncludeSystem/testInterfaceInclude.h b/Tests/ExportImport/Import/A/testInterfaceIncludeSystem/testInterfaceInclude.h
new file mode 100644
index 0000000..2beeb8b
--- /dev/null
+++ b/Tests/ExportImport/Import/A/testInterfaceIncludeSystem/testInterfaceInclude.h
@@ -0,0 +1 @@
+#error testInterfaceInclude.h included from testInterfaceIncludeSystem
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 2fc47a5..69899e9 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -14,7 +14,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(XL|VisualAge)$")
# We do not implement SHARED Fortran libs on AIX yet!
# Workaround: Set LINKER_LANGUAGE to C, which uses 'xlc' and Fortran implicits.
set(_SHARED STATIC)
-elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU|LCC")
# g77 2.96 does not support shared libs on Itanium because g2c is not -fPIC
execute_process(COMMAND ${CMAKE_Fortran_COMPILER} --version
OUTPUT_VARIABLE output ERROR_VARIABLE output)
@@ -26,7 +26,7 @@ endif()
# Pick a module .def file with the properly mangled symbol name.
set(world_def "")
if(WIN32 AND NOT CYGWIN)
- if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
+ if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU|LCC")
set(world_def world_gnu.def)
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel" OR
CMAKE_GENERATOR MATCHES "Visual Studio") # Intel plugin
diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt
index 4c488e6..dd29fe5 100644
--- a/Tests/IncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/CMakeLists.txt
@@ -4,6 +4,7 @@ project(IncludeDirectories)
if (((CMAKE_C_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.4)
OR (CMAKE_C_COMPILER_ID STREQUAL Clang AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
OR CMAKE_C_COMPILER_ID STREQUAL AppleClang
+ OR CMAKE_C_COMPILER_ID STREQUAL LCC
OR ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC" AND
CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "19.29.30036.3" AND
NOT CMAKE_GENERATOR MATCHES "Visual Studio")) # No support for VS generators yet.
@@ -115,6 +116,13 @@ add_library(ordertest ordertest.cpp)
target_include_directories(ordertest SYSTEM PUBLIC SystemIncludeDirectories/systemlib)
target_include_directories(ordertest PUBLIC SystemIncludeDirectories/userlib)
+add_library(ordertest2 ordertest.cpp)
+target_include_directories(ordertest2 SYSTEM PRIVATE SystemIncludeDirectories/systemlib)
+target_link_libraries(ordertest2 PRIVATE ordertest2_userlib)
+add_library(ordertest2_userlib INTERFACE IMPORTED)
+target_include_directories(ordertest2_userlib INTERFACE SystemIncludeDirectories/userlib)
+set_property(TARGET ordertest2_userlib PROPERTY IMPORTED_NO_SYSTEM 1)
+
add_subdirectory(StandardIncludeDirectories)
add_subdirectory(TargetIncludeDirectories)
diff --git a/Tests/LinkStatic/CMakeLists.txt b/Tests/LinkStatic/CMakeLists.txt
index 200d4e5..60a270b 100644
--- a/Tests/LinkStatic/CMakeLists.txt
+++ b/Tests/LinkStatic/CMakeLists.txt
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 2.8.4.20110303 FATAL_ERROR)
project(LinkStatic C)
-if(NOT CMAKE_C_COMPILER_ID STREQUAL "GNU")
- message(FATAL_ERROR "This test works only with the GNU compiler!")
+if(NOT CMAKE_C_COMPILER_ID MATCHES "GNU|LCC")
+ message(FATAL_ERROR "This test works only with the GNU or LCC compiler!")
endif()
find_library(MATH_LIBRARY NAMES libm.a)
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
index e406758..694073a 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
+++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
@@ -52,7 +52,7 @@ endmacro()
# detailed features tables, not just meta-features
if (CMAKE_C_COMPILE_FEATURES)
- if (NOT CMAKE_C_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IntelLLVM|Fujitsu|FujitsuClang)$")
+ if (NOT CMAKE_C_COMPILER_ID MATCHES "^(LCC|Cray|PGI|NVHPC|XL|XLClang|IntelLLVM|Fujitsu|FujitsuClang)$")
set(C_expected_features ${CMAKE_C_COMPILE_FEATURES})
list(FILTER C_expected_features EXCLUDE REGEX "^c_std_[0-9][0-9]")
endif()
@@ -95,7 +95,7 @@ if (C_expected_features)
endif()
if (CMAKE_CXX_COMPILE_FEATURES)
- if (NOT CMAKE_CXX_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IntelLLVM|Fujitsu|FujitsuClang)$")
+ if (NOT CMAKE_CXX_COMPILER_ID MATCHES "^(LCC|Cray|PGI|NVHPC|XL|XLClang|IntelLLVM|Fujitsu|FujitsuClang)$")
set(CXX_expected_features ${CMAKE_CXX_COMPILE_FEATURES})
list(FILTER CXX_expected_features EXCLUDE REGEX "^cxx_std_[0-9][0-9]")
endif()
diff --git a/Tests/RunCMake/BuildDepends/MakeDependencies.step1.cmake b/Tests/RunCMake/BuildDepends/MakeDependencies.step1.cmake
index c74f033..04cd698 100644
--- a/Tests/RunCMake/BuildDepends/MakeDependencies.step1.cmake
+++ b/Tests/RunCMake/BuildDepends/MakeDependencies.step1.cmake
@@ -1,5 +1,10 @@
file(TOUCH "${RunCMake_TEST_BINARY_DIR}/main.c")
-foreach(i RANGE 1 20000)
+if(RunCMake_GENERATOR STREQUAL "Borland Makefiles")
+ set(num_headers 2000)
+else()
+ set(num_headers 20000)
+endif()
+foreach(i RANGE 1 ${num_headers})
file(WRITE "${RunCMake_TEST_BINARY_DIR}/temp_header_file_${i}.h"
"#define HEADER_${i} ${i}\n"
)
diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
index 27bbff6..06f416b 100644
--- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
@@ -159,6 +159,7 @@ endif()
if ((RunCMake_GENERATOR STREQUAL "Unix Makefiles"
AND (CMAKE_C_COMPILER_ID STREQUAL "GNU"
+ OR CMAKE_C_COMPILER_ID STREQUAL "LCC"
OR CMAKE_C_COMPILER_ID STREQUAL "Clang"
OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang"))
OR (RunCMake_GENERATOR STREQUAL "NMake Makefiles"
diff --git a/Tests/RunCMake/CMP0119/RunCMakeTest.cmake b/Tests/RunCMake/CMP0119/RunCMakeTest.cmake
index e547ef5..7395827 100644
--- a/Tests/RunCMake/CMP0119/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0119/RunCMakeTest.cmake
@@ -12,6 +12,6 @@ if(NOT RunCMake_GENERATOR MATCHES "Visual Studio|Xcode" AND
run_CMP0119(WARN)
run_CMP0119(OLD)
endif()
-if((CMAKE_C_COMPILER_ID MATCHES "(GNU|Clang|MSVC|Borland|Embarcadero|Intel|TI)"))
+if((CMAKE_C_COMPILER_ID MATCHES "(GNU|LCC|Clang|MSVC|Borland|Embarcadero|Intel|TI)"))
run_CMP0119(NEW)
endif()
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index e24ef58..c566b42 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -256,7 +256,7 @@ endif()
add_RunCMake_test(ArtifactOutputDirs)
if(NOT DEFINED CMake_TEST_BuildDepends_GNU_AS
- AND CMAKE_C_COMPILER_ID STREQUAL "GNU"
+ AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "LCC")
AND CMAKE_GENERATOR MATCHES "^Ninja"
)
execute_process(COMMAND "${CMAKE_C_COMPILER}" -print-prog-name=as
@@ -347,7 +347,6 @@ endif()
add_RunCMake_test(ScriptMode)
add_RunCMake_test(Swift -DCMAKE_Swift_COMPILER=${CMAKE_Swift_COMPILER})
add_RunCMake_test(TargetObjects)
-add_RunCMake_test(TargetSources)
add_RunCMake_test(TargetProperties)
add_RunCMake_test(ToolchainFile)
add_RunCMake_test(find_dependency)
@@ -682,7 +681,7 @@ set_property(TEST RunCMake.CheckCompilerFlag
add_RunCMake_test(CheckModules)
add_RunCMake_test(CheckIPOSupported)
if (CMAKE_SYSTEM_NAME MATCHES "(Linux|Darwin)"
- AND (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU" OR CMAKE_Fortran_COMPILER_ID MATCHES "GNU"))
+ AND (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU|LCC" OR CMAKE_Fortran_COMPILER_ID MATCHES "GNU|LCC"))
add_RunCMake_test(CheckLinkerFlag -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
-DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID}
-DCMake_TEST_CUDA=${CMake_TEST_CUDA}
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 7997c78..eb9ff03 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -3,13 +3,22 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
include(RunCMake)
include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake")
+# A debugedit binary is required for these tests, so skip them if it's not found
+find_program(DEBUGEDIT debugedit)
+
# run_cpack_test args: TEST_NAME "GENERATORS" RUN_CMAKE_BUILD_STEP "PACKAGING_TYPES"
run_cpack_test(CUSTOM_BINARY_SPEC_FILE "RPM.CUSTOM_BINARY_SPEC_FILE" false "MONOLITHIC;COMPONENT")
run_cpack_test(CUSTOM_NAMES "RPM.CUSTOM_NAMES;DEB.CUSTOM_NAMES;TGZ;DragNDrop" true "COMPONENT")
-run_cpack_test(DEBUGINFO "RPM.DEBUGINFO;DEB.DEBUGINFO" true "COMPONENT")
+run_cpack_test(DEBUGINFO "DEB.DEBUGINFO" true "COMPONENT")
+if(NOT "${DEBUGEDIT}" STREQUAL "DEBUGEDIT-NOTFOUND")
+ run_cpack_test(DEBUGINFO "RPM.DEBUGINFO" true "COMPONENT")
+endif()
run_cpack_test(DEBUGINFO "DEB.DEBUGINFO" true "MONOLITHIC")
run_cpack_test_subtests(DEFAULT_PERMISSIONS "CMAKE_var_set;CPACK_var_set;both_set;invalid_CMAKE_var;invalid_CPACK_var" "RPM.DEFAULT_PERMISSIONS;DEB.DEFAULT_PERMISSIONS" false "MONOLITHIC;COMPONENT")
-run_cpack_test(DEPENDENCIES "RPM.DEPENDENCIES;DEB.DEPENDENCIES" true "COMPONENT")
+run_cpack_test(DEPENDENCIES "DEB.DEPENDENCIES" true "COMPONENT")
+if(NOT "${DEBUGEDIT}" STREQUAL "DEBUGEDIT-NOTFOUND")
+ run_cpack_test(DEPENDENCIES "RPM.DEPENDENCIES" true "COMPONENT")
+endif()
run_cpack_test(DIST "RPM.DIST" false "MONOLITHIC")
run_cpack_test(DMG_SLA "DragNDrop" false "MONOLITHIC")
run_cpack_test(EMPTY_DIR "RPM.EMPTY_DIR;DEB.EMPTY_DIR;TGZ" true "MONOLITHIC;COMPONENT")
@@ -17,7 +26,10 @@ run_cpack_test(VERSION "RPM.VERSION;DEB.VERSION" false "MONOLITHIC;COMPONENT")
run_cpack_test(EXTRA "DEB.EXTRA" false "COMPONENT")
run_cpack_test_subtests(GENERATE_SHLIBS "soversion_not_zero;soversion_zero" "DEB.GENERATE_SHLIBS" true "COMPONENT")
run_cpack_test(GENERATE_SHLIBS_LDCONFIG "DEB.GENERATE_SHLIBS_LDCONFIG" true "COMPONENT")
-run_cpack_test_subtests(INSTALL_SCRIPTS "default;single_debug_info;no_scripts;no_scripts_single_debug_info" "RPM.INSTALL_SCRIPTS" false "COMPONENT")
+run_cpack_test_subtests(INSTALL_SCRIPTS "default;no_scripts" "RPM.INSTALL_SCRIPTS" false "COMPONENT")
+if(NOT "${DEBUGEDIT}" STREQUAL "DEBUGEDIT-NOTFOUND")
+ run_cpack_test_subtests(INSTALL_SCRIPTS "single_debug_info;no_scripts_single_debug_info" "RPM.INSTALL_SCRIPTS" false "COMPONENT")
+endif()
run_cpack_test(LONG_FILENAMES "DEB.LONG_FILENAMES" false "MONOLITHIC")
run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM.MAIN_COMPONENT" false "COMPONENT")
run_cpack_test(MINIMAL "RPM.MINIMAL;DEB.MINIMAL;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ;External" false "MONOLITHIC;COMPONENT")
@@ -27,8 +39,13 @@ run_cpack_test_package_target(THREADED "TXZ;DEB" false "MONOLITHIC;COMPONENT")
run_cpack_test_subtests(PACKAGE_CHECKSUM "invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false "MONOLITHIC")
run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM.PARTIALLY_RELOCATABLE_WARNING" false "COMPONENT")
run_cpack_test(PER_COMPONENT_FIELDS "RPM.PER_COMPONENT_FIELDS;DEB.PER_COMPONENT_FIELDS" false "COMPONENT")
-run_cpack_test_subtests(SINGLE_DEBUGINFO "no_main_component;one_component;one_component_main;no_debuginfo;one_component_no_debuginfo;no_components;valid" "RPM.SINGLE_DEBUGINFO" true "CUSTOM")
-run_cpack_test(EXTRA_SLASH_IN_PATH "RPM.EXTRA_SLASH_IN_PATH" true "COMPONENT")
+run_cpack_test_subtests(SINGLE_DEBUGINFO "no_main_component" "RPM.SINGLE_DEBUGINFO" true "CUSTOM")
+if(NOT "${DEBUGEDIT}" STREQUAL "DEBUGEDIT-NOTFOUND")
+ run_cpack_test_subtests(SINGLE_DEBUGINFO "one_component;one_component_main;no_debuginfo;one_component_no_debuginfo;no_components;valid" "RPM.SINGLE_DEBUGINFO" true "CUSTOM")
+endif()
+if(NOT "${DEBUGEDIT}" STREQUAL "DEBUGEDIT-NOTFOUND")
+ run_cpack_test(EXTRA_SLASH_IN_PATH "RPM.EXTRA_SLASH_IN_PATH" true "COMPONENT")
+endif()
run_cpack_source_test(SOURCE_PACKAGE "RPM.SOURCE_PACKAGE")
run_cpack_test(SUGGESTS "RPM.SUGGESTS" false "MONOLITHIC")
run_cpack_test(SYMLINKS "RPM.SYMLINKS;TGZ" false "MONOLITHIC;COMPONENT")
diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake
index e9cebbf..1d21dec 100644
--- a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake
+++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake
@@ -1,7 +1,7 @@
set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
# Some compilers do not add build id to binaries by default.
-if(CMAKE_CXX_COMPILER_ID MATCHES "^(IntelLLVM|PGI|NVHPC)$")
+if(CMAKE_CXX_COMPILER_ID MATCHES "^(LCC|IntelLLVM|PGI|NVHPC)$")
string(APPEND CMAKE_EXE_LINKER_FLAGS "-Wl,--build-id")
string(APPEND CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id")
endif()
diff --git a/Tests/RunCMake/CPack/tests/DEPENDENCIES/DEB-stderr.txt b/Tests/RunCMake/CPack/tests/DEPENDENCIES/DEB-stderr.txt
index 5df274a..df777ea 100644
--- a/Tests/RunCMake/CPack/tests/DEPENDENCIES/DEB-stderr.txt
+++ b/Tests/RunCMake/CPack/tests/DEPENDENCIES/DEB-stderr.txt
@@ -1 +1,2 @@
-^CPackDeb: ((- Generating dependency list)|(Using only user-provided dependencies because dpkg-shlibdeps is not found\.))$
+^CPackDeb: ((- Generating dependency list)(
+CMake Warning.*broken dpkg-shlibdeps on E2K detected.*\(cpack_deb_prepare_package_vars\))?|(Using only user-provided dependencies because dpkg-shlibdeps is not found\.))$
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake
index 6483f11..79d67e5 100644
--- a/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake
@@ -9,14 +9,14 @@ if(SHOULD_FAIL)
message(SEND_ERROR "invalid C compile flag didn't fail.")
endif()
-if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang" AND NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
+if(CMAKE_C_COMPILER_ID MATCHES "GNU|LCC|Clang" AND NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
check_compiler_flag(C "-x c" SHOULD_WORK)
if(NOT SHOULD_WORK)
message(SEND_ERROR "${CMAKE_C_COMPILER_ID} compiler flag '-x c' check failed")
endif()
endif()
-if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU") # LCC C compiler silently ignore -frtti instead of failing, so skip it here.
check_compiler_flag(C "-frtti" SHOULD_FAIL_RTTI)
if(SHOULD_FAIL_RTTI)
message(SEND_ERROR "${CMAKE_C_COMPILER_ID} compiler flag '-frtti' check passed but should have failed")
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake
index 60e9755..4b20ebd 100644
--- a/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake
@@ -9,7 +9,7 @@ if(SHOULD_FAIL)
message(SEND_ERROR "invalid CXX compile flag didn't fail.")
endif()
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC|Clang" AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
check_compiler_flag(CXX "-x c++" SHOULD_WORK)
if(NOT SHOULD_WORK)
message(SEND_ERROR "${CMAKE_CXX_COMPILER_ID} compiler flag '-x c++' check failed")
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake
index 7bb88b1..236f37b 100644
--- a/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake
@@ -8,7 +8,7 @@ if(SHOULD_FAIL)
message(SEND_ERROR "invalid Fortran compile flag didn't fail.")
endif()
-if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU|LCC")
check_compiler_flag(Fortran "-Wall" SHOULD_WORK)
if(NOT SHOULD_WORK)
message(SEND_ERROR "${CMAKE_Fortran_COMPILER_ID} compiler flag '-Wall' check failed")
diff --git a/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake b/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
index 5e5bff6..39fc430 100644
--- a/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
@@ -1,6 +1,6 @@
include(RunCMake)
-if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
+if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU|LCC")
run_cmake(CheckCLinkerFlag)
run_cmake(CheckCXXLinkerFlag)
if (APPLE)
@@ -9,7 +9,7 @@ if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
endif()
endif()
-if (CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
+if (CMAKE_Fortran_COMPILER_ID MATCHES "GNU|LCC")
run_cmake(CheckFortranLinkerFlag)
endif()
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index dc066f1..74cd90a 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -247,8 +247,14 @@ function(run_BuildDir)
run_cmake_command(BuildDir--build-jobs-no-number-trailing--target ${CMAKE_COMMAND} -E chdir ..
${CMAKE_COMMAND} --build BuildDir-build -j --target CustomTarget)
if(RunCMake_GENERATOR MATCHES "Unix Makefiles" OR RunCMake_GENERATOR MATCHES "Ninja")
+ set(_backup_lang "$ENV{LANG}")
+ set(_backup_lc_messages "$ENV{LC_MESSAGES}")
+ set(ENV{LANG} "C")
+ set(ENV{LC_MESSAGES} "C")
run_cmake_command(BuildDir--build-jobs-no-number-trailing--invalid-target ${CMAKE_COMMAND} -E chdir ..
${CMAKE_COMMAND} --build BuildDir-build -j --target invalid-target)
+ set(ENV{LANG} "${_backup_lang}")
+ set(ENV{LC_MESSAGES} "${_backup_lc_messages}")
endif()
run_cmake_command(BuildDir--build--parallel-no-number ${CMAKE_COMMAND} -E chdir ..
${CMAKE_COMMAND} --build BuildDir-build --parallel)
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
index 6cf57a3..92a64f9 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
@@ -731,7 +731,7 @@ def gen_check_targets(c, g, inSource):
read_codemodel_json_data("targets/generated_exe.json"),
]
- if cxx_compiler_id in ['Clang', 'AppleClang', 'GNU', 'Intel', 'IntelLLVM', 'MSVC', 'Embarcadero'] and g["name"] != "Xcode":
+ if cxx_compiler_id in ['Clang', 'AppleClang', 'LCC', 'GNU', 'Intel', 'IntelLLVM', 'MSVC', 'Embarcadero'] and g["name"] != "Xcode":
for e in expected:
if e["name"] == "cxx_exe":
if matches(g["name"], "^(Visual Studio |Ninja Multi-Config)"):
diff --git a/Tests/RunCMake/FindBoost/CMP0093-OLD-stderr.txt b/Tests/RunCMake/FindBoost/CMP0093-OLD-stderr.txt
new file mode 100644
index 0000000..899122e
--- /dev/null
+++ b/Tests/RunCMake/FindBoost/CMP0093-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0093-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0093 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/MSVCRuntimeLibrary/CMP0091-OLD-stderr.txt b/Tests/RunCMake/MSVCRuntimeLibrary/CMP0091-OLD-stderr.txt
new file mode 100644
index 0000000..3984a78
--- /dev/null
+++ b/Tests/RunCMake/MSVCRuntimeLibrary/CMP0091-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0091-OLD.cmake:[0-9] \(cmake_policy\):
+ The OLD behavior for policy CMP0091 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/MSVCWarningFlags/CMP0092-OLD-stderr.txt b/Tests/RunCMake/MSVCWarningFlags/CMP0092-OLD-stderr.txt
new file mode 100644
index 0000000..535b997
--- /dev/null
+++ b/Tests/RunCMake/MSVCWarningFlags/CMP0092-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0092-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0092 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake b/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake
index 6efa0d4..468b80a 100644
--- a/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake
+++ b/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake
@@ -26,6 +26,7 @@ if (PIE_SUPPORTED OR NO_PIE_SUPPORTED)
if ((READELF OR OTOOL) AND
(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
+ OR CMAKE_CXX_COMPILER_ID STREQUAL "LCC"
OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
macro(run_cmake_target test subtest)
diff --git a/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake b/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake
index 3e7fb30..ac3bf59 100644
--- a/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake
@@ -1,4 +1,4 @@
-if (NOT CMAKE_C_COMPILER_ID MATCHES "GNU|Intel" OR
+if (NOT CMAKE_C_COMPILER_ID MATCHES "GNU|LCC|Intel" OR
(CMAKE_C_COMPILER_ID STREQUAL "Intel" AND CMAKE_HOST_WIN32))
return()
endif()
diff --git a/Tests/RunCMake/TargetSources/CMakeLists.txt b/Tests/RunCMake/TargetSources/CMakeLists.txt
deleted file mode 100644
index a06591c..0000000
--- a/Tests/RunCMake/TargetSources/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12)
-project(${RunCMake_TEST} CXX)
-include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/TargetSources/RelativePathInInterface-stdout.txt b/Tests/RunCMake/TargetSources/RelativePathInInterface-stdout.txt
deleted file mode 100644
index 4581d8a..0000000
--- a/Tests/RunCMake/TargetSources/RelativePathInInterface-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
--- iface: .*Tests/RunCMake/TargetSources/empty_1.cpp
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx-stdout.txt b/Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx-stdout.txt
deleted file mode 100644
index 7f48082..0000000
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
--- genexlib: \$<1:.*Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx/subdir_empty_1.cpp>;\$<1:.*Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx/../empty_1.cpp>;\$<1:empty_2.cpp>
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirInclude-stdout.txt b/Tests/RunCMake/TargetSources/RelativePathInSubdirInclude-stdout.txt
deleted file mode 100644
index aa4851f..0000000
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirInclude-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
--- privatelib: .*Tests/RunCMake/TargetSources/RelativePathInSubdirInclude/subdir_empty_1.cpp;empty_1.cpp
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirInterface-stdout.txt b/Tests/RunCMake/TargetSources/RelativePathInSubdirInterface-stdout.txt
deleted file mode 100644
index 5990a05..0000000
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirInterface-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
--- iface: .*Tests/RunCMake/TargetSources/RelativePathInSubdirInterface/subdir_empty_1.cpp;.*Tests/RunCMake/TargetSources/RelativePathInSubdirInterface/subdir_empty_2.cpp;.*Tests/RunCMake/TargetSources/RelativePathInSubdirInterface/../empty_1.cpp;.*Tests/RunCMake/TargetSources/RelativePathInSubdirInterface/../empty_2.cpp
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate-stdout.txt b/Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate-stdout.txt
deleted file mode 100644
index fa5bcbf..0000000
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
--- privatelib: .*Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate/subdir_empty_1.cpp;.*Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate/subdir_empty_2.cpp;.*Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate/../empty_1.cpp;.*Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate/../empty_2.cpp
diff --git a/Tests/RunCMake/TargetSources/RunCMakeTest.cmake b/Tests/RunCMake/TargetSources/RunCMakeTest.cmake
deleted file mode 100644
index b56ee44..0000000
--- a/Tests/RunCMake/TargetSources/RunCMakeTest.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-include(RunCMake)
-
-if(RunCMake_GENERATOR STREQUAL "Xcode")
- run_cmake(ConfigNotAllowed)
-endif()
-
-run_cmake(OriginDebug)
-run_cmake(CMP0026-LOCATION)
-run_cmake(CMP0076-OLD)
-run_cmake(CMP0076-WARN)
-run_cmake(RelativePathInInterface)
-run_cmake(RelativePathInSubdirGenEx)
-run_cmake(RelativePathInSubdirInterface)
-run_cmake(RelativePathInSubdirPrivate)
-run_cmake(RelativePathInSubdirInclude)
-run_cmake(ExportBuild)
-run_cmake(AddCustomTargetPublicSources)
-run_cmake(AddCustomTargetPrivateSources)
-run_cmake(AddCustomTargetInterfaceSources)
-run_cmake(AddCustomTargetSources)
-run_cmake(AddCustomTargetCheckProperty)
-run_cmake(AddCustomTargetGenx)
diff --git a/Tests/RunCMake/UnityBuild/RunCMakeTest.cmake b/Tests/RunCMake/UnityBuild/RunCMakeTest.cmake
index c00f78b..8019f09 100644
--- a/Tests/RunCMake/UnityBuild/RunCMakeTest.cmake
+++ b/Tests/RunCMake/UnityBuild/RunCMakeTest.cmake
@@ -2,11 +2,9 @@ include(RunCMake)
function(run_build name)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-build)
- set(RunCMake_TEST_NO_CLEAN 1)
run_cmake(${name})
+ set(RunCMake_TEST_NO_CLEAN 1)
run_cmake_command(${name}-build ${CMAKE_COMMAND} --build . --config Debug)
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
endfunction()
run_cmake(unitybuild_c)
@@ -30,12 +28,10 @@ run_build(unitybuild_anon_ns_group_mode)
function(run_test name)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-build)
- set(RunCMake_TEST_NO_CLEAN 1)
run_cmake(${name})
+ set(RunCMake_TEST_NO_CLEAN 1)
run_cmake_command(${name}-build ${CMAKE_COMMAND} --build . --config Debug)
run_cmake_command(${name}-test ${CMAKE_CTEST_COMMAND} -C Debug)
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
endfunction()
run_test(unitybuild_runtest)
diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
index d5ed136..f945b43 100644
--- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
@@ -64,6 +64,21 @@ if (RunCMake_GENERATOR MATCHES "Visual Studio 1[0-4] 201[0-5]" OR
else()
run_cmake(UnityBuildNative)
run_cmake(UnityBuildNativeGrouped)
+
+ function(run_UnityBuildPCH)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/UnityBuildPCH-build)
+ run_cmake(UnityBuildPCH)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(vcxproj "${RunCMake_TEST_BINARY_DIR}/UnityBuildPCH.vcxproj")
+ if(EXISTS "${vcxproj}")
+ file(STRINGS ${vcxproj} vcxproj_strings REGEX "ClCompile[^\n]*UnityBuildPCH\\.c")
+ endif()
+ if(vcxproj_strings MATCHES "Include=\"([^\"]+)\"")
+ set(src "${CMAKE_MATCH_1}")
+ run_cmake_command(UnityBuildPCH-build ${CMAKE_COMMAND} --build . --config Debug --target UnityBuildPCH -- -t:ClCompile -p:SelectedFiles=${src})
+ endif()
+ endfunction()
+ run_UnityBuildPCH()
endif()
run_cmake(VsDotnetTargetFramework)
diff --git a/Tests/RunCMake/VS10Project/UnityBuildPCH-build-check.cmake b/Tests/RunCMake/VS10Project/UnityBuildPCH-build-check.cmake
new file mode 100644
index 0000000..9043bb7
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/UnityBuildPCH-build-check.cmake
@@ -0,0 +1,10 @@
+set(obj "${RunCMake_TEST_BINARY_DIR}/UnityBuildPCH.dir/Debug/UnityBuildPCH.obj")
+if(NOT EXISTS "${obj}")
+ set(RunCMake_TEST_FAILED "Expected object file does not exist:\n ${obj}")
+ return()
+endif()
+set(lib "${RunCMake_TEST_BINARY_DIR}/Debug/UnityBuildPCH.lib")
+if(EXISTS "${lib}")
+ set(RunCMake_TEST_FAILED "Unexpected library file exists:\n ${lib}")
+ return()
+endif()
diff --git a/Tests/RunCMake/VS10Project/UnityBuildPCH.c b/Tests/RunCMake/VS10Project/UnityBuildPCH.c
new file mode 100644
index 0000000..b96b068
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/UnityBuildPCH.c
@@ -0,0 +1,4 @@
+int UnityBuildPCH(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/VS10Project/UnityBuildPCH.cmake b/Tests/RunCMake/VS10Project/UnityBuildPCH.cmake
new file mode 100644
index 0000000..875ffec
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/UnityBuildPCH.cmake
@@ -0,0 +1,4 @@
+enable_language(C)
+add_library(UnityBuildPCH STATIC UnityBuildPCH.c)
+target_precompile_headers(UnityBuildPCH PRIVATE UnityBuildPCH.h)
+set_property(TARGET UnityBuildPCH PROPERTY UNITY_BUILD ON)
diff --git a/Tests/RunCMake/VS10Project/UnityBuildPCH.h b/Tests/RunCMake/VS10Project/UnityBuildPCH.h
new file mode 100644
index 0000000..fa882cb
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/UnityBuildPCH.h
@@ -0,0 +1 @@
+/* empty file */
diff --git a/Tests/RunCMake/find_package/FindRootPathAndPrefixPathAreEqual.cmake b/Tests/RunCMake/find_package/FindRootPathAndPrefixPathAreEqual.cmake
new file mode 100644
index 0000000..2994fc2
--- /dev/null
+++ b/Tests/RunCMake/find_package/FindRootPathAndPrefixPathAreEqual.cmake
@@ -0,0 +1,16 @@
+set(root "${CMAKE_CURRENT_SOURCE_DIR}/FindRootPathAndPrefixPathAreEqual")
+set(CMAKE_FIND_ROOT_PATH "${root}")
+set(CMAKE_PREFIX_PATH "${root}")
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE "ONLY")
+
+find_package(Foo
+ REQUIRED
+ CONFIG
+ NO_CMAKE_ENVIRONMENT_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH
+ # Important because CMAKE_SYSTEM_PREFIX_PATH might contain "/" as a prefix
+ # And when "/" is rerooted onto the root above, the package is found even if
+ # CMAKE_PREFIX_PATH is empty. We want to ensure that we hit
+ # the CMAKE_FIND_ROOT_PATH == CMAKE_PREFIX_PATH code path.
+ NO_CMAKE_SYSTEM_PATH
+ )
diff --git a/Tests/RunCMake/find_package/FindRootPathAndPrefixPathAreEqual/lib/cmake/Foo/FooConfig.cmake b/Tests/RunCMake/find_package/FindRootPathAndPrefixPathAreEqual/lib/cmake/Foo/FooConfig.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/find_package/FindRootPathAndPrefixPathAreEqual/lib/cmake/Foo/FooConfig.cmake
diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake
index b20a889..ad9757d 100644
--- a/Tests/RunCMake/find_package/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake
@@ -25,6 +25,7 @@ run_cmake(PackageRootNestedModule)
run_cmake(PolicyPush)
run_cmake(PolicyPop)
run_cmake(RequiredOptionValuesClash)
+run_cmake(FindRootPathAndPrefixPathAreEqual)
run_cmake(SetFoundFALSE)
run_cmake(WrongVersion)
run_cmake(WrongVersionConfig)
diff --git a/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake b/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake
index 806ae79..f726759 100644
--- a/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake
@@ -2,7 +2,7 @@ include(RunCMake)
run_cmake(empty_keyword_args)
-if (CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
+if (CMAKE_C_COMPILER_ID MATCHES "GNU|LCC|Clang")
macro(run_cmake_target test subtest target)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-build)
set(RunCMake_TEST_OUTPUT_MERGE 1)
@@ -28,7 +28,7 @@ function(run_Order)
run_cmake_command(Order-build ${CMAKE_COMMAND} --build . --verbose --config Custom)
endfunction()
if(RunCMake_GENERATOR MATCHES "Ninja|Make" AND
- CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$" AND
+ CMAKE_C_COMPILER_ID MATCHES "^(GNU|LCC|Clang|AppleClang)$" AND
NOT CMAKE_C_SIMULATE_ID STREQUAL "MSVC")
run_Order()
endif()
diff --git a/Tests/RunCMake/TargetSources/AddCustomTargetCheckProperty.cmake b/Tests/RunCMake/target_sources/AddCustomTargetCheckProperty.cmake
index 1787e87..1787e87 100644
--- a/Tests/RunCMake/TargetSources/AddCustomTargetCheckProperty.cmake
+++ b/Tests/RunCMake/target_sources/AddCustomTargetCheckProperty.cmake
diff --git a/Tests/RunCMake/TargetSources/AddCustomTargetGenx.cmake b/Tests/RunCMake/target_sources/AddCustomTargetGenx.cmake
index 0078eab..0078eab 100644
--- a/Tests/RunCMake/TargetSources/AddCustomTargetGenx.cmake
+++ b/Tests/RunCMake/target_sources/AddCustomTargetGenx.cmake
diff --git a/Tests/RunCMake/TargetSources/AddCustomTargetInterfaceSources-result.txt b/Tests/RunCMake/target_sources/AddCustomTargetInterfaceSources-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/TargetSources/AddCustomTargetInterfaceSources-result.txt
+++ b/Tests/RunCMake/target_sources/AddCustomTargetInterfaceSources-result.txt
diff --git a/Tests/RunCMake/TargetSources/AddCustomTargetInterfaceSources-stderr.txt b/Tests/RunCMake/target_sources/AddCustomTargetInterfaceSources-stderr.txt
index 9334bf6..9334bf6 100644
--- a/Tests/RunCMake/TargetSources/AddCustomTargetInterfaceSources-stderr.txt
+++ b/Tests/RunCMake/target_sources/AddCustomTargetInterfaceSources-stderr.txt
diff --git a/Tests/RunCMake/TargetSources/AddCustomTargetInterfaceSources.cmake b/Tests/RunCMake/target_sources/AddCustomTargetInterfaceSources.cmake
index 42a8ca2..42a8ca2 100644
--- a/Tests/RunCMake/TargetSources/AddCustomTargetInterfaceSources.cmake
+++ b/Tests/RunCMake/target_sources/AddCustomTargetInterfaceSources.cmake
diff --git a/Tests/RunCMake/TargetSources/AddCustomTargetPrivateSources.cmake b/Tests/RunCMake/target_sources/AddCustomTargetPrivateSources.cmake
index 11f0258..11f0258 100644
--- a/Tests/RunCMake/TargetSources/AddCustomTargetPrivateSources.cmake
+++ b/Tests/RunCMake/target_sources/AddCustomTargetPrivateSources.cmake
diff --git a/Tests/RunCMake/TargetSources/AddCustomTargetPublicSources-result.txt b/Tests/RunCMake/target_sources/AddCustomTargetPublicSources-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/TargetSources/AddCustomTargetPublicSources-result.txt
+++ b/Tests/RunCMake/target_sources/AddCustomTargetPublicSources-result.txt
diff --git a/Tests/RunCMake/TargetSources/AddCustomTargetPublicSources-stderr.txt b/Tests/RunCMake/target_sources/AddCustomTargetPublicSources-stderr.txt
index afba4be..afba4be 100644
--- a/Tests/RunCMake/TargetSources/AddCustomTargetPublicSources-stderr.txt
+++ b/Tests/RunCMake/target_sources/AddCustomTargetPublicSources-stderr.txt
diff --git a/Tests/RunCMake/TargetSources/AddCustomTargetPublicSources.cmake b/Tests/RunCMake/target_sources/AddCustomTargetPublicSources.cmake
index d9e82c0..d9e82c0 100644
--- a/Tests/RunCMake/TargetSources/AddCustomTargetPublicSources.cmake
+++ b/Tests/RunCMake/target_sources/AddCustomTargetPublicSources.cmake
diff --git a/Tests/RunCMake/TargetSources/AddCustomTargetSources-result.txt b/Tests/RunCMake/target_sources/AddCustomTargetSources-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/TargetSources/AddCustomTargetSources-result.txt
+++ b/Tests/RunCMake/target_sources/AddCustomTargetSources-result.txt
diff --git a/Tests/RunCMake/TargetSources/AddCustomTargetSources-stderr.txt b/Tests/RunCMake/target_sources/AddCustomTargetSources-stderr.txt
index 4a153e9..4a153e9 100644
--- a/Tests/RunCMake/TargetSources/AddCustomTargetSources-stderr.txt
+++ b/Tests/RunCMake/target_sources/AddCustomTargetSources-stderr.txt
diff --git a/Tests/RunCMake/TargetSources/AddCustomTargetSources.cmake b/Tests/RunCMake/target_sources/AddCustomTargetSources.cmake
index dd688d3..dd688d3 100644
--- a/Tests/RunCMake/TargetSources/AddCustomTargetSources.cmake
+++ b/Tests/RunCMake/target_sources/AddCustomTargetSources.cmake
diff --git a/Tests/RunCMake/TargetSources/CMP0026-LOCATION-result.txt b/Tests/RunCMake/target_sources/CMP0026-LOCATION-result.txt
index 573541a..573541a 100644
--- a/Tests/RunCMake/TargetSources/CMP0026-LOCATION-result.txt
+++ b/Tests/RunCMake/target_sources/CMP0026-LOCATION-result.txt
diff --git a/Tests/RunCMake/TargetSources/CMP0026-LOCATION-stderr.txt b/Tests/RunCMake/target_sources/CMP0026-LOCATION-stderr.txt
index d7ccedb..d7ccedb 100644
--- a/Tests/RunCMake/TargetSources/CMP0026-LOCATION-stderr.txt
+++ b/Tests/RunCMake/target_sources/CMP0026-LOCATION-stderr.txt
diff --git a/Tests/RunCMake/TargetSources/CMP0026-LOCATION.cmake b/Tests/RunCMake/target_sources/CMP0026-LOCATION.cmake
index 464df36..642856c 100644
--- a/Tests/RunCMake/TargetSources/CMP0026-LOCATION.cmake
+++ b/Tests/RunCMake/target_sources/CMP0026-LOCATION.cmake
@@ -1,5 +1,6 @@
cmake_policy(SET CMP0026 OLD)
+enable_language(CXX)
add_library(objlib OBJECT
empty_1.cpp
diff --git a/Tests/RunCMake/TargetSources/CMP0076-OLD-result.txt b/Tests/RunCMake/target_sources/CMP0076-OLD-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/TargetSources/CMP0076-OLD-result.txt
+++ b/Tests/RunCMake/target_sources/CMP0076-OLD-result.txt
diff --git a/Tests/RunCMake/TargetSources/CMP0076-OLD-stderr.txt b/Tests/RunCMake/target_sources/CMP0076-OLD-stderr.txt
index d47dd4d..d47dd4d 100644
--- a/Tests/RunCMake/TargetSources/CMP0076-OLD-stderr.txt
+++ b/Tests/RunCMake/target_sources/CMP0076-OLD-stderr.txt
diff --git a/Tests/RunCMake/TargetSources/CMP0076-OLD.cmake b/Tests/RunCMake/target_sources/CMP0076-OLD.cmake
index 4d8c268..4d8c268 100644
--- a/Tests/RunCMake/TargetSources/CMP0076-OLD.cmake
+++ b/Tests/RunCMake/target_sources/CMP0076-OLD.cmake
diff --git a/Tests/RunCMake/TargetSources/CMP0076-WARN-result.txt b/Tests/RunCMake/target_sources/CMP0076-WARN-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/TargetSources/CMP0076-WARN-result.txt
+++ b/Tests/RunCMake/target_sources/CMP0076-WARN-result.txt
diff --git a/Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt b/Tests/RunCMake/target_sources/CMP0076-WARN-stderr.txt
index bd888ee..bd888ee 100644
--- a/Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt
+++ b/Tests/RunCMake/target_sources/CMP0076-WARN-stderr.txt
diff --git a/Tests/RunCMake/TargetSources/CMP0076-WARN.cmake b/Tests/RunCMake/target_sources/CMP0076-WARN.cmake
index 2e07331..2e07331 100644
--- a/Tests/RunCMake/TargetSources/CMP0076-WARN.cmake
+++ b/Tests/RunCMake/target_sources/CMP0076-WARN.cmake
diff --git a/Tests/RunCMake/TargetSources/CMP0076-WARN/CMakeLists.txt b/Tests/RunCMake/target_sources/CMP0076-WARN/CMakeLists.txt
index f9c7d6d..f9c7d6d 100644
--- a/Tests/RunCMake/TargetSources/CMP0076-WARN/CMakeLists.txt
+++ b/Tests/RunCMake/target_sources/CMP0076-WARN/CMakeLists.txt
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate/subdir_empty_1.cpp b/Tests/RunCMake/target_sources/CMP0076-WARN/subdir_empty_1.cpp
index 11ec041..11ec041 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate/subdir_empty_1.cpp
+++ b/Tests/RunCMake/target_sources/CMP0076-WARN/subdir_empty_1.cpp
diff --git a/Tests/RunCMake/target_sources/CMakeLists.txt b/Tests/RunCMake/target_sources/CMakeLists.txt
index 14ef56e..727f93a 100644
--- a/Tests/RunCMake/target_sources/CMakeLists.txt
+++ b/Tests/RunCMake/target_sources/CMakeLists.txt
@@ -1,5 +1,3 @@
cmake_minimum_required(VERSION 3.11)
-
project(${RunCMake_TEST} LANGUAGES NONE)
-
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/TargetSources/ConfigNotAllowed-result.txt b/Tests/RunCMake/target_sources/ConfigNotAllowed-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/TargetSources/ConfigNotAllowed-result.txt
+++ b/Tests/RunCMake/target_sources/ConfigNotAllowed-result.txt
diff --git a/Tests/RunCMake/TargetSources/ConfigNotAllowed-stderr.txt b/Tests/RunCMake/target_sources/ConfigNotAllowed-stderr.txt
index c6b75fc..bc4afb7 100644
--- a/Tests/RunCMake/TargetSources/ConfigNotAllowed-stderr.txt
+++ b/Tests/RunCMake/target_sources/ConfigNotAllowed-stderr.txt
@@ -4,9 +4,9 @@ CMake Error in CMakeLists.txt:
Config "Debug":
- .*/Tests/RunCMake/TargetSources/empty_1.cpp
- .*/Tests/RunCMake/TargetSources/empty_2.cpp
+ .*/Tests/RunCMake/target_sources/empty_1.cpp
+ .*/Tests/RunCMake/target_sources/empty_2.cpp
Config "Release":
- .*/Tests/RunCMake/TargetSources/empty_1.cpp
+ .*/Tests/RunCMake/target_sources/empty_1.cpp
diff --git a/Tests/RunCMake/TargetSources/ConfigNotAllowed.cmake b/Tests/RunCMake/target_sources/ConfigNotAllowed.cmake
index 02af379..02af379 100644
--- a/Tests/RunCMake/TargetSources/ConfigNotAllowed.cmake
+++ b/Tests/RunCMake/target_sources/ConfigNotAllowed.cmake
diff --git a/Tests/RunCMake/target_sources/empty_keyword_args.cmake b/Tests/RunCMake/target_sources/EmptyKeywordArgs.cmake
index 5cee451..5cee451 100644
--- a/Tests/RunCMake/target_sources/empty_keyword_args.cmake
+++ b/Tests/RunCMake/target_sources/EmptyKeywordArgs.cmake
diff --git a/Tests/RunCMake/TargetSources/ExportBuild-result.txt b/Tests/RunCMake/target_sources/ExportBuild-result.txt
index 573541a..573541a 100644
--- a/Tests/RunCMake/TargetSources/ExportBuild-result.txt
+++ b/Tests/RunCMake/target_sources/ExportBuild-result.txt
diff --git a/Tests/RunCMake/TargetSources/ExportBuild.cmake b/Tests/RunCMake/target_sources/ExportBuild.cmake
index b626aa6..b626aa6 100644
--- a/Tests/RunCMake/TargetSources/ExportBuild.cmake
+++ b/Tests/RunCMake/target_sources/ExportBuild.cmake
diff --git a/Tests/RunCMake/TargetSources/OriginDebug-result.txt b/Tests/RunCMake/target_sources/OriginDebug-result.txt
index 573541a..573541a 100644
--- a/Tests/RunCMake/TargetSources/OriginDebug-result.txt
+++ b/Tests/RunCMake/target_sources/OriginDebug-result.txt
diff --git a/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt b/Tests/RunCMake/target_sources/OriginDebug-stderr.txt
index a40f463..502d5f1 100644
--- a/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt
+++ b/Tests/RunCMake/target_sources/OriginDebug-stderr.txt
@@ -1,7 +1,7 @@
CMake Debug Log at OriginDebug.cmake:13 \(add_library\):
Used sources for target OriginDebug:
- \* .*Tests/RunCMake/TargetSources/empty_2.cpp
+ \* .*Tests/RunCMake/target_sources/empty_2.cpp
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)
@@ -9,7 +9,7 @@ Call Stack \(most recent call first\):
CMake Debug Log at OriginDebug.cmake:16 \(set_property\):
Used sources for target OriginDebug:
- \* .*Tests/RunCMake/TargetSources/empty_3.cpp
+ \* .*Tests/RunCMake/target_sources/empty_3.cpp
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)
@@ -17,7 +17,7 @@ Call Stack \(most recent call first\):
CMake Debug Log at OriginDebug.cmake:20 \(target_sources\):
Used sources for target OriginDebug:
- \* .*Tests/RunCMake/TargetSources/empty_4.cpp
+ \* .*Tests/RunCMake/target_sources/empty_4.cpp
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)
@@ -25,7 +25,7 @@ Call Stack \(most recent call first\):
CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\):
Used sources for target OriginDebug:
- \* .*Tests/RunCMake/TargetSources/empty_1.cpp
+ \* .*Tests/RunCMake/target_sources/empty_1.cpp
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/TargetSources/OriginDebug.cmake b/Tests/RunCMake/target_sources/OriginDebug.cmake
index d40a1d8..d40a1d8 100644
--- a/Tests/RunCMake/TargetSources/OriginDebug.cmake
+++ b/Tests/RunCMake/target_sources/OriginDebug.cmake
diff --git a/Tests/RunCMake/target_sources/RelativePathInInterface-stdout.txt b/Tests/RunCMake/target_sources/RelativePathInInterface-stdout.txt
new file mode 100644
index 0000000..19818b8
--- /dev/null
+++ b/Tests/RunCMake/target_sources/RelativePathInInterface-stdout.txt
@@ -0,0 +1 @@
+-- iface: .*Tests/RunCMake/target_sources/empty_1.cpp
diff --git a/Tests/RunCMake/TargetSources/RelativePathInInterface.cmake b/Tests/RunCMake/target_sources/RelativePathInInterface.cmake
index 0d3e9a4..25b22dd 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInInterface.cmake
+++ b/Tests/RunCMake/target_sources/RelativePathInInterface.cmake
@@ -1,4 +1,5 @@
cmake_policy(SET CMP0076 NEW)
+enable_language(CXX)
add_library(iface INTERFACE)
target_sources(iface INTERFACE empty_1.cpp)
diff --git a/Tests/RunCMake/target_sources/RelativePathInSubdirGenEx-stdout.txt b/Tests/RunCMake/target_sources/RelativePathInSubdirGenEx-stdout.txt
new file mode 100644
index 0000000..a51a792
--- /dev/null
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirGenEx-stdout.txt
@@ -0,0 +1 @@
+-- genexlib: \$<1:.*Tests/RunCMake/target_sources/RelativePathInSubdirGenEx/subdir_empty_1.cpp>;\$<1:.*Tests/RunCMake/target_sources/RelativePathInSubdirGenEx/../empty_1.cpp>;\$<1:empty_2.cpp>
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx.cmake b/Tests/RunCMake/target_sources/RelativePathInSubdirGenEx.cmake
index 1cdc2a7..9afcea5 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx.cmake
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirGenEx.cmake
@@ -1,4 +1,5 @@
cmake_policy(SET CMP0076 NEW)
+enable_language(CXX)
add_library(genexlib)
add_subdirectory(RelativePathInSubdirGenEx)
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx/CMakeLists.txt b/Tests/RunCMake/target_sources/RelativePathInSubdirGenEx/CMakeLists.txt
index 3bcf454..3bcf454 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx/CMakeLists.txt
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirGenEx/CMakeLists.txt
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirInterface/subdir_empty_1.cpp b/Tests/RunCMake/target_sources/RelativePathInSubdirGenEx/subdir_empty_1.cpp
index 11ec041..11ec041 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirInterface/subdir_empty_1.cpp
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirGenEx/subdir_empty_1.cpp
diff --git a/Tests/RunCMake/target_sources/RelativePathInSubdirInclude-stdout.txt b/Tests/RunCMake/target_sources/RelativePathInSubdirInclude-stdout.txt
new file mode 100644
index 0000000..c42c88b
--- /dev/null
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirInclude-stdout.txt
@@ -0,0 +1 @@
+-- privatelib: .*Tests/RunCMake/target_sources/RelativePathInSubdirInclude/subdir_empty_1.cpp;empty_1.cpp
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirInclude.cmake b/Tests/RunCMake/target_sources/RelativePathInSubdirInclude.cmake
index 4acbeca..f5954c4 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirInclude.cmake
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirInclude.cmake
@@ -1,4 +1,5 @@
cmake_policy(SET CMP0076 NEW)
+enable_language(CXX)
add_library(privatelib)
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirInclude/CMakeLists.txt b/Tests/RunCMake/target_sources/RelativePathInSubdirInclude/CMakeLists.txt
index 3dcb135..3dcb135 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirInclude/CMakeLists.txt
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirInclude/CMakeLists.txt
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirInclude/subdir_empty_1.cpp b/Tests/RunCMake/target_sources/RelativePathInSubdirInclude/subdir_empty_1.cpp
index 11ec041..11ec041 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirInclude/subdir_empty_1.cpp
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirInclude/subdir_empty_1.cpp
diff --git a/Tests/RunCMake/target_sources/RelativePathInSubdirInterface-stdout.txt b/Tests/RunCMake/target_sources/RelativePathInSubdirInterface-stdout.txt
new file mode 100644
index 0000000..ebbb29f
--- /dev/null
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirInterface-stdout.txt
@@ -0,0 +1 @@
+-- iface: .*Tests/RunCMake/target_sources/RelativePathInSubdirInterface/subdir_empty_1.cpp;.*Tests/RunCMake/target_sources/RelativePathInSubdirInterface/subdir_empty_2.cpp;.*Tests/RunCMake/target_sources/RelativePathInSubdirInterface/../empty_1.cpp;.*Tests/RunCMake/target_sources/RelativePathInSubdirInterface/../empty_2.cpp
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirInterface.cmake b/Tests/RunCMake/target_sources/RelativePathInSubdirInterface.cmake
index 3652b4f..6a4e200 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirInterface.cmake
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirInterface.cmake
@@ -1,4 +1,5 @@
cmake_policy(SET CMP0076 NEW)
+enable_language(CXX)
add_library(iface INTERFACE)
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirInterface/CMakeLists.txt b/Tests/RunCMake/target_sources/RelativePathInSubdirInterface/CMakeLists.txt
index 02e6966..02e6966 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirInterface/CMakeLists.txt
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirInterface/CMakeLists.txt
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx/subdir_empty_1.cpp b/Tests/RunCMake/target_sources/RelativePathInSubdirInterface/subdir_empty_1.cpp
index 11ec041..11ec041 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirGenEx/subdir_empty_1.cpp
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirInterface/subdir_empty_1.cpp
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate/subdir_empty_2.cpp b/Tests/RunCMake/target_sources/RelativePathInSubdirInterface/subdir_empty_2.cpp
index 11ec041..11ec041 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate/subdir_empty_2.cpp
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirInterface/subdir_empty_2.cpp
diff --git a/Tests/RunCMake/target_sources/RelativePathInSubdirPrivate-stdout.txt b/Tests/RunCMake/target_sources/RelativePathInSubdirPrivate-stdout.txt
new file mode 100644
index 0000000..104f1de
--- /dev/null
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirPrivate-stdout.txt
@@ -0,0 +1 @@
+-- privatelib: .*Tests/RunCMake/target_sources/RelativePathInSubdirPrivate/subdir_empty_1.cpp;.*Tests/RunCMake/target_sources/RelativePathInSubdirPrivate/subdir_empty_2.cpp;.*Tests/RunCMake/target_sources/RelativePathInSubdirPrivate/../empty_1.cpp;.*Tests/RunCMake/target_sources/RelativePathInSubdirPrivate/../empty_2.cpp
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate.cmake b/Tests/RunCMake/target_sources/RelativePathInSubdirPrivate.cmake
index d0d3dc4..dd16e3f 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate.cmake
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirPrivate.cmake
@@ -1,4 +1,5 @@
cmake_policy(SET CMP0076 NEW)
+enable_language(CXX)
add_library(privatelib)
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate/CMakeLists.txt b/Tests/RunCMake/target_sources/RelativePathInSubdirPrivate/CMakeLists.txt
index 56ee853..56ee853 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirPrivate/CMakeLists.txt
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirPrivate/CMakeLists.txt
diff --git a/Tests/RunCMake/TargetSources/CMP0076-WARN/subdir_empty_1.cpp b/Tests/RunCMake/target_sources/RelativePathInSubdirPrivate/subdir_empty_1.cpp
index 11ec041..11ec041 100644
--- a/Tests/RunCMake/TargetSources/CMP0076-WARN/subdir_empty_1.cpp
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirPrivate/subdir_empty_1.cpp
diff --git a/Tests/RunCMake/TargetSources/RelativePathInSubdirInterface/subdir_empty_2.cpp b/Tests/RunCMake/target_sources/RelativePathInSubdirPrivate/subdir_empty_2.cpp
index 11ec041..11ec041 100644
--- a/Tests/RunCMake/TargetSources/RelativePathInSubdirInterface/subdir_empty_2.cpp
+++ b/Tests/RunCMake/target_sources/RelativePathInSubdirPrivate/subdir_empty_2.cpp
diff --git a/Tests/RunCMake/target_sources/RunCMakeTest.cmake b/Tests/RunCMake/target_sources/RunCMakeTest.cmake
index b67c598..9d64927 100644
--- a/Tests/RunCMake/target_sources/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_sources/RunCMakeTest.cmake
@@ -1,3 +1,23 @@
include(RunCMake)
-run_cmake(empty_keyword_args)
+if(RunCMake_GENERATOR STREQUAL "Xcode")
+ run_cmake(ConfigNotAllowed)
+endif()
+
+run_cmake(EmptyKeywordArgs)
+run_cmake(OriginDebug)
+run_cmake(CMP0026-LOCATION)
+run_cmake(CMP0076-OLD)
+run_cmake(CMP0076-WARN)
+run_cmake(RelativePathInInterface)
+run_cmake(RelativePathInSubdirGenEx)
+run_cmake(RelativePathInSubdirInterface)
+run_cmake(RelativePathInSubdirPrivate)
+run_cmake(RelativePathInSubdirInclude)
+run_cmake(ExportBuild)
+run_cmake(AddCustomTargetPublicSources)
+run_cmake(AddCustomTargetPrivateSources)
+run_cmake(AddCustomTargetInterfaceSources)
+run_cmake(AddCustomTargetSources)
+run_cmake(AddCustomTargetCheckProperty)
+run_cmake(AddCustomTargetGenx)
diff --git a/Tests/RunCMake/TargetSources/empty_1.cpp b/Tests/RunCMake/target_sources/empty_1.cpp
index 11ec041..11ec041 100644
--- a/Tests/RunCMake/TargetSources/empty_1.cpp
+++ b/Tests/RunCMake/target_sources/empty_1.cpp
diff --git a/Tests/RunCMake/TargetSources/empty_2.cpp b/Tests/RunCMake/target_sources/empty_2.cpp
index 11ec041..11ec041 100644
--- a/Tests/RunCMake/TargetSources/empty_2.cpp
+++ b/Tests/RunCMake/target_sources/empty_2.cpp
diff --git a/Tests/RunCMake/TargetSources/empty_3.cpp b/Tests/RunCMake/target_sources/empty_3.cpp
index 11ec041..11ec041 100644
--- a/Tests/RunCMake/TargetSources/empty_3.cpp
+++ b/Tests/RunCMake/target_sources/empty_3.cpp
diff --git a/Tests/RunCMake/TargetSources/empty_4.cpp b/Tests/RunCMake/target_sources/empty_4.cpp
index 11ec041..11ec041 100644
--- a/Tests/RunCMake/TargetSources/empty_4.cpp
+++ b/Tests/RunCMake/target_sources/empty_4.cpp
diff --git a/Tests/RunCMake/TargetSources/main.cpp b/Tests/RunCMake/target_sources/main.cpp
index 766b775..766b775 100644
--- a/Tests/RunCMake/TargetSources/main.cpp
+++ b/Tests/RunCMake/target_sources/main.cpp
diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
index fffb038..28a990d 100644
--- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
@@ -26,7 +26,7 @@ run_cmake(TargetTypeInvalid)
run_cmake(TargetTypeStatic)
if (CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows)$" AND
- CMAKE_C_COMPILER_ID MATCHES "^(MSVC|GNU|Clang|AppleClang)$")
+ CMAKE_C_COMPILER_ID MATCHES "^(MSVC|GNU|LCC|Clang|AppleClang)$")
set (RunCMake_TEST_OPTIONS -DRunCMake_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
run_cmake(LinkOptions)
unset (RunCMake_TEST_OPTIONS)
@@ -60,10 +60,10 @@ if(CMake_TEST_ISPC)
endif()
run_cmake(ISPCDuplicateTarget${ninja})
endif()
-if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
+if(CMAKE_C_COMPILER_ID MATCHES "GNU|LCC" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
run_cmake(CStandardGNU)
endif()
-if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
run_cmake(CxxStandardGNU)
endif()
diff --git a/Tests/RunCMake/try_run/RunCMakeTest.cmake b/Tests/RunCMake/try_run/RunCMakeTest.cmake
index fa30eb4..d74add0 100644
--- a/Tests/RunCMake/try_run/RunCMakeTest.cmake
+++ b/Tests/RunCMake/try_run/RunCMakeTest.cmake
@@ -3,7 +3,7 @@ include(RunCMake)
run_cmake(BadLinkLibraries)
if (CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows)$" AND
- CMAKE_C_COMPILER_ID MATCHES "^(MSVC|GNU|Clang|AppleClang)$")
+ CMAKE_C_COMPILER_ID MATCHES "^(MSVC|GNU|LCC|Clang|AppleClang)$")
set (RunCMake_TEST_OPTIONS -DRunCMake_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
run_cmake(LinkOptions)
unset (RunCMake_TEST_OPTIONS)
diff --git a/Tests/SetLang/CMakeLists.txt b/Tests/SetLang/CMakeLists.txt
index 80348ab..5b2eb19 100644
--- a/Tests/SetLang/CMakeLists.txt
+++ b/Tests/SetLang/CMakeLists.txt
@@ -20,7 +20,7 @@ if(CMAKE_GENERATOR MATCHES "^Visual Studio" AND "x${CMAKE_C_COMPILER_ID}" STREQU
set_property(TARGET stay PROPERTY COMPILE_OPTIONS "-TP")
endif()
-if((CMAKE_C_COMPILER_ID MATCHES "(GNU|Clang|MSVC|Borland|Embarcadero|Intel|TI|XL)"))
+if((CMAKE_C_COMPILER_ID MATCHES "(GNU|LCC|Clang|MSVC|Borland|Embarcadero|Intel|TI|XL)"))
cmake_policy(SET CMP0119 NEW)
add_library(zoom zoom.zzz)
set_source_files_properties(zoom.zzz PROPERTIES LANGUAGE CXX)
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt
index d0c413f..e35e0d3 100644
--- a/Tests/TryCompile/CMakeLists.txt
+++ b/Tests/TryCompile/CMakeLists.txt
@@ -321,7 +321,7 @@ if(DEFINED CXX_BOGUS_FLAG)
message(SEND_ERROR "CHECK_CXX_COMPILER_FLAG shouldn't construct CXX_BOGUS_FLAG as a normal variable")
endif()
-if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "LCC")
unset(C_STRICT_PROTOTYPES CACHE)
CHECK_C_COMPILER_FLAG("-Werror;-Wstrict-prototypes" C_STRICT_PROTOTYPES)
TEST_ASSERT(C_STRICT_PROTOTYPES "CHECK_C_COMPILER_FLAG failed -Werror -Wstrict-prototypes")
diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt
index 69b4e2f..72cfc05 100644
--- a/Utilities/Doxygen/CMakeLists.txt
+++ b/Utilities/Doxygen/CMakeLists.txt
@@ -3,7 +3,7 @@
if(NOT CMake_SOURCE_DIR)
set(CMakeDeveloperReference_STANDALONE 1)
- cmake_minimum_required(VERSION 3.1...3.20 FATAL_ERROR)
+ cmake_minimum_required(VERSION 3.1...3.21 FATAL_ERROR)
get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH)
include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index c8a970d..165d557 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/Utilities/Sphinx/CMakeLists.txt
@@ -3,7 +3,7 @@
if(NOT CMake_SOURCE_DIR)
set(CMakeHelp_STANDALONE 1)
- cmake_minimum_required(VERSION 3.1...3.20 FATAL_ERROR)
+ cmake_minimum_required(VERSION 3.1...3.21 FATAL_ERROR)
get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH)
include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)
diff --git a/Utilities/cmbzip2/CMakeLists.txt b/Utilities/cmbzip2/CMakeLists.txt
index ff90bb6..0db470f 100644
--- a/Utilities/cmbzip2/CMakeLists.txt
+++ b/Utilities/cmbzip2/CMakeLists.txt
@@ -2,7 +2,7 @@ project(bzip2)
# Disable warnings to avoid changing 3rd party code.
if(CMAKE_C_COMPILER_ID MATCHES
- "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
+ "^(GNU|LCC|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 9eef01a..cd5d354 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -83,7 +83,7 @@ elseif(APPLE)
)
endif()
if(NOT OSX_VERSION VERSION_LESS 10.6 AND
- CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
+ CMAKE_C_COMPILER_ID MATCHES "GNU|LCC|Clang|AppleClang")
set(CMAKE_USE_SECTRANSP ON CACHE INTERNAL "enable Apple OS native SSL/TLS")
else()
set(CMAKE_USE_SECTRANSP OFF CACHE INTERNAL "enable Apple OS native SSL/TLS")
@@ -112,7 +112,7 @@ endif(APPLE)
# Disable warnings to avoid changing 3rd party code.
if(CMAKE_C_COMPILER_ID MATCHES
- "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
+ "^(GNU|LCC|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
diff --git a/Utilities/cmexpat/CMakeLists.txt b/Utilities/cmexpat/CMakeLists.txt
index ce72927..6e49fe4 100644
--- a/Utilities/cmexpat/CMakeLists.txt
+++ b/Utilities/cmexpat/CMakeLists.txt
@@ -1,6 +1,6 @@
# Disable warnings to avoid changing 3rd party code.
IF(CMAKE_C_COMPILER_ID MATCHES
- "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
+ "^(GNU|LCC|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
diff --git a/Utilities/cmjsoncpp/CMakeLists.txt b/Utilities/cmjsoncpp/CMakeLists.txt
index 029ae86..16613d4 100644
--- a/Utilities/cmjsoncpp/CMakeLists.txt
+++ b/Utilities/cmjsoncpp/CMakeLists.txt
@@ -2,7 +2,7 @@ project(JsonCpp CXX)
# Disable warnings to avoid changing 3rd party code.
if(CMAKE_CXX_COMPILER_ID MATCHES
- "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
+ "^(GNU|LCC|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "PathScale")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -woffall")
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index ba65470..c1ac991 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -94,7 +94,7 @@ SET(CMAKE_REQUIRED_FLAGS)
# Disable warnings to avoid changing 3rd party code.
IF(CMAKE_C_COMPILER_ID MATCHES
- "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
+ "^(GNU|LCC|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
@@ -110,7 +110,7 @@ endif ()
# Especially for early development, we want to be a little
# aggressive about diagnosing build problems; this can get
# relaxed somewhat in final shipping versions.
-IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$")
+IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR CMAKE_C_COMPILER_ID MATCHES "^LCC$")
SET(CMAKE_REQUIRED_FLAGS "-Wall -Wformat -Wformat-security")
#################################################################
# Set compile flags for all build types.
@@ -126,7 +126,7 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wmissing-prototypes")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wcast-qual")
-ENDIF (CMAKE_C_COMPILER_ID MATCHES "^GNU$")
+ENDIF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR CMAKE_C_COMPILER_ID MATCHES "^LCC$")
IF (CMAKE_C_COMPILER_ID MATCHES "^Clang$")
SET(CMAKE_REQUIRED_FLAGS "-Wall -Wformat -Wformat-security")
#################################################################
@@ -1038,7 +1038,7 @@ ENDMACRO(CHECK_CRYPTO_WIN CRYPTO_LIST)
MACRO(CHECK_ICONV LIB TRY_ICONV_CONST)
IF(NOT HAVE_ICONV)
CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
- IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR
+ IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR CMAKE_C_COMPILER_ID MATCHES "^LCC$" OR
CMAKE_C_COMPILER_ID MATCHES "^Clang$")
#
# During checking iconv proto type, we should use -Werror to avoid the
@@ -1046,7 +1046,7 @@ MACRO(CHECK_ICONV LIB TRY_ICONV_CONST)
# detection. So this needs for all build mode(even it's a release mode).
#
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")
- ENDIF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR
+ ENDIF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR CMAKE_C_COMPILER_ID MATCHES "^LCC$" OR
CMAKE_C_COMPILER_ID MATCHES "^Clang$")
IF (CMAKE_C_COMPILER_ID MATCHES "^XL$")
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -qhalt=w -qflag=w:w")
@@ -1335,7 +1335,7 @@ ENDIF(NOT FOUND_POSIX_REGEX_LIB AND POSIX_REGEX_LIB MATCHES "^(AUTO|LIBPCREPOSIX
# Check functions
#
CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
-IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR
+IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR CMAKE_C_COMPILER_ID MATCHES "^LCC$" OR
CMAKE_C_COMPILER_ID MATCHES "^Clang$")
#
# During checking functions, we should use -fno-builtin to avoid the
@@ -1343,7 +1343,7 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR
# types for built-in function" caused by using -Werror option.
#
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-builtin")
-ENDIF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR
+ENDIF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR CMAKE_C_COMPILER_ID MATCHES "^LCC$" OR
CMAKE_C_COMPILER_ID MATCHES "^Clang$")
CHECK_SYMBOL_EXISTS(_CrtSetReportMode "crtdbg.h" HAVE__CrtSetReportMode)
CHECK_FUNCTION_EXISTS_GLIBC(arc4random_buf HAVE_ARC4RANDOM_BUF)
diff --git a/Utilities/cmliblzma/CMakeLists.txt b/Utilities/cmliblzma/CMakeLists.txt
index 4820a8f..c779920 100644
--- a/Utilities/cmliblzma/CMakeLists.txt
+++ b/Utilities/cmliblzma/CMakeLists.txt
@@ -160,7 +160,7 @@ INCLUDE_DIRECTORIES(
# Disable warnings to avoid changing 3rd party code.
IF(CMAKE_C_COMPILER_ID MATCHES
- "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
+ "^(GNU|LCC|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
@@ -172,7 +172,7 @@ IF(CMAKE_C_COMPILER_ID STREQUAL "XL")
# Disable the XL compiler optimizer because it causes crashes
# and other bad behavior in liblzma code.
SET_PROPERTY(TARGET cmliblzma PROPERTY COMPILE_FLAGS "-qnooptimize")
-ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND
+ELSEIF((CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "LCC") AND
CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
# Disable the old GNU compiler optimizer.
SET_PROPERTY(TARGET cmliblzma PROPERTY COMPILE_FLAGS "-O0")
diff --git a/Utilities/cmlibrhash/CMakeLists.txt b/Utilities/cmlibrhash/CMakeLists.txt
index 1a01165..99c76cc 100644
--- a/Utilities/cmlibrhash/CMakeLists.txt
+++ b/Utilities/cmlibrhash/CMakeLists.txt
@@ -2,7 +2,7 @@ project(librhash C)
# Disable warnings to avoid changing 3rd party code.
if(CMAKE_C_COMPILER_ID MATCHES
- "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
+ "^(GNU|LCC|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt
index 086345c..aabd013 100644
--- a/Utilities/cmlibuv/CMakeLists.txt
+++ b/Utilities/cmlibuv/CMakeLists.txt
@@ -2,7 +2,7 @@ project(libuv C)
# Disable warnings to avoid changing 3rd party code.
if(CMAKE_C_COMPILER_ID MATCHES
- "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
+ "^(GNU|LCC|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
diff --git a/Utilities/cmlibuv/src/uv-common.c b/Utilities/cmlibuv/src/uv-common.c
index f986d75..213c7c6 100644
--- a/Utilities/cmlibuv/src/uv-common.c
+++ b/Utilities/cmlibuv/src/uv-common.c
@@ -855,7 +855,7 @@ void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) {
}
-#ifdef __GNUC__ /* Also covers __clang__ and __INTEL_COMPILER. */
+#ifdef __GNUC__ /* Also covers __clang__, __LCC__, and __INTEL_COMPILER. */
__attribute__((destructor))
#endif
void uv_library_shutdown(void) {
diff --git a/Utilities/cmnghttp2/CMakeLists.txt b/Utilities/cmnghttp2/CMakeLists.txt
index 3bc2778..8b5e833 100644
--- a/Utilities/cmnghttp2/CMakeLists.txt
+++ b/Utilities/cmnghttp2/CMakeLists.txt
@@ -1,6 +1,6 @@
# Disable warnings to avoid changing 3rd party code.
if(CMAKE_C_COMPILER_ID MATCHES
- "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
+ "^(GNU|LCC|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
diff --git a/Utilities/cmzlib/CMakeLists.txt b/Utilities/cmzlib/CMakeLists.txt
index d57cb29..9e10daf 100644
--- a/Utilities/cmzlib/CMakeLists.txt
+++ b/Utilities/cmzlib/CMakeLists.txt
@@ -2,7 +2,7 @@ PROJECT(CMZLIB)
# Disable warnings to avoid changing 3rd party code.
if(CMAKE_C_COMPILER_ID MATCHES
- "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
+ "^(GNU|LCC|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
diff --git a/Utilities/cmzstd/CMakeLists.txt b/Utilities/cmzstd/CMakeLists.txt
index 1997195..1ba263a 100644
--- a/Utilities/cmzstd/CMakeLists.txt
+++ b/Utilities/cmzstd/CMakeLists.txt
@@ -2,7 +2,7 @@ project(zstd C)
# Disable warnings to avoid changing 3rd party code.
if(CMAKE_C_COMPILER_ID MATCHES
- "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
+ "^(GNU|LCC|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")