summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/BootstrapTest.cmake7
-rw-r--r--Tests/CMakeLib/CMakeLists.txt3
-rw-r--r--Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt3
-rw-r--r--Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in34
-rw-r--r--Tests/CMakeLib/testCMExtMemory.cxx2
-rw-r--r--Tests/CMakeLib/testCMFilesystemPath.cxx1006
-rw-r--r--Tests/CMakeLib/testRST.expect2
-rw-r--r--Tests/CMakeLib/testRST.rst2
-rw-r--r--Tests/CMakeLists.txt149
-rw-r--r--Tests/CMakeTests/CMakeLists.txt2
-rw-r--r--Tests/CMakeTests/FileDownloadTest.cmake.in13
-rw-r--r--Tests/CMakeTests/FileTestScript.cmake4
-rw-r--r--Tests/COnly/CMakeLists.txt2
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake32
-rw-r--r--Tests/CSharpOnly/CMakeLists.txt1
-rw-r--r--Tests/Cuda/MixedStandardLevels4/lib.cpp2
-rw-r--r--Tests/CudaOnly/DontResolveDeviceSymbols/file1.cu2
-rw-r--r--Tests/CxxOnly/CMakeLists.txt1
-rw-r--r--Tests/ExportImport/Export/Interface/CMakeLists.txt26
-rw-r--r--Tests/ExportImport/Export/Interface/headergen.h.in1
-rw-r--r--Tests/ExportImport/Import/Interface/CMakeLists.txt6
-rw-r--r--Tests/ExportImport/Import/Interface/headergentest.cpp11
-rw-r--r--Tests/FindPackageModeMakefileTest/Makefile.in2
-rw-r--r--Tests/FindSDL/CMakeLists.txt10
-rw-r--r--Tests/FindSDL/Test/CMakeLists.txt19
-rw-r--r--Tests/FindSDL/Test/main.c18
-rw-r--r--Tests/FindTIFF/Test/CMakeLists.txt13
-rw-r--r--Tests/FindTIFF/Test/main.cxx16
-rw-r--r--Tests/FindVulkan/Test/CMakeLists.txt9
-rw-r--r--Tests/FindVulkan/Test/Run-glslc.cmake20
-rw-r--r--Tests/FindVulkan/Test/main.c4
-rw-r--r--Tests/FindX11/Test/CMakeLists.txt6
-rw-r--r--Tests/FindX11/Test/main.c69
-rw-r--r--Tests/FortranOnly/CMakeLists.txt2
-rw-r--r--Tests/GeneratorExpression/CMakeLists.txt10
-rw-r--r--Tests/GeneratorExpression/check-part3.cmake4
-rw-r--r--Tests/GhsMulti/GhsMultiSrcGroups/standard.h2
-rw-r--r--Tests/GhsMulti/GhsMultiSrcGroups/test3.h2
-rw-r--r--Tests/InterfaceLibrary/CMakeLists.txt1
-rw-r--r--Tests/InterfaceLibrary/definetestexe.cpp6
-rw-r--r--Tests/InterfaceLibrary/headerdir/CMakeLists.txt9
-rw-r--r--Tests/InterfaceLibrary/headerdir/iface_genheader.h.in1
-rw-r--r--Tests/LoadCommand/CMakeCommands/cmTestCommand.c2
-rw-r--r--Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c2
-rw-r--r--Tests/Module/CheckTypeSize/CMakeLists.txt2
-rw-r--r--Tests/Module/CheckTypeSize/CheckTypeSize.cxx26
-rw-r--r--Tests/Module/CheckTypeSize/config.hxx.in10
-rw-r--r--Tests/RunCMake/Android/RunCMakeTest.cmake84
-rw-r--r--Tests/RunCMake/Android/common.cmake2
-rw-r--r--Tests/RunCMake/Android/ndk-arm64-v8a-stderr.txt7
-rw-r--r--Tests/RunCMake/Android/ndk-armeabi-arm-stderr.txt7
-rw-r--r--Tests/RunCMake/Android/ndk-armeabi-thumb-stderr.txt7
-rw-r--r--Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stderr.txt7
-rw-r--r--Tests/RunCMake/Android/ndk-armeabi-v7a-stderr.txt7
-rw-r--r--Tests/RunCMake/Android/ndk-x86-stderr.txt7
-rw-r--r--Tests/RunCMake/Android/ndk-x86_64-stderr.txt7
-rw-r--r--Tests/RunCMake/BundleUtilities/ExecutableScripts.cmake18
-rw-r--r--Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake1
-rwxr-xr-xTests/RunCMake/BundleUtilities/test.app/script3
-rwxr-xr-xTests/RunCMake/BundleUtilities/test.app/script.bat3
-rwxr-xr-xTests/RunCMake/BundleUtilities/test.app/script.sh3
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt9
-rw-r--r--Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt7
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt7
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt9
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0026/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0027/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0028/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0037/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0041/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0042/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0043/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMP0045/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMakeLists.txt11
-rw-r--r--Tests/RunCMake/CPack/DragNDrop/Accept.txt1
-rw-r--r--Tests/RunCMake/CPack/DragNDrop/Helpers.cmake1
-rw-r--r--Tests/RunCMake/CPack/DragNDrop/packaging_MONOLITHIC_default.cmake2
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/test.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf7
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/English.menu.txt9
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/ExpectedFiles.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt3
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt9
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/VerifyResult.cmake33
-rw-r--r--Tests/RunCMake/CPack/tests/DMG_SLA/test.cmake3
-rw-r--r--Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake8
-rw-r--r--Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt10
-rw-r--r--Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake1
-rw-r--r--Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ExpectedFiles.cmake19
-rw-r--r--Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_COMPONENT-stdout.txt4
-rw-r--r--Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_MONOLITHIC-stdout.txt4
-rw-r--r--Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/post.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/pre.cmake1
-rw-r--r--Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/test.cmake9
-rw-r--r--Tests/RunCMake/CPack/tests/PROJECT_META/VerifyResult.cmake2
-rw-r--r--Tests/RunCMake/CTest/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CheckModules/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_capabilities-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/E_compare_files-different-eol-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-result.txt (renamed from Tests/RunCMake/interface_library/whitelist-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-stderr.txt3
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-result.txt (renamed from Tests/RunCMake/interface_library/target_commands-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-result.txt (renamed from Tests/RunCMake/interface_library/invalid_signature-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-prereq-check.cmake3
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-result.txt (renamed from Tests/RunCMake/interface_library/invalid_name-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake73
-rw-r--r--Tests/RunCMake/CommandLine/dir-permissions-install-options-to-vars/cmake_install.cmake3
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-result.txt (renamed from Tests/RunCMake/interface_library/genex_link-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-all-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-all-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-result.txt (renamed from Tests/RunCMake/interface_library/global-interface-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-result.txt (renamed from Tests/RunCMake/interface_library/add_custom_command-TARGET-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-result.txt (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-result.txt (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-result.txt (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value-result.txt)0
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-none-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/install-default-dir-permissions-none-stderr.txt1
-rw-r--r--Tests/RunCMake/CompatibleInterface/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompatibleInterface/DebugProperties.cmake2
-rw-r--r--Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake2
-rw-r--r--Tests/RunCMake/CompilerArgs/C.cmake3
-rw-r--r--Tests/RunCMake/CompilerArgs/CMakeLists.txt (renamed from Tests/RunCMake/interface_library/CMakeLists.txt)2
-rw-r--r--Tests/RunCMake/CompilerArgs/CXX.cmake3
-rw-r--r--Tests/RunCMake/CompilerArgs/FindCCompiler.cmake2
-rw-r--r--Tests/RunCMake/CompilerArgs/FindCXXCompiler.cmake2
-rw-r--r--Tests/RunCMake/CompilerArgs/RunCMakeTest.cmake58
-rw-r--r--Tests/RunCMake/CompilerArgs/main.c10
-rw-r--r--Tests/RunCMake/CompilerArgs/main.cxx10
-rw-r--r--Tests/RunCMake/CompilerArgs/toolchain.cmake.in1
-rw-r--r--Tests/RunCMake/CompilerChange/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CompilerNotFound/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/Configure/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/DependencyGraph/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeCommon.cmake40
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-check.cmake5
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-stderr.txt1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-both.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-check.cmake6
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-stderr.txt1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-middle.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-check.cmake6
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-stderr.txt1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-none.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-check.cmake5
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-stderr.txt1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortran-top.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeFortranCommon.cmake25
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-both-build-check.cmake11
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-both.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-middle-build-check.cmake11
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-middle.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-none-build-check.cmake11
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-none.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-top-build-check.cmake11
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeShared-top.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-both-build-check.cmake8
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-both.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-middle-build-check.cmake10
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-middle.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-none-build-check.cmake10
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-none.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-top-build-check.cmake8
-rw-r--r--Tests/RunCMake/DependencyGraph/OptimizeStatic-top.cmake1
-rw-r--r--Tests/RunCMake/DependencyGraph/Property.cmake24
-rw-r--r--Tests/RunCMake/DependencyGraph/RunCMakeTest.cmake60
-rw-r--r--Tests/RunCMake/DependencyGraph/WriteTargets.cmake16
-rw-r--r--Tests/RunCMake/DependencyGraph/mylib.c6
-rw-r--r--Tests/RunCMake/DependencyGraph/mylib.f903
-rw-r--r--Tests/RunCMake/DisallowedCommands/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ExcludeFromAll/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake26
-rw-r--r--Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-result.txt1
-rw-r--r--Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt3
-rw-r--r--Tests/RunCMake/ExcludeFromAll/error-on-mixed-config.cmake6
-rw-r--r--Tests/RunCMake/ExcludeFromAll/main.c4
-rw-r--r--Tests/RunCMake/ExcludeFromAll/single-config-build-check.cmake17
-rw-r--r--Tests/RunCMake/ExcludeFromAll/single-config.cmake7
-rw-r--r--Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ExternalData/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadInactivityResume.cmake5
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-stdout.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadInactivityTimeout.cmake5
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadServer.py42
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadTimeout-build-result.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadTimeout-build-stderr.txt1
-rw-r--r--Tests/RunCMake/ExternalProject/DownloadTimeout.cmake5
-rw-r--r--Tests/RunCMake/ExternalProject/RunCMakeTest.cmake53
-rw-r--r--Tests/RunCMake/FPHSA/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FeatureSummary/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-check.py39
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json14
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/interface.json13
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json8
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json79
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json12
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json110
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe_languagestandard.json36
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json110
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json67
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json70
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2.cmake1
-rw-r--r--Tests/RunCMake/FileAPI/cxx/CMakeLists.txt11
-rw-r--r--Tests/RunCMake/FileAPI/interface/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/File_Generate/AdjacentInOut.cmake6
-rw-r--r--Tests/RunCMake/File_Generate/AdjacentInOut.in1
-rw-r--r--Tests/RunCMake/File_Generate/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/File_Generate/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/FindOpenGL/CMP0072-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/FindPkgConfig/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_MODULE_NAME.cmake2
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake17
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-TARGET_PROPERTY.cmake17
-rw-r--r--Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries-check.cmake6
-rw-r--r--Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries.cmake9
-rw-r--r--Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries-check.cmake6
-rw-r--r--Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries.cmake8
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake14
-rw-r--r--Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES-check.cmake17
-rw-r--r--Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES.cmake7
-rw-r--r--Tests/RunCMake/GeneratorPlatform/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTestXML-special-result-check.cmake28
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTestXML.cmake11
-rw-r--r--Tests/RunCMake/GoogleTest/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/GoogleTest/xml_output.cpp11
-rw-r--r--Tests/RunCMake/Graphviz/GraphvizTestProject.cmake10
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_custom_targets.dot44
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_default_options.dot40
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_dependers_files.dot40
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_executables.dot31
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_external_libs.dot32
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_graphic_libs.dot10
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_interface_libs.dot34
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_module_libs.dot28
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_object_libs.dot36
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_per_target_files.dot40
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_shared_libs.dot28
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_static_libs.dot1
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_unknown_libs.dot36
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_header.dot40
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_name.dot40
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_node_prefix.dot40
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication24
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers36
-rw-r--r--Tests/RunCMake/Graphviz/sub_directory_target/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/Graphviz/sub_directory_target/test.c4
-rw-r--r--Tests/RunCMake/Graphviz/test_project/system_library.c3
-rw-r--r--Tests/RunCMake/IncompatibleQt/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/InterfaceLibrary/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/InterfaceLibrary/ConfigSources.cmake2
-rw-r--r--Tests/RunCMake/InterfaceLibrary/EmptySources-build2-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/EmptySources-build2-stdout.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/EmptySources.cmake8
-rw-r--r--Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build1-check.cmake4
-rw-r--r--Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build2-check.cmake4
-rw-r--r--Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-stdout.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/ExcludeFromAll.cmake7
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-stderr.txt (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value-stderr.txt)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value.cmake (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-stderr.txt (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface-stderr.txt)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface.cmake (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-stderr.txt (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported-stderr.txt)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported.cmake (renamed from Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/PublicSources-build3-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/PublicSources-build3-stdout.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/PublicSources.cmake20
-rw-r--r--Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake36
-rw-r--r--Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-stderr.txt (renamed from Tests/RunCMake/interface_library/add_custom_command-TARGET-stderr.txt)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET.cmake (renamed from Tests/RunCMake/interface_library/add_custom_command-TARGET.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/genex_link-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/genex_link.cmake (renamed from Tests/RunCMake/interface_library/genex_link.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/global-interface-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt (renamed from Tests/RunCMake/interface_library/global-interface-stderr.txt)4
-rw-r--r--Tests/RunCMake/InterfaceLibrary/global-interface.cmake (renamed from Tests/RunCMake/interface_library/global-interface.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/iface.c4
-rw-r--r--Tests/RunCMake/InterfaceLibrary/iface_broken.c1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/invalid_name-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/invalid_name-stderr.txt (renamed from Tests/RunCMake/interface_library/invalid_name-stderr.txt)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/invalid_name.cmake (renamed from Tests/RunCMake/interface_library/invalid_name.cmake)2
-rw-r--r--Tests/RunCMake/InterfaceLibrary/invalid_signature-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/invalid_signature-stderr.txt (renamed from Tests/RunCMake/interface_library/invalid_signature-stderr.txt)15
-rw-r--r--Tests/RunCMake/InterfaceLibrary/invalid_signature.cmake (renamed from Tests/RunCMake/interface_library/invalid_signature.cmake)6
-rw-r--r--Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake (renamed from Tests/RunCMake/interface_library/no_shared_libs.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/target_commands-result.txt1
-rw-r--r--Tests/RunCMake/InterfaceLibrary/target_commands-stderr.txt (renamed from Tests/RunCMake/interface_library/target_commands-stderr.txt)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/target_commands.cmake (renamed from Tests/RunCMake/interface_library/target_commands.cmake)0
-rw-r--r--Tests/RunCMake/InterfaceLibrary/use_iface.c6
-rw-r--r--Tests/RunCMake/Languages/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/Make/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll-all-build-check.cmake9
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll.cmake12
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt4
-rw-r--r--Tests/RunCMake/ObsoleteQtMacros/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/PositionIndependentCode/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/RunCMake.cmake1
-rw-r--r--Tests/RunCMake/SourceProperties/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/TargetObjects/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/TargetPolicies/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/TargetProperties/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/TargetSources/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake2
-rw-r--r--Tests/RunCMake/VS10Project/InterfaceLibSources-check.cmake25
-rw-r--r--Tests/RunCMake/VS10Project/InterfaceLibSources.cmake1
-rw-r--r--Tests/RunCMake/VS10Project/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake2
-rw-r--r--Tests/RunCMake/VS10Project/iface.h0
-rw-r--r--Tests/RunCMake/VSSolution/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/XcodeProject/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/XcodeProject/InterfaceLibSources-check.cmake16
-rw-r--r--Tests/RunCMake/XcodeProject/InterfaceLibSources.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake2
-rw-r--r--Tests/RunCMake/XcodeProject/iface.h0
-rw-r--r--Tests/RunCMake/XcodeProject/main.cpp2
-rw-r--r--Tests/RunCMake/XcodeProject/main.m2
-rw-r--r--Tests/RunCMake/add_dependencies/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-AlphaNumeric.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-BracketArgument.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-EscapedSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-FormerInvalidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-LeadingAndTrailingWhitespace.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-OtherSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-Quote.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-Semicolon.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-Space.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common-ValidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Common.cmake9
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialCharsMC.cmake1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-GeneratorExpressionSyntax.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-Quote-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-Quote.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-Semicolon.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-Space.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-ctest-stderr.txt5
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-ctest-stderr.txt3
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC.cmake1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-GeneratorExpressionSyntax.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Quote-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Quote.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Semicolon.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-Space.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-Test.cmake3
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-stderr.txt11
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-ctest-stderr.txt5
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-stderr.txt11
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-stderr.txt13
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-ctest-stderr.txt3
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-stderr.txt13
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC.cmake1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-GeneratorExpressionSyntax.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-stderr.txt11
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Quote-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Quote-stderr.txt11
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Quote.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-stderr.txt11
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Semicolon.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-result.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Space-stderr.txt11
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-Space.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars-ctest-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars.cmake2
-rw-r--r--Tests/RunCMake/add_test/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/add_test/RunCMakeTest.cmake35
-rw-r--r--Tests/RunCMake/alias_targets/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/alias_targets/invalid-name.cmake2
-rw-r--r--Tests/RunCMake/build_command/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/cmake_language/call_invalid_command.cmake2
-rw-r--r--Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt26
-rw-r--r--Tests/RunCMake/cmake_minimum_required/Before2812.cmake6
-rw-r--r--Tests/RunCMake/cmake_minimum_required/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt9
-rw-r--r--Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/configure_file/NoSourcePermissions.cmake10
-rwxr-xr-xTests/RunCMake/configure_file/NoSourcePermissions.sh3
-rw-r--r--Tests/RunCMake/configure_file/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in2
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyCudaMemcheck-result.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyCudaMemcheck-stderr.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyCudaMemcheck-stdout.txt13
-rw-r--r--Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake12
-rw-r--r--Tests/RunCMake/ctest_memcheck/test.cmake.in2
-rw-r--r--Tests/RunCMake/ctest_memcheck/testCudaMemcheck.cmake279
-rw-r--r--Tests/RunCMake/ctest_update/test.cmake.in2
-rw-r--r--Tests/RunCMake/export/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt4
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake8
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt0
-rw-r--r--Tests/RunCMake/file/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/find_dependency/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/find_package/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/find_package/MissingNormalWarnNoModuleOld-stderr.txt11
-rw-r--r--Tests/RunCMake/find_program/BundleSpaceInName-stdout.txt1
-rw-r--r--Tests/RunCMake/find_program/BundleSpaceInName.cmake8
-rw-r--r--Tests/RunCMake/find_program/CMP0109-Common.cmake (renamed from Tests/RunCMake/find_program/ExeNoRead.cmake)3
-rw-r--r--Tests/RunCMake/find_program/CMP0109-NEW-stdout.txt2
-rw-r--r--Tests/RunCMake/find_program/CMP0109-NEW.cmake2
-rw-r--r--Tests/RunCMake/find_program/CMP0109-OLD-stdout.txt2
-rw-r--r--Tests/RunCMake/find_program/CMP0109-OLD.cmake2
-rw-r--r--Tests/RunCMake/find_program/CMP0109-WARN-stderr.txt29
-rw-r--r--Tests/RunCMake/find_program/CMP0109-WARN-stdout.txt2
-rw-r--r--Tests/RunCMake/find_program/CMP0109-WARN.cmake1
-rw-r--r--Tests/RunCMake/find_program/ExeNoRead-stdout.txt1
-rw-r--r--Tests/RunCMake/find_program/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/foreach/foreach-ZIP_LISTS-multiple-iter-vars-test.cmake6
-rw-r--r--Tests/RunCMake/foreach/foreach-ZIP_LISTS-test-stdout.txt2
-rw-r--r--Tests/RunCMake/foreach/foreach-ZIP_LISTS-test.cmake2
-rw-r--r--Tests/RunCMake/get_filename_component/IncorrectArguments-result.txt1
-rw-r--r--Tests/RunCMake/get_filename_component/IncorrectArguments-stderr.txt4
-rw-r--r--Tests/RunCMake/get_filename_component/IncorrectArguments.cmake2
-rw-r--r--Tests/RunCMake/get_filename_component/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/get_filename_component/UnknownComponent-stderr.txt4
-rw-r--r--Tests/RunCMake/get_filename_component/UnknownComponent.cmake1
-rw-r--r--Tests/RunCMake/get_property/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/if/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/include/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/include_external_msproject/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/include_external_msproject/check_utils.cmake2
-rw-r--r--Tests/RunCMake/interface_library/RunCMakeTest.cmake13
-rw-r--r--Tests/RunCMake/interface_library/whitelist-stderr.txt19
-rw-r--r--Tests/RunCMake/interface_library/whitelist.cmake25
-rw-r--r--Tests/RunCMake/list/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt11
-rw-r--r--Tests/RunCMake/math/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/message/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/no_install_prefix/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/project/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/string/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake2
-rw-r--r--Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake2
-rw-r--r--Tests/RunCMake/target_link_libraries/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported.cmake1
-rw-r--r--Tests/RunCMake/target_link_libraries/StaticPrivateDepNotTarget.cmake1
-rw-r--r--Tests/RunCMake/try_compile/CMP0056.cmake1
-rw-r--r--Tests/RunCMake/try_compile/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/try_compile/CudaStandard-stderr.txt2
-rw-r--r--Tests/RunCMake/try_compile/CudaStandard.cmake2
-rw-r--r--Tests/RunCMake/try_compile/proj/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/try_run/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/variable_watch/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/while/CMakeLists.txt2
-rw-r--r--Tests/SetLang/CMakeLists.txt7
-rw-r--r--Tests/SetLang/bar.c14
-rw-r--r--Tests/SetLang/zoom.zzz7
-rw-r--r--Tests/UseSWIG/CMakeLists.txt10
-rw-r--r--Tests/UseSWIG/NamespaceCsharp/CMakeLists.txt25
-rw-r--r--Tests/UseSWIG/NamespaceCsharp/ValidateSupportFiles.cmake8
-rw-r--r--Tests/UseSWIG/NamespaceCsharp/ns_example.cpp14
-rw-r--r--Tests/UseSWIG/NamespaceCsharp/ns_example.hpp19
-rw-r--r--Tests/UseSWIG/NamespaceCsharp/ns_example.i8
-rw-r--r--Tests/VSAndroid/AndroidManifest.xml (renamed from Tests/VSNsightTegra/AndroidManifest.xml)0
-rw-r--r--Tests/VSAndroid/CMakeLists.txt (renamed from Tests/VSNsightTegra/CMakeLists.txt)2
-rw-r--r--Tests/VSAndroid/build.xml (renamed from Tests/VSNsightTegra/build.xml)0
-rw-r--r--Tests/VSAndroid/jni/first.c (renamed from Tests/VSNsightTegra/jni/first.c)0
-rw-r--r--Tests/VSAndroid/jni/first.h (renamed from Tests/VSNsightTegra/jni/first.h)0
-rw-r--r--Tests/VSAndroid/jni/second.c (renamed from Tests/VSNsightTegra/jni/second.c)0
-rw-r--r--Tests/VSAndroid/proguard-android.txt (renamed from Tests/VSNsightTegra/proguard-android.txt)0
-rw-r--r--Tests/VSAndroid/res/values/strings.xml (renamed from Tests/VSNsightTegra/res/values/strings.xml)0
-rw-r--r--Tests/VSAndroid/src/com/example/twolibs/TwoLibs.java (renamed from Tests/VSNsightTegra/src/com/example/twolibs/TwoLibs.java)0
-rw-r--r--Tests/VSWinStorePhone/CMakeLists.txt2
-rw-r--r--Tests/VariableUnusedViaSet/CMakeLists.txt4
-rw-r--r--Tests/VariableUnusedViaUnset/CMakeLists.txt8
-rw-r--r--Tests/XCTest/StaticLibExample/StaticLibExample.c2
-rw-r--r--Tests/XCTest/StaticLibExample/StaticLibExample.h2
562 files changed, 4737 insertions, 608 deletions
diff --git a/Tests/BootstrapTest.cmake b/Tests/BootstrapTest.cmake
index 07a65bf..137de78 100644
--- a/Tests/BootstrapTest.cmake
+++ b/Tests/BootstrapTest.cmake
@@ -1,12 +1,15 @@
file(MAKE_DIRECTORY "${bin_dir}")
include(ProcessorCount)
ProcessorCount(nproc)
+if(generator MATCHES "Ninja")
+ set(ninja_arg --generator=Ninja)
+endif()
if(NOT nproc EQUAL 0)
set(parallel_arg --parallel=${nproc})
endif()
-message(STATUS "running bootstrap: ${bootstrap} ${parallel_arg}")
+message(STATUS "running bootstrap: ${bootstrap} ${ninja_arg} ${parallel_arg}")
execute_process(
- COMMAND ${bootstrap} ${parallel_arg}
+ COMMAND ${bootstrap} ${ninja_arg} ${parallel_arg}
WORKING_DIRECTORY "${bin_dir}"
RESULT_VARIABLE result
)
diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt
index bb50d76..0b2c8f6 100644
--- a/Tests/CMakeLib/CMakeLists.txt
+++ b/Tests/CMakeLib/CMakeLists.txt
@@ -29,6 +29,9 @@ set(CMakeLib_TESTS
testCMExtMemory.cxx
testCMExtAlgorithm.cxx
)
+if (CMake_TEST_FILESYSTEM_PATH OR NOT CMake_HAVE_CXX_FILESYSTEM)
+ list(APPEND CMakeLib_TESTS testCMFilesystemPath.cxx)
+endif()
add_executable(testUVProcessChainHelper testUVProcessChainHelper.cxx)
diff --git a/Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt b/Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt
index 7c84ee1..4bef6c5 100644
--- a/Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt
+++ b/Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt
@@ -15,6 +15,9 @@ target_link_libraries(pseudo_purify CMakeLib)
add_executable(pseudo_BC "${CMAKE_CURRENT_BINARY_DIR}/ret0.cxx")
set_target_properties(pseudo_BC PROPERTIES OUTPUT_NAME BC)
target_link_libraries(pseudo_BC CMakeLib)
+add_executable(pseudo_cuda-memcheck "${CMAKE_CURRENT_BINARY_DIR}/ret0.cxx")
+set_target_properties(pseudo_cuda-memcheck PROPERTIES OUTPUT_NAME cuda-memcheck)
+target_link_libraries(pseudo_cuda-memcheck CMakeLib)
# binary to be used as pre- and post-memcheck command that fails
add_executable(memcheck_fail "${CMAKE_CURRENT_BINARY_DIR}/ret1.cxx")
diff --git a/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in
index 3183bc0..f37ad59 100644
--- a/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in
+++ b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in
@@ -1,8 +1,14 @@
-#include <cmSystemTools.h>
-#include "cmsys/Encoding.hxx"
#include <string>
+#include <vector>
+
+#include "cmsys/Encoding.hxx"
+
+#include <cmSystemTools.h>
+// clang-format off
#define RETVAL @_retval@
+#define CMAKE_COMMAND "@CMAKE_COMMAND@"
+// clang-format on
int main(int ac, char** av)
{
@@ -14,6 +20,9 @@ int main(int ac, char** av)
std::string exename = argv[0];
std::string logarg;
bool nextarg = false;
+ // execute the part after the last argument?
+ // the logfile path gets passed as environment variable PSEUDO_LOGFILE
+ bool exec = false;
if (exename.find("valgrind") != std::string::npos) {
logarg = "--log-file=";
@@ -26,6 +35,10 @@ int main(int ac, char** av)
} else if (exename.find("BC") != std::string::npos) {
nextarg = true;
logarg = "/X";
+ } else if (exename.find("cuda-memcheck") != std::string::npos) {
+ nextarg = true;
+ exec = true;
+ logarg = "--log-file";
}
if (!logarg.empty()) {
@@ -45,8 +58,25 @@ int main(int ac, char** av)
}
}
+ // find the last argument position
+ int lastarg_pos = 1;
+ for (int i = 1; i < argc; ++i) {
+ std::string arg = argv[i];
+ if (arg.find("--") == 0) {
+ lastarg_pos = i;
+ }
+ }
+
if (!logfile.empty()) {
cmSystemTools::Touch(logfile, true);
+ // execute everything after the last argument with additional environment
+ int callarg_pos = lastarg_pos + (nextarg ? 2 : 1);
+ if (exec && callarg_pos < argc) {
+ std::vector<std::string> callargs{ CMAKE_COMMAND, "-E", "env",
+ "PSEUDO_LOGFILE=" + logfile };
+ callargs.insert(callargs.end(), &argv[callarg_pos], &argv[argc]);
+ cmSystemTools::RunSingleCommand(callargs);
+ }
}
}
diff --git a/Tests/CMakeLib/testCMExtMemory.cxx b/Tests/CMakeLib/testCMExtMemory.cxx
index 6663c17..2aeaf7f 100644
--- a/Tests/CMakeLib/testCMExtMemory.cxx
+++ b/Tests/CMakeLib/testCMExtMemory.cxx
@@ -13,7 +13,7 @@ public:
class Derived : public Base
{
public:
- ~Derived() = default;
+ ~Derived() override = default;
void method() {}
};
diff --git a/Tests/CMakeLib/testCMFilesystemPath.cxx b/Tests/CMakeLib/testCMFilesystemPath.cxx
new file mode 100644
index 0000000..1e84520
--- /dev/null
+++ b/Tests/CMakeLib/testCMFilesystemPath.cxx
@@ -0,0 +1,1006 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+
+#include <algorithm>
+#include <iostream>
+#include <sstream>
+#include <string>
+#include <vector>
+
+#include <cm/filesystem>
+#include <cm/iomanip>
+
+namespace {
+
+namespace fs = cm::filesystem;
+
+void checkResult(bool success)
+{
+ if (!success) {
+ std::cout << " => failed";
+ }
+ std::cout << std::endl;
+}
+
+bool testConstructors()
+{
+ std::cout << "testConstructors()";
+
+ bool result = true;
+
+ {
+ fs::path p;
+ if (p != fs::path()) {
+ result = false;
+ }
+ }
+ {
+ fs::path p1("/a/b/c");
+ fs::path p2("/a/b/c");
+ if (p1 != p2) {
+ result = false;
+ }
+ if (p1.string() != p2.string()) {
+ result = false;
+ }
+ if (p1.string() != "/a/b/c") {
+ result = false;
+ }
+ }
+ {
+ std::string s("/a/b/c");
+ fs::path p1(s);
+ fs::path p2(s.begin(), s.end());
+ if (p1 != p2) {
+ result = false;
+ }
+ if (p1.string() != s || p2.string() != s) {
+ result = false;
+ }
+#if CM_FILESYSTEM_SOURCE_TRAITS_ITERATOR
+ std::string s2(s);
+ s2 += '\0';
+ fs::path p3(s2.begin());
+ if (p1 != p3 || p3.string() != s) {
+ result = false;
+ }
+#endif
+ }
+ {
+ std::wstring s(L"/a/b/c");
+ fs::path p1(s);
+ fs::path p2(s.begin(), s.end());
+ if (p1 != p2) {
+ result = false;
+ }
+ if (p1.wstring() != s || p2.wstring() != s) {
+ result = false;
+ }
+#if CM_FILESYSTEM_SOURCE_TRAITS_ITERATOR
+ std::wstring s2(s);
+ s2 += L'\0';
+ fs::path p3(s2.begin());
+ if (p1 != p3 || p3.wstring() != s) {
+ result = false;
+ }
+#endif
+ }
+ {
+ std::string s("/a/b/c");
+ fs::path::string_type ws;
+ for (auto c : s) {
+ ws += fs::path::value_type(c);
+ }
+ fs::path p1(ws);
+ fs::path p2(ws.begin(), ws.end());
+ if (p1 != p2) {
+ result = false;
+ }
+ if (p1.native() != ws || p2.native() != ws) {
+ result = false;
+ }
+#if CM_FILESYSTEM_SOURCE_TRAITS_ITERATOR
+ fs::path::string_type ws2(ws);
+ ws2 += fs::path::value_type('\0');
+ fs::path p3(ws2.begin());
+ if (p1 != p3 || p3.native() != ws) {
+ result = false;
+ }
+#endif
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testConcatenation()
+{
+ std::cout << "testConcatenation()";
+
+ bool result = true;
+
+ {
+ fs::path p("/a/b");
+ p /= "c";
+ if (!(p.string() == "/a/b/c" || p.string() == "/a/b\\c")) {
+ result = false;
+ }
+ p += "d";
+ if (!(p.string() == "/a/b/cd" || p.string() == "/a/b\\cd")) {
+ result = false;
+ }
+ fs::path p2("x/y");
+ p /= p2;
+ if (!(p.string() == "/a/b/cd/x/y" || p.string() == "/a/b\\cd\\x/y")) {
+ result = false;
+ }
+ p = p / p2;
+ if (!(p.string() == "/a/b/cd/x/y/x/y" ||
+ p.string() == "/a/b\\cd\\x/y\\x/y")) {
+ result = false;
+ }
+ }
+ {
+ fs::path p("a");
+ p /= "";
+ if (!(p.string() == "a/" || p.string() == "a\\")) {
+ result = false;
+ }
+ p /= "/b";
+ if (p.string() != "/b") {
+ result = false;
+ }
+ }
+#if defined(_WIN32)
+ {
+ fs::path p("a");
+ p /= "c:/b";
+ if (p.string() != "c:/b") {
+ result = false;
+ }
+ p = fs::path("a") / "c:";
+ if (p.string() != "c:") {
+ result = false;
+ }
+ p = fs::path("c:") / "";
+ if (p.string() != "c:") {
+ result = false;
+ }
+ p = fs::path("c:a") / "/b";
+ if (p.string() != "c:/b") {
+ result = false;
+ }
+ p = fs::path("c:a") / "c:b";
+ if (p.string() != "c:a\\b") {
+ result = false;
+ }
+ p = fs::path("//host") / "b";
+ if (p.string() != "//host\\b") {
+ result = false;
+ }
+ p = fs::path("//host/") / "b";
+ if (p.string() != "//host/b") {
+ result = false;
+ }
+ }
+#endif
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testModifiers()
+{
+ std::cout << "testModifiers()";
+
+ bool result = true;
+
+ {
+ std::string s("a///b/");
+ fs::path p(s);
+ std::replace(
+ s.begin(), s.end(), '/',
+ static_cast<std::string::value_type>(fs::path::preferred_separator));
+ p.make_preferred();
+ if (p.string() != s) {
+ result = false;
+ }
+ }
+ {
+ fs::path p("a/b/c.e.f");
+ p.remove_filename();
+ if (p.string() != "a/b/") {
+ result = false;
+ }
+ p.remove_filename();
+ if (p.string() != "a/b/") {
+ result = false;
+ }
+ }
+ {
+ fs::path p("a/b/c.e.f");
+ p.replace_filename("x.y");
+ if (p.string() != "a/b/x.y") {
+ result = false;
+ }
+ }
+ {
+ fs::path p("a/b/c.e.f");
+ p.replace_extension(".x");
+ if (p.string() != "a/b/c.e.x") {
+ result = false;
+ }
+ p.replace_extension(".y");
+ if (p.string() != "a/b/c.e.y") {
+ result = false;
+ }
+ p.replace_extension();
+ if (p.string() != "a/b/c.e") {
+ result = false;
+ }
+ p = "/a/b";
+ p.replace_extension(".x");
+ if (p.string() != "/a/b.x") {
+ result = false;
+ }
+ p = "/a/b/";
+ p.replace_extension(".x");
+ if (p.string() != "/a/b/.x") {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testObservers()
+{
+ std::cout << "testObservers()";
+
+ bool result = true;
+
+ {
+ std::string s("a/b/c");
+ fs::path p(s);
+ fs::path::string_type st;
+ for (auto c : s) {
+ st += static_cast<fs::path::value_type>(c);
+ }
+ if (p.native() != st || static_cast<fs::path::string_type>(p) != st ||
+ p.c_str() != st) {
+ result = false;
+ }
+ }
+ {
+ std::string s("a//b//c");
+ std::wstring ws(L"a//b//c");
+ fs::path p(s);
+ if (p.string() != s || p.wstring() != ws) {
+ result = false;
+ }
+ }
+ {
+ std::string s("a/b/c");
+ std::wstring ws;
+ for (auto c : s) {
+ ws += static_cast<std::wstring::value_type>(c);
+ }
+ std::string ns(s);
+ std::replace(
+ ns.begin(), ns.end(), '/',
+ static_cast<std::string::value_type>(fs::path::preferred_separator));
+ fs::path p(ns);
+ if (p.generic_string() != s || p.generic_wstring() != ws) {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testCompare()
+{
+ std::cout << "testCompare()";
+
+ bool result = true;
+
+ {
+ std::string s("a/b/c");
+ fs::path p1(s);
+ fs::path p2(s);
+ if (p1.compare(p2) != 0) {
+ result = false;
+ }
+ p2 = "a/b";
+ if (p1.compare(p2) <= 0) {
+ result = false;
+ }
+ p2 = "a/d";
+ if (p1.compare(p2) >= 0) {
+ result = false;
+ }
+ p2 = "a/b/d";
+ if (p1.compare(p2) >= 0) {
+ result = false;
+ }
+ p2 = "a/b/a";
+ if (p1.compare(p2) <= 0) {
+ result = false;
+ }
+ p2 = "a/b/c/d";
+ if (p1.compare(p2) >= 0) {
+ result = false;
+ }
+ p1 = "a";
+ p2 = "b";
+ if (p1.compare(p2) == 0) {
+ result = false;
+ }
+ }
+ {
+ // LWG 3096 (https://cplusplus.github.io/LWG/issue3096)
+ // fs::path p1("/a/");
+ // fs::path p2("/a/.");
+ // if (p1.compare(p2) != 0) {
+ // result = false;
+ // }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testGeneration()
+{
+ std::cout << "testGeneration()";
+
+ bool result = true;
+
+ {
+ fs::path p("a/./b/..");
+ if (p.lexically_normal().generic_string() != "a/") {
+ result = false;
+ }
+ p = "a/.///b/../";
+ if (p.lexically_normal().generic_string() != "a/") {
+ result = false;
+ }
+ }
+#if defined(_WIN32)
+ {
+ fs::path p("//host/./b/..");
+ if (p.lexically_normal().string() != "\\\\host\\") {
+ result = false;
+ }
+ p = "//host/.///b/../";
+ if (p.lexically_normal().string() != "\\\\host\\") {
+ result = false;
+ }
+ p = "c://a/.///b/../";
+ if (p.lexically_normal().string() != "c:\\a\\") {
+ result = false;
+ }
+ }
+#endif
+
+ {
+ if (fs::path("/a//d").lexically_relative("/a/b/c") != "../../d") {
+ result = false;
+ }
+ if (fs::path("/a//b///c").lexically_relative("/a/d") != "../b/c") {
+ result = false;
+ }
+ if (fs::path("a/b/c").lexically_relative("a") != "b/c") {
+ result = false;
+ }
+ if (fs::path("a/b/c").lexically_relative("a/b/c/x/y") != "../..") {
+ result = false;
+ }
+ if (fs::path("a/b/c").lexically_relative("a/b/c") != ".") {
+ result = false;
+ }
+ if (fs::path("a/b").lexically_relative("c/d") != "../../a/b") {
+ result = false;
+ }
+ }
+ {
+#if defined(_WIN32)
+ if (fs::path("/a/d").lexically_relative("e/d/c") != "/a/d") {
+ result = false;
+ }
+ if (!fs::path("c:/a/d").lexically_relative("e/d/c").empty()) {
+ result = false;
+ }
+#else
+ if (!fs::path("/a/d").lexically_relative("e/d/c").empty()) {
+ result = false;
+ }
+#endif
+ }
+ {
+#if defined(_WIN32)
+ if (fs::path("c:/a/d").lexically_proximate("e/d/c") != "c:/a/d") {
+ result = false;
+ }
+#else
+ if (fs::path("/a/d").lexically_proximate("e/d/c") != "/a/d") {
+ result = false;
+ }
+#endif
+ if (fs::path("/a/d").lexically_proximate("/a/b/c") != "../../d") {
+ result = false;
+ }
+ }
+ // LWG 3070
+ {
+#if defined(_WIN32)
+ if (!fs::path("/a:/b:").lexically_relative("/a:/c:").empty()) {
+ result = false;
+ }
+ if (fs::path("c:/a/b").lexically_relative("c:/a/d") != "../b") {
+ result = false;
+ }
+ if (!fs::path("c:/a/b:").lexically_relative("c:/a/d").empty()) {
+ result = false;
+ }
+ if (!fs::path("c:/a/b").lexically_relative("c:/a/d:").empty()) {
+ result = false;
+ }
+#else
+ if (fs::path("/a:/b:").lexically_relative("/a:/c:") != "../b:") {
+ result = false;
+ }
+#endif
+ }
+ // LWG 3096
+ {
+ if (fs::path("/a").lexically_relative("/a/.") != ".") {
+ result = false;
+ }
+ if (fs::path("/a").lexically_relative("/a/") != ".") {
+ result = false;
+ }
+ if (fs::path("a/b/c").lexically_relative("a/b/c") != ".") {
+ result = false;
+ }
+ if (fs::path("a/b/c").lexically_relative("a/b/c/") != ".") {
+ result = false;
+ }
+ if (fs::path("a/b/c").lexically_relative("a/b/c/.") != ".") {
+ result = false;
+ }
+ if (fs::path("a/b/c/").lexically_relative("a/b/c") != ".") {
+ result = false;
+ }
+ if (fs::path("a/b/c/.").lexically_relative("a/b/c") != ".") {
+ result = false;
+ }
+ if (fs::path("a/b/c/.").lexically_relative("a/b/c/") != ".") {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testDecomposition()
+{
+ std::cout << "testDecomposition()";
+
+ bool result = true;
+
+ {
+ if (!fs::path("/a/b").root_name().empty()) {
+ result = false;
+ }
+#if defined(_WIN32)
+ if (fs::path("c:/a/b").root_name() != "c:") {
+ result = false;
+ }
+ if (fs::path("c:a/b").root_name() != "c:") {
+ result = false;
+ }
+ if (fs::path("c:").root_name() != "c:") {
+ result = false;
+ }
+ if (fs::path("//host/b").root_name() != "//host") {
+ result = false;
+ }
+ if (fs::path("//host").root_name() != "//host") {
+ result = false;
+ }
+#endif
+ }
+ {
+ if (!fs::path("a/b").root_directory().empty()) {
+ result = false;
+ }
+ if (fs::path("/a/b").root_directory() != "/") {
+ result = false;
+ }
+#if defined(_WIN32)
+ if (!fs::path("c:a/b").root_directory().empty()) {
+ result = false;
+ }
+ if (fs::path("/a/b").root_directory() != "/") {
+ result = false;
+ }
+ if (fs::path("c:/a/b").root_directory() != "/") {
+ result = false;
+ }
+ if (fs::path("//host/b").root_directory() != "/") {
+ result = false;
+ }
+#endif
+ }
+ {
+ if (!fs::path("a/b").root_path().empty()) {
+ result = false;
+ }
+ if (fs::path("/a/b").root_path() != "/") {
+ result = false;
+ }
+#if defined(_WIN32)
+ if (fs::path("c:a/b").root_path() != "c:") {
+ result = false;
+ }
+ if (fs::path("/a/b").root_path() != "/") {
+ result = false;
+ }
+ if (fs::path("c:/a/b").root_path() != "c:/") {
+ result = false;
+ }
+ if (fs::path("//host/b").root_path() != "//host/") {
+ result = false;
+ }
+#endif
+ }
+ {
+ if (!fs::path("/").relative_path().empty()) {
+ result = false;
+ }
+ if (fs::path("a/b").relative_path() != "a/b") {
+ result = false;
+ }
+ if (fs::path("/a/b").relative_path() != "a/b") {
+ result = false;
+ }
+#if defined(_WIN32)
+ if (fs::path("c:a/b").relative_path() != "a/b") {
+ result = false;
+ }
+ if (fs::path("/a/b").relative_path() != "a/b") {
+ result = false;
+ }
+ if (fs::path("c:/a/b").relative_path() != "a/b") {
+ result = false;
+ }
+ if (fs::path("//host/b").relative_path() != "b") {
+ result = false;
+ }
+#endif
+ }
+ {
+ if (fs::path("/a/b").parent_path() != "/a") {
+ result = false;
+ }
+ if (fs::path("/a/b/").parent_path() != "/a/b") {
+ result = false;
+ }
+ if (fs::path("/a/b/.").parent_path() != "/a/b") {
+ result = false;
+ }
+ if (fs::path("/").parent_path() != "/") {
+ result = false;
+ }
+#if defined(_WIN32)
+ if (fs::path("c:/a/b").parent_path() != "c:/a") {
+ result = false;
+ }
+ if (fs::path("c:/").parent_path() != "c:/") {
+ result = false;
+ }
+ if (fs::path("c:").parent_path() != "c:") {
+ result = false;
+ }
+ if (fs::path("//host/").parent_path() != "//host/") {
+ result = false;
+ }
+ if (fs::path("//host").parent_path() != "//host") {
+ result = false;
+ }
+#endif
+ }
+ {
+ if (fs::path("/a/b.txt").filename() != "b.txt") {
+ result = false;
+ }
+ if (fs::path("/a/.b").filename() != ".b") {
+ result = false;
+ }
+ if (fs::path("/foo/bar/").filename() != "") {
+ result = false;
+ }
+ if (fs::path("/foo/.").filename() != ".") {
+ result = false;
+ }
+ if (fs::path("/foo/..").filename() != "..") {
+ result = false;
+ }
+ if (fs::path(".").filename() != ".") {
+ result = false;
+ }
+ if (fs::path("..").filename() != "..") {
+ result = false;
+ }
+ if (!fs::path("/").filename().empty()) {
+ result = false;
+ }
+#if defined(_WIN32)
+ if (fs::path("c:a").filename() != "a") {
+ result = false;
+ }
+ if (fs::path("c:/a").filename() != "a") {
+ result = false;
+ }
+ if (!fs::path("c:").filename().empty()) {
+ result = false;
+ }
+ if (!fs::path("c:/").filename().empty()) {
+ result = false;
+ }
+ if (!fs::path("//host").filename().empty()) {
+ result = false;
+ }
+#endif
+ }
+ {
+ if (fs::path("/a/b.txt").stem() != "b") {
+ result = false;
+ }
+ if (fs::path("/a/b.c.txt").stem() != "b.c") {
+ result = false;
+ }
+ if (fs::path("/a/.b").stem() != ".b") {
+ result = false;
+ }
+ if (fs::path("/a/b").stem() != "b") {
+ result = false;
+ }
+ if (fs::path("/a/b/.").stem() != ".") {
+ result = false;
+ }
+ if (fs::path("/a/b/..").stem() != "..") {
+ result = false;
+ }
+ if (!fs::path("/a/b/").stem().empty()) {
+ result = false;
+ }
+#if defined(_WIN32)
+ if (!fs::path("c:/a/b/").stem().empty()) {
+ result = false;
+ }
+ if (!fs::path("c:/").stem().empty()) {
+ result = false;
+ }
+ if (!fs::path("c:").stem().empty()) {
+ result = false;
+ }
+ if (!fs::path("//host/").stem().empty()) {
+ result = false;
+ }
+ if (!fs::path("//host").stem().empty()) {
+ result = false;
+ }
+#endif
+ }
+ {
+ if (fs::path("/a/b.txt").extension() != ".txt") {
+ result = false;
+ }
+ if (fs::path("/a/b.").extension() != ".") {
+ result = false;
+ }
+ if (!fs::path("/a/b").extension().empty()) {
+ result = false;
+ }
+ if (fs::path("/a/b.txt/b.cc").extension() != ".cc") {
+ result = false;
+ }
+ if (fs::path("/a/b.txt/b.").extension() != ".") {
+ result = false;
+ }
+ if (!fs::path("/a/b.txt/b").extension().empty()) {
+ result = false;
+ }
+ if (!fs::path("/a/.").extension().empty()) {
+ result = false;
+ }
+ if (!fs::path("/a/..").extension().empty()) {
+ result = false;
+ }
+ if (!fs::path("/a/.hidden").extension().empty()) {
+ result = false;
+ }
+ if (fs::path("/a/..b").extension() != ".b") {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testQueries()
+{
+ std::cout << "testQueries()";
+
+ bool result = true;
+
+ {
+ if (fs::path("/a/b").has_root_name()) {
+ result = false;
+ }
+ fs::path p("/a/b");
+ if (!p.has_root_directory() || !p.has_root_path()) {
+ result = false;
+ }
+ if (!fs::path("/a/b").has_root_path() || fs::path("a/b").has_root_path()) {
+ result = false;
+ }
+ if (!fs::path("/a/b").has_relative_path() ||
+ fs::path("/").has_relative_path()) {
+ result = false;
+ }
+ if (!fs::path("/a/b").has_parent_path() ||
+ !fs::path("/").has_parent_path() || fs::path("a").has_parent_path()) {
+ result = false;
+ }
+ if (!fs::path("/a/b").has_filename() || !fs::path("a.b").has_filename() ||
+ fs::path("/a/").has_filename() || fs::path("/").has_filename()) {
+ result = false;
+ }
+ if (!fs::path("/a/b").has_stem() || !fs::path("a.b").has_stem() ||
+ !fs::path("/.a").has_stem() || fs::path("/a/").has_stem() ||
+ fs::path("/").has_stem()) {
+ result = false;
+ }
+ if (!fs::path("/a/b.c").has_extension() ||
+ !fs::path("a.b").has_extension() || fs::path("/.a").has_extension() ||
+ fs::path("/a/").has_extension() || fs::path("/").has_extension()) {
+ result = false;
+ }
+#if defined(_WIN32)
+ p = "c:/a/b";
+ if (!fs::path("c:/a/b").has_root_name() || !p.has_root_directory() ||
+ !p.has_root_path()) {
+ result = false;
+ }
+ p = "c:a/b";
+ if (!p.has_root_name() || p.has_root_directory() || !p.has_root_path()) {
+ result = false;
+ }
+ p = "//host/b";
+ if (!p.has_root_name() || !p.has_root_directory() || !p.has_root_path()) {
+ result = false;
+ }
+ p = "//host";
+ if (!p.has_root_name() || p.has_root_directory() || !p.has_root_path()) {
+ result = false;
+ }
+ if (!fs::path("c:/a/b").has_relative_path() ||
+ !fs::path("c:a/b").has_relative_path() ||
+ !fs::path("//host/b").has_relative_path()) {
+ result = false;
+ }
+ if (!fs::path("c:/a/b").has_parent_path() ||
+ !fs::path("c:/").has_parent_path() ||
+ !fs::path("c:").has_parent_path() ||
+ !fs::path("//host/").has_parent_path() ||
+ !fs::path("//host").has_parent_path()) {
+ result = false;
+ }
+#endif
+ }
+ {
+#if defined(_WIN32)
+ fs::path p("c:/a");
+#else
+ fs::path p("/a");
+#endif
+ if (!p.is_absolute() || p.is_relative()) {
+ result = false;
+ }
+ p = "a/b";
+ if (p.is_absolute() || !p.is_relative()) {
+ result = false;
+ }
+#if defined(_WIN32)
+ p = "c:/a/b";
+ if (!p.is_absolute() || p.is_relative()) {
+ result = false;
+ }
+ p = "//host/b";
+ if (!p.is_absolute() || p.is_relative()) {
+ result = false;
+ }
+ p = "/a";
+ if (p.is_absolute() || !p.is_relative()) {
+ result = false;
+ }
+ p = "c:a";
+ if (p.is_absolute() || !p.is_relative()) {
+ result = false;
+ }
+#endif
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testIterators()
+{
+ std::cout << "testIterators()";
+
+ bool result = true;
+
+ {
+ fs::path p("/a/b/");
+#if defined(_WIN32)
+ std::vector<fs::path::string_type> ref{ L"/", L"a", L"b", L"" };
+#else
+ std::vector<fs::path::string_type> ref{ "/", "a", "b", "" };
+#endif
+ std::vector<fs::path::string_type> res;
+ for (auto i = p.begin(), e = p.end(); i != e; ++i) {
+ res.push_back(*i);
+ }
+ if (res != ref) {
+ result = false;
+ }
+ res.clear();
+ for (const auto& e : p) {
+ res.push_back(e);
+ }
+ if (res != ref) {
+ result = false;
+ }
+ }
+ {
+ fs::path p("/a/b/");
+#if defined(_WIN32)
+ std::vector<fs::path::string_type> ref{ L"", L"b", L"a", L"/" };
+#else
+ std::vector<fs::path::string_type> ref{ "", "b", "a", "/" };
+#endif
+ std::vector<fs::path::string_type> res;
+ auto i = p.end(), b = p.begin();
+ do {
+ res.push_back(*--i);
+ } while (i != b);
+ if (res != ref) {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+
+bool testNonMemberFunctions()
+{
+ std::cout << "testNonMemberFunctions()";
+
+ bool result = true;
+
+ {
+ fs::path p1("/a/b/");
+ fs::path p2("/c/d");
+ fs::swap(p1, p2);
+ if (p1.string() != "/c/d" || p2.string() != "/a/b/")
+ result = false;
+ }
+ {
+ auto h1 = fs::hash_value(fs::path("/a//b//"));
+ auto h2 = fs::hash_value(fs::path("/a/b/"));
+ if (h1 != h2)
+ result = false;
+ }
+ {
+ fs::path p1("/a/b/");
+ fs::path p2("/c/d");
+ if (p1 == p2)
+ result = false;
+ p1 = "/a//b//";
+ p2 = "/a/b/";
+ if (p1 != p2)
+ result = false;
+ }
+ {
+ fs::path p = "/a";
+ p = p / "b" / "c";
+ if (p.generic_string() != "/a/b/c") {
+ result = false;
+ }
+ fs::path::string_type ref;
+ ref += fs::path::value_type('/');
+ ref += fs::path::value_type('a');
+ ref += fs::path::preferred_separator;
+ ref += fs::path::value_type('b');
+ ref += fs::path::preferred_separator;
+ ref += fs::path::value_type('c');
+ if (p.native() != ref) {
+ result = false;
+ }
+ }
+ {
+ fs::path p("/a b\\c/");
+ std::ostringstream oss;
+ oss << p;
+ if (oss.str() != "\"/a b\\\\c/\"") {
+ result = false;
+ }
+ std::istringstream iss(oss.str());
+ fs::path p2;
+ iss >> p2;
+ if (p2 != p) {
+ result = false;
+ }
+ }
+
+ checkResult(result);
+
+ return result;
+}
+}
+
+int testCMFilesystemPath(int /*unused*/, char* /*unused*/ [])
+{
+ int result = 0;
+
+ if (!testConstructors()) {
+ result = 1;
+ }
+ if (!testConcatenation()) {
+ result = 1;
+ }
+ if (!testModifiers()) {
+ result = 1;
+ }
+ if (!testObservers()) {
+ result = 1;
+ }
+ if (!testCompare()) {
+ result = 1;
+ }
+ if (!testGeneration()) {
+ result = 1;
+ }
+ if (!testDecomposition()) {
+ result = 1;
+ }
+ if (!testQueries()) {
+ result = 1;
+ }
+ if (!testIterators()) {
+ result = 1;
+ }
+ if (!testNonMemberFunctions()) {
+ result = 1;
+ }
+
+ return result;
+}
diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect
index c19ee94..970adaa 100644
--- a/Tests/CMakeLib/testRST.expect
+++ b/Tests/CMakeLib/testRST.expect
@@ -5,7 +5,7 @@ Command ``some_cmd()`` explicit cmake domain.
Command ``some_cmd()`` without target.
Command ``some_cmd`` with target.
Command ``some_cmd_<cmd>()`` placeholder without target.
-Command ``some_cmd_<cmd>`` placholder with target.
+Command ``some_cmd_<cmd>`` placeholder with target.
Command ``some_cmd()`` with parens.
Command ``some_cmd(SUB)`` with subcommand.
Command ``some_cmd(SUB)`` with subcommand and target.
diff --git a/Tests/CMakeLib/testRST.rst b/Tests/CMakeLib/testRST.rst
index d2d1140..6462f1b 100644
--- a/Tests/CMakeLib/testRST.rst
+++ b/Tests/CMakeLib/testRST.rst
@@ -12,7 +12,7 @@ Command :cmake:command:`some_cmd` explicit cmake domain.
Command :command:`some_cmd` without target.
Command :command:`some_cmd <some_cmd>` with target.
Command :command:`some_cmd_<cmd>` placeholder without target.
-Command :command:`some_cmd_<cmd> <some_cmd>` placholder with target.
+Command :command:`some_cmd_<cmd> <some_cmd>` placeholder with target.
Command :command:`some_cmd()` with parens.
Command :command:`some_cmd(SUB)` with subcommand.
Command :command:`some_cmd(SUB) <some_cmd>` with subcommand and target.
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index db6dbf3..e4e09fa 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -206,6 +206,26 @@ if(BUILD_TESTING)
set(${reg} 0)
endif()
endforeach()
+ if(COMMAND cmake_host_system_information)
+ set(info_vs15 "VS_15_DIR")
+ set(info_vs16 "VS_16_DIR")
+ set(vs_versions)
+ if(WIN32)
+ if(NOT CMAKE_VERSION VERSION_LESS 3.14)
+ set(vs_versions vs15 vs16)
+ elseif(NOT CMAKE_VERSION VERSION_LESS 3.8)
+ set(vs_versions vs15)
+ endif()
+ endif()
+ foreach(info ${vs_versions})
+ cmake_host_system_information(RESULT found QUERY "${info_${info}}")
+ if(found)
+ set(${info} 1)
+ else()
+ set(${info} 0)
+ endif()
+ endforeach()
+ endif()
endif()
#---------------------------------------------------------------------------
@@ -697,38 +717,28 @@ if(BUILD_TESTING)
# build the "Simple" test with the ExtraGenerators, if available
# This doesn't test whether the generated project files work (unfortunately),
# mainly it tests that cmake doesn't crash when generating these project files.
- if(${CMAKE_GENERATOR} MATCHES "Unix Makefiles" OR ${CMAKE_GENERATOR} MATCHES "Ninja")
-
- # check which generators we have
- execute_process(COMMAND ${CMAKE_CMAKE_COMMAND} --help
- OUTPUT_VARIABLE cmakeOutput ERROR_VARIABLE cmakeOutput)
-
- set(extraGenerators
- "CodeBlocks"
- "CodeLite"
- "Eclipse CDT4"
- "Kate"
- "Sublime Text 2")
-
- foreach(extraGenerator ${extraGenerators})
- if ("${cmakeOutput}" MATCHES "${extraGenerator} - ${CMAKE_GENERATOR}")
- set(extraGeneratorTestName "Simple_${extraGenerator}Generator")
- string(REPLACE " " "" extraGeneratorTestName ${extraGeneratorTestName})
-
- add_test(${extraGeneratorTestName} ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/Simple"
- "${CMake_BINARY_DIR}/Tests/${extraGeneratorTestName}"
- --build-two-config
- --build-generator "${extraGenerator} - ${CMAKE_GENERATOR}"
- --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}"
- --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
- --build-project Simple
- --test-command Simple)
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${extraGeneratorTestName}")
- endif ()
- endforeach(extraGenerator)
-
+ if(CMAKE_GENERATOR MATCHES "^(Unix Makefiles|Ninja)$"
+ AND NOT "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
+ foreach(extraGenerator
+ "CodeBlocks"
+ "CodeLite"
+ "Eclipse CDT4"
+ "Kate"
+ "Sublime Text 2"
+ )
+ string(REPLACE " " "" extraGeneratorTestName "Simple_${extraGenerator}Generator")
+ add_test(${extraGeneratorTestName} ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/Simple"
+ "${CMake_BINARY_DIR}/Tests/${extraGeneratorTestName}"
+ --build-two-config
+ --build-generator "${extraGenerator} - ${CMAKE_GENERATOR}"
+ --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}"
+ --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
+ --build-project Simple
+ --test-command Simple)
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${extraGeneratorTestName}")
+ endforeach()
endif()
# test for correct sub-project generation
@@ -1451,6 +1461,7 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
Patch
PostgreSQL
Protobuf
+ SDL
SQLite3
TIFF
Vulkan
@@ -2315,32 +2326,41 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
endforeach()
endif()
+ macro(add_test_VSAndroid name generator platform)
+ add_test(NAME "VSAndroid.${name}.${platform}" COMMAND ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/VSAndroid"
+ "${CMake_BINARY_DIR}/Tests/VSAndroid/${name}/${platform}"
+ --build-generator "${generator}"
+ --build-project VSAndroid
+ --build-config $<CONFIGURATION>
+ --build-options -DCMAKE_SYSTEM_NAME=Android "-A${platform}"
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSAndroid/${name}")
+ endmacro()
if(tegra AND NOT "${CMake_SOURCE_DIR};${CMake_BINARY_DIR}" MATCHES " ")
- macro(add_test_VSNsightTegra name generator)
- add_test(NAME VSNsightTegra.${name} COMMAND ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/VSNsightTegra"
- "${CMake_BINARY_DIR}/Tests/VSNsightTegra/${name}"
- --build-generator "${generator}"
- --build-project VSNsightTegra
- --build-config $<CONFIGURATION>
- --build-options -DCMAKE_SYSTEM_NAME=Android
- )
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSNsightTegra/${name}")
- endmacro()
if(vs10)
- add_test_VSNsightTegra(vs10 "Visual Studio 10 2010")
+ add_test_VSAndroid(vs10 "Visual Studio 10 2010" "Tegra-Android")
endif()
if(vs11)
- add_test_VSNsightTegra(vs11 "Visual Studio 11 2012")
+ add_test_VSAndroid(vs11 "Visual Studio 11 2012" "Tegra-Android")
endif()
if(vs12)
- add_test_VSNsightTegra(vs12 "Visual Studio 12 2013")
+ add_test_VSAndroid(vs12 "Visual Studio 12 2013" "Tegra-Android")
endif()
if(vs14)
- add_test_VSNsightTegra(vs14 "Visual Studio 14 2015")
+ add_test_VSAndroid(vs14 "Visual Studio 14 2015" "Tegra-Android")
endif()
endif()
+ if(vs14 AND CMake_TEST_ANDROID_VS14)
+ add_test_VSAndroid(vs14 "Visual Studio 14 2015" "ARM")
+ endif()
+ if(vs15 AND CMake_TEST_ANDROID_VS15)
+ add_test_VSAndroid(vs15 "Visual Studio 15 2017" "ARM")
+ endif()
+ if(vs16 AND CMake_TEST_ANDROID_VS16)
+ add_test_VSAndroid(vs16 "Visual Studio 16 2019" "ARM")
+ endif()
if (APPLE)
if (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
@@ -2397,36 +2417,6 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleGeneratorTest")
endif()
- add_test(WarnUnusedUnusedViaSet ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/VariableUnusedViaSet"
- "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaSet"
- ${build_generator_args}
- --build-noclean
- --build-project WarnUnusedUnusedViaSet
- --build-options
- "--warn-unused-vars")
- set_tests_properties(WarnUnusedUnusedViaSet PROPERTIES
- PASS_REGULAR_EXPRESSION "unused variable \\(changing definition\\) 'UNUSED_VARIABLE'")
- set_tests_properties(WarnUnusedUnusedViaSet PROPERTIES
- FAIL_REGULAR_EXPRESSION "unused variable \\(unsetting\\) 'UNUSED_VARIABLE'")
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaSet")
-
- add_test(WarnUnusedUnusedViaUnset ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/VariableUnusedViaUnset"
- "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaUnset"
- ${build_generator_args}
- --build-noclean
- --build-project WarnUnusedUnusedViaUnset
- --build-options
- "--warn-unused-vars")
- set_tests_properties(WarnUnusedUnusedViaUnset PROPERTIES
- PASS_REGULAR_EXPRESSION "CMake Warning \\(dev\\) at CMakeLists.txt:7 \\(set\\):")
- set_tests_properties(WarnUnusedUnusedViaUnset PROPERTIES
- FAIL_REGULAR_EXPRESSION "CMakeLists.txt:5 \\(set\\):")
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaUnset")
-
add_test(WarnUnusedCliUnused ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/WarnUnusedCliUnused"
@@ -2916,7 +2906,7 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
PASS_REGULAR_EXPRESSION "Failed")
else()
set_tests_properties(CTestTestCrash PROPERTIES
- PASS_REGULAR_EXPRESSION "(Illegal|SegFault|Child aborted)")
+ PASS_REGULAR_EXPRESSION "(Illegal|SegFault|Subprocess aborted)")
endif()
configure_file(
@@ -3250,6 +3240,7 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
COMMAND ${CMAKE_CMAKE_COMMAND}
-D "bootstrap=${bootstrap}"
-D "bin_dir=${CMake_BINARY_DIR}/Tests/BootstrapTest"
+ -D "generator=${CMAKE_GENERATOR}"
-P ${CMAKE_CURRENT_SOURCE_DIR}/BootstrapTest.cmake
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BootstrapTest")
diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt
index e32d693..348e6d0 100644
--- a/Tests/CMakeTests/CMakeLists.txt
+++ b/Tests/CMakeTests/CMakeLists.txt
@@ -35,7 +35,7 @@ AddCMakeTest(CMakeHostSystemInformation "")
AddCMakeTest(FileDownload "")
set_tests_properties(CMake.FileDownload PROPERTIES
PASS_REGULAR_EXPRESSION "file already exists with expected MD5 sum"
- FAIL_REGULAR_EXPRESSION "Unexpected status"
+ FAIL_REGULAR_EXPRESSION "Unexpected status|incorrectly interpreted"
)
AddCMakeTest(FileDownloadBadHash "")
set_property(TEST CMake.FileDownloadBadHash PROPERTY
diff --git a/Tests/CMakeTests/FileDownloadTest.cmake.in b/Tests/CMakeTests/FileDownloadTest.cmake.in
index 76c0000..69d9a14 100644
--- a/Tests/CMakeTests/FileDownloadTest.cmake.in
+++ b/Tests/CMakeTests/FileDownloadTest.cmake.in
@@ -163,3 +163,16 @@ __reportIfWrongStatus("${status}" 0)
if(NOT EXISTS file12.png)
message(SEND_ERROR "file12.png not downloaded: ${status}")
endif()
+
+message(STATUS "FileDownload:13")
+file(DOWNLOAD
+ ${url}
+ TIMEOUT ${timeout}
+ STATUS status
+ )
+__reportIfWrongStatus("${status}" 0)
+if(EXISTS TIMEOUT)
+ file(REMOVE TIMEOUT)
+ message(SEND_ERROR "TIMEOUT argument was incorrectly interpreted as a filename")
+endif()
+message(STATUS "${status}")
diff --git a/Tests/CMakeTests/FileTestScript.cmake b/Tests/CMakeTests/FileTestScript.cmake
index 145f28a..fc3c28a 100644
--- a/Tests/CMakeTests/FileTestScript.cmake
+++ b/Tests/CMakeTests/FileTestScript.cmake
@@ -10,7 +10,7 @@ elseif(testname STREQUAL different_not_enough_args) # fail
file(DIFFERENT ffff)
elseif(testname STREQUAL download_not_enough_args) # fail
- file(DOWNLOAD ffff)
+ file(DOWNLOAD)
elseif(testname STREQUAL read_not_enough_args) # fail
file(READ ffff)
@@ -181,7 +181,7 @@ elseif(testname STREQUAL to_native_path) # pass
message("v='${v}'")
elseif(testname STREQUAL download_wrong_number_of_args) # fail
- file(DOWNLOAD zzzz://bogus/ffff)
+ file(DOWNLOAD)
elseif(testname STREQUAL download_file_with_no_path) # pass
file(DOWNLOAD zzzz://bogus/ffff ffff)
diff --git a/Tests/COnly/CMakeLists.txt b/Tests/COnly/CMakeLists.txt
index 20615fe..1c24017 100644
--- a/Tests/COnly/CMakeLists.txt
+++ b/Tests/COnly/CMakeLists.txt
@@ -1,5 +1,5 @@
# a simple C only test case
-cmake_minimum_required (VERSION 2.6)
+cmake_minimum_required(VERSION 2.8.12)
project (COnly C)
set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index 253d128..f3d3ad0 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -88,12 +88,14 @@ if(CPackGen MATCHES "DragNDrop")
set(expected_file_mask "${CPackComponentsForAll_BINARY_DIR}/MyLib-*.dmg")
if(${CPackComponentWay} STREQUAL "default")
set(expected_count 1)
+ set(expect_dmg_sla 1)
elseif(${CPackComponentWay} STREQUAL "OnePackPerGroup")
set(expected_count 3)
elseif(${CPackComponentWay} STREQUAL "IgnoreGroup")
set(expected_count 4)
elseif(${CPackComponentWay} STREQUAL "AllInOne")
set(expected_count 1)
+ set(expect_dmg_sla 1)
endif()
endif()
@@ -138,6 +140,36 @@ if(expected_file_mask)
if(NOT actual_count EQUAL expected_count)
message(FATAL_ERROR "error: expected_count=${expected_count} does not match actual_count=${actual_count}: CPackComponents test fails. (CPack_output=${CPack_output}, CPack_error=${CPack_error})")
endif()
+
+ if(expect_dmg_sla)
+ execute_process(COMMAND hdiutil udifderez -xml "${expected_file}" OUTPUT_VARIABLE out ERROR_VARIABLE err RESULT_VARIABLE res)
+ if(NOT res EQUAL 0)
+ string(REPLACE "\n" "\n " err " ${err}")
+ message(FATAL_ERROR "error: running 'hdiutil udifderez -xml' on\n ${expected_file}\nfailed with:\n${err}")
+ endif()
+ foreach(key "LPic" "STR#" "TEXT")
+ if(NOT out MATCHES "<key>${key}</key>")
+ string(REPLACE "\n" "\n " out " ${out}")
+ message(FATAL_ERROR "error: running 'hdiutil udifderez -xml' on\n ${expected_file}\ndid not show '${key}' key:\n${out}")
+ endif()
+ endforeach()
+ foreach(line
+ # LPic first and last base64 lines
+ "\tAAIAEQADAAEAAAAAAAIAAAAIAAMAAAABAAQAAAAEAAUAAAAOAAYA\n"
+ "\tAA0AAABbAAQAAAAzAA8AAQAMABAAAAALAA4AAA==\n"
+ # STR# first and last base64 lines
+ "\tAAkHRW5nbGlzaAVBZ3JlZQhEaXNhZ3JlZQVQcmludAdTYXZlLi4u\n"
+ "\tdGVkIGEgcHJpbnRlci4=\n"
+ # TEXT first and last base64 lines
+ "\tTElDRU5TRQ0tLS0tLS0tDVRoaXMgaXMgYW4gaW5zdGFsbGVyIGNy\n"
+ "\tTm8gbGljZW5zZSBwcm92aWRlZC4NDQ==\n"
+ )
+ if(NOT out MATCHES "${line}")
+ string(REPLACE "\n" "\n " out " ${out}")
+ message(FATAL_ERROR "error: running 'hdiutil udifderez -xml' on\n ${expected_file}\ndid not show '${line}':\n${out}")
+ endif()
+ endforeach()
+ endif()
endif()
# Validate content
diff --git a/Tests/CSharpOnly/CMakeLists.txt b/Tests/CSharpOnly/CMakeLists.txt
index 42cbe2e..195af05 100644
--- a/Tests/CSharpOnly/CMakeLists.txt
+++ b/Tests/CSharpOnly/CMakeLists.txt
@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 3.3)
# a simple CSharp only test case
project (CSharpOnly CSharp)
diff --git a/Tests/Cuda/MixedStandardLevels4/lib.cpp b/Tests/Cuda/MixedStandardLevels4/lib.cpp
index ef6fc20..2a65c77 100644
--- a/Tests/Cuda/MixedStandardLevels4/lib.cpp
+++ b/Tests/Cuda/MixedStandardLevels4/lib.cpp
@@ -3,7 +3,7 @@
constexpr int func(int A, int B)
{
#if defined(_MSC_VER) && _MSC_VER < 1913
- // no suppport for extended constexpr
+ // no support for extended constexpr
return B * A;
#else
// Verify that we have at least c++14
diff --git a/Tests/CudaOnly/DontResolveDeviceSymbols/file1.cu b/Tests/CudaOnly/DontResolveDeviceSymbols/file1.cu
index 3924f67..90c70e2 100644
--- a/Tests/CudaOnly/DontResolveDeviceSymbols/file1.cu
+++ b/Tests/CudaOnly/DontResolveDeviceSymbols/file1.cu
@@ -61,7 +61,7 @@ int file1_launch_kernel()
err = cudaGetLastError();
std::cout << err << " " << cudaGetErrorString(err) << std::endl;
if (err == cudaSuccess) {
- // This kernel launch should failed as the device linking never occured
+ // This kernel launch should failed as the device linking never occurred
std::cerr << "file1_kernel: kernel launch should have failed" << std::endl;
return 1;
}
diff --git a/Tests/CxxOnly/CMakeLists.txt b/Tests/CxxOnly/CMakeLists.txt
index 8207dd1..09689cb 100644
--- a/Tests/CxxOnly/CMakeLists.txt
+++ b/Tests/CxxOnly/CMakeLists.txt
@@ -1,4 +1,5 @@
# a simple CXX only test case
+cmake_minimum_required(VERSION 2.8.12)
project (CxxOnly CXX)
set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")
diff --git a/Tests/ExportImport/Export/Interface/CMakeLists.txt b/Tests/ExportImport/Export/Interface/CMakeLists.txt
index 43b7217..ba2164b 100644
--- a/Tests/ExportImport/Export/Interface/CMakeLists.txt
+++ b/Tests/ExportImport/Export/Interface/CMakeLists.txt
@@ -1,11 +1,26 @@
-
-add_library(headeronly INTERFACE)
+set(headeronly_headers headeronly/headeronly.h)
+add_library(headeronly INTERFACE ${headeronly_headers})
set_property(TARGET headeronly PROPERTY INTERFACE_INCLUDE_DIRECTORIES
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/headeronly>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include/headeronly>"
)
set_property(TARGET headeronly PROPERTY INTERFACE_COMPILE_DEFINITIONS "HEADERONLY_DEFINE")
+add_custom_command(OUTPUT headergen/headergen.h
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_CURRENT_SOURCE_DIR}/headergen.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/headergen/headergen.h
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/headergen.h.in
+ VERBATIM)
+
+add_library(headergen INTERFACE headergen/headergen.h)
+set_property(TARGET headergen PROPERTY INTERFACE_INCLUDE_DIRECTORIES
+ "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/headergen>"
+)
+set_property(TARGET headergen PROPERTY PUBLIC_HEADER
+ ${CMAKE_CURRENT_BINARY_DIR}/headergen/headergen.h)
+
add_library(pch_iface INTERFACE)
target_precompile_headers(pch_iface INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pch/pch.h>"
@@ -54,6 +69,11 @@ install(TARGETS headeronly sharediface use_auto_type use_c_restrict source_targe
pch_iface cmakeonly
EXPORT expInterface
)
+install(TARGETS headergen
+ EXPORT expInterface
+ PUBLIC_HEADER DESTINATION include/headergen
+ INCLUDES DESTINATION include/headergen
+)
install(TARGETS sharedlib
EXPORT expInterface
RUNTIME DESTINATION bin
@@ -63,7 +83,7 @@ install(TARGETS sharedlib
BUNDLE DESTINATION Applications
)
install(FILES
- headeronly/headeronly.h
+ ${headeronly_headers}
DESTINATION include/headeronly
)
install(FILES
diff --git a/Tests/ExportImport/Export/Interface/headergen.h.in b/Tests/ExportImport/Export/Interface/headergen.h.in
new file mode 100644
index 0000000..bda2b81
--- /dev/null
+++ b/Tests/ExportImport/Export/Interface/headergen.h.in
@@ -0,0 +1 @@
+#define HEADERGEN_H
diff --git a/Tests/ExportImport/Import/Interface/CMakeLists.txt b/Tests/ExportImport/Import/Interface/CMakeLists.txt
index ef666b1..202c23e 100644
--- a/Tests/ExportImport/Import/Interface/CMakeLists.txt
+++ b/Tests/ExportImport/Import/Interface/CMakeLists.txt
@@ -12,6 +12,9 @@ set_property(TARGET define_iface PROPERTY
add_executable(headeronlytest_bld headeronlytest.cpp)
target_link_libraries(headeronlytest_bld bld::headeronly)
+add_executable(headergentest_bld headergentest.cpp)
+target_link_libraries(headergentest_bld bld::headergen)
+
set_property(TARGET bld::sharediface APPEND PROPERTY INTERFACE_LINK_LIBRARIES define_iface)
add_executable(interfacetest_bld interfacetest.cpp)
@@ -93,6 +96,9 @@ target_compile_definitions(source_target_test_exp PRIVATE USE_FROM_INSTALL_DIR)
add_executable(headeronlytest_exp headeronlytest.cpp)
target_link_libraries(headeronlytest_exp exp::headeronly)
+add_executable(headergentest_exp headergentest.cpp)
+target_link_libraries(headergentest_exp exp::headergen)
+
set_property(TARGET exp::sharediface APPEND PROPERTY INTERFACE_LINK_LIBRARIES define_iface)
add_executable(interfacetest_exp interfacetest.cpp)
diff --git a/Tests/ExportImport/Import/Interface/headergentest.cpp b/Tests/ExportImport/Import/Interface/headergentest.cpp
new file mode 100644
index 0000000..88ff7f1
--- /dev/null
+++ b/Tests/ExportImport/Import/Interface/headergentest.cpp
@@ -0,0 +1,11 @@
+
+#include "headergen.h"
+
+#ifndef HEADERGEN_H
+# error Expected HEADERGEN_H
+#endif
+
+int main()
+{
+ return 0;
+}
diff --git a/Tests/FindPackageModeMakefileTest/Makefile.in b/Tests/FindPackageModeMakefileTest/Makefile.in
index 5ef67d0..af9fa96 100644
--- a/Tests/FindPackageModeMakefileTest/Makefile.in
+++ b/Tests/FindPackageModeMakefileTest/Makefile.in
@@ -24,7 +24,7 @@ main.o: clean main.cpp
pngtest: main.o
@$(CMAKE_FOO) -DMODE=LINK >$(tmp)
@foo="`cat $(tmp)`"; \
- printf '"%s" %s %s -o pngtest main.o %s\n' $(CMAKE_CXX_COMPILER) "$(CMAKE_CXX_FLAGS)" "$(LDFLAGS)" "$$foo" >$(tmp)
+ printf '"%s" %s %s %s -o pngtest main.o %s\n' $(CMAKE_CXX_COMPILER) "$(CMAKE_CXX_FLAGS)" "$(__EXTRA_OSX_SYSROOT_FLAGS)" "$(LDFLAGS)" "$$foo" >$(tmp)
@cat $(tmp)
@sh $(tmp)
@rm -f $(tmp)
diff --git a/Tests/FindSDL/CMakeLists.txt b/Tests/FindSDL/CMakeLists.txt
new file mode 100644
index 0000000..e786204
--- /dev/null
+++ b/Tests/FindSDL/CMakeLists.txt
@@ -0,0 +1,10 @@
+add_test(NAME FindSDL.Test COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindSDL/Test"
+ "${CMake_BINARY_DIR}/Tests/FindSDL/Test"
+ ${build_generator_args}
+ --build-project TestFindSDL
+ --build-options ${build_options}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
diff --git a/Tests/FindSDL/Test/CMakeLists.txt b/Tests/FindSDL/Test/CMakeLists.txt
new file mode 100644
index 0000000..61d4f4b
--- /dev/null
+++ b/Tests/FindSDL/Test/CMakeLists.txt
@@ -0,0 +1,19 @@
+cmake_minimum_required(VERSION 3.1)
+project(TestFindSDL C)
+include(CTest)
+
+find_package(SDL)
+
+add_definitions(
+ -DCMAKE_EXPECTED_SDL_VERSION_MAJOR=${SDL_VERSION_MAJOR}
+ -DCMAKE_EXPECTED_SDL_VERSION_MINOR=${SDL_VERSION_MINOR}
+ -DCMAKE_EXPECTED_SDL_VERSION_PATCH=${SDL_VERSION_PATCH})
+
+add_executable(test_sdl_tgt main.c)
+target_link_libraries(test_sdl_tgt SDL::SDL)
+add_test(NAME test_sdl_tgt COMMAND test_sdl_tgt)
+
+add_executable(test_sdl_var main.c)
+target_include_directories(test_sdl_var PRIVATE ${SDL_INCLUDE_DIRS})
+target_link_libraries(test_sdl_var PRIVATE ${SDL_LIBRARIES})
+add_test(NAME test_sdl_var COMMAND test_sdl_var)
diff --git a/Tests/FindSDL/Test/main.c b/Tests/FindSDL/Test/main.c
new file mode 100644
index 0000000..057289c
--- /dev/null
+++ b/Tests/FindSDL/Test/main.c
@@ -0,0 +1,18 @@
+#include <SDL.h>
+
+int main()
+{
+ // Test 1 requires headers only.
+ SDL_version compiled;
+ SDL_VERSION(&compiled);
+ if (compiled.major != CMAKE_EXPECTED_SDL_VERSION_MAJOR ||
+ compiled.minor != CMAKE_EXPECTED_SDL_VERSION_MINOR ||
+ compiled.patch != CMAKE_EXPECTED_SDL_VERSION_PATCH)
+ return 1;
+
+ // Test 2 requires to link to the library.
+ if (SDL_WasInit(SDL_INIT_VIDEO | SDL_INIT_AUDIO) != 0)
+ return 2;
+
+ return 0;
+}
diff --git a/Tests/FindTIFF/Test/CMakeLists.txt b/Tests/FindTIFF/Test/CMakeLists.txt
index 85453ed..e235db3 100644
--- a/Tests/FindTIFF/Test/CMakeLists.txt
+++ b/Tests/FindTIFF/Test/CMakeLists.txt
@@ -1,14 +1,23 @@
cmake_minimum_required(VERSION 3.1)
-project(TestFindTIFF C)
+project(TestFindTIFF)
include(CTest)
-find_package(TIFF REQUIRED)
+find_package(TIFF REQUIRED COMPONENTS CXX)
add_executable(test_tiff_tgt main.c)
target_link_libraries(test_tiff_tgt TIFF::TIFF)
add_test(NAME test_tiff_tgt COMMAND test_tiff_tgt)
+add_executable(test_tiffxx_tgt main.cxx)
+target_link_libraries(test_tiffxx_tgt TIFF::CXX)
+add_test(NAME test_tiffxx_tgt COMMAND test_tiffxx_tgt)
+
add_executable(test_tiff_var main.c)
target_include_directories(test_tiff_var PRIVATE ${TIFF_INCLUDE_DIRS})
target_link_libraries(test_tiff_var PRIVATE ${TIFF_LIBRARIES})
add_test(NAME test_tiff_var COMMAND test_tiff_var)
+
+add_executable(test_tiffxx_var main.cxx)
+target_include_directories(test_tiffxx_var PRIVATE ${TIFF_INCLUDE_DIRS})
+target_link_libraries(test_tiffxx_var PRIVATE ${TIFF_LIBRARIES})
+add_test(NAME test_tiffxx_var COMMAND test_tiffxx_var)
diff --git a/Tests/FindTIFF/Test/main.cxx b/Tests/FindTIFF/Test/main.cxx
new file mode 100644
index 0000000..f80a31f
--- /dev/null
+++ b/Tests/FindTIFF/Test/main.cxx
@@ -0,0 +1,16 @@
+#include <fstream>
+
+#include <assert.h>
+#include <tiffio.hxx>
+
+int main()
+{
+ /* Without any TIFF file to open, test that the call fails as
+ expected. This tests that linking worked. */
+ TIFF* tiff = TIFFOpen("invalid.tiff", "r");
+ assert(!tiff);
+
+ std::ifstream s;
+ TIFF* tiffxx = TIFFStreamOpen("invalid.tiff", &s);
+ return 0;
+}
diff --git a/Tests/FindVulkan/Test/CMakeLists.txt b/Tests/FindVulkan/Test/CMakeLists.txt
index 0b13d53..9d36a0d 100644
--- a/Tests/FindVulkan/Test/CMakeLists.txt
+++ b/Tests/FindVulkan/Test/CMakeLists.txt
@@ -13,3 +13,12 @@ add_executable(test_var main.c)
target_include_directories(test_var PRIVATE ${Vulkan_INCLUDE_DIRS})
target_link_libraries(test_var PRIVATE ${Vulkan_LIBRARIES})
add_test(NAME test_var COMMAND test_var)
+
+if(Vulkan_GLSLC_EXECUTABLE)
+ add_test(NAME test_glslc
+ COMMAND ${CMAKE_COMMAND}
+ "-DVULKAN_GLSLC_EXECUTABLE=${Vulkan_GLSLC_EXECUTABLE}"
+ "-DVULKAN_GLSLC_EXECUTABLE_TARGET=$<TARGET_FILE:Vulkan::glslc>"
+ -P "${CMAKE_CURRENT_LIST_DIR}/Run-glslc.cmake"
+ )
+endif()
diff --git a/Tests/FindVulkan/Test/Run-glslc.cmake b/Tests/FindVulkan/Test/Run-glslc.cmake
new file mode 100644
index 0000000..086eb9d
--- /dev/null
+++ b/Tests/FindVulkan/Test/Run-glslc.cmake
@@ -0,0 +1,20 @@
+cmake_minimum_required(VERSION 3.12)
+
+function(run_glslc exe exe_display)
+ execute_process(COMMAND ${exe} --help
+ OUTPUT_VARIABLE output
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ RESULT_VARIABLE result
+ )
+
+ if(NOT result EQUAL 0)
+ message(SEND_ERROR "Result of ${exe_display} --help is ${result}, should be 0")
+ endif()
+
+ if(NOT output MATCHES "^glslc - Compile shaders into SPIR-V")
+ message(SEND_ERROR "Output of ${exe_display} --help is \"${output}\", should begin with \"glslc - Compile shaders into SPIR-V\"")
+ endif()
+endfunction()
+
+run_glslc("${VULKAN_GLSLC_EXECUTABLE}" "\${VULKAN_GLSLC_EXECUTABLE}")
+run_glslc("${VULKAN_GLSLC_EXECUTABLE_TARGET}" "Vulkan::glslc")
diff --git a/Tests/FindVulkan/Test/main.c b/Tests/FindVulkan/Test/main.c
index b29c9ec..1bff651 100644
--- a/Tests/FindVulkan/Test/main.c
+++ b/Tests/FindVulkan/Test/main.c
@@ -2,10 +2,10 @@
int main()
{
- VkInstanceCreateInfo instanceCreateInfo = {};
+ VkInstanceCreateInfo instanceCreateInfo = { 0 };
instanceCreateInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
- VkApplicationInfo applicationInfo = {};
+ VkApplicationInfo applicationInfo = { 0 };
applicationInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
applicationInfo.apiVersion = VK_API_VERSION_1_0;
applicationInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0);
diff --git a/Tests/FindX11/Test/CMakeLists.txt b/Tests/FindX11/Test/CMakeLists.txt
index b2adfb2..5b304d9 100644
--- a/Tests/FindX11/Test/CMakeLists.txt
+++ b/Tests/FindX11/Test/CMakeLists.txt
@@ -29,9 +29,12 @@ test_x11_component(x11_components SM)
set(X11_X11_FOUND ${X11_FOUND})
test_x11_component(x11_components X11)
test_x11_component(x11_components Xau)
+test_x11_component(x11_components Xaw)
test_x11_component(x11_components xcb)
test_x11_component(x11_components X11_xcb)
test_x11_component(x11_components xcb_icccm)
+test_x11_component(x11_components xcb_util)
+test_x11_component(x11_components xcb_xfixes)
test_x11_component(x11_components xcb_xkb)
test_x11_component(x11_components Xcomposite)
test_x11_component(x11_components Xdamage)
@@ -67,9 +70,12 @@ target_link_libraries(test_var PRIVATE ${X11_LIBRARIES})
# Not included in X11_LIBRARIES.
foreach(lib
Xau
+ Xaw
xcb
X11_xcb
xcb_icccm
+ xcb_util
+ xcb_xfixes
Xcomposite
Xdamage
Xdmcp
diff --git a/Tests/FindX11/Test/main.c b/Tests/FindX11/Test/main.c
index c8144e0..b44ae28 100644
--- a/Tests/FindX11/Test/main.c
+++ b/Tests/FindX11/Test/main.c
@@ -308,6 +308,62 @@ static int test_Xv(void)
}
#endif
+#ifdef HAVE_X11_Xaw
+# include <X11/Intrinsic.h>
+# include <X11/Xaw/Box.h>
+
+static void test_Xaw(void)
+{
+ XrmOptionDescRec opt_table[] = { { NULL } };
+
+ Widget toplevel;
+ toplevel =
+ XtInitialize("test", "test", opt_table, XtNumber(opt_table), NULL, NULL);
+ Widget box =
+ XtCreateManagedWidget("testbox", boxWidgetClass, toplevel, NULL, 0);
+ return;
+}
+
+#endif
+
+#ifdef HAVE_xcb
+# include <xcb/xcb.h>
+
+static void test_xcb(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_disconnect(connection);
+}
+
+# ifdef HAVE_xcb_util
+# include <xcb/xcb_aux.h>
+
+static void test_xcb_util(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_screen_t* screen = xcb_aux_get_screen(connection, screen_nbr);
+ xcb_disconnect(connection);
+}
+
+# endif
+
+# ifdef HAVE_xcb_xfixes
+# include <xcb/xcb_xfixes.h>
+
+static void test_xcb_xfixes(void)
+{
+ int screen_nbr;
+ xcb_connection_t* connection = xcb_connect(NULL, &screen_nbr);
+ xcb_xfixes_query_version(connection, 1, 0);
+ xcb_disconnect(connection);
+}
+
+# endif
+
+#endif
+
#include <stddef.h>
int main(int argc, char* argv[])
@@ -392,6 +448,19 @@ int main(int argc, char* argv[])
#ifdef HAVE_X11_Xv
test_Xv,
#endif
+#ifdef HAVE_X11_Xaw
+ test_Xaw,
+#endif
+#ifdef HAVE_xcb
+ test_xcb,
+#endif
+#ifdef HAVE_xcb_util
+ test_xcb_util,
+#endif
+#ifdef HAVE_xcb_xfixes
+ test_xcb_xfixes,
+#endif
+
NULL,
};
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index d24df2d..637f581 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.12)
project(FortranOnly Fortran)
message("CTEST_FULL_OUTPUT ")
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index 9d51342..ebbe288 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -40,9 +40,9 @@ add_custom_target(check-part1 ALL
-Dtest_and_0_invalidcontent=$<AND:0,invalidcontent>
-Dtest_config_0=$<CONFIG:$<CONFIGURATION>x>
-Dtest_config_1=$<CONFIG:$<CONFIGURATION>>
- -Dtest_config_debug=$<CONFIG:Debug>$<CONFIG:DEBUG>$<CONFIG:DeBuG>
- -Dtest_config_release=$<CONFIG:Release>$<CONFIG:RELEASE>$<CONFIG:ReLeAsE>
- -Dtest_config_relwithdebinfo=$<CONFIG:RelWithDebInfo>$<CONFIG:RELWITHDEBINFO>$<CONFIG:relwithdebinfo>
+ -Dtest_config_debug=$<CONFIG:Debug,DEBUG,DeBuG>
+ -Dtest_config_release=$<CONFIG:Release>$<CONFIG:RELEASE,ReLeAsE>
+ -Dtest_config_relwithdebinfo=$<CONFIG:RelWithDebInfo,RELWITHDEBINFO>$<CONFIG:relwithdebinfo>
-Dtest_config_minsizerel=$<CONFIG:MinSizeRel>$<CONFIG:MINSIZEREL>$<CONFIG:minsizerel>
-Dtest_not_0=$<NOT:0>
-Dtest_not_1=$<NOT:1>
@@ -180,9 +180,7 @@ set_property(TARGET imported3 PROPERTY IMPORTED_LOCATION_DEBUG debug_loc)
set_property(TARGET imported3 APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES $<$<CONFIG:DEBUG>:$<TARGET_PROPERTY:imported1,INTERFACE_INCLUDE_DIRECTORIES>>)
set_property(TARGET imported3 APPEND PROPERTY
- INTERFACE_INCLUDE_DIRECTORIES $<$<CONFIG:RELEASE>:$<TARGET_PROPERTY:imported2,INTERFACE_INCLUDE_DIRECTORIES>>)
-set_property(TARGET imported3 APPEND PROPERTY
- INTERFACE_INCLUDE_DIRECTORIES $<$<CONFIG:RELWITHDEBINFO>:$<TARGET_PROPERTY:imported2,INTERFACE_INCLUDE_DIRECTORIES>>)
+ INTERFACE_INCLUDE_DIRECTORIES $<$<CONFIG:RELEASE,RELWITHDEBINFO>:$<TARGET_PROPERTY:imported2,INTERFACE_INCLUDE_DIRECTORIES>>)
set_property(TARGET imported3 APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES $<$<CONFIG:MINSIZEREL>:$<TARGET_PROPERTY:imported2,INTERFACE_INCLUDE_DIRECTORIES>>)
diff --git a/Tests/GeneratorExpression/check-part3.cmake b/Tests/GeneratorExpression/check-part3.cmake
index 4fb7308..5571c3d 100644
--- a/Tests/GeneratorExpression/check-part3.cmake
+++ b/Tests/GeneratorExpression/check-part3.cmake
@@ -9,11 +9,11 @@ check(test_version_equal_1 "0")
check(test_version_equal_2 "1")
if(config AND NOT config STREQUAL NoConfig)
- if(NOT "${test_imported_includes}" MATCHES "^;*/imported[12]/include/with space;*$")
+ if(NOT "${test_imported_includes}" MATCHES "^[^;]*/imported[12]/include/with space$")
message(SEND_ERROR "test_imported_includes is not correct: ${test_imported_includes}")
endif()
else()
- if(NOT "${test_imported_includes}" MATCHES "^;;;$")
+ if(NOT "${test_imported_includes}" MATCHES "^$")
message(SEND_ERROR "test_imported_includes is not an empty list: ${test_imported_includes}")
endif()
endif()
diff --git a/Tests/GhsMulti/GhsMultiSrcGroups/standard.h b/Tests/GhsMulti/GhsMultiSrcGroups/standard.h
index 2773a55..66522d5 100644
--- a/Tests/GhsMulti/GhsMultiSrcGroups/standard.h
+++ b/Tests/GhsMulti/GhsMultiSrcGroups/standard.h
@@ -1 +1 @@
-#define somthing
+#define something
diff --git a/Tests/GhsMulti/GhsMultiSrcGroups/test3.h b/Tests/GhsMulti/GhsMultiSrcGroups/test3.h
index 2773a55..66522d5 100644
--- a/Tests/GhsMulti/GhsMultiSrcGroups/test3.h
+++ b/Tests/GhsMulti/GhsMultiSrcGroups/test3.h
@@ -1 +1 @@
-#define somthing
+#define something
diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt
index 311ca2a..ec0a604 100644
--- a/Tests/InterfaceLibrary/CMakeLists.txt
+++ b/Tests/InterfaceLibrary/CMakeLists.txt
@@ -44,6 +44,7 @@ add_executable(InterfaceLibrary definetestexe.cpp)
target_link_libraries(InterfaceLibrary
iface_nodepends
headeriface
+ iface_genheader
subiface
intermediate
diff --git a/Tests/InterfaceLibrary/definetestexe.cpp b/Tests/InterfaceLibrary/definetestexe.cpp
index 9156426..6c53840 100644
--- a/Tests/InterfaceLibrary/definetestexe.cpp
+++ b/Tests/InterfaceLibrary/definetestexe.cpp
@@ -15,6 +15,12 @@
# error Expected IFACE_HEADER_BUILDDIR
#endif
+#include "iface_genheader.h"
+
+#ifndef IFACE_GENHEADER
+# error Expected IFACE_GENHEADER
+#endif
+
extern int obj();
extern int sub();
extern int item();
diff --git a/Tests/InterfaceLibrary/headerdir/CMakeLists.txt b/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
index 826a9ed..ae030d7 100644
--- a/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
+++ b/Tests/InterfaceLibrary/headerdir/CMakeLists.txt
@@ -11,3 +11,12 @@ add_custom_target(headeriface_gen
VERBATIM
)
add_dependencies(headeriface headeriface_gen)
+
+add_custom_command(OUTPUT iface_genheader.h
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_CURRENT_SOURCE_DIR}/iface_genheader.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/iface_genheader.h
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/iface_genheader.h.in
+ VERBATIM)
+add_library(iface_genheader INTERFACE iface_genheader.h)
diff --git a/Tests/InterfaceLibrary/headerdir/iface_genheader.h.in b/Tests/InterfaceLibrary/headerdir/iface_genheader.h.in
new file mode 100644
index 0000000..0a21b62
--- /dev/null
+++ b/Tests/InterfaceLibrary/headerdir/iface_genheader.h.in
@@ -0,0 +1 @@
+#define IFACE_GENHEADER
diff --git a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
index 99f0de9..af7b092 100644
--- a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
+++ b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
@@ -91,7 +91,7 @@ static int CCONV InitialPass(void* inf, void* mf, int argc, char* argv[])
source_file = info->CAPI->CreateNewSourceFile(mf);
cstr = info->CAPI->SourceFileGetSourceName(source_file);
- sprintf(buffer, "Shold be empty (source file name): [%s]", cstr);
+ sprintf(buffer, "Should be empty (source file name): [%s]", cstr);
info->CAPI->DisplaySatus(mf, buffer);
cstr = info->CAPI->SourceFileGetFullPath(source_file);
sprintf(buffer, "Should be empty (source file full path): [%s]", cstr);
diff --git a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c
index 99f0de9..af7b092 100644
--- a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c
+++ b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c
@@ -91,7 +91,7 @@ static int CCONV InitialPass(void* inf, void* mf, int argc, char* argv[])
source_file = info->CAPI->CreateNewSourceFile(mf);
cstr = info->CAPI->SourceFileGetSourceName(source_file);
- sprintf(buffer, "Shold be empty (source file name): [%s]", cstr);
+ sprintf(buffer, "Should be empty (source file name): [%s]", cstr);
info->CAPI->DisplaySatus(mf, buffer);
cstr = info->CAPI->SourceFileGetFullPath(source_file);
sprintf(buffer, "Should be empty (source file full path): [%s]", cstr);
diff --git a/Tests/Module/CheckTypeSize/CMakeLists.txt b/Tests/Module/CheckTypeSize/CMakeLists.txt
index 16989fe2..102cf0c 100644
--- a/Tests/Module/CheckTypeSize/CMakeLists.txt
+++ b/Tests/Module/CheckTypeSize/CMakeLists.txt
@@ -21,6 +21,8 @@ check_type_size("((struct somestruct*)0)->somechar" SIZEOF_STRUCTMEMBER_CHAR)
# Check CXX types
check_type_size(bool SIZEOF_BOOL LANGUAGE CXX)
+check_type_size(uint8_t SIZEOF_UINT8_T LANGUAGE CXX)
+check_type_size(std::uint8_t SIZEOF_STD_UINT8_T LANGUAGE CXX)
set(CMAKE_EXTRA_INCLUDE_FILES someclass.hxx)
check_type_size("((ns::someclass*)0)->someint" SIZEOF_NS_CLASSMEMBER_INT LANGUAGE CXX)
diff --git a/Tests/Module/CheckTypeSize/CheckTypeSize.cxx b/Tests/Module/CheckTypeSize/CheckTypeSize.cxx
index 15dc890..45cd393 100644
--- a/Tests/Module/CheckTypeSize/CheckTypeSize.cxx
+++ b/Tests/Module/CheckTypeSize/CheckTypeSize.cxx
@@ -11,6 +11,12 @@
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
+#ifdef HAVE_CSTDINT
+# include <cstdint>
+#endif
+#ifdef HAVE_CSTDDEF
+# include <cstddef>
+#endif
#include <stdio.h>
@@ -122,6 +128,26 @@ int main()
NODEF(SIZEOF_SSIZE_T);
#endif
+/* uint8_t */
+#if defined(SIZEOF_UINT8_T)
+ CHECK(uint8_t, SIZEOF_UINT8_T);
+# if !defined(HAVE_SIZEOF_UINT8_T)
+ NODEF(HAVE_SIZEOF_UINT8_T);
+# endif
+#elif defined(HAVE_SIZEOF_UINT8_T)
+ NODEF(SIZEOF_UINT8_T);
+#endif
+
+/* std::uint8_t */
+#if defined(SIZEOF_STD_UINT8_T)
+ CHECK(std::uint8_t, SIZEOF_STD_UINT8_T);
+# if !defined(HAVE_SIZEOF_STD_UINT8_T)
+ NODEF(HAVE_SIZEOF_STD_UINT8_T);
+# endif
+#elif defined(HAVE_SIZEOF_STD_UINT8_T)
+ NODEF(SIZEOF_STD_UINT8_T);
+#endif
+
/* ns::someclass::someint */
#if defined(SIZEOF_NS_CLASSMEMBER_INT)
CHECK(y.someint, SIZEOF_NS_CLASSMEMBER_INT);
diff --git a/Tests/Module/CheckTypeSize/config.hxx.in b/Tests/Module/CheckTypeSize/config.hxx.in
index 8c66ade..9a80689 100644
--- a/Tests/Module/CheckTypeSize/config.hxx.in
+++ b/Tests/Module/CheckTypeSize/config.hxx.in
@@ -1,11 +1,21 @@
#cmakedefine HAVE_SYS_TYPES_H
#cmakedefine HAVE_STDINT_H
#cmakedefine HAVE_STDDEF_H
+#cmakedefine HAVE_CSTDINT
+#cmakedefine HAVE_CSTDDEF
/* bool */
#cmakedefine HAVE_SIZEOF_BOOL
@SIZEOF_BOOL_CODE@
+/* uint8_t */
+#cmakedefine HAVE_SIZEOF_UINT8_T
+@SIZEOF_UINT8_T_CODE@
+
+/* std::uint8_t */
+#cmakedefine HAVE_SIZEOF_STD_UINT8_T
+@SIZEOF_STD_UINT8_T_CODE@
+
/* struct ns::somestruct::someint */
#cmakedefine HAVE_SIZEOF_NS_STRUCTMEMBER_INT
@SIZEOF_NS_STRUCTMEMBER_INT_CODE@
diff --git a/Tests/RunCMake/Android/RunCMakeTest.cmake b/Tests/RunCMake/Android/RunCMakeTest.cmake
index 45798ce..81dd090 100644
--- a/Tests/RunCMake/Android/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Android/RunCMakeTest.cmake
@@ -18,15 +18,33 @@ function(run_Android case)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
run_cmake(${case})
- run_cmake_command(${case}-build ${CMAKE_COMMAND} --build .)
+ set(configs ".")
+ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(configs Release Debug)
+ endif()
+ foreach(config IN LISTS configs)
+ set(build_suffix)
+ set(config_arg)
+ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(build_suffix "-${config}")
+ set(config_arg --config "${config}")
+ endif()
+ run_cmake_command(${case}-build${build_suffix} ${CMAKE_COMMAND} --build . ${config_arg})
+ endforeach()
endfunction()
+set(RunCMake_GENERATOR_PLATFORM_OLD "${RunCMake_GENERATOR_PLATFORM}")
+
+if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake_GENERATOR_PLATFORM "ARM")
+endif()
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
-DCMAKE_SYSROOT=${CMAKE_CURRENT_SOURCE_DIR}
)
run_cmake(BadSYSROOT)
unset(RunCMake_TEST_OPTIONS)
+set(RunCMake_GENERATOR_PLATFORM "${RunCMake_GENERATOR_PLATFORM_OLD}")
foreach(ndk IN LISTS TEST_ANDROID_NDK)
# Load available toolchain versions and abis.
@@ -70,6 +88,9 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
if(_versions MATCHES "clang")
set(_versions "clang" ${_versions})
endif()
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(_versions "clang")
+ endif()
list(REMOVE_DUPLICATES _versions)
list(SORT _versions)
set(_versions ";${_versions}")
@@ -77,44 +98,58 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
list(REMOVE_DUPLICATES _abis_${vers})
endforeach()
+ set(ndk_arg -DCMAKE_ANDROID_NDK=${ndk})
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(ndk_arg)
+ endif()
+
# Test failure cases.
message(STATUS "ndk='${ndk}'")
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake_GENERATOR_PLATFORM "ARM")
+ endif()
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_ARCH_ABI=badabi
)
run_cmake(ndk-badabi)
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake_GENERATOR_PLATFORM "x86")
+ endif()
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_ARCH_ABI=x86
-DCMAKE_ANDROID_ARM_MODE=0
)
run_cmake(ndk-badarm)
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake_GENERATOR_PLATFORM "ARM")
+ endif()
if("armeabi" IN_LIST _abis_)
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_ARM_NEON=0
)
run_cmake(ndk-badneon)
endif()
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=badver
)
run_cmake(ndk-badver)
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=1.0
)
run_cmake(ndk-badvernum)
set(RunCMake_TEST_OPTIONS
-DCMAKE_SYSTEM_NAME=Android
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_STL_TYPE=badstl
)
run_cmake(ndk-badstl)
@@ -131,6 +166,7 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
run_cmake(ndk-sysroot-armeabi)
unset(RunCMake_TEST_OPTIONS)
endif()
+ set(RunCMake_GENERATOR_PLATFORM "${RunCMake_GENERATOR_PLATFORM_OLD}")
# Find available STLs.
set(stl_types
@@ -157,23 +193,41 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
armeabi-v6
armeabi-v7a
arm64-v8a
- mips
- mips64
x86
x86_64
)
+ if(NOT RunCMake_GENERATOR MATCHES "Visual Studio")
+ list(APPEND abi_names mips mips64)
+ endif()
+ set(abi_to_arch_armeabi ARM)
+ set(abi_to_arch_armeabi-v6 ARM)
+ set(abi_to_arch_armeabi-v7a ARM)
+ set(abi_to_arch_arm64-v8a ARM64)
+ set(abi_to_arch_x86 x86)
+ set(abi_to_arch_x86_64 x64)
# Test all combinations.
foreach(vers IN LISTS _versions)
foreach(stl IN LISTS stl_types)
- foreach(config Release Debug)
+ set(configs Release Debug)
+ set(foreach_list "${configs}")
+ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(foreach_list ".")
+ endif()
+ foreach(config IN LISTS foreach_list)
# Test this combination for all available abis.
- message(STATUS "ndk='${ndk}' vers='${vers}' stl='${stl}' config='${config}'")
+ set(config_status " config='${config}'")
+ set(build_type_arg "-DCMAKE_BUILD_TYPE=${config}")
+ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(config_status)
+ string(REPLACE ";" "\\\\;" build_type_arg "-DCMAKE_CONFIGURATION_TYPES=${configs}")
+ endif()
+ message(STATUS "ndk='${ndk}' vers='${vers}' stl='${stl}'${config_status}")
set(RunCMake_TEST_OPTIONS
- -DCMAKE_ANDROID_NDK=${ndk}
+ ${ndk_arg}
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=${vers}
-DCMAKE_ANDROID_STL_TYPE=${stl}
- -DCMAKE_BUILD_TYPE=${config}
+ "${build_type_arg}"
)
foreach(abi IN LISTS abi_names)
# Skip ABIs not supported by this compiler.
@@ -182,6 +236,9 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
endif()
# Run the tests for this combination.
+ if(RunCMake_GENERATOR MATCHES "Visual Studio")
+ set(RunCMake_GENERATOR_PLATFORM "${abi_to_arch_${abi}}")
+ endif()
if("${abi}" STREQUAL "armeabi")
run_Android(ndk-armeabi-thumb) # default: -DCMAKE_ANDROID_ARCH_ABI=armeabi -DCMAKE_ANDROID_ARM_MODE=0
run_Android(ndk-armeabi-arm -DCMAKE_ANDROID_ARM_MODE=1) # default: -DCMAKE_ANDROID_ARCH_ABI=armeabi
@@ -191,6 +248,7 @@ foreach(ndk IN LISTS TEST_ANDROID_NDK)
run_Android(ndk-${abi}-neon -DCMAKE_ANDROID_ARCH_ABI=${abi} -DCMAKE_ANDROID_ARM_NEON=1)
endif()
endif()
+ set(RunCMake_GENERATOR_PLATFORM "${RunCMake_GENERATOR_PLATFORM_OLD}")
endforeach()
unset(RunCMake_TEST_OPTIONS)
endforeach()
diff --git a/Tests/RunCMake/Android/common.cmake b/Tests/RunCMake/Android/common.cmake
index d96ab86..32412aa 100644
--- a/Tests/RunCMake/Android/common.cmake
+++ b/Tests/RunCMake/Android/common.cmake
@@ -96,7 +96,7 @@ add_executable(android_c android.c)
add_executable(android_cxx android.cxx)
add_library(android_cxx_lib SHARED android_lib.cxx)
-set(objdump "${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}objdump")
+set(objdump "${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}objdump${CMAKE_CXX_ANDROID_TOOLCHAIN_SUFFIX}")
if(NOT EXISTS "${objdump}")
message(FATAL_ERROR "Expected tool missing:\n ${objdump}")
endif()
diff --git a/Tests/RunCMake/Android/ndk-arm64-v8a-stderr.txt b/Tests/RunCMake/Android/ndk-arm64-v8a-stderr.txt
new file mode 100644
index 0000000..a3b3634
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-arm64-v8a-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/Android/ndk-armeabi-arm-stderr.txt b/Tests/RunCMake/Android/ndk-armeabi-arm-stderr.txt
new file mode 100644
index 0000000..a3b3634
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-armeabi-arm-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/Android/ndk-armeabi-thumb-stderr.txt b/Tests/RunCMake/Android/ndk-armeabi-thumb-stderr.txt
new file mode 100644
index 0000000..a3b3634
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-armeabi-thumb-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stderr.txt b/Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stderr.txt
new file mode 100644
index 0000000..a3b3634
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-armeabi-v7a-neon-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/Android/ndk-armeabi-v7a-stderr.txt b/Tests/RunCMake/Android/ndk-armeabi-v7a-stderr.txt
new file mode 100644
index 0000000..a3b3634
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-armeabi-v7a-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/Android/ndk-x86-stderr.txt b/Tests/RunCMake/Android/ndk-x86-stderr.txt
new file mode 100644
index 0000000..a3b3634
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-x86-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/Android/ndk-x86_64-stderr.txt b/Tests/RunCMake/Android/ndk-x86_64-stderr.txt
new file mode 100644
index 0000000..a3b3634
--- /dev/null
+++ b/Tests/RunCMake/Android/ndk-x86_64-stderr.txt
@@ -0,0 +1,7 @@
+^(CMake Warning:
+ You are using Visual Studio tools for Android, which does not support
+ standalone executables\. However, the following executable targets do not
+ have the ANDROID_GUI property set, and thus will not be built as expected\.
+ They will be built as shared libraries with executable filenames:
+
+ android_c, android_cxx, android_sysinc_c, android_sysinc_cxx)?$
diff --git a/Tests/RunCMake/BundleUtilities/ExecutableScripts.cmake b/Tests/RunCMake/BundleUtilities/ExecutableScripts.cmake
new file mode 100644
index 0000000..78a9b66
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/ExecutableScripts.cmake
@@ -0,0 +1,18 @@
+include(BundleUtilities)
+
+set(BU_CHMOD_BUNDLE_ITEMS ON)
+
+function(check_script script)
+ fixup_bundle_item(${script} ${script} "" "")
+endfunction()
+
+# Should not throw any errors
+# Shell script
+set(script_sh_EMBEDDED_ITEM ${CMAKE_CURRENT_LIST_DIR}/test.app/script.sh)
+check_script(${CMAKE_CURRENT_LIST_DIR}/test.app/script.sh)
+# Batch script
+set(script_bat_EMBEDDED_ITEM ${CMAKE_CURRENT_LIST_DIR}/test.app/script.bat)
+check_script(${CMAKE_CURRENT_LIST_DIR}/test.app/script.bat)
+# Shell script without extension
+set(script_EMBEDDED_ITEM ${CMAKE_CURRENT_LIST_DIR}/test.app/script)
+check_script(${CMAKE_CURRENT_LIST_DIR}/test.app/script)
diff --git a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake
index 14aaff1..df28102 100644
--- a/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BundleUtilities/RunCMakeTest.cmake
@@ -9,3 +9,4 @@ run_cmake(CMP0080-WARN)
run_cmake_command(CMP0080-COMMAND-OLD ${CMAKE_COMMAND} -DCMP0080_VALUE:STRING=OLD -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake)
run_cmake_command(CMP0080-COMMAND-NEW ${CMAKE_COMMAND} -DCMP0080_VALUE:STRING=NEW -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake)
run_cmake_command(CMP0080-COMMAND-WARN ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/CMP0080-COMMAND.cmake)
+run_cmake_command(ExecutableScripts ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/ExecutableScripts.cmake)
diff --git a/Tests/RunCMake/BundleUtilities/test.app/script b/Tests/RunCMake/BundleUtilities/test.app/script
new file mode 100755
index 0000000..23bf47c
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/test.app/script
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "Hello World"
diff --git a/Tests/RunCMake/BundleUtilities/test.app/script.bat b/Tests/RunCMake/BundleUtilities/test.app/script.bat
new file mode 100755
index 0000000..dbb0ec2
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/test.app/script.bat
@@ -0,0 +1,3 @@
+@echo off
+
+echo "Hello world"
diff --git a/Tests/RunCMake/BundleUtilities/test.app/script.sh b/Tests/RunCMake/BundleUtilities/test.app/script.sh
new file mode 100755
index 0000000..23bf47c
--- /dev/null
+++ b/Tests/RunCMake/BundleUtilities/test.app/script.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "Hello World"
diff --git a/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt
new file mode 100644
index 0000000..66a58fb
--- /dev/null
+++ b/Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt
index 048762d..a446211 100644
--- a/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt
+++ b/Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt
@@ -1,4 +1,11 @@
-^CMake Deprecation Warning at CMP0019-OLD.cmake:[0-9]+ \(cmake_policy\):
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
++
+CMake Deprecation Warning at CMP0019-OLD.cmake:[0-9]+ \(cmake_policy\):
The OLD behavior for policy CMP0019 will be removed from a future version
of CMake.
diff --git a/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt b/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt
index 1e4b47d..f7b9c0e 100644
--- a/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0019/CMP0019-WARN-stderr.txt
@@ -1,3 +1,10 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
++
CMake Warning \(dev\) in CMakeLists.txt:
Policy CMP0019 is not set: Do not re-expand variables in include and link
information. Run "cmake --help-policy CMP0019" for policy details. Use
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt
new file mode 100644
index 0000000..66a58fb
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt
new file mode 100644
index 0000000..66a58fb
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt
new file mode 100644
index 0000000..66a58fb
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-NEW-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt
new file mode 100644
index 0000000..66a58fb
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-link_libraries-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt
new file mode 100644
index 0000000..66a58fb
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
index 6a6a0c7..87404d3 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
@@ -1,3 +1,10 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
++
CMake Warning \(dev\) in CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
index 2f7dfbf..5d75720 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
@@ -1,4 +1,11 @@
-^CMake Warning \(dev\) in CMakeLists.txt:
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
++
+CMake Warning \(dev\) in CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
diff --git a/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
new file mode 100644
index 0000000..66a58fb
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.$
diff --git a/Tests/RunCMake/CMP0026/CMakeLists.txt b/Tests/RunCMake/CMP0026/CMakeLists.txt
index 12cd3c7..4b3de84 100644
--- a/Tests/RunCMake/CMP0026/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0026/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0027/CMakeLists.txt b/Tests/RunCMake/CMP0027/CMakeLists.txt
index 12cd3c7..4b3de84 100644
--- a/Tests/RunCMake/CMP0027/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0027/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0028/CMakeLists.txt b/Tests/RunCMake/CMP0028/CMakeLists.txt
index 144cdb4..4f867df 100644
--- a/Tests/RunCMake/CMP0028/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0028/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir
diff --git a/Tests/RunCMake/CMP0037/CMakeLists.txt b/Tests/RunCMake/CMP0037/CMakeLists.txt
index 12cd3c7..4b3de84 100644
--- a/Tests/RunCMake/CMP0037/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0037/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0041/CMakeLists.txt b/Tests/RunCMake/CMP0041/CMakeLists.txt
index f452db1..a06591c 100644
--- a/Tests/RunCMake/CMP0041/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0041/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0042/CMakeLists.txt b/Tests/RunCMake/CMP0042/CMakeLists.txt
index f452db1..a06591c 100644
--- a/Tests/RunCMake/CMP0042/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0042/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0043/CMakeLists.txt b/Tests/RunCMake/CMP0043/CMakeLists.txt
index d027f3e..cc8a6f8 100644
--- a/Tests/RunCMake/CMP0043/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0043/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir
diff --git a/Tests/RunCMake/CMP0045/CMakeLists.txt b/Tests/RunCMake/CMP0045/CMakeLists.txt
index f452db1..a06591c 100644
--- a/Tests/RunCMake/CMP0045/CMakeLists.txt
+++ b/Tests/RunCMake/CMP0045/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 470f302..bbb1952 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -166,6 +166,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
-DPSEUDO_BC=$<TARGET_FILE:pseudo_BC>
-DPSEUDO_PURIFY=$<TARGET_FILE:pseudo_purify>
-DPSEUDO_VALGRIND=$<TARGET_FILE:pseudo_valgrind>
+ -DPSEUDO_CUDA_MEMCHECK=$<TARGET_FILE:pseudo_cuda-memcheck>
-DPSEUDO_BC_NOLOG=$<TARGET_FILE:pseudonl_BC>
-DPSEUDO_PURIFY_NOLOG=$<TARGET_FILE:pseudonl_purify>
-DPSEUDO_VALGRIND_NOLOG=$<TARGET_FILE:pseudonl_valgrind>
@@ -209,6 +210,7 @@ add_RunCMake_test(DisallowedCommands)
if("${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
add_RunCMake_test(ExportCompileCommands)
endif()
+add_RunCMake_test(ExcludeFromAll)
add_RunCMake_test(ExternalData)
add_RunCMake_test(FeatureSummary)
add_RunCMake_test(FPHSA)
@@ -290,6 +292,7 @@ add_RunCMake_test(add_dependencies)
add_RunCMake_test(add_executable)
add_RunCMake_test(add_library)
add_RunCMake_test(add_subdirectory)
+add_RunCMake_test(add_test)
add_RunCMake_test(build_command)
add_executable(exit_code exit_code.c)
set(execute_process_ARGS -DEXIT_CODE_EXE=$<TARGET_FILE:exit_code>)
@@ -403,11 +406,12 @@ add_RunCMake_test(while)
add_RunCMake_test(CMP0004)
add_RunCMake_test(TargetPolicies)
add_RunCMake_test(alias_targets)
-add_RunCMake_test(interface_library)
+add_RunCMake_test(InterfaceLibrary)
add_RunCMake_test(no_install_prefix)
add_RunCMake_test(configure_file)
add_RunCMake_test(CTestTimeout -DTIMEOUT=${CTestTestTimeout_TIME})
add_RunCMake_test(CTestTimeoutAfterMatch)
+add_RunCMake_test(DependencyGraph -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER})
# ctresalloc links against CMakeLib and CTestLib, which means it can't be built
# if CMake_TEST_EXTERNAL_CMAKE is activated (the compiler might be different.)
@@ -633,6 +637,7 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
set_property(TEST RunCMake.CompilerLauncher APPEND
PROPERTY LABELS "CUDA")
add_RunCMake_test(ctest_labels_for_subprojects)
+ add_RunCMake_test(CompilerArgs)
endif()
set(cpack_tests
@@ -698,8 +703,8 @@ add_RunCMake_test(AutoExportDll
add_RunCMake_test(AndroidMK)
if(CMake_TEST_ANDROID_NDK OR CMake_TEST_ANDROID_STANDALONE_TOOLCHAIN)
- if(NOT "${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
- message(FATAL_ERROR "Android tests supported only by Makefile and Ninja generators")
+ if(NOT "${CMAKE_GENERATOR}" MATCHES "Make|Ninja|Visual Studio 1[456]")
+ message(FATAL_ERROR "Android tests supported only by Makefile, Ninja, and Visual Studio >= 14 generators")
endif()
foreach(v TEST_ANDROID_NDK TEST_ANDROID_STANDALONE_TOOLCHAIN)
if(CMake_${v})
diff --git a/Tests/RunCMake/CPack/DragNDrop/Accept.txt b/Tests/RunCMake/CPack/DragNDrop/Accept.txt
new file mode 100644
index 0000000..975fbec
--- /dev/null
+++ b/Tests/RunCMake/CPack/DragNDrop/Accept.txt
@@ -0,0 +1 @@
+y
diff --git a/Tests/RunCMake/CPack/DragNDrop/Helpers.cmake b/Tests/RunCMake/CPack/DragNDrop/Helpers.cmake
index 023e597..896fba7 100644
--- a/Tests/RunCMake/CPack/DragNDrop/Helpers.cmake
+++ b/Tests/RunCMake/CPack/DragNDrop/Helpers.cmake
@@ -5,6 +5,7 @@ function(getPackageContent FILE RESULT_VAR)
file(REMOVE_RECURSE "${path_}/content")
file(MAKE_DIRECTORY "${path_}/content")
execute_process(COMMAND ${HDIUTIL_EXECUTABLE} attach -mountroot ${path_}/content -nobrowse ${FILE}
+ INPUT_FILE "${src_dir}/DragNDrop/Accept.txt"
RESULT_VARIABLE attach_result_
ERROR_VARIABLE attach_error_
OUTPUT_STRIP_TRAILING_WHITESPACE)
diff --git a/Tests/RunCMake/CPack/DragNDrop/packaging_MONOLITHIC_default.cmake b/Tests/RunCMake/CPack/DragNDrop/packaging_MONOLITHIC_default.cmake
new file mode 100644
index 0000000..ca27890
--- /dev/null
+++ b/Tests/RunCMake/CPack/DragNDrop/packaging_MONOLITHIC_default.cmake
@@ -0,0 +1,2 @@
+set(CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK ON)
+set(CPACK_DMG_VOLUME_NAME "volume-name")
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 064b4dc..530bcdf 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -10,6 +10,7 @@ run_cpack_test(DEBUGINFO "RPM.DEBUGINFO;DEB.DEBUGINFO" true "COMPONENT")
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(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")
run_cpack_test(VERSION "RPM.VERSION;DEB.VERSION" false "MONOLITHIC;COMPONENT")
run_cpack_test(EXTRA "DEB.EXTRA" false "COMPONENT")
@@ -46,3 +47,4 @@ run_cpack_test_subtests(
"MONOLITHIC;COMPONENT"
)
run_cpack_test(PROJECT_META "RPM.PROJECT_META;DEB.PROJECT_META" false "MONOLITHIC;COMPONENT")
+run_cpack_test_package_target(PRE_POST_SCRIPTS "ZIP" false "MONOLITHIC;COMPONENT")
diff --git a/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake
index 70ad48b..6e841fc 100644
--- a/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/VerifyResult.cmake
@@ -34,7 +34,7 @@ set(_expected_description [[ Description: This is the summary line
This is the Debian package multiline description.
.
It must be formatted properly! Otherwise, the result `*.deb`
- package become broken and cant be installed!
+ package become broken and cannot be installed!
.
It may contains `;` characters (even like this `;;;;`). Example:
.
diff --git a/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/test.cmake b/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/test.cmake
index 893eb01..2a27b46 100644
--- a/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/test.cmake
+++ b/Tests/RunCMake/CPack/tests/DEB_DESCRIPTION/test.cmake
@@ -5,7 +5,7 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "This is the summary line")
set(_description [[This is the Debian package multiline description.
It must be formatted properly! Otherwise, the result `*.deb`
-package become broken and cant be installed!
+package become broken and cannot be installed!
It may contains `;` characters (even like this `;;;;`). Example:
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf b/Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf
new file mode 100644
index 0000000..c1da711
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf
@@ -0,0 +1,7 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
+{\colortbl ;\red0\green0\blue255;}
+{\*\generator Riched20 10.0.18362}\viewkind4\uc1
+\pard\sa200\sl276\slmult1\b\f0\fs22\lang9 LICENSE\b0\par
+This is an installer created using CPack ({{\field{\*\fldinst{HYPERLINK https://cmake.org }}{\fldrslt{https://cmake.org\ul0\cf0}}}}\f0\fs22 ). No license provided.\par
+\par
+}
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/English.menu.txt b/Tests/RunCMake/CPack/tests/DMG_SLA/English.menu.txt
new file mode 100644
index 0000000..b2cbc25
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/English.menu.txt
@@ -0,0 +1,9 @@
+English
+Agree
+Disagree
+Print
+Save...
+You agree to the License Agreement terms when you click the "Agree" button.
+Software License Agreement
+This text cannot be saved. This disk may be full or locked or the file may be locked.
+Unable to print. Make sure you have selected a printer.
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DMG_SLA/ExpectedFiles.cmake
new file mode 100644
index 0000000..d1a3a5f
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/ExpectedFiles.cmake
@@ -0,0 +1,2 @@
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt")
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt b/Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt
new file mode 100644
index 0000000..0edd1f2
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt
@@ -0,0 +1,3 @@
+LIZENZ
+------
+Dies ist ein Installationsprogramm, das mit erstellt wurde CPack (https://cmake.org). Keine Lizenz angegeben.
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt b/Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt
new file mode 100644
index 0000000..7724818
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt
@@ -0,0 +1,9 @@
+German
+Akzeptieren
+Ablehnen
+Drucken
+Speichern...
+Klicken Sie auf "Akzeptieren", wenn Sie mit den Bestimmungen des Software-Lizenzvertrages einverstanden sind.
+Software-Lizenzvertrag
+Dieser Text kann nicht gesichert werden. Diese Festplatte ist mšglicherweise voll oder geschŸtzt oder der Ordner ist geschŸtzt.
+Es kann nicht gedruckt werden. Bitte stellen Sie sicher, dass ein Drucker ausgewŠhlt ist.
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/DMG_SLA/VerifyResult.cmake
new file mode 100644
index 0000000..010e14c
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/VerifyResult.cmake
@@ -0,0 +1,33 @@
+set(dmg "${bin_dir}/${FOUND_FILE_1}")
+execute_process(COMMAND hdiutil udifderez -xml "${dmg}" OUTPUT_VARIABLE out ERROR_VARIABLE err RESULT_VARIABLE res)
+if(NOT res EQUAL 0)
+ string(REPLACE "\n" "\n " err " ${err}")
+ message(FATAL_ERROR "Running 'hdiutil udifderez -xml' on\n ${dmg}\nfailed with:\n${err}")
+endif()
+foreach(key "LPic" "STR#" "TEXT" "RTF ")
+ if(NOT out MATCHES "<key>${key}</key>")
+ string(REPLACE "\n" "\n " out " ${out}")
+ message(FATAL_ERROR "error: running 'hdiutil udifderez -xml' on\n ${dmg}\ndid not show '${key}' key:\n${out}")
+ endif()
+endforeach()
+foreach(line
+ # LPic
+ "\tAAAAAgAAAAAAAAADAAEAAA==\n"
+ # STR# English first and last base64 lines
+ "\tAAkHRW5nbGlzaAVBZ3JlZQhEaXNhZ3JlZQVQcmludAdTYXZlLi4u\n"
+ "\tZCBhIHByaW50ZXIu\n"
+ # STR# German first and last base64 lines
+ "\tAAkGR2VybWFuC0FremVwdGllcmVuCEFibGVobmVuB0RydWNrZW4M\n"
+ "\tYXVzZ2V3wopobHQgaXN0Lg==\n"
+ # RTF English first and last base64 lines
+ "\te1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZGVmZjBcbm91aWNvbXBh\n"
+ "\tdmlkZWQuXHBhcg1ccGFyDX0NDQ==\n"
+ # TEXT German first and last base64 lines
+ "\tTElaRU5aDS0tLS0tLQ1EaWVzIGlzdCBlaW4gSW5zdGFsbGF0aW9u\n"
+ "\tZ2ViZW4uDQ0=\n"
+ )
+ if(NOT out MATCHES "${line}")
+ string(REPLACE "\n" "\n " out " ${out}")
+ message(FATAL_ERROR "error: running 'hdiutil udifderez -xml' on\n ${dmg}\ndid not show '${line}':\n${out}")
+ endif()
+endforeach()
diff --git a/Tests/RunCMake/CPack/tests/DMG_SLA/test.cmake b/Tests/RunCMake/CPack/tests/DMG_SLA/test.cmake
new file mode 100644
index 0000000..2804b0b
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/DMG_SLA/test.cmake
@@ -0,0 +1,3 @@
+install(FILES CMakeLists.txt DESTINATION foo)
+set(CPACK_DMG_SLA_DIR "${CMAKE_CURRENT_LIST_DIR}")
+set(CPACK_DMG_SLA_LANGUAGES English German)
diff --git a/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake b/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake
index 6f7c4c2..3db8014 100644
--- a/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake
+++ b/Tests/RunCMake/CPack/tests/EXTERNAL/create_package.cmake
@@ -29,3 +29,11 @@ expect_file(${CPACK_TEMPORARY_DIRECTORY}/f3/share/cpack-test/f3.txt)
expect_file(${CPACK_TEMPORARY_DIRECTORY}/f4/share/cpack-test/f4.txt)
message(STATUS "This status message is expected to be visible")
+
+set(
+ CPACK_EXTERNAL_BUILT_PACKAGES
+ ${CPACK_TEMPORARY_DIRECTORY}/f1/share/cpack-test/f1.txt
+ ${CPACK_TEMPORARY_DIRECTORY}/f2/share/cpack-test/f2.txt
+ ${CPACK_TEMPORARY_DIRECTORY}/f3/share/cpack-test/f3.txt
+ ${CPACK_TEMPORARY_DIRECTORY}/f4/share/cpack-test/f4.txt
+ )
diff --git a/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt b/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt
index 37d635f..587b2e8 100644
--- a/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt
+++ b/Tests/RunCMake/CPack/tests/EXTERNAL/stage_and_package-stdout.txt
@@ -1 +1,11 @@
-- This status message is expected to be visible
+CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/external-0\.1\.1-.*\.json generated\.
+CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/external-0\.1\.1-.*\.json\.sha1 generated\.
+CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f1\.txt generated\.
+CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f1\.txt\.sha1 generated\.
+CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f2\.txt generated\.
+CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f2\.txt\.sha1 generated\.
+CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f3\.txt generated\.
+CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f3\.txt\.sha1 generated\.
+CPack: - package: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f4\.txt generated\.
+CPack: - checksum file: .*/Tests/RunCMake/External/CPack/EXTERNAL-build-stage_and_package-subtest/f4\.txt\.sha1 generated\.
diff --git a/Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake b/Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake
index bc9766b..d4781ba 100644
--- a/Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake
+++ b/Tests/RunCMake/CPack/tests/EXTERNAL/test.cmake
@@ -17,6 +17,7 @@ elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "invalid_bad")
elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "stage_and_package")
set(CPACK_EXTERNAL_ENABLE_STAGING 1)
set(CPACK_EXTERNAL_PACKAGE_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/create_package.cmake")
+ set(CPACK_PACKAGE_CHECKSUM SHA1)
endif()
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/f1.txt" test1)
diff --git a/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ExpectedFiles.cmake
new file mode 100644
index 0000000..63a36a3
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ExpectedFiles.cmake
@@ -0,0 +1,19 @@
+set(SATU "/satu;/satu/CMakeLists.txt")
+set(DUA "/dua;/dua/CMakeLists.txt")
+
+if(GENERATOR_TYPE STREQUAL ZIP)
+ set(_ext "zip")
+elseif(GENERATOR_TYPE STREQUAL TGZ)
+ set(_ext "tar.gz")
+endif()
+
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+ set(EXPECTED_FILES_COUNT "2")
+ set(EXPECTED_FILE_1 "*-satu.${_ext}")
+ set(EXPECTED_FILE_CONTENT_1_LIST ${SATU})
+ set(EXPECTED_FILE_2 "*-dua.${_ext}")
+ set(EXPECTED_FILE_CONTENT_2_LIST ${DUA})
+else()
+ set(EXPECTED_FILES_COUNT "1")
+ set(EXPECTED_FILE_CONTENT_1_LIST ${SATU} ${DUA})
+endif()
diff --git a/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_COMPONENT-stdout.txt b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_COMPONENT-stdout.txt
new file mode 100644
index 0000000..319d0da
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_COMPONENT-stdout.txt
@@ -0,0 +1,4 @@
+-- The message from .*/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/pre\.cmake and generator ZIP
+.*
+-- The message from .*/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/post\.cmake and generator ZIP
+-- Built packages: .*/_CPack_Packages/.*/pre_post_scripts-.*-dua.zip;.*/_CPack_Packages/.*/pre_post_scripts-.*-satu.zip
diff --git a/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_MONOLITHIC-stdout.txt b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_MONOLITHIC-stdout.txt
new file mode 100644
index 0000000..632c4d1
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/ZIP_MONOLITHIC-stdout.txt
@@ -0,0 +1,4 @@
+-- The message from .*/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/pre\.cmake and generator ZIP
+.*
+-- The message from .*/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/post\.cmake and generator ZIP
+-- Built packages: .*/_CPack_Packages/.*/pre_post_scripts-0\.1\.1-.*\.zip
diff --git a/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/post.cmake b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/post.cmake
new file mode 100644
index 0000000..cf0b149
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/post.cmake
@@ -0,0 +1,2 @@
+message(STATUS "The message from ${CMAKE_CURRENT_LIST_FILE} and generator ${CPACK_GENERATOR}")
+message(STATUS "Built packages: ${CPACK_PACKAGE_FILES}")
diff --git a/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/pre.cmake b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/pre.cmake
new file mode 100644
index 0000000..b04aa6b
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/pre.cmake
@@ -0,0 +1 @@
+message(STATUS "The message from ${CMAKE_CURRENT_LIST_FILE} and generator ${CPACK_GENERATOR}")
diff --git a/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/test.cmake b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/test.cmake
new file mode 100644
index 0000000..f1b6d5f
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/PRE_POST_SCRIPTS/test.cmake
@@ -0,0 +1,9 @@
+install(FILES CMakeLists.txt DESTINATION satu COMPONENT satu)
+install(FILES CMakeLists.txt DESTINATION dua COMPONENT dua)
+
+set(CPACK_PRE_BUILD_SCRIPTS "${CMAKE_CURRENT_LIST_DIR}/pre.cmake")
+set(CPACK_POST_BUILD_SCRIPTS "${CMAKE_CURRENT_LIST_DIR}/post.cmake")
+
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+ set(CPACK_COMPONENTS_ALL satu dua)
+endif()
diff --git a/Tests/RunCMake/CPack/tests/PROJECT_META/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/PROJECT_META/VerifyResult.cmake
index b3accb5..35a93d6 100644
--- a/Tests/RunCMake/CPack/tests/PROJECT_META/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/tests/PROJECT_META/VerifyResult.cmake
@@ -13,7 +13,7 @@ function(checkPackageURL FILE TAG EXPECTED_URL)
endif()
endforeach()
if(NOT _seen_url)
- message(FATAL_ERROR "The packge `${FILE}` do not have URL as expected")
+ message(FATAL_ERROR "The package `${FILE}` do not have URL as expected")
endif()
endfunction()
diff --git a/Tests/RunCMake/CTest/CMakeLists.txt b/Tests/RunCMake/CTest/CMakeLists.txt
index 73e6a78..f1a83e8 100644
--- a/Tests/RunCMake/CTest/CMakeLists.txt
+++ b/Tests/RunCMake/CTest/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
if(NOT NoProject)
project(${RunCMake_TEST} NONE)
endif()
diff --git a/Tests/RunCMake/CheckModules/CMakeLists.txt b/Tests/RunCMake/CheckModules/CMakeLists.txt
index 9872df2..842c5cf 100644
--- a/Tests/RunCMake/CheckModules/CMakeLists.txt
+++ b/Tests/RunCMake/CheckModules/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 2.8.12)
cmake_policy(SET CMP0054 NEW)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-result.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-stderr.txt b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/BuildDir--build-multiple-targets-fail-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt b/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt
index d2a2831..cf2c087 100644
--- a/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt
+++ b/Tests/RunCMake/CommandLine/BuildDir/CMakeLists.txt
@@ -5,3 +5,4 @@ add_custom_command(
add_custom_target(CustomTarget ALL DEPENDS output.txt)
add_custom_target(CustomTarget2 ALL DEPENDS output.txt)
add_custom_target(CustomTarget3 ALL DEPENDS output.txt)
+add_custom_target(CustomTargetFail COMMAND DoesNotExist)
diff --git a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
index 03286f1..e24e131 100644
--- a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
+++ b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
@@ -1 +1 @@
-^{"fileApi":{"requests":\[{"kind":"codemodel","version":\[{"major":2,"minor":1}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":true,"version":{.*}}$
+^{"fileApi":{"requests":\[{"kind":"codemodel","version":\[{"major":2,"minor":2}]},{"kind":"cache","version":\[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":\[{"major":1,"minor":0}]}]},"generators":\[.*\],"serverMode":true,"version":{.*}}$
diff --git a/Tests/RunCMake/CommandLine/E_compare_files-different-eol-stderr.txt b/Tests/RunCMake/CommandLine/E_compare_files-different-eol-stderr.txt
deleted file mode 100644
index 4729ccb..0000000
--- a/Tests/RunCMake/CommandLine/E_compare_files-different-eol-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-^Files ".*/compare_files/lf" to ".*/compare_files/crlf" are different.$
diff --git a/Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-stderr.txt b/Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-stderr.txt
deleted file mode 100644
index 8a9ca81..0000000
--- a/Tests/RunCMake/CommandLine/E_compare_files-ignore-eol-nonexistent-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-^Files "nonexistent_a" to "nonexistent_b" are different.$
diff --git a/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-result.txt b/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-result.txt
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-result.txt
@@ -0,0 +1 @@
+2
diff --git a/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-stderr.txt b/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_compare_files-invalid-arguments-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/interface_library/whitelist-result.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/interface_library/whitelist-result.txt
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-result.txt
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-stderr.txt
new file mode 100644
index 0000000..50d9b03
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-no-arg-stderr.txt
@@ -0,0 +1,3 @@
+^CMake Error: cmake version .*
+Usage: .* -E <command> \[arguments\.\.\.\]
+Available commands:
diff --git a/Tests/RunCMake/interface_library/target_commands-result.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/interface_library/target_commands-result.txt
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-result.txt
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-stderr.txt
new file mode 100644
index 0000000..21e60ee
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-no-directory-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: failed to create link .* no such file or directory
diff --git a/Tests/RunCMake/interface_library/invalid_signature-result.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/interface_library/invalid_signature-result.txt
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-result.txt
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-stderr.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-stderr.txt
new file mode 100644
index 0000000..a334571
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-non-existent-source-stderr.txt
@@ -0,0 +1 @@
+^failed to create hard link because source path .* does not exist
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-prereq-check.cmake b/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-prereq-check.cmake
new file mode 100644
index 0000000..5b97aec
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-prereq-check.cmake
@@ -0,0 +1,3 @@
+if(${actual_stderr_var} MATCHES "operation not permitted")
+ unset(msg)
+endif()
diff --git a/Tests/RunCMake/interface_library/invalid_name-result.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/interface_library/invalid_name-result.txt
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-result.txt
diff --git a/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-stderr.txt b/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-stderr.txt
new file mode 100644
index 0000000..a334571
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_create_hardlink-unresolved-symlink-stderr.txt
@@ -0,0 +1 @@
+^failed to create hard link because source path .* does not exist
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 973391d..2a5d5d3 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -22,6 +22,7 @@ run_cmake_command(E_compare_files-different-eol ${CMAKE_COMMAND} -E compare_file
run_cmake_command(E_compare_files-ignore-eol-same ${CMAKE_COMMAND} -E compare_files --ignore-eol ${RunCMake_SOURCE_DIR}/compare_files/lf ${RunCMake_SOURCE_DIR}/compare_files/crlf)
run_cmake_command(E_compare_files-ignore-eol-empty ${CMAKE_COMMAND} -E compare_files --ignore-eol ${RunCMake_SOURCE_DIR}/compare_files/empty1 ${RunCMake_SOURCE_DIR}/compare_files/empty2)
run_cmake_command(E_compare_files-ignore-eol-nonexistent ${CMAKE_COMMAND} -E compare_files --ignore-eol nonexistent_a nonexistent_b)
+run_cmake_command(E_compare_files-invalid-arguments ${CMAKE_COMMAND} -E compare_files file1.txt file2.txt file3.txt)
run_cmake_command(E_echo_append ${CMAKE_COMMAND} -E echo_append)
run_cmake_command(E_rename-no-arg ${CMAKE_COMMAND} -E rename)
run_cmake_command(E_server-arg ${CMAKE_COMMAND} -E server --extra-arg)
@@ -66,6 +67,32 @@ run_cmake_command(install-bad-dir
run_cmake_command(install-options-to-vars
${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-install-options-to-vars
--strip --prefix /var/test --config sample --component pack)
+run_cmake_command(install-default-dir-permissions-all
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwx,g=rx,o=rx)
+run_cmake_command(install-default-dir-permissions-afew
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwx,g=rx)
+run_cmake_command(install-default-dir-permissions-none
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars)
+run_cmake_command(install-default-dir-permissions-invalid-comma1
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwxg=,x)
+run_cmake_command(install-default-dir-permissions-invalid-comma2
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwxg,=x)
+run_cmake_command(install-default-dir-permissions-comma-at-the-end
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwx,)
+run_cmake_command(install-default-dir-permissions-invalid-assignment
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwx,=x)
+run_cmake_command(install-default-dir-permissions-assignment-at-the-end
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions u=rwx,g=)
+run_cmake_command(install-default-dir-permissions-assignment-at-the-beginning
+ ${CMAKE_COMMAND} --install ${RunCMake_SOURCE_DIR}/dir-permissions-install-options-to-vars
+ --default-directory-permissions =u=rwx,g=rx)
run_cmake_command(cache-bad-entry
${CMAKE_COMMAND} --build ${RunCMake_SOURCE_DIR}/cache-bad-entry/)
@@ -134,6 +161,8 @@ function(run_BuildDir)
${CMAKE_COMMAND} --build BuildDir-build --target CustomTarget)
run_cmake_command(BuildDir--build-multiple-targets ${CMAKE_COMMAND} -E chdir ..
${CMAKE_COMMAND} --build BuildDir-build -t CustomTarget2 --target CustomTarget3)
+ run_cmake_command(BuildDir--build-multiple-targets-fail ${CMAKE_COMMAND} -E chdir ..
+ ${CMAKE_COMMAND} --build BuildDir-build -t CustomTargetFail --target CustomTarget3)
run_cmake_command(BuildDir--build-multiple-targets-jobs ${CMAKE_COMMAND} -E chdir ..
${CMAKE_COMMAND} --build BuildDir-build --target CustomTarget CustomTarget2 -j2 --target CustomTarget3)
run_cmake_command(BuildDir--build-multiple-targets-with-clean-first ${CMAKE_COMMAND} -E chdir ..
@@ -319,6 +348,42 @@ run_cmake_command(E_create_symlink-no-replace-dir
${CMAKE_COMMAND} -E create_symlink T .
)
+#create hard link tests
+run_cmake_command(E_create_hardlink-no-arg
+ ${CMAKE_COMMAND} -E create_hardlink
+ )
+
+set(dir ${RunCMake_BINARY_DIR}/hardlink_tests)
+file(REMOVE_RECURSE "${dir}")
+file(MAKE_DIRECTORY ${dir})
+
+run_cmake_command(E_create_hardlink-non-existent-source
+ ${CMAKE_COMMAND} -E create_hardlink ${dir}/I_dont_exist ${dir}/link
+ )
+
+file(TOUCH ${dir}/1)
+
+run_cmake_command(E_create_hardlink-ok
+ ${CMAKE_COMMAND} -E create_hardlink ${dir}/1 ${dir}/1-link
+ )
+
+run_cmake_command(E_create_hardlink-no-directory
+ ${CMAKE_COMMAND} -E create_hardlink ${dir}/1 ${dir}/a/1-link
+ )
+
+#On Windows, if the user does not have sufficient privileges
+#don't fail this test
+set(RunCMake_DEFAULT_stderr "(operation not permitted)?")
+run_cmake_command(E_create_hardlink-unresolved-symlink-prereq
+ ${CMAKE_COMMAND} -E create_symlink ${dir}/1 ${dir}/1-symlink
+ )
+file(REMOVE ${dir}/1)
+
+run_cmake_command(E_create_hardlink-unresolved-symlink
+ ${CMAKE_COMMAND} -E create_hardlink ${dir}/1-symlink ${dir}/1s-link
+ )
+unset(RunCMake_DEFAULT_stderr)
+
set(in ${RunCMake_SOURCE_DIR}/copy_input)
set(out ${RunCMake_BINARY_DIR}/copy_output)
file(REMOVE_RECURSE "${out}")
@@ -714,15 +779,15 @@ function(run_llvm_rc)
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
run_cmake_command(llvm_rc_no_args ${CMAKE_COMMAND} -E cmake_llvm_rc)
run_cmake_command(llvm_rc_no_-- ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test")
- run_cmake_command(llvm_rc_empty_preprocessor ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp -- ${CMAKE_COMMAND} -E echo "This is a test")
- run_cmake_command(llvm_rc_failing_first_command ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -P FailedProgram.cmake -- ${CMAKE_COMMAND} -E echo "This is a test")
- run_cmake_command(llvm_rc_failing_second_command ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test" -- ${CMAKE_COMMAND} -P FailedProgram.cmake )
+ run_cmake_command(llvm_rc_empty_preprocessor ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ++ ${CMAKE_COMMAND} -E echo "This is a test")
+ run_cmake_command(llvm_rc_failing_first_command ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -P FailedProgram.cmake ++ ${CMAKE_COMMAND} -E echo "This is a test")
+ run_cmake_command(llvm_rc_failing_second_command ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test" ++ ${CMAKE_COMMAND} -P FailedProgram.cmake )
if(EXISTS ${RunCMake_TEST_BINARY_DIR}/test.tmp)
message(SEND_ERROR "${test} - FAILED:\n"
"test.tmp was not deleted")
endif()
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir")
- run_cmake_command(llvm_rc_full_run ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test" -- ${CMAKE_COMMAND} -E copy test.tmp SOURCE_DIR/llvmrc.result )
+ run_cmake_command(llvm_rc_full_run ${CMAKE_COMMAND} -E cmake_llvm_rc ${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir/source_file test.tmp ${CMAKE_COMMAND} -E echo "This is a test" ++ ${CMAKE_COMMAND} -E copy test.tmp SOURCE_DIR/llvmrc.result )
if(EXISTS ${RunCMake_TEST_BINARY_DIR}/ExpandSourceDir/test.tmp)
message(SEND_ERROR "${test} - FAILED:\n"
"test.tmp was not deleted")
diff --git a/Tests/RunCMake/CommandLine/dir-permissions-install-options-to-vars/cmake_install.cmake b/Tests/RunCMake/CommandLine/dir-permissions-install-options-to-vars/cmake_install.cmake
new file mode 100644
index 0000000..42ef745
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/dir-permissions-install-options-to-vars/cmake_install.cmake
@@ -0,0 +1,3 @@
+if(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS)
+ message("CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS is ${CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS}")
+endif()
diff --git a/Tests/RunCMake/interface_library/genex_link-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-result.txt
index 573541a..573541a 100644
--- a/Tests/RunCMake/interface_library/genex_link-result.txt
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-result.txt
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-stderr.txt
new file mode 100644
index 0000000..42f4b3f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-afew-stderr.txt
@@ -0,0 +1 @@
+CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS is OWNER_READ;OWNER_WRITE;OWNER_EXECUTE;GROUP_READ;GROUP_EXECUTE
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-all-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-all-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-all-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-all-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-all-stderr.txt
new file mode 100644
index 0000000..813d9c3
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-all-stderr.txt
@@ -0,0 +1 @@
+CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS is OWNER_READ;OWNER_WRITE;OWNER_EXECUTE;GROUP_READ;GROUP_EXECUTE;WORLD_READ;WORLD_EXECUTE
diff --git a/Tests/RunCMake/interface_library/global-interface-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/interface_library/global-interface-result.txt
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-result.txt
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-stderr.txt
new file mode 100644
index 0000000..1b80952
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-beginning-stderr.txt
@@ -0,0 +1 @@
+--default-directory-permissions is in incorrect format
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-stderr.txt
new file mode 100644
index 0000000..6680932
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-assignment-at-the-end-stderr.txt
@@ -0,0 +1 @@
+CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS is OWNER_READ;OWNER_WRITE;OWNER_EXECUTE
diff --git a/Tests/RunCMake/interface_library/add_custom_command-TARGET-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/interface_library/add_custom_command-TARGET-result.txt
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-result.txt
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-stderr.txt
new file mode 100644
index 0000000..1b80952
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-comma-at-the-end-stderr.txt
@@ -0,0 +1 @@
+--default-directory-permissions is in incorrect format
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported-result.txt
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-result.txt
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-stderr.txt
new file mode 100644
index 0000000..1b80952
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-assignment-stderr.txt
@@ -0,0 +1 @@
+--default-directory-permissions is in incorrect format
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface-result.txt
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-result.txt
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-stderr.txt
new file mode 100644
index 0000000..1b80952
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma1-stderr.txt
@@ -0,0 +1 @@
+--default-directory-permissions is in incorrect format
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value-result.txt
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-result.txt
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-stderr.txt
new file mode 100644
index 0000000..1b80952
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-invalid-comma2-stderr.txt
@@ -0,0 +1 @@
+--default-directory-permissions is in incorrect format
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-none-result.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-none-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-none-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CommandLine/install-default-dir-permissions-none-stderr.txt b/Tests/RunCMake/CommandLine/install-default-dir-permissions-none-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/install-default-dir-permissions-none-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CompatibleInterface/CMakeLists.txt b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
index f452db1..ebab7a3 100644
--- a/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
+++ b/Tests/RunCMake/CompatibleInterface/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
index 0196611..64b52d9 100644
--- a/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
+++ b/Tests/RunCMake/CompatibleInterface/DebugProperties.cmake
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.3)
project(CompatibleInterface)
diff --git a/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake b/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake
index 5772856..f072eb0 100644
--- a/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake
+++ b/Tests/RunCMake/CompatibleInterface/InterfaceString-builtin-prop.cmake
@@ -5,5 +5,5 @@ add_library(bar UNKNOWN IMPORTED)
set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_STRING INCLUDE_DIRECTORIES)
add_executable(user main.cpp)
-set_property(TARGET user PROPERTY INCLUDE_DIRECTORIES bar_inc)
+set_property(TARGET user PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/bar_inc)
target_link_libraries(user foo bar)
diff --git a/Tests/RunCMake/CompilerArgs/C.cmake b/Tests/RunCMake/CompilerArgs/C.cmake
new file mode 100644
index 0000000..96b004b
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/C.cmake
@@ -0,0 +1,3 @@
+enable_language(C)
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+add_executable(main main.c)
diff --git a/Tests/RunCMake/interface_library/CMakeLists.txt b/Tests/RunCMake/CompilerArgs/CMakeLists.txt
index 12cd3c7..18dfd26 100644
--- a/Tests/RunCMake/interface_library/CMakeLists.txt
+++ b/Tests/RunCMake/CompilerArgs/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.2)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CompilerArgs/CXX.cmake b/Tests/RunCMake/CompilerArgs/CXX.cmake
new file mode 100644
index 0000000..3d2ee00
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/CXX.cmake
@@ -0,0 +1,3 @@
+enable_language(CXX)
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+add_executable(main main.cxx)
diff --git a/Tests/RunCMake/CompilerArgs/FindCCompiler.cmake b/Tests/RunCMake/CompilerArgs/FindCCompiler.cmake
new file mode 100644
index 0000000..aeaaf7f
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/FindCCompiler.cmake
@@ -0,0 +1,2 @@
+enable_language(C)
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/C_comp.cmake" "set(temp_CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\")\n")
diff --git a/Tests/RunCMake/CompilerArgs/FindCXXCompiler.cmake b/Tests/RunCMake/CompilerArgs/FindCXXCompiler.cmake
new file mode 100644
index 0000000..663ac83
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/FindCXXCompiler.cmake
@@ -0,0 +1,2 @@
+enable_language(CXX)
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CXX_comp.cmake" "set(temp_CMAKE_CXX_COMPILER \"${CMAKE_CXX_COMPILER}\")\n")
diff --git a/Tests/RunCMake/CompilerArgs/RunCMakeTest.cmake b/Tests/RunCMake/CompilerArgs/RunCMakeTest.cmake
new file mode 100644
index 0000000..9e5a18a
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/RunCMakeTest.cmake
@@ -0,0 +1,58 @@
+include(RunCMake)
+
+function(find_compiler lang)
+ # Detect the compiler in use in the current environment.
+ run_cmake(Find${lang}Compiler)
+ # Use the detected compiler
+ include(${RunCMake_BINARY_DIR}/Find${lang}Compiler-build/${lang}_comp.cmake)
+ if(NOT temp_CMAKE_${lang}_COMPILER)
+ message(FATAL_ERROR "FindCompiler provided no compiler!")
+ endif()
+ # Create a toolchain file
+ set(__test_compiler_var CMAKE_${lang}_COMPILER)
+ set(__test_compiler "${temp_CMAKE_${lang}_COMPILER}")
+ configure_file(${RunCMake_SOURCE_DIR}/toolchain.cmake.in
+ ${RunCMake_BINARY_DIR}/Find${lang}Compiler-build/toolchain_${lang}_comp.cmake @ONLY)
+endfunction()
+
+function(run_compiler_env lang)
+ # Use the correct compiler
+ include(${RunCMake_BINARY_DIR}/Find${lang}Compiler-build/${lang}_comp.cmake)
+
+ # Use a single build tree for tests without cleaning.
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${lang}-env-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ # Set the compiler
+ if(lang STREQUAL "C")
+ set(ENV{CC} "'${temp_CMAKE_${lang}_COMPILER}' -DFOO1 -DFOO2")
+ else()
+ set(ENV{${lang}} "'${temp_CMAKE_${lang}_COMPILER}' -DFOO1 -DFOO2")
+ endif()
+
+ run_cmake(${lang})
+ run_cmake_command(${lang}-Build ${CMAKE_COMMAND} --build . ${verbose_args})
+endfunction()
+
+function(run_compiler_tc lang)
+ # Use a single build tree for tests without cleaning.
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${lang}-tc-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ set(RunCMake_TEST_OPTIONS
+ -DCMAKE_TOOLCHAIN_FILE=${RunCMake_BINARY_DIR}/Find${lang}Compiler-build/toolchain_${lang}_comp.cmake)
+ run_cmake(${lang})
+ run_cmake_command(${lang}-Build ${CMAKE_COMMAND} --build . ${verbose_args})
+endfunction()
+
+set(langs C CXX)
+
+foreach(lang ${langs})
+ find_compiler(${lang})
+ run_compiler_env(${lang})
+ run_compiler_tc(${lang})
+endforeach()
diff --git a/Tests/RunCMake/CompilerArgs/main.c b/Tests/RunCMake/CompilerArgs/main.c
new file mode 100644
index 0000000..b526135
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/main.c
@@ -0,0 +1,10 @@
+#ifndef FOO1
+# error Missing FOO1
+#endif
+#ifndef FOO2
+# error Missing FOO2
+#endif
+int main(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/CompilerArgs/main.cxx b/Tests/RunCMake/CompilerArgs/main.cxx
new file mode 100644
index 0000000..db90e93
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/main.cxx
@@ -0,0 +1,10 @@
+#ifndef FOO1
+# error Missing FOO1
+#endif
+#ifndef FOO2
+# error Missing FOO2
+#endif
+int main()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/CompilerArgs/toolchain.cmake.in b/Tests/RunCMake/CompilerArgs/toolchain.cmake.in
new file mode 100644
index 0000000..ff77639
--- /dev/null
+++ b/Tests/RunCMake/CompilerArgs/toolchain.cmake.in
@@ -0,0 +1 @@
+set(@__test_compiler_var@ "@__test_compiler@" -DFOO1 -DFOO2)
diff --git a/Tests/RunCMake/CompilerChange/CMakeLists.txt b/Tests/RunCMake/CompilerChange/CMakeLists.txt
index b4b3016..14c47ad 100644
--- a/Tests/RunCMake/CompilerChange/CMakeLists.txt
+++ b/Tests/RunCMake/CompilerChange/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
if(NOT RunCMake_TEST)
set(RunCMake_TEST "$ENV{RunCMake_TEST}") # needed when cache is deleted
endif()
diff --git a/Tests/RunCMake/CompilerNotFound/CMakeLists.txt b/Tests/RunCMake/CompilerNotFound/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/CompilerNotFound/CMakeLists.txt
+++ b/Tests/RunCMake/CompilerNotFound/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Configure/CMakeLists.txt b/Tests/RunCMake/Configure/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/Configure/CMakeLists.txt
+++ b/Tests/RunCMake/Configure/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/CMakeLists.txt b/Tests/RunCMake/DependencyGraph/CMakeLists.txt
new file mode 100644
index 0000000..b646c4a
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.18)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeCommon.cmake b/Tests/RunCMake/DependencyGraph/OptimizeCommon.cmake
new file mode 100644
index 0000000..4954bc4
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeCommon.cmake
@@ -0,0 +1,40 @@
+enable_language(C)
+
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY out)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY out)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY out)
+
+add_library(SharedTop SHARED mylib.c)
+add_library(StaticTop STATIC mylib.c)
+add_library(StaticMiddle STATIC mylib.c)
+
+add_library(StaticNone STATIC mylib.c)
+add_library(StaticPreBuild STATIC mylib.c)
+add_library(StaticPreLink STATIC mylib.c)
+add_library(StaticPostBuild STATIC mylib.c)
+add_library(StaticCc STATIC mylibcc.c)
+
+add_custom_command(TARGET StaticPreBuild PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E true)
+add_custom_command(TARGET StaticPreLink PRE_LINK
+ COMMAND ${CMAKE_COMMAND} -E true)
+add_custom_command(TARGET StaticPostBuild POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E true)
+add_custom_command(OUTPUT mylibcc.c
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/mylib.c ${CMAKE_BINARY_DIR}/mylibcc.c)
+
+target_link_libraries(SharedTop PRIVATE StaticMiddle)
+target_link_libraries(StaticTop PRIVATE StaticMiddle)
+target_link_libraries(StaticMiddle PRIVATE StaticNone StaticPreBuild StaticPreLink StaticPostBuild StaticCc)
+
+if(OPTIMIZE_TOP)
+ set_target_properties(SharedTop StaticTop PROPERTIES
+ OPTIMIZE_DEPENDENCIES TRUE)
+endif()
+if(OPTIMIZE_MIDDLE)
+ set_target_properties(StaticMiddle PROPERTIES
+ OPTIMIZE_DEPENDENCIES TRUE)
+endif()
+
+include(WriteTargets.cmake)
+write_targets()
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-check.cmake
new file mode 100644
index 0000000..1020cb3
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-check.cmake
@@ -0,0 +1,5 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${FortranTop_TARGET_FILE}
+ ${FortranBottom_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-stderr.txt b/Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-both-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-both.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-both.cmake
new file mode 100644
index 0000000..581fd46
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-both.cmake
@@ -0,0 +1 @@
+include(OptimizeFortranCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-check.cmake
new file mode 100644
index 0000000..5c7e8cd
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-check.cmake
@@ -0,0 +1,6 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${FortranTop_TARGET_FILE}
+ ${CMiddle_TARGET_FILE}
+ ${FortranBottom_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-stderr.txt b/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle.cmake
new file mode 100644
index 0000000..581fd46
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-middle.cmake
@@ -0,0 +1 @@
+include(OptimizeFortranCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-check.cmake
new file mode 100644
index 0000000..5c7e8cd
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-check.cmake
@@ -0,0 +1,6 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${FortranTop_TARGET_FILE}
+ ${CMiddle_TARGET_FILE}
+ ${FortranBottom_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-stderr.txt b/Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-none-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-none.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-none.cmake
new file mode 100644
index 0000000..581fd46
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-none.cmake
@@ -0,0 +1 @@
+include(OptimizeFortranCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-check.cmake
new file mode 100644
index 0000000..1020cb3
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-check.cmake
@@ -0,0 +1,5 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${FortranTop_TARGET_FILE}
+ ${FortranBottom_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-stderr.txt b/Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-top-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortran-top.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortran-top.cmake
new file mode 100644
index 0000000..581fd46
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortran-top.cmake
@@ -0,0 +1 @@
+include(OptimizeFortranCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeFortranCommon.cmake b/Tests/RunCMake/DependencyGraph/OptimizeFortranCommon.cmake
new file mode 100644
index 0000000..354d3fc
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeFortranCommon.cmake
@@ -0,0 +1,25 @@
+enable_language(C)
+enable_language(Fortran)
+
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY out)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY out)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY out)
+
+add_library(FortranTop STATIC mylib.f90)
+add_library(CMiddle STATIC mylib.c)
+add_library(FortranBottom STATIC mylib.f90)
+
+target_link_libraries(FortranTop PRIVATE CMiddle)
+target_link_libraries(CMiddle PRIVATE FortranBottom)
+
+if(OPTIMIZE_TOP)
+ set_target_properties(FortranTop PROPERTIES
+ OPTIMIZE_DEPENDENCIES TRUE)
+endif()
+if(OPTIMIZE_MIDDLE)
+ set_target_properties(CMiddle PROPERTIES
+ OPTIMIZE_DEPENDENCIES TRUE)
+endif()
+
+include(WriteTargets.cmake)
+write_targets()
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-both-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-both-build-check.cmake
new file mode 100644
index 0000000..312de04
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-both-build-check.cmake
@@ -0,0 +1,11 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${SharedTop_TARGET_FILE}
+ ${SharedTop_TARGET_LINKER_FILE}
+ ${StaticMiddle_TARGET_FILE}
+ ${StaticNone_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-both.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-both.cmake
new file mode 100644
index 0000000..c150e62
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-both.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-middle-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-middle-build-check.cmake
new file mode 100644
index 0000000..312de04
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-middle-build-check.cmake
@@ -0,0 +1,11 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${SharedTop_TARGET_FILE}
+ ${SharedTop_TARGET_LINKER_FILE}
+ ${StaticMiddle_TARGET_FILE}
+ ${StaticNone_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-middle.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-middle.cmake
new file mode 100644
index 0000000..c150e62
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-middle.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-none-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-none-build-check.cmake
new file mode 100644
index 0000000..312de04
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-none-build-check.cmake
@@ -0,0 +1,11 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${SharedTop_TARGET_FILE}
+ ${SharedTop_TARGET_LINKER_FILE}
+ ${StaticMiddle_TARGET_FILE}
+ ${StaticNone_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-none.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-none.cmake
new file mode 100644
index 0000000..c150e62
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-none.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-top-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-top-build-check.cmake
new file mode 100644
index 0000000..312de04
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-top-build-check.cmake
@@ -0,0 +1,11 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${SharedTop_TARGET_FILE}
+ ${SharedTop_TARGET_LINKER_FILE}
+ ${StaticMiddle_TARGET_FILE}
+ ${StaticNone_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeShared-top.cmake b/Tests/RunCMake/DependencyGraph/OptimizeShared-top.cmake
new file mode 100644
index 0000000..c150e62
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeShared-top.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-both-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-both-build-check.cmake
new file mode 100644
index 0000000..5222ed7
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-both-build-check.cmake
@@ -0,0 +1,8 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${StaticTop_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-both.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-both.cmake
new file mode 100644
index 0000000..c150e62
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-both.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-middle-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-middle-build-check.cmake
new file mode 100644
index 0000000..5cba223
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-middle-build-check.cmake
@@ -0,0 +1,10 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${StaticTop_TARGET_FILE}
+ ${StaticMiddle_TARGET_FILE}
+ ${StaticNone_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-middle.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-middle.cmake
new file mode 100644
index 0000000..c150e62
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-middle.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-none-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-none-build-check.cmake
new file mode 100644
index 0000000..5cba223
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-none-build-check.cmake
@@ -0,0 +1,10 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${StaticTop_TARGET_FILE}
+ ${StaticMiddle_TARGET_FILE}
+ ${StaticNone_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-none.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-none.cmake
new file mode 100644
index 0000000..c150e62
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-none.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-top-build-check.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-top-build-check.cmake
new file mode 100644
index 0000000..5222ed7
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-top-build-check.cmake
@@ -0,0 +1,8 @@
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+check_files(${RunCMake_TEST_BINARY_DIR}/out
+ ${StaticTop_TARGET_FILE}
+ ${StaticPreBuild_TARGET_FILE}
+ ${StaticPreLink_TARGET_FILE}
+ ${StaticPostBuild_TARGET_FILE}
+ ${StaticCc_TARGET_FILE}
+ )
diff --git a/Tests/RunCMake/DependencyGraph/OptimizeStatic-top.cmake b/Tests/RunCMake/DependencyGraph/OptimizeStatic-top.cmake
new file mode 100644
index 0000000..c150e62
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/OptimizeStatic-top.cmake
@@ -0,0 +1 @@
+include(OptimizeCommon.cmake)
diff --git a/Tests/RunCMake/DependencyGraph/Property.cmake b/Tests/RunCMake/DependencyGraph/Property.cmake
new file mode 100644
index 0000000..08fdd2b
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/Property.cmake
@@ -0,0 +1,24 @@
+enable_language(C)
+
+add_library(Unset STATIC mylib.c)
+
+set(CMAKE_OPTIMIZE_DEPENDENCIES TRUE)
+add_library(SetTrue STATIC mylib.c)
+
+set(CMAKE_OPTIMIZE_DEPENDENCIES FALSE)
+add_library(SetFalse STATIC mylib.c)
+
+get_property(_set TARGET Unset PROPERTY OPTIMIZE_DEPENDENCIES SET)
+if(_set)
+ message(SEND_ERROR "OPTIMIZE_DEPENDENCIES property should not be set on Unset target")
+endif()
+
+get_property(_true TARGET SetTrue PROPERTY OPTIMIZE_DEPENDENCIES)
+if(NOT _true STREQUAL "TRUE")
+ message(SEND_ERROR "OPTIMIZE_DEPENDENCIES property should be TRUE on SetTrue target")
+endif()
+
+get_property(_false TARGET SetFalse PROPERTY OPTIMIZE_DEPENDENCIES)
+if(NOT _false STREQUAL "FALSE")
+ message(SEND_ERROR "OPTIMIZE_DEPENDENCIES property should be FALSE on SetFalse target")
+endif()
diff --git a/Tests/RunCMake/DependencyGraph/RunCMakeTest.cmake b/Tests/RunCMake/DependencyGraph/RunCMakeTest.cmake
new file mode 100644
index 0000000..cb0d541
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/RunCMakeTest.cmake
@@ -0,0 +1,60 @@
+include(RunCMake)
+
+function(check_files dir)
+ set(expected ${ARGN})
+ list(FILTER expected EXCLUDE REGEX "^$")
+ list(REMOVE_DUPLICATES expected)
+ list(SORT expected)
+
+ file(GLOB_RECURSE glob "${dir}/*")
+ set(actual)
+ foreach(i IN LISTS glob)
+ if(NOT i MATCHES "(\\.manifest$)|(\\.exp$)|(\\.tds$)")
+ list(APPEND actual ${i})
+ endif()
+ endforeach()
+ list(REMOVE_DUPLICATES actual)
+ list(SORT actual)
+
+ if(NOT "${expected}" STREQUAL "${actual}")
+ string(REPLACE ";" "\n " expected_formatted "${expected}")
+ string(REPLACE ";" "\n " actual_formatted "${actual}")
+ string(APPEND RunCMake_TEST_FAILED "Actual files did not match expected\nExpected:\n ${expected_formatted}\nActual:\n ${actual_formatted}\n")
+ endif()
+
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
+endfunction()
+
+function(run_cmake_build name)
+ set(RunCMake_TEST_NO_CLEAN TRUE)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-build)
+ file(REMOVE_RECURSE ${RunCMake_TEST_BINARY_DIR})
+ if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release)
+ endif()
+ run_cmake(${name})
+ set(RunCMake_TEST_OPTIONS)
+ run_cmake_command(${name}-build ${CMAKE_COMMAND}
+ --build ${RunCMake_TEST_BINARY_DIR}
+ --config Release
+ --target ${ARGN})
+endfunction()
+
+function(run_optimize_test name)
+ set(RunCMake_TEST_OPTIONS)
+ run_cmake_build(${name}-none ${ARGN})
+ set(RunCMake_TEST_OPTIONS -DOPTIMIZE_TOP=TRUE)
+ run_cmake_build(${name}-top ${ARGN})
+ set(RunCMake_TEST_OPTIONS -DOPTIMIZE_MIDDLE=TRUE)
+ run_cmake_build(${name}-middle ${ARGN})
+ set(RunCMake_TEST_OPTIONS -DOPTIMIZE_TOP=TRUE -DOPTIMIZE_MIDDLE=TRUE)
+ run_cmake_build(${name}-both ${ARGN})
+endfunction()
+
+run_cmake(Property)
+
+run_optimize_test(OptimizeShared SharedTop)
+run_optimize_test(OptimizeStatic StaticTop)
+if(CMAKE_Fortran_COMPILER)
+ run_optimize_test(OptimizeFortran FortranTop)
+endif()
diff --git a/Tests/RunCMake/DependencyGraph/WriteTargets.cmake b/Tests/RunCMake/DependencyGraph/WriteTargets.cmake
new file mode 100644
index 0000000..e1012c1
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/WriteTargets.cmake
@@ -0,0 +1,16 @@
+function(write_targets)
+ set(_input "")
+
+ get_property(_targets DIRECTORY . PROPERTY BUILDSYSTEM_TARGETS)
+ foreach(_t IN LISTS _targets)
+ get_property(_type TARGET "${_t}" PROPERTY TYPE)
+ if(_type STREQUAL "SHARED_LIBRARY")
+ string(APPEND _input "set(${_t}_TARGET_FILE [==[$<TARGET_FILE:${_t}>]==])\n")
+ string(APPEND _input "set(${_t}_TARGET_LINKER_FILE [==[$<TARGET_LINKER_FILE:${_t}>]==])\n")
+ elseif(_type STREQUAL "STATIC_LIBRARY")
+ string(APPEND _input "set(${_t}_TARGET_FILE [==[$<TARGET_FILE:${_t}>]==])\n")
+ endif()
+ endforeach()
+
+ file(GENERATE OUTPUT target_files.cmake CONTENT "${_input}" CONDITION $<CONFIG:Release>)
+endfunction()
diff --git a/Tests/RunCMake/DependencyGraph/mylib.c b/Tests/RunCMake/DependencyGraph/mylib.c
new file mode 100644
index 0000000..5422fe3
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/mylib.c
@@ -0,0 +1,6 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void mylib(void)
+{
+}
diff --git a/Tests/RunCMake/DependencyGraph/mylib.f90 b/Tests/RunCMake/DependencyGraph/mylib.f90
new file mode 100644
index 0000000..104768f
--- /dev/null
+++ b/Tests/RunCMake/DependencyGraph/mylib.f90
@@ -0,0 +1,3 @@
+function mylib_fortran()
+ mylib_fortran = 42
+end function mylib_fortran
diff --git a/Tests/RunCMake/DisallowedCommands/CMakeLists.txt b/Tests/RunCMake/DisallowedCommands/CMakeLists.txt
index 12cd3c7..4b3de84 100644
--- a/Tests/RunCMake/DisallowedCommands/CMakeLists.txt
+++ b/Tests/RunCMake/DisallowedCommands/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt b/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt
new file mode 100644
index 0000000..74b3ff8
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.3)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake b/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake
new file mode 100644
index 0000000..2b4fc89
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake
@@ -0,0 +1,26 @@
+include(RunCMake)
+
+function(run_single_config_test label config exclude_from_all_value expectation)
+ set(case single-config)
+ message("-- Starting ${case} test: ${label}")
+ set(full_case_name "${case}-build-${config}")
+ set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${full_case_name}/")
+ run_cmake_with_options(${case}
+ -DCMAKE_BUILD_TYPE=${config}
+ -DTOOL_EXCLUDE_FROM_ALL=${exclude_from_all_value})
+ set(RunCMake_TEST_NO_CLEAN 1)
+ include(${RunCMake_TEST_BINARY_DIR}/target_files_${config}.cmake)
+ run_cmake_command(${case}-build ${CMAKE_COMMAND} --build . --config ${config})
+endfunction()
+
+run_single_config_test("explictly not excluded" Debug 0 "should_exist")
+run_single_config_test("excluded" Debug 1 "should_not_exist")
+
+if(RunCMake_GENERATOR MATCHES "^(Xcode|Visual Studio)")
+ run_cmake(error-on-mixed-config)
+else()
+ run_single_config_test("explicitly not excluded with genex"
+ Release $<CONFIG:Debug> "should_exist")
+ run_single_config_test("excluded with genex"
+ Debug $<CONFIG:Debug> "should_not_exist")
+endif()
diff --git a/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-result.txt b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt
new file mode 100644
index 0000000..6dc785f
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt
@@ -0,0 +1,3 @@
+CMake Error in CMakeLists.txt:
+ The EXCLUDE_FROM_ALL property of target "release_only_tool" varies by
+ configuration. This is not supported by the "[^"]+"
diff --git a/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config.cmake b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config.cmake
new file mode 100644
index 0000000..6c0ed1d
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config.cmake
@@ -0,0 +1,6 @@
+enable_language(C)
+
+set(CMAKE_CONFIGURATION_TYPES "Release;Debug" CACHE STRING "")
+
+add_executable(release_only_tool main.c)
+set_property(TARGET release_only_tool PROPERTY EXCLUDE_FROM_ALL "$<NOT:$<CONFIG:Release>>")
diff --git a/Tests/RunCMake/ExcludeFromAll/main.c b/Tests/RunCMake/ExcludeFromAll/main.c
new file mode 100644
index 0000000..f8b643a
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/main.c
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/ExcludeFromAll/single-config-build-check.cmake b/Tests/RunCMake/ExcludeFromAll/single-config-build-check.cmake
new file mode 100644
index 0000000..1c455f2
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/single-config-build-check.cmake
@@ -0,0 +1,17 @@
+if(expectation STREQUAL "should_not_exist")
+ set(should_exist FALSE)
+elseif(expectation STREQUAL "should_exist")
+ set(should_exist TRUE)
+else()
+ message(FATAL_ERROR "Encountered unknown expectation: ${expectation}")
+endif()
+
+if(EXISTS "${TARGET_FILE_tool_${config}}")
+ if(NOT should_exist)
+ message(FATAL_ERROR "${TARGET_FILE_tool_${config}} should not exist.")
+ endif()
+else()
+ if(should_exist)
+ message(FATAL_ERROR "${TARGET_FILE_tool_${config}} should exist.")
+ endif()
+endif()
diff --git a/Tests/RunCMake/ExcludeFromAll/single-config.cmake b/Tests/RunCMake/ExcludeFromAll/single-config.cmake
new file mode 100644
index 0000000..aa49c21
--- /dev/null
+++ b/Tests/RunCMake/ExcludeFromAll/single-config.cmake
@@ -0,0 +1,7 @@
+enable_language(C)
+add_executable(tool main.c)
+set_property(TARGET tool PROPERTY EXCLUDE_FROM_ALL "${TOOL_EXCLUDE_FROM_ALL}")
+
+file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/target_files_$<CONFIG>.cmake" CONTENT [[
+set(TARGET_FILE_tool_$<CONFIG> [==[$<TARGET_FILE:tool>]==])
+]])
diff --git a/Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt b/Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt
+++ b/Tests/RunCMake/ExportWithoutLanguage/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExternalData/CMakeLists.txt b/Tests/RunCMake/ExternalData/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/ExternalData/CMakeLists.txt
+++ b/Tests/RunCMake/ExternalData/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExternalProject/DownloadInactivityResume.cmake b/Tests/RunCMake/ExternalProject/DownloadInactivityResume.cmake
new file mode 100644
index 0000000..d34482d
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadInactivityResume.cmake
@@ -0,0 +1,5 @@
+include(ExternalProject)
+ExternalProject_Add(MyProj URL ${SERVER_URL} INACTIVITY_TIMEOUT 2 DOWNLOAD_NO_EXTRACT TRUE
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND "")
diff --git a/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-result.txt b/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-stdout.txt b/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-stdout.txt
new file mode 100644
index 0000000..3238147
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout-build-stdout.txt
@@ -0,0 +1 @@
+(Timeout was reached)?
diff --git a/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout.cmake b/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout.cmake
new file mode 100644
index 0000000..d34482d
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadInactivityTimeout.cmake
@@ -0,0 +1,5 @@
+include(ExternalProject)
+ExternalProject_Add(MyProj URL ${SERVER_URL} INACTIVITY_TIMEOUT 2 DOWNLOAD_NO_EXTRACT TRUE
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND "")
diff --git a/Tests/RunCMake/ExternalProject/DownloadServer.py b/Tests/RunCMake/ExternalProject/DownloadServer.py
new file mode 100644
index 0000000..ac0769f
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadServer.py
@@ -0,0 +1,42 @@
+from http.server import HTTPServer, BaseHTTPRequestHandler
+import argparse
+import time
+import subprocess
+import sys
+import os
+args = None
+outerthread = None
+
+class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
+ def do_GET(self):
+ self.send_response(200)
+ self.end_headers()
+ data = b'D'
+
+ if args.speed_limit:
+ slow_deadline = time.time()+args.limit_duration
+
+ while time.time() < slow_deadline:
+ self.wfile.write(data)
+ if args.speed_limit:
+ time.sleep(1.1)
+
+ data = data * 100
+ self.wfile.write(data)
+ self.close_connection = True
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--speed_limit', help='transfer rate limitation', action='store_true',default=False)
+ parser.add_argument('--limit_duration', help='duration of the transfer rate limitation',default=1, type=float)
+ parser.add_argument('--file', help='file to write the url to connect to')
+ parser.add_argument('--subprocess', action='store_true')
+ args = parser.parse_args()
+ if not args.subprocess:
+ subprocess.Popen([sys.executable]+sys.argv+['--subprocess'],stdin=subprocess.DEVNULL, stderr=subprocess.DEVNULL,stdout=subprocess.DEVNULL)
+ else:
+ httpd = HTTPServer(('localhost', 0), SimpleHTTPRequestHandler)
+ with open(args.file,"w") as f:
+ f.write('http://localhost:{}/test'.format(httpd.socket.getsockname()[1]))
+ httpd.handle_request()
+ os.remove(args.file)
diff --git a/Tests/RunCMake/ExternalProject/DownloadTimeout-build-result.txt b/Tests/RunCMake/ExternalProject/DownloadTimeout-build-result.txt
new file mode 100644
index 0000000..c20fd86
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadTimeout-build-result.txt
@@ -0,0 +1 @@
+^[^0]
diff --git a/Tests/RunCMake/ExternalProject/DownloadTimeout-build-stderr.txt b/Tests/RunCMake/ExternalProject/DownloadTimeout-build-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadTimeout-build-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/ExternalProject/DownloadTimeout.cmake b/Tests/RunCMake/ExternalProject/DownloadTimeout.cmake
new file mode 100644
index 0000000..c90b4ba
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/DownloadTimeout.cmake
@@ -0,0 +1,5 @@
+include(ExternalProject)
+set(source_dir "${CMAKE_CURRENT_BINARY_DIR}/DownloadTimeout")
+file(REMOVE_RECURSE "${source_dir}")
+file(MAKE_DIRECTORY "${source_dir}")
+ExternalProject_Add(MyProj URL "http://cmake.org/invalid_file.tar.gz")
diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
index 0d1da26..c2c77e0 100644
--- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
@@ -1,5 +1,11 @@
+cmake_minimum_required(VERSION 3.12)
include(RunCMake)
+# We do not contact any remote URLs, but may use a local one.
+# Remove any proxy configuration that may change behavior.
+unset(ENV{http_proxy})
+unset(ENV{https_proxy})
+
run_cmake(IncludeScope-Add)
run_cmake(IncludeScope-Add_Step)
run_cmake(NoOptions)
@@ -27,6 +33,50 @@ function(__ep_test_with_build testName)
run_cmake_command(${testName}-build ${CMAKE_COMMAND} --build .)
endfunction()
+find_package(Python3)
+function(__ep_test_with_build_with_server testName)
+ if(NOT Python3_EXECUTABLE)
+ return()
+ endif()
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${testName}-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_TIMEOUT 20)
+ set(RunCMake_TEST_OUTPUT_MERGE TRUE)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ set(URL_FILE ${RunCMake_BINARY_DIR}/${testName}.url)
+ if(EXISTS "${URL_FILE}")
+ file(REMOVE "${URL_FILE}")
+ endif()
+ execute_process(
+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/DownloadServer.py --file "${URL_FILE}" ${ARGN}
+ OUTPUT_FILE ${RunCMake_BINARY_DIR}/${testName}-python.txt
+ ERROR_FILE ${RunCMake_BINARY_DIR}/${testName}-python.txt
+ RESULT_VARIABLE result
+ TIMEOUT 30
+ )
+ if(NOT result EQUAL 0)
+ message(FATAL_ERROR "Failed to start download server:\n ${result}")
+ endif()
+
+ foreach(i RANGE 1 8)
+ if(EXISTS ${URL_FILE})
+ break()
+ endif()
+ execute_process(COMMAND ${CMAKE_COMMAND} -E sleep ${i})
+ endforeach()
+
+ if(NOT EXISTS ${URL_FILE})
+ message(FATAL_ERROR "Failed to load download server URL from:\n ${URL_FILE}")
+ endif()
+
+ file(READ ${URL_FILE} SERVER_URL)
+ message(STATUS "URL : ${URL_FILE} - ${SERVER_URL}")
+ run_cmake_with_options(${testName} ${CMAKE_COMMAND} -DSERVER_URL=${SERVER_URL} )
+ run_cmake_command(${testName}-clean ${CMAKE_COMMAND} --build . --target clean)
+ run_cmake_command(${testName}-build ${CMAKE_COMMAND} --build .)
+endfunction()
+
__ep_test_with_build(MultiCommand)
set(RunCMake_TEST_OUTPUT_MERGE 1)
@@ -38,6 +88,9 @@ set(RunCMake_TEST_OUTPUT_MERGE 0)
if(NOT RunCMake_GENERATOR MATCHES "Visual Studio")
__ep_test_with_build(LogOutputOnFailure)
__ep_test_with_build(LogOutputOnFailureMerged)
+ __ep_test_with_build(DownloadTimeout)
+ __ep_test_with_build_with_server(DownloadInactivityTimeout --speed_limit --limit_duration 40)
+ __ep_test_with_build_with_server(DownloadInactivityResume --speed_limit --limit_duration 1)
endif()
# We can't test the substitution when using the old MSYS due to
diff --git a/Tests/RunCMake/FPHSA/CMakeLists.txt b/Tests/RunCMake/FPHSA/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/FPHSA/CMakeLists.txt
+++ b/Tests/RunCMake/FPHSA/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FeatureSummary/CMakeLists.txt b/Tests/RunCMake/FeatureSummary/CMakeLists.txt
index 72abfc8..74b3ff8 100644
--- a/Tests/RunCMake/FeatureSummary/CMakeLists.txt
+++ b/Tests/RunCMake/FeatureSummary/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
index a3dd9ff..c66757f 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
@@ -12,7 +12,7 @@ def read_codemodel_json_data(filename):
def check_objects(o, g):
assert is_list(o)
assert len(o) == 1
- check_index_object(o[0], "codemodel", 2, 1, check_object_codemodel(g))
+ check_index_object(o[0], "codemodel", 2, 2, check_object_codemodel(g))
def check_backtrace(t, b, backtrace):
btg = t["backtraceGraph"]
@@ -42,6 +42,16 @@ def check_backtrace(t, b, backtrace):
assert b is None
+def check_backtraces(t, actual, expected):
+ assert is_list(actual)
+ assert is_list(expected)
+ assert len(actual) == len(expected)
+
+ i = 0
+ while i < len(actual):
+ check_backtrace(t, actual[i], expected[i])
+ i += 1
+
def check_directory(c):
def _check(actual, expected):
assert is_dict(actual)
@@ -421,6 +431,19 @@ def check_target(c):
missing_exception=lambda e: "Precompile header: %s" % e["header"],
extra_exception=lambda a: "Precompile header: %s" % a["header"])
+ if "languageStandard" in expected:
+ expected_keys.append("languageStandard")
+
+ def check_language_standard(actual, expected):
+ assert is_dict(actual)
+ expected_keys = ["backtraces", "standard"]
+ assert actual["standard"] == expected["standard"]
+ check_backtraces(obj, actual["backtraces"], expected["backtraces"])
+
+ assert sorted(actual.keys()) == sorted(expected_keys)
+
+ check_language_standard(actual["languageStandard"], expected["languageStandard"])
+
if expected["defines"] is not None:
expected_keys.append("defines")
@@ -499,6 +522,7 @@ def gen_check_directories(c, g):
read_codemodel_json_data("directories/custom.json"),
read_codemodel_json_data("directories/cxx.json"),
read_codemodel_json_data("directories/imported.json"),
+ read_codemodel_json_data("directories/interface.json"),
read_codemodel_json_data("directories/object.json"),
read_codemodel_json_data("directories/dir.json"),
read_codemodel_json_data("directories/dir_dir.json"),
@@ -544,6 +568,8 @@ def gen_check_targets(c, g, inSource):
read_codemodel_json_data("targets/zero_check_cxx.json"),
read_codemodel_json_data("targets/cxx_lib.json"),
read_codemodel_json_data("targets/cxx_exe.json"),
+ read_codemodel_json_data("targets/cxx_standard_compile_feature_exe.json"),
+ read_codemodel_json_data("targets/cxx_standard_exe.json"),
read_codemodel_json_data("targets/cxx_shared_lib.json"),
read_codemodel_json_data("targets/cxx_shared_exe.json"),
read_codemodel_json_data("targets/cxx_static_lib.json"),
@@ -569,6 +595,10 @@ def gen_check_targets(c, g, inSource):
read_codemodel_json_data("targets/link_imported_object_exe.json"),
read_codemodel_json_data("targets/link_imported_interface_exe.json"),
+ read_codemodel_json_data("targets/all_build_interface.json"),
+ read_codemodel_json_data("targets/zero_check_interface.json"),
+ read_codemodel_json_data("targets/iface_srcs.json"),
+
read_codemodel_json_data("targets/all_build_custom.json"),
read_codemodel_json_data("targets/zero_check_custom.json"),
read_codemodel_json_data("targets/custom_tgt.json"),
@@ -592,6 +622,12 @@ def gen_check_targets(c, g, inSource):
e["sources"] = precompile_header_data["sources"]
e["sourceGroups"] = precompile_header_data["sourceGroups"]
+ if os.path.exists(os.path.join(reply_dir, "..", "..", "..", "..", "cxx", "cxx_std_11.txt")):
+ for e in expected:
+ if e["name"] == "cxx_standard_compile_feature_exe":
+ language_standard_data = read_codemodel_json_data("targets/cxx_standard_compile_feature_exe_languagestandard.json")
+ e["compileGroups"][0]["languageStandard"] = language_standard_data["languageStandard"]
+
if not os.path.exists(os.path.join(reply_dir, "..", "..", "..", "..", "ipo_enabled.txt")):
for e in expected:
try:
@@ -691,6 +727,7 @@ def gen_check_projects(c, g):
read_codemodel_json_data("projects/alias.json"),
read_codemodel_json_data("projects/object.json"),
read_codemodel_json_data("projects/imported.json"),
+ read_codemodel_json_data("projects/interface.json"),
read_codemodel_json_data("projects/custom.json"),
read_codemodel_json_data("projects/external.json"),
]
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
index ebe717a..a51b6eb 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
@@ -7,6 +7,8 @@
"^ALL_BUILD::@a56b12a3f5c0529fb296$",
"^ZERO_CHECK::@a56b12a3f5c0529fb296$",
"^cxx_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_standard_exe::@a56b12a3f5c0529fb296$",
"^cxx_lib::@a56b12a3f5c0529fb296$",
"^cxx_shared_exe::@a56b12a3f5c0529fb296$",
"^cxx_shared_lib::@a56b12a3f5c0529fb296$",
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json
new file mode 100644
index 0000000..b10d496
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/interface.json
@@ -0,0 +1,14 @@
+{
+ "source": "^interface$",
+ "build": "^interface$",
+ "parentSource": "^\\.$",
+ "childSources": null,
+ "targetIds": [
+ "^ALL_BUILD::@25b7fa8ea00134654b85$",
+ "^ZERO_CHECK::@25b7fa8ea00134654b85$",
+ "^iface_srcs::@25b7fa8ea00134654b85$"
+ ],
+ "projectName": "Interface",
+ "minimumCMakeVersion": "3.12",
+ "hasInstallRule": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
index c144953..736d1f5 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
@@ -7,6 +7,7 @@
"^custom$",
"^cxx$",
"^imported$",
+ "^interface$",
"^object$",
"^.*/Tests/RunCMake/FileAPIExternalSource$",
"^dir$"
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json
index f3aac63..4d0cdc0 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json
@@ -6,6 +6,7 @@
"Custom",
"Cxx",
"Imported",
+ "Interface",
"Object",
"External"
],
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json
index 296ae6c..363e853 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json
@@ -10,6 +10,8 @@
"^ZERO_CHECK::@a56b12a3f5c0529fb296$",
"^cxx_lib::@a56b12a3f5c0529fb296$",
"^cxx_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_standard_exe::@a56b12a3f5c0529fb296$",
"^cxx_shared_lib::@a56b12a3f5c0529fb296$",
"^cxx_shared_exe::@a56b12a3f5c0529fb296$",
"^cxx_static_lib::@a56b12a3f5c0529fb296$",
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/interface.json
new file mode 100644
index 0000000..2a22767
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/interface.json
@@ -0,0 +1,13 @@
+{
+ "name": "Interface",
+ "parentName": "codemodel-v2",
+ "childNames": null,
+ "directorySources": [
+ "^interface$"
+ ],
+ "targetIds": [
+ "^ALL_BUILD::@25b7fa8ea00134654b85$",
+ "^ZERO_CHECK::@25b7fa8ea00134654b85$",
+ "^iface_srcs::@25b7fa8ea00134654b85$"
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json
index 92a7944..1f443b1 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json
@@ -80,6 +80,14 @@
"backtrace": null
},
{
+ "id": "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_standard_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
"id": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
"backtrace": null
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json
new file mode 100644
index 0000000..fa2a6e5
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_interface.json
@@ -0,0 +1,79 @@
+{
+ "name": "ALL_BUILD",
+ "id": "^ALL_BUILD::@25b7fa8ea00134654b85$",
+ "directorySource": "^interface$",
+ "projectName": "Interface",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ALL_BUILD$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ALL_BUILD\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ALL_BUILD$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ALL_BUILD\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^interface$",
+ "source": "^interface$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@25b7fa8ea00134654b85$",
+ "backtrace": null
+ },
+ {
+ "id": "^iface_srcs::@25b7fa8ea00134654b85$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
index b4def78..d023f99 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
@@ -116,6 +116,14 @@
"backtrace": null
},
{
+ "id": "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_standard_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
"id": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
"backtrace": null
},
@@ -168,6 +176,10 @@
"backtrace": null
},
{
+ "id": "^iface_srcs::@25b7fa8ea00134654b85$",
+ "backtrace": null
+ },
+ {
"id": "^custom_exe::@c11385ffed57b860da63$",
"backtrace": null
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
index e7ab55b..c9e652b 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
@@ -119,7 +119,7 @@
"backtrace": [
{
"file": "^codemodel-v2\\.cmake$",
- "line": 37,
+ "line": 38,
"command": "install",
"hasParent": true
},
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json
new file mode 100644
index 0000000..d6d573f
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe.json
@@ -0,0 +1,110 @@
+{
+ "name": "cxx_standard_compile_feature_exe",
+ "id": "^cxx_standard_compile_feature_exe::@a56b12a3f5c0529fb296$",
+ "directorySource": "^cxx$",
+ "projectName": "Cxx",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 26,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "languageStandard" :
+ {
+ "backtraces": [
+ [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 27,
+ "command": "set_property",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ ],
+ "standard" : "98"
+ },
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 26,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^cxx_standard_compile_feature_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_standard_compile_feature_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_standard_compile_feature_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^cxx$",
+ "source": "^cxx$",
+ "install": null,
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe_languagestandard.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe_languagestandard.json
new file mode 100644
index 0000000..0c4eabb
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_compile_feature_exe_languagestandard.json
@@ -0,0 +1,36 @@
+{
+ "languageStandard" :
+ {
+ "backtraces": [
+ [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 29,
+ "command": "target_compile_features",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 30,
+ "command": "target_compile_features",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ ],
+ "standard" : "11"
+ }
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json
new file mode 100644
index 0000000..9cb2832
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_standard_exe.json
@@ -0,0 +1,110 @@
+{
+ "name": "cxx_standard_exe",
+ "id": "^cxx_standard_exe::@a56b12a3f5c0529fb296$",
+ "directorySource": "^cxx$",
+ "projectName": "Cxx",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 23,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "languageStandard" :
+ {
+ "backtraces": [
+ [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 24,
+ "command": "set_property",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ ],
+ "standard" : "17"
+ },
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 23,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^cxx_standard_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_standard_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_standard_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^cxx$",
+ "source": "^cxx$",
+ "install": null,
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json
new file mode 100644
index 0000000..97d7ccd
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/iface_srcs.json
@@ -0,0 +1,67 @@
+{
+ "name": "iface_srcs",
+ "id": "^iface_srcs::@25b7fa8ea00134654b85$",
+ "directorySource": "^interface$",
+ "projectName": "Interface",
+ "type": "INTERFACE_LIBRARY",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": 3,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": 3,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^interface$",
+ "source": "^interface$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@25b7fa8ea00134654b85$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json
new file mode 100644
index 0000000..fdd4b2a
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_interface.json
@@ -0,0 +1,70 @@
+{
+ "name": "ZERO_CHECK",
+ "id": "^ZERO_CHECK::@25b7fa8ea00134654b85$",
+ "directorySource": "^interface$",
+ "projectName": "Interface",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ZERO_CHECK$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ZERO_CHECK\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ZERO_CHECK$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/interface/CMakeFiles/ZERO_CHECK\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^interface/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^interface$",
+ "source": "^interface$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2.cmake b/Tests/RunCMake/FileAPI/codemodel-v2.cmake
index c98a84c..2405954 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2.cmake
+++ b/Tests/RunCMake/FileAPI/codemodel-v2.cmake
@@ -18,6 +18,7 @@ add_subdirectory(cxx)
add_subdirectory(alias)
add_subdirectory(object)
add_subdirectory(imported)
+add_subdirectory(interface)
add_subdirectory(custom)
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../FileAPIExternalSource" "${CMAKE_CURRENT_BINARY_DIR}/../FileAPIExternalBuild")
add_subdirectory(dir)
diff --git a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
index fa51195..76235f5 100644
--- a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
+++ b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
@@ -19,3 +19,14 @@ target_link_options(cxx_exe PUBLIC TargetLinkOptions)
target_link_directories(cxx_exe PUBLIC "${CMAKE_BINARY_DIR}/TargetLinkDir")
target_precompile_headers(cxx_exe PUBLIC ../empty.h)
+
+add_executable(cxx_standard_exe ../empty.cxx)
+set_property(TARGET cxx_standard_exe PROPERTY CXX_STANDARD 17)
+
+add_executable(cxx_standard_compile_feature_exe ../empty.cxx)
+set_property(TARGET cxx_standard_compile_feature_exe PROPERTY CXX_STANDARD 98)
+if(CMAKE_CXX_STANDARD_DEFAULT AND DEFINED CMAKE_CXX11_STANDARD_COMPILE_OPTION)
+ target_compile_features(cxx_standard_compile_feature_exe PRIVATE cxx_std_11)
+ target_compile_features(cxx_standard_compile_feature_exe PRIVATE cxx_decltype)
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cxx_std_11.txt" "")
+endif()
diff --git a/Tests/RunCMake/FileAPI/interface/CMakeLists.txt b/Tests/RunCMake/FileAPI/interface/CMakeLists.txt
new file mode 100644
index 0000000..97948c5
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/interface/CMakeLists.txt
@@ -0,0 +1,3 @@
+project(Interface)
+add_library(iface_none INTERFACE)
+add_library(iface_srcs INTERFACE ../empty.c)
diff --git a/Tests/RunCMake/File_Generate/AdjacentInOut.cmake b/Tests/RunCMake/File_Generate/AdjacentInOut.cmake
new file mode 100644
index 0000000..828c2ee
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/AdjacentInOut.cmake
@@ -0,0 +1,6 @@
+cmake_policy(SET CMP0070 NEW)
+if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/AdjacentInOut.txt")
+ message(FATAL_ERROR "CMake should not re-run during the build!")
+endif()
+configure_file(AdjacentInOut.in ${CMAKE_CURRENT_BINARY_DIR}/AdjacentInOut.txt.tmp)
+file(GENERATE OUTPUT AdjacentInOut.txt INPUT ${CMAKE_CURRENT_BINARY_DIR}/AdjacentInOut.txt.tmp)
diff --git a/Tests/RunCMake/File_Generate/AdjacentInOut.in b/Tests/RunCMake/File_Generate/AdjacentInOut.in
new file mode 100644
index 0000000..bfbbda7
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/AdjacentInOut.in
@@ -0,0 +1 @@
+Sample Text File
diff --git a/Tests/RunCMake/File_Generate/CMakeLists.txt b/Tests/RunCMake/File_Generate/CMakeLists.txt
index bc0cf5d..3178de5 100644
--- a/Tests/RunCMake/File_Generate/CMakeLists.txt
+++ b/Tests/RunCMake/File_Generate/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
if(NOT TEST_FILE)
set(TEST_FILE ${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
index 94aaca8..5987417 100644
--- a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
+++ b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake
@@ -72,6 +72,7 @@ if (UNIX AND EXISTS /bin/sh)
if (NOT script_output STREQUAL SUCCESS)
message(SEND_ERROR "Generated script did not execute correctly:\n${script_output}\n====\n${script_error}")
endif()
+ unset(RunCMake_TEST_NO_CLEAN)
endif()
if (RunCMake_GENERATOR MATCHES Makefiles)
@@ -104,3 +105,10 @@ if (RunCMake_GENERATOR MATCHES Makefiles)
message(SEND_ERROR "File did not re-generate: \"${RunCMake_BINARY_DIR}/ReRunCMake-build/output_file.txt\"")
endif()
endif()
+
+set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/AdjacentInOut-build)
+run_cmake(AdjacentInOut)
+set(RunCMake_TEST_NO_CLEAN 1)
+run_cmake_command(AdjacentInOut-nowork ${CMAKE_COMMAND} --build .)
+unset(RunCMake_TEST_BINARY_DIR)
+unset(RunCMake_TEST_NO_CLEAN)
diff --git a/Tests/RunCMake/FindOpenGL/CMP0072-OLD-stderr.txt b/Tests/RunCMake/FindOpenGL/CMP0072-OLD-stderr.txt
new file mode 100644
index 0000000..68d23d4
--- /dev/null
+++ b/Tests/RunCMake/FindOpenGL/CMP0072-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0072-OLD.cmake:1 \(cmake_policy\):
+ The OLD behavior for policy CMP0072 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:3 \(include\)$
diff --git a/Tests/RunCMake/FindPkgConfig/CMakeLists.txt b/Tests/RunCMake/FindPkgConfig/CMakeLists.txt
index 72abfc8..74b3ff8 100644
--- a/Tests/RunCMake/FindPkgConfig/CMakeLists.txt
+++ b/Tests/RunCMake/FindPkgConfig/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_MODULE_NAME.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_MODULE_NAME.cmake
index fc3a766..aa293d5 100644
--- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_MODULE_NAME.cmake
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_GET_MATCHING_MODULE_NAME.cmake
@@ -20,7 +20,7 @@ endif()
unset(FOO_MODULE_NAME)
-# verify variable get's also set on subsequent run
+# verify variable gets also set on subsequent run
pkg_search_module(FOO REQUIRED foo bletch bar)
if(NOT FOO_MODULE_NAME STREQUAL "bletch")
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake
new file mode 100644
index 0000000..293ddda
--- /dev/null
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-TARGET_PROPERTY.cmake
@@ -0,0 +1,17 @@
+enable_language(C)
+
+add_library (lib SHARED empty.c)
+set_target_properties(lib PROPERTIES
+ INCLUDE_DIRECTORIES "$<$<COMPILE_LANGUAGE:C>:/usr/include>"
+ COMPILE_DEFINITIONS "$<$<COMPILE_LANGUAGE:C>:DEF>"
+ COMPILE_OPTIONS "$<$<COMPILE_LANGUAGE:C>:-O>")
+
+add_custom_target(drive
+ COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:lib,INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:lib,COMPILE_DEFINITIONS>
+ $<TARGET_PROPERTY:lib,COMPILE_OPTIONS>)
+
+add_custom_command(TARGET drive PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:lib,INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:lib,COMPILE_DEFINITIONS>
+ $<TARGET_PROPERTY:lib,COMPILE_OPTIONS>)
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake
index 6691fdf..15a5e79 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake
@@ -8,3 +8,4 @@ run_cmake(COMPILE_LANGUAGE-add_executable)
run_cmake(COMPILE_LANGUAGE-add_library)
run_cmake(COMPILE_LANGUAGE-add_test)
run_cmake(COMPILE_LANGUAGE-unknown-lang)
+run_cmake(COMPILE_LANGUAGE-TARGET_PROPERTY)
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-TARGET_PROPERTY.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-TARGET_PROPERTY.cmake
new file mode 100644
index 0000000..6a718d6
--- /dev/null
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-TARGET_PROPERTY.cmake
@@ -0,0 +1,17 @@
+enable_language(C)
+
+add_library (lib SHARED empty.c)
+set_target_properties(lib PROPERTIES
+ INCLUDE_DIRECTORIES "$<$<COMPILE_LANG_AND_ID:C,GNU>:/usr/include>"
+ COMPILE_DEFINITIONS "$<$<COMPILE_LANG_AND_ID:C,GNU>:DEF>"
+ COMPILE_OPTIONS "$<$<COMPILE_LANG_AND_ID:C,GNU>:-O>")
+
+add_custom_target(drive
+ COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:lib,INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:lib,COMPILE_DEFINITIONS>
+ $<TARGET_PROPERTY:lib,COMPILE_OPTIONS>)
+
+add_custom_command(TARGET drive PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:lib,INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:lib,COMPILE_DEFINITIONS>
+ $<TARGET_PROPERTY:lib,COMPILE_OPTIONS>)
diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake
index a0a7bb9..68bd05d 100644
--- a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake
@@ -8,3 +8,4 @@ run_cmake(COMPILE_LANG_AND_ID-add_executable)
run_cmake(COMPILE_LANG_AND_ID-add_library)
run_cmake(COMPILE_LANG_AND_ID-add_test)
run_cmake(COMPILE_LANG_AND_ID-unknown-lang)
+run_cmake(COMPILE_LANG_AND_ID-TARGET_PROPERTY)
diff --git a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
index b3977f1..5a5a7bf 100644
--- a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
@@ -26,7 +26,7 @@ function(run_GEH)
endforeach()
endfunction()
-# remove these flags from the enviornment if they have been set
+# remove these flags from the environment if they have been set
# so the tests run the correct env
set(env_cxx_flags $ENV{CXXFLAGS})
if(env_cxx_flags)
diff --git a/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt
index 42dd0ce..130de2b 100644
--- a/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt
+++ b/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt
@@ -10,15 +10,6 @@ Call Stack \(most recent call first\):
CMake Error at BadCONFIG.cmake:1 \(add_custom_target\):
Error evaluating generator expression:
- \$<CONFIG:Foo,Bar>
-
- \$<CONFIG> expression requires one or zero parameters.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-+
-CMake Error at BadCONFIG.cmake:1 \(add_custom_target\):
- Error evaluating generator expression:
-
\$<CONFIG:Foo-Bar>
Expression syntax not recognized.
diff --git a/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake b/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake
index 5c22aaa..1735ab7 100644
--- a/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake
+++ b/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake
@@ -1,6 +1,5 @@
add_custom_target(check ALL COMMAND check
$<CONFIG:.>
- $<CONFIG:Foo,Bar>
$<CONFIG:Foo-Bar>
$<$<CONFIG:Foo-Nested>:foo>
VERBATIM)
diff --git a/Tests/RunCMake/GeneratorExpression/CMakeLists.txt b/Tests/RunCMake/GeneratorExpression/CMakeLists.txt
index 12cd3c7..4b3de84 100644
--- a/Tests/RunCMake/GeneratorExpression/CMakeLists.txt
+++ b/Tests/RunCMake/GeneratorExpression/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries-check.cmake b/Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries-check.cmake
new file mode 100644
index 0000000..b43256b
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries-check.cmake
@@ -0,0 +1,6 @@
+file(READ "${RunCMake_TEST_BINARY_DIR}/CONFIG-empty-entries-generated.txt" content)
+
+set(expected "1234")
+if(NOT content STREQUAL expected)
+ set(RunCMake_TEST_FAILED "actual content:\n [[${content}]]\nbut expected:\n [[${expected}]]")
+endif()
diff --git a/Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries.cmake b/Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries.cmake
new file mode 100644
index 0000000..a4d53f9
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/CONFIG-empty-entries.cmake
@@ -0,0 +1,9 @@
+cmake_policy(SET CMP0070 NEW)
+
+set(text)
+string(APPEND text "$<$<CONFIG:>:1>")
+string(APPEND text "$<$<CONFIG:Release,>:2>")
+string(APPEND text "$<$<CONFIG:,Release>:3>")
+string(APPEND text "$<$<CONFIG:Release,,Debug>:4>")
+string(APPEND text "$<$<CONFIG:Release,Debug>:5>")
+file(GENERATE OUTPUT CONFIG-empty-entries-generated.txt CONTENT ${text})
diff --git a/Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries-check.cmake b/Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries-check.cmake
new file mode 100644
index 0000000..66f42c7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries-check.cmake
@@ -0,0 +1,6 @@
+file(READ "${RunCMake_TEST_BINARY_DIR}/CONFIG-multiple-entries-generated.txt" content)
+
+set(expected "14")
+if(NOT content STREQUAL expected)
+ set(RunCMake_TEST_FAILED "actual content:\n [[${content}]]\nbut expected:\n [[${expected}]]")
+endif()
diff --git a/Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries.cmake b/Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries.cmake
new file mode 100644
index 0000000..6829282
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/CONFIG-multiple-entries.cmake
@@ -0,0 +1,8 @@
+cmake_policy(SET CMP0070 NEW)
+
+set(text)
+string(APPEND text "$<$<CONFIG:CustomConfig>:1>")
+string(APPEND text "$<$<CONFIG:Release>:2>")
+string(APPEND text "$<$<CONFIG:Debug,Release>:3>")
+string(APPEND text "$<$<CONFIG:Release,CustomConfig,Debug>:4>")
+file(GENERATE OUTPUT CONFIG-multiple-entries-generated.txt CONTENT "${text}")
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 0278cf6..6349112 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -12,6 +12,7 @@ run_cmake(BadTargetTypeInterface)
run_cmake(BadTargetTypeObject)
run_cmake(BadInstallPrefix)
run_cmake(BadSHELL_PATH)
+run_cmake(BadCONFIG)
run_cmake(CMP0044-WARN)
run_cmake(NonValidTarget-C_COMPILER_ID)
run_cmake(NonValidTarget-CXX_COMPILER_ID)
@@ -44,6 +45,19 @@ run_cmake(FILTER-InvalidOperator)
run_cmake(FILTER-Exclude)
run_cmake(FILTER-Include)
+if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS [==[-DCMAKE_CONFIGURATION_TYPES=CustomConfig]==])
+else()
+ set(RunCMake_TEST_OPTIONS [==[-DCMAKE_BUILD_TYPE=CustomConfig]==])
+endif()
+run_cmake(CONFIG-multiple-entries)
+if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS [==[-DCMAKE_CONFIGURATION_TYPES=]==])
+else()
+ set(RunCMake_TEST_OPTIONS [==[-DCMAKE_BUILD_TYPE=]==])
+endif()
+run_cmake(CONFIG-empty-entries)
+
set(RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0085:STRING=OLD)
run_cmake(CMP0085-OLD)
unset(RunCMake_TEST_OPTIONS)
diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES-check.cmake b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES-check.cmake
new file mode 100644
index 0000000..ecf7bfe
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES-check.cmake
@@ -0,0 +1,17 @@
+file(READ "${RunCMake_TEST_BINARY_DIR}/out.txt" content)
+
+unset(RunCMake_TEST_FAILED)
+
+if (NOT content MATCHES "(INCLUDES1:${RunCMake_TEST_SOURCE_DIR}/include)")
+ string(APPEND RunCMake_TEST_FAILED "wrong content for INCLUDES1: \"${CMAKE_MATCH_1}\"\n")
+endif()
+
+if (NOT content MATCHES "(INCLUDES2:><)")
+ string(APPEND RunCMake_TEST_FAILED "wrong content for INCLUDES2: \"${CMAKE_MATCH_1}\"\n")
+endif()
+if (NOT content MATCHES "(INCLUDES3:><)")
+ string(APPEND RunCMake_TEST_FAILED "wrong content for INCLUDES3: \"${CMAKE_MATCH_1}\"\n")
+endif()
+if (NOT content MATCHES "(CUSTOM:>;;<)")
+ string(APPEND RunCMake_TEST_FAILED "wrong content for CUSTOM: \"${CMAKE_MATCH_1}\"\n")
+endif()
diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES.cmake b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES.cmake
index cb6f4d8..e9855be 100644
--- a/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES.cmake
+++ b/Tests/RunCMake/GeneratorExpression/TARGET_PROPERTY-INCLUDE_DIRECTORIES.cmake
@@ -14,5 +14,10 @@ target_include_directories(foo3 PUBLIC $<TARGET_PROPERTY:foo2,INCLUDE_DIRECTORIE
add_library(foo4 STATIC empty.c)
target_include_directories(foo4 PUBLIC $<TARGET_PROPERTY:foo3,INCLUDE_DIRECTORIES>)
+add_library (foo5 SHARED empty.c)
+set_property(TARGET foo5 PROPERTY INCLUDE_DIRECTORIES "$<$<COMPILE_LANGUAGE:CUDA>:/include/CUDA>" "$<$<COMPILE_LANGUAGE:Fortran>:/include/Fortran>")
+set_property(TARGET foo5 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<$<COMPILE_LANGUAGE:CUDA>:/include/CUDA>" "$<$<COMPILE_LANGUAGE:Fortran>:/include/Fortran>")
+set_property(TARGET foo5 PROPERTY CUSTOM ";;")
+
# Evaluate a genex that looks up INCLUDE_DIRECTORIES on multiple targets.
-file(GENERATE OUTPUT out.txt CONTENT "$<TARGET_PROPERTY:foo4,INCLUDE_DIRECTORIES>")
+file(GENERATE OUTPUT out.txt CONTENT "INCLUDES1:$<TARGET_PROPERTY:foo4,INCLUDE_DIRECTORIES>\nINCLUDES2:>$<TARGET_PROPERTY:foo5,INTERFACE_INCLUDE_DIRECTORIES><\nINCLUDES3:>$<TARGET_PROPERTY:foo5,INCLUDE_DIRECTORIES><\nCUSTOM:>$<TARGET_PROPERTY:foo5,CUSTOM><\n")
diff --git a/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt b/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt
+++ b/Tests/RunCMake/GeneratorPlatform/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GeneratorToolset/CMakeLists.txt b/Tests/RunCMake/GeneratorToolset/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/GeneratorToolset/CMakeLists.txt
+++ b/Tests/RunCMake/GeneratorToolset/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/GoogleTest/GoogleTestXML-special-result-check.cmake b/Tests/RunCMake/GoogleTest/GoogleTestXML-special-result-check.cmake
new file mode 100644
index 0000000..fea0a6b
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTestXML-special-result-check.cmake
@@ -0,0 +1,28 @@
+set(RESULT_FILES
+ "${RunCMake_TEST_BINARY_DIR}/GoogleTestXMLSpecial/cases.case/0.xml"
+ "${RunCMake_TEST_BINARY_DIR}/GoogleTestXMLSpecial/cases.case/1.xml"
+ "${RunCMake_TEST_BINARY_DIR}/GoogleTestXMLSpecial/cases.case/2.xml"
+)
+
+# Check result files exist
+foreach(file ${RESULT_FILES})
+ if(NOT EXISTS ${file})
+ if(NOT ${RunCMake_TEST_FAILED} STREQUAL "")
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}\n")
+ endif()
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}Result XML file ${file} was not created")
+ endif()
+endforeach()
+
+# and no other xml files are created
+file(GLOB_RECURSE file_list "${RunCMake_TEST_BINARY_DIR}/GoogleTestXMLSpecial/*/*.xml" LIST_DIRECTORIES false)
+
+foreach(file ${file_list})
+ list(FIND RESULT_FILES "${file}" idx)
+ if(-1 EQUAL ${idx})
+ if(NOT ${RunCMake_TEST_FAILED} STREQUAL "")
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}\n")
+ endif()
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}Invalid file ${file} was created")
+ endif()
+endforeach()
diff --git a/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake b/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake
index 29bd05e..fb91c0e 100644
--- a/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake
+++ b/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake
@@ -3,6 +3,17 @@ include(GoogleTest)
enable_testing()
+# This creates the folder structure for the paramterized tests
+# to avoid handling missing folders in C++
+#
+# This must match the match the name defined in xml_output.cpp
+# for every instance of tests with GetParam.
+#
+# The folder name is created fom the test name (output of the line
+# without leading spaces: "GoogleTestXMLSpecial/cases.") and
+# the parts until the last slash ("case/"). These parts are concatenated.
+file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/GoogleTestXMLSpecial/cases.case")
+
add_executable(xml_output xml_output.cpp)
gtest_discover_tests(
xml_output
diff --git a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake
index efd22be..530c8ab 100644
--- a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake
@@ -101,6 +101,13 @@ function(run_GoogleTestXML DISCOVERY_MODE)
-R GoogleTestXML
--no-label-summary
)
+
+ run_cmake_command(GoogleTestXML-special-result
+ ${CMAKE_CTEST_COMMAND}
+ -C Debug
+ -R GoogleTestXMLSpecial
+ --no-label-summary
+ )
endfunction()
function(run_GoogleTest_discovery_timeout DISCOVERY_MODE)
diff --git a/Tests/RunCMake/GoogleTest/xml_output.cpp b/Tests/RunCMake/GoogleTest/xml_output.cpp
index e130231..82f0d02 100644
--- a/Tests/RunCMake/GoogleTest/xml_output.cpp
+++ b/Tests/RunCMake/GoogleTest/xml_output.cpp
@@ -13,11 +13,22 @@ int main(int argc, char** argv)
// This actually defines the name of the file passed in the 2nd run
std::cout << "GoogleTestXML." << std::endl;
std::cout << " Foo" << std::endl;
+ // When changing these names, make sure to adapt the folder creation
+ // in GoogleTestXML.cmake
+ std::cout << "GoogleTestXMLSpecial/cases." << std::endl;
+ std::cout << " case/0 # GetParam() = 42" << std::endl;
+ std::cout << " case/1 # GetParam() = \"string\"" << std::endl;
+ std::cout << " case/2 # GetParam() = \"path/like\"" << std::endl;
} else if (param.find("--gtest_output=xml:") != std::string::npos) {
std::string::size_type split = param.find(":");
std::string filepath = param.substr(split + 1);
// The full file path is passed
std::ofstream ostrm(filepath.c_str(), std::ios::binary);
+ if (!ostrm) {
+ std::cerr << "Failed to create file: " << filepath.c_str()
+ << std::endl;
+ return 1;
+ }
ostrm << "--gtest_output=xml: mockup file\n";
}
}
diff --git a/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake b/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake
index 10cd2bc..8a628cf 100644
--- a/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake
+++ b/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake
@@ -9,6 +9,7 @@
# - All library depend on a common INTERFACE library holding compiler flags
# - We have a custom target to generate a man page
# - Someone has added an UNKNOWN, IMPORTED crypto mining library!
+# - We have a circular dependency between two libraries
add_subdirectory(test_project/third_party_project)
@@ -23,6 +24,13 @@ target_link_libraries(CoreLibrary PUBLIC CompilerFlags)
target_link_libraries(CoreLibrary PRIVATE SeriousLoggingLibrary)
+add_library(SystemLibrary STATIC test_project/system_library.c)
+
+# Create a circular dependency.
+# See https://gitlab.kitware.com/cmake/cmake/issues/20720
+target_link_libraries(CoreLibrary PRIVATE SystemLibrary)
+target_link_libraries(SystemLibrary PRIVATE CoreLibrary)
+
add_library(GraphicLibraryObjects OBJECT test_project/graphic_library.c)
add_library(GraphicLibrary SHARED)
@@ -56,3 +64,5 @@ target_link_libraries(ConsoleApplication CryptoCurrencyMiningLibrary)
add_custom_target(GenerateManPage COMMAND ${CMAKE_COMMAND} --version)
add_dependencies(ConsoleApplication GenerateManPage)
+
+add_subdirectory(sub_directory_target)
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_custom_targets.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_custom_targets.dot
index 8b0365a..a9e664a 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_custom_targets.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_custom_targets.dot
@@ -28,25 +28,29 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GenerateManPage", shape = box ];
- "node1" -> "node5" // ConsoleApplication -> GenerateManPage
- "node6" [ label = "GraphicApplication", shape = egg ];
- "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node8" [ label = "\"-lm\"", shape = septagon ];
- "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node7" -> "node0" // GraphicLibrary -> CompilerFlags
- "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GenerateManPage", shape = box ];
+ "node1" -> "node6" // ConsoleApplication -> GenerateManPage
+ "node7" [ label = "GraphicApplication", shape = egg ];
+ "node7" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node8" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node9" [ label = "\"-lm\"", shape = septagon ];
+ "node8" -> "node9" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node8" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node8" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node10" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node8" -> "node10" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node7" -> "node8" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node11" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node12" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node12" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node12" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node13" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_default_options.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_default_options.dot
index 1bbf25a..06cdb75 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_default_options.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_default_options.dot
@@ -28,23 +28,27 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node12" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_dependers_files.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_dependers_files.dot
index 1bbf25a..06cdb75 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_dependers_files.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_dependers_files.dot
@@ -28,23 +28,27 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node12" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_executables.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_executables.dot
index 558a470..7f2e01c 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_executables.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_executables.dot
@@ -27,18 +27,21 @@ subgraph clusterLegend {
"node1" -> "node0" // CoreLibrary -> CompilerFlags
"node2" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node1" -> "node2" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
- "node3" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node4" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node5" [ label = "\"-lm\"", shape = septagon ];
- "node4" -> "node5" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node4" -> "node0" // GraphicLibrary -> CompilerFlags
- "node4" -> "node1" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node6" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node4" -> "node6" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node7" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node7" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node7" -> "node1" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node8" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node8" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node8" -> "node1" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node3" [ label = "SystemLibrary", shape = octagon ];
+ "node3" -> "node1" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node1" -> "node3" [ style = dotted ] // CoreLibrary -> SystemLibrary
+ "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node5" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node6" [ label = "\"-lm\"", shape = septagon ];
+ "node5" -> "node6" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node5" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node5" -> "node1" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node7" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node5" -> "node7" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node8" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node8" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node8" -> "node1" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node9" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node9" -> "node1" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_external_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_external_libs.dot
index 660af37..490450e 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_external_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_external_libs.dot
@@ -28,19 +28,23 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "GraphicApplication", shape = egg ];
- "node4" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node5" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node5" -> "node0" // GraphicLibrary -> CompilerFlags
- "node5" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node6" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node5" -> "node6" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node4" -> "node5" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node7" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node7" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node7" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node8" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node8" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node8" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "GraphicApplication", shape = egg ];
+ "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node6" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node7" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node8" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node8" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node8" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node9" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node9" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node10" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_graphic_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_graphic_libs.dot
index 5af7fec..086c849 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_graphic_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_graphic_libs.dot
@@ -28,8 +28,12 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "\"-lm\"", shape = septagon ];
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "\"-lm\"", shape = septagon ];
+ "node7" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_interface_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_interface_libs.dot
index 94ec41c..350f0f1 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_interface_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_interface_libs.dot
@@ -24,20 +24,24 @@ subgraph clusterLegend {
}
"node0" [ label = "ConsoleApplication", shape = egg ];
"node1" [ label = "CoreLibrary", shape = octagon ];
+ "node2" [ label = "SystemLibrary", shape = octagon ];
+ "node2" -> "node1" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node1" -> "node2" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node0" -> "node1" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node2" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node0" -> "node2" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node3" [ label = "GraphicApplication", shape = egg ];
- "node3" -> "node1" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node4" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node5" [ label = "\"-lm\"", shape = septagon ];
- "node4" -> "node5" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node4" -> "node1" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node6" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node4" -> "node6" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node3" -> "node4" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node7" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node7" -> "node1" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node8" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node8" -> "node1" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node3" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node0" -> "node3" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node4" [ label = "GraphicApplication", shape = egg ];
+ "node4" -> "node1" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node5" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node6" [ label = "\"-lm\"", shape = septagon ];
+ "node5" -> "node6" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node5" -> "node1" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node7" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node5" -> "node7" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node4" -> "node5" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node8" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node8" -> "node1" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node9" -> "node1" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node10" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_module_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_module_libs.dot
index 65b7a71..fd351d0 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_module_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_module_libs.dot
@@ -28,17 +28,21 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_object_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_object_libs.dot
index 8116bc9..39a2a03 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_object_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_object_libs.dot
@@ -28,21 +28,25 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node8" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node8" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node8" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node11" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_per_target_files.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_per_target_files.dot
index 1bbf25a..06cdb75 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_per_target_files.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_per_target_files.dot
@@ -28,23 +28,27 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node12" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_shared_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_shared_libs.dot
index 439d1f7..d949d87 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_shared_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_shared_libs.dot
@@ -28,17 +28,21 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "\"-lm\"", shape = septagon ];
- "node7" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node8" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node8" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node8" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "\"-lm\"", shape = septagon ];
+ "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node11" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_static_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_static_libs.dot
index 81199a2..e9b9570 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_static_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_static_libs.dot
@@ -39,4 +39,5 @@ subgraph clusterLegend {
"node8" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
"node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
"node9" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node10" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_unknown_libs.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_unknown_libs.dot
index 1be6550..7db111c 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_unknown_libs.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_no_unknown_libs.dot
@@ -28,21 +28,25 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "GraphicApplication", shape = egg ];
- "node4" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node5" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node6" [ label = "\"-lm\"", shape = septagon ];
- "node5" -> "node6" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node5" -> "node0" // GraphicLibrary -> CompilerFlags
- "node5" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node7" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node5" -> "node7" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node4" -> "node5" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node8" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node8" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node8" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node9" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "GraphicApplication", shape = egg ];
+ "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node7" [ label = "\"-lm\"", shape = septagon ];
+ "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node6" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node11" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_header.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_header.dot
index 1cfbe0f..f664c2e 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_header.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_header.dot
@@ -28,23 +28,27 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node12" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_name.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_name.dot
index 9653c33..58dda6d 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_name.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_graph_name.dot
@@ -28,23 +28,27 @@ subgraph clusterLegend {
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "node1" -> "node4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "node1" -> "node5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node12" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_node_prefix.dot b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_node_prefix.dot
index 82d96d0..8b93f7c 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_node_prefix.dot
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_set_node_prefix.dot
@@ -28,23 +28,27 @@ subgraph clusterLegend {
"point2" -> "point0" // CoreLibrary -> CompilerFlags
"point3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"point2" -> "point3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "point4" [ label = "SystemLibrary", shape = octagon ];
+ "point4" -> "point2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "point2" -> "point4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"point1" -> "point2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "point4" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
- "point1" -> "point4" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
- "point5" [ label = "GraphicApplication", shape = egg ];
- "point5" -> "point2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "point6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "point7" [ label = "\"-lm\"", shape = septagon ];
- "point6" -> "point7" [ style = dotted ] // GraphicLibrary -> "-lm"
- "point6" -> "point0" // GraphicLibrary -> CompilerFlags
- "point6" -> "point2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "point8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "point6" -> "point8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
- "point5" -> "point6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "point9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "point9" -> "point0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "point9" -> "point2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "point10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "point10" -> "point0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
- "point10" -> "point2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "point5" [ label = "CryptoCurrencyMiningLibrary", shape = septagon ];
+ "point1" -> "point5" [ style = dotted ] // ConsoleApplication -> CryptoCurrencyMiningLibrary
+ "point6" [ label = "GraphicApplication", shape = egg ];
+ "point6" -> "point2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "point7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "point8" [ label = "\"-lm\"", shape = septagon ];
+ "point7" -> "point8" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "point7" -> "point0" // GraphicLibrary -> CompilerFlags
+ "point7" -> "point2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "point9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "point7" -> "point9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "point6" -> "point7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "point10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "point10" -> "point0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "point10" -> "point2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "point11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "point11" -> "point0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "point11" -> "point2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "point12" [ label = "SubDirectoryTarget", shape = egg ];
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication
index 6893fd1..92fe609 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication
@@ -2,21 +2,25 @@ digraph "GraphicApplication" {
node [
fontsize = "12"
];
- "node5" [ label = "GraphicApplication", shape = egg ];
+ "node6" [ label = "GraphicApplication", shape = egg ];
"node2" [ label = "CoreLibrary", shape = octagon ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
"node0" [ label = "CompilerFlags", shape = pentagon ];
"node2" -> "node0" // CoreLibrary -> CompilerFlags
"node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
"node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node7" [ label = "\"-lm\"", shape = septagon ];
- "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
+ "node2" [ label = "CoreLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node8" [ label = "\"-lm\"", shape = septagon ];
+ "node7" -> "node8" [ style = dotted ] // GraphicLibrary -> "-lm"
"node0" [ label = "CompilerFlags", shape = pentagon ];
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
"node2" [ label = "CoreLibrary", shape = octagon ];
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
- "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node9" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node7" -> "node9" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers
index 3352b1a..82a2efe 100644
--- a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers
@@ -5,22 +5,26 @@ node [
"node0" [ label = "CompilerFlags", shape = pentagon ];
"node2" [ label = "CoreLibrary", shape = octagon ];
"node2" -> "node0" // CoreLibrary -> CompilerFlags
+ "node4" [ label = "SystemLibrary", shape = octagon ];
+ "node4" -> "node2" [ style = dotted ] // SystemLibrary -> CoreLibrary
+ "node2" [ label = "CoreLibrary", shape = octagon ];
+ "node2" -> "node4" [ style = dotted ] // CoreLibrary -> SystemLibrary
"node1" [ label = "ConsoleApplication", shape = egg ];
"node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
- "node5" [ label = "GraphicApplication", shape = egg ];
- "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
- "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
- "node6" -> "node0" // GraphicLibrary -> CompilerFlags
- "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
- "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
- "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
- "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node7" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node6" [ label = "GraphicApplication", shape = egg ];
+ "node6" -> "node7" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node7" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node7" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node10" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node11" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node11" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
}
diff --git a/Tests/RunCMake/Graphviz/sub_directory_target/CMakeLists.txt b/Tests/RunCMake/Graphviz/sub_directory_target/CMakeLists.txt
new file mode 100644
index 0000000..d84897b
--- /dev/null
+++ b/Tests/RunCMake/Graphviz/sub_directory_target/CMakeLists.txt
@@ -0,0 +1 @@
+add_executable(SubDirectoryTarget test.c)
diff --git a/Tests/RunCMake/Graphviz/sub_directory_target/test.c b/Tests/RunCMake/Graphviz/sub_directory_target/test.c
new file mode 100644
index 0000000..d123e09
--- /dev/null
+++ b/Tests/RunCMake/Graphviz/sub_directory_target/test.c
@@ -0,0 +1,4 @@
+int main(int argc, char** argv)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/Graphviz/test_project/system_library.c b/Tests/RunCMake/Graphviz/test_project/system_library.c
new file mode 100644
index 0000000..5d67079
--- /dev/null
+++ b/Tests/RunCMake/Graphviz/test_project/system_library.c
@@ -0,0 +1,3 @@
+void initialize_system()
+{
+}
diff --git a/Tests/RunCMake/IncompatibleQt/CMakeLists.txt b/Tests/RunCMake/IncompatibleQt/CMakeLists.txt
index f452db1..ebab7a3 100644
--- a/Tests/RunCMake/IncompatibleQt/CMakeLists.txt
+++ b/Tests/RunCMake/IncompatibleQt/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt b/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt
new file mode 100644
index 0000000..74b3ff8
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.3)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/InterfaceLibrary/ConfigSources.cmake b/Tests/RunCMake/InterfaceLibrary/ConfigSources.cmake
new file mode 100644
index 0000000..631a845
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/ConfigSources.cmake
@@ -0,0 +1,2 @@
+# Test an interface library added to the build system by a per-config source.
+add_library(iface INTERFACE $<$<CONFIG:NotAConfig>:${CMAKE_CURRENT_SOURCE_DIR}/iface.c>)
diff --git a/Tests/RunCMake/InterfaceLibrary/EmptySources-build2-result.txt b/Tests/RunCMake/InterfaceLibrary/EmptySources-build2-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/EmptySources-build2-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/InterfaceLibrary/EmptySources-build2-stdout.txt b/Tests/RunCMake/InterfaceLibrary/EmptySources-build2-stdout.txt
new file mode 100644
index 0000000..aac9172
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/EmptySources-build2-stdout.txt
@@ -0,0 +1 @@
+iface2|Invalid project
diff --git a/Tests/RunCMake/InterfaceLibrary/EmptySources.cmake b/Tests/RunCMake/InterfaceLibrary/EmptySources.cmake
new file mode 100644
index 0000000..f452394
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/EmptySources.cmake
@@ -0,0 +1,8 @@
+# Test an interface library added to the build system by empty SOURCES.
+add_library(iface INTERFACE)
+set_property(TARGET iface PROPERTY SOURCES "")
+
+# ...but not added by unset SOURCES.
+add_library(iface2 INTERFACE)
+set_property(TARGET iface2 PROPERTY SOURCES "")
+set_property(TARGET iface2 PROPERTY SOURCES)
diff --git a/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build1-check.cmake b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build1-check.cmake
new file mode 100644
index 0000000..6500e48
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build1-check.cmake
@@ -0,0 +1,4 @@
+if(EXISTS "${RunCMake_TEST_BINARY_DIR}/iface.txt")
+ set(RunCMake_TEST_FAILED "iface target built as part of 'all'")
+ return()
+endif()
diff --git a/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build2-check.cmake b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build2-check.cmake
new file mode 100644
index 0000000..0977c24
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build2-check.cmake
@@ -0,0 +1,4 @@
+if(NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/iface.txt")
+ set(RunCMake_TEST_FAILED "iface target not built")
+ return()
+endif()
diff --git a/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-result.txt b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-stdout.txt b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-stdout.txt
new file mode 100644
index 0000000..aac9172
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll-build3-stdout.txt
@@ -0,0 +1 @@
+iface2|Invalid project
diff --git a/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll.cmake b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll.cmake
new file mode 100644
index 0000000..714161d
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/ExcludeFromAll.cmake
@@ -0,0 +1,7 @@
+# Test an interface library with a custom command, but excluded from all.
+add_custom_command(OUTPUT iface.txt COMMAND ${CMAKE_COMMAND} -E touch iface.txt)
+add_library(iface INTERFACE EXCLUDE_FROM_ALL iface.txt)
+
+# Test that EXCLUDE_FROM_ALL is allowed even if the interface library has
+# no sources, and does not cause it to appear in the build system.
+add_library(iface2 INTERFACE EXCLUDE_FROM_ALL)
diff --git a/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-result.txt b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value-stderr.txt b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-stderr.txt
index 454c655..454c655 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value-stderr.txt
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value.cmake b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value.cmake
index 1af65b4..1af65b4 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-bad-value.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-bad-value.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-result.txt b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface-stderr.txt b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-stderr.txt
index 3a329d2..3a329d2 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface-stderr.txt
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface.cmake b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface.cmake
index fe6841a..fe6841a 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-iface.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-iface.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-result.txt b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported-stderr.txt b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-stderr.txt
index e9d94cf..e9d94cf 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported-stderr.txt
diff --git a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported.cmake b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported.cmake
index 07a67d7..07a67d7 100644
--- a/Tests/RunCMake/interface_library/IMPORTED_LIBNAME-non-imported.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/IMPORTED_LIBNAME-non-imported.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/PublicSources-build3-result.txt b/Tests/RunCMake/InterfaceLibrary/PublicSources-build3-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/PublicSources-build3-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/InterfaceLibrary/PublicSources-build3-stdout.txt b/Tests/RunCMake/InterfaceLibrary/PublicSources-build3-stdout.txt
new file mode 100644
index 0000000..aac9172
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/PublicSources-build3-stdout.txt
@@ -0,0 +1 @@
+iface2|Invalid project
diff --git a/Tests/RunCMake/InterfaceLibrary/PublicSources.cmake b/Tests/RunCMake/InterfaceLibrary/PublicSources.cmake
new file mode 100644
index 0000000..24785bb
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/PublicSources.cmake
@@ -0,0 +1,20 @@
+cmake_policy(SET CMP0076 NEW)
+enable_language(C)
+
+# Test that an interface library can have PUBLIC sources.
+# This causes the target to appear in the build system
+# *and* causes consumers to use the source.
+add_library(iface INTERFACE)
+target_sources(iface
+ PUBLIC iface.c
+ # Private sources do not compile here or propagate.
+ PRIVATE iface_broken.c
+ )
+
+# Test that an intermediate interface library does not get the
+# sources and does not appear in the build system.
+add_library(iface2 INTERFACE)
+target_link_libraries(iface2 INTERFACE iface)
+
+add_executable(use_iface use_iface.c)
+target_link_libraries(use_iface PRIVATE iface2)
diff --git a/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake b/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake
new file mode 100644
index 0000000..834b3c8
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/RunCMakeTest.cmake
@@ -0,0 +1,36 @@
+include(RunCMake)
+
+run_cmake(invalid_name)
+run_cmake(target_commands)
+run_cmake(no_shared_libs)
+run_cmake(invalid_signature)
+run_cmake(global-interface)
+run_cmake(genex_link)
+run_cmake(add_custom_command-TARGET)
+run_cmake(IMPORTED_LIBNAME-bad-value)
+run_cmake(IMPORTED_LIBNAME-non-iface)
+run_cmake(IMPORTED_LIBNAME-non-imported)
+
+function(run_WithSources CASE)
+ if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
+ endif()
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${CASE}-build)
+ run_cmake(${CASE})
+ set(RunCMake_TEST_NO_CLEAN 1)
+ foreach(build IN LISTS ARGN)
+ if(build MATCHES "^([^:]+)$")
+ run_cmake_command(${CASE}-${CMAKE_MATCH_1} ${CMAKE_COMMAND} --build . --config Debug)
+ elseif(build MATCHES "^([^:]+):([^:,]+)(,merge)?$")
+ if(CMAKE_MATCH_3 STREQUAL ",merge")
+ set(RunCMake_TEST_OUTPUT_MERGE 1)
+ endif()
+ run_cmake_command(${CASE}-${CMAKE_MATCH_1} ${CMAKE_COMMAND} --build . --config Debug --target ${CMAKE_MATCH_2})
+ endif()
+ endforeach()
+endfunction()
+
+run_WithSources(ConfigSources "build1:iface")
+run_WithSources(EmptySources "build1:iface" "build2:iface2,merge")
+run_WithSources(ExcludeFromAll "build1" "build2:iface" "build3:iface2,merge")
+run_WithSources(PublicSources "build1" "build2:iface" "build3:iface2,merge")
diff --git a/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-result.txt b/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/add_custom_command-TARGET-stderr.txt b/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-stderr.txt
index c095262..c095262 100644
--- a/Tests/RunCMake/interface_library/add_custom_command-TARGET-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET-stderr.txt
diff --git a/Tests/RunCMake/interface_library/add_custom_command-TARGET.cmake b/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET.cmake
index a5136ef..a5136ef 100644
--- a/Tests/RunCMake/interface_library/add_custom_command-TARGET.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/add_custom_command-TARGET.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/genex_link-result.txt b/Tests/RunCMake/InterfaceLibrary/genex_link-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/genex_link-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/interface_library/genex_link.cmake b/Tests/RunCMake/InterfaceLibrary/genex_link.cmake
index 0dbf029..0dbf029 100644
--- a/Tests/RunCMake/interface_library/genex_link.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/genex_link.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/global-interface-result.txt b/Tests/RunCMake/InterfaceLibrary/global-interface-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/global-interface-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/global-interface-stderr.txt b/Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt
index 23b45d9..38585eb 100644
--- a/Tests/RunCMake/interface_library/global-interface-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt
@@ -3,7 +3,7 @@ CMake Error at global-interface.cmake:2 \(add_library\):
GLOBAL
- Tried extensions( \.[A-Za-z+]+|
- )*
+ Tried extensions \.c \.C .*
+.*
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/interface_library/global-interface.cmake b/Tests/RunCMake/InterfaceLibrary/global-interface.cmake
index d2bfc64..d2bfc64 100644
--- a/Tests/RunCMake/interface_library/global-interface.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/global-interface.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/iface.c b/Tests/RunCMake/InterfaceLibrary/iface.c
new file mode 100644
index 0000000..c7e7372
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/iface.c
@@ -0,0 +1,4 @@
+int iface(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/InterfaceLibrary/iface_broken.c b/Tests/RunCMake/InterfaceLibrary/iface_broken.c
new file mode 100644
index 0000000..4ff7f31
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/iface_broken.c
@@ -0,0 +1 @@
+#error This file should not compile
diff --git a/Tests/RunCMake/InterfaceLibrary/invalid_name-result.txt b/Tests/RunCMake/InterfaceLibrary/invalid_name-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/invalid_name-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/invalid_name-stderr.txt b/Tests/RunCMake/InterfaceLibrary/invalid_name-stderr.txt
index e14fcde..e14fcde 100644
--- a/Tests/RunCMake/interface_library/invalid_name-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/invalid_name-stderr.txt
diff --git a/Tests/RunCMake/interface_library/invalid_name.cmake b/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake
index 9a965aa..575fcc6 100644
--- a/Tests/RunCMake/interface_library/invalid_name.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/invalid_name.cmake
@@ -1,4 +1,4 @@
-
+cmake_minimum_required(VERSION 2.8.12)
add_library(if$ace INTERFACE)
add_library(iface::target INTERFACE)
diff --git a/Tests/RunCMake/InterfaceLibrary/invalid_signature-result.txt b/Tests/RunCMake/InterfaceLibrary/invalid_signature-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/invalid_signature-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/invalid_signature-stderr.txt b/Tests/RunCMake/InterfaceLibrary/invalid_signature-stderr.txt
index 6374b33..763f9f8 100644
--- a/Tests/RunCMake/interface_library/invalid_signature-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/invalid_signature-stderr.txt
@@ -1,8 +1,3 @@
-CMake Error at invalid_signature.cmake:2 \(add_library\):
- add_library INTERFACE library requires no source arguments.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-+
CMake Error at invalid_signature.cmake:3 \(add_library\):
add_library INTERFACE library specified with conflicting/multiple types.
Call Stack \(most recent call first\):
@@ -73,16 +68,6 @@ CMake Error at invalid_signature.cmake:16 \(add_library\):
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
-CMake Error at invalid_signature.cmake:17 \(add_library\):
- add_library INTERFACE library may not be used with EXCLUDE_FROM_ALL.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-+
-CMake Error at invalid_signature.cmake:18 \(add_library\):
- add_library INTERFACE library may not be used with EXCLUDE_FROM_ALL.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-+
CMake Error at invalid_signature.cmake:20 \(add_library\):
add_library GLOBAL option may only be used with IMPORTED libraries.
Call Stack \(most recent call first\):
diff --git a/Tests/RunCMake/interface_library/invalid_signature.cmake b/Tests/RunCMake/InterfaceLibrary/invalid_signature.cmake
index 4e53534..2a575b5 100644
--- a/Tests/RunCMake/interface_library/invalid_signature.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/invalid_signature.cmake
@@ -1,5 +1,5 @@
-add_library(iface1 INTERFACE empty.cpp)
+
add_library(iface3 STATIC INTERFACE)
add_library(iface4 STATIC INTERFACE empty.cpp)
add_library(iface5 SHARED INTERFACE)
@@ -14,7 +14,7 @@ add_library(iface13 INTERFACE UNKNOWN)
add_library(iface14 INTERFACE ALIAS)
add_library(iface15 ALIAS INTERFACE)
add_library(iface16 INTERFACE INTERFACE)
-add_library(iface17 INTERFACE EXCLUDE_FROM_ALL)
-add_library(iface18 EXCLUDE_FROM_ALL INTERFACE)
+
+
# add_library(iface19 GLOBAL INTERFACE) Tested separately
add_library(iface20 INTERFACE GLOBAL)
diff --git a/Tests/RunCMake/interface_library/no_shared_libs.cmake b/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake
index ed81878..ed81878 100644
--- a/Tests/RunCMake/interface_library/no_shared_libs.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/no_shared_libs.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/target_commands-result.txt b/Tests/RunCMake/InterfaceLibrary/target_commands-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/target_commands-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/target_commands-stderr.txt b/Tests/RunCMake/InterfaceLibrary/target_commands-stderr.txt
index 9362a75..9362a75 100644
--- a/Tests/RunCMake/interface_library/target_commands-stderr.txt
+++ b/Tests/RunCMake/InterfaceLibrary/target_commands-stderr.txt
diff --git a/Tests/RunCMake/interface_library/target_commands.cmake b/Tests/RunCMake/InterfaceLibrary/target_commands.cmake
index 3182e89..3182e89 100644
--- a/Tests/RunCMake/interface_library/target_commands.cmake
+++ b/Tests/RunCMake/InterfaceLibrary/target_commands.cmake
diff --git a/Tests/RunCMake/InterfaceLibrary/use_iface.c b/Tests/RunCMake/InterfaceLibrary/use_iface.c
new file mode 100644
index 0000000..66293e4
--- /dev/null
+++ b/Tests/RunCMake/InterfaceLibrary/use_iface.c
@@ -0,0 +1,6 @@
+extern int iface(void);
+
+int main(void)
+{
+ return iface();
+}
diff --git a/Tests/RunCMake/Languages/CMakeLists.txt b/Tests/RunCMake/Languages/CMakeLists.txt
index 8996fef..74b3ff8 100644
--- a/Tests/RunCMake/Languages/CMakeLists.txt
+++ b/Tests/RunCMake/Languages/CMakeLists.txt
@@ -1,4 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
-cmake_policy(SET CMP0042 NEW)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/Make/RunCMakeTest.cmake b/Tests/RunCMake/Make/RunCMakeTest.cmake
index 6b2721c..32aafca 100644
--- a/Tests/RunCMake/Make/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Make/RunCMakeTest.cmake
@@ -27,12 +27,15 @@ function(run_VerboseBuild)
run_cmake_command(VerboseBuild-build ${CMAKE_COMMAND} --build . -v --clean-first)
unset(RunCMake-stdout-file)
set(_backup_lang "$ENV{LANG}")
+ set(_backup_lc_Messages "$ENV{LC_MESSAGES}")
if(MAKE_IS_GNU)
set(RunCMake-stdout-file VerboseBuild-nowork-gnu-stdout.txt)
set(ENV{LANG} "C")
+ set(ENV{LC_MESSAGES} "C")
endif()
run_cmake_command(VerboseBuild-nowork ${CMAKE_COMMAND} --build . --verbose)
set(ENV{LANG} "${_backup_lang}")
+ set(ENV{LC_MESSAGES} "${_backup_lc_messages}")
endfunction()
run_VerboseBuild()
diff --git a/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll-all-build-check.cmake b/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll-all-build-check.cmake
new file mode 100644
index 0000000..a4d2758
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll-all-build-check.cmake
@@ -0,0 +1,9 @@
+check_files("${RunCMake_TEST_BINARY_DIR}"
+ INCLUDE
+ ${TARGET_FILE_release_only_tool_Release}
+ ${TARGET_EXE_FILE_release_only_tool_Release}
+
+ EXCLUDE
+ ${TARGET_FILE_release_only_tool_Debug}
+ ${TARGET_EXE_FILE_release_only_tool_Debug}
+ )
diff --git a/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll.cmake b/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll.cmake
new file mode 100644
index 0000000..52f84ea
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/ExcludeFromAll.cmake
@@ -0,0 +1,12 @@
+enable_language(C)
+
+set(CMAKE_CONFIGURATION_TYPES "Release;Debug" CACHE STRING "")
+set(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "")
+set(CMAKE_CROSS_CONFIGS "all" CACHE STRING "")
+set(CMAKE_DEFAULT_CONFIGS "all" CACHE STRING "")
+
+add_executable(release_only_tool main.c)
+set_property(TARGET release_only_tool PROPERTY EXCLUDE_FROM_ALL "$<NOT:$<CONFIG:Release>>")
+
+include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
+generate_output_files(release_only_tool)
diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
index 76b488e..9249724 100644
--- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
@@ -274,6 +274,11 @@ run_ninja(Install default-install build.ninja install)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}/install")
run_ninja(Install all-install build.ninja install:all)
+set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ExcludeFromAll-build)
+run_cmake_configure(ExcludeFromAll)
+include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+run_cmake_build(ExcludeFromAll all "" all:all)
+
# FIXME Get this working
#set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/AutoMocExecutable-build)
#run_cmake_configure(AutoMocExecutable)
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
index 411cd7c..5c7882d 100644
--- a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
+++ b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
@@ -3,7 +3,7 @@ CMake Error at MissingSource.cmake:1 \(add_library\):
missing.c
- Tried extensions( \.[A-Za-z+]+|
- )*
+ Tried extensions \.c \.C .*
+.*
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ObsoleteQtMacros/CMakeLists.txt b/Tests/RunCMake/ObsoleteQtMacros/CMakeLists.txt
index 65ac8e8..44b5d30 100644
--- a/Tests/RunCMake/ObsoleteQtMacros/CMakeLists.txt
+++ b/Tests/RunCMake/ObsoleteQtMacros/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST})
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt b/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt
index 90afc12..c3922d6 100644
--- a/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt
+++ b/Tests/RunCMake/PositionIndependentCode/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} CXX)
# MSVC creates extra targets which pollute the stderr unless we set this.
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index cb20fb1..c13c694 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -154,6 +154,7 @@ function(run_cmake test)
"|[^\n]*xcodebuild[^\n]*warning: file type[^\n]*is based on missing file type"
"|[^\n]*is a member of multiple groups"
+ "|[^\n]*offset in archive not a multiple of 8"
"|[^\n]*from Time Machine by path"
"|[^\n]*Bullseye Testing Technology"
")[^\n]*\n)+"
diff --git a/Tests/RunCMake/SourceProperties/CMakeLists.txt b/Tests/RunCMake/SourceProperties/CMakeLists.txt
index a17c8cd..e93f0b6 100644
--- a/Tests/RunCMake/SourceProperties/CMakeLists.txt
+++ b/Tests/RunCMake/SourceProperties/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} C)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/TargetObjects/CMakeLists.txt b/Tests/RunCMake/TargetObjects/CMakeLists.txt
index be9d403..44b5d30 100644
--- a/Tests/RunCMake/TargetObjects/CMakeLists.txt
+++ b/Tests/RunCMake/TargetObjects/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST})
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/TargetPolicies/CMakeLists.txt b/Tests/RunCMake/TargetPolicies/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/TargetPolicies/CMakeLists.txt
+++ b/Tests/RunCMake/TargetPolicies/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/TargetProperties/CMakeLists.txt b/Tests/RunCMake/TargetProperties/CMakeLists.txt
index be9d403..44b5d30 100644
--- a/Tests/RunCMake/TargetProperties/CMakeLists.txt
+++ b/Tests/RunCMake/TargetProperties/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST})
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt
index 90afc12..c3922d6 100644
--- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt
+++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} CXX)
# MSVC creates extra targets which pollute the stderr unless we set this.
diff --git a/Tests/RunCMake/TargetSources/CMakeLists.txt b/Tests/RunCMake/TargetSources/CMakeLists.txt
index f452db1..a06591c 100644
--- a/Tests/RunCMake/TargetSources/CMakeLists.txt
+++ b/Tests/RunCMake/TargetSources/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake b/Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake
index f26ec2e..85e6587 100644
--- a/Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake
+++ b/Tests/RunCMake/UnityBuild/unitybuild_order-check.cmake
@@ -2,6 +2,6 @@ set(unitybuild_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_0_c
file(STRINGS ${unitybuild_c} unitybuild_c_strings)
string(REGEX MATCH ".*#include.*s3.c.*#include.*s1.c.*#include.*s2.c.*" matched_code ${unitybuild_c_strings})
if(NOT matched_code)
- set(RunCMake_TEST_FAILED "Generated unity file doesn't include expected oder of source files")
+ set(RunCMake_TEST_FAILED "Generated unity file doesn't include expected order of source files")
return()
endif()
diff --git a/Tests/RunCMake/VS10Project/InterfaceLibSources-check.cmake b/Tests/RunCMake/VS10Project/InterfaceLibSources-check.cmake
new file mode 100644
index 0000000..bcdc101
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/InterfaceLibSources-check.cmake
@@ -0,0 +1,25 @@
+set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/iface.vcxproj")
+if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+ return()
+endif()
+
+set(found_iface_h 0)
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "<([A-Za-z0-9_]+) +Include=.*iface\\.h")
+ set(rule "${CMAKE_MATCH_1}")
+ if(NOT rule STREQUAL "None")
+ set(RunCMake_TEST_FAILED "iface.h referenced as ${rule} instead of None in\n ${vcProjectFile}")
+ return()
+ endif()
+ if(found_iface_h)
+ set(RunCMake_TEST_FAILED "iface.h referenced multiple times in\n ${vcProjectFile}")
+ return()
+ endif()
+ set(found_iface_h 1)
+ endif()
+endforeach()
+if(NOT found_iface_h)
+ set(RunCMake_TEST_FAILED "iface.h not referenced in\n ${vcProjectFile}")
+endif()
diff --git a/Tests/RunCMake/VS10Project/InterfaceLibSources.cmake b/Tests/RunCMake/VS10Project/InterfaceLibSources.cmake
new file mode 100644
index 0000000..3672be1
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/InterfaceLibSources.cmake
@@ -0,0 +1 @@
+add_library(iface INTERFACE iface.h)
diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
index 93ef603..e9f251a 100644
--- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
@@ -6,6 +6,7 @@ cmake_policy(SET CMP0054 NEW)
run_cmake(VsCsharpSourceGroup)
run_cmake(VsCSharpCompilerOpts)
run_cmake(ExplicitCMakeLists)
+run_cmake(InterfaceLibSources)
run_cmake(RuntimeLibrary)
run_cmake(SourceGroupCMakeLists)
run_cmake(SourceGroupTreeCMakeLists)
diff --git a/Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake b/Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake
index 416220b..0d82d3f 100644
--- a/Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake
@@ -31,6 +31,6 @@ if (NOT "${OVERRIDEN_TOOLSET}" STREQUAL "MyCustomToolset")
endif()
if ("${NORMAL_TOOLSET}" STREQUAL "MyCustomToolset")
- set(RunCMake_TEST_FAILED "Main toolset was overriden (it shouldn't)")
+ set(RunCMake_TEST_FAILED "Main toolset was overridden (it shouldn't)")
return()
endif()
diff --git a/Tests/RunCMake/VS10Project/iface.h b/Tests/RunCMake/VS10Project/iface.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/iface.h
diff --git a/Tests/RunCMake/VSSolution/CMakeLists.txt b/Tests/RunCMake/VSSolution/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/VSSolution/CMakeLists.txt
+++ b/Tests/RunCMake/VSSolution/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/XcodeProject/CMakeLists.txt b/Tests/RunCMake/XcodeProject/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/XcodeProject/CMakeLists.txt
+++ b/Tests/RunCMake/XcodeProject/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/XcodeProject/InterfaceLibSources-check.cmake b/Tests/RunCMake/XcodeProject/InterfaceLibSources-check.cmake
new file mode 100644
index 0000000..613951a
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/InterfaceLibSources-check.cmake
@@ -0,0 +1,16 @@
+set(xcProjectFile "${RunCMake_TEST_BINARY_DIR}/InterfaceLibSources.xcodeproj/project.pbxproj")
+if(NOT EXISTS "${xcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${xcProjectFile} does not exist.")
+ return()
+endif()
+
+set(found_iface_h 0)
+file(STRINGS "${xcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "PBXFileReference.*explicitFileType.*sourcecode\\.c\\.h.*iface\\.h")
+ set(found_iface_h 1)
+ endif()
+endforeach()
+if(NOT found_iface_h)
+ set(RunCMake_TEST_FAILED "iface.h not referenced in\n ${xcProjectFile}")
+endif()
diff --git a/Tests/RunCMake/XcodeProject/InterfaceLibSources.cmake b/Tests/RunCMake/XcodeProject/InterfaceLibSources.cmake
new file mode 100644
index 0000000..3672be1
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/InterfaceLibSources.cmake
@@ -0,0 +1 @@
+add_library(iface INTERFACE iface.h)
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 342dbbc..ed300bb 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -2,6 +2,7 @@ include(RunCMake)
run_cmake(ExplicitCMakeLists)
run_cmake(ImplicitCMakeLists)
+run_cmake(InterfaceLibSources)
run_cmake(XcodeFileType)
run_cmake(XcodeAttributeLocation)
@@ -309,10 +310,10 @@ endif()
if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
function(XcodeRemoveExcessiveISystemSDK SDK)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeRemoveExcessiveISystemSDK-${SDK}-build)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS")
+ set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS" "-DCMAKE_OSX_SYSROOT=${SDK}")
run_cmake(XcodeRemoveExcessiveISystem)
set(RunCMake_TEST_NO_CLEAN 1)
- run_cmake_command(XcodeRemoveExcessiveISystemSDK-${SDK}-build ${CMAKE_COMMAND} --build . -- -sdk ${SDK})
+ run_cmake_command(XcodeRemoveExcessiveISystemSDK-${SDK}-build ${CMAKE_COMMAND} --build .)
endfunction()
XcodeRemoveExcessiveISystemSDK(iphoneos)
diff --git a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake b/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake
index ab31387..75da7b1 100644
--- a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.5)
+cmake_minimum_required(VERSION 3.3)
project(XcodeInstallIOS)
diff --git a/Tests/RunCMake/XcodeProject/iface.h b/Tests/RunCMake/XcodeProject/iface.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/iface.h
diff --git a/Tests/RunCMake/XcodeProject/main.cpp b/Tests/RunCMake/XcodeProject/main.cpp
index c94753f..f8b643a 100644
--- a/Tests/RunCMake/XcodeProject/main.cpp
+++ b/Tests/RunCMake/XcodeProject/main.cpp
@@ -1,4 +1,4 @@
-int main(int argc, const char* argv[])
+int main()
{
return 0;
}
diff --git a/Tests/RunCMake/XcodeProject/main.m b/Tests/RunCMake/XcodeProject/main.m
index 6dc190a..3e70e50 100644
--- a/Tests/RunCMake/XcodeProject/main.m
+++ b/Tests/RunCMake/XcodeProject/main.m
@@ -1,3 +1,3 @@
-int main(int argc, const char * argv[]) {
+int main(void) {
return 1;
}
diff --git a/Tests/RunCMake/add_dependencies/CMakeLists.txt b/Tests/RunCMake/add_dependencies/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/add_dependencies/CMakeLists.txt
+++ b/Tests/RunCMake/add_dependencies/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-AlphaNumeric.cmake b/Tests/RunCMake/add_test/CMP0110-Common-AlphaNumeric.cmake
new file mode 100644
index 0000000..c2ab433
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-AlphaNumeric.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "abcdefghijklmnopqrstuvwxyz0123456789")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-BracketArgument.cmake b/Tests/RunCMake/add_test/CMP0110-Common-BracketArgument.cmake
new file mode 100644
index 0000000..77cd3eb
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-BracketArgument.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "[=[InBracketBeforeSemi;InBracketAfterSemi]=]")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-EscapedSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-Common-EscapedSpecialChars.cmake
new file mode 100644
index 0000000..268b622
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-EscapedSpecialChars.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME \(\)\ \# )
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-FormerInvalidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-Common-FormerInvalidSpecialChars.cmake
new file mode 100644
index 0000000..65bca10
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-FormerInvalidSpecialChars.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "$[] #;\t\n\"\\")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-LeadingAndTrailingWhitespace.cmake b/Tests/RunCMake/add_test/CMP0110-Common-LeadingAndTrailingWhitespace.cmake
new file mode 100644
index 0000000..ec90e13
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-LeadingAndTrailingWhitespace.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME " SurroundedByWhitespace ")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-OtherSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-Common-OtherSpecialChars.cmake
new file mode 100644
index 0000000..f74c3b5
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-OtherSpecialChars.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "!§%&/ü:*😤~")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-Quote.cmake b/Tests/RunCMake/add_test/CMP0110-Common-Quote.cmake
new file mode 100644
index 0000000..a1ddb66
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-Quote.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "BeforeQuote\"\"AfterEscapedQuote")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-Semicolon.cmake b/Tests/RunCMake/add_test/CMP0110-Common-Semicolon.cmake
new file mode 100644
index 0000000..11fd4fb
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-Semicolon.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "BeforeSemi;AfterSemi")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-Space.cmake b/Tests/RunCMake/add_test/CMP0110-Common-Space.cmake
new file mode 100644
index 0000000..38dd28e
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-Space.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "BeforeSpace AfterSpace")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common-ValidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-Common-ValidSpecialChars.cmake
new file mode 100644
index 0000000..bfd082b
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common-ValidSpecialChars.cmake
@@ -0,0 +1,2 @@
+set(TEST_NAME "abc_.+-012")
+include(CMP0110-Common.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Common.cmake b/Tests/RunCMake/add_test/CMP0110-Common.cmake
new file mode 100644
index 0000000..915d171
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Common.cmake
@@ -0,0 +1,9 @@
+include(CTest)
+add_test(
+ NAME "${TEST_NAME}"
+ COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_LIST_DIR}/CMP0110-Test.cmake"
+)
+set_property(
+ TEST "${TEST_NAME}"
+ PROPERTY ENVIRONMENT CMAKE_add_test_ENVVAR=1
+)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric-ctest-stdout.txt
new file mode 100644
index 0000000..ed939bf
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric.cmake
new file mode 100644
index 0000000..7ea7042
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-AlphaNumeric.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-AlphaNumeric.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument-ctest-stdout.txt
new file mode 100644
index 0000000..7364d56
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \[=\[InBracketBeforeSemi;InBracketAfterSemi\]=\] \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument.cmake
new file mode 100644
index 0000000..baef07c
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-BracketArgument.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-BracketArgument.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars-ctest-stdout.txt
new file mode 100644
index 0000000..80435b6
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \(\) # \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars.cmake
new file mode 100644
index 0000000..c9b06bd
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-EscapedSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-EscapedSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars-ctest-stdout.txt
new file mode 100644
index 0000000..5ad8694
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \$\[\] .+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars.cmake
new file mode 100644
index 0000000..86ddf14
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-FormerInvalidSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialCharsMC.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialCharsMC.cmake
new file mode 100644
index 0000000..f9b556a
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-FormerInvalidSpecialCharsMC.cmake
@@ -0,0 +1 @@
+include(CMP0110-NEW-FormerInvalidSpecialChars.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-GeneratorExpressionSyntax.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-GeneratorExpressionSyntax.cmake
new file mode 100644
index 0000000..0790536
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-GeneratorExpressionSyntax.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-GeneratorExpressionSyntax.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace-ctest-stdout.txt
new file mode 100644
index 0000000..78379cd
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: [ ]SurroundedByWhitespace[ ] \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace.cmake
new file mode 100644
index 0000000..2d636a8
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-LeadingAndTrailingWhitespace.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-LeadingAndTrailingWhitespace.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars-ctest-stdout.txt
new file mode 100644
index 0000000..8ee3ea9
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: !§%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars.cmake
new file mode 100644
index 0000000..d77a6ce
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-OtherSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-OtherSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-Quote-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-Quote-ctest-stdout.txt
new file mode 100644
index 0000000..23dafd4
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-Quote-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeQuote""AfterEscapedQuote \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-Quote.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-Quote.cmake
new file mode 100644
index 0000000..2e7a6e1
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-Quote.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-Quote.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-Semicolon.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-Semicolon.cmake
new file mode 100644
index 0000000..1c6e1b1
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-Semicolon.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-Semicolon.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-Space.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-Space.cmake
new file mode 100644
index 0000000..38afb85
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-Space.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-Space.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars-ctest-stdout.txt
new file mode 100644
index 0000000..ae1a0b1
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars.cmake
new file mode 100644
index 0000000..62bb638
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-NEW-ValidSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 NEW)
+include(CMP0110-Common-ValidSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-ctest-stdout.txt
new file mode 100644
index 0000000..ed939bf
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric.cmake
new file mode 100644
index 0000000..bf4e82b
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-AlphaNumeric.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-AlphaNumeric.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-ctest-stdout.txt
new file mode 100644
index 0000000..093f5d4
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: InBracketBeforeSemi;InBracketAfterSemi \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument.cmake
new file mode 100644
index 0000000..05dfeb4
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-BracketArgument.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-BracketArgument.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-ctest-stderr.txt
new file mode 100644
index 0000000..ec2cf2c
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars-ctest-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at CTestTestfile.cmake:[0-9]+:
+ Parse error\. Function missing ending "\)"\. End of file reached\.
+
+
+No tests were found!!!
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars.cmake
new file mode 100644
index 0000000..1f0c99f
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-EscapedSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-EscapedSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-result.txt
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stderr.txt
new file mode 100644
index 0000000..c656b4c
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable:
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stdout.txt
new file mode 100644
index 0000000..d3b0fac
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \$\[\] \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars.cmake
new file mode 100644
index 0000000..883c5b6
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-FormerInvalidSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-ctest-stderr.txt
new file mode 100644
index 0000000..06ad927
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC-ctest-stderr.txt
@@ -0,0 +1,3 @@
+CMake Error at CTestTestfile.cmake:[0-9]+:
+ Parse error. Function missing ending "\)". Instead found unterminated
+ string with text "\\ NOT_AVAILABLE\)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC.cmake
new file mode 100644
index 0000000..47e03bc
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-FormerInvalidSpecialCharsMC.cmake
@@ -0,0 +1 @@
+include(CMP0110-OLD-FormerInvalidSpecialChars.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-GeneratorExpressionSyntax.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-GeneratorExpressionSyntax.cmake
new file mode 100644
index 0000000..7ee6b50
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-GeneratorExpressionSyntax.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-GeneratorExpressionSyntax.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-ctest-stdout.txt
new file mode 100644
index 0000000..870483e
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: SurroundedByWhitespace \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace.cmake
new file mode 100644
index 0000000..a20d211
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-LeadingAndTrailingWhitespace.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-LeadingAndTrailingWhitespace.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-ctest-stdout.txt
new file mode 100644
index 0000000..8ee3ea9
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: !§%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars.cmake
new file mode 100644
index 0000000..0e88183
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-OtherSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-OtherSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Quote-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Quote-ctest-stdout.txt
new file mode 100644
index 0000000..23dafd4
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Quote-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeQuote""AfterEscapedQuote \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Quote.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-Quote.cmake
new file mode 100644
index 0000000..c910a7c
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Quote.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-Quote.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-result.txt
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stderr.txt
new file mode 100644
index 0000000..0d43768
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: AfterSemi
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stdout.txt
new file mode 100644
index 0000000..0a6ebed
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeSemi \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon.cmake
new file mode 100644
index 0000000..283aeed
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Semicolon.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-Semicolon.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-result.txt
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stderr.txt
new file mode 100644
index 0000000..2ded1d4
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: AfterSpace
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stdout.txt
new file mode 100644
index 0000000..059c625
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Space-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeSpace \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-Space.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-Space.cmake
new file mode 100644
index 0000000..46f7c26
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-Space.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-Space.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-ctest-stdout.txt
new file mode 100644
index 0000000..ae1a0b1
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars.cmake
new file mode 100644
index 0000000..ffc6462
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-OLD-ValidSpecialChars.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0110 OLD)
+include(CMP0110-Common-ValidSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-Test.cmake b/Tests/RunCMake/add_test/CMP0110-Test.cmake
new file mode 100644
index 0000000..3f1dfad
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-Test.cmake
@@ -0,0 +1,3 @@
+if(NOT DEFINED ENV{CMAKE_add_test_ENVVAR})
+ message(FATAL_ERROR "Setting property on test did not succeed!")
+endif()
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric-ctest-stdout.txt
new file mode 100644
index 0000000..ed939bf
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric.cmake
new file mode 100644
index 0000000..d2af2aa
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-AlphaNumeric.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-AlphaNumeric.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-ctest-stdout.txt
new file mode 100644
index 0000000..093f5d4
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: InBracketBeforeSemi;InBracketAfterSemi \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-stderr.txt
new file mode 100644
index 0000000..19e60c1
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `\[=\[InBracketBeforeSemi;InBracketAfterSemi\]=\]´
+
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument.cmake
new file mode 100644
index 0000000..7887658
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-BracketArgument.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-BracketArgument.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-ctest-stderr.txt
new file mode 100644
index 0000000..ec2cf2c
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-ctest-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at CTestTestfile.cmake:[0-9]+:
+ Parse error\. Function missing ending "\)"\. End of file reached\.
+
+
+No tests were found!!!
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-stderr.txt
new file mode 100644
index 0000000..057f2d6
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `\(\) #´
+
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars.cmake
new file mode 100644
index 0000000..ca27462
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-EscapedSpecialChars.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-EscapedSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-result.txt
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stderr.txt
new file mode 100644
index 0000000..c656b4c
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable:
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stdout.txt
new file mode 100644
index 0000000..d3b0fac
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \$\[\] \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-stderr.txt
new file mode 100644
index 0000000..4f20ab9
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars-stderr.txt
@@ -0,0 +1,13 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `\$\[\] #;[ ]
+
+ "\\´
+
+This warning is for project developers\. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars.cmake
new file mode 100644
index 0000000..3b689c2
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialChars.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-FormerInvalidSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-ctest-stderr.txt
new file mode 100644
index 0000000..06ad927
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-ctest-stderr.txt
@@ -0,0 +1,3 @@
+CMake Error at CTestTestfile.cmake:[0-9]+:
+ Parse error. Function missing ending "\)". Instead found unterminated
+ string with text "\\ NOT_AVAILABLE\)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-stderr.txt
new file mode 100644
index 0000000..4f20ab9
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC-stderr.txt
@@ -0,0 +1,13 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `\$\[\] #;[ ]
+
+ "\\´
+
+This warning is for project developers\. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC.cmake
new file mode 100644
index 0000000..f77ff5c
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-FormerInvalidSpecialCharsMC.cmake
@@ -0,0 +1 @@
+include(CMP0110-WARN-FormerInvalidSpecialChars.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-GeneratorExpressionSyntax.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-GeneratorExpressionSyntax.cmake
new file mode 100644
index 0000000..77c9ed2
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-GeneratorExpressionSyntax.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-GeneratorExpressionSyntax.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-ctest-stdout.txt
new file mode 100644
index 0000000..870483e
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: SurroundedByWhitespace \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-stderr.txt
new file mode 100644
index 0000000..a392fed
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ ` SurroundedByWhitespace ´
+
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace.cmake
new file mode 100644
index 0000000..322bb4a
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-LeadingAndTrailingWhitespace.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-LeadingAndTrailingWhitespace.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars-ctest-stdout.txt
new file mode 100644
index 0000000..8ee3ea9
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: !§%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars.cmake
new file mode 100644
index 0000000..19fa6e6
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-OtherSpecialChars.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-OtherSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Quote-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Quote-ctest-stdout.txt
new file mode 100644
index 0000000..23dafd4
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Quote-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeQuote""AfterEscapedQuote \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Quote-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Quote-stderr.txt
new file mode 100644
index 0000000..39f3a92
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Quote-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `BeforeQuote""AfterEscapedQuote´
+
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Quote.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-Quote.cmake
new file mode 100644
index 0000000..33aaad0
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Quote.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-Quote.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-result.txt
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stderr.txt
new file mode 100644
index 0000000..0d43768
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: AfterSemi
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stdout.txt
new file mode 100644
index 0000000..0a6ebed
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeSemi \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-stderr.txt
new file mode 100644
index 0000000..5101618
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `BeforeSemi;AfterSemi´
+
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon.cmake
new file mode 100644
index 0000000..c5da394
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Semicolon.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-Semicolon.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-result.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-result.txt
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stderr.txt
new file mode 100644
index 0000000..2ded1d4
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: AfterSpace
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stdout.txt
new file mode 100644
index 0000000..059c625
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Space-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BeforeSpace \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Space-stderr.txt b/Tests/RunCMake/add_test/CMP0110-WARN-Space-stderr.txt
new file mode 100644
index 0000000..862eaa2
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Space-stderr.txt
@@ -0,0 +1,11 @@
+CMake Warning \(dev\) in CMakeLists\.txt:
+ Policy CMP0110 is not set: add_test\(\) supports arbitrary characters in test
+ names\. Run "cmake --help-policy CMP0110" for policy details\. Use the
+ cmake_policy command to set the policy and suppress this warning\.
+
+ The following name given to add_test\(\) is invalid if CMP0110 is not set or
+ set to OLD:
+
+ `BeforeSpace AfterSpace´
+
+This warning is for project developers\. Use -Wno-dev to suppress it\.
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-Space.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-Space.cmake
new file mode 100644
index 0000000..1f3234c
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-Space.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-Space.cmake)
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars-ctest-stdout.txt b/Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars-ctest-stdout.txt
new file mode 100644
index 0000000..ae1a0b1
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars-ctest-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars.cmake b/Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars.cmake
new file mode 100644
index 0000000..687c899
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMP0110-WARN-ValidSpecialChars.cmake
@@ -0,0 +1,2 @@
+# CMP0110 not set
+include(CMP0110-Common-ValidSpecialChars.cmake)
diff --git a/Tests/RunCMake/add_test/CMakeLists.txt b/Tests/RunCMake/add_test/CMakeLists.txt
new file mode 100644
index 0000000..ee8fc29
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.18)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/add_test/RunCMakeTest.cmake b/Tests/RunCMake/add_test/RunCMakeTest.cmake
new file mode 100644
index 0000000..bf6cbff
--- /dev/null
+++ b/Tests/RunCMake/add_test/RunCMakeTest.cmake
@@ -0,0 +1,35 @@
+include(RunCMake)
+
+set(ENV{CTEST_OUTPUT_ON_FAILURE} 1)
+
+function(run_case CASE_NAME)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0110-${CASE_NAME}-build)
+ run_cmake(CMP0110-${CASE_NAME})
+ # Run ctest on the generated CTestTestfile.cmake.
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(CMP0110-${CASE_NAME}-ctest ${CMAKE_CTEST_COMMAND} -C Debug)
+endfunction()
+
+set(cases
+ AlphaNumeric
+ ValidSpecialChars
+ OtherSpecialChars
+ EscapedSpecialChars
+ Space
+ LeadingAndTrailingWhitespace
+ Semicolon
+ Quote
+ BracketArgument
+ )
+
+if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ list(APPEND cases FormerInvalidSpecialCharsMC)
+else()
+ list(APPEND cases FormerInvalidSpecialChars)
+endif()
+
+foreach(case IN LISTS cases)
+ run_case(WARN-${case})
+ run_case(OLD-${case})
+ run_case(NEW-${case})
+endforeach()
diff --git a/Tests/RunCMake/alias_targets/CMakeLists.txt b/Tests/RunCMake/alias_targets/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/alias_targets/CMakeLists.txt
+++ b/Tests/RunCMake/alias_targets/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/alias_targets/invalid-name.cmake b/Tests/RunCMake/alias_targets/invalid-name.cmake
index bbd39e3..01983e5 100644
--- a/Tests/RunCMake/alias_targets/invalid-name.cmake
+++ b/Tests/RunCMake/alias_targets/invalid-name.cmake
@@ -1,4 +1,4 @@
-
+cmake_minimum_required(VERSION 2.8.12)
enable_language(CXX)
add_library(foo empty.cpp)
diff --git a/Tests/RunCMake/build_command/CMakeLists.txt b/Tests/RunCMake/build_command/CMakeLists.txt
index 73e6a78..f1a83e8 100644
--- a/Tests/RunCMake/build_command/CMakeLists.txt
+++ b/Tests/RunCMake/build_command/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
if(NOT NoProject)
project(${RunCMake_TEST} NONE)
endif()
diff --git a/Tests/RunCMake/cmake_language/call_invalid_command.cmake b/Tests/RunCMake/cmake_language/call_invalid_command.cmake
index 88bf08c..585aad4 100644
--- a/Tests/RunCMake/cmake_language/call_invalid_command.cmake
+++ b/Tests/RunCMake/cmake_language/call_invalid_command.cmake
@@ -9,6 +9,6 @@ foreach (command IN ITEMS "function" "ENDFUNCTION"
OUTPUT_QUIET ERROR_QUIET
RESULT_VARIABLE result)
if (NOT result)
- message (SEND_ERROR "cmake_language(CALL ${command}) unexpectedly successfull.")
+ message (SEND_ERROR "cmake_language(CALL ${command}) unexpectedly successful.")
endif()
endforeach()
diff --git a/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt b/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt
new file mode 100644
index 0000000..7d40dcb
--- /dev/null
+++ b/Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt
@@ -0,0 +1,26 @@
+^CMake Deprecation Warning at Before2812.cmake:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Deprecation Warning at Before2812.cmake:2 \(cmake_policy\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Deprecation Warning at Before2812.cmake:6 \(cmake_policy\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/cmake_minimum_required/Before2812.cmake b/Tests/RunCMake/cmake_minimum_required/Before2812.cmake
new file mode 100644
index 0000000..220e359
--- /dev/null
+++ b/Tests/RunCMake/cmake_minimum_required/Before2812.cmake
@@ -0,0 +1,6 @@
+cmake_minimum_required(VERSION 2.8.11)
+cmake_policy(VERSION 2.6)
+cmake_policy(PUSH)
+cmake_policy(VERSION 2.6) # simulate pre-3.18 install(EXPORT)-generated call
+cmake_policy(POP)
+cmake_policy(VERSION 2.8.11)
diff --git a/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt b/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt
index e8db6b0..667561e 100644
--- a/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt
+++ b/Tests/RunCMake/cmake_minimum_required/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
-include(${RunCMake_TEST}.cmake)
+include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt
index a874466..81d26d2 100644
--- a/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt
+++ b/Tests/RunCMake/cmake_minimum_required/CompatBefore24-stderr.txt
@@ -1,3 +1,12 @@
+^CMake Deprecation Warning at CompatBefore24.cmake:1 \(cmake_minimum_required\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
CMake Error in CMakeLists.txt:
You have set CMAKE_BACKWARDS_COMPATIBILITY to a CMake version less than
2.4. This version of CMake only supports backwards compatibility with
diff --git a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake
index 1030211..3a959bb 100644
--- a/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake
+++ b/Tests/RunCMake/cmake_minimum_required/RunCMakeTest.cmake
@@ -4,6 +4,7 @@ run_cmake(Before24)
run_cmake(CompatBefore24)
run_cmake(Future)
run_cmake(PolicyBefore24)
+run_cmake(Before2812)
run_cmake(Range)
run_cmake(RangeBad)
run_cmake(Unknown)
diff --git a/Tests/RunCMake/configure_file/NoSourcePermissions.cmake b/Tests/RunCMake/configure_file/NoSourcePermissions.cmake
new file mode 100644
index 0000000..c6ad131
--- /dev/null
+++ b/Tests/RunCMake/configure_file/NoSourcePermissions.cmake
@@ -0,0 +1,10 @@
+configure_file(NoSourcePermissions.sh NoSourcePermissions.sh.out
+ NO_SOURCE_PERMISSIONS)
+
+if (UNIX)
+ execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/NoSourcePermissions.sh.out
+ RESULT_VARIABLE result)
+ if (result EQUAL "0")
+ message(FATAL_ERROR "Copied file has executable permissions")
+ endif()
+endif()
diff --git a/Tests/RunCMake/configure_file/NoSourcePermissions.sh b/Tests/RunCMake/configure_file/NoSourcePermissions.sh
new file mode 100755
index 0000000..0aa8f41
--- /dev/null
+++ b/Tests/RunCMake/configure_file/NoSourcePermissions.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+#Testing NO_SOURCE_PERMISSIONS option of configure_file.
diff --git a/Tests/RunCMake/configure_file/RunCMakeTest.cmake b/Tests/RunCMake/configure_file/RunCMakeTest.cmake
index 32a0770..71694fb 100644
--- a/Tests/RunCMake/configure_file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/configure_file/RunCMakeTest.cmake
@@ -15,6 +15,7 @@ run_cmake(NewLineStyle-NoArg)
run_cmake(NewLineStyle-WrongArg)
run_cmake(NewLineStyle-ValidArg)
run_cmake(NewLineStyle-COPYONLY)
+run_cmake(NoSourcePermissions)
if(RunCMake_GENERATOR MATCHES "Make")
# Use a single build tree for a few tests without cleaning.
diff --git a/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in b/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in
index 3b8edf4..68a0fcb 100644
--- a/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in
+++ b/Tests/RunCMake/ctest_memcheck/CMakeLists.txt.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.9)
+cmake_minimum_required(VERSION 3.3)
project(CTestTestMemcheck@CASE_NAME@ NONE)
include(CTest)
diff --git a/Tests/RunCMake/ctest_memcheck/DummyCudaMemcheck-result.txt b/Tests/RunCMake/ctest_memcheck/DummyCudaMemcheck-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/ctest_memcheck/DummyCudaMemcheck-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/ctest_memcheck/DummyCudaMemcheck-stderr.txt b/Tests/RunCMake/ctest_memcheck/DummyCudaMemcheck-stderr.txt
new file mode 100644
index 0000000..d302b5c
--- /dev/null
+++ b/Tests/RunCMake/ctest_memcheck/DummyCudaMemcheck-stderr.txt
@@ -0,0 +1 @@
+Defect count: 23
diff --git a/Tests/RunCMake/ctest_memcheck/DummyCudaMemcheck-stdout.txt b/Tests/RunCMake/ctest_memcheck/DummyCudaMemcheck-stdout.txt
new file mode 100644
index 0000000..034ee1e
--- /dev/null
+++ b/Tests/RunCMake/ctest_memcheck/DummyCudaMemcheck-stdout.txt
@@ -0,0 +1,13 @@
+Memory checking results:
+Uninitialized __global__ memory read - 1
+Unused memory - 1
+Host API memory access error - 1
+Barrier error - 2
+Invalid __global__ read - 1
+cudaErrorLaunchFailure - 2
+Fatal UVM GPU fault - 1
+Fatal UVM CPU fault - 1
+Memory leak - 1
+Potential WAR hazard detected - 4
+Potential RAW hazard detected - 4
+Race reported - 4
diff --git a/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake b/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake
index ab4c5ab..2b3165b 100644
--- a/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_memcheck/RunCMakeTest.cmake
@@ -175,3 +175,15 @@ unset(CMAKELISTS_EXTRA_CODE)
unset(CTEST_EXTRA_CODE)
unset(CTEST_MEMCHECK_ARGS)
unset(CTEST_SUFFIX_CODE)
+
+#-----------------------------------------------------------------------------
+set(CMAKELISTS_EXTRA_CODE
+"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\"
+-P \"${RunCMake_SOURCE_DIR}/testCudaMemcheck.cmake\")
+")
+set(CTEST_SUFFIX_CODE "message(\"Defect count: \${defect_count}\")")
+set(CTEST_MEMCHECK_ARGS "DEFECT_COUNT defect_count")
+run_mc_test(DummyCudaMemcheck "${PSEUDO_CUDA_MEMCHECK}")
+unset(CTEST_MEMCHECK_ARGS)
+unset(CTEST_SUFFIX_CODE)
+unset(CTEST_EXTRA_CODE)
diff --git a/Tests/RunCMake/ctest_memcheck/test.cmake.in b/Tests/RunCMake/ctest_memcheck/test.cmake.in
index 50b4b6a..eedf080 100644
--- a/Tests/RunCMake/ctest_memcheck/test.cmake.in
+++ b/Tests/RunCMake/ctest_memcheck/test.cmake.in
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.9)
+cmake_minimum_required(VERSION 3.3)
# Settings:
set(CTEST_SITE "@SITE@")
diff --git a/Tests/RunCMake/ctest_memcheck/testCudaMemcheck.cmake b/Tests/RunCMake/ctest_memcheck/testCudaMemcheck.cmake
new file mode 100644
index 0000000..adc7a1a
--- /dev/null
+++ b/Tests/RunCMake/ctest_memcheck/testCudaMemcheck.cmake
@@ -0,0 +1,279 @@
+# this file simulates an execution of cuda-memcheck
+
+set(LOG_FILE "$ENV{PSEUDO_LOGFILE}")
+message("LOG_FILE=[${LOG_FILE}]")
+
+# clear the log file
+file(REMOVE "${LOG_FILE}")
+
+# create an error of each type of sanitizer tool and failure
+
+# initcheck
+file(APPEND "${LOG_FILE}"
+"========= CUDA-MEMCHECK
+========= Uninitialized __global__ memory read of size 4
+========= at 0x00000020 in test(int*, int*)
+========= by thread (0,0,0) in block (0,0,0)
+========= Address 0x1303d80000
+========= Saved host backtrace up to driver entry point
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./uninit-read [0x101d9]
+========= Host Frame:./uninit-read [0x10267]
+========= Host Frame:./uninit-read [0x465b5]
+========= Host Frame:./uninit-read [0x3342]
+========= Host Frame:./uninit-read [0x3143]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./uninit-read [0x31e2]
+=========
+========= Unused memory in allocation 0x1303d80000 of size 16 bytes
+========= Not written any memory.
+========= 100.00% of allocation were unused.
+========= Saved host backtrace up to driver entry point
+========= Host Frame:/lib64/libcuda.so.1 (cuMemAlloc_v2 + 0x1b7) [0x26ec97]
+========= Host Frame:./uninit-read [0x2bbd3]
+========= Host Frame:./uninit-read [0x71ab]
+========= Host Frame:./uninit-read [0x3c84f]
+========= Host Frame:./uninit-read [0x3111]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./uninit-read [0x31e2]
+=========
+========= Host API memory access error at host access to 0x1303fd1400 of size 25600 bytes
+========= Uninitialized access at 0x1303fd4600 on access by cudaMemcopy source.
+========= Saved host backtrace up to driver entry point at error
+========= Host Frame:/usr/lib/x86_64-linux-gnu/libcuda.so.1 (cuMemcpyDtoH_v2 + 0x1ec) [0x29200c]
+========= Host Frame:/usr/local/cuda/targets/x86_64-linux/lib/libcudart.so.10.1 [0x38aaa]
+========= Host Frame:/usr/local/cuda/targets/x86_64-linux/lib/libcudart.so.10.1 [0x18946]
+========= Host Frame:/usr/local/cuda/targets/x86_64-linux/lib/libcudart.so.10.1 (cudaMemcpy + 0x1a2) [0x3b8c2]
+========= Host Frame:/something/somewhere [0xcafe]
+=========
+========= ERROR SUMMARY: 2 errors
+")
+
+
+# synccheck
+file(APPEND "${LOG_FILE}"
+"========= CUDA-MEMCHECK
+========= Barrier error detected. Divergent thread(s) in warp
+========= at 0x00000058 in test(int*, int*)
+========= by thread (1,0,0) in block (0,0,0)
+========= Device Frame:test(int*, int*) (test(int*, int*) : 0x60)
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./sync [0x101d9]
+========= Host Frame:./sync [0x10267]
+========= Host Frame:./sync [0x465b5]
+========= Host Frame:./sync [0x3342]
+========= Host Frame:./sync [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./sync [0x31e2]
+=========
+========= Barrier error detected. Divergent thread(s) in warp
+========= at 0x00000058 in test(int*, int*)
+========= by thread (0,0,0) in block (0,0,0)
+========= Device Frame:test(int*, int*) (test(int*, int*) : 0x60)
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./sync [0x101d9]
+========= Host Frame:./sync [0x10267]
+========= Host Frame:./sync [0x465b5]
+========= Host Frame:./sync [0x3342]
+========= Host Frame:./sync [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./sync [0x31e2]
+=========
+========= ERROR SUMMARY: 2 errors
+")
+
+# memcheck
+file(APPEND "${LOG_FILE}"
+"========= CUDA-MEMCHECK
+========= Invalid __global__ read of size 4
+========= at 0x00000020 in test(int*, int*)
+========= by thread (0,0,0) in block (0,0,0)
+========= Address 0x00000000 is out of bounds
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./invalid-read [0x101d9]
+========= Host Frame:./invalid-read [0x10267]
+========= Host Frame:./invalid-read [0x465b5]
+========= Host Frame:./invalid-read [0x3342]
+========= Host Frame:./invalid-read [0x3142]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./invalid-read [0x31e2]
+=========
+========= Program hit cudaErrorLaunchFailure (error 719) due to \"unspecified launch failure\" on CUDA API call to cudaDeviceSynchronize.
+========= Saved host backtrace up to driver entry point at error
+========= Host Frame:/lib64/libcuda.so.1 [0x3ac5a3]
+========= Host Frame:./invalid-read [0x2e576]
+========= Host Frame:./invalid-read [0x3147]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./invalid-read [0x31e2]
+=========
+========= Program hit cudaErrorLaunchFailure (error 719) due to \"unspecified launch failure\" on CUDA API call to cudaFree.
+========= Saved host backtrace up to driver entry point at error
+========= Host Frame:/lib64/libcuda.so.1 [0x3ac5a3]
+========= Host Frame:./invalid-read [0x3c106]
+========= Host Frame:./invalid-read [0x3150]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./invalid-read [0x31e2]
+=========
+========= Fatal UVM GPU fault of type invalid pde due to invalid address
+========= during atomic access to address 0x20be00000
+=========
+========= Fatal UVM CPU fault due to invalid operation
+========= during read access to address 0x1357c92000
+=========
+========= LEAK SUMMARY: 0 bytes leaked in 0 allocations
+========= ERROR SUMMARY: 3 errors
+")
+
+# memcheck with leak-check full
+file(APPEND "${LOG_FILE}"
+"========= CUDA-MEMCHECK
+========= Leaked 10 bytes at 0x1303d80000
+========= Saved host backtrace up to driver entry point at cudaMalloc time
+========= Host Frame:/lib64/libcuda.so.1 (cuMemAlloc_v2 + 0x1b7) [0x26ec97]
+========= Host Frame:./leak [0x2bab3]
+========= Host Frame:./leak [0x708b]
+========= Host Frame:./leak [0x3c72f]
+========= Host Frame:./leak [0x3113]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./leak [0x3174]
+=========
+========= LEAK SUMMARY: 10 bytes leaked in 1 allocations
+========= ERROR SUMMARY: 1 error
+")
+
+# racecheck with racecheck-report all
+file(APPEND "${LOG_FILE}"
+"========= CUDA-MEMCHECK
+========= WARN:(Warp Level Programming) Potential WAR hazard detected at __shared__ 0x3 in block (0, 0, 0) :
+========= Read Thread (31, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Write Thread (0, 0, 0) at 0x000001a8 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0, Incoming Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential WAR hazard detected at __shared__ 0x2 in block (0, 0, 0) :
+========= Read Thread (31, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Write Thread (0, 0, 0) at 0x000001a8 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0, Incoming Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential WAR hazard detected at __shared__ 0x1 in block (0, 0, 0) :
+========= Read Thread (31, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Write Thread (0, 0, 0) at 0x000001a8 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0, Incoming Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential WAR hazard detected at __shared__ 0x0 in block (0, 0, 0) :
+========= Read Thread (31, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Write Thread (0, 0, 0) at 0x000001a8 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0, Incoming Value : 1
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential RAW hazard detected at __shared__ 0x3 in block (0, 0, 0) :
+========= Write Thread (31, 0, 0) at 0x00000148 in ./race.cu:3:test(int*, int*)
+========= Read Thread (0, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential RAW hazard detected at __shared__ 0x2 in block (0, 0, 0) :
+========= Write Thread (31, 0, 0) at 0x00000148 in ./race.cu:3:test(int*, int*)
+========= Read Thread (0, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential RAW hazard detected at __shared__ 0x1 in block (0, 0, 0) :
+========= Write Thread (31, 0, 0) at 0x00000148 in ./race.cu:3:test(int*, int*)
+========= Read Thread (0, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN:(Warp Level Programming) Potential RAW hazard detected at __shared__ 0x0 in block (0, 0, 0) :
+========= Write Thread (31, 0, 0) at 0x00000148 in ./race.cu:3:test(int*, int*)
+========= Read Thread (0, 0, 0) at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= Current Value : 0
+========= Saved host backtrace up to driver entry point at kernel launch time
+========= Host Frame:/lib64/libcuda.so.1 (cuLaunchKernel + 0x346) [0x297db6]
+========= Host Frame:./race [0x101d9]
+========= Host Frame:./race [0x10267]
+========= Host Frame:./race [0x465b5]
+========= Host Frame:./race [0x3342]
+========= Host Frame:./race [0x314a]
+========= Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf5) [0x22505]
+========= Host Frame:./race [0x31e2]
+=========
+========= WARN: Race reported between Read access at 0x00000170 in ./race.cu:4:test(int*, int*)
+========= and Write access at 0x00000148 in ./race.cu:3:test(int*, int*) [4 hazards]
+========= and Write access at 0x000001a8 in ./race.cu:4:test(int*, int*) [4 hazards]
+=========
+========= WARN: Race reported between Write access at 0x00000148 in ./race.cu:3:test(int*, int*)
+========= and Write access at 0x00000148 in ./race.cu:3:test(int*, int*) [124 hazards]
+========= and Read access at 0x00000170 in ./race.cu:4:test(int*, int*) [4 hazards]
+=========
+========= WARN: Race reported between Write access at 0x000001a8 in ./race.cu:4:test(int*, int*)
+========= and Write access at 0x000001a8 in ./race.cu:4:test(int*, int*) [124 hazards]
+========= and Read access at 0x00000170 in ./race.cu:4:test(int*, int*) [4 hazards]
+=========
+========= WARN: Race reported between Write access at 0x00000148 in ./race.cu:3:test(int*, int*)
+========= and Write access at 0x00000148 in ./race.cu:3:test(int*, int*) [124 hazards]
+========= and Read access at 0x00000170 in ./race.cu:4:test(int*, int*) [4 hazards]
+=========
+========= RACECHECK SUMMARY: 12 hazards displayed (0 errors, 12 warnings)
+")
diff --git a/Tests/RunCMake/ctest_update/test.cmake.in b/Tests/RunCMake/ctest_update/test.cmake.in
index 25b8423..01aab26 100644
--- a/Tests/RunCMake/ctest_update/test.cmake.in
+++ b/Tests/RunCMake/ctest_update/test.cmake.in
@@ -10,7 +10,7 @@ set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@")
set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-# FIXME: update test to do someting meaningful with this.
+# FIXME: update test to do something meaningful with this.
set(CTEST_UPDATE_COMMAND "not-actually-used")
set(ctest_test_args "@CASE_CTEST_UPDATE_ARGS@")
diff --git a/Tests/RunCMake/export/CMakeLists.txt b/Tests/RunCMake/export/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/export/CMakeLists.txt
+++ b/Tests/RunCMake/export/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt
new file mode 100644
index 0000000..b0f0d19
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at DOWNLOAD-no-save-hash\.cmake:[0-9]+ \(file\):
+ file DOWNLOAD cannot calculate hash if file is not saved\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake
new file mode 100644
index 0000000..ce959a7
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake
@@ -0,0 +1,8 @@
+if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^/")
+ set(slash /)
+endif()
+file(DOWNLOAD
+ "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-no-save-md5.txt"
+ EXPECTED_HASH MD5=55555555555555555555555555555555
+ STATUS status
+ )
diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index a4de1d3..8d84943 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -11,6 +11,7 @@ run_cmake(DOWNLOAD-netrc-bad)
run_cmake(DOWNLOAD-tls-cainfo-not-set)
run_cmake(DOWNLOAD-tls-verify-not-set)
run_cmake(DOWNLOAD-pass-not-set)
+run_cmake(DOWNLOAD-no-save-hash)
run_cmake(TOUCH)
run_cmake(TOUCH-error-in-source-directory)
run_cmake(TOUCH-error-missing-directory)
diff --git a/Tests/RunCMake/find_dependency/CMakeLists.txt b/Tests/RunCMake/find_dependency/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/find_dependency/CMakeLists.txt
+++ b/Tests/RunCMake/find_dependency/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/find_package/CMakeLists.txt b/Tests/RunCMake/find_package/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/find_package/CMakeLists.txt
+++ b/Tests/RunCMake/find_package/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/find_package/MissingNormalWarnNoModuleOld-stderr.txt b/Tests/RunCMake/find_package/MissingNormalWarnNoModuleOld-stderr.txt
index b336b56..ebfd7d0 100644
--- a/Tests/RunCMake/find_package/MissingNormalWarnNoModuleOld-stderr.txt
+++ b/Tests/RunCMake/find_package/MissingNormalWarnNoModuleOld-stderr.txt
@@ -1,9 +1,10 @@
CMake Warning \(dev\) at MissingNormalWarnNoModuleOld.cmake:2 \(find_package\):
- find_package called without NO_MODULE option and no FindNotHere.cmake
- module is in CMAKE_MODULE_PATH. Add NO_MODULE to exclusively request
- Config mode and search for a package configuration file provided by NotHere
- \(NotHereConfig.cmake or nothere-config.cmake\). Otherwise make
- FindNotHere.cmake available in CMAKE_MODULE_PATH.
+ find_package called without either MODULE or CONFIG option and no
+ FindNotHere.cmake module is in CMAKE_MODULE_PATH. Add MODULE to
+ exclusively request Module mode and fail if FindNotHere.cmake is missing.
+ Add CONFIG to exclusively request Config mode and search for a package
+ configuration file provided by NotHere \(NotHereConfig.cmake or
+ nothere-config.cmake\).
\(Variable CMAKE_FIND_PACKAGE_WARN_NO_MODULE enabled this warning.\)
Call Stack \(most recent call first\):
diff --git a/Tests/RunCMake/find_program/BundleSpaceInName-stdout.txt b/Tests/RunCMake/find_program/BundleSpaceInName-stdout.txt
new file mode 100644
index 0000000..331d465
--- /dev/null
+++ b/Tests/RunCMake/find_program/BundleSpaceInName-stdout.txt
@@ -0,0 +1 @@
+-- FakeApp_EXECUTABLE='.*/Tests/RunCMake/find_program/BundleSpaceInName-build/Fake app.app/Contents/MacOS/Fake app'
diff --git a/Tests/RunCMake/find_program/BundleSpaceInName.cmake b/Tests/RunCMake/find_program/BundleSpaceInName.cmake
new file mode 100644
index 0000000..9152d5b
--- /dev/null
+++ b/Tests/RunCMake/find_program/BundleSpaceInName.cmake
@@ -0,0 +1,8 @@
+set(fakeApp "${CMAKE_CURRENT_BINARY_DIR}/Fake app.app/Contents/MacOS/Fake app")
+file(WRITE "${fakeApp}" "#!/bin/sh\n")
+execute_process(COMMAND chmod a+rx "${fakeApp}")
+
+find_program(FakeApp_EXECUTABLE NAMES "Fake app" NO_DEFAULT_PATH
+ PATHS "${CMAKE_CURRENT_BINARY_DIR}"
+)
+message(STATUS "FakeApp_EXECUTABLE='${FakeApp_EXECUTABLE}'")
diff --git a/Tests/RunCMake/find_program/ExeNoRead.cmake b/Tests/RunCMake/find_program/CMP0109-Common.cmake
index 7e22dc5..525413a 100644
--- a/Tests/RunCMake/find_program/ExeNoRead.cmake
+++ b/Tests/RunCMake/find_program/CMP0109-Common.cmake
@@ -1,4 +1,7 @@
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/ExeNoRead" "#!/bin/sh\n")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/ReadNoExe" "#ReadNoExe")
execute_process(COMMAND chmod -r+x "${CMAKE_CURRENT_BINARY_DIR}/ExeNoRead")
find_program(ExeNoRead_EXECUTABLE NAMES ExeNoRead NO_DEFAULT_PATH PATHS "${CMAKE_CURRENT_BINARY_DIR}")
message(STATUS "ExeNoRead_EXECUTABLE='${ExeNoRead_EXECUTABLE}'")
+find_program(ReadNoExe_EXECUTABLE NAMES ReadNoExe NO_DEFAULT_PATH PATHS "${CMAKE_CURRENT_BINARY_DIR}")
+message(STATUS "ReadNoExe_EXECUTABLE='${ReadNoExe_EXECUTABLE}'")
diff --git a/Tests/RunCMake/find_program/CMP0109-NEW-stdout.txt b/Tests/RunCMake/find_program/CMP0109-NEW-stdout.txt
new file mode 100644
index 0000000..2744463
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-NEW-stdout.txt
@@ -0,0 +1,2 @@
+-- ExeNoRead_EXECUTABLE='.*/Tests/RunCMake/find_program/CMP0109-NEW-build/ExeNoRead'
+-- ReadNoExe_EXECUTABLE='ReadNoExe_EXECUTABLE-NOTFOUND'
diff --git a/Tests/RunCMake/find_program/CMP0109-NEW.cmake b/Tests/RunCMake/find_program/CMP0109-NEW.cmake
new file mode 100644
index 0000000..b4a4033
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0109 NEW)
+include(CMP0109-Common.cmake)
diff --git a/Tests/RunCMake/find_program/CMP0109-OLD-stdout.txt b/Tests/RunCMake/find_program/CMP0109-OLD-stdout.txt
new file mode 100644
index 0000000..1a0e2a8
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-OLD-stdout.txt
@@ -0,0 +1,2 @@
+-- ExeNoRead_EXECUTABLE='ExeNoRead_EXECUTABLE-NOTFOUND'
+-- ReadNoExe_EXECUTABLE='.*/Tests/RunCMake/find_program/CMP0109-OLD-build/ReadNoExe'
diff --git a/Tests/RunCMake/find_program/CMP0109-OLD.cmake b/Tests/RunCMake/find_program/CMP0109-OLD.cmake
new file mode 100644
index 0000000..8260161
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0109 OLD)
+include(CMP0109-Common.cmake)
diff --git a/Tests/RunCMake/find_program/CMP0109-WARN-stderr.txt b/Tests/RunCMake/find_program/CMP0109-WARN-stderr.txt
new file mode 100644
index 0000000..202fc6d
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-WARN-stderr.txt
@@ -0,0 +1,29 @@
+^CMake Warning \(dev\) at CMP0109-Common.cmake:4 \(find_program\):
+ Policy CMP0109 is not set: find_program\(\) requires permission to execute
+ but not to read. Run "cmake --help-policy CMP0109" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+
+ The file
+
+ .*/Tests/RunCMake/find_program/CMP0109-WARN-build/ExeNoRead
+
+ is executable but not readable. CMake is ignoring it for compatibility.
+Call Stack \(most recent call first\):
+ CMP0109-WARN.cmake:1 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) at CMP0109-Common.cmake:6 \(find_program\):
+ Policy CMP0109 is not set: find_program\(\) requires permission to execute
+ but not to read. Run "cmake --help-policy CMP0109" for policy details.
+ Use the cmake_policy command to set the policy and suppress this warning.
+
+ The file
+
+ .*/Tests/RunCMake/find_program/CMP0109-WARN-build/ReadNoExe
+
+ is readable but not executable. CMake is using it for compatibility.
+Call Stack \(most recent call first\):
+ CMP0109-WARN.cmake:1 \(include\)
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/find_program/CMP0109-WARN-stdout.txt b/Tests/RunCMake/find_program/CMP0109-WARN-stdout.txt
new file mode 100644
index 0000000..baf560f
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-WARN-stdout.txt
@@ -0,0 +1,2 @@
+-- ExeNoRead_EXECUTABLE='ExeNoRead_EXECUTABLE-NOTFOUND'
+-- ReadNoExe_EXECUTABLE='.*/Tests/RunCMake/find_program/CMP0109-WARN-build/ReadNoExe'
diff --git a/Tests/RunCMake/find_program/CMP0109-WARN.cmake b/Tests/RunCMake/find_program/CMP0109-WARN.cmake
new file mode 100644
index 0000000..a3d59af
--- /dev/null
+++ b/Tests/RunCMake/find_program/CMP0109-WARN.cmake
@@ -0,0 +1 @@
+include(CMP0109-Common.cmake)
diff --git a/Tests/RunCMake/find_program/ExeNoRead-stdout.txt b/Tests/RunCMake/find_program/ExeNoRead-stdout.txt
deleted file mode 100644
index f231178..0000000
--- a/Tests/RunCMake/find_program/ExeNoRead-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
--- ExeNoRead_EXECUTABLE='ExeNoRead_EXECUTABLE-NOTFOUND'
diff --git a/Tests/RunCMake/find_program/RunCMakeTest.cmake b/Tests/RunCMake/find_program/RunCMakeTest.cmake
index 2bb777b..3e23920 100644
--- a/Tests/RunCMake/find_program/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_program/RunCMakeTest.cmake
@@ -17,6 +17,12 @@ else()
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT "${uid}" STREQUAL "0")
- run_cmake(ExeNoRead)
+ run_cmake(CMP0109-WARN)
+ run_cmake(CMP0109-OLD)
+ run_cmake(CMP0109-NEW)
endif()
endif()
+
+if(APPLE)
+ run_cmake(BundleSpaceInName)
+endif()
diff --git a/Tests/RunCMake/foreach/foreach-ZIP_LISTS-multiple-iter-vars-test.cmake b/Tests/RunCMake/foreach/foreach-ZIP_LISTS-multiple-iter-vars-test.cmake
index 9647dea..3b03ed7 100644
--- a/Tests/RunCMake/foreach/foreach-ZIP_LISTS-multiple-iter-vars-test.cmake
+++ b/Tests/RunCMake/foreach/foreach-ZIP_LISTS-multiple-iter-vars-test.cmake
@@ -8,13 +8,13 @@ function(foreachTest result list_var_1 list_var_2 list_var_3)
list(APPEND CMAKE_MESSAGE_INDENT "| ")
foreach(first second third IN ZIP_LISTS ${list_var_1} ${list_var_2} ${list_var_3})
if(NOT first)
- set(first "[undefiend]")
+ set(first "[undefined]")
endif()
if(NOT second)
- set(second "[undefiend]")
+ set(second "[undefined]")
endif()
if(NOT third)
- set(third "[undefiend]")
+ set(third "[undefined]")
endif()
if(NOT _arg_MUTE)
message(STATUS "${first}, ${second}, ${third}")
diff --git a/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test-stdout.txt b/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test-stdout.txt
index 25433fd..4730a86 100644
--- a/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test-stdout.txt
+++ b/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test-stdout.txt
@@ -14,6 +14,6 @@
-- | one, satu, raz
-- | two, dua, dva
-- | three, tiga, tri
--- | \[undefiend\], empat, \[undefiend\]
+-- | \[undefined\], empat, \[undefined\]
-- End output
-- <<< test variable value restored -- PASSED >>>
diff --git a/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test.cmake b/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test.cmake
index 56cfe64..aa0ed07 100644
--- a/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test.cmake
+++ b/Tests/RunCMake/foreach/foreach-ZIP_LISTS-test.cmake
@@ -9,7 +9,7 @@ function(foreachTest result list_var_1 list_var_2 list_var_3)
foreach(num IN ZIP_LISTS ${list_var_1} ${list_var_2} ${list_var_3})
foreach(i RANGE 2)
if(NOT num_${i})
- set(num_${i} "[undefiend]")
+ set(num_${i} "[undefined]")
endif()
endforeach()
if(NOT _arg_MUTE)
diff --git a/Tests/RunCMake/get_filename_component/IncorrectArguments-result.txt b/Tests/RunCMake/get_filename_component/IncorrectArguments-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_filename_component/IncorrectArguments-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_filename_component/IncorrectArguments-stderr.txt b/Tests/RunCMake/get_filename_component/IncorrectArguments-stderr.txt
new file mode 100644
index 0000000..af08afa
--- /dev/null
+++ b/Tests/RunCMake/get_filename_component/IncorrectArguments-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at IncorrectArguments.cmake:1 \(get_filename_component\):
+ get_filename_component called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/get_filename_component/IncorrectArguments.cmake b/Tests/RunCMake/get_filename_component/IncorrectArguments.cmake
new file mode 100644
index 0000000..e329e29
--- /dev/null
+++ b/Tests/RunCMake/get_filename_component/IncorrectArguments.cmake
@@ -0,0 +1,2 @@
+get_filename_component(var)
+message("The error is fatal, so this should not print")
diff --git a/Tests/RunCMake/get_filename_component/RunCMakeTest.cmake b/Tests/RunCMake/get_filename_component/RunCMakeTest.cmake
index 156fc8f..a7820a0 100644
--- a/Tests/RunCMake/get_filename_component/RunCMakeTest.cmake
+++ b/Tests/RunCMake/get_filename_component/RunCMakeTest.cmake
@@ -1,4 +1,5 @@
include(RunCMake)
+run_cmake(IncorrectArguments)
run_cmake(KnownComponents)
run_cmake(UnknownComponent)
diff --git a/Tests/RunCMake/get_filename_component/UnknownComponent-stderr.txt b/Tests/RunCMake/get_filename_component/UnknownComponent-stderr.txt
index b146e5b..f86a688 100644
--- a/Tests/RunCMake/get_filename_component/UnknownComponent-stderr.txt
+++ b/Tests/RunCMake/get_filename_component/UnknownComponent-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at UnknownComponent.cmake:1 \(get_filename_component\):
+^CMake Error at UnknownComponent.cmake:1 \(get_filename_component\):
get_filename_component unknown component BOGUS
Call Stack \(most recent call first\):
- CMakeLists.txt:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/get_filename_component/UnknownComponent.cmake b/Tests/RunCMake/get_filename_component/UnknownComponent.cmake
index 06abc51..19521ba 100644
--- a/Tests/RunCMake/get_filename_component/UnknownComponent.cmake
+++ b/Tests/RunCMake/get_filename_component/UnknownComponent.cmake
@@ -1 +1,2 @@
get_filename_component(var "/path/to/filename.ext.in" BOGUS)
+message("The error is fatal, so this should not print")
diff --git a/Tests/RunCMake/get_property/CMakeLists.txt b/Tests/RunCMake/get_property/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/get_property/CMakeLists.txt
+++ b/Tests/RunCMake/get_property/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/if/CMakeLists.txt b/Tests/RunCMake/if/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/if/CMakeLists.txt
+++ b/Tests/RunCMake/if/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include/CMakeLists.txt b/Tests/RunCMake/include/CMakeLists.txt
index 12cd3c7..4b3de84 100644
--- a/Tests/RunCMake/include/CMakeLists.txt
+++ b/Tests/RunCMake/include/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include_external_msproject/CMakeLists.txt b/Tests/RunCMake/include_external_msproject/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/include_external_msproject/CMakeLists.txt
+++ b/Tests/RunCMake/include_external_msproject/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include_external_msproject/check_utils.cmake b/Tests/RunCMake/include_external_msproject/check_utils.cmake
index 0a2ba63..0162519 100644
--- a/Tests/RunCMake/include_external_msproject/check_utils.cmake
+++ b/Tests/RunCMake/include_external_msproject/check_utils.cmake
@@ -63,7 +63,7 @@ function(check_custom_platform TARGET_FILE PROJECT_NAME PLATFORM_NAME RESULT)
return()
endif()
- # probably whould be better to use configuration name
+ # probably would be better to use configuration name
# extracted from CMAKE_CONFIGURATION_TYPES than just hardcoded "Debug" instead
set(REG_EXP "^(\t)*\\{${FOUND_GUID}\\}\\.Debug[^ ]*\\.ActiveCfg = Debug\\|${PLATFORM_NAME}$")
check_line_exists(${TARGET_FILE} REG_EXP)
diff --git a/Tests/RunCMake/interface_library/RunCMakeTest.cmake b/Tests/RunCMake/interface_library/RunCMakeTest.cmake
deleted file mode 100644
index 5a6af1d..0000000
--- a/Tests/RunCMake/interface_library/RunCMakeTest.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-include(RunCMake)
-
-run_cmake(invalid_name)
-run_cmake(target_commands)
-run_cmake(no_shared_libs)
-run_cmake(whitelist)
-run_cmake(invalid_signature)
-run_cmake(global-interface)
-run_cmake(genex_link)
-run_cmake(add_custom_command-TARGET)
-run_cmake(IMPORTED_LIBNAME-bad-value)
-run_cmake(IMPORTED_LIBNAME-non-iface)
-run_cmake(IMPORTED_LIBNAME-non-imported)
diff --git a/Tests/RunCMake/interface_library/whitelist-stderr.txt b/Tests/RunCMake/interface_library/whitelist-stderr.txt
deleted file mode 100644
index 577c0cc..0000000
--- a/Tests/RunCMake/interface_library/whitelist-stderr.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-CMake Error at whitelist.cmake:4 \(set_property\):
- INTERFACE_LIBRARY targets may only have whitelisted properties. The
- property "OUTPUT_NAME" is not allowed.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-
-
-CMake Error at whitelist.cmake:5 \(set_property\):
- INTERFACE_LIBRARY targets may only have whitelisted properties. The
- property "OUTPUT_NAME" is not allowed.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
-
-
-CMake Error at whitelist.cmake:6 \(get_target_property\):
- INTERFACE_LIBRARY targets may only have whitelisted properties. The
- property "OUTPUT_NAME" is not allowed.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/interface_library/whitelist.cmake b/Tests/RunCMake/interface_library/whitelist.cmake
deleted file mode 100644
index 0db6375..0000000
--- a/Tests/RunCMake/interface_library/whitelist.cmake
+++ /dev/null
@@ -1,25 +0,0 @@
-
-add_library(iface INTERFACE)
-
-set_property(TARGET iface PROPERTY OUTPUT_NAME output)
-set_property(TARGET iface APPEND PROPERTY OUTPUT_NAME append)
-get_target_property(outname iface OUTPUT_NAME)
-
-# Properties starting with `_` are allowed.
-set_property(TARGET iface PROPERTY "_custom_property" output)
-set_property(TARGET iface APPEND PROPERTY "_custom_property" append)
-get_target_property(outname iface "_custom_property")
-
-# Properties starting with a lowercase letter are allowed.
-set_property(TARGET iface PROPERTY "custom_property" output)
-set_property(TARGET iface APPEND PROPERTY "custom_property" append)
-get_target_property(outname iface "custom_property")
-
-# PUBLIC_HEADER / PRIVATE_HEADER properties are allowed
-set_property(TARGET iface PROPERTY PUBLIC_HEADER foo.h)
-set_property(TARGET iface APPEND PROPERTY PUBLIC_HEADER bar.h)
-get_target_property(outname iface PUBLIC_HEADER)
-
-set_property(TARGET iface PROPERTY PRIVATE_HEADER foo.h)
-set_property(TARGET iface APPEND PROPERTY PRIVATE_HEADER bar.h)
-get_target_property(outname iface PRIVATE_HEADER)
diff --git a/Tests/RunCMake/list/CMakeLists.txt b/Tests/RunCMake/list/CMakeLists.txt
index 12cd3c7..4b3de84 100644
--- a/Tests/RunCMake/list/CMakeLists.txt
+++ b/Tests/RunCMake/list/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt
index a0f8837..9103bd2 100644
--- a/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt
+++ b/Tests/RunCMake/list/GET-CMP0007-WARN-stderr.txt
@@ -1,4 +1,13 @@
-^CMake Warning \(dev\) at GET-CMP0007-WARN.cmake:4 \(list\):
+^CMake Deprecation Warning at GET-CMP0007-WARN.cmake:1 \(cmake_policy\):
+ Compatibility with CMake < 2.8.12 will be removed from a future version of
+ CMake.
+
+ Update the VERSION argument <min> value or use a ...<max> suffix to tell
+ CMake that the project does not need compatibility with older versions.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Warning \(dev\) at GET-CMP0007-WARN.cmake:4 \(list\):
Policy CMP0007 is not set: list command no longer ignores empty elements.
Run "cmake --help-policy CMP0007" for policy details. Use the cmake_policy
command to set the policy and suppress this warning. List has value =
diff --git a/Tests/RunCMake/math/CMakeLists.txt b/Tests/RunCMake/math/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/math/CMakeLists.txt
+++ b/Tests/RunCMake/math/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/message/CMakeLists.txt b/Tests/RunCMake/message/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/message/CMakeLists.txt
+++ b/Tests/RunCMake/message/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/no_install_prefix/CMakeLists.txt b/Tests/RunCMake/no_install_prefix/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/no_install_prefix/CMakeLists.txt
+++ b/Tests/RunCMake/no_install_prefix/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/project/CMakeLists.txt b/Tests/RunCMake/project/CMakeLists.txt
index 12cd3c7..4b3de84 100644
--- a/Tests/RunCMake/project/CMakeLists.txt
+++ b/Tests/RunCMake/project/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/string/CMakeLists.txt b/Tests/RunCMake/string/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/string/CMakeLists.txt
+++ b/Tests/RunCMake/string/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake
index 2e9cba8..6c72546 100644
--- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake
+++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2.cmake
@@ -1,4 +1,4 @@
-
+cmake_minimum_required(VERSION 2.8.11)
project(CMP0022-WARN)
add_library(foo SHARED empty_vs6_1.cpp)
diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake b/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake
index fcc8da0..dfdf70b 100644
--- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake
+++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN.cmake
@@ -1,4 +1,4 @@
-
+cmake_minimum_required(VERSION 2.8.11)
project(CMP0022-WARN)
add_library(foo SHARED empty_vs6_1.cpp)
diff --git a/Tests/RunCMake/target_link_libraries/CMakeLists.txt b/Tests/RunCMake/target_link_libraries/CMakeLists.txt
index 8f85fbf..667561e 100644
--- a/Tests/RunCMake/target_link_libraries/CMakeLists.txt
+++ b/Tests/RunCMake/target_link_libraries/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
diff --git a/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported.cmake b/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported.cmake
index 9b97918..9f86b18 100644
--- a/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported.cmake
+++ b/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported.cmake
@@ -1,4 +1,3 @@
-cmake_policy(SET CMP0022 NEW)
enable_language(C)
add_library(foo STATIC empty.c)
add_library(not_exported STATIC empty.c)
diff --git a/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotTarget.cmake b/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotTarget.cmake
index 7122ae9..20ec438 100644
--- a/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotTarget.cmake
+++ b/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotTarget.cmake
@@ -1,4 +1,3 @@
-cmake_policy(SET CMP0022 NEW)
enable_language(C)
add_library(foo STATIC empty.c)
target_link_libraries(foo PRIVATE not_a_target)
diff --git a/Tests/RunCMake/try_compile/CMP0056.cmake b/Tests/RunCMake/try_compile/CMP0056.cmake
index e8d3d4a..2ab79d5 100644
--- a/Tests/RunCMake/try_compile/CMP0056.cmake
+++ b/Tests/RunCMake/try_compile/CMP0056.cmake
@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 3.1)
enable_language(C)
set(obj "${CMAKE_C_OUTPUT_EXTENSION}")
if(BORLAND)
diff --git a/Tests/RunCMake/try_compile/CMakeLists.txt b/Tests/RunCMake/try_compile/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/try_compile/CMakeLists.txt
+++ b/Tests/RunCMake/try_compile/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/try_compile/CudaStandard-stderr.txt b/Tests/RunCMake/try_compile/CudaStandard-stderr.txt
index 3c6bdf6..bcf95d5 100644
--- a/Tests/RunCMake/try_compile/CudaStandard-stderr.txt
+++ b/Tests/RunCMake/try_compile/CudaStandard-stderr.txt
@@ -1,5 +1,5 @@
^CMake Error at .*/Tests/RunCMake/try_compile/CudaStandard-build/CMakeFiles/CMakeTmp/CMakeLists.txt:[0-9]+ \(add_executable\):
- CUDA_STANDARD is set to invalid value '3'
+ CUDA_STANDARD is set to invalid value '4'
+
CMake Error at CudaStandard.cmake:[0-9]+ \(try_compile\):
Failed to generate test project build system.
diff --git a/Tests/RunCMake/try_compile/CudaStandard.cmake b/Tests/RunCMake/try_compile/CudaStandard.cmake
index 96da422..a230424 100644
--- a/Tests/RunCMake/try_compile/CudaStandard.cmake
+++ b/Tests/RunCMake/try_compile/CudaStandard.cmake
@@ -1,7 +1,7 @@
enable_language(CUDA)
try_compile(result ${CMAKE_CURRENT_BINARY_DIR}
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src.cu
- CUDA_STANDARD 3
+ CUDA_STANDARD 4
OUTPUT_VARIABLE out
)
message("try_compile output:\n${out}")
diff --git a/Tests/RunCMake/try_compile/proj/CMakeLists.txt b/Tests/RunCMake/try_compile/proj/CMakeLists.txt
index 78a87c0..652f5b6 100644
--- a/Tests/RunCMake/try_compile/proj/CMakeLists.txt
+++ b/Tests/RunCMake/try_compile/proj/CMakeLists.txt
@@ -1,2 +1,2 @@
-cmake_minimum_required(VERSION 2.8.10)
+cmake_minimum_required(VERSION 3.3)
project(TestProject NONE)
diff --git a/Tests/RunCMake/try_run/CMakeLists.txt b/Tests/RunCMake/try_run/CMakeLists.txt
index e034780..e93f0b6 100644
--- a/Tests/RunCMake/try_run/CMakeLists.txt
+++ b/Tests/RunCMake/try_run/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.0)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} C)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/variable_watch/CMakeLists.txt b/Tests/RunCMake/variable_watch/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/variable_watch/CMakeLists.txt
+++ b/Tests/RunCMake/variable_watch/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/while/CMakeLists.txt b/Tests/RunCMake/while/CMakeLists.txt
index 12cd3c7..74b3ff8 100644
--- a/Tests/RunCMake/while/CMakeLists.txt
+++ b/Tests/RunCMake/while/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.3)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)
diff --git a/Tests/SetLang/CMakeLists.txt b/Tests/SetLang/CMakeLists.txt
index 9de4fc6..616421e 100644
--- a/Tests/SetLang/CMakeLists.txt
+++ b/Tests/SetLang/CMakeLists.txt
@@ -15,3 +15,10 @@ if(CMAKE_GENERATOR MATCHES "^Visual Studio" AND "x${CMAKE_C_COMPILER_ID}" STREQU
add_library(stay stay_c.c stay_cxx.cxx)
set_property(TARGET stay PROPERTY COMPILE_OPTIONS "-TP")
endif()
+
+if((CMAKE_C_COMPILER_ID MATCHES "(GNU|Clang|MSVC|Borland|Embarcadero|Intel|TI|XL)"))
+ add_library(zoom zoom.zzz)
+ set_source_files_properties(zoom.zzz PROPERTIES LANGUAGE CXX)
+ target_link_libraries(SetLang zoom)
+ target_compile_definitions(SetLang PRIVATE WITH_ZOOM)
+endif()
diff --git a/Tests/SetLang/bar.c b/Tests/SetLang/bar.c
index b934356..515e8c2 100644
--- a/Tests/SetLang/bar.c
+++ b/Tests/SetLang/bar.c
@@ -1,10 +1,22 @@
#include <stdio.h>
int foo();
+
+#ifdef WITH_ZOOM
+int zoom();
+#endif
+
class A
{
public:
- A() { this->i = foo(); }
+ A()
+ {
+ this->i = foo();
+#ifdef WITH_ZOOM
+ i += zoom();
+ i -= zoom();
+#endif
+ }
int i;
};
diff --git a/Tests/SetLang/zoom.zzz b/Tests/SetLang/zoom.zzz
new file mode 100644
index 0000000..a0c8899
--- /dev/null
+++ b/Tests/SetLang/zoom.zzz
@@ -0,0 +1,7 @@
+int zoom()
+{
+ int r = 10;
+ r++;
+ int ret = r + 10;
+ return ret;
+}
diff --git a/Tests/UseSWIG/CMakeLists.txt b/Tests/UseSWIG/CMakeLists.txt
index d102846..7046fab 100644
--- a/Tests/UseSWIG/CMakeLists.txt
+++ b/Tests/UseSWIG/CMakeLists.txt
@@ -33,6 +33,16 @@ if (CMAKE_CSharp_COMPILER)
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
endif()
+add_test(NAME UseSWIG.NamespaceCsharp COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/UseSWIG/NamespaceCsharp"
+ "${CMake_BINARY_DIR}/Tests/UseSWIG/NamespaceCsharp"
+ ${build_generator_args}
+ --build-project TestNamespaceCsharp
+ --build-options ${build_options}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
add_test(NAME UseSWIG.BasicPython COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
diff --git a/Tests/UseSWIG/NamespaceCsharp/CMakeLists.txt b/Tests/UseSWIG/NamespaceCsharp/CMakeLists.txt
new file mode 100644
index 0000000..39566a8
--- /dev/null
+++ b/Tests/UseSWIG/NamespaceCsharp/CMakeLists.txt
@@ -0,0 +1,25 @@
+cmake_minimum_required(VERSION 3.12...3.13)
+
+project(TestNamsespaceCsharp CXX)
+
+include(CTest)
+
+find_package(SWIG REQUIRED)
+include(${SWIG_USE_FILE})
+
+set(UseSWIG_MODULE_VERSION 2)
+
+
+add_library(ns_example STATIC ns_example.cpp)
+target_include_directories(ns_example PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
+
+set_property(SOURCE ns_example.i PROPERTY CPLUSPLUS ON)
+
+swig_add_library(ns_csharp TYPE SHARED LANGUAGE csharp SOURCES ns_example.i)
+set_target_properties(ns_csharp PROPERTIES SWIG_USE_TARGET_INCLUDE_DIRECTORIES TRUE)
+
+target_link_libraries(ns_csharp PRIVATE ns_example)
+
+get_target_property(NS_CSHARP_SUPPORT_FILES_DIR ns_csharp SWIG_SUPPORT_FILES_DIRECTORY)
+
+add_test(NAME NamespaceCsharp COMMAND "${CMAKE_COMMAND}" "-DSUPPORT_FILES_DIRECTORY=${NS_CSHARP_SUPPORT_FILES_DIR}" -P "${CMAKE_CURRENT_SOURCE_DIR}/ValidateSupportFiles.cmake")
diff --git a/Tests/UseSWIG/NamespaceCsharp/ValidateSupportFiles.cmake b/Tests/UseSWIG/NamespaceCsharp/ValidateSupportFiles.cmake
new file mode 100644
index 0000000..828d54c
--- /dev/null
+++ b/Tests/UseSWIG/NamespaceCsharp/ValidateSupportFiles.cmake
@@ -0,0 +1,8 @@
+
+file (GLOB_RECURSE files LIST_DIRECTORIES TRUE RELATIVE "${SUPPORT_FILES_DIRECTORY}" "${SUPPORT_FILES_DIRECTORY}/*")
+
+list(SORT files)
+
+if (NOT files STREQUAL "NSExample.cs;NSExamplePINVOKE.cs;ns;ns/my_class_in_namespace.cs")
+ message (FATAL_ERROR "Support files not correctly collected.")
+endif()
diff --git a/Tests/UseSWIG/NamespaceCsharp/ns_example.cpp b/Tests/UseSWIG/NamespaceCsharp/ns_example.cpp
new file mode 100644
index 0000000..a03dbad
--- /dev/null
+++ b/Tests/UseSWIG/NamespaceCsharp/ns_example.cpp
@@ -0,0 +1,14 @@
+#include "ns_example.hpp"
+
+namespace ns {
+
+void my_class_in_namespace::add(int value)
+{
+ Sum += value;
+}
+
+int my_class_in_namespace::get_sum() const
+{
+ return Sum;
+}
+}
diff --git a/Tests/UseSWIG/NamespaceCsharp/ns_example.hpp b/Tests/UseSWIG/NamespaceCsharp/ns_example.hpp
new file mode 100644
index 0000000..65b9ab5
--- /dev/null
+++ b/Tests/UseSWIG/NamespaceCsharp/ns_example.hpp
@@ -0,0 +1,19 @@
+#pragma once
+
+namespace ns {
+
+class my_class_in_namespace
+{
+public:
+ my_class_in_namespace()
+ : Sum(0)
+ {
+ }
+
+ void add(int value);
+ int get_sum() const;
+
+private:
+ int Sum;
+};
+}
diff --git a/Tests/UseSWIG/NamespaceCsharp/ns_example.i b/Tests/UseSWIG/NamespaceCsharp/ns_example.i
new file mode 100644
index 0000000..036f7ca
--- /dev/null
+++ b/Tests/UseSWIG/NamespaceCsharp/ns_example.i
@@ -0,0 +1,8 @@
+%module NSExample
+
+%{
+#include "ns_example.hpp"
+%}
+
+%nspace ns::my_class_in_namespace;
+%include "ns_example.hpp"
diff --git a/Tests/VSNsightTegra/AndroidManifest.xml b/Tests/VSAndroid/AndroidManifest.xml
index 951e8f3..951e8f3 100644
--- a/Tests/VSNsightTegra/AndroidManifest.xml
+++ b/Tests/VSAndroid/AndroidManifest.xml
diff --git a/Tests/VSNsightTegra/CMakeLists.txt b/Tests/VSAndroid/CMakeLists.txt
index 6d74f2f..73b1e07 100644
--- a/Tests/VSNsightTegra/CMakeLists.txt
+++ b/Tests/VSAndroid/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.3)
-project(VSNsightTegra C CXX)
+project(VSAndroid C CXX)
set(CMAKE_ANDROID_ARCH armv7-a)
set(CMAKE_ANDROID_STL_TYPE stlport_shared)
diff --git a/Tests/VSNsightTegra/build.xml b/Tests/VSAndroid/build.xml
index 17a2cc0..17a2cc0 100644
--- a/Tests/VSNsightTegra/build.xml
+++ b/Tests/VSAndroid/build.xml
diff --git a/Tests/VSNsightTegra/jni/first.c b/Tests/VSAndroid/jni/first.c
index b9dee27..b9dee27 100644
--- a/Tests/VSNsightTegra/jni/first.c
+++ b/Tests/VSAndroid/jni/first.c
diff --git a/Tests/VSNsightTegra/jni/first.h b/Tests/VSAndroid/jni/first.h
index 9dfd8b8..9dfd8b8 100644
--- a/Tests/VSNsightTegra/jni/first.h
+++ b/Tests/VSAndroid/jni/first.h
diff --git a/Tests/VSNsightTegra/jni/second.c b/Tests/VSAndroid/jni/second.c
index 30bdc17..30bdc17 100644
--- a/Tests/VSNsightTegra/jni/second.c
+++ b/Tests/VSAndroid/jni/second.c
diff --git a/Tests/VSNsightTegra/proguard-android.txt b/Tests/VSAndroid/proguard-android.txt
index fe73bae..fe73bae 100644
--- a/Tests/VSNsightTegra/proguard-android.txt
+++ b/Tests/VSAndroid/proguard-android.txt
diff --git a/Tests/VSNsightTegra/res/values/strings.xml b/Tests/VSAndroid/res/values/strings.xml
index 858cdb4..858cdb4 100644
--- a/Tests/VSNsightTegra/res/values/strings.xml
+++ b/Tests/VSAndroid/res/values/strings.xml
diff --git a/Tests/VSNsightTegra/src/com/example/twolibs/TwoLibs.java b/Tests/VSAndroid/src/com/example/twolibs/TwoLibs.java
index ef9da01..ef9da01 100644
--- a/Tests/VSNsightTegra/src/com/example/twolibs/TwoLibs.java
+++ b/Tests/VSAndroid/src/com/example/twolibs/TwoLibs.java
diff --git a/Tests/VSWinStorePhone/CMakeLists.txt b/Tests/VSWinStorePhone/CMakeLists.txt
index 558d5de..56e4c1d 100644
--- a/Tests/VSWinStorePhone/CMakeLists.txt
+++ b/Tests/VSWinStorePhone/CMakeLists.txt
@@ -114,7 +114,7 @@ set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "Assets")
set_property(SOURCE ${STRING_FILES} PROPERTY VS_TOOL_OVERRIDE "PRIResource")
set_property(SOURCE ${DEBUG_CONTENT_FILES} PROPERTY VS_DEPLOYMENT_CONTENT $<CONFIG:Debug>)
set_property(SOURCE ${RELEASE_CONTENT_FILES} PROPERTY
- VS_DEPLOYMENT_CONTENT $<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>,$<CONFIG:MinSizeRel>>)
+ VS_DEPLOYMENT_CONTENT $<CONFIG:Release,RelWithDebInfo,MinSizeRel>)
set_property(SOURCE ${PIXELSHADER_FILES} PROPERTY VS_SHADER_TYPE Pixel)
set_property(SOURCE ${PIXELSHADER_FILES} PROPERTY VS_SHADER_ENTRYPOINT mainPS)
diff --git a/Tests/VariableUnusedViaSet/CMakeLists.txt b/Tests/VariableUnusedViaSet/CMakeLists.txt
deleted file mode 100644
index 0123ab2..0000000
--- a/Tests/VariableUnusedViaSet/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-set(UNUSED_VARIABLE)
-# Warning should occur here
-set(UNUSED_VARIABLE "Usage")
-message(STATUS "${UNUSED_VARIABLE}")
diff --git a/Tests/VariableUnusedViaUnset/CMakeLists.txt b/Tests/VariableUnusedViaUnset/CMakeLists.txt
deleted file mode 100644
index 4b4031d..0000000
--- a/Tests/VariableUnusedViaUnset/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-# NOTE: Changing lines in here changes the test results since the first
-# instance shouldn't warn, but the second should and they have the same message
-
-# A warning should NOT be issued for this line:
-set(UNUSED_VARIABLE)
-# Warning should occur here:
-set(UNUSED_VARIABLE)
-message(STATUS "${UNUSED_VARIABLE}")
diff --git a/Tests/XCTest/StaticLibExample/StaticLibExample.c b/Tests/XCTest/StaticLibExample/StaticLibExample.c
index b198f80..8d16eb5 100644
--- a/Tests/XCTest/StaticLibExample/StaticLibExample.c
+++ b/Tests/XCTest/StaticLibExample/StaticLibExample.c
@@ -1,6 +1,6 @@
#include "StaticLibExample.h"
-int FourtyFour()
+int FourtyFour(void)
{
return 44;
}
diff --git a/Tests/XCTest/StaticLibExample/StaticLibExample.h b/Tests/XCTest/StaticLibExample/StaticLibExample.h
index 147a909..88695b1 100644
--- a/Tests/XCTest/StaticLibExample/StaticLibExample.h
+++ b/Tests/XCTest/StaticLibExample/StaticLibExample.h
@@ -1 +1 @@
-int FourtyFour();
+int FourtyFour(void);