summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/AndroidTestUtilities/check.cmake2
-rw-r--r--Tests/RunCMake/AutoExportDll/AutoExport.cmake6
-rw-r--r--Tests/RunCMake/AutoExportDll/cppCLI.cxx22
-rw-r--r--Tests/RunCMake/AutoExportDll/say.cxx8
-rw-r--r--Tests/RunCMake/BuildDepends/GNU-AS-stdout.txt4
-rw-r--r--Tests/RunCMake/BuildDepends/GNU-AS.cmake13
-rw-r--r--Tests/RunCMake/BuildDepends/GNU-AS.step1.cmake1
-rw-r--r--Tests/RunCMake/BuildDepends/GNU-AS.step2.cmake1
-rw-r--r--Tests/RunCMake/BuildDepends/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/BuildDepends/gnu_as.s1
-rw-r--r--Tests/RunCMake/CMP0104/CMP0104-Common.cmake2
-rw-r--r--Tests/RunCMake/CMP0104/CMP0104-NEW.cmake6
-rw-r--r--Tests/RunCMake/CMP0104/CMP0104-OLD.cmake12
-rw-r--r--Tests/RunCMake/CMP0104/CMP0104-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0104/CMP0104-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0104/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CMP0104/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/CMP0104/main.cu3
-rw-r--r--Tests/RunCMake/CMP0106/CMP0106-Common.cmake10
-rw-r--r--Tests/RunCMake/CMP0106/CMP0106-NEW-result.txt (renamed from Tests/RunCMake/Languages/LINK_LANGUAGE-genex-result.txt)0
-rw-r--r--Tests/RunCMake/CMP0106/CMP0106-NEW-stderr.txt9
-rw-r--r--Tests/RunCMake/CMP0106/CMP0106-NEW.cmake4
-rw-r--r--Tests/RunCMake/CMP0106/CMP0106-OLD.cmake9
-rw-r--r--Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView.cmake2
-rw-r--r--Tests/RunCMake/CMP0106/CMP0106-WARN-VTK-stderr.txt9
-rw-r--r--Tests/RunCMake/CMP0106/CMP0106-WARN-VTK.cmake2
-rw-r--r--Tests/RunCMake/CMP0106/CMP0106-WARN-stderr.txt37
-rw-r--r--Tests/RunCMake/CMP0106/CMP0106-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0106/CMakeLists.txt7
-rw-r--r--Tests/RunCMake/CMP0106/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/CMP0106/subdir/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CMakeLists.txt43
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/VerifyResult.cmake4
-rw-r--r--Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake16
-rw-r--r--Tests/RunCMake/CPack/tests/THREADED/ExpectedFiles.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/THREADED/test.cmake7
-rw-r--r--Tests/RunCMake/CPack/tests/THREADED_ALL/ExpectedFiles.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake7
-rw-r--r--Tests/RunCMake/CTestCommandLine/MemCheckSan.cmake7
-rw-r--r--Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake35
-rw-r--r--Tests/RunCMake/CTestCommandLine/stop-on-failure-result.txt1
-rw-r--r--Tests/RunCMake/CTestCommandLine/stop-on-failure-stderr.txt1
-rw-r--r--Tests/RunCMake/CTestCommandLine/stop-on-failure-stdout.txt10
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake35
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/checkfree1-ctest-s-res-cache-check.cmake1
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/checkfree1-ctest-s-res-variable-check.cmake1
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx2
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-cache-check.cmake3
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-cache-result.txt1
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-cache-stderr.txt14
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-variable-check.cmake3
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-variable-result.txt1
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-variable-stderr.txt14
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/process_count-ctest-s-nores-check.cmake4
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/process_count-ctest-s-res-check.cmake8
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/test.cmake.in14
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/CheckCLinkerFlag.cmake3
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/CheckCXXLinkerFlag.cmake3
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/CheckFortranLinkerFlag.cmake3
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/CheckLinkerFlag.cmake14
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/CheckOBJCLinkerFlag.cmake3
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/CheckOBJCXXLinkerFlag.cmake3
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake14
-rw-r--r--Tests/RunCMake/CommandLine/E_capabilities-stdout.txt2
-rw-r--r--Tests/RunCMake/CommandLine/E_cat_directory-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_cat_directory-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_cat_good_cat-stdout.txt3
-rw-r--r--Tests/RunCMake/CommandLine/E_cat_non_existing_file-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_cat_non_existing_file-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_cat_non_readable_file-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_cat_non_readable_file-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_cat_option_not_handled-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_cat_option_not_handled-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/P_arbitrary_args.cmake3
-rw-r--r--Tests/RunCMake/CommandLine/ProfilingTest-check.cmake18
-rw-r--r--Tests/RunCMake/CommandLine/ProfilingTest.cmake1
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake61
-rw-r--r--Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.hbin58 -> 59 bytes
-rw-r--r--Tests/RunCMake/CommandLine/profiling-all-params-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/profiling-all-params-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/profiling-invalid-format-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/profiling-invalid-format-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/profiling-missing-format-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/profiling-missing-format-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/profiling-missing-output-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/profiling-missing-output-stderr.txt1
-rw-r--r--Tests/RunCMake/CompilerLauncher/CUDA-common.cmake1
-rw-r--r--Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake10
-rw-r--r--Tests/RunCMake/ExportCompileCommands/BeforeProject-check.cmake4
-rw-r--r--Tests/RunCMake/ExportCompileCommands/BeforeProject.cmake3
-rw-r--r--Tests/RunCMake/ExportCompileCommands/BeforeProjectBEFORE.cmake1
-rw-r--r--Tests/RunCMake/ExportCompileCommands/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/ExportCompileCommands/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/ExportCompileCommands/empty.c0
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt2
-rw-r--r--Tests/RunCMake/ExternalProject/NO_DEPENDS-stderr.txt6
-rw-r--r--Tests/RunCMake/ExternalProject/PreserveEmptyArgs-build-stdout.txt21
-rw-r--r--Tests/RunCMake/ExternalProject/PreserveEmptyArgs.cmake13
-rw-r--r--Tests/RunCMake/ExternalProject/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/ExternalProject/countArgs.cmake5
-rw-r--r--Tests/RunCMake/FPHSA/FindUseComponents.cmake15
-rw-r--r--Tests/RunCMake/FPHSA/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/FPHSA/all_optional_components.cmake14
-rw-r--r--Tests/RunCMake/FPHSA/required_and_optional_components.cmake14
-rw-r--r--Tests/RunCMake/FPHSA/required_components.cmake11
-rw-r--r--Tests/RunCMake/FPHSA/required_components_with_vars.cmake1
-rw-r--r--Tests/RunCMake/FetchContent/DownloadFile.cmake9
-rw-r--r--Tests/RunCMake/FetchContent/MakeAvailable-stdout.txt1
-rw-r--r--Tests/RunCMake/FetchContent/MakeAvailable.cmake13
-rw-r--r--Tests/RunCMake/FetchContent/PreserveEmptyArgs-stdout.txt4
-rw-r--r--Tests/RunCMake/FetchContent/PreserveEmptyArgs.cmake13
-rw-r--r--Tests/RunCMake/FetchContent/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/FetchContent/WithoutProject/ProjectSubdir/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/FetchContent/countArgs.cmake5
-rw-r--r--Tests/RunCMake/FetchContent/dummyFile.txt1
-rw-r--r--Tests/RunCMake/FileAPI/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-check.py4792
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/alias.json15
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/custom.json15
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json19
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir.json12
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_dir.json10
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/external.json14
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json18
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json17
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json28
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/alias.json14
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json28
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/custom.json14
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json18
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/external.json13
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/imported.json17
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/projects/object.json16
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_alias.json83
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_custom.json79
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json99
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_external.json79
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_imported.json95
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_object.json91
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json179
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json107
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json143
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json108
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json154
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json82
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json143
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json123
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json143
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json108
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json107
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_tgt.json87
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json107
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json232
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader.json161
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_2arch.json237
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_multigen.json206
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json84
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json154
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json82
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json107
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json99
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json107
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json84
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json303
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json152
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json90
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json90
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json90
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json90
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json90
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_alias.json70
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_custom.json70
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_cxx.json70
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_external.json70
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_imported.json70
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_object.json70
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_top.json70
-rw-r--r--Tests/RunCMake/FileAPI/cxx/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FileAPI/empty.h0
-rw-r--r--Tests/RunCMake/File_Archive/7zip.cmake7
-rw-r--r--Tests/RunCMake/File_Archive/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/File_Archive/RunCMakeTest.cmake17
-rw-r--r--Tests/RunCMake/File_Archive/gnutar-gz.cmake8
-rw-r--r--Tests/RunCMake/File_Archive/gnutar.cmake7
-rw-r--r--Tests/RunCMake/File_Archive/pax-xz.cmake8
-rw-r--r--Tests/RunCMake/File_Archive/pax-zstd.cmake8
-rw-r--r--Tests/RunCMake/File_Archive/pax.cmake7
-rw-r--r--Tests/RunCMake/File_Archive/paxr-bz2.cmake8
-rw-r--r--Tests/RunCMake/File_Archive/paxr.cmake7
-rw-r--r--Tests/RunCMake/File_Archive/roundtrip.cmake92
-rw-r--r--Tests/RunCMake/File_Archive/unsupported-format-result.txt1
-rw-r--r--Tests/RunCMake/File_Archive/unsupported-format-stderr.txt5
-rw-r--r--Tests/RunCMake/File_Archive/unsupported-format.cmake5
-rw-r--r--Tests/RunCMake/File_Archive/zip-filtered.cmake26
-rw-r--r--Tests/RunCMake/File_Archive/zip-with-bad-type-result.txt1
-rw-r--r--Tests/RunCMake/File_Archive/zip-with-bad-type-stderr.txt5
-rw-r--r--Tests/RunCMake/File_Archive/zip-with-bad-type.cmake6
-rw-r--r--Tests/RunCMake/File_Archive/zip.cmake7
-rw-r--r--Tests/RunCMake/File_Configure/BadArg-result.txt1
-rw-r--r--Tests/RunCMake/File_Configure/BadArg-stderr.txt4
-rw-r--r--Tests/RunCMake/File_Configure/BadArg.cmake1
-rw-r--r--Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt1
-rw-r--r--Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt5
-rw-r--r--Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake4
-rw-r--r--Tests/RunCMake/File_Configure/BadArgGeneratorExpressionOutput-result.txt1
-rw-r--r--Tests/RunCMake/File_Configure/BadArgGeneratorExpressionOutput-stderr.txt5
-rw-r--r--Tests/RunCMake/File_Configure/BadArgGeneratorExpressionOutput.cmake4
-rw-r--r--Tests/RunCMake/File_Configure/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/File_Configure/DirOutput-stderr.txt1
-rw-r--r--Tests/RunCMake/File_Configure/DirOutput.cmake4
-rw-r--r--Tests/RunCMake/File_Configure/DirOutput.txt1
-rw-r--r--Tests/RunCMake/File_Configure/NewLineStyle-NoArg-result.txt1
-rw-r--r--Tests/RunCMake/File_Configure/NewLineStyle-NoArg-stderr.txt5
-rw-r--r--Tests/RunCMake/File_Configure/NewLineStyle-NoArg.cmake6
-rw-r--r--Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake20
-rw-r--r--Tests/RunCMake/File_Configure/NewLineStyle-WrongArg-result.txt1
-rw-r--r--Tests/RunCMake/File_Configure/NewLineStyle-WrongArg-stderr.txt5
-rw-r--r--Tests/RunCMake/File_Configure/NewLineStyle-WrongArg.cmake6
-rw-r--r--Tests/RunCMake/File_Configure/RunCMakeTest.cmake9
-rw-r--r--Tests/RunCMake/File_Generate/CMP0070-OLD-stderr.txt10
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_APPBUNDLE_PATH.cmake48
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_FRAMEWORK_PATH.cmake48
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_extract_frameworks.cmake13
-rw-r--r--Tests/RunCMake/FindPkgConfig/FindPkgConfig_extract_frameworks_target.cmake29
-rw-r--r--Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist-stdout.txt6
-rw-r--r--Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist.cmake4
-rw-r--r--Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/FindPkgConfig/pc-bletch/lib/pkgconfig/bletch-framework.pc9
-rw-r--r--Tests/RunCMake/FindSWIG/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/FindSWIG/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/FindSWIG/components-stdout.txt6
-rw-r--r--Tests/RunCMake/FindSWIG/components.cmake9
-rw-r--r--Tests/RunCMake/FindSWIG/missing-components-result.txt1
-rw-r--r--Tests/RunCMake/FindSWIG/missing-components-stderr.txt1
-rw-r--r--Tests/RunCMake/FindSWIG/missing-components.cmake3
-rw-r--r--Tests/RunCMake/Framework/FrameworkMultiConfigPostfix-build-final-check.cmake45
-rw-r--r--Tests/RunCMake/Framework/FrameworkMultiConfigPostfix.cmake25
-rw-r--r--Tests/RunCMake/Framework/RunCMakeTest.cmake36
-rw-r--r--Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp6
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target.cmake3
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test.cmake5
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-stderr.txt7
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install.cmake5
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-stderr.txt7
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends.cmake7
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories.cmake7
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries.cmake7
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources.cmake2
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target.cmake3
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test.cmake5
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-install-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-install-stderr.txt7
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-install.cmake5
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-stderr.txt7
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends.cmake7
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories.cmake7
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries.cmake7
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources.cmake2
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_command-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_command-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_command.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_target-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_target-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_target.cmake3
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_executable-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_executable-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_executable.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_library-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_library-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_library.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_test-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_test-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_test.cmake5
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-file_generate-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-file_generate-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-file_generate.cmake6
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-install-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-install-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-install.cmake5
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-target_sources-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-target_sources-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-target_sources.cmake2
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-unknown-lang.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage1-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage1-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage1.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage2-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage2-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage2.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage3-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage3-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage3.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage4-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage4-stderr.txt8
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage4.cmake7
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_command-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_command-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_command.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_target-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_target-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_target.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_executable-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_executable-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_executable.cmake5
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_library-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_library-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_library.cmake2
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_test-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_test-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_test.cmake5
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-file_generate-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-file_generate-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-file_generate.cmake6
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-install-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-install-stderr.txt10
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-install.cmake5
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-target_sources-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-target_sources-stderr.txt8
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-target_sources.cmake2
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-unknown-lang.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage1-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage1-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage1.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage2-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage2-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage2.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage3-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage3-stderr.txt9
-rw-r--r--Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage3.cmake4
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake55
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-configuration-debug-stdout.txt5
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-configuration-release-stdout.txt5
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-build-result.txt (renamed from Tests/RunCMake/GoogleTest/GoogleTest-discovery-timeout-result.txt)0
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-build-stdout.txt (renamed from Tests/RunCMake/GoogleTest/GoogleTest-discovery-timeout-stdout.txt)0
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-result.txt1
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-stderr.txt2
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-stdout.txt18
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-discovery-PRE_TEST-timeout-test-stderr.txt8
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-discovery-PRE_TEST-timeout-test-stdout.txt1
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-skip-timeout-stdout.txt10
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt40
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt44
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest.cmake8
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTestDiscoveryMultiConfig.cmake14
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTestDiscoveryTimeout.cmake14
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTestXML-result-check.cmake4
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTestXML.cmake11
-rw-r--r--Tests/RunCMake/GoogleTest/RunCMakeTest.cmake132
-rw-r--r--Tests/RunCMake/GoogleTest/configuration_gtest.cpp23
-rw-r--r--Tests/RunCMake/GoogleTest/fake_gtest.cpp4
-rw-r--r--Tests/RunCMake/GoogleTest/skip_test.cpp18
-rw-r--r--Tests/RunCMake/GoogleTest/timeout_test.cpp7
-rw-r--r--Tests/RunCMake/GoogleTest/xml_output.cpp26
-rw-r--r--Tests/RunCMake/Graphviz/GraphvizTestProject.cmake2
-rw-r--r--Tests/RunCMake/Languages/LINKER_LANGUAGE-genex-result.txt1
-rw-r--r--Tests/RunCMake/Languages/LINKER_LANGUAGE-genex-stderr.txt (renamed from Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt)2
-rw-r--r--Tests/RunCMake/Languages/LINKER_LANGUAGE-genex.cmake (renamed from Tests/RunCMake/Languages/LINK_LANGUAGE-genex.cmake)0
-rw-r--r--Tests/RunCMake/Languages/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake6
-rwxr-xr-xTests/RunCMake/Ninja/SelectCompiler/1/gcc2
-rwxr-xr-xTests/RunCMake/Ninja/SelectCompiler/2/cc2
-rw-r--r--Tests/RunCMake/Ninja/SelectCompilerUNIX-result.txt1
-rw-r--r--Tests/RunCMake/Ninja/SelectCompilerUNIX-stderr.txt6
-rw-r--r--Tests/RunCMake/Ninja/SelectCompilerUNIX.cmake3
-rw-r--r--Tests/RunCMake/Ninja/SelectCompilerWindows-result.txt1
-rw-r--r--Tests/RunCMake/Ninja/SelectCompilerWindows-stderr.txt6
-rw-r--r--Tests/RunCMake/Ninja/SelectCompilerWindows.cmake3
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/CudaSimple.cmake1
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/ObjectLibrary/b.c2
-rw-r--r--Tests/RunCMake/ObjectLibrary/requires.c2
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake22
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchWarnInvalid.cmake16
-rw-r--r--Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake12
-rw-r--r--Tests/RunCMake/PrecompileHeaders/empty.c2
-rw-r--r--Tests/RunCMake/Syntax/CommandEOF-stderr.txt2
-rw-r--r--Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt2
-rw-r--r--Tests/RunCMake/UnityBuild/RunCMakeTest.cmake6
-rw-r--r--Tests/RunCMake/UnityBuild/f.c5
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx_group-check.cmake42
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx_group.cmake39
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c_batch-check.cmake5
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c_batch.cmake15
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c_group-check.cmake11
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c_group.cmake17
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c_no_unity_build_group-check.cmake5
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_c_no_unity_build_group.cmake16
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_cxx_group-check.cmake27
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_cxx_group.cmake27
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_invalid_mode-result.txt1
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_invalid_mode-stderr.txt5
-rw-r--r--Tests/RunCMake/UnityBuild/unitybuild_invalid_mode.cmake12
-rw-r--r--Tests/RunCMake/VS10Project/CSharpSourceGroup/foo.cs3
-rw-r--r--Tests/RunCMake/VS10Project/CSharpSourceGroup/images/empty.bmp0
-rw-r--r--Tests/RunCMake/VS10Project/CSharpSourceGroup/nested/baz.cs3
-rw-r--r--Tests/RunCMake/VS10Project/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/VS10Project/UnityBuildNativeGrouped-check.cmake56
-rw-r--r--Tests/RunCMake/VS10Project/UnityBuildNativeGrouped.cmake20
-rw-r--r--Tests/RunCMake/VS10Project/UnityBuildPre2017Grouped-check.cmake59
-rw-r--r--Tests/RunCMake/VS10Project/UnityBuildPre2017Grouped.cmake20
-rw-r--r--Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake22
-rw-r--r--Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake16
-rw-r--r--Tests/RunCMake/VS10Project/VsCsharpSourceGroupHelpers.cmake15
-rw-r--r--Tests/RunCMake/VS10Project/VsDeployEnabled-check.cmake58
-rw-r--r--Tests/RunCMake/VS10Project/VsDeployEnabled.cmake12
-rw-r--r--Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake36
-rw-r--r--Tests/RunCMake/VS10Project/VsPlatformToolset.cmake6
-rw-r--r--Tests/RunCMake/VS10Project/VsSettings-check.cmake23
-rw-r--r--Tests/RunCMake/VS10Project/VsSettings.cmake5
-rw-r--r--Tests/RunCMake/VS10Project/VsSourceSettingsTool-check.cmake34
-rw-r--r--Tests/RunCMake/VS10Project/VsSourceSettingsTool.cmake5
-rw-r--r--Tests/RunCMake/VS10Project/shader.hlsl1
-rw-r--r--Tests/RunCMake/VS10Project/shader2.hlsl1
-rw-r--r--Tests/RunCMake/add_link_options/GENEX_LINK_LANG.cmake16
-rw-r--r--Tests/RunCMake/add_link_options/LINKER_expansion-validation.cmake5
-rw-r--r--Tests/RunCMake/add_link_options/LINK_OPTIONS-exe-check.cmake5
-rw-r--r--Tests/RunCMake/add_link_options/LINK_OPTIONS-mod-check.cmake5
-rw-r--r--Tests/RunCMake/add_link_options/LINK_OPTIONS-shared-check.cmake5
-rw-r--r--Tests/RunCMake/add_link_options/LinkOptionsLib.cxx7
-rw-r--r--Tests/RunCMake/add_link_options/RunCMakeTest.cmake15
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-exe-check.cmake2
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-exe-result.txt1
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-mod-check.cmake2
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-mod-result.txt1
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_c-check.cmake5
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_c-result.txt1
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_cxx-check.cmake5
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_cxx-result.txt1
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-validation.cmake17
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE.cmake17
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-exe-check.cmake2
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-exe-result.txt1
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-mod-check.cmake2
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-mod-result.txt1
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_c-check.cmake5
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_c-result.txt1
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_cxx-check.cmake5
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_cxx-result.txt1
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-validation.cmake23
-rw-r--r--Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID.cmake19
-rw-r--r--Tests/RunCMake/add_test/CMakeLists.txt.in27
-rw-r--r--Tests/RunCMake/add_test/NameContainsBracketArgument1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsBracketArgument2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsBracketArgument3-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsBracketArgument3-stderr.txt2
-rw-r--r--Tests/RunCMake/add_test/NameContainsBracketArgument4-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsBracketArgument4-stderr.txt2
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote1-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote1-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote2-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote2-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote3-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote3-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote3-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote4-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote4-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote4-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedSpecialChars1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedSpecialChars2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedSpecialChars3-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedSpecialChars4-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax3-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax4-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsOtherSpecialChars1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsOtherSpecialChars2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsOtherSpecialChars3-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsOtherSpecialChars4-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSemicolon1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSemicolon2-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSemicolon2-stderr.txt2
-rw-r--r--Tests/RunCMake/add_test/NameContainsSemicolon3-stdout.txt3
-rw-r--r--Tests/RunCMake/add_test/NameContainsSemicolon4-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSemicolon4-stderr.txt2
-rw-r--r--Tests/RunCMake/add_test/NameContainsSpaces1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSpaces2-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSpaces2-stderr.txt2
-rw-r--r--Tests/RunCMake/add_test/NameContainsSpaces3-stdout.txt3
-rw-r--r--Tests/RunCMake/add_test/NameContainsSpaces4-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSpaces4-stderr.txt2
-rw-r--r--Tests/RunCMake/add_test/NameContainsValidSpecialChars1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsValidSpecialChars2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsValidSpecialChars3-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsValidSpecialChars4-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameIsAlphaNumeric1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameIsAlphaNumeric2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameIsAlphaNumeric3-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameIsAlphaNumeric4-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/RunCMakeTest.cmake263
-rw-r--r--Tests/RunCMake/add_test/test.cmake.in16
-rw-r--r--Tests/RunCMake/alias_targets/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/alias_targets/duplicate-target-CMP0107-NEW-result.txt1
-rw-r--r--Tests/RunCMake/alias_targets/duplicate-target-CMP0107-NEW-stderr.txt30
-rw-r--r--Tests/RunCMake/alias_targets/duplicate-target-CMP0107-NEW.cmake4
-rw-r--r--Tests/RunCMake/alias_targets/duplicate-target-CMP0107-OLD.cmake4
-rw-r--r--Tests/RunCMake/alias_targets/duplicate-target.cmake20
-rw-r--r--Tests/RunCMake/cmake_language/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/cmake_language/CallInvalidCommand.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/CheckIncludeGuard.cmake4
-rw-r--r--Tests/RunCMake/cmake_language/CheckProject/CMakeLists.txt19
-rw-r--r--Tests/RunCMake/cmake_language/CheckProject/lib.c0
-rw-r--r--Tests/RunCMake/cmake_language/RunCMakeTest.cmake25
-rw-r--r--Tests/RunCMake/cmake_language/call_double_evaluation-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_language/call_double_evaluation.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/call_expand_command_name-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_language/call_expand_command_name.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/call_expand_function_name-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_language/call_expand_function_name.cmake11
-rw-r--r--Tests/RunCMake/cmake_language/call_expanded_command-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_language/call_expanded_command.cmake6
-rw-r--r--Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_language/call_expanded_command_and_arguments.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/call_expanded_command_with_explicit_argument-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_language/call_expanded_command_with_explicit_argument.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/call_invalid_command.cmake14
-rw-r--r--Tests/RunCMake/cmake_language/call_message-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_language/call_message.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/call_message_fatal_error-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/call_message_fatal_error-stderr.txt5
-rw-r--r--Tests/RunCMake/cmake_language/call_message_fatal_error.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/call_no_parameters-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/call_no_parameters-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_language/call_no_parameters.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/call_preserve_arguments-stderr.txt6
-rw-r--r--Tests/RunCMake/cmake_language/call_preserve_arguments.cmake12
-rw-r--r--Tests/RunCMake/cmake_language/call_unknown_function-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/call_unknown_function-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_language/call_unknown_function.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/call_valid_command.cmake99
-rw-r--r--Tests/RunCMake/cmake_language/eval_expand_command_name-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_language/eval_expand_command_name.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/eval_expanded_command_and_arguments-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_language/eval_expanded_command_and_arguments.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code-stderr.txt5
-rw-r--r--Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/eval_message-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_language/eval_message.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/eval_message_fatal_error-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/eval_message_fatal_error-stderr.txt5
-rw-r--r--Tests/RunCMake/cmake_language/eval_message_fatal_error.cmake5
-rw-r--r--Tests/RunCMake/cmake_language/eval_no_code-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/eval_no_code-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_language/eval_no_code.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/eval_no_parameters-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/eval_no_parameters-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_language/eval_no_parameters.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/eval_variable_outside_message-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_language/eval_variable_outside_message.cmake2
-rw-r--r--Tests/RunCMake/cmake_language/no_parameters-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/no_parameters-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_language/no_parameters.cmake1
-rw-r--r--Tests/RunCMake/cmake_language/unknown_meta_operation-result.txt1
-rw-r--r--Tests/RunCMake/cmake_language/unknown_meta_operation-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_language/unknown_meta_operation.cmake1
-rw-r--r--Tests/RunCMake/configure_file/RerunCMake.cmake6
-rw-r--r--Tests/RunCMake/configure_file/RerunCMake/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/configure_file/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake2
-rw-r--r--Tests/RunCMake/ctest_memcheck/testAddressSanitizer.cmake2
-rw-r--r--Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake2
-rw-r--r--Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake2
-rw-r--r--Tests/RunCMake/ctest_memcheck/testThreadSanitizer.cmake2
-rw-r--r--Tests/RunCMake/ctest_memcheck/testUndefinedBehaviorSanitizer.cmake2
-rw-r--r--Tests/RunCMake/ctest_start/NoStartTimeNightly-result.txt1
-rw-r--r--Tests/RunCMake/ctest_start/NoStartTimeNightly-stderr.txt4
-rw-r--r--Tests/RunCMake/ctest_start/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/ctest_start/test.cmake.in4
-rw-r--r--Tests/RunCMake/ctest_test/RunCMakeTest.cmake23
-rw-r--r--Tests/RunCMake/ctest_test/TestEnvironment-check.cmake10
-rw-r--r--Tests/RunCMake/ctest_test/stop-on-failure-stdout.txt13
-rw-r--r--Tests/RunCMake/execute_process/EchoVariable-stderr.txt3
-rw-r--r--Tests/RunCMake/execute_process/EchoVariable-stdout.txt1
-rw-r--r--Tests/RunCMake/execute_process/EchoVariable.cmake23
-rw-r--r--Tests/RunCMake/execute_process/EchoVariableOutput.cmake2
-rw-r--r--Tests/RunCMake/execute_process/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/exit_code.c3
-rw-r--r--Tests/RunCMake/export/DependOnDoubleExport-stderr.txt3
-rw-r--r--Tests/RunCMake/export/Repeat-CMP0103-NEW-result.txt1
-rw-r--r--Tests/RunCMake/export/Repeat-CMP0103-NEW-stderr.txt17
-rw-r--r--Tests/RunCMake/export/Repeat-CMP0103-NEW.cmake2
-rw-r--r--Tests/RunCMake/export/Repeat-CMP0103-OLD.cmake2
-rw-r--r--Tests/RunCMake/export/Repeat-CMP0103-WARN-stderr.txt26
-rw-r--r--Tests/RunCMake/export/Repeat-CMP0103-WARN.cmake1
-rw-r--r--Tests/RunCMake/export/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-result.txt1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-stderr.txt4
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set.cmake1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-result.txt1
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-stderr.txt4
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set.cmake1
-rw-r--r--Tests/RunCMake/file/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/file/UPLOAD-tls-cainfo-not-set-result.txt1
-rw-r--r--Tests/RunCMake/file/UPLOAD-tls-cainfo-not-set-stderr.txt4
-rw-r--r--Tests/RunCMake/file/UPLOAD-tls-cainfo-not-set.cmake1
-rw-r--r--Tests/RunCMake/file/UPLOAD-tls-verify-not-set-result.txt1
-rw-r--r--Tests/RunCMake/file/UPLOAD-tls-verify-not-set-stderr.txt4
-rw-r--r--Tests/RunCMake/file/UPLOAD-tls-verify-not-set.cmake1
-rw-r--r--Tests/RunCMake/find_file/Required-result.txt1
-rw-r--r--Tests/RunCMake/find_file/Required-stderr.txt4
-rw-r--r--Tests/RunCMake/find_file/Required-stdout.txt1
-rw-r--r--Tests/RunCMake/find_file/Required.cmake12
-rw-r--r--Tests/RunCMake/find_file/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/find_library/Required-result.txt1
-rw-r--r--Tests/RunCMake/find_library/Required-stderr.txt4
-rw-r--r--Tests/RunCMake/find_library/Required-stdout.txt1
-rw-r--r--Tests/RunCMake/find_library/Required.cmake14
-rw-r--r--Tests/RunCMake/find_library/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/find_path/Required-result.txt1
-rw-r--r--Tests/RunCMake/find_path/Required-stderr.txt4
-rw-r--r--Tests/RunCMake/find_path/Required-stdout.txt1
-rw-r--r--Tests/RunCMake/find_path/Required.cmake12
-rw-r--r--Tests/RunCMake/find_path/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/find_program/ExeNoRead-stdout.txt1
-rw-r--r--Tests/RunCMake/find_program/ExeNoRead.cmake4
-rw-r--r--Tests/RunCMake/find_program/Required-result.txt1
-rw-r--r--Tests/RunCMake/find_program/Required-stderr.txt4
-rw-r--r--Tests/RunCMake/find_program/Required-stdout.txt1
-rw-r--r--Tests/RunCMake/find_program/Required.cmake12
-rw-r--r--Tests/RunCMake/find_program/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/get_filename_component/KnownComponents.cmake8
-rwxr-xr-xTests/RunCMake/get_filename_component/KnownComponents.sh1
-rw-r--r--Tests/RunCMake/get_property/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/get_property/source_properties_failures-result.txt1
-rw-r--r--Tests/RunCMake/get_property/source_properties_failures-stderr.txt66
-rw-r--r--Tests/RunCMake/get_property/source_properties_failures.cmake14
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-result.txt1
-rw-r--r--Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-stderr.txt6
-rw-r--r--Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-result.txt1
-rw-r--r--Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-stderr.txt6
-rw-r--r--Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation.cmake17
-rw-r--r--Tests/RunCMake/message/message-indent-multiline.cmake2
-rw-r--r--Tests/RunCMake/pseudo_cppcheck.c3
-rw-r--r--Tests/RunCMake/set_property/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/set_property/SOURCE_FILE-result.txt1
-rw-r--r--Tests/RunCMake/set_property/SOURCE_FILE-stderr.txt22
-rw-r--r--Tests/RunCMake/set_property/SOURCE_FILE.cmake4
-rw-r--r--Tests/RunCMake/string/Hex.cmake20
-rw-r--r--Tests/RunCMake/string/HexNotEnoughArgs-result.txt1
-rw-r--r--Tests/RunCMake/string/HexNotEnoughArgs-stderr.txt4
-rw-r--r--Tests/RunCMake/string/HexNotEnoughArgs.cmake1
-rw-r--r--Tests/RunCMake/string/HexTooManyArgs-result.txt1
-rw-r--r--Tests/RunCMake/string/HexTooManyArgs-stderr.txt4
-rw-r--r--Tests/RunCMake/string/HexTooManyArgs.cmake1
-rw-r--r--Tests/RunCMake/string/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/target_link_directories/CMP0099.cmake2
-rw-r--r--Tests/RunCMake/target_link_directories/RunCMakeTest.cmake13
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-LINKER_LANGUAGE-check.cmake5
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-LINKER_LANGUAGE-result.txt1
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-basic-check.cmake2
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-basic-result.txt1
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-interface-check.cmake4
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-interface-result.txt1
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-validation.cmake20
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE.cmake23
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-check.cmake5
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-result.txt1
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-basic-check.cmake2
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-basic-result.txt1
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-interface-check.cmake4
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-interface-result.txt1
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-validation.cmake26
-rw-r--r--Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID.cmake29
-rw-r--r--Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake54
-rw-r--r--Tests/RunCMake/target_link_libraries/func.c7
-rw-r--r--Tests/RunCMake/target_link_libraries/func.cxx7
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-mix-lang-result.txt1
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-mix-lang-stderr.txt2
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-mix-lang.cmake8
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-usage-result.txt1
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-usage-stderr.txt8
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-usage.cmake4
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE.cmake72
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-bad-mix-lang-result.txt1
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-bad-mix-lang-stderr.txt2
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-bad-mix-lang.cmake8
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-basic-result.txt1
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-exe_c-result.txt1
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-exe_cxx-result.txt1
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-interface-result.txt1
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-no_language-result.txt1
-rw-r--r--Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID.cmake73
-rw-r--r--Tests/RunCMake/target_link_libraries/lib.c10
-rw-r--r--Tests/RunCMake/target_link_libraries/main.c12
-rw-r--r--Tests/RunCMake/target_link_libraries/main.cxx12
-rw-r--r--Tests/RunCMake/target_link_options/LinkOptionsDevice.cu14
-rw-r--r--Tests/RunCMake/target_link_options/RunCMakeTest.cmake36
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK-CMP0105_NEW-check.cmake4
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK-CMP0105_NEW-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK-device-check.cmake3
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK-device-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK-interface-check.cmake3
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK-interface-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK-no_device-check.cmake3
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK-no_device-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK-private-check.cmake3
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK-private-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK-validation.cmake22
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK.cmake48
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-LINKER_LANGUAGE-check.cmake5
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-LINKER_LANGUAGE-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-exe-check.cmake2
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-exe-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-interface-check.cmake5
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-interface-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-mod-check.cmake2
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-mod-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-shared_c-check.cmake5
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-shared_c-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-validation.cmake17
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE.cmake32
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-check.cmake5
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-exe-check.cmake2
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-exe-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-interface-check.cmake5
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-interface-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-mod-check.cmake2
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-mod-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-shared_c-check.cmake5
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-shared_c-result.txt1
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-validation.cmake23
-rw-r--r--Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID.cmake41
791 files changed, 10606 insertions, 4924 deletions
diff --git a/Tests/RunCMake/AndroidTestUtilities/check.cmake b/Tests/RunCMake/AndroidTestUtilities/check.cmake
index ccd4d74..c24a3cd 100644
--- a/Tests/RunCMake/AndroidTestUtilities/check.cmake
+++ b/Tests/RunCMake/AndroidTestUtilities/check.cmake
@@ -13,7 +13,7 @@ function(compare_build_to_expected)
endfunction()
function(check_for_setup_test)
- file(STRINGS "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" output_var REGEX "add_test\\(setup_test.*")
+ file(STRINGS "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" output_var REGEX "add_test\\(\"setup_test\".*")
if(NOT output_var)
set(RunCMake_TEST_FAILED "Could not find the test: setup_test" PARENT_SCOPE)
endif()
diff --git a/Tests/RunCMake/AutoExportDll/AutoExport.cmake b/Tests/RunCMake/AutoExportDll/AutoExport.cmake
index a550005..85eff7e 100644
--- a/Tests/RunCMake/AutoExportDll/AutoExport.cmake
+++ b/Tests/RunCMake/AutoExportDll/AutoExport.cmake
@@ -5,6 +5,10 @@ add_subdirectory(sub)
add_library(objlib OBJECT objlib.c)
set_property(TARGET objlib PROPERTY POSITION_INDEPENDENT_CODE 1)
add_library(autoexport SHARED hello.cxx world.cxx foo.c $<TARGET_OBJECTS:objlib>)
+add_library(autoexport3 SHARED cppCLI.cxx)
+if(MSVC AND NOT MSVC_VERSION VERSION_LESS 1600)
+ set_property(TARGET autoexport3 PROPERTY COMMON_LANGUAGE_RUNTIME "")
+endif()
add_executable(say say.cxx)
if(MSVC)
@@ -18,4 +22,4 @@ if(MSVC)
target_compile_definitions(say PRIVATE HAS_JUSTNOP)
endif()
endif()
-target_link_libraries(say autoexport autoexport2)
+target_link_libraries(say autoexport autoexport2 autoexport3)
diff --git a/Tests/RunCMake/AutoExportDll/cppCLI.cxx b/Tests/RunCMake/AutoExportDll/cppCLI.cxx
new file mode 100644
index 0000000..816bb6e
--- /dev/null
+++ b/Tests/RunCMake/AutoExportDll/cppCLI.cxx
@@ -0,0 +1,22 @@
+#include <stdio.h>
+
+#ifdef __cplusplus_cli
+# include <msclr\marshal_cppstd.h>
+
+void cliFunction()
+{
+ System::String ^ result = "cliFunction";
+ result = result->Trim();
+ printf(msclr::interop::marshal_as<std::string>(result).c_str());
+}
+#else
+void cliFunction()
+{
+ printf("cliFunction (but /cli was not passed to the compiler)");
+}
+#endif
+
+void nonCliFunction()
+{
+ printf("nonCliFunction");
+}
diff --git a/Tests/RunCMake/AutoExportDll/say.cxx b/Tests/RunCMake/AutoExportDll/say.cxx
index 654b5e0..8fc768a 100644
--- a/Tests/RunCMake/AutoExportDll/say.cxx
+++ b/Tests/RunCMake/AutoExportDll/say.cxx
@@ -17,9 +17,11 @@ void justnop();
}
// test c++ functions
-// forward declare hello and world
+// forward declare hello, world, cliFunction and nonCliFunction
void hello();
void world();
+void cliFunction();
+void nonCliFunction();
// test exports for executable target
extern "C" {
@@ -44,6 +46,10 @@ int main()
bar();
objlib();
printf("\n");
+ cliFunction();
+ printf("\n");
+ nonCliFunction();
+ printf("\n");
#ifdef HAS_JUSTNOP
justnop();
#endif
diff --git a/Tests/RunCMake/BuildDepends/GNU-AS-stdout.txt b/Tests/RunCMake/BuildDepends/GNU-AS-stdout.txt
new file mode 100644
index 0000000..c4326ae
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/GNU-AS-stdout.txt
@@ -0,0 +1,4 @@
+-- The ASM compiler identification is GNU
+-- Found assembler: [^
+]*/as(\.exe)?
+-- CMAKE_ASM_COMPILER_ID_VENDOR_MATCH='GNU assembler'
diff --git a/Tests/RunCMake/BuildDepends/GNU-AS.cmake b/Tests/RunCMake/BuildDepends/GNU-AS.cmake
new file mode 100644
index 0000000..21921ef
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/GNU-AS.cmake
@@ -0,0 +1,13 @@
+enable_language(ASM)
+
+# Validate undocumented implementation detail.
+message(STATUS "CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_MATCH='${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_MATCH}'")
+
+add_library(gnu_as STATIC gnu_as.s)
+target_include_directories(gnu_as PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
+set(check_pairs
+ \"$<TARGET_FILE:gnu_as>|${CMAKE_CURRENT_BINARY_DIR}/gnu_as.inc\"
+ )
+")
diff --git a/Tests/RunCMake/BuildDepends/GNU-AS.step1.cmake b/Tests/RunCMake/BuildDepends/GNU-AS.step1.cmake
new file mode 100644
index 0000000..15a5e96
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/GNU-AS.step1.cmake
@@ -0,0 +1 @@
+file(WRITE "${RunCMake_TEST_BINARY_DIR}/gnu_as.inc" "")
diff --git a/Tests/RunCMake/BuildDepends/GNU-AS.step2.cmake b/Tests/RunCMake/BuildDepends/GNU-AS.step2.cmake
new file mode 100644
index 0000000..15a5e96
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/GNU-AS.step2.cmake
@@ -0,0 +1 @@
+file(WRITE "${RunCMake_TEST_BINARY_DIR}/gnu_as.inc" "")
diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
index e4d7177..7a68c4b 100644
--- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
@@ -108,3 +108,8 @@ endfunction()
if(RunCMake_GENERATOR STREQUAL "Xcode")
run_ReGeneration(regenerate-project)
endif()
+
+if(CMake_TEST_BuildDepends_GNU_AS)
+ set(ENV{ASM} "${CMake_TEST_BuildDepends_GNU_AS}")
+ run_BuildDepends(GNU-AS)
+endif()
diff --git a/Tests/RunCMake/BuildDepends/gnu_as.s b/Tests/RunCMake/BuildDepends/gnu_as.s
new file mode 100644
index 0000000..a2e7dfb
--- /dev/null
+++ b/Tests/RunCMake/BuildDepends/gnu_as.s
@@ -0,0 +1 @@
+.include "gnu_as.inc"
diff --git a/Tests/RunCMake/CMP0104/CMP0104-Common.cmake b/Tests/RunCMake/CMP0104/CMP0104-Common.cmake
new file mode 100644
index 0000000..b3568f1
--- /dev/null
+++ b/Tests/RunCMake/CMP0104/CMP0104-Common.cmake
@@ -0,0 +1,2 @@
+enable_language(CUDA)
+add_library(cuda main.cu)
diff --git a/Tests/RunCMake/CMP0104/CMP0104-NEW.cmake b/Tests/RunCMake/CMP0104/CMP0104-NEW.cmake
new file mode 100644
index 0000000..732ab77
--- /dev/null
+++ b/Tests/RunCMake/CMP0104/CMP0104-NEW.cmake
@@ -0,0 +1,6 @@
+cmake_policy(SET CMP0104 NEW)
+include(CMP0104-Common.cmake)
+
+if(NOT CMAKE_CUDA_ARCHITECTURES)
+ message(FATAL_ERROR "CMAKE_CUDA_ARCHITECTURES is empty with CMP0104 enabled.")
+endif()
diff --git a/Tests/RunCMake/CMP0104/CMP0104-OLD.cmake b/Tests/RunCMake/CMP0104/CMP0104-OLD.cmake
new file mode 100644
index 0000000..415eecc
--- /dev/null
+++ b/Tests/RunCMake/CMP0104/CMP0104-OLD.cmake
@@ -0,0 +1,12 @@
+cmake_policy(SET CMP0104 OLD)
+include(CMP0104-Common.cmake)
+
+if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA")
+ if(CMAKE_CUDA_ARCHITECTURES)
+ message(FATAL_ERROR "CMAKE_CUDA_ARCHITECTURES isn't empty for NVIDIA with CMP0104 OLD.")
+ endif()
+else(NOT CMAKE_CUDA_COMPILER_ID STREQUAL "Unknown")
+ if(NOT CMAKE_CUDA_ARCHITECTURES)
+ message(FATAL_ERROR "CMAKE_CUDA_ARCHITECTURES isn't non-empty for non-NVIDIA with CMP0104 OLD.")
+ endif()
+endif()
diff --git a/Tests/RunCMake/CMP0104/CMP0104-WARN-stderr.txt b/Tests/RunCMake/CMP0104/CMP0104-WARN-stderr.txt
new file mode 100644
index 0000000..2c9b7d7
--- /dev/null
+++ b/Tests/RunCMake/CMP0104/CMP0104-WARN-stderr.txt
@@ -0,0 +1,8 @@
+CMake Warning \(dev\) in CMakeLists.txt:
+ Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
+ empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104"
+ for policy details. Use the cmake_policy command to set the policy and
+ suppress this warning.
+
+ CUDA_ARCHITECTURES is empty for target "cuda".
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0104/CMP0104-WARN.cmake b/Tests/RunCMake/CMP0104/CMP0104-WARN.cmake
new file mode 100644
index 0000000..2b4a8f5
--- /dev/null
+++ b/Tests/RunCMake/CMP0104/CMP0104-WARN.cmake
@@ -0,0 +1,2 @@
+include(CMP0104-Common.cmake)
+set_property(TARGET cuda PROPERTY CUDA_ARCHITECTURES)
diff --git a/Tests/RunCMake/CMP0104/CMakeLists.txt b/Tests/RunCMake/CMP0104/CMakeLists.txt
new file mode 100644
index 0000000..2632ffa
--- /dev/null
+++ b/Tests/RunCMake/CMP0104/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.16)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0104/RunCMakeTest.cmake b/Tests/RunCMake/CMP0104/RunCMakeTest.cmake
new file mode 100644
index 0000000..bc8e1b1
--- /dev/null
+++ b/Tests/RunCMake/CMP0104/RunCMakeTest.cmake
@@ -0,0 +1,5 @@
+include(RunCMake)
+
+run_cmake(CMP0104-OLD)
+run_cmake(CMP0104-NEW)
+run_cmake(CMP0104-WARN)
diff --git a/Tests/RunCMake/CMP0104/main.cu b/Tests/RunCMake/CMP0104/main.cu
new file mode 100644
index 0000000..5047a34
--- /dev/null
+++ b/Tests/RunCMake/CMP0104/main.cu
@@ -0,0 +1,3 @@
+int main()
+{
+}
diff --git a/Tests/RunCMake/CMP0106/CMP0106-Common.cmake b/Tests/RunCMake/CMP0106/CMP0106-Common.cmake
new file mode 100644
index 0000000..a1f7908
--- /dev/null
+++ b/Tests/RunCMake/CMP0106/CMP0106-Common.cmake
@@ -0,0 +1,10 @@
+include(Documentation OPTIONAL RESULT_VARIABLE found)
+if (NOT should_find AND found)
+ message(FATAL_ERROR
+ "The Documentation module should not have been found, but it was.")
+endif ()
+if (should_find AND NOT found)
+ message(FATAL_ERROR
+ "The Documentation module should have been found, but it was not.")
+endif ()
+include(${CMAKE_ROOT}/Modules/Documentation.cmake)
diff --git a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-result.txt b/Tests/RunCMake/CMP0106/CMP0106-NEW-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-result.txt
+++ b/Tests/RunCMake/CMP0106/CMP0106-NEW-result.txt
diff --git a/Tests/RunCMake/CMP0106/CMP0106-NEW-stderr.txt b/Tests/RunCMake/CMP0106/CMP0106-NEW-stderr.txt
new file mode 100644
index 0000000..7ad774e
--- /dev/null
+++ b/Tests/RunCMake/CMP0106/CMP0106-NEW-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at .*/Modules/Documentation.cmake:15 \(message\):
+ Documentation.cmake is VTK-specific code and should not be used in non-VTK
+ projects. This logic in this module is best shipped with the project using
+ it rather than with CMake. This is now an error according to policy
+ CMP0106.
+Call Stack \(most recent call first\):
+ CMP0106-Common.cmake:10 \(include\)
+ CMP0106-NEW.cmake:4 \(include\)
+ CMakeLists.txt:7 \(include\)
diff --git a/Tests/RunCMake/CMP0106/CMP0106-NEW.cmake b/Tests/RunCMake/CMP0106/CMP0106-NEW.cmake
new file mode 100644
index 0000000..e7d5bd1
--- /dev/null
+++ b/Tests/RunCMake/CMP0106/CMP0106-NEW.cmake
@@ -0,0 +1,4 @@
+cmake_policy(SET CMP0106 NEW)
+
+set(should_find OFF)
+include(CMP0106-Common.cmake)
diff --git a/Tests/RunCMake/CMP0106/CMP0106-OLD.cmake b/Tests/RunCMake/CMP0106/CMP0106-OLD.cmake
new file mode 100644
index 0000000..730e846
--- /dev/null
+++ b/Tests/RunCMake/CMP0106/CMP0106-OLD.cmake
@@ -0,0 +1,9 @@
+cmake_policy(SET CMP0106 OLD)
+
+set(should_find ON)
+include(CMP0106-Common.cmake)
+if (NOT DEFINED BUILD_DOCUMENTATION)
+ message(FATAL_ERROR
+ "Cache variables seem to have not been made with a `OLD` policy "
+ "setting.")
+endif ()
diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView-stderr.txt b/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView-stderr.txt
new file mode 100644
index 0000000..b61889b
--- /dev/null
+++ b/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView-stderr.txt
@@ -0,0 +1,8 @@
+CMake Warning \(dev\) at CMP0106-Common.cmake:1 \(include\):
+ Policy CMP0106 is not set: The Documentation module is removed. Run "cmake
+ --help-policy CMP0106" for policy details. Use the cmake_policy command to
+ set the policy and suppress this warning.
+
+Call Stack \(most recent call first\):
+ subdir/CMakeLists.txt:2 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView.cmake b/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView.cmake
new file mode 100644
index 0000000..309abcc
--- /dev/null
+++ b/Tests/RunCMake/CMP0106/CMP0106-WARN-ParaView.cmake
@@ -0,0 +1,2 @@
+set(should_find ON)
+add_subdirectory(subdir)
diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK-stderr.txt b/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK-stderr.txt
new file mode 100644
index 0000000..f8a754e
--- /dev/null
+++ b/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK-stderr.txt
@@ -0,0 +1,9 @@
+CMake Warning \(dev\) at CMP0106-Common.cmake:1 \(include\):
+ Policy CMP0106 is not set: The Documentation module is removed. Run "cmake
+ --help-policy CMP0106" for policy details. Use the cmake_policy command to
+ set the policy and suppress this warning.
+
+Call Stack \(most recent call first\):
+ CMP0106-WARN-VTK.cmake:2 \(include\)
+ CMakeLists.txt:7 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK.cmake b/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK.cmake
new file mode 100644
index 0000000..99f6c39
--- /dev/null
+++ b/Tests/RunCMake/CMP0106/CMP0106-WARN-VTK.cmake
@@ -0,0 +1,2 @@
+set(should_find ON)
+include(CMP0106-Common.cmake)
diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN-stderr.txt b/Tests/RunCMake/CMP0106/CMP0106-WARN-stderr.txt
new file mode 100644
index 0000000..d0d48d0
--- /dev/null
+++ b/Tests/RunCMake/CMP0106/CMP0106-WARN-stderr.txt
@@ -0,0 +1,37 @@
+CMake Warning \(dev\) at CMP0106-Common.cmake:1 \(include\):
+ Policy CMP0106 is not set: The Documentation module is removed. Run "cmake
+ --help-policy CMP0106" for policy details. Use the cmake_policy command to
+ set the policy and suppress this warning.
+
+Call Stack \(most recent call first\):
+ CMP0106-WARN.cmake:2 \(include\)
+ CMakeLists.txt:7 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Warning \(dev\) at .*/Modules/Documentation.cmake:27 \(message\):
+ Policy CMP0106 is not set: The Documentation module is removed. Run "cmake
+ --help-policy CMP0106" for policy details. Use the cmake_policy command to
+ set the policy and suppress this warning.
+
+ Documentation.cmake is VTK-specific code and should not be used in non-VTK
+ projects. This logic in this module is best shipped with the project using
+ it rather than with CMake.
+Call Stack \(most recent call first\):
+ CMP0106-Common.cmake:1 \(include\)
+ CMP0106-WARN.cmake:2 \(include\)
+ CMakeLists.txt:7 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Warning \(dev\) at .*/Modules/Documentation.cmake:27 \(message\):
+ Policy CMP0106 is not set: The Documentation module is removed. Run "cmake
+ --help-policy CMP0106" for policy details. Use the cmake_policy command to
+ set the policy and suppress this warning.
+
+ Documentation.cmake is VTK-specific code and should not be used in non-VTK
+ projects. This logic in this module is best shipped with the project using
+ it rather than with CMake.
+Call Stack \(most recent call first\):
+ CMP0106-Common.cmake:10 \(include\)
+ CMP0106-WARN.cmake:2 \(include\)
+ CMakeLists.txt:7 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0106/CMP0106-WARN.cmake b/Tests/RunCMake/CMP0106/CMP0106-WARN.cmake
new file mode 100644
index 0000000..99f6c39
--- /dev/null
+++ b/Tests/RunCMake/CMP0106/CMP0106-WARN.cmake
@@ -0,0 +1,2 @@
+set(should_find ON)
+include(CMP0106-Common.cmake)
diff --git a/Tests/RunCMake/CMP0106/CMakeLists.txt b/Tests/RunCMake/CMP0106/CMakeLists.txt
new file mode 100644
index 0000000..eafa642
--- /dev/null
+++ b/Tests/RunCMake/CMP0106/CMakeLists.txt
@@ -0,0 +1,7 @@
+cmake_minimum_required(VERSION 3.1)
+if (RunCMake_TEST STREQUAL "CMP0106-WARN-VTK")
+ project(VTK NONE)
+else ()
+ project(${RunCMake_TEST} NONE)
+endif ()
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CMP0106/RunCMakeTest.cmake b/Tests/RunCMake/CMP0106/RunCMakeTest.cmake
new file mode 100644
index 0000000..acec054
--- /dev/null
+++ b/Tests/RunCMake/CMP0106/RunCMakeTest.cmake
@@ -0,0 +1,7 @@
+include(RunCMake)
+
+run_cmake(CMP0106-OLD)
+run_cmake(CMP0106-NEW)
+run_cmake(CMP0106-WARN)
+run_cmake(CMP0106-WARN-VTK)
+run_cmake(CMP0106-WARN-ParaView)
diff --git a/Tests/RunCMake/CMP0106/subdir/CMakeLists.txt b/Tests/RunCMake/CMP0106/subdir/CMakeLists.txt
new file mode 100644
index 0000000..ed1dd05
--- /dev/null
+++ b/Tests/RunCMake/CMP0106/subdir/CMakeLists.txt
@@ -0,0 +1,2 @@
+project(VTK NONE)
+include(${CMAKE_CURRENT_SOURCE_DIR}/../CMP0106-Common.cmake)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index e9f8bca..868eb24 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -116,6 +116,10 @@ endif()
add_RunCMake_test(CMP0069)
add_RunCMake_test(CMP0081)
add_RunCMake_test(CMP0102)
+if(CMake_TEST_CUDA)
+ add_RunCMake_test(CMP0104)
+endif()
+add_RunCMake_test(CMP0106)
# The test for Policy 65 requires the use of the
# CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS variable, which both the VS and Xcode
@@ -169,7 +173,20 @@ if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND)
set(autogen_with_qt5 TRUE)
endif ()
add_RunCMake_test(Autogen -Dwith_qt5=${autogen_with_qt5})
-add_RunCMake_test(BuildDepends)
+if(NOT DEFINED CMake_TEST_BuildDepends_GNU_AS
+ AND CMAKE_C_COMPILER_ID STREQUAL "GNU"
+ AND CMAKE_GENERATOR MATCHES "^Ninja"
+ )
+ execute_process(COMMAND "${CMAKE_C_COMPILER}" -print-prog-name=as
+ RESULT_VARIABLE _gnu_res
+ OUTPUT_VARIABLE _gnu_as OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+ if(_gnu_res EQUAL 0 AND _gnu_as)
+ set(CMake_TEST_BuildDepends_GNU_AS "${_gnu_as}")
+ endif()
+endif()
+add_RunCMake_test(BuildDepends
+ -DCMake_TEST_BuildDepends_GNU_AS=${CMake_TEST_BuildDepends_GNU_AS}
+ )
if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
add_RunCMake_test(Byproducts)
endif()
@@ -180,14 +197,19 @@ endif()
add_RunCMake_test(CompilerNotFound)
add_RunCMake_test(Configure -DMSVC_IDE=${MSVC_IDE})
add_RunCMake_test(DisallowedCommands)
+if("${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
+ add_RunCMake_test(ExportCompileCommands)
+endif()
add_RunCMake_test(ExternalData)
add_RunCMake_test(FeatureSummary)
add_RunCMake_test(FPHSA)
-add_RunCMake_test(FileAPI -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE})
+add_RunCMake_test(FileAPI -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
+ -DCMAKE_CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID})
add_RunCMake_test(FindBoost)
add_RunCMake_test(FindLua)
add_RunCMake_test(FindOpenGL)
if(CMake_TEST_UseSWIG)
+ add_RunCMake_test(FindSWIG)
add_RunCMake_test(UseSWIG -DCMake_TEST_FindPython=${CMake_TEST_FindPython})
endif()
if(NOT CMAKE_C_COMPILER_ID MATCHES "Watcom")
@@ -251,6 +273,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>)
@@ -259,6 +282,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
endif()
add_RunCMake_test(execute_process)
add_RunCMake_test(export)
+add_RunCMake_test(cmake_language)
add_RunCMake_test(cmake_minimum_required)
add_RunCMake_test(cmake_parse_arguments)
add_RunCMake_test(continue)
@@ -392,7 +416,7 @@ endif()
if(TARGET ctresalloc)
add_RunCMake_test(CTestResourceAllocation -DCTRESALLOC_COMMAND=$<TARGET_FILE:ctresalloc>)
else()
- message(WARNING "Could not find or build ctresalloc")
+ message(STATUS "Could not find ctresalloc")
endif()
find_package(Qt4 QUIET)
@@ -447,12 +471,15 @@ if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang"
add_RunCMake_test(Framework)
endif()
+add_RunCMake_test(File_Archive)
+add_RunCMake_test(File_Configure)
add_RunCMake_test(File_Generate)
add_RunCMake_test(ExportWithoutLanguage)
add_RunCMake_test(target_link_directories)
add_RunCMake_test(target_link_libraries)
add_RunCMake_test(add_link_options -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
-add_RunCMake_test(target_link_options -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
+add_RunCMake_test(target_link_options -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
+ -DCMake_TEST_CUDA=${CMake_TEST_CUDA})
add_RunCMake_test(target_compile_definitions)
add_RunCMake_test(target_compile_features)
@@ -461,6 +488,12 @@ add_RunCMake_test(target_include_directories)
add_RunCMake_test(target_sources)
add_RunCMake_test(CheckModules)
add_RunCMake_test(CheckIPOSupported)
+if (CMAKE_SYSTEM_NAME MATCHES "(Linux|Darwin)"
+ AND (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU" OR CMAKE_Fortran_COMPILER_ID MATCHES "GNU"))
+ add_RunCMake_test(CheckLinkerFlag -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
+ -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID})
+endif()
+
add_RunCMake_test(CommandLine -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DCYGWIN=${CYGWIN} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE})
add_RunCMake_test(CommandLineTar)
@@ -649,5 +682,5 @@ endif()
add_RunCMake_test("CTestCommandExpandLists")
-add_RunCMake_test(PrecompileHeaders)
+add_RunCMake_test(PrecompileHeaders -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
add_RunCMake_test("UnityBuild")
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 3be1fd0..064b4dc 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -20,6 +20,8 @@ run_cpack_test(LONG_FILENAMES "DEB.LONG_FILENAMES" false "MONOLITHIC")
run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM.MAIN_COMPONENT" false "COMPONENT")
run_cpack_test(MINIMAL "RPM.MINIMAL;DEB.MINIMAL;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ;External" false "MONOLITHIC;COMPONENT")
run_cpack_test_package_target(MINIMAL "RPM.MINIMAL;DEB.MINIMAL;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ;External" false "MONOLITHIC;COMPONENT")
+run_cpack_test_package_target(THREADED_ALL "TXZ" false "MONOLITHIC;COMPONENT")
+run_cpack_test_package_target(THREADED "TXZ" false "MONOLITHIC;COMPONENT")
run_cpack_test_subtests(PACKAGE_CHECKSUM "invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false "MONOLITHIC")
run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM.PARTIALLY_RELOCATABLE_WARNING" false "COMPONENT")
run_cpack_test(PER_COMPONENT_FIELDS "RPM.PER_COMPONENT_FIELDS;DEB.PER_COMPONENT_FIELDS" false "COMPONENT")
diff --git a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/VerifyResult.cmake
index d7d82f2..1a1e983 100644
--- a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/VerifyResult.cmake
@@ -25,5 +25,5 @@ function(checkScripts_ FILE COMPARE_LIST)
endforeach()
endfunction()
-checkScripts_("${FOUND_FILE_1}" "echo \"pre install foo\";echo \"post install foo\";echo \"pre uninstall foo\";echo \"post uninstall foo\"")
-checkScripts_("${FOUND_FILE_2}" "echo \"pre install\";echo \"post install\";echo \"pre uninstall\";echo \"post uninstall\"")
+checkScripts_("${FOUND_FILE_1}" "echo \"pre install foo\";echo \"post install foo\";echo \"pre uninstall foo\";echo \"post uninstall foo\";echo \"pre trans foo\";echo \"post trans foo\"")
+checkScripts_("${FOUND_FILE_2}" "echo \"pre install\";echo \"post install\";echo \"pre uninstall\";echo \"post uninstall\";echo \"pre trans\";echo \"post trans\"")
diff --git a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake
index fb1b8de..c200fa5 100644
--- a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake
+++ b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/test.cmake
@@ -7,6 +7,10 @@ if(GENERATOR_TYPE STREQUAL "RPM")
"${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall.sh")
set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
"${CMAKE_CURRENT_BINARY_DIR}/post_uninstall.sh")
+ set(CPACK_RPM_PRE_TRANS_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/pre_trans.sh")
+ set(CPACK_RPM_POST_TRANS_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/post_trans.sh")
set(CPACK_RPM_foo_PRE_INSTALL_SCRIPT_FILE
"${CMAKE_CURRENT_BINARY_DIR}/pre_install_foo.sh")
@@ -16,6 +20,10 @@ if(GENERATOR_TYPE STREQUAL "RPM")
"${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall_foo.sh")
set(CPACK_RPM_foo_POST_UNINSTALL_SCRIPT_FILE
"${CMAKE_CURRENT_BINARY_DIR}/post_uninstall_foo.sh")
+ set(CPACK_RPM_foo_PRE_TRANS_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/pre_trans_foo.sh")
+ set(CPACK_RPM_foo_POST_TRANS_SCRIPT_FILE
+ "${CMAKE_CURRENT_BINARY_DIR}/post_trans_foo.sh")
endif()
set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
@@ -29,6 +37,10 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall.sh"
"echo \"pre uninstall\"\n")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall.sh"
"echo \"post uninstall\"\n")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_trans.sh"
+ "echo \"pre trans\"\n")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_trans.sh"
+ "echo \"post trans\"\n")
# specific
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_install_foo.sh"
@@ -39,6 +51,10 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_uninstall_foo.sh"
"echo \"pre uninstall foo\"\n")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_uninstall_foo.sh"
"echo \"post uninstall foo\"\n")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pre_trans_foo.sh"
+ "echo \"pre trans foo\"\n")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/post_trans_foo.sh"
+ "echo \"post trans foo\"\n")
install(FILES CMakeLists.txt DESTINATION foo COMPONENT foo)
install(FILES CMakeLists.txt DESTINATION bar COMPONENT bar)
diff --git a/Tests/RunCMake/CPack/tests/THREADED/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/THREADED/ExpectedFiles.cmake
new file mode 100644
index 0000000..d1a3a5f
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/THREADED/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/THREADED/test.cmake b/Tests/RunCMake/CPack/tests/THREADED/test.cmake
new file mode 100644
index 0000000..78fc9e9
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/THREADED/test.cmake
@@ -0,0 +1,7 @@
+install(FILES CMakeLists.txt DESTINATION foo COMPONENT test)
+
+set(CPACK_ARCHIVE_THREADS 2)
+
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+ set(CPACK_COMPONENTS_ALL test)
+endif()
diff --git a/Tests/RunCMake/CPack/tests/THREADED_ALL/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/THREADED_ALL/ExpectedFiles.cmake
new file mode 100644
index 0000000..d1a3a5f
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/THREADED_ALL/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/THREADED_ALL/test.cmake b/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake
new file mode 100644
index 0000000..34051b8
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake
@@ -0,0 +1,7 @@
+install(FILES CMakeLists.txt DESTINATION foo COMPONENT test)
+
+set(CPACK_ARCHIVE_THREADS 0)
+
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+ set(CPACK_COMPONENTS_ALL test)
+endif()
diff --git a/Tests/RunCMake/CTestCommandLine/MemCheckSan.cmake b/Tests/RunCMake/CTestCommandLine/MemCheckSan.cmake
new file mode 100644
index 0000000..192c30c
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/MemCheckSan.cmake
@@ -0,0 +1,7 @@
+set(MEMORYCHECK_COMMAND "")
+include(CTest)
+add_test(
+ NAME TestSan
+ COMMAND ${CMAKE_COMMAND}
+ -P ${CMAKE_CURRENT_LIST_DIR}/../ctest_memcheck/test${MEMORYCHECK_TYPE}.cmake
+ )
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index 9b9ae65..e05ad79 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -242,6 +242,20 @@ function(run_TestOutputSize)
endfunction()
run_TestOutputSize()
+# Test --stop-on-failure
+function(run_stop_on_failure)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/stop-on-failure)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" "
+add_test(test1 \"${CMAKE_COMMAND}\" -E false)
+add_test(test2 \"${CMAKE_COMMAND}\" -E echo \"not running\")
+")
+ run_cmake_command(stop-on-failure ${CMAKE_CTEST_COMMAND} --stop-on-failure)
+endfunction()
+run_stop_on_failure()
+
function(run_TestAffinity)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TestAffinity)
set(RunCMake_TEST_NO_CLEAN 1)
@@ -345,3 +359,24 @@ run_NoTests()
# Check the configuration type variable is passed
run_ctest(check-configuration-type)
+
+function(run_MemCheckSan case opts)
+ # Use a single build tree for a few tests without cleaning.
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/MemCheckSan${case}-build)
+ set(RunCMake_TEST_OPTIONS
+ "-DMEMORYCHECK_TYPE=${case}Sanitizer"
+ "-DMEMORYCHECK_SANITIZER_OPTIONS=${opts}"
+ )
+ run_cmake(MemCheckSan)
+ unset(RunCMake_TEST_OPTIONS)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake-stdout-file "../ctest_memcheck/Dummy${case}Sanitizer-stdout.txt")
+ run_cmake_command(MemCheckSan${case}-ctest
+ ${CMAKE_CTEST_COMMAND} -C Debug -M Experimental -T MemCheck -V
+ )
+endfunction()
+run_MemCheckSan(Address "simulate_sanitizer=1:report_bugs=1:history_size=5:exitcode=55")
+run_MemCheckSan(Leak "simulate_sanitizer=1:report_bugs=1:history_size=5:exitcode=55")
+run_MemCheckSan(Memory "simulate_sanitizer=1:report_bugs=1:history_size=5:exitcode=55")
+run_MemCheckSan(Thread "report_bugs=1:history_size=5:exitcode=55")
+run_MemCheckSan(UndefinedBehavior "simulate_sanitizer=1")
diff --git a/Tests/RunCMake/CTestCommandLine/stop-on-failure-result.txt b/Tests/RunCMake/CTestCommandLine/stop-on-failure-result.txt
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/stop-on-failure-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/CTestCommandLine/stop-on-failure-stderr.txt b/Tests/RunCMake/CTestCommandLine/stop-on-failure-stderr.txt
new file mode 100644
index 0000000..ba4235d
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/stop-on-failure-stderr.txt
@@ -0,0 +1 @@
+Errors while running CTest
diff --git a/Tests/RunCMake/CTestCommandLine/stop-on-failure-stdout.txt b/Tests/RunCMake/CTestCommandLine/stop-on-failure-stdout.txt
new file mode 100644
index 0000000..12c77d0
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/stop-on-failure-stdout.txt
@@ -0,0 +1,10 @@
+^Test project .*/Tests/RunCMake/CTestCommandLine/stop-on-failure
+ Start 1: test1
+1/2 Test #1: test1 ............................\*\*\*Failed +[0-9.]+ sec
++
+0% tests passed, 1 tests failed out of 1
++
+Total Test time \(real\) = +[0-9.]+ sec
++
+The following tests FAILED:
+[ ]+1 - test1 \(Failed\)$
diff --git a/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake b/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake
index 8584786..e9aa3a4 100644
--- a/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake
@@ -38,6 +38,13 @@ function(run_ctresalloc_verify name tests)
run_cmake_command(${name} "${CTRESALLOC_COMMAND}" verify "${RunCMake_SOURCE_DIR}/${name}.log" "${CMAKE_CURRENT_LIST_DIR}/resspec.json" "${tests}")
endfunction()
+function(read_testing_file filename variable)
+ file(READ "${RunCMake_TEST_BINARY_DIR}/Testing/TAG" _tag)
+ string(REGEX REPLACE "^([^\n]*)\n.*$" "\\1" _date "${_tag}")
+ file(READ "${RunCMake_TEST_BINARY_DIR}/Testing/${_date}/${filename}" _contents)
+ set("${variable}" "${_contents}" PARENT_SCOPE)
+endfunction()
+
unset(ENV{CTEST_RESOURCE_GROUP_COUNT})
set(RunCMake_TEST_NO_CLEAN 1)
file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/ctresalloc-write-proc-good1-build")
@@ -140,9 +147,13 @@ run_ctresalloc_verify(ctresalloc-verify-noend "test1")
# Now test the resource allocation feature of CTest
###############################################################################
-function(run_ctest_resource name parallel random)
- run_ctest("${name}-ctest-s-res" "-DCTEST_RESOURCE_ALLOC_ENABLED=1" "-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" "-DCTEST_PARALLEL=${parallel}" "-DCTEST_RANDOM=${random}")
- run_ctest("${name}-ctest-s-nores" "-DCTEST_RESOURCE_ALLOC_ENABLED=0" "-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" "-DCTEST_PARALLEL=${parallel}" "-DCTEST_RANDOM=${random}")
+function(run_ctest_resource name parallel random extra)
+ run_ctest("${name}-ctest-s-res" "-DCTEST_RESOURCE_ALLOC_ENABLED=1" "-DCTEST_RESOURCE_SPEC_SOURCE=ARG" "-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" "-DCTEST_PARALLEL=${parallel}" "-DCTEST_RANDOM=${random}")
+ run_ctest("${name}-ctest-s-nores" "-DCTEST_RESOURCE_ALLOC_ENABLED=0" "-DCTEST_RESOURCE_SPEC_SOURCE=NONE" "-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" "-DCTEST_PARALLEL=${parallel}" "-DCTEST_RANDOM=${random}")
+ if(extra)
+ run_ctest("${name}-ctest-s-res-variable" "-DCTEST_RESOURCE_ALLOC_ENABLED=1" "-DCTEST_RESOURCE_SPEC_SOURCE=VARIABLE" "-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" "-DCTEST_PARALLEL=${parallel}" "-DCTEST_RANDOM=${random}")
+ run_ctest("${name}-ctest-s-res-cache" "-DCTEST_RESOURCE_ALLOC_ENABLED=1" "-DCTEST_RESOURCE_SPEC_SOURCE=CACHE" "-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" "-DCTEST_PARALLEL=${parallel}" "-DCTEST_RANDOM=${random}")
+ endif()
endfunction()
function(verify_ctest_resources)
@@ -155,15 +166,15 @@ function(verify_ctest_resources)
endif()
endfunction()
-run_ctest_resource(lotsoftests 10 1)
-run_ctest_resource(checkfree1 2 0)
-run_ctest_resource(checkfree2 1 0)
-run_ctest_resource(notenough1 1 0)
-run_ctest_resource(notenough2 1 0)
-run_ctest_resource(notenough3 1 0)
-run_ctest_resource(combine 1 0)
-run_ctest_resource(ensure_parallel 2 0)
+run_ctest_resource(lotsoftests 10 1 0)
+run_ctest_resource(checkfree1 2 0 1)
+run_ctest_resource(checkfree2 1 0 0)
+run_ctest_resource(notenough1 1 0 1)
+run_ctest_resource(notenough2 1 0 0)
+run_ctest_resource(notenough3 1 0 0)
+run_ctest_resource(combine 1 0 0)
+run_ctest_resource(ensure_parallel 2 0 0)
set(ENV{CTEST_RESOURCE_GROUP_COUNT} 2)
-run_ctest_resource(process_count 1 0)
+run_ctest_resource(process_count 1 0 0)
unset(ENV{CTEST_RESOURCE_GROUP_COUNT})
diff --git a/Tests/RunCMake/CTestResourceAllocation/checkfree1-ctest-s-res-cache-check.cmake b/Tests/RunCMake/CTestResourceAllocation/checkfree1-ctest-s-res-cache-check.cmake
new file mode 100644
index 0000000..ceda72e
--- /dev/null
+++ b/Tests/RunCMake/CTestResourceAllocation/checkfree1-ctest-s-res-cache-check.cmake
@@ -0,0 +1 @@
+verify_ctest_resources()
diff --git a/Tests/RunCMake/CTestResourceAllocation/checkfree1-ctest-s-res-variable-check.cmake b/Tests/RunCMake/CTestResourceAllocation/checkfree1-ctest-s-res-variable-check.cmake
new file mode 100644
index 0000000..ceda72e
--- /dev/null
+++ b/Tests/RunCMake/CTestResourceAllocation/checkfree1-ctest-s-res-variable-check.cmake
@@ -0,0 +1 @@
+verify_ctest_resources()
diff --git a/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx b/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx
index 80db05e..daf8a2d 100644
--- a/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx
+++ b/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx
@@ -1,6 +1,6 @@
#include <cassert>
#include <chrono>
-#include <cstddef>
+#include <cstddef> // IWYU pragma: keep
#include <cstdlib>
#include <iostream>
#include <map>
diff --git a/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-cache-check.cmake b/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-cache-check.cmake
new file mode 100644
index 0000000..321e9a2
--- /dev/null
+++ b/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-cache-check.cmake
@@ -0,0 +1,3 @@
+if(EXISTS "${RunCMake_TEST_BINARY_DIR}/ctresalloc.log")
+ set(RunCMake_TEST_FAILED "ctresalloc.log should not exist")
+endif()
diff --git a/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-cache-result.txt b/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-cache-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-cache-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-cache-stderr.txt b/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-cache-stderr.txt
new file mode 100644
index 0000000..521a34b
--- /dev/null
+++ b/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-cache-stderr.txt
@@ -0,0 +1,14 @@
+^Insufficient resources for test Test1:
+
+ Test requested resources of type 'fluxcapacitors' in the following amounts:
+ 200 slots
+ but only the following units were available:
+ 'outatime': 121 slots
+
+Resource spec file:
+
+ [^
+]*/Tests/RunCMake/CTestResourceAllocation/resspec.json
+CMake Error at [^
+]*/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-cache/test\.cmake:[0-9]+ \(message\):
+ Tests did not pass$
diff --git a/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-variable-check.cmake b/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-variable-check.cmake
new file mode 100644
index 0000000..321e9a2
--- /dev/null
+++ b/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-variable-check.cmake
@@ -0,0 +1,3 @@
+if(EXISTS "${RunCMake_TEST_BINARY_DIR}/ctresalloc.log")
+ set(RunCMake_TEST_FAILED "ctresalloc.log should not exist")
+endif()
diff --git a/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-variable-result.txt b/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-variable-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-variable-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-variable-stderr.txt b/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-variable-stderr.txt
new file mode 100644
index 0000000..dcf13e0
--- /dev/null
+++ b/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-variable-stderr.txt
@@ -0,0 +1,14 @@
+^Insufficient resources for test Test1:
+
+ Test requested resources of type 'fluxcapacitors' in the following amounts:
+ 200 slots
+ but only the following units were available:
+ 'outatime': 121 slots
+
+Resource spec file:
+
+ [^
+]*/Tests/RunCMake/CTestResourceAllocation/resspec.json
+CMake Error at [^
+]*/Tests/RunCMake/CTestResourceAllocation/notenough1-ctest-s-res-variable/test\.cmake:[0-9]+ \(message\):
+ Tests did not pass$
diff --git a/Tests/RunCMake/CTestResourceAllocation/process_count-ctest-s-nores-check.cmake b/Tests/RunCMake/CTestResourceAllocation/process_count-ctest-s-nores-check.cmake
new file mode 100644
index 0000000..c6e72bd
--- /dev/null
+++ b/Tests/RunCMake/CTestResourceAllocation/process_count-ctest-s-nores-check.cmake
@@ -0,0 +1,4 @@
+read_testing_file("Test.xml" _test_contents)
+if(NOT _test_contents MATCHES "#CTEST_RESOURCE_GROUP_COUNT=")
+ string(APPEND RunCMake_TEST_FAILED "Could not find unset variable CTEST_RESOURCE_GROUP_COUNT in test measurements\n")
+endif()
diff --git a/Tests/RunCMake/CTestResourceAllocation/process_count-ctest-s-res-check.cmake b/Tests/RunCMake/CTestResourceAllocation/process_count-ctest-s-res-check.cmake
index ceda72e..585c36b 100644
--- a/Tests/RunCMake/CTestResourceAllocation/process_count-ctest-s-res-check.cmake
+++ b/Tests/RunCMake/CTestResourceAllocation/process_count-ctest-s-res-check.cmake
@@ -1 +1,9 @@
verify_ctest_resources()
+
+read_testing_file("Test.xml" _test_contents)
+if(NOT _test_contents MATCHES "\nCTEST_RESOURCE_GROUP_0=widgets")
+ string(APPEND RunCMake_TEST_FAILED "Could not find variable CTEST_RESOURCE_GROUP_0 in test measurements\n")
+endif()
+if(NOT _test_contents MATCHES "\nCTEST_RESOURCE_GROUP_0_WIDGETS=id:")
+ string(APPEND RunCMake_TEST_FAILED "Could not find variable CTEST_RESOURCE_GROUP_0_WIDGETS in test measurements\n")
+endif()
diff --git a/Tests/RunCMake/CTestResourceAllocation/test.cmake.in b/Tests/RunCMake/CTestResourceAllocation/test.cmake.in
index 4b426f1..54eb4e9 100644
--- a/Tests/RunCMake/CTestResourceAllocation/test.cmake.in
+++ b/Tests/RunCMake/CTestResourceAllocation/test.cmake.in
@@ -8,15 +8,21 @@ set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
-ctest_start(Experimental QUIET)
-ctest_configure(OPTIONS
+set(config_options
"-DCTEST_RESOURCE_ALLOC_ENABLED=${CTEST_RESOURCE_ALLOC_ENABLED};-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}"
)
-ctest_build()
-if(CTEST_RESOURCE_ALLOC_ENABLED)
+if(CTEST_RESOURCE_SPEC_SOURCE STREQUAL "ARG")
set(resspec RESOURCE_SPEC_FILE "@RunCMake_SOURCE_DIR@/resspec.json")
+elseif(CTEST_RESOURCE_SPEC_SOURCE STREQUAL "VARIABLE")
+ set(CTEST_RESOURCE_SPEC_FILE "@RunCMake_SOURCE_DIR@/resspec.json")
+elseif(CTEST_RESOURCE_SPEC_SOURCE STREQUAL "CACHE")
+ list(APPEND config_options "-DCTEST_RESOURCE_SPEC_FILE=@RunCMake_SOURCE_DIR@/resspec.json")
endif()
+
+ctest_start(Experimental QUIET)
+ctest_configure(OPTIONS "${config_options}")
+ctest_build()
ctest_test(${resspec} RETURN_VALUE retval PARALLEL_LEVEL ${CTEST_PARALLEL} SCHEDULE_RANDOM ${CTEST_RANDOM})
if(retval)
message(FATAL_ERROR "Tests did not pass")
diff --git a/Tests/RunCMake/CheckLinkerFlag/CMakeLists.txt b/Tests/RunCMake/CheckLinkerFlag/CMakeLists.txt
new file mode 100644
index 0000000..0421e28
--- /dev/null
+++ b/Tests/RunCMake/CheckLinkerFlag/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 3.13)
+
+project(${RunCMake_TEST} LANGUAGES NONE)
+
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CheckLinkerFlag/CheckCLinkerFlag.cmake b/Tests/RunCMake/CheckLinkerFlag/CheckCLinkerFlag.cmake
new file mode 100644
index 0000000..c8e87a4
--- /dev/null
+++ b/Tests/RunCMake/CheckLinkerFlag/CheckCLinkerFlag.cmake
@@ -0,0 +1,3 @@
+
+set (CHECK_LANGUAGE C)
+include ("${CMAKE_CURRENT_SOURCE_DIR}/CheckLinkerFlag.cmake")
diff --git a/Tests/RunCMake/CheckLinkerFlag/CheckCXXLinkerFlag.cmake b/Tests/RunCMake/CheckLinkerFlag/CheckCXXLinkerFlag.cmake
new file mode 100644
index 0000000..4e299b9
--- /dev/null
+++ b/Tests/RunCMake/CheckLinkerFlag/CheckCXXLinkerFlag.cmake
@@ -0,0 +1,3 @@
+
+set (CHECK_LANGUAGE CXX)
+include ("${CMAKE_CURRENT_SOURCE_DIR}/CheckLinkerFlag.cmake")
diff --git a/Tests/RunCMake/CheckLinkerFlag/CheckFortranLinkerFlag.cmake b/Tests/RunCMake/CheckLinkerFlag/CheckFortranLinkerFlag.cmake
new file mode 100644
index 0000000..bca288e
--- /dev/null
+++ b/Tests/RunCMake/CheckLinkerFlag/CheckFortranLinkerFlag.cmake
@@ -0,0 +1,3 @@
+
+set (CHECK_LANGUAGE Fortran)
+include ("${CMAKE_CURRENT_SOURCE_DIR}/CheckLinkerFlag.cmake")
diff --git a/Tests/RunCMake/CheckLinkerFlag/CheckLinkerFlag.cmake b/Tests/RunCMake/CheckLinkerFlag/CheckLinkerFlag.cmake
new file mode 100644
index 0000000..c3bd465
--- /dev/null
+++ b/Tests/RunCMake/CheckLinkerFlag/CheckLinkerFlag.cmake
@@ -0,0 +1,14 @@
+
+enable_language (${CHECK_LANGUAGE})
+
+include(CheckLinkerFlag)
+
+check_linker_flag(${CHECK_LANGUAGE} "LINKER:-L,/dir" VALID_LINKER_FLAG)
+if(NOT VALID_LINKER_FLAG)
+ message(SEND_ERROR "Test fail for valid linker flag.")
+endif()
+
+check_linker_flag(${CHECK_LANGUAGE} "LINKER:-D" INVALID_LINKER_FLAG)
+if(INVALID_LINKER_FLAG)
+ message(SEND_ERROR "Test fail for invalid linker flag.")
+endif()
diff --git a/Tests/RunCMake/CheckLinkerFlag/CheckOBJCLinkerFlag.cmake b/Tests/RunCMake/CheckLinkerFlag/CheckOBJCLinkerFlag.cmake
new file mode 100644
index 0000000..fa1d18e
--- /dev/null
+++ b/Tests/RunCMake/CheckLinkerFlag/CheckOBJCLinkerFlag.cmake
@@ -0,0 +1,3 @@
+
+set (CHECK_LANGUAGE OBJC)
+include ("${CMAKE_CURRENT_SOURCE_DIR}/CheckLinkerFlag.cmake")
diff --git a/Tests/RunCMake/CheckLinkerFlag/CheckOBJCXXLinkerFlag.cmake b/Tests/RunCMake/CheckLinkerFlag/CheckOBJCXXLinkerFlag.cmake
new file mode 100644
index 0000000..414efb8
--- /dev/null
+++ b/Tests/RunCMake/CheckLinkerFlag/CheckOBJCXXLinkerFlag.cmake
@@ -0,0 +1,3 @@
+
+set (CHECK_LANGUAGE OBJCXX)
+include ("${CMAKE_CURRENT_SOURCE_DIR}/CheckLinkerFlag.cmake")
diff --git a/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake b/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
new file mode 100644
index 0000000..224a2a3
--- /dev/null
+++ b/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
@@ -0,0 +1,14 @@
+include(RunCMake)
+
+if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
+ run_cmake(CheckCLinkerFlag)
+ run_cmake(CheckCXXLinkerFlag)
+ if (APPLE)
+ run_cmake(CheckOBJCLinkerFlag)
+ run_cmake(CheckOBJCXXLinkerFlag)
+ endif()
+endif()
+
+if (CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
+ run_cmake(CheckFortranLinkerFlag)
+endif()
diff --git a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
index b4b170e..03286f1 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":0}]},{"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":1}]},{"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_cat_directory-result.txt b/Tests/RunCMake/CommandLine/E_cat_directory-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_cat_directory-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_cat_directory-stderr.txt b/Tests/RunCMake/CommandLine/E_cat_directory-stderr.txt
new file mode 100644
index 0000000..c4d0d48
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_cat_directory-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: .* is a directory
diff --git a/Tests/RunCMake/CommandLine/E_cat_good_cat-stdout.txt b/Tests/RunCMake/CommandLine/E_cat_good_cat-stdout.txt
new file mode 100644
index 0000000..aae90e6
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_cat_good_cat-stdout.txt
@@ -0,0 +1,3 @@
+first file to append
+second file to append
+àéùç - 한국어
diff --git a/Tests/RunCMake/CommandLine/E_cat_non_existing_file-result.txt b/Tests/RunCMake/CommandLine/E_cat_non_existing_file-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_cat_non_existing_file-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_cat_non_existing_file-stderr.txt b/Tests/RunCMake/CommandLine/E_cat_non_existing_file-stderr.txt
new file mode 100644
index 0000000..0d8fc4b
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_cat_non_existing_file-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: .*: no such file or directory \(ignoring\)
diff --git a/Tests/RunCMake/CommandLine/E_cat_non_readable_file-result.txt b/Tests/RunCMake/CommandLine/E_cat_non_readable_file-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_cat_non_readable_file-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_cat_non_readable_file-stderr.txt b/Tests/RunCMake/CommandLine/E_cat_non_readable_file-stderr.txt
new file mode 100644
index 0000000..97ec822
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_cat_non_readable_file-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: .*: permission denied \(ignoring\)
diff --git a/Tests/RunCMake/CommandLine/E_cat_option_not_handled-result.txt b/Tests/RunCMake/CommandLine/E_cat_option_not_handled-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_cat_option_not_handled-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_cat_option_not_handled-stderr.txt b/Tests/RunCMake/CommandLine/E_cat_option_not_handled-stderr.txt
new file mode 100644
index 0000000..92f7acf
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_cat_option_not_handled-stderr.txt
@@ -0,0 +1 @@
+^CMake Error: -f: option not handled
diff --git a/Tests/RunCMake/CommandLine/P_arbitrary_args.cmake b/Tests/RunCMake/CommandLine/P_arbitrary_args.cmake
new file mode 100644
index 0000000..29faae3
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/P_arbitrary_args.cmake
@@ -0,0 +1,3 @@
+if(NOT ("${CMAKE_ARGV3}" STREQUAL "--" AND "${CMAKE_ARGV4}" STREQUAL "-DFOO"))
+ message(FATAL_ERROR "`-DFOO` shouldn't trigger an error after `--`")
+endif()
diff --git a/Tests/RunCMake/CommandLine/ProfilingTest-check.cmake b/Tests/RunCMake/CommandLine/ProfilingTest-check.cmake
new file mode 100644
index 0000000..19ece86
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ProfilingTest-check.cmake
@@ -0,0 +1,18 @@
+if (NOT EXISTS ${ProfilingTestOutput})
+ set(RunCMake_TEST_FAILED "Expected ${ProfilingTestOutput} to exists")
+endif()
+
+file(READ "${ProfilingTestOutput}" JSON_HEADER LIMIT 2)
+if (NOT JSON_HEADER MATCHES "^\\[{")
+ set(RunCMake_TEST_FAILED "Expected valid JSON start")
+ return()
+endif()
+
+file(SIZE "${ProfilingTestOutput}" OUTPUT_SIZE)
+math(EXPR END_OFFSET "${OUTPUT_SIZE} -2 ")
+
+file(READ "${ProfilingTestOutput}" JSON_TRAILER OFFSET ${END_OFFSET})
+if (NOT JSON_TRAILER MATCHES "^}]$")
+ set(RunCMake_TEST_FAILED "Expected valid JSON end")
+ return()
+endif()
diff --git a/Tests/RunCMake/CommandLine/ProfilingTest.cmake b/Tests/RunCMake/CommandLine/ProfilingTest.cmake
new file mode 100644
index 0000000..837f4bf
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/ProfilingTest.cmake
@@ -0,0 +1 @@
+# This file is intentionally left blank
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 8930721..973391d 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -46,6 +46,7 @@ run_cmake_command(G_no-arg ${CMAKE_COMMAND} -B DummyBuildDir -G)
run_cmake_command(G_bad-arg ${CMAKE_COMMAND} -B DummyBuildDir -G NoSuchGenerator)
run_cmake_command(P_no-arg ${CMAKE_COMMAND} -P)
run_cmake_command(P_no-file ${CMAKE_COMMAND} -P nosuchscriptfile.cmake)
+run_cmake_command(P_arbitrary_args ${CMAKE_COMMAND} -P "${RunCMake_SOURCE_DIR}/P_arbitrary_args.cmake" -- -DFOO)
run_cmake_command(build-no-dir
${CMAKE_COMMAND} --build)
@@ -459,6 +460,44 @@ if(NOT WIN32 AND NOT CYGWIN)
endif()
unset(out)
+# cat tests
+set(out ${RunCMake_BINARY_DIR}/cat_tests)
+file(REMOVE_RECURSE "${out}")
+file(MAKE_DIRECTORY ${out})
+run_cmake_command(E_cat_non_existing_file
+ ${CMAKE_COMMAND} -E cat ${out}/non-existing-file.txt)
+
+if(UNIX)
+ # test non readable file only if not root
+ execute_process(
+ COMMAND id -u $ENV{USER}
+ OUTPUT_VARIABLE uid
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ if(NOT "${uid}" STREQUAL "0")
+ # Create non readable file
+ set(inside_folder "${out}/in")
+ file(MAKE_DIRECTORY ${inside_folder})
+ file(WRITE "${inside_folder}/non_readable_file.txt" "first file to append\n")
+ file(COPY "${inside_folder}/non_readable_file.txt" DESTINATION "${out}" FILE_PERMISSIONS OWNER_WRITE)
+ run_cmake_command(E_cat_non_readable_file
+ ${CMAKE_COMMAND} -E cat "${out}/non_readable_file.txt")
+ endif()
+endif()
+
+run_cmake_command(E_cat_option_not_handled
+ ${CMAKE_COMMAND} -E cat -f)
+
+run_cmake_command(E_cat_directory
+ ${CMAKE_COMMAND} -E cat ${out})
+
+file(WRITE "${out}/first_file.txt" "first file to append\n")
+file(WRITE "${out}/second_file.txt" "second file to append\n")
+file(WRITE "${out}/unicode_file.txt" "àéùç - 한국어") # Korean in Korean
+run_cmake_command(E_cat_good_cat
+ ${CMAKE_COMMAND} -E cat "${out}/first_file.txt" "${out}/second_file.txt" "${out}/unicode_file.txt")
+unset(out)
+
run_cmake_command(E_env-no-command0 ${CMAKE_COMMAND} -E env)
run_cmake_command(E_env-no-command1 ${CMAKE_COMMAND} -E env TEST_ENV=1)
run_cmake_command(E_env-bad-arg1 ${CMAKE_COMMAND} -E env -bad-arg1)
@@ -696,3 +735,25 @@ function(run_llvm_rc)
unset(LLVMRC_RESULT)
endfunction()
run_llvm_rc()
+
+set(RunCMake_TEST_OPTIONS --profiling-output=/no/such/file.txt --profiling-format=google-trace)
+run_cmake(profiling-all-params)
+unset(RunCMake_TEST_OPTIONS)
+
+set(RunCMake_TEST_OPTIONS --profiling-output=/no/such/file.txt --profiling-format=invalid-format)
+run_cmake(profiling-invalid-format)
+unset(RunCMake_TEST_OPTIONS)
+
+set(RunCMake_TEST_OPTIONS --profiling-output=/no/such/file.txt)
+run_cmake(profiling-missing-format)
+unset(RunCMake_TEST_OPTIONS)
+
+set(RunCMake_TEST_OPTIONS --profiling-format=google-trace)
+run_cmake(profiling-missing-output)
+unset(RunCMake_TEST_OPTIONS)
+
+set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/profiling-test")
+set(ProfilingTestOutput ${RunCMake_TEST_BINARY_DIR}/output.json)
+set(RunCMake_TEST_OPTIONS --profiling-format=google-trace --profiling-output=${ProfilingTestOutput})
+run_cmake(ProfilingTest)
+unset(RunCMake_TEST_OPTIONS)
diff --git a/Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h b/Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h
index bf56ec6..2d39178 100644
--- a/Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h
+++ b/Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h
Binary files differ
diff --git a/Tests/RunCMake/CommandLine/profiling-all-params-result.txt b/Tests/RunCMake/CommandLine/profiling-all-params-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/profiling-all-params-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/profiling-all-params-stderr.txt b/Tests/RunCMake/CommandLine/profiling-all-params-stderr.txt
new file mode 100644
index 0000000..6b5c373
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/profiling-all-params-stderr.txt
@@ -0,0 +1 @@
+^.*Could not start profiling: Unable to open: /no/such/file.txt$
diff --git a/Tests/RunCMake/CommandLine/profiling-invalid-format-result.txt b/Tests/RunCMake/CommandLine/profiling-invalid-format-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/profiling-invalid-format-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/profiling-invalid-format-stderr.txt b/Tests/RunCMake/CommandLine/profiling-invalid-format-stderr.txt
new file mode 100644
index 0000000..459bc3a
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/profiling-invalid-format-stderr.txt
@@ -0,0 +1 @@
+^.*Invalid format specified for --profiling-format$
diff --git a/Tests/RunCMake/CommandLine/profiling-missing-format-result.txt b/Tests/RunCMake/CommandLine/profiling-missing-format-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/profiling-missing-format-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/profiling-missing-format-stderr.txt b/Tests/RunCMake/CommandLine/profiling-missing-format-stderr.txt
new file mode 100644
index 0000000..459bc3a
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/profiling-missing-format-stderr.txt
@@ -0,0 +1 @@
+^.*Invalid format specified for --profiling-format$
diff --git a/Tests/RunCMake/CommandLine/profiling-missing-output-result.txt b/Tests/RunCMake/CommandLine/profiling-missing-output-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/profiling-missing-output-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/profiling-missing-output-stderr.txt b/Tests/RunCMake/CommandLine/profiling-missing-output-stderr.txt
new file mode 100644
index 0000000..9ab0c8f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/profiling-missing-output-stderr.txt
@@ -0,0 +1 @@
+^.*--profiling-format specified but no --profiling-output!$
diff --git a/Tests/RunCMake/CompilerLauncher/CUDA-common.cmake b/Tests/RunCMake/CompilerLauncher/CUDA-common.cmake
index 6f7fc86..ca25b2a 100644
--- a/Tests/RunCMake/CompilerLauncher/CUDA-common.cmake
+++ b/Tests/RunCMake/CompilerLauncher/CUDA-common.cmake
@@ -1,3 +1,4 @@
+cmake_policy(SET CMP0104 NEW)
enable_language(CUDA)
set(CMAKE_VERBOSE_MAKEFILE TRUE)
add_executable(main main.cu)
diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake b/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
index 588b77b..3cbbc07 100644
--- a/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
+++ b/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
@@ -7,22 +7,22 @@ endif()
set(error_details "There is a problem with generated test file: ${testfile}")
-if(testfile_contents MATCHES "add_test[(]DoesNotUseEmulator [^\n]+pseudo_emulator[^\n]+\n")
+if(testfile_contents MATCHES "add_test[(][\"]DoesNotUseEmulator[\"] [^\n]+pseudo_emulator[^\n]+\n")
message(SEND_ERROR "Used emulator when it should not be used. ${error_details}")
endif()
-if(NOT testfile_contents MATCHES "add_test[(]UsesEmulator [^\n]+pseudo_emulator[^\n]+\n")
+if(NOT testfile_contents MATCHES "add_test[(][\"]UsesEmulator[\"] [^\n]+pseudo_emulator[^\n]+\n")
message(SEND_ERROR "Did not use emulator when it should be used. ${error_details}")
endif()
-if(testfile_contents MATCHES "add_test[(]DoesNotUseEmulatorWithGenex [^\n]+pseudo_emulator[^\n]+\n")
+if(testfile_contents MATCHES "add_test[(][\"]DoesNotUseEmulatorWithGenex[\"] [^\n]+pseudo_emulator[^\n]+\n")
message(SEND_ERROR "Used emulator when it should not be used. ${error_details}")
endif()
-if(NOT testfile_contents MATCHES "add_test[(]UsesEmulatorWithExecTargetFromSubdirAddedWithoutGenex [^\n]+pseudo_emulator[^\n]+\n")
+if(NOT testfile_contents MATCHES "add_test[(][\"]UsesEmulatorWithExecTargetFromSubdirAddedWithoutGenex[\"] [^\n]+pseudo_emulator[^\n]+\n")
message(SEND_ERROR "Did not use emulator when it should be used. ${error_details}")
endif()
-if(testfile_contents MATCHES "add_test[(]DoesNotUseEmulatorWithExecTargetFromSubdirAddedWithGenex [^\n]+pseudo_emulator[^\n]+\n")
+if(testfile_contents MATCHES "add_test[(][\"]DoesNotUseEmulatorWithExecTargetFromSubdirAddedWithGenex[\"] [^\n]+pseudo_emulator[^\n]+\n")
message(SEND_ERROR "Used emulator when it should not be used. ${error_details}")
endif()
diff --git a/Tests/RunCMake/ExportCompileCommands/BeforeProject-check.cmake b/Tests/RunCMake/ExportCompileCommands/BeforeProject-check.cmake
new file mode 100644
index 0000000..87058e2
--- /dev/null
+++ b/Tests/RunCMake/ExportCompileCommands/BeforeProject-check.cmake
@@ -0,0 +1,4 @@
+if(NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/compile_commands.json")
+ set(RunCMake_TEST_FAILED "compile_commands.json not generated")
+ return()
+endif()
diff --git a/Tests/RunCMake/ExportCompileCommands/BeforeProject.cmake b/Tests/RunCMake/ExportCompileCommands/BeforeProject.cmake
new file mode 100644
index 0000000..b8cbdef
--- /dev/null
+++ b/Tests/RunCMake/ExportCompileCommands/BeforeProject.cmake
@@ -0,0 +1,3 @@
+enable_language(C)
+add_library(empty STATIC empty.c)
+message(STATUS "CMAKE_EXPORT_COMPILE_COMMANDS='${CMAKE_EXPORT_COMPILE_COMMANDS}'")
diff --git a/Tests/RunCMake/ExportCompileCommands/BeforeProjectBEFORE.cmake b/Tests/RunCMake/ExportCompileCommands/BeforeProjectBEFORE.cmake
new file mode 100644
index 0000000..87f9c87
--- /dev/null
+++ b/Tests/RunCMake/ExportCompileCommands/BeforeProjectBEFORE.cmake
@@ -0,0 +1 @@
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
diff --git a/Tests/RunCMake/ExportCompileCommands/CMakeLists.txt b/Tests/RunCMake/ExportCompileCommands/CMakeLists.txt
new file mode 100644
index 0000000..b7117bd
--- /dev/null
+++ b/Tests/RunCMake/ExportCompileCommands/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.17)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/ExportCompileCommands/RunCMakeTest.cmake b/Tests/RunCMake/ExportCompileCommands/RunCMakeTest.cmake
new file mode 100644
index 0000000..b540a04
--- /dev/null
+++ b/Tests/RunCMake/ExportCompileCommands/RunCMakeTest.cmake
@@ -0,0 +1,3 @@
+include(RunCMake)
+
+run_cmake_with_options(BeforeProject -DCMAKE_PROJECT_INCLUDE_BEFORE=BeforeProjectBEFORE.cmake)
diff --git a/Tests/RunCMake/ExportCompileCommands/empty.c b/Tests/RunCMake/ExportCompileCommands/empty.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/ExportCompileCommands/empty.c
diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt
index 22e13bf..5fa75e8 100644
--- a/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt
@@ -1,5 +1,5 @@
^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
- Target "MyProj-IFace" was not generated by ExternalProject_Add_StepTargets.
+ External project "MyProj" does not have a step "IFace".
Call Stack \(most recent call first\):
Add_StepDependencies_iface_step.cmake:[0-9]+ \(ExternalProject_Add_StepDependencies\)
CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-stderr.txt b/Tests/RunCMake/ExternalProject/NO_DEPENDS-stderr.txt
index 4cb051d..928d88a 100644
--- a/Tests/RunCMake/ExternalProject/NO_DEPENDS-stderr.txt
+++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-stderr.txt
@@ -2,7 +2,7 @@ CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+. \(message\):
Using NO_DEPENDS for "configure" step might break parallel builds
Call Stack \(most recent call first\):
.*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\)
- .*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_Step\)
+ .*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\)
.*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_configure_command\)
NO_DEPENDS.cmake:[0-9]+ \(ExternalProject_Add\)
CMakeLists.txt:[0-9]+ \(include\)
@@ -12,7 +12,7 @@ CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+. \(message\):
Using NO_DEPENDS for "build" step might break parallel builds
Call Stack \(most recent call first\):
.*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\)
- .*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_Step\)
+ .*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\)
.*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_build_command\)
NO_DEPENDS.cmake:[0-9]+ \(ExternalProject_Add\)
CMakeLists.txt:[0-9]+ \(include\)
@@ -22,7 +22,7 @@ CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+. \(message\):
Using NO_DEPENDS for "install" step might break parallel builds
Call Stack \(most recent call first\):
.*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\)
- .*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_Step\)
+ .*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\)
.*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_install_command\)
NO_DEPENDS.cmake:[0-9]+ \(ExternalProject_Add\)
CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/ExternalProject/PreserveEmptyArgs-build-stdout.txt b/Tests/RunCMake/ExternalProject/PreserveEmptyArgs-build-stdout.txt
new file mode 100644
index 0000000..0e21b8f
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/PreserveEmptyArgs-build-stdout.txt
@@ -0,0 +1,21 @@
+.*-- Number of arguments for download: 6
+.*-- download argument 4: ''
+.*-- download argument 5: 'after'
+.*-- Number of arguments for update: 6
+.*-- update argument 4: ''
+.*-- update argument 5: 'after'
+.*-- Number of arguments for patch: 6
+.*-- patch argument 4: ''
+.*-- patch argument 5: 'after'
+.*-- Number of arguments for configure: 6
+.*-- configure argument 4: ''
+.*-- configure argument 5: 'after'
+.*-- Number of arguments for build: 6
+.*-- build argument 4: ''
+.*-- build argument 5: 'after'
+.*-- Number of arguments for install: 6
+.*-- install argument 4: ''
+.*-- install argument 5: 'after'
+.*-- Number of arguments for test: 6
+.*-- test argument 4: ''
+.*-- test argument 5: 'after'
diff --git a/Tests/RunCMake/ExternalProject/PreserveEmptyArgs.cmake b/Tests/RunCMake/ExternalProject/PreserveEmptyArgs.cmake
new file mode 100644
index 0000000..ded1000
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/PreserveEmptyArgs.cmake
@@ -0,0 +1,13 @@
+include(ExternalProject)
+
+set(script "${CMAKE_CURRENT_LIST_DIR}/countArgs.cmake")
+ExternalProject_Add(
+ blankChecker
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND} -P "${script}" download "" after
+ UPDATE_COMMAND ${CMAKE_COMMAND} -P "${script}" update "" after
+ PATCH_COMMAND ${CMAKE_COMMAND} -P "${script}" patch "" after
+ CONFIGURE_COMMAND ${CMAKE_COMMAND} -P "${script}" configure "" after
+ BUILD_COMMAND ${CMAKE_COMMAND} -P "${script}" build "" after
+ INSTALL_COMMAND ${CMAKE_COMMAND} -P "${script}" install "" after
+ TEST_COMMAND ${CMAKE_COMMAND} -P "${script}" test "" after
+)
diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
index caaf0d2..0d1da26 100644
--- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake
@@ -29,6 +29,10 @@ endfunction()
__ep_test_with_build(MultiCommand)
+set(RunCMake_TEST_OUTPUT_MERGE 1)
+__ep_test_with_build(PreserveEmptyArgs)
+set(RunCMake_TEST_OUTPUT_MERGE 0)
+
# Output is not predictable enough to be able to verify it reliably
# when using the various different Visual Studio generators
if(NOT RunCMake_GENERATOR MATCHES "Visual Studio")
diff --git a/Tests/RunCMake/ExternalProject/countArgs.cmake b/Tests/RunCMake/ExternalProject/countArgs.cmake
new file mode 100644
index 0000000..ee6429a
--- /dev/null
+++ b/Tests/RunCMake/ExternalProject/countArgs.cmake
@@ -0,0 +1,5 @@
+message(STATUS "Number of arguments for ${CMAKE_ARGV3}: ${CMAKE_ARGC}")
+math(EXPR last "${CMAKE_ARGC} - 1")
+foreach(n RANGE 4 ${last})
+ message(STATUS "${CMAKE_ARGV3} argument ${n}: '${CMAKE_ARGV${n}}'")
+endforeach()
diff --git a/Tests/RunCMake/FPHSA/FindUseComponents.cmake b/Tests/RunCMake/FPHSA/FindUseComponents.cmake
new file mode 100644
index 0000000..4168f1d
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/FindUseComponents.cmake
@@ -0,0 +1,15 @@
+# pseudo find_module
+
+if (UseComponents_REQUIRE_VARS)
+ set(FOOBAR TRUE)
+ set(REQUIRED_VARS REQUIRED_VARS FOOBAR)
+endif()
+
+set (UseComponents_Comp1_FOUND TRUE)
+set (UseComponents_Comp2_FOUND TRUE)
+set (UseComponents_Comp3_FOUND FALSE)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(UseComponents ${REQUIRED_VARS}
+ VERSION_VAR Pseudo_VERSION
+ HANDLE_COMPONENTS)
diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake
index 286915d..8e39090 100644
--- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake
@@ -47,3 +47,11 @@ run_cmake(custom_message_1)
set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DCONFIG_MODE=TRUE")
run_cmake(custom_message_2)
run_cmake(custom_message_3)
+
+# check handling of components
+set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DUseComponents_VERSION=1.2.3.4")
+run_cmake(required_components)
+run_cmake(required_and_optional_components)
+run_cmake(all_optional_components)
+list(APPEND RunCMake_TEST_OPTIONS "-DUseComponents_REQUIRE_VARS=TRUE")
+run_cmake(required_components_with_vars)
diff --git a/Tests/RunCMake/FPHSA/all_optional_components.cmake b/Tests/RunCMake/FPHSA/all_optional_components.cmake
new file mode 100644
index 0000000..f4d8b5e
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/all_optional_components.cmake
@@ -0,0 +1,14 @@
+find_package(UseComponents OPTIONAL_COMPONENTS Comp1 Comp2 Comp3)
+
+if (NOT UseComponents_FOUND)
+ message (FATAL_ERROR "package UseComponents Not Found.")
+endif()
+if (NOT UseComponents_Comp1_FOUND)
+ message (FATAL_ERROR "package UseComponents, component Comp1 not found.")
+endif()
+if (NOT UseComponents_Comp2_FOUND)
+ message (FATAL_ERROR "package UseComponents, component Comp2 not found.")
+endif()
+if (UseComponents_Comp3_FOUND)
+ message (FATAL_ERROR "package UseComponents, component Comp2 unexpectedly found.")
+endif()
diff --git a/Tests/RunCMake/FPHSA/required_and_optional_components.cmake b/Tests/RunCMake/FPHSA/required_and_optional_components.cmake
new file mode 100644
index 0000000..836dcac
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/required_and_optional_components.cmake
@@ -0,0 +1,14 @@
+find_package(UseComponents COMPONENTS Comp1 Comp2 OPTIONAL_COMPONENTS Comp3)
+
+if (NOT UseComponents_FOUND)
+ message (FATAL_ERROR "package UseComponents Not Found.")
+endif()
+if (NOT UseComponents_Comp1_FOUND)
+ message (FATAL_ERROR "package UseComponents, component Comp1 not found.")
+endif()
+if (NOT UseComponents_Comp2_FOUND)
+ message (FATAL_ERROR "package UseComponents, component Comp2 not found.")
+endif()
+if (UseComponents_Comp3_FOUND)
+ message (FATAL_ERROR "package UseComponents, component Comp2 unexpectedly found.")
+endif()
diff --git a/Tests/RunCMake/FPHSA/required_components.cmake b/Tests/RunCMake/FPHSA/required_components.cmake
new file mode 100644
index 0000000..0dd8e9c
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/required_components.cmake
@@ -0,0 +1,11 @@
+find_package(UseComponents COMPONENTS Comp1 Comp2)
+
+if (NOT UseComponents_FOUND)
+ message (FATAL_ERROR "package UseComponents Not Found.")
+endif()
+if (NOT UseComponents_Comp1_FOUND)
+ message (FATAL_ERROR "package UseComponents, component Comp1 Not Found.")
+endif()
+if (NOT UseComponents_Comp2_FOUND)
+ message (FATAL_ERROR "package UseComponents, component Comp2 Not Found.")
+endif()
diff --git a/Tests/RunCMake/FPHSA/required_components_with_vars.cmake b/Tests/RunCMake/FPHSA/required_components_with_vars.cmake
new file mode 100644
index 0000000..842ef15
--- /dev/null
+++ b/Tests/RunCMake/FPHSA/required_components_with_vars.cmake
@@ -0,0 +1 @@
+include ("required_components.cmake")
diff --git a/Tests/RunCMake/FetchContent/DownloadFile.cmake b/Tests/RunCMake/FetchContent/DownloadFile.cmake
new file mode 100644
index 0000000..741b6d3
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/DownloadFile.cmake
@@ -0,0 +1,9 @@
+include(FetchContent)
+
+FetchContent_Declare(
+ t1
+ URL ${CMAKE_CURRENT_LIST_DIR}/dummyFile.txt
+ DOWNLOAD_NO_EXTRACT YES
+)
+
+FetchContent_Populate(t1)
diff --git a/Tests/RunCMake/FetchContent/MakeAvailable-stdout.txt b/Tests/RunCMake/FetchContent/MakeAvailable-stdout.txt
index 6e6c730..711de6b 100644
--- a/Tests/RunCMake/FetchContent/MakeAvailable-stdout.txt
+++ b/Tests/RunCMake/FetchContent/MakeAvailable-stdout.txt
@@ -1,2 +1,3 @@
Confirmation project has been added
+.*Confirmation subproject has been added
.*Confirmation script has been called
diff --git a/Tests/RunCMake/FetchContent/MakeAvailable.cmake b/Tests/RunCMake/FetchContent/MakeAvailable.cmake
index a93f1f7..d7fc55c 100644
--- a/Tests/RunCMake/FetchContent/MakeAvailable.cmake
+++ b/Tests/RunCMake/FetchContent/MakeAvailable.cmake
@@ -8,13 +8,22 @@ FetchContent_Declare(
WithoutProject
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/WithoutProject
)
+FetchContent_Declare(
+ ProjectSubdir
+ SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/WithoutProject
+ SOURCE_SUBDIR ProjectSubdir
+)
# Order is important and will be verified by test output
-FetchContent_MakeAvailable(WithProject WithoutProject)
+FetchContent_MakeAvailable(WithProject WithoutProject ProjectSubdir)
get_property(addedWith GLOBAL PROPERTY FetchWithProject SET)
if(NOT addedWith)
- message(SEND_ERROR "Subdir with CMakeLists.txt not added")
+ message(SEND_ERROR "Project with top level CMakeLists.txt not added")
+endif()
+get_property(addedSubdir GLOBAL PROPERTY FetchWithSubProject SET)
+if(NOT addedSubdir)
+ message(SEND_ERROR "Project with CMakeLists.txt in subdir not added")
endif()
include(${withoutproject_SOURCE_DIR}/confirmMessage.cmake)
diff --git a/Tests/RunCMake/FetchContent/PreserveEmptyArgs-stdout.txt b/Tests/RunCMake/FetchContent/PreserveEmptyArgs-stdout.txt
new file mode 100644
index 0000000..a72d914
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/PreserveEmptyArgs-stdout.txt
@@ -0,0 +1,4 @@
+.*-- Number of arguments: 6
+.*-- Argument 3: 'before'
+.*-- Argument 4: ''
+.*-- Argument 5: 'after'
diff --git a/Tests/RunCMake/FetchContent/PreserveEmptyArgs.cmake b/Tests/RunCMake/FetchContent/PreserveEmptyArgs.cmake
new file mode 100644
index 0000000..4f35448
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/PreserveEmptyArgs.cmake
@@ -0,0 +1,13 @@
+include(FetchContent)
+
+# Need to see the download command output
+set(FETCHCONTENT_QUIET OFF)
+
+FetchContent_Declare(
+ t1
+ DOWNLOAD_COMMAND ${CMAKE_COMMAND} -P
+ ${CMAKE_CURRENT_LIST_DIR}/countArgs.cmake
+ before "" after
+)
+
+FetchContent_Populate(t1)
diff --git a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
index e28ae96..f3ed3e2 100644
--- a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
@@ -6,6 +6,7 @@ run_cmake(MissingDetails)
run_cmake(DirectIgnoresDetails)
run_cmake(FirstDetailsWin)
run_cmake(DownloadTwice)
+run_cmake(DownloadFile)
run_cmake(SameGenerator)
run_cmake(VarDefinitions)
run_cmake(GetProperties)
@@ -15,6 +16,10 @@ run_cmake(MakeAvailable)
run_cmake(MakeAvailableTwice)
run_cmake(MakeAvailableUndeclared)
+set(RunCMake_TEST_OUTPUT_MERGE 1)
+run_cmake(PreserveEmptyArgs)
+set(RunCMake_TEST_OUTPUT_MERGE 0)
+
# We need to pass through CMAKE_GENERATOR and CMAKE_MAKE_PROGRAM
# to ensure the test can run on machines where the build tool
# isn't on the PATH. Some build slaves explicitly test with such
diff --git a/Tests/RunCMake/FetchContent/WithoutProject/ProjectSubdir/CMakeLists.txt b/Tests/RunCMake/FetchContent/WithoutProject/ProjectSubdir/CMakeLists.txt
new file mode 100644
index 0000000..216eeb1
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/WithoutProject/ProjectSubdir/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 3.13)
+project(ProjectSubdir LANGUAGES NONE)
+
+set_property(GLOBAL PROPERTY FetchWithSubProject YES)
+message(STATUS "Confirmation subproject has been added")
diff --git a/Tests/RunCMake/FetchContent/countArgs.cmake b/Tests/RunCMake/FetchContent/countArgs.cmake
new file mode 100644
index 0000000..7542af4
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/countArgs.cmake
@@ -0,0 +1,5 @@
+message(STATUS "Number of arguments: ${CMAKE_ARGC}")
+math(EXPR last "${CMAKE_ARGC} - 1")
+foreach(n RANGE 3 ${last})
+ message(STATUS "Argument ${n}: '${CMAKE_ARGV${n}}'")
+endforeach()
diff --git a/Tests/RunCMake/FetchContent/dummyFile.txt b/Tests/RunCMake/FetchContent/dummyFile.txt
new file mode 100644
index 0000000..0a12ce1
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/dummyFile.txt
@@ -0,0 +1 @@
+# This file is used to verify fetching a single file directly
diff --git a/Tests/RunCMake/FileAPI/RunCMakeTest.cmake b/Tests/RunCMake/FileAPI/RunCMakeTest.cmake
index 8cdc00c..4449ff1 100644
--- a/Tests/RunCMake/FileAPI/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FileAPI/RunCMakeTest.cmake
@@ -23,7 +23,7 @@ function(check_python case)
endif()
file(GLOB index ${RunCMake_TEST_BINARY_DIR}/.cmake/api/v1/reply/index-*.json)
execute_process(
- COMMAND ${PYTHON_EXECUTABLE} "${RunCMake_SOURCE_DIR}/${case}-check.py" "${index}"
+ COMMAND ${PYTHON_EXECUTABLE} "${RunCMake_SOURCE_DIR}/${case}-check.py" "${index}" "${CMAKE_CXX_COMPILER_ID}"
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_VARIABLE output
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
index de6253f..a3dd9ff 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
@@ -1,12 +1,18 @@
from check_index import *
+import json
import sys
import os
+def read_codemodel_json_data(filename):
+ abs_filename = os.path.join(os.path.dirname(os.path.realpath(__file__)), "codemodel-v2-data", filename)
+ with open(abs_filename, "r") as f:
+ return json.load(f)
+
def check_objects(o, g):
assert is_list(o)
assert len(o) == 1
- check_index_object(o[0], "codemodel", 2, 0, check_object_codemodel(g))
+ check_index_object(o[0], "codemodel", 2, 1, check_object_codemodel(g))
def check_backtrace(t, b, backtrace):
btg = t["backtraceGraph"]
@@ -398,6 +404,23 @@ def check_target(c):
missing_exception=lambda e: "Include path: %s" % e["path"],
extra_exception=lambda a: "Include path: %s" % a["path"])
+ if "precompileHeaders" in expected:
+ expected_keys.append("precompileHeaders")
+
+ def check_precompile_header(actual, expected):
+ assert is_dict(actual)
+ expected_keys = ["backtrace", "header"]
+ check_backtrace(obj, actual["backtrace"], expected["backtrace"])
+
+ assert sorted(actual.keys()) == sorted(expected_keys)
+
+ check_list_match(lambda a, e: matches(a["header"], e["header"]),
+ actual["precompileHeaders"], expected["precompileHeaders"],
+ check=check_precompile_header,
+ check_exception=lambda a, e: "Precompile header: %s" % a["header"],
+ missing_exception=lambda e: "Precompile header: %s" % e["header"],
+ extra_exception=lambda a: "Precompile header: %s" % a["header"])
+
if expected["defines"] is not None:
expected_keys.append("defines")
@@ -471,154 +494,15 @@ def check_project(c):
def gen_check_directories(c, g):
expected = [
- {
- "source": "^\\.$",
- "build": "^\\.$",
- "parentSource": None,
- "childSources": [
- "^alias$",
- "^custom$",
- "^cxx$",
- "^imported$",
- "^object$",
- "^.*/Tests/RunCMake/FileAPIExternalSource$",
- "^dir$",
- ],
- "targetIds": [
- "^ALL_BUILD::@6890427a1f51a3e7e1df$",
- "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
- "^c_exe::@6890427a1f51a3e7e1df$",
- "^c_lib::@6890427a1f51a3e7e1df$",
- "^c_shared_exe::@6890427a1f51a3e7e1df$",
- "^c_shared_lib::@6890427a1f51a3e7e1df$",
- "^c_static_exe::@6890427a1f51a3e7e1df$",
- "^c_static_lib::@6890427a1f51a3e7e1df$",
- "^interface_exe::@6890427a1f51a3e7e1df$",
- ],
- "projectName": "codemodel-v2",
- "minimumCMakeVersion": "3.12",
- "hasInstallRule": True,
- },
- {
- "source": "^alias$",
- "build": "^alias$",
- "parentSource": "^\\.$",
- "childSources": None,
- "targetIds": [
- "^ALL_BUILD::@53632cba2752272bb008$",
- "^ZERO_CHECK::@53632cba2752272bb008$",
- "^c_alias_exe::@53632cba2752272bb008$",
- "^cxx_alias_exe::@53632cba2752272bb008$",
- ],
- "projectName": "Alias",
- "minimumCMakeVersion": "3.12",
- "hasInstallRule": None,
- },
- {
- "source": "^custom$",
- "build": "^custom$",
- "parentSource": "^\\.$",
- "childSources": None,
- "targetIds": [
- "^ALL_BUILD::@c11385ffed57b860da63$",
- "^ZERO_CHECK::@c11385ffed57b860da63$",
- "^custom_exe::@c11385ffed57b860da63$",
- "^custom_tgt::@c11385ffed57b860da63$",
- ],
- "projectName": "Custom",
- "minimumCMakeVersion": "3.12",
- "hasInstallRule": None,
- },
- {
- "source": "^cxx$",
- "build": "^cxx$",
- "parentSource": "^\\.$",
- "childSources": None,
- "targetIds": [
- "^ALL_BUILD::@a56b12a3f5c0529fb296$",
- "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
- "^cxx_exe::@a56b12a3f5c0529fb296$",
- "^cxx_lib::@a56b12a3f5c0529fb296$",
- "^cxx_shared_exe::@a56b12a3f5c0529fb296$",
- "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
- "^cxx_static_exe::@a56b12a3f5c0529fb296$",
- "^cxx_static_lib::@a56b12a3f5c0529fb296$",
- ],
- "projectName": "Cxx",
- "minimumCMakeVersion": "3.12",
- "hasInstallRule": None,
- },
- {
- "source": "^imported$",
- "build": "^imported$",
- "parentSource": "^\\.$",
- "childSources": None,
- "targetIds": [
- "^ALL_BUILD::@ba7eb709d0b48779c6c8$",
- "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
- "^link_imported_exe::@ba7eb709d0b48779c6c8$",
- "^link_imported_interface_exe::@ba7eb709d0b48779c6c8$",
- "^link_imported_object_exe::@ba7eb709d0b48779c6c8$",
- "^link_imported_shared_exe::@ba7eb709d0b48779c6c8$",
- "^link_imported_static_exe::@ba7eb709d0b48779c6c8$",
- ],
- "projectName": "Imported",
- "minimumCMakeVersion": "3.12",
- "hasInstallRule": None,
- },
- {
- "source": "^object$",
- "build": "^object$",
- "parentSource": "^\\.$",
- "childSources": None,
- "targetIds": [
- "^ALL_BUILD::@5ed5358f70faf8d8af7a$",
- "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
- "^c_object_exe::@5ed5358f70faf8d8af7a$",
- "^c_object_lib::@5ed5358f70faf8d8af7a$",
- "^cxx_object_exe::@5ed5358f70faf8d8af7a$",
- "^cxx_object_lib::@5ed5358f70faf8d8af7a$",
- ],
- "projectName": "Object",
- "minimumCMakeVersion": "3.13",
- "hasInstallRule": True,
- },
- {
- "source": "^dir$",
- "build": "^dir$",
- "parentSource": "^\\.$",
- "childSources": [
- "^dir/dir$",
- ],
- "targetIds": None,
- "projectName": "codemodel-v2",
- "minimumCMakeVersion": "3.12",
- "hasInstallRule": None,
- },
- {
- "source": "^dir/dir$",
- "build": "^dir/dir$",
- "parentSource": "^dir$",
- "childSources": None,
- "targetIds": None,
- "projectName": "codemodel-v2",
- "minimumCMakeVersion": "3.12",
- "hasInstallRule": None,
- },
- {
- "source": "^.*/Tests/RunCMake/FileAPIExternalSource$",
- "build": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild$",
- "parentSource": "^\\.$",
- "childSources": None,
- "targetIds": [
- "^ALL_BUILD::@[0-9a-f]+$",
- "^ZERO_CHECK::@[0-9a-f]+$",
- "^generated_exe::@[0-9a-f]+$",
- ],
- "projectName": "External",
- "minimumCMakeVersion": "3.12",
- "hasInstallRule": None,
- },
+ read_codemodel_json_data("directories/top.json"),
+ read_codemodel_json_data("directories/alias.json"),
+ 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/object.json"),
+ read_codemodel_json_data("directories/dir.json"),
+ read_codemodel_json_data("directories/dir_dir.json"),
+ read_codemodel_json_data("directories/external.json"),
]
if matches(g["name"], "^Visual Studio "):
@@ -646,4430 +530,68 @@ def check_directories(c, g):
def gen_check_targets(c, g, inSource):
expected = [
- {
- "name": "ALL_BUILD",
- "id": "^ALL_BUILD::@6890427a1f51a3e7e1df$",
- "directorySource": "^\\.$",
- "projectName": "codemodel-v2",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ALL_BUILD$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ALL_BUILD\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ALL_BUILD$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ALL_BUILD\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^\\.$",
- "source": "^\\.$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- {
- "id": "^interface_exe::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- {
- "id": "^c_lib::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- {
- "id": "^c_exe::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- {
- "id": "^c_shared_lib::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- {
- "id": "^c_shared_exe::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- {
- "id": "^c_static_lib::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- {
- "id": "^c_static_exe::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- {
- "id": "^c_alias_exe::@53632cba2752272bb008$",
- "backtrace": None,
- },
- {
- "id": "^cxx_alias_exe::@53632cba2752272bb008$",
- "backtrace": None,
- },
- {
- "id": "^cxx_lib::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- {
- "id": "^cxx_exe::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- {
- "id": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- {
- "id": "^cxx_shared_exe::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- {
- "id": "^cxx_static_lib::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- {
- "id": "^cxx_static_exe::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- {
- "id": "^c_object_lib::@5ed5358f70faf8d8af7a$",
- "backtrace": None,
- },
- {
- "id": "^c_object_exe::@5ed5358f70faf8d8af7a$",
- "backtrace": None,
- },
- {
- "id": "^cxx_object_lib::@5ed5358f70faf8d8af7a$",
- "backtrace": None,
- },
- {
- "id": "^cxx_object_exe::@5ed5358f70faf8d8af7a$",
- "backtrace": None,
- },
- {
- "id": "^link_imported_exe::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- {
- "id": "^link_imported_shared_exe::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- {
- "id": "^link_imported_static_exe::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- {
- "id": "^link_imported_object_exe::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- {
- "id": "^link_imported_interface_exe::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- {
- "id": "^custom_exe::@c11385ffed57b860da63$",
- "backtrace": None,
- },
- {
- "id": "^generated_exe::@[0-9a-f]+$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "ZERO_CHECK",
- "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
- "directorySource": "^\\.$",
- "projectName": "codemodel-v2",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ZERO_CHECK$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ZERO_CHECK\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ZERO_CHECK$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ZERO_CHECK\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^\\.$",
- "source": "^\\.$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": None,
- },
- {
- "name": "interface_exe",
- "id": "^interface_exe::@6890427a1f51a3e7e1df$",
- "directorySource": "^\\.$",
- "projectName": "codemodel-v2",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^include_test\\.cmake$",
- "line": 3,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^include_test\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": [
- {
- "define": "interface_exe_EXPORTS",
- "backtrace": None,
- },
- ],
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^include_test\\.cmake$",
- "line": 3,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^include_test\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^my_interface_exe\\.myexe$",
- "artifacts": [
- {
- "path": "^bin/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?my_interface_exe\\.myexe$",
- "_dllExtra": False,
- },
- {
- "path": "^lib/my_interface_exe\\.imp$",
- "_aixExtra": True,
- "_dllExtra": False,
- },
- {
- "path": "^lib/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?my_interface_exe\\.(dll\\.a|lib)$",
- "_dllExtra": True,
- },
- {
- "path": "^bin/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?my_interface_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^\\.$",
- "source": "^\\.$",
- "install": None,
- "link": {
- "language": "C",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "c_lib",
- "id": "^c_lib::@6890427a1f51a3e7e1df$",
- "directorySource": "^\\.$",
- "projectName": "codemodel-v2",
- "type": "STATIC_LIBRARY",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 5,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 5,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^(lib)?c_lib\\.(a|lib)$",
- "artifacts": [
- {
- "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_lib\\.(a|lib)$",
- "_dllExtra": False,
- },
- ],
- "build": "^\\.$",
- "source": "^\\.$",
- "install": None,
- "link": None,
- "archive": {
- "lto": None,
- },
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "c_exe",
- "id": "^c_exe::@6890427a1f51a3e7e1df$",
- "directorySource": "^\\.$",
- "projectName": "codemodel-v2",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 6,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 6,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^c_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^\\.$",
- "source": "^\\.$",
- "install": None,
- "link": {
- "language": "C",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^c_lib::@6890427a1f51a3e7e1df$",
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 7,
- "command": "target_link_libraries",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "c_shared_lib",
- "id": "^c_shared_lib::@6890427a1f51a3e7e1df$",
- "directorySource": "^\\.$",
- "projectName": "codemodel-v2",
- "type": "SHARED_LIBRARY",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 9,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": [
- {
- "define": "c_shared_lib_EXPORTS",
- "backtrace": None,
- },
- ],
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 9,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^(lib|cyg)?c_shared_lib\\.(so|dylib|dll)$",
- "artifacts": [
- {
- "path": "^lib/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg)?c_shared_lib\\.(so|dylib|dll)$",
- "_dllExtra": False,
- },
- {
- "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_shared_lib\\.(dll\\.a|lib)$",
- "_dllExtra": True,
- },
- {
- "path": "^lib/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg)?c_shared_lib\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^\\.$",
- "source": "^\\.$",
- "install": None,
- "link": {
- "language": "C",
- "lto": True,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "c_shared_exe",
- "id": "^c_shared_exe::@6890427a1f51a3e7e1df$",
- "directorySource": "^\\.$",
- "projectName": "codemodel-v2",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 10,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 10,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^c_shared_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_shared_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_shared_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^\\.$",
- "source": "^\\.$",
- "install": None,
- "link": {
- "language": "C",
- "lto": True,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^c_shared_lib::@6890427a1f51a3e7e1df$",
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 11,
- "command": "target_link_libraries",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "c_static_lib",
- "id": "^c_static_lib::@6890427a1f51a3e7e1df$",
- "directorySource": "^\\.$",
- "projectName": "codemodel-v2",
- "type": "STATIC_LIBRARY",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 13,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 13,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^(lib)?c_static_lib\\.(a|lib)$",
- "artifacts": [
- {
- "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_static_lib\\.(a|lib)$",
- "_dllExtra": False,
- },
- ],
- "build": "^\\.$",
- "source": "^\\.$",
- "install": None,
- "link": None,
- "archive": {
- "lto": True,
- },
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "c_static_exe",
- "id": "^c_static_exe::@6890427a1f51a3e7e1df$",
- "directorySource": "^\\.$",
- "projectName": "codemodel-v2",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 14,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 14,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^c_static_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_static_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_static_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^\\.$",
- "source": "^\\.$",
- "install": None,
- "link": {
- "language": "C",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^c_static_lib::@6890427a1f51a3e7e1df$",
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 15,
- "command": "target_link_libraries",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "ALL_BUILD",
- "id": "^ALL_BUILD::@a56b12a3f5c0529fb296$",
- "directorySource": "^cxx$",
- "projectName": "Cxx",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ALL_BUILD$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ALL_BUILD\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ALL_BUILD$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ALL_BUILD\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^cxx$",
- "source": "^cxx$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- {
- "id": "^cxx_lib::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- {
- "id": "^cxx_exe::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- {
- "id": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- {
- "id": "^cxx_shared_exe::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- {
- "id": "^cxx_static_lib::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- {
- "id": "^cxx_static_exe::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "ZERO_CHECK",
- "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
- "directorySource": "^cxx$",
- "projectName": "Cxx",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ZERO_CHECK$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ZERO_CHECK\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ZERO_CHECK$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ZERO_CHECK\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^cxx$",
- "source": "^cxx$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": None,
- },
- {
- "name": "cxx_lib",
- "id": "^cxx_lib::@a56b12a3f5c0529fb296$",
- "directorySource": "^cxx$",
- "projectName": "Cxx",
- "type": "STATIC_LIBRARY",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.cxx$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "CXX",
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 4,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "CXX",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 4,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^(lib)?cxx_lib\\.(a|lib)$",
- "artifacts": [
- {
- "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?cxx_lib\\.(a|lib)$",
- "_dllExtra": False,
- },
- ],
- "build": "^cxx$",
- "source": "^cxx$",
- "install": None,
- "link": None,
- "archive": {
- "lto": None,
- },
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "cxx_exe",
- "id": "^cxx_exe::@a56b12a3f5c0529fb296$",
- "directorySource": "^cxx$",
- "projectName": "Cxx",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.cxx$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "CXX",
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 5,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "CXX",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": [
- {
- "fragment" : "TargetCompileOptions",
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 17,
- "command": "target_compile_options",
- "hasParent": True,
- },
- {
- "file" : "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- }
- ],
- },
- ],
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 5,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": "bin",
- "nameOnDisk": "^cxx_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^cxx$",
- "source": "^cxx$",
- "install": {
- "prefix": "^(/usr/local|[A-Za-z]:.*/codemodel-v2)$",
- "destinations": [
- {
- "path": "bin",
- "backtrace": [
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": 37,
- "command": "install",
- "hasParent": True,
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": None,
- "command": None,
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": True,
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- },
- "link": {
- "language": "CXX",
- "lto": None,
- "commandFragments": [
- {
- "fragment" : "TargetLinkOptions",
- "role" : "flags",
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 18,
- "command": "target_link_options",
- "hasParent": True,
- },
- {
- "file" : "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "fragment" : ".*TargetLinkDir\\\"?$",
- "role" : "libraryPath",
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 19,
- "command": "target_link_directories",
- "hasParent": True,
- },
- {
- "file" : "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "fragment" : ".*cxx_lib.*",
- "role" : "libraries",
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 6,
- "command": "target_link_libraries",
- "hasParent": True,
- },
- {
- "file" : "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^cxx_lib::@a56b12a3f5c0529fb296$",
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 6,
- "command": "target_link_libraries",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "cxx_shared_lib",
- "id": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
- "directorySource": "^cxx$",
- "projectName": "Cxx",
- "type": "SHARED_LIBRARY",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.cxx$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "CXX",
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 9,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "CXX",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- "includes": None,
- "defines": [
- {
- "define": "cxx_shared_lib_EXPORTS",
- "backtrace": None,
- },
- ],
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 9,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^(lib|cyg)?cxx_shared_lib\\.(so|dylib|dll)$",
- "artifacts": [
- {
- "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg)?cxx_shared_lib\\.(so|dylib|dll)$",
- "_dllExtra": False,
- },
- {
- "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?cxx_shared_lib\\.(dll\\.a|lib)$",
- "_dllExtra": True,
- },
- {
- "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg)?cxx_shared_lib\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^cxx$",
- "source": "^cxx$",
- "install": None,
- "link": {
- "language": "CXX",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "cxx_shared_exe",
- "id": "^cxx_shared_exe::@a56b12a3f5c0529fb296$",
- "directorySource": "^cxx$",
- "projectName": "Cxx",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.cxx$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "CXX",
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 10,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "CXX",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 10,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^cxx_shared_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_shared_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_shared_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^cxx$",
- "source": "^cxx$",
- "install": None,
- "link": {
- "language": "CXX",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 11,
- "command": "target_link_libraries",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "cxx_static_lib",
- "id": "^cxx_static_lib::@a56b12a3f5c0529fb296$",
- "directorySource": "^cxx$",
- "projectName": "Cxx",
- "type": "STATIC_LIBRARY",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.cxx$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "CXX",
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 13,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "CXX",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 13,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^(lib)?cxx_static_lib\\.(a|lib)$",
- "artifacts": [
- {
- "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?cxx_static_lib\\.(a|lib)$",
- "_dllExtra": False,
- },
- ],
- "build": "^cxx$",
- "source": "^cxx$",
- "install": None,
- "link": None,
- "archive": {
- "lto": None,
- },
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "cxx_static_exe",
- "id": "^cxx_static_exe::@a56b12a3f5c0529fb296$",
- "directorySource": "^cxx$",
- "projectName": "Cxx",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.cxx$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "CXX",
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 14,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "CXX",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 14,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^cxx_static_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_static_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_static_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^cxx$",
- "source": "^cxx$",
- "install": None,
- "link": {
- "language": "CXX",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^cxx_static_lib::@a56b12a3f5c0529fb296$",
- "backtrace": [
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": 15,
- "command": "target_link_libraries",
- "hasParent": True,
- },
- {
- "file": "^cxx/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "ALL_BUILD",
- "id": "^ALL_BUILD::@53632cba2752272bb008$",
- "directorySource": "^alias$",
- "projectName": "Alias",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ALL_BUILD$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ALL_BUILD\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ALL_BUILD$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ALL_BUILD\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^alias$",
- "source": "^alias$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@53632cba2752272bb008$",
- "backtrace": None,
- },
- {
- "id": "^c_alias_exe::@53632cba2752272bb008$",
- "backtrace": None,
- },
- {
- "id": "^cxx_alias_exe::@53632cba2752272bb008$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "ZERO_CHECK",
- "id": "^ZERO_CHECK::@53632cba2752272bb008$",
- "directorySource": "^alias$",
- "projectName": "Alias",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ZERO_CHECK$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ZERO_CHECK\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ZERO_CHECK$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ZERO_CHECK\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^alias$",
- "source": "^alias$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": None,
- },
- {
- "name": "c_alias_exe",
- "id": "^c_alias_exe::@53632cba2752272bb008$",
- "directorySource": "^alias$",
- "projectName": "Alias",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": 5,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": 5,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^c_alias_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^alias/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_alias_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^alias/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_alias_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^alias$",
- "source": "^alias$",
- "install": None,
- "link": {
- "language": "C",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^c_lib::@6890427a1f51a3e7e1df$",
- "backtrace": [
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": 6,
- "command": "target_link_libraries",
- "hasParent": True,
- },
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "id": "^ZERO_CHECK::@53632cba2752272bb008$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "cxx_alias_exe",
- "id": "^cxx_alias_exe::@53632cba2752272bb008$",
- "directorySource": "^alias$",
- "projectName": "Alias",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.cxx$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "CXX",
- "backtrace": [
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": 9,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "CXX",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": 9,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^cxx_alias_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^alias/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_alias_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^alias/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_alias_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^alias$",
- "source": "^alias$",
- "install": None,
- "link": {
- "language": "CXX",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^cxx_lib::@a56b12a3f5c0529fb296$",
- "backtrace": [
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": 10,
- "command": "target_link_libraries",
- "hasParent": True,
- },
- {
- "file": "^alias/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "id": "^ZERO_CHECK::@53632cba2752272bb008$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "ALL_BUILD",
- "id": "^ALL_BUILD::@5ed5358f70faf8d8af7a$",
- "directorySource": "^object$",
- "projectName": "Object",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ALL_BUILD$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ALL_BUILD\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ALL_BUILD$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ALL_BUILD\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^object$",
- "source": "^object$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
- "backtrace": None,
- },
- {
- "id": "^c_object_lib::@5ed5358f70faf8d8af7a$",
- "backtrace": None,
- },
- {
- "id": "^c_object_exe::@5ed5358f70faf8d8af7a$",
- "backtrace": None,
- },
- {
- "id": "^cxx_object_lib::@5ed5358f70faf8d8af7a$",
- "backtrace": None,
- },
- {
- "id": "^cxx_object_exe::@5ed5358f70faf8d8af7a$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "ZERO_CHECK",
- "id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
- "directorySource": "^object$",
- "projectName": "Object",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ZERO_CHECK$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ZERO_CHECK\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ZERO_CHECK$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ZERO_CHECK\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^object$",
- "source": "^object$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": None,
- },
- {
- "name": "c_object_lib",
- "id": "^c_object_lib::@5ed5358f70faf8d8af7a$",
- "directorySource": "^object$",
- "projectName": "Object",
- "type": "OBJECT_LIBRARY",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": 5,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": 5,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": [
- {
- "path": "^object/.*/empty(\\.c)?\\.o(bj)?$",
- "_dllExtra": False,
- },
- ],
- "build": "^object$",
- "source": "^object$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "c_object_exe",
- "id": "^c_object_exe::@5ed5358f70faf8d8af7a$",
- "directorySource": "^object$",
- "projectName": "Object",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": 6,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/.*/empty(\\.c)?\\.o(bj)?$",
- "isGenerated": True,
- "sourceGroupName": "Object Libraries",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": 7,
- "command": "target_link_libraries",
- "hasParent": True,
- },
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- {
- "name": "Object Libraries",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/.*/empty(\\.c)?\\.o(bj)?$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": 6,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^c_object_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^object/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_object_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^object/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_object_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^object$",
- "source": "^object$",
- "install": {
- "prefix": "^(/usr/local|[A-Za-z]:.*/codemodel-v2)$",
- "destinations": [
- {
- "path": "bin",
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": 13,
- "command": "install",
- "hasParent": True,
- },
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- },
- "link": {
- "language": "C",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^c_object_lib::@5ed5358f70faf8d8af7a$",
- # FIXME: Add a backtrace here when it becomes available.
- # You'll know when it's available, because this test will
- # fail.
- "backtrace": None,
- },
- {
- "id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "cxx_object_lib",
- "id": "^cxx_object_lib::@5ed5358f70faf8d8af7a$",
- "directorySource": "^object$",
- "projectName": "Object",
- "type": "OBJECT_LIBRARY",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.cxx$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "CXX",
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": 9,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "CXX",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": 9,
- "command": "add_library",
- "hasParent": True,
- },
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": [
- {
- "path": "^object/.*/empty(\\.cxx)?\\.o(bj)?$",
- "_dllExtra": False,
- },
- ],
- "build": "^object$",
- "source": "^object$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "cxx_object_exe",
- "id": "^cxx_object_exe::@5ed5358f70faf8d8af7a$",
- "directorySource": "^object$",
- "projectName": "Object",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.cxx$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "CXX",
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": 10,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/.*/empty(\\.cxx)?\\.o(bj)?$",
- "isGenerated": True,
- "sourceGroupName": "Object Libraries",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": 11,
- "command": "target_link_libraries",
- "hasParent": True,
- },
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- },
- {
- "name": "Object Libraries",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/.*/empty(\\.cxx)?\\.o(bj)?$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "CXX",
- "sourcePaths": [
- "^empty\\.cxx$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": 10,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^cxx_object_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^object/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_object_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^object/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_object_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^object$",
- "source": "^object$",
- "install": {
- "prefix": "^(/usr/local|[A-Za-z]:.*/codemodel-v2)$",
- "destinations": [
- {
- "path": "bin",
- "backtrace": [
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": 13,
- "command": "install",
- "hasParent": True,
- },
- {
- "file": "^object/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- },
- "link": {
- "language": "CXX",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^cxx_object_lib::@5ed5358f70faf8d8af7a$",
- # FIXME: Add a backtrace here when it becomes available.
- # You'll know when it's available, because this test will
- # fail.
- "backtrace": None,
- },
- {
- "id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "ALL_BUILD",
- "id": "^ALL_BUILD::@ba7eb709d0b48779c6c8$",
- "directorySource": "^imported$",
- "projectName": "Imported",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ALL_BUILD$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ALL_BUILD\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ALL_BUILD$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ALL_BUILD\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^imported$",
- "source": "^imported$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- {
- "id": "^link_imported_exe::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- {
- "id": "^link_imported_shared_exe::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- {
- "id": "^link_imported_static_exe::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- {
- "id": "^link_imported_object_exe::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- {
- "id": "^link_imported_interface_exe::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "ZERO_CHECK",
- "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
- "directorySource": "^imported$",
- "projectName": "Imported",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ZERO_CHECK$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ZERO_CHECK\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ZERO_CHECK$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ZERO_CHECK\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^imported$",
- "source": "^imported$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": None,
- },
- {
- "name": "link_imported_exe",
- "id": "^link_imported_exe::@ba7eb709d0b48779c6c8$",
- "directorySource": "^imported$",
- "projectName": "Imported",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": 5,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": 5,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^link_imported_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^imported$",
- "source": "^imported$",
- "install": None,
- "link": {
- "language": "C",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "link_imported_shared_exe",
- "id": "^link_imported_shared_exe::@ba7eb709d0b48779c6c8$",
- "directorySource": "^imported$",
- "projectName": "Imported",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": 9,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": 9,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^link_imported_shared_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_shared_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_shared_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^imported$",
- "source": "^imported$",
- "install": None,
- "link": {
- "language": "C",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "link_imported_static_exe",
- "id": "^link_imported_static_exe::@ba7eb709d0b48779c6c8$",
- "directorySource": "^imported$",
- "projectName": "Imported",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": 13,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": 13,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^link_imported_static_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_static_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_static_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^imported$",
- "source": "^imported$",
- "install": None,
- "link": {
- "language": "C",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "link_imported_object_exe",
- "id": "^link_imported_object_exe::@ba7eb709d0b48779c6c8$",
- "directorySource": "^imported$",
- "projectName": "Imported",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": 18,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": 18,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^link_imported_object_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_object_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_object_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^imported$",
- "source": "^imported$",
- "install": None,
- "link": {
- "language": "C",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "link_imported_interface_exe",
- "id": "^link_imported_interface_exe::@ba7eb709d0b48779c6c8$",
- "directorySource": "^imported$",
- "projectName": "Imported",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": 23,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": 23,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^imported/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^link_imported_interface_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_interface_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_interface_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^imported$",
- "source": "^imported$",
- "install": None,
- "link": {
- "language": "C",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "ALL_BUILD",
- "id": "^ALL_BUILD::@c11385ffed57b860da63$",
- "directorySource": "^custom$",
- "projectName": "Custom",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ALL_BUILD$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ALL_BUILD\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ALL_BUILD$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ALL_BUILD\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^custom$",
- "source": "^custom$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@c11385ffed57b860da63$",
- "backtrace": None,
- },
- {
- "id": "^custom_exe::@c11385ffed57b860da63$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "ZERO_CHECK",
- "id": "^ZERO_CHECK::@c11385ffed57b860da63$",
- "directorySource": "^custom$",
- "projectName": "Custom",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ZERO_CHECK$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ZERO_CHECK\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ZERO_CHECK$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ZERO_CHECK\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^custom$",
- "source": "^custom$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": None,
- },
- {
- "name": "custom_tgt",
- "id": "^custom_tgt::@c11385ffed57b860da63$",
- "directorySource": "^custom$",
- "projectName": "Custom",
- "type": "UTILITY",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/custom_tgt$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": 3,
- "command": "add_custom_target",
- "hasParent": True,
- },
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/(custom/)?CMakeFiles/([0-9a-f]+/)?custom_tgt\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/custom_tgt$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/(custom/)?CMakeFiles/([0-9a-f]+/)?custom_tgt\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": 3,
- "command": "add_custom_target",
- "hasParent": True,
- },
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^custom$",
- "source": "^custom$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@c11385ffed57b860da63$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "custom_exe",
- "id": "^custom_exe::@c11385ffed57b860da63$",
- "directorySource": "^custom$",
- "projectName": "Custom",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": 4,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^empty\\.c$",
- ],
- "includes": None,
- "defines": None,
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": 4,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^custom_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^custom/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?custom_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^custom/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?custom_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^custom$",
- "source": "^custom$",
- "install": None,
- "link": {
- "language": "C",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^custom_tgt::@c11385ffed57b860da63$",
- "backtrace": [
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": 5,
- "command": "add_dependencies",
- "hasParent": True,
- },
- {
- "file": "^custom/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "id": "^ZERO_CHECK::@c11385ffed57b860da63$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "ALL_BUILD",
- "id": "^ALL_BUILD::@[0-9a-f]+$",
- "directorySource": "^.*/Tests/RunCMake/FileAPIExternalSource$",
- "projectName": "External",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ALL_BUILD$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ALL_BUILD\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ALL_BUILD$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ALL_BUILD\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild$",
- "source": "^.*/Tests/RunCMake/FileAPIExternalSource$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@[0-9a-f]+$",
- "backtrace": None,
- },
- {
- "id": "^generated_exe::@[0-9a-f]+$",
- "backtrace": None,
- },
- ],
- },
- {
- "name": "ZERO_CHECK",
- "id": "^ZERO_CHECK::@[0-9a-f]+$",
- "directorySource": "^.*/Tests/RunCMake/FileAPIExternalSource$",
- "projectName": "External",
- "type": "UTILITY",
- "isGeneratorProvided": True,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ZERO_CHECK$",
- "isGenerated": True,
- "sourceGroupName": "",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ZERO_CHECK\\.rule$",
- "isGenerated": True,
- "sourceGroupName": "CMake Rules",
- "compileGroupLanguage": None,
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ZERO_CHECK$",
- ],
- },
- {
- "name": "CMake Rules",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ZERO_CHECK\\.rule$",
- ],
- },
- ],
- "compileGroups": None,
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": None,
- "artifacts": None,
- "build": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild$",
- "source": "^.*/Tests/RunCMake/FileAPIExternalSource$",
- "install": None,
- "link": None,
- "archive": None,
- "dependencies": None,
- },
- {
- "name": "generated_exe",
- "id": "^generated_exe::@[0-9a-f]+$",
- "directorySource": "^.*/Tests/RunCMake/FileAPIExternalSource$",
- "projectName": "External",
- "type": "EXECUTABLE",
- "isGeneratorProvided": None,
- "sources": [
- {
- "path": "^.*/Tests/RunCMake/FileAPIExternalSource/empty\\.c$",
- "isGenerated": None,
- "sourceGroupName": "Source Files",
- "compileGroupLanguage": "C",
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": 5,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/generated\\.cxx$",
- "isGenerated": True,
- "sourceGroupName": "Generated Source Files",
- "compileGroupLanguage": "CXX",
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": 6,
- "command": "target_sources",
- "hasParent": True,
- },
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "sourceGroups": [
- {
- "name": "Source Files",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPIExternalSource/empty\\.c$",
- ],
- },
- {
- "name": "Generated Source Files",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/generated\\.cxx$",
- ],
- },
- ],
- "compileGroups": [
- {
- "language": "C",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPIExternalSource/empty\\.c$",
- ],
- "includes": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild$",
- "isSystem": None,
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": 10,
- "command": "set_property",
- "hasParent": True,
- },
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPIExternalSource$",
- "isSystem": True,
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": 11,
- "command": "target_include_directories",
- "hasParent": True,
- },
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "defines": [
- {
- "define": "EMPTY_C=1",
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": 9,
- "command": "set_property",
- "hasParent": True,
- },
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "define": "SRC_DUMMY",
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": 9,
- "command": "set_property",
- "hasParent": True,
- },
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "define": "GENERATED_EXE=1",
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": 12,
- "command": "target_compile_definitions",
- "hasParent": True,
- },
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "define": "TGT_DUMMY",
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": 12,
- "command": "target_compile_definitions",
- "hasParent": True,
- },
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "compileCommandFragments": [
- {
- "fragment" : "SRC_COMPILE_OPTIONS_DUMMY",
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": 13,
- "command": "set_source_files_properties",
- "hasParent": True,
- },
- {
- "file" : "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- }
- ],
- },
- {
- "language": "CXX",
- "sourcePaths": [
- "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/generated\\.cxx$",
- ],
- "includes": [
- {
- "path": "^.*/Tests/RunCMake/FileAPIExternalSource$",
- "isSystem": True,
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": 11,
- "command": "target_include_directories",
- "hasParent": True,
- },
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "defines": [
- {
- "define": "GENERATED_EXE=1",
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": 12,
- "command": "target_compile_definitions",
- "hasParent": True,
- },
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- {
- "define": "TGT_DUMMY",
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": 12,
- "command": "target_compile_definitions",
- "hasParent": True,
- },
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- },
- ],
- "compileCommandFragments": None,
- },
- ],
- "backtrace": [
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": 5,
- "command": "add_executable",
- "hasParent": True,
- },
- {
- "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
- "line": None,
- "command": None,
- "hasParent": False,
- },
- ],
- "folder": None,
- "nameOnDisk": "^generated_exe(\\.exe)?$",
- "artifacts": [
- {
- "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?generated_exe(\\.exe)?$",
- "_dllExtra": False,
- },
- {
- "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?generated_exe\\.pdb$",
- "_dllExtra": True,
- },
- ],
- "build": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild$",
- "source": "^.*/Tests/RunCMake/FileAPIExternalSource$",
- "install": None,
- "link": {
- "language": "CXX",
- "lto": None,
- "commandFragments": None,
- },
- "archive": None,
- "dependencies": [
- {
- "id": "^ZERO_CHECK::@[0-9a-f]+$",
- "backtrace": None,
- },
- ],
- },
+ read_codemodel_json_data("targets/all_build_top.json"),
+ read_codemodel_json_data("targets/zero_check_top.json"),
+ read_codemodel_json_data("targets/interface_exe.json"),
+ read_codemodel_json_data("targets/c_lib.json"),
+ read_codemodel_json_data("targets/c_exe.json"),
+ read_codemodel_json_data("targets/c_shared_lib.json"),
+ read_codemodel_json_data("targets/c_shared_exe.json"),
+ read_codemodel_json_data("targets/c_static_lib.json"),
+ read_codemodel_json_data("targets/c_static_exe.json"),
+
+ read_codemodel_json_data("targets/all_build_cxx.json"),
+ 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_shared_lib.json"),
+ read_codemodel_json_data("targets/cxx_shared_exe.json"),
+ read_codemodel_json_data("targets/cxx_static_lib.json"),
+ read_codemodel_json_data("targets/cxx_static_exe.json"),
+
+ read_codemodel_json_data("targets/all_build_alias.json"),
+ read_codemodel_json_data("targets/zero_check_alias.json"),
+ read_codemodel_json_data("targets/c_alias_exe.json"),
+ read_codemodel_json_data("targets/cxx_alias_exe.json"),
+
+ read_codemodel_json_data("targets/all_build_object.json"),
+ read_codemodel_json_data("targets/zero_check_object.json"),
+ read_codemodel_json_data("targets/c_object_lib.json"),
+ read_codemodel_json_data("targets/c_object_exe.json"),
+ read_codemodel_json_data("targets/cxx_object_lib.json"),
+ read_codemodel_json_data("targets/cxx_object_exe.json"),
+
+ read_codemodel_json_data("targets/all_build_imported.json"),
+ read_codemodel_json_data("targets/zero_check_imported.json"),
+ read_codemodel_json_data("targets/link_imported_exe.json"),
+ read_codemodel_json_data("targets/link_imported_shared_exe.json"),
+ read_codemodel_json_data("targets/link_imported_static_exe.json"),
+ 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_custom.json"),
+ read_codemodel_json_data("targets/zero_check_custom.json"),
+ read_codemodel_json_data("targets/custom_tgt.json"),
+ read_codemodel_json_data("targets/custom_exe.json"),
+ read_codemodel_json_data("targets/all_build_external.json"),
+ read_codemodel_json_data("targets/zero_check_external.json"),
+ read_codemodel_json_data("targets/generated_exe.json"),
]
+ if cxx_compiler_id in ['Clang', 'AppleClang', 'GNU', 'Intel', 'MSVC', 'Embarcadero'] and g["name"] != "Xcode":
+ for e in expected:
+ if e["name"] == "cxx_exe":
+ if matches(g["name"], "^(Visual Studio |Ninja Multi-Config)"):
+ precompile_header_data = read_codemodel_json_data("targets/cxx_exe_precompileheader_multigen.json")
+ else:
+ if ';' in os.environ.get("CMAKE_OSX_ARCHITECTURES", ""):
+ precompile_header_data = read_codemodel_json_data("targets/cxx_exe_precompileheader_2arch.json")
+ else:
+ precompile_header_data = read_codemodel_json_data("targets/cxx_exe_precompileheader.json")
+ e["compileGroups"] = precompile_header_data["compileGroups"]
+ e["sources"] = precompile_header_data["sources"]
+ e["sourceGroups"] = precompile_header_data["sourceGroups"]
+
if not os.path.exists(os.path.join(reply_dir, "..", "..", "..", "..", "ipo_enabled.txt")):
for e in expected:
try:
@@ -5164,126 +686,13 @@ def check_targets(c, g, inSource):
def gen_check_projects(c, g):
expected = [
- {
- "name": "codemodel-v2",
- "parentName": None,
- "childNames": [
- "Alias",
- "Custom",
- "Cxx",
- "Imported",
- "Object",
- "External",
- ],
- "directorySources": [
- "^\\.$",
- "^dir$",
- "^dir/dir$",
- ],
- "targetIds": [
- "^ALL_BUILD::@6890427a1f51a3e7e1df$",
- "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
- "^interface_exe::@6890427a1f51a3e7e1df$",
- "^c_lib::@6890427a1f51a3e7e1df$",
- "^c_exe::@6890427a1f51a3e7e1df$",
- "^c_shared_lib::@6890427a1f51a3e7e1df$",
- "^c_shared_exe::@6890427a1f51a3e7e1df$",
- "^c_static_lib::@6890427a1f51a3e7e1df$",
- "^c_static_exe::@6890427a1f51a3e7e1df$",
- ],
- },
- {
- "name": "Cxx",
- "parentName": "codemodel-v2",
- "childNames": None,
- "directorySources": [
- "^cxx$",
- ],
- "targetIds": [
- "^ALL_BUILD::@a56b12a3f5c0529fb296$",
- "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
- "^cxx_lib::@a56b12a3f5c0529fb296$",
- "^cxx_exe::@a56b12a3f5c0529fb296$",
- "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
- "^cxx_shared_exe::@a56b12a3f5c0529fb296$",
- "^cxx_static_lib::@a56b12a3f5c0529fb296$",
- "^cxx_static_exe::@a56b12a3f5c0529fb296$",
- ],
- },
- {
- "name": "Alias",
- "parentName": "codemodel-v2",
- "childNames": None,
- "directorySources": [
- "^alias$",
- ],
- "targetIds": [
- "^ALL_BUILD::@53632cba2752272bb008$",
- "^ZERO_CHECK::@53632cba2752272bb008$",
- "^c_alias_exe::@53632cba2752272bb008$",
- "^cxx_alias_exe::@53632cba2752272bb008$",
- ],
- },
- {
- "name": "Object",
- "parentName": "codemodel-v2",
- "childNames": None,
- "directorySources": [
- "^object$",
- ],
- "targetIds": [
- "^ALL_BUILD::@5ed5358f70faf8d8af7a$",
- "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
- "^c_object_lib::@5ed5358f70faf8d8af7a$",
- "^c_object_exe::@5ed5358f70faf8d8af7a$",
- "^cxx_object_lib::@5ed5358f70faf8d8af7a$",
- "^cxx_object_exe::@5ed5358f70faf8d8af7a$",
- ],
- },
- {
- "name": "Imported",
- "parentName": "codemodel-v2",
- "childNames": None,
- "directorySources": [
- "^imported$",
- ],
- "targetIds": [
- "^ALL_BUILD::@ba7eb709d0b48779c6c8$",
- "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
- "^link_imported_exe::@ba7eb709d0b48779c6c8$",
- "^link_imported_shared_exe::@ba7eb709d0b48779c6c8$",
- "^link_imported_static_exe::@ba7eb709d0b48779c6c8$",
- "^link_imported_object_exe::@ba7eb709d0b48779c6c8$",
- "^link_imported_interface_exe::@ba7eb709d0b48779c6c8$",
- ],
- },
- {
- "name": "Custom",
- "parentName": "codemodel-v2",
- "childNames": None,
- "directorySources": [
- "^custom$",
- ],
- "targetIds": [
- "^ALL_BUILD::@c11385ffed57b860da63$",
- "^ZERO_CHECK::@c11385ffed57b860da63$",
- "^custom_tgt::@c11385ffed57b860da63$",
- "^custom_exe::@c11385ffed57b860da63$",
- ],
- },
- {
- "name": "External",
- "parentName": "codemodel-v2",
- "childNames": None,
- "directorySources": [
- "^.*/Tests/RunCMake/FileAPIExternalSource$",
- ],
- "targetIds": [
- "^ALL_BUILD::@[0-9a-f]+$",
- "^ZERO_CHECK::@[0-9a-f]+$",
- "^generated_exe::@[0-9a-f]+$",
- ],
- },
+ read_codemodel_json_data("projects/codemodel-v2.json"),
+ read_codemodel_json_data("projects/cxx.json"),
+ 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/custom.json"),
+ read_codemodel_json_data("projects/external.json"),
]
if matches(g["name"], "^Visual Studio "):
@@ -5337,6 +746,7 @@ def check_object_codemodel(g):
check_object_codemodel_configuration(c, g, inSource)
return _check
+cxx_compiler_id = sys.argv[2]
assert is_dict(index)
assert sorted(index.keys()) == ["cmake", "objects", "reply"]
check_objects(index["objects"], index["cmake"]["generator"])
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/alias.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/alias.json
new file mode 100644
index 0000000..9f0c48a
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/alias.json
@@ -0,0 +1,15 @@
+{
+ "source": "^alias$",
+ "build": "^alias$",
+ "parentSource": "^\\.$",
+ "childSources": null,
+ "targetIds": [
+ "^ALL_BUILD::@53632cba2752272bb008$",
+ "^ZERO_CHECK::@53632cba2752272bb008$",
+ "^c_alias_exe::@53632cba2752272bb008$",
+ "^cxx_alias_exe::@53632cba2752272bb008$"
+ ],
+ "projectName": "Alias",
+ "minimumCMakeVersion": "3.12",
+ "hasInstallRule": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/custom.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/custom.json
new file mode 100644
index 0000000..afd41f3
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/custom.json
@@ -0,0 +1,15 @@
+{
+ "source": "^custom$",
+ "build": "^custom$",
+ "parentSource": "^\\.$",
+ "childSources": null,
+ "targetIds": [
+ "^ALL_BUILD::@c11385ffed57b860da63$",
+ "^ZERO_CHECK::@c11385ffed57b860da63$",
+ "^custom_exe::@c11385ffed57b860da63$",
+ "^custom_tgt::@c11385ffed57b860da63$"
+ ],
+ "projectName": "Custom",
+ "minimumCMakeVersion": "3.12",
+ "hasInstallRule": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
new file mode 100644
index 0000000..ebe717a
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/cxx.json
@@ -0,0 +1,19 @@
+{
+ "source": "^cxx$",
+ "build": "^cxx$",
+ "parentSource": "^\\.$",
+ "childSources": null,
+ "targetIds": [
+ "^ALL_BUILD::@a56b12a3f5c0529fb296$",
+ "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "^cxx_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_lib::@a56b12a3f5c0529fb296$",
+ "^cxx_shared_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
+ "^cxx_static_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_static_lib::@a56b12a3f5c0529fb296$"
+ ],
+ "projectName": "Cxx",
+ "minimumCMakeVersion": "3.12",
+ "hasInstallRule": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir.json
new file mode 100644
index 0000000..afbd43a
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir.json
@@ -0,0 +1,12 @@
+{
+ "source": "^dir$",
+ "build": "^dir$",
+ "parentSource": "^\\.$",
+ "childSources": [
+ "^dir/dir$"
+ ],
+ "targetIds": null,
+ "projectName": "codemodel-v2",
+ "minimumCMakeVersion": "3.12",
+ "hasInstallRule": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_dir.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_dir.json
new file mode 100644
index 0000000..3737ad5
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/dir_dir.json
@@ -0,0 +1,10 @@
+{
+ "source": "^dir/dir$",
+ "build": "^dir/dir$",
+ "parentSource": "^dir$",
+ "childSources": null,
+ "targetIds": null,
+ "projectName": "codemodel-v2",
+ "minimumCMakeVersion": "3.12",
+ "hasInstallRule": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/external.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/external.json
new file mode 100644
index 0000000..521e3c7
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/external.json
@@ -0,0 +1,14 @@
+{
+ "source": "^.*/Tests/RunCMake/FileAPIExternalSource$",
+ "build": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild$",
+ "parentSource": "^\\.$",
+ "childSources": null,
+ "targetIds": [
+ "^ALL_BUILD::@[0-9a-f]+$",
+ "^ZERO_CHECK::@[0-9a-f]+$",
+ "^generated_exe::@[0-9a-f]+$"
+ ],
+ "projectName": "External",
+ "minimumCMakeVersion": "3.12",
+ "hasInstallRule": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json
new file mode 100644
index 0000000..a41b79b
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json
@@ -0,0 +1,18 @@
+{
+ "source": "^imported$",
+ "build": "^imported$",
+ "parentSource": "^\\.$",
+ "childSources": null,
+ "targetIds": [
+ "^ALL_BUILD::@ba7eb709d0b48779c6c8$",
+ "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
+ "^link_imported_exe::@ba7eb709d0b48779c6c8$",
+ "^link_imported_interface_exe::@ba7eb709d0b48779c6c8$",
+ "^link_imported_object_exe::@ba7eb709d0b48779c6c8$",
+ "^link_imported_shared_exe::@ba7eb709d0b48779c6c8$",
+ "^link_imported_static_exe::@ba7eb709d0b48779c6c8$"
+ ],
+ "projectName": "Imported",
+ "minimumCMakeVersion": "3.12",
+ "hasInstallRule": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json
new file mode 100644
index 0000000..1e647ad
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/object.json
@@ -0,0 +1,17 @@
+{
+ "source": "^object$",
+ "build": "^object$",
+ "parentSource": "^\\.$",
+ "childSources": null,
+ "targetIds": [
+ "^ALL_BUILD::@5ed5358f70faf8d8af7a$",
+ "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
+ "^c_object_exe::@5ed5358f70faf8d8af7a$",
+ "^c_object_lib::@5ed5358f70faf8d8af7a$",
+ "^cxx_object_exe::@5ed5358f70faf8d8af7a$",
+ "^cxx_object_lib::@5ed5358f70faf8d8af7a$"
+ ],
+ "projectName": "Object",
+ "minimumCMakeVersion": "3.13",
+ "hasInstallRule": true
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
new file mode 100644
index 0000000..c144953
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/top.json
@@ -0,0 +1,28 @@
+{
+ "source": "^\\.$",
+ "build": "^\\.$",
+ "parentSource": null,
+ "childSources": [
+ "^alias$",
+ "^custom$",
+ "^cxx$",
+ "^imported$",
+ "^object$",
+ "^.*/Tests/RunCMake/FileAPIExternalSource$",
+ "^dir$"
+ ],
+ "targetIds": [
+ "^ALL_BUILD::@6890427a1f51a3e7e1df$",
+ "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
+ "^c_exe::@6890427a1f51a3e7e1df$",
+ "^c_lib::@6890427a1f51a3e7e1df$",
+ "^c_shared_exe::@6890427a1f51a3e7e1df$",
+ "^c_shared_lib::@6890427a1f51a3e7e1df$",
+ "^c_static_exe::@6890427a1f51a3e7e1df$",
+ "^c_static_lib::@6890427a1f51a3e7e1df$",
+ "^interface_exe::@6890427a1f51a3e7e1df$"
+ ],
+ "projectName": "codemodel-v2",
+ "minimumCMakeVersion": "3.12",
+ "hasInstallRule": true
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/alias.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/alias.json
new file mode 100644
index 0000000..8ede60f
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/alias.json
@@ -0,0 +1,14 @@
+{
+ "name": "Alias",
+ "parentName": "codemodel-v2",
+ "childNames": null,
+ "directorySources": [
+ "^alias$"
+ ],
+ "targetIds": [
+ "^ALL_BUILD::@53632cba2752272bb008$",
+ "^ZERO_CHECK::@53632cba2752272bb008$",
+ "^c_alias_exe::@53632cba2752272bb008$",
+ "^cxx_alias_exe::@53632cba2752272bb008$"
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json
new file mode 100644
index 0000000..f3aac63
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/codemodel-v2.json
@@ -0,0 +1,28 @@
+{
+ "name": "codemodel-v2",
+ "parentName": null,
+ "childNames": [
+ "Alias",
+ "Custom",
+ "Cxx",
+ "Imported",
+ "Object",
+ "External"
+ ],
+ "directorySources": [
+ "^\\.$",
+ "^dir$",
+ "^dir/dir$"
+ ],
+ "targetIds": [
+ "^ALL_BUILD::@6890427a1f51a3e7e1df$",
+ "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
+ "^interface_exe::@6890427a1f51a3e7e1df$",
+ "^c_lib::@6890427a1f51a3e7e1df$",
+ "^c_exe::@6890427a1f51a3e7e1df$",
+ "^c_shared_lib::@6890427a1f51a3e7e1df$",
+ "^c_shared_exe::@6890427a1f51a3e7e1df$",
+ "^c_static_lib::@6890427a1f51a3e7e1df$",
+ "^c_static_exe::@6890427a1f51a3e7e1df$"
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/custom.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/custom.json
new file mode 100644
index 0000000..0aeb727
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/custom.json
@@ -0,0 +1,14 @@
+{
+ "name": "Custom",
+ "parentName": "codemodel-v2",
+ "childNames": null,
+ "directorySources": [
+ "^custom$"
+ ],
+ "targetIds": [
+ "^ALL_BUILD::@c11385ffed57b860da63$",
+ "^ZERO_CHECK::@c11385ffed57b860da63$",
+ "^custom_tgt::@c11385ffed57b860da63$",
+ "^custom_exe::@c11385ffed57b860da63$"
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json
new file mode 100644
index 0000000..296ae6c
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/cxx.json
@@ -0,0 +1,18 @@
+{
+ "name": "Cxx",
+ "parentName": "codemodel-v2",
+ "childNames": null,
+ "directorySources": [
+ "^cxx$"
+ ],
+ "targetIds": [
+ "^ALL_BUILD::@a56b12a3f5c0529fb296$",
+ "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "^cxx_lib::@a56b12a3f5c0529fb296$",
+ "^cxx_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
+ "^cxx_shared_exe::@a56b12a3f5c0529fb296$",
+ "^cxx_static_lib::@a56b12a3f5c0529fb296$",
+ "^cxx_static_exe::@a56b12a3f5c0529fb296$"
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/external.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/external.json
new file mode 100644
index 0000000..3c9afff
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/external.json
@@ -0,0 +1,13 @@
+{
+ "name": "External",
+ "parentName": "codemodel-v2",
+ "childNames": null,
+ "directorySources": [
+ "^.*/Tests/RunCMake/FileAPIExternalSource$"
+ ],
+ "targetIds": [
+ "^ALL_BUILD::@[0-9a-f]+$",
+ "^ZERO_CHECK::@[0-9a-f]+$",
+ "^generated_exe::@[0-9a-f]+$"
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/imported.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/imported.json
new file mode 100644
index 0000000..dc40b72
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/imported.json
@@ -0,0 +1,17 @@
+{
+ "name": "Imported",
+ "parentName": "codemodel-v2",
+ "childNames": null,
+ "directorySources": [
+ "^imported$"
+ ],
+ "targetIds": [
+ "^ALL_BUILD::@ba7eb709d0b48779c6c8$",
+ "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
+ "^link_imported_exe::@ba7eb709d0b48779c6c8$",
+ "^link_imported_shared_exe::@ba7eb709d0b48779c6c8$",
+ "^link_imported_static_exe::@ba7eb709d0b48779c6c8$",
+ "^link_imported_object_exe::@ba7eb709d0b48779c6c8$",
+ "^link_imported_interface_exe::@ba7eb709d0b48779c6c8$"
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/object.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/object.json
new file mode 100644
index 0000000..219f4eb
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/projects/object.json
@@ -0,0 +1,16 @@
+{
+ "name": "Object",
+ "parentName": "codemodel-v2",
+ "childNames": null,
+ "directorySources": [
+ "^object$"
+ ],
+ "targetIds": [
+ "^ALL_BUILD::@5ed5358f70faf8d8af7a$",
+ "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
+ "^c_object_lib::@5ed5358f70faf8d8af7a$",
+ "^c_object_exe::@5ed5358f70faf8d8af7a$",
+ "^cxx_object_lib::@5ed5358f70faf8d8af7a$",
+ "^cxx_object_exe::@5ed5358f70faf8d8af7a$"
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_alias.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_alias.json
new file mode 100644
index 0000000..eabf739
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_alias.json
@@ -0,0 +1,83 @@
+{
+ "name": "ALL_BUILD",
+ "id": "^ALL_BUILD::@53632cba2752272bb008$",
+ "directorySource": "^alias$",
+ "projectName": "Alias",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ALL_BUILD$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ALL_BUILD\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ALL_BUILD$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ALL_BUILD\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^alias$",
+ "source": "^alias$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@53632cba2752272bb008$",
+ "backtrace": null
+ },
+ {
+ "id": "^c_alias_exe::@53632cba2752272bb008$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_alias_exe::@53632cba2752272bb008$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_custom.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_custom.json
new file mode 100644
index 0000000..a5ff686
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_custom.json
@@ -0,0 +1,79 @@
+{
+ "name": "ALL_BUILD",
+ "id": "^ALL_BUILD::@c11385ffed57b860da63$",
+ "directorySource": "^custom$",
+ "projectName": "Custom",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ALL_BUILD$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ALL_BUILD\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ALL_BUILD$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ALL_BUILD\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^custom$",
+ "source": "^custom$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@c11385ffed57b860da63$",
+ "backtrace": null
+ },
+ {
+ "id": "^custom_exe::@c11385ffed57b860da63$",
+ "backtrace": null
+ }
+ ]
+}
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
new file mode 100644
index 0000000..92a7944
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_cxx.json
@@ -0,0 +1,99 @@
+{
+ "name": "ALL_BUILD",
+ "id": "^ALL_BUILD::@a56b12a3f5c0529fb296$",
+ "directorySource": "^cxx$",
+ "projectName": "Cxx",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ALL_BUILD$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ALL_BUILD\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ALL_BUILD$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ALL_BUILD\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^cxx$",
+ "source": "^cxx$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_lib::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_shared_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_static_lib::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_static_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_external.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_external.json
new file mode 100644
index 0000000..017335c
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_external.json
@@ -0,0 +1,79 @@
+{
+ "name": "ALL_BUILD",
+ "id": "^ALL_BUILD::@[0-9a-f]+$",
+ "directorySource": "^.*/Tests/RunCMake/FileAPIExternalSource$",
+ "projectName": "External",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ALL_BUILD$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ALL_BUILD\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ALL_BUILD$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ALL_BUILD\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild$",
+ "source": "^.*/Tests/RunCMake/FileAPIExternalSource$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@[0-9a-f]+$",
+ "backtrace": null
+ },
+ {
+ "id": "^generated_exe::@[0-9a-f]+$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_imported.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_imported.json
new file mode 100644
index 0000000..2de5b15
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_imported.json
@@ -0,0 +1,95 @@
+{
+ "name": "ALL_BUILD",
+ "id": "^ALL_BUILD::@ba7eb709d0b48779c6c8$",
+ "directorySource": "^imported$",
+ "projectName": "Imported",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ALL_BUILD$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ALL_BUILD\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ALL_BUILD$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ALL_BUILD\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^imported$",
+ "source": "^imported$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ },
+ {
+ "id": "^link_imported_exe::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ },
+ {
+ "id": "^link_imported_shared_exe::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ },
+ {
+ "id": "^link_imported_static_exe::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ },
+ {
+ "id": "^link_imported_object_exe::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ },
+ {
+ "id": "^link_imported_interface_exe::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_object.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_object.json
new file mode 100644
index 0000000..9d8899a
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_object.json
@@ -0,0 +1,91 @@
+{
+ "name": "ALL_BUILD",
+ "id": "^ALL_BUILD::@5ed5358f70faf8d8af7a$",
+ "directorySource": "^object$",
+ "projectName": "Object",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ALL_BUILD$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ALL_BUILD\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ALL_BUILD$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ALL_BUILD\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^object$",
+ "source": "^object$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
+ "backtrace": null
+ },
+ {
+ "id": "^c_object_lib::@5ed5358f70faf8d8af7a$",
+ "backtrace": null
+ },
+ {
+ "id": "^c_object_exe::@5ed5358f70faf8d8af7a$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_object_lib::@5ed5358f70faf8d8af7a$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_object_exe::@5ed5358f70faf8d8af7a$",
+ "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
new file mode 100644
index 0000000..b4def78
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/all_build_top.json
@@ -0,0 +1,179 @@
+{
+ "name": "ALL_BUILD",
+ "id": "^ALL_BUILD::@6890427a1f51a3e7e1df$",
+ "directorySource": "^\\.$",
+ "projectName": "codemodel-v2",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ALL_BUILD$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ALL_BUILD\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ALL_BUILD$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ALL_BUILD\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^\\.$",
+ "source": "^\\.$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ },
+ {
+ "id": "^interface_exe::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ },
+ {
+ "id": "^c_lib::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ },
+ {
+ "id": "^c_exe::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ },
+ {
+ "id": "^c_shared_lib::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ },
+ {
+ "id": "^c_shared_exe::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ },
+ {
+ "id": "^c_static_lib::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ },
+ {
+ "id": "^c_static_exe::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ },
+ {
+ "id": "^c_alias_exe::@53632cba2752272bb008$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_alias_exe::@53632cba2752272bb008$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_lib::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_shared_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_static_lib::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_static_exe::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ },
+ {
+ "id": "^c_object_lib::@5ed5358f70faf8d8af7a$",
+ "backtrace": null
+ },
+ {
+ "id": "^c_object_exe::@5ed5358f70faf8d8af7a$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_object_lib::@5ed5358f70faf8d8af7a$",
+ "backtrace": null
+ },
+ {
+ "id": "^cxx_object_exe::@5ed5358f70faf8d8af7a$",
+ "backtrace": null
+ },
+ {
+ "id": "^link_imported_exe::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ },
+ {
+ "id": "^link_imported_shared_exe::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ },
+ {
+ "id": "^link_imported_static_exe::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ },
+ {
+ "id": "^link_imported_object_exe::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ },
+ {
+ "id": "^link_imported_interface_exe::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ },
+ {
+ "id": "^custom_exe::@c11385ffed57b860da63$",
+ "backtrace": null
+ },
+ {
+ "id": "^generated_exe::@[0-9a-f]+$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json
new file mode 100644
index 0000000..ac7c94d
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_alias_exe.json
@@ -0,0 +1,107 @@
+{
+ "name": "c_alias_exe",
+ "id": "^c_alias_exe::@53632cba2752272bb008$",
+ "directorySource": "^alias$",
+ "projectName": "Alias",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": 5,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": 5,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^c_alias_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^alias/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_alias_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^alias/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_alias_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^alias$",
+ "source": "^alias$",
+ "install": null,
+ "link": {
+ "language": "C",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^c_lib::@6890427a1f51a3e7e1df$",
+ "backtrace": [
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": 6,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "id": "^ZERO_CHECK::@53632cba2752272bb008$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json
new file mode 100644
index 0000000..7af74c4
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_exe.json
@@ -0,0 +1,143 @@
+{
+ "name": "c_exe",
+ "id": "^c_exe::@6890427a1f51a3e7e1df$",
+ "directorySource": "^\\.$",
+ "projectName": "codemodel-v2",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 6,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 6,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^c_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^\\.$",
+ "source": "^\\.$",
+ "install": null,
+ "link": {
+ "language": "C",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^c_lib::@6890427a1f51a3e7e1df$",
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 7,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json
new file mode 100644
index 0000000..0ca1962
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_lib.json
@@ -0,0 +1,108 @@
+{
+ "name": "c_lib",
+ "id": "^c_lib::@6890427a1f51a3e7e1df$",
+ "directorySource": "^\\.$",
+ "projectName": "codemodel-v2",
+ "type": "STATIC_LIBRARY",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 5,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 5,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^(lib)?c_lib\\.(a|lib)$",
+ "artifacts": [
+ {
+ "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_lib\\.(a|lib)$",
+ "_dllExtra": false
+ }
+ ],
+ "build": "^\\.$",
+ "source": "^\\.$",
+ "install": null,
+ "link": null,
+ "archive": {
+ "lto": null
+ },
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json
new file mode 100644
index 0000000..3c9ace3
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_exe.json
@@ -0,0 +1,154 @@
+{
+ "name": "c_object_exe",
+ "id": "^c_object_exe::@5ed5358f70faf8d8af7a$",
+ "directorySource": "^object$",
+ "projectName": "Object",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 6,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/.*/empty(\\.c)?\\.o(bj)?$",
+ "isGenerated": true,
+ "sourceGroupName": "Object Libraries",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 7,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ },
+ {
+ "name": "Object Libraries",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/.*/empty(\\.c)?\\.o(bj)?$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 6,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^c_object_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^object/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_object_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^object/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_object_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^object$",
+ "source": "^object$",
+ "install": {
+ "prefix": "^(/usr/local|[A-Za-z]:.*/codemodel-v2)$",
+ "destinations": [
+ {
+ "path": "bin",
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 13,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ },
+ "link": {
+ "language": "C",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^c_object_lib::@5ed5358f70faf8d8af7a$",
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 7,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json
new file mode 100644
index 0000000..e3a20df
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_object_lib.json
@@ -0,0 +1,82 @@
+{
+ "name": "c_object_lib",
+ "id": "^c_object_lib::@5ed5358f70faf8d8af7a$",
+ "directorySource": "^object$",
+ "projectName": "Object",
+ "type": "OBJECT_LIBRARY",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 5,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 5,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": [
+ {
+ "path": "^object/.*/empty(\\.c)?\\.o(bj)?$",
+ "_dllExtra": false
+ }
+ ],
+ "build": "^object$",
+ "source": "^object$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json
new file mode 100644
index 0000000..0d4018a
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_exe.json
@@ -0,0 +1,143 @@
+{
+ "name": "c_shared_exe",
+ "id": "^c_shared_exe::@6890427a1f51a3e7e1df$",
+ "directorySource": "^\\.$",
+ "projectName": "codemodel-v2",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 10,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 10,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^c_shared_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_shared_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_shared_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^\\.$",
+ "source": "^\\.$",
+ "install": null,
+ "link": {
+ "language": "C",
+ "lto": true,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^c_shared_lib::@6890427a1f51a3e7e1df$",
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 11,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json
new file mode 100644
index 0000000..176a857
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_shared_lib.json
@@ -0,0 +1,123 @@
+{
+ "name": "c_shared_lib",
+ "id": "^c_shared_lib::@6890427a1f51a3e7e1df$",
+ "directorySource": "^\\.$",
+ "projectName": "codemodel-v2",
+ "type": "SHARED_LIBRARY",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 9,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": [
+ {
+ "define": "c_shared_lib_EXPORTS",
+ "backtrace": null
+ }
+ ],
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 9,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^(lib|cyg)?c_shared_lib\\.(so|dylib|dll)$",
+ "artifacts": [
+ {
+ "path": "^lib/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg)?c_shared_lib\\.(so|dylib|dll)$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_shared_lib\\.(dll\\.a|lib)$",
+ "_dllExtra": true
+ },
+ {
+ "path": "^lib/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg)?c_shared_lib\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^\\.$",
+ "source": "^\\.$",
+ "install": null,
+ "link": {
+ "language": "C",
+ "lto": true,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json
new file mode 100644
index 0000000..5542277
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_exe.json
@@ -0,0 +1,143 @@
+{
+ "name": "c_static_exe",
+ "id": "^c_static_exe::@6890427a1f51a3e7e1df$",
+ "directorySource": "^\\.$",
+ "projectName": "codemodel-v2",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 14,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 14,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^c_static_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_static_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?c_static_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^\\.$",
+ "source": "^\\.$",
+ "install": null,
+ "link": {
+ "language": "C",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^c_static_lib::@6890427a1f51a3e7e1df$",
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 15,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json
new file mode 100644
index 0000000..4b63897
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_static_lib.json
@@ -0,0 +1,108 @@
+{
+ "name": "c_static_lib",
+ "id": "^c_static_lib::@6890427a1f51a3e7e1df$",
+ "directorySource": "^\\.$",
+ "projectName": "codemodel-v2",
+ "type": "STATIC_LIBRARY",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 13,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 13,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^(lib)?c_static_lib\\.(a|lib)$",
+ "artifacts": [
+ {
+ "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_static_lib\\.(a|lib)$",
+ "_dllExtra": false
+ }
+ ],
+ "build": "^\\.$",
+ "source": "^\\.$",
+ "install": null,
+ "link": null,
+ "archive": {
+ "lto": true
+ },
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json
new file mode 100644
index 0000000..ab301e9
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_exe.json
@@ -0,0 +1,107 @@
+{
+ "name": "custom_exe",
+ "id": "^custom_exe::@c11385ffed57b860da63$",
+ "directorySource": "^custom$",
+ "projectName": "Custom",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": 4,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": 4,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^custom_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^custom/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?custom_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^custom/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?custom_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^custom$",
+ "source": "^custom$",
+ "install": null,
+ "link": {
+ "language": "C",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^custom_tgt::@c11385ffed57b860da63$",
+ "backtrace": [
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": 5,
+ "command": "add_dependencies",
+ "hasParent": true
+ },
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "id": "^ZERO_CHECK::@c11385ffed57b860da63$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_tgt.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_tgt.json
new file mode 100644
index 0000000..a7106fc
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/custom_tgt.json
@@ -0,0 +1,87 @@
+{
+ "name": "custom_tgt",
+ "id": "^custom_tgt::@c11385ffed57b860da63$",
+ "directorySource": "^custom$",
+ "projectName": "Custom",
+ "type": "UTILITY",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/custom_tgt$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": 3,
+ "command": "add_custom_target",
+ "hasParent": true
+ },
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/(custom/)?CMakeFiles/([0-9a-f]+/)?custom_tgt\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/custom_tgt$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/(custom/)?CMakeFiles/([0-9a-f]+/)?custom_tgt\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": 3,
+ "command": "add_custom_target",
+ "hasParent": true
+ },
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^custom$",
+ "source": "^custom$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@c11385ffed57b860da63$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json
new file mode 100644
index 0000000..837f252
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_alias_exe.json
@@ -0,0 +1,107 @@
+{
+ "name": "cxx_alias_exe",
+ "id": "^cxx_alias_exe::@53632cba2752272bb008$",
+ "directorySource": "^alias$",
+ "projectName": "Alias",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": 9,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": 9,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^cxx_alias_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^alias/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_alias_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^alias/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_alias_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^alias$",
+ "source": "^alias$",
+ "install": null,
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^cxx_lib::@a56b12a3f5c0529fb296$",
+ "backtrace": [
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": 10,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "id": "^ZERO_CHECK::@53632cba2752272bb008$",
+ "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
new file mode 100644
index 0000000..e7ab55b
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
@@ -0,0 +1,232 @@
+{
+ "name": "cxx_exe",
+ "id": "^cxx_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": 5,
+ "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",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "precompileHeaders": [
+ {
+ "header": ".*empty\\.h$",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 21,
+ "command": "target_precompile_headers",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "compileCommandFragments": [
+ {
+ "fragment" : "TargetCompileOptions",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_compile_options",
+ "hasParent": true
+ },
+ {
+ "file" : "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 5,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": "bin",
+ "nameOnDisk": "^cxx_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^cxx$",
+ "source": "^cxx$",
+ "install": {
+ "prefix": "^(/usr/local|[A-Za-z]:.*/codemodel-v2)$",
+ "destinations": [
+ {
+ "path": "bin",
+ "backtrace": [
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 37,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ },
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": [
+ {
+ "fragment" : "TargetLinkOptions",
+ "role" : "flags",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 18,
+ "command": "target_link_options",
+ "hasParent": true
+ },
+ {
+ "file" : "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "fragment" : ".*TargetLinkDir\\\"?$",
+ "role" : "libraryPath",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 19,
+ "command": "target_link_directories",
+ "hasParent": true
+ },
+ {
+ "file" : "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "fragment" : ".*cxx_lib.*",
+ "role" : "libraries",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 6,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file" : "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^cxx_lib::@a56b12a3f5c0529fb296$",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 6,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader.json
new file mode 100644
index 0000000..5a0f770
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader.json
@@ -0,0 +1,161 @@
+{
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "precompileHeaders": [
+ {
+ "header": ".*empty\\.h$",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 21,
+ "command": "target_precompile_headers",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "compileCommandFragments": [
+ {
+ "fragment": "TargetCompileOptions",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_compile_options",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "precompileHeaders": [
+ {
+ "header": ".*empty\\.h$",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 21,
+ "command": "target_precompile_headers",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "compileCommandFragments": [
+ {
+ "fragment": "TargetCompileOptions",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_compile_options",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "sources": [
+ {
+ "path": ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 5,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": ".*/cmake_pch(_[^.]+)?\\.hxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Precompile Header File",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$",
+ "^empty\\.cxx$"
+ ]
+ },
+ {
+ "name": "Precompile Header File",
+ "sourcePaths": [
+ ".*/cmake_pch(_[^.]+)?\\.hxx$"
+ ]
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_2arch.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_2arch.json
new file mode 100644
index 0000000..9455748
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_2arch.json
@@ -0,0 +1,237 @@
+{
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "precompileHeaders": [
+ {
+ "header": ".*empty\\.h$",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 21,
+ "command": "target_precompile_headers",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "compileCommandFragments": [
+ {
+ "fragment": "TargetCompileOptions",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_compile_options",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "precompileHeaders": [
+ {
+ "header": ".*empty\\.h$",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 21,
+ "command": "target_precompile_headers",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "compileCommandFragments": [
+ {
+ "fragment": "TargetCompileOptions",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_compile_options",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "precompileHeaders": [
+ {
+ "header": ".*empty\\.h$",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 21,
+ "command": "target_precompile_headers",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "compileCommandFragments": [
+ {
+ "fragment": "TargetCompileOptions",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_compile_options",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "sources": [
+ {
+ "path": ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 5,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": ".*/cmake_pch(_[^.]+)?\\.hxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Precompile Header File",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": ".*/cmake_pch(_[^.]+)?\\.hxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Precompile Header File",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$",
+ ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$",
+ "^empty\\.cxx$"
+ ]
+ },
+ {
+ "name": "Precompile Header File",
+ "sourcePaths": [
+ ".*/cmake_pch(_[^.]+)?\\.hxx$",
+ ".*/cmake_pch(_[^.]+)?\\.hxx$"
+ ]
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_multigen.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_multigen.json
new file mode 100644
index 0000000..9f6ffcc
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe_precompileheader_multigen.json
@@ -0,0 +1,206 @@
+{
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "precompileHeaders": [
+ {
+ "header": ".*empty\\.h$",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 21,
+ "command": "target_precompile_headers",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "compileCommandFragments": [
+ {
+ "fragment": "TargetCompileOptions",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_compile_options",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "precompileHeaders": [
+ {
+ "header": ".*empty\\.h$",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 21,
+ "command": "target_precompile_headers",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "compileCommandFragments": [
+ {
+ "fragment": "TargetCompileOptions",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 17,
+ "command": "target_compile_options",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "sources": [
+ {
+ "path": ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 5,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": ".*/Debug/cmake_pch(_[^.]+)?\\.hxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Precompile Header File",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": ".*/Release/cmake_pch(_[^.]+)?\\.hxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Precompile Header File",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": ".*/MinSizeRel/cmake_pch(_[^.]+)?\\.hxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Precompile Header File",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": ".*/RelWithDebInfo/cmake_pch(_[^.]+)?\\.hxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Precompile Header File",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ ".*cmake_pch(_[^.]+)?(\\.hxx)?\\.cxx$",
+ "^empty\\.cxx$"
+ ]
+ },
+ {
+ "name": "Precompile Header File",
+ "sourcePaths": [
+ ".*/Debug/cmake_pch(_[^.]+)?\\.hxx$",
+ ".*/Release/cmake_pch(_[^.]+)?\\.hxx$",
+ ".*/MinSizeRel/cmake_pch(_[^.]+)?\\.hxx$",
+ ".*/RelWithDebInfo/cmake_pch(_[^.]+)?\\.hxx$"
+ ]
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json
new file mode 100644
index 0000000..94ac081
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_lib.json
@@ -0,0 +1,84 @@
+{
+ "name": "cxx_lib",
+ "id": "^cxx_lib::@a56b12a3f5c0529fb296$",
+ "directorySource": "^cxx$",
+ "projectName": "Cxx",
+ "type": "STATIC_LIBRARY",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 4,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 4,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^(lib)?cxx_lib\\.(a|lib)$",
+ "artifacts": [
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?cxx_lib\\.(a|lib)$",
+ "_dllExtra": false
+ }
+ ],
+ "build": "^cxx$",
+ "source": "^cxx$",
+ "install": null,
+ "link": null,
+ "archive": {
+ "lto": null
+ },
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json
new file mode 100644
index 0000000..119c91d
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_exe.json
@@ -0,0 +1,154 @@
+{
+ "name": "cxx_object_exe",
+ "id": "^cxx_object_exe::@5ed5358f70faf8d8af7a$",
+ "directorySource": "^object$",
+ "projectName": "Object",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 10,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/.*/empty(\\.cxx)?\\.o(bj)?$",
+ "isGenerated": true,
+ "sourceGroupName": "Object Libraries",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 11,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ },
+ {
+ "name": "Object Libraries",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/.*/empty(\\.cxx)?\\.o(bj)?$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 10,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^cxx_object_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^object/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_object_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^object/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_object_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^object$",
+ "source": "^object$",
+ "install": {
+ "prefix": "^(/usr/local|[A-Za-z]:.*/codemodel-v2)$",
+ "destinations": [
+ {
+ "path": "bin",
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 13,
+ "command": "install",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ },
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^cxx_object_lib::@5ed5358f70faf8d8af7a$",
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 11,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json
new file mode 100644
index 0000000..8e99f7d
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_object_lib.json
@@ -0,0 +1,82 @@
+{
+ "name": "cxx_object_lib",
+ "id": "^cxx_object_lib::@5ed5358f70faf8d8af7a$",
+ "directorySource": "^object$",
+ "projectName": "Object",
+ "type": "OBJECT_LIBRARY",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 9,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": 9,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": [
+ {
+ "path": "^object/.*/empty(\\.cxx)?\\.o(bj)?$",
+ "_dllExtra": false
+ }
+ ],
+ "build": "^object$",
+ "source": "^object$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json
new file mode 100644
index 0000000..4421c8f
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_exe.json
@@ -0,0 +1,107 @@
+{
+ "name": "cxx_shared_exe",
+ "id": "^cxx_shared_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": 10,
+ "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",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 10,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^cxx_shared_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_shared_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_shared_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^cxx$",
+ "source": "^cxx$",
+ "install": null,
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 11,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json
new file mode 100644
index 0000000..171a4f5
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_shared_lib.json
@@ -0,0 +1,99 @@
+{
+ "name": "cxx_shared_lib",
+ "id": "^cxx_shared_lib::@a56b12a3f5c0529fb296$",
+ "directorySource": "^cxx$",
+ "projectName": "Cxx",
+ "type": "SHARED_LIBRARY",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 9,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": [
+ {
+ "define": "cxx_shared_lib_EXPORTS",
+ "backtrace": null
+ }
+ ],
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 9,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^(lib|cyg)?cxx_shared_lib\\.(so|dylib|dll)$",
+ "artifacts": [
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg)?cxx_shared_lib\\.(so|dylib|dll)$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?cxx_shared_lib\\.(dll\\.a|lib)$",
+ "_dllExtra": true
+ },
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib|cyg)?cxx_shared_lib\\.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_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json
new file mode 100644
index 0000000..52c42de
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_exe.json
@@ -0,0 +1,107 @@
+{
+ "name": "cxx_static_exe",
+ "id": "^cxx_static_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": 14,
+ "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",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 14,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^cxx_static_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_static_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?cxx_static_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^cxx$",
+ "source": "^cxx$",
+ "install": null,
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^cxx_static_lib::@a56b12a3f5c0529fb296$",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 15,
+ "command": "target_link_libraries",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json
new file mode 100644
index 0000000..98298be
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_static_lib.json
@@ -0,0 +1,84 @@
+{
+ "name": "cxx_static_lib",
+ "id": "^cxx_static_lib::@a56b12a3f5c0529fb296$",
+ "directorySource": "^cxx$",
+ "projectName": "Cxx",
+ "type": "STATIC_LIBRARY",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.cxx$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 13,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^empty\\.cxx$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": 13,
+ "command": "add_library",
+ "hasParent": true
+ },
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^(lib)?cxx_static_lib\\.(a|lib)$",
+ "artifacts": [
+ {
+ "path": "^cxx/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?cxx_static_lib\\.(a|lib)$",
+ "_dllExtra": false
+ }
+ ],
+ "build": "^cxx$",
+ "source": "^cxx$",
+ "install": null,
+ "link": null,
+ "archive": {
+ "lto": null
+ },
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json
new file mode 100644
index 0000000..d41bbb2
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/generated_exe.json
@@ -0,0 +1,303 @@
+{
+ "name": "generated_exe",
+ "id": "^generated_exe::@[0-9a-f]+$",
+ "directorySource": "^.*/Tests/RunCMake/FileAPIExternalSource$",
+ "projectName": "External",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPIExternalSource/empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 5,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/generated\\.cxx$",
+ "isGenerated": true,
+ "sourceGroupName": "Generated Source Files",
+ "compileGroupLanguage": "CXX",
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 6,
+ "command": "target_sources",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPIExternalSource/empty\\.c$"
+ ]
+ },
+ {
+ "name": "Generated Source Files",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/generated\\.cxx$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPIExternalSource/empty\\.c$"
+ ],
+ "includes": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild$",
+ "isSystem": null,
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 10,
+ "command": "set_property",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPIExternalSource$",
+ "isSystem": true,
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 11,
+ "command": "target_include_directories",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "defines": [
+ {
+ "define": "EMPTY_C=1",
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 9,
+ "command": "set_property",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "define": "SRC_DUMMY",
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 9,
+ "command": "set_property",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "define": "GENERATED_EXE=1",
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 12,
+ "command": "target_compile_definitions",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "define": "TGT_DUMMY",
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 12,
+ "command": "target_compile_definitions",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "compileCommandFragments": [
+ {
+ "fragment" : "SRC_COMPILE_OPTIONS_DUMMY",
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 13,
+ "command": "set_source_files_properties",
+ "hasParent": true
+ },
+ {
+ "file" : "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "language": "CXX",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/generated\\.cxx$"
+ ],
+ "includes": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPIExternalSource$",
+ "isSystem": true,
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 11,
+ "command": "target_include_directories",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "defines": [
+ {
+ "define": "GENERATED_EXE=1",
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 12,
+ "command": "target_compile_definitions",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "define": "TGT_DUMMY",
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 12,
+ "command": "target_compile_definitions",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": 5,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^generated_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?generated_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?generated_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild$",
+ "source": "^.*/Tests/RunCMake/FileAPIExternalSource$",
+ "install": null,
+ "link": {
+ "language": "CXX",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@[0-9a-f]+$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json
new file mode 100644
index 0000000..fe0524c
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/interface_exe.json
@@ -0,0 +1,152 @@
+{
+ "name": "interface_exe",
+ "id": "^interface_exe::@6890427a1f51a3e7e1df$",
+ "directorySource": "^\\.$",
+ "projectName": "codemodel-v2",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^include_test\\.cmake$",
+ "line": 3,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^include_test\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": [
+ {
+ "define": "interface_exe_EXPORTS",
+ "backtrace": null
+ }
+ ],
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^include_test\\.cmake$",
+ "line": 3,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^include_test\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^codemodel-v2\\.cmake$",
+ "line": null,
+ "command": null,
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": 3,
+ "command": "include",
+ "hasParent": true
+ },
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^my_interface_exe\\.myexe$",
+ "artifacts": [
+ {
+ "path": "^bin/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?my_interface_exe\\.myexe$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^lib/my_interface_exe\\.imp$",
+ "_aixExtra": true,
+ "_dllExtra": false
+ },
+ {
+ "path": "^lib/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?my_interface_exe\\.(dll\\.a|lib)$",
+ "_dllExtra": true
+ },
+ {
+ "path": "^bin/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?my_interface_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^\\.$",
+ "source": "^\\.$",
+ "install": null,
+ "link": {
+ "language": "C",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
new file mode 100644
index 0000000..312f4c5
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_exe.json
@@ -0,0 +1,90 @@
+{
+ "name": "link_imported_exe",
+ "id": "^link_imported_exe::@ba7eb709d0b48779c6c8$",
+ "directorySource": "^imported$",
+ "projectName": "Imported",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": 5,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": 5,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^link_imported_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^imported$",
+ "source": "^imported$",
+ "install": null,
+ "link": {
+ "language": "C",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
new file mode 100644
index 0000000..7d0e6df
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_interface_exe.json
@@ -0,0 +1,90 @@
+{
+ "name": "link_imported_interface_exe",
+ "id": "^link_imported_interface_exe::@ba7eb709d0b48779c6c8$",
+ "directorySource": "^imported$",
+ "projectName": "Imported",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": 23,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": 23,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^link_imported_interface_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_interface_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_interface_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^imported$",
+ "source": "^imported$",
+ "install": null,
+ "link": {
+ "language": "C",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
new file mode 100644
index 0000000..4aec524
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_object_exe.json
@@ -0,0 +1,90 @@
+{
+ "name": "link_imported_object_exe",
+ "id": "^link_imported_object_exe::@ba7eb709d0b48779c6c8$",
+ "directorySource": "^imported$",
+ "projectName": "Imported",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": 18,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": 18,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^link_imported_object_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_object_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_object_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^imported$",
+ "source": "^imported$",
+ "install": null,
+ "link": {
+ "language": "C",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
new file mode 100644
index 0000000..f5846ec
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_shared_exe.json
@@ -0,0 +1,90 @@
+{
+ "name": "link_imported_shared_exe",
+ "id": "^link_imported_shared_exe::@ba7eb709d0b48779c6c8$",
+ "directorySource": "^imported$",
+ "projectName": "Imported",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": 9,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": 9,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^link_imported_shared_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_shared_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_shared_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^imported$",
+ "source": "^imported$",
+ "install": null,
+ "link": {
+ "language": "C",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
new file mode 100644
index 0000000..29a1695
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/link_imported_static_exe.json
@@ -0,0 +1,90 @@
+{
+ "name": "link_imported_static_exe",
+ "id": "^link_imported_static_exe::@ba7eb709d0b48779c6c8$",
+ "directorySource": "^imported$",
+ "projectName": "Imported",
+ "type": "EXECUTABLE",
+ "isGeneratorProvided": null,
+ "sources": [
+ {
+ "path": "^empty\\.c$",
+ "isGenerated": null,
+ "sourceGroupName": "Source Files",
+ "compileGroupLanguage": "C",
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": 13,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "Source Files",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ]
+ }
+ ],
+ "compileGroups": [
+ {
+ "language": "C",
+ "sourcePaths": [
+ "^empty\\.c$"
+ ],
+ "includes": null,
+ "defines": null,
+ "compileCommandFragments": null
+ }
+ ],
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": 13,
+ "command": "add_executable",
+ "hasParent": true
+ },
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": "^link_imported_static_exe(\\.exe)?$",
+ "artifacts": [
+ {
+ "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_static_exe(\\.exe)?$",
+ "_dllExtra": false
+ },
+ {
+ "path": "^imported/((Debug|Release|RelWithDebInfo|MinSizeRel)/)?link_imported_static_exe\\.pdb$",
+ "_dllExtra": true
+ }
+ ],
+ "build": "^imported$",
+ "source": "^imported$",
+ "install": null,
+ "link": {
+ "language": "C",
+ "lto": null,
+ "commandFragments": null
+ },
+ "archive": null,
+ "dependencies": [
+ {
+ "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
+ "backtrace": null
+ }
+ ]
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_alias.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_alias.json
new file mode 100644
index 0000000..941c172
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_alias.json
@@ -0,0 +1,70 @@
+{
+ "name": "ZERO_CHECK",
+ "id": "^ZERO_CHECK::@53632cba2752272bb008$",
+ "directorySource": "^alias$",
+ "projectName": "Alias",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ZERO_CHECK$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ZERO_CHECK\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ZERO_CHECK$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/alias/CMakeFiles/ZERO_CHECK\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^alias/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^alias$",
+ "source": "^alias$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_custom.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_custom.json
new file mode 100644
index 0000000..98c6dd9
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_custom.json
@@ -0,0 +1,70 @@
+{
+ "name": "ZERO_CHECK",
+ "id": "^ZERO_CHECK::@c11385ffed57b860da63$",
+ "directorySource": "^custom$",
+ "projectName": "Custom",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ZERO_CHECK$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ZERO_CHECK\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ZERO_CHECK$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/custom/CMakeFiles/ZERO_CHECK\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^custom/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^custom$",
+ "source": "^custom$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_cxx.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_cxx.json
new file mode 100644
index 0000000..b72ff82
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_cxx.json
@@ -0,0 +1,70 @@
+{
+ "name": "ZERO_CHECK",
+ "id": "^ZERO_CHECK::@a56b12a3f5c0529fb296$",
+ "directorySource": "^cxx$",
+ "projectName": "Cxx",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ZERO_CHECK$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ZERO_CHECK\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ZERO_CHECK$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/cxx/CMakeFiles/ZERO_CHECK\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^cxx/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^cxx$",
+ "source": "^cxx$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_external.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_external.json
new file mode 100644
index 0000000..9e73806
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_external.json
@@ -0,0 +1,70 @@
+{
+ "name": "ZERO_CHECK",
+ "id": "^ZERO_CHECK::@[0-9a-f]+$",
+ "directorySource": "^.*/Tests/RunCMake/FileAPIExternalSource$",
+ "projectName": "External",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ZERO_CHECK$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ZERO_CHECK\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ZERO_CHECK$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild/CMakeFiles/ZERO_CHECK\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^.*/Tests/RunCMake/FileAPIExternalSource/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^.*/Tests/RunCMake/FileAPI/FileAPIExternalBuild$",
+ "source": "^.*/Tests/RunCMake/FileAPIExternalSource$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_imported.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_imported.json
new file mode 100644
index 0000000..7534c84
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_imported.json
@@ -0,0 +1,70 @@
+{
+ "name": "ZERO_CHECK",
+ "id": "^ZERO_CHECK::@ba7eb709d0b48779c6c8$",
+ "directorySource": "^imported$",
+ "projectName": "Imported",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ZERO_CHECK$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ZERO_CHECK\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ZERO_CHECK$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/imported/CMakeFiles/ZERO_CHECK\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^imported/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^imported$",
+ "source": "^imported$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_object.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_object.json
new file mode 100644
index 0000000..bcd7616
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_object.json
@@ -0,0 +1,70 @@
+{
+ "name": "ZERO_CHECK",
+ "id": "^ZERO_CHECK::@5ed5358f70faf8d8af7a$",
+ "directorySource": "^object$",
+ "projectName": "Object",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ZERO_CHECK$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ZERO_CHECK\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ZERO_CHECK$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/CMakeFiles/ZERO_CHECK\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^object/CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^object$",
+ "source": "^object$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": null
+}
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_top.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_top.json
new file mode 100644
index 0000000..b3030bd
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/zero_check_top.json
@@ -0,0 +1,70 @@
+{
+ "name": "ZERO_CHECK",
+ "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$",
+ "directorySource": "^\\.$",
+ "projectName": "codemodel-v2",
+ "type": "UTILITY",
+ "isGeneratorProvided": true,
+ "sources": [
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ZERO_CHECK$",
+ "isGenerated": true,
+ "sourceGroupName": "",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ },
+ {
+ "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ZERO_CHECK\\.rule$",
+ "isGenerated": true,
+ "sourceGroupName": "CMake Rules",
+ "compileGroupLanguage": null,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ]
+ }
+ ],
+ "sourceGroups": [
+ {
+ "name": "",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ZERO_CHECK$"
+ ]
+ },
+ {
+ "name": "CMake Rules",
+ "sourcePaths": [
+ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/ZERO_CHECK\\.rule$"
+ ]
+ }
+ ],
+ "compileGroups": null,
+ "backtrace": [
+ {
+ "file": "^CMakeLists\\.txt$",
+ "line": null,
+ "command": null,
+ "hasParent": false
+ }
+ ],
+ "folder": null,
+ "nameOnDisk": null,
+ "artifacts": null,
+ "build": "^\\.$",
+ "source": "^\\.$",
+ "install": null,
+ "link": null,
+ "archive": null,
+ "dependencies": null
+}
diff --git a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
index b0564f5..fa51195 100644
--- a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
+++ b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt
@@ -17,3 +17,5 @@ target_link_libraries(cxx_static_exe PRIVATE cxx_static_lib)
target_compile_options(cxx_exe PUBLIC TargetCompileOptions)
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)
diff --git a/Tests/RunCMake/FileAPI/empty.h b/Tests/RunCMake/FileAPI/empty.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/empty.h
diff --git a/Tests/RunCMake/File_Archive/7zip.cmake b/Tests/RunCMake/File_Archive/7zip.cmake
new file mode 100644
index 0000000..7b0b9b7
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/7zip.cmake
@@ -0,0 +1,7 @@
+set(OUTPUT_NAME "test.7z")
+
+set(COMPRESSION_FORMAT 7zip)
+
+include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
+
+check_magic("377abcaf271c" LIMIT 6 HEX)
diff --git a/Tests/RunCMake/File_Archive/CMakeLists.txt b/Tests/RunCMake/File_Archive/CMakeLists.txt
new file mode 100644
index 0000000..2897109
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.0)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/File_Archive/RunCMakeTest.cmake b/Tests/RunCMake/File_Archive/RunCMakeTest.cmake
new file mode 100644
index 0000000..871cb6d
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/RunCMakeTest.cmake
@@ -0,0 +1,17 @@
+include(RunCMake)
+
+run_cmake(7zip)
+run_cmake(gnutar)
+run_cmake(gnutar-gz)
+run_cmake(pax)
+run_cmake(pax-xz)
+run_cmake(pax-zstd)
+run_cmake(paxr)
+run_cmake(paxr-bz2)
+run_cmake(zip)
+
+# Extracting only selected files or directories
+run_cmake(zip-filtered)
+
+run_cmake(unsupported-format)
+run_cmake(zip-with-bad-type)
diff --git a/Tests/RunCMake/File_Archive/gnutar-gz.cmake b/Tests/RunCMake/File_Archive/gnutar-gz.cmake
new file mode 100644
index 0000000..f4e3975
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/gnutar-gz.cmake
@@ -0,0 +1,8 @@
+set(OUTPUT_NAME "test.tar.gz")
+
+set(COMPRESSION_FORMAT gnutar)
+set(COMPRESSION_TYPE GZip)
+
+include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
+
+check_magic("1f8b" LIMIT 2 HEX)
diff --git a/Tests/RunCMake/File_Archive/gnutar.cmake b/Tests/RunCMake/File_Archive/gnutar.cmake
new file mode 100644
index 0000000..e5cbd35
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/gnutar.cmake
@@ -0,0 +1,7 @@
+set(OUTPUT_NAME "test.tar")
+
+set(COMPRESSION_FORMAT gnutar)
+
+include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
+
+check_magic("7573746172202000" OFFSET 257 LIMIT 8 HEX)
diff --git a/Tests/RunCMake/File_Archive/pax-xz.cmake b/Tests/RunCMake/File_Archive/pax-xz.cmake
new file mode 100644
index 0000000..47fb0fd
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/pax-xz.cmake
@@ -0,0 +1,8 @@
+set(OUTPUT_NAME "test.tar.xz")
+
+set(COMPRESSION_FORMAT pax)
+set(COMPRESSION_TYPE XZ)
+
+include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
+
+check_magic("fd377a585a00" LIMIT 6 HEX)
diff --git a/Tests/RunCMake/File_Archive/pax-zstd.cmake b/Tests/RunCMake/File_Archive/pax-zstd.cmake
new file mode 100644
index 0000000..59e0443
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/pax-zstd.cmake
@@ -0,0 +1,8 @@
+set(OUTPUT_NAME "test.tar.zstd")
+
+set(COMPRESSION_FORMAT pax)
+set(COMPRESSION_TYPE Zstd)
+
+include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
+
+check_magic("28b52ffd0058" LIMIT 6 HEX)
diff --git a/Tests/RunCMake/File_Archive/pax.cmake b/Tests/RunCMake/File_Archive/pax.cmake
new file mode 100644
index 0000000..e50c74f
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/pax.cmake
@@ -0,0 +1,7 @@
+set(OUTPUT_NAME "test.tar")
+
+set(COMPRESSION_FORMAT pax)
+
+include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
+
+check_magic("7573746172003030" OFFSET 257 LIMIT 8 HEX)
diff --git a/Tests/RunCMake/File_Archive/paxr-bz2.cmake b/Tests/RunCMake/File_Archive/paxr-bz2.cmake
new file mode 100644
index 0000000..469a131
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/paxr-bz2.cmake
@@ -0,0 +1,8 @@
+set(OUTPUT_NAME "test.tar.bz2")
+
+set(COMPRESSION_FORMAT paxr)
+set(COMPRESSION_TYPE BZip2)
+
+include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
+
+check_magic("425a68" LIMIT 3 HEX)
diff --git a/Tests/RunCMake/File_Archive/paxr.cmake b/Tests/RunCMake/File_Archive/paxr.cmake
new file mode 100644
index 0000000..e3a4d5c
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/paxr.cmake
@@ -0,0 +1,7 @@
+set(OUTPUT_NAME "test.tar")
+
+set(COMPRESSION_FORMAT paxr)
+
+include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
+
+check_magic("7573746172003030" OFFSET 257 LIMIT 8 HEX)
diff --git a/Tests/RunCMake/File_Archive/roundtrip.cmake b/Tests/RunCMake/File_Archive/roundtrip.cmake
new file mode 100644
index 0000000..9050400
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/roundtrip.cmake
@@ -0,0 +1,92 @@
+foreach(parameter OUTPUT_NAME COMPRESSION_FORMAT)
+ if(NOT DEFINED ${parameter})
+ message(FATAL_ERROR "missing required parameter ${parameter}")
+ endif()
+endforeach()
+
+set(COMPRESS_DIR compress_dir)
+set(FULL_COMPRESS_DIR ${CMAKE_CURRENT_BINARY_DIR}/${COMPRESS_DIR})
+
+set(DECOMPRESS_DIR decompress_dir)
+set(FULL_DECOMPRESS_DIR ${CMAKE_CURRENT_BINARY_DIR}/${DECOMPRESS_DIR})
+
+set(FULL_OUTPUT_NAME ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME})
+
+set(CHECK_FILES
+ "f1.txt"
+ "d1/f1.txt"
+ "d 2/f1.txt"
+ "d + 3/f1.txt"
+ "d_4/f1.txt"
+ "d-4/f1.txt"
+ "My Special Directory/f1.txt"
+)
+
+foreach(file ${CHECK_FILES})
+ configure_file(${CMAKE_CURRENT_LIST_FILE} ${FULL_COMPRESS_DIR}/${file} COPYONLY)
+endforeach()
+
+if(UNIX)
+ execute_process(COMMAND ln -sf f1.txt ${FULL_COMPRESS_DIR}/d1/f2.txt)
+ list(APPEND CHECK_FILES "d1/f2.txt")
+endif()
+
+file(REMOVE ${FULL_OUTPUT_NAME})
+file(REMOVE_RECURSE ${FULL_DECOMPRESS_DIR})
+file(MAKE_DIRECTORY ${FULL_DECOMPRESS_DIR})
+
+file(ARCHIVE_CREATE
+ OUTPUT ${FULL_OUTPUT_NAME}
+ FORMAT "${COMPRESSION_FORMAT}"
+ TYPE "${COMPRESSION_TYPE}"
+ VERBOSE
+ DIRECTORY ${COMPRESS_DIR})
+
+file(ARCHIVE_EXTRACT
+ INPUT ${FULL_OUTPUT_NAME}
+ ${DECOMPRESSION_OPTIONS}
+ DESTINATION ${FULL_DECOMPRESS_DIR}
+ VERBOSE)
+
+if(CUSTOM_CHECK_FILES)
+ set(CHECK_FILES ${CUSTOM_CHECK_FILES})
+endif()
+
+foreach(file ${CHECK_FILES})
+ set(input ${FULL_COMPRESS_DIR}/${file})
+ set(output ${FULL_DECOMPRESS_DIR}/${COMPRESS_DIR}/${file})
+
+ if(NOT EXISTS ${input})
+ message(SEND_ERROR "Cannot find input file ${output}")
+ endif()
+
+ if(NOT EXISTS ${output})
+ message(SEND_ERROR "Cannot find output file ${output}")
+ endif()
+
+ file(MD5 ${input} input_md5)
+ file(MD5 ${output} output_md5)
+
+ if(NOT input_md5 STREQUAL output_md5)
+ message(SEND_ERROR "Files \"${input}\" and \"${output}\" are different")
+ endif()
+endforeach()
+
+foreach(file ${NOT_EXISTING_FILES_CHECK})
+ set(output ${FULL_DECOMPRESS_DIR}/${COMPRESS_DIR}/${file})
+
+ if(EXISTS ${output})
+ message(SEND_ERROR "File ${output} exists but it shouldn't")
+ endif()
+endforeach()
+
+function(check_magic EXPECTED)
+ file(READ ${FULL_OUTPUT_NAME} ACTUAL
+ ${ARGN}
+ )
+
+ if(NOT ACTUAL STREQUAL EXPECTED)
+ message(FATAL_ERROR
+ "Actual [${ACTUAL}] does not match expected [${EXPECTED}]")
+ endif()
+endfunction()
diff --git a/Tests/RunCMake/File_Archive/unsupported-format-result.txt b/Tests/RunCMake/File_Archive/unsupported-format-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/unsupported-format-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/File_Archive/unsupported-format-stderr.txt b/Tests/RunCMake/File_Archive/unsupported-format-stderr.txt
new file mode 100644
index 0000000..4328022
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/unsupported-format-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at roundtrip.cmake:38 \(file\):
+ file archive format rar not supported
+Call Stack \(most recent call first\):
+ unsupported-format.cmake:5 \(include\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Archive/unsupported-format.cmake b/Tests/RunCMake/File_Archive/unsupported-format.cmake
new file mode 100644
index 0000000..61edc1b
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/unsupported-format.cmake
@@ -0,0 +1,5 @@
+set(OUTPUT_NAME "test.rar")
+
+set(COMPRESSION_FORMAT rar)
+
+include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
diff --git a/Tests/RunCMake/File_Archive/zip-filtered.cmake b/Tests/RunCMake/File_Archive/zip-filtered.cmake
new file mode 100644
index 0000000..2d259bc
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/zip-filtered.cmake
@@ -0,0 +1,26 @@
+set(OUTPUT_NAME "test.zip")
+
+set(COMPRESSION_FORMAT zip)
+
+set(DECOMPRESSION_OPTIONS
+ FILES
+ compress_dir/f1.txt # Decompress only file
+ compress_dir/d1 # and whole directory
+)
+
+set(CUSTOM_CHECK_FILES
+ "f1.txt"
+ "d1/f1.txt"
+)
+
+# This files shouldn't exists
+set(NOT_EXISTING_FILES_CHECK
+ "d 2/f1.txt"
+ "d + 3/f1.txt"
+ "d_4/f1.txt"
+ "d-4/f1.txt"
+)
+
+include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
+
+check_magic("504b0304" LIMIT 4 HEX)
diff --git a/Tests/RunCMake/File_Archive/zip-with-bad-type-result.txt b/Tests/RunCMake/File_Archive/zip-with-bad-type-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/zip-with-bad-type-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/File_Archive/zip-with-bad-type-stderr.txt b/Tests/RunCMake/File_Archive/zip-with-bad-type-stderr.txt
new file mode 100644
index 0000000..fe12feb
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/zip-with-bad-type-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at roundtrip.cmake:38 \(file\):
+ file archive format zip does not support TYPE arguments
+Call Stack \(most recent call first\):
+ zip-with-bad-type.cmake:6 \(include\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Archive/zip-with-bad-type.cmake b/Tests/RunCMake/File_Archive/zip-with-bad-type.cmake
new file mode 100644
index 0000000..ebb97a3
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/zip-with-bad-type.cmake
@@ -0,0 +1,6 @@
+set(OUTPUT_NAME "test.zip")
+
+set(COMPRESSION_FORMAT zip)
+set(COMPRESSION_TYPE BZip2)
+
+include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
diff --git a/Tests/RunCMake/File_Archive/zip.cmake b/Tests/RunCMake/File_Archive/zip.cmake
new file mode 100644
index 0000000..1b93058
--- /dev/null
+++ b/Tests/RunCMake/File_Archive/zip.cmake
@@ -0,0 +1,7 @@
+set(OUTPUT_NAME "test.zip")
+
+set(COMPRESSION_FORMAT zip)
+
+include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
+
+check_magic("504b0304" LIMIT 4 HEX)
diff --git a/Tests/RunCMake/File_Configure/BadArg-result.txt b/Tests/RunCMake/File_Configure/BadArg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/BadArg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/File_Configure/BadArg-stderr.txt b/Tests/RunCMake/File_Configure/BadArg-stderr.txt
new file mode 100644
index 0000000..5423a28
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/BadArg-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at BadArg.cmake:[0-9]+ \(file\):
+ file Incorrect arguments to CONFIGURE subcommand.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Configure/BadArg.cmake b/Tests/RunCMake/File_Configure/BadArg.cmake
new file mode 100644
index 0000000..7c7fcda
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/BadArg.cmake
@@ -0,0 +1 @@
+file(CONFIGURE OUTPUT)
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt
new file mode 100644
index 0000000..acda654
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at BadArgGeneratorExpressionContent.cmake:[0-9]+ \(file\):
+ file CONFIGURE called with CONTENT containing a "<". This character is not
+ allowed.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake
new file mode 100644
index 0000000..75fe9e5
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake
@@ -0,0 +1,4 @@
+file(CONFIGURE
+ OUTPUT "file.txt"
+ CONTENT "foo-$<CONFIG>"
+)
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionOutput-result.txt b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionOutput-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionOutput-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionOutput-stderr.txt b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionOutput-stderr.txt
new file mode 100644
index 0000000..329d956
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionOutput-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at BadArgGeneratorExpressionOutput.cmake:[0-9]+ \(file\):
+ file CONFIGURE called with OUTPUT containing a "<". This character is not
+ allowed.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionOutput.cmake b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionOutput.cmake
new file mode 100644
index 0000000..31a79a7
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionOutput.cmake
@@ -0,0 +1,4 @@
+file(CONFIGURE
+ OUTPUT "file-$<CONFIG>.txt"
+ CONTENT "foo"
+)
diff --git a/Tests/RunCMake/File_Configure/CMakeLists.txt b/Tests/RunCMake/File_Configure/CMakeLists.txt
new file mode 100644
index 0000000..b7117bd
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.17)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/File_Configure/DirOutput-stderr.txt b/Tests/RunCMake/File_Configure/DirOutput-stderr.txt
new file mode 100644
index 0000000..d051f7c
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/DirOutput-stderr.txt
@@ -0,0 +1 @@
+^DirOutput test file$
diff --git a/Tests/RunCMake/File_Configure/DirOutput.cmake b/Tests/RunCMake/File_Configure/DirOutput.cmake
new file mode 100644
index 0000000..aa0fadf
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/DirOutput.cmake
@@ -0,0 +1,4 @@
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DirOutput)
+configure_file(DirOutput.txt DirOutput)
+file(READ ${CMAKE_CURRENT_BINARY_DIR}/DirOutput/DirOutput.txt out)
+message("${out}")
diff --git a/Tests/RunCMake/File_Configure/DirOutput.txt b/Tests/RunCMake/File_Configure/DirOutput.txt
new file mode 100644
index 0000000..16388a6
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/DirOutput.txt
@@ -0,0 +1 @@
+DirOutput test file
diff --git a/Tests/RunCMake/File_Configure/NewLineStyle-NoArg-result.txt b/Tests/RunCMake/File_Configure/NewLineStyle-NoArg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/NewLineStyle-NoArg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/File_Configure/NewLineStyle-NoArg-stderr.txt b/Tests/RunCMake/File_Configure/NewLineStyle-NoArg-stderr.txt
new file mode 100644
index 0000000..5a8ed2c
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/NewLineStyle-NoArg-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at NewLineStyle-NoArg.cmake:[0-9]+ \(file\):
+ file CONFIGURE NEWLINE_STYLE must set a style: LF, CRLF, UNIX, DOS, or
+ WIN32
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Configure/NewLineStyle-NoArg.cmake b/Tests/RunCMake/File_Configure/NewLineStyle-NoArg.cmake
new file mode 100644
index 0000000..d6738b4
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/NewLineStyle-NoArg.cmake
@@ -0,0 +1,6 @@
+set(file_name ${CMAKE_CURRENT_BINARY_DIR}/NewLineStyle.txt)
+file(CONFIGURE
+ OUTPUT ${file_name}
+ CONTENT "Data\n"
+ NEWLINE_STYLE
+)
diff --git a/Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake b/Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake
new file mode 100644
index 0000000..e384873
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/NewLineStyle-ValidArg.cmake
@@ -0,0 +1,20 @@
+set(file_name ${CMAKE_CURRENT_BINARY_DIR}/NewLineStyle.txt)
+
+function(test_eol style in out)
+ file(CONFIGURE
+ OUTPUT ${file_name}
+ CONTENT "@in@"
+ NEWLINE_STYLE ${style}
+ )
+ file(READ ${file_name} new HEX)
+ if(NOT "${new}" STREQUAL "${out}")
+ message(FATAL_ERROR "No ${style} line endings")
+ endif()
+endfunction()
+
+test_eol(DOS "a" "610d0a")
+test_eol(WIN32 "b" "620d0a")
+test_eol(CRLF "c" "630d0a")
+
+test_eol(UNIX "d" "640a")
+test_eol(LF "e" "650a")
diff --git a/Tests/RunCMake/File_Configure/NewLineStyle-WrongArg-result.txt b/Tests/RunCMake/File_Configure/NewLineStyle-WrongArg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/NewLineStyle-WrongArg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/File_Configure/NewLineStyle-WrongArg-stderr.txt b/Tests/RunCMake/File_Configure/NewLineStyle-WrongArg-stderr.txt
new file mode 100644
index 0000000..c1bb42c
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/NewLineStyle-WrongArg-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at NewLineStyle-WrongArg.cmake:[0-9]+ \(file\):
+ file CONFIGURE NEWLINE_STYLE sets an unknown style, only LF, CRLF, UNIX,
+ DOS, and WIN32 are supported
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Configure/NewLineStyle-WrongArg.cmake b/Tests/RunCMake/File_Configure/NewLineStyle-WrongArg.cmake
new file mode 100644
index 0000000..7d38167
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/NewLineStyle-WrongArg.cmake
@@ -0,0 +1,6 @@
+set(file_name ${CMAKE_CURRENT_BINARY_DIR}/NewLineStyle.txt)
+file(CONFIGURE
+ OUTPUT ${file_name}
+ CONTENT "Data\n"
+ NEWLINE_STYLE FOO
+)
diff --git a/Tests/RunCMake/File_Configure/RunCMakeTest.cmake b/Tests/RunCMake/File_Configure/RunCMakeTest.cmake
new file mode 100644
index 0000000..d09d648
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/RunCMakeTest.cmake
@@ -0,0 +1,9 @@
+include(RunCMake)
+
+run_cmake(BadArg)
+run_cmake(BadArgGeneratorExpressionContent)
+run_cmake(BadArgGeneratorExpressionOutput)
+run_cmake(DirOutput)
+run_cmake(NewLineStyle-NoArg)
+run_cmake(NewLineStyle-ValidArg)
+run_cmake(NewLineStyle-WrongArg)
diff --git a/Tests/RunCMake/File_Generate/CMP0070-OLD-stderr.txt b/Tests/RunCMake/File_Generate/CMP0070-OLD-stderr.txt
new file mode 100644
index 0000000..bb578e5
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/CMP0070-OLD-stderr.txt
@@ -0,0 +1,10 @@
+^CMake Deprecation Warning at CMP0070-OLD.cmake:[0-9]+ \(cmake_policy\):
+ The OLD behavior for policy CMP0070 will be removed from a future version
+ of CMake.
+
+ The cmake-policies\(7\) manual explains that the OLD behaviors of all
+ policies are deprecated and that a policy should be set to OLD only under
+ specific short-term circumstances. Projects should be ported to the NEW
+ behavior and not rely on setting a policy to OLD.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_APPBUNDLE_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_APPBUNDLE_PATH.cmake
index 2687efe..bf8cd4e 100644
--- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_APPBUNDLE_PATH.cmake
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_APPBUNDLE_PATH.cmake
@@ -4,53 +4,13 @@ enable_language(C)
# Prepare environment and variables
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
set(CMAKE_APPBUNDLE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pc-foo")
-if(WIN32)
- set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}\\dummy-pkg-config.bat")
- set(ENV{CMAKE_APPBUNDLE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}\\pc-bar;X:\\this\\directory\\should\\not\\exist\\in\\the\\filesystem")
- set(ENV{PKG_CONFIG_PATH} "C:\\baz")
-else()
- set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}/dummy-pkg-config.sh")
- set(ENV{CMAKE_APPBUNDLE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/pc-bar:/this/directory/should/not/exist/in/the/filesystem")
- set(ENV{PKG_CONFIG_PATH} "/baz")
-endif()
-
+set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}/dummy-pkg-config.sh")
+set(ENV{CMAKE_APPBUNDLE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/pc-bar:/this/directory/should/not/exist/in/the/filesystem")
+set(ENV{PKG_CONFIG_PATH} "/baz")
find_package(PkgConfig)
-
-if(NOT DEFINED CMAKE_SYSTEM_NAME
- OR (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$"
- AND NOT CMAKE_CROSSCOMPILING))
- if(EXISTS "/etc/debian_version") # is this a debian system ?
- if(CMAKE_LIBRARY_ARCHITECTURE MATCHES "^(i386-linux-gnu|x86_64-linux-gnu)$")
- # Cannot create directories for all the existing architectures...
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- else()
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- endif()
- else()
- # not debian, check the FIND_LIBRARY_USE_LIB32_PATHS and FIND_LIBRARY_USE_LIB64_PATHS properties
- get_property(uselibx32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS)
- get_property(uselib32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS)
- get_property(uselib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
- if(uselibx32 AND CMAKE_INTERNAL_PLATFORM_ABI STREQUAL "ELF X32")
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/libx32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/libx32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- elseif(uselib32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- elseif(uselib64 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- else()
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- endif()
- endif()
-else()
- if(WIN32)
- set(expected_path "C:\\baz;${CMAKE_CURRENT_SOURCE_DIR}\\pc-foo\\lib\\pkgconfig;${CMAKE_CURRENT_SOURCE_DIR}\\pc-bar\\lib\\pkgconfig")
- else()
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- endif()
-endif()
-
+set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
pkg_check_modules(FOO "${expected_path}")
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_FRAMEWORK_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_FRAMEWORK_PATH.cmake
index 74cda25..37c18fc 100644
--- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_FRAMEWORK_PATH.cmake
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_FRAMEWORK_PATH.cmake
@@ -4,53 +4,13 @@ enable_language(C)
# Prepare environment and variables
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
set(CMAKE_FRAMEWORK_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pc-foo")
-if(WIN32)
- set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}\\dummy-pkg-config.bat")
- set(ENV{CMAKE_FRAMEWORK_PATH} "${CMAKE_CURRENT_SOURCE_DIR}\\pc-bar;X:\\this\\directory\\should\\not\\exist\\in\\the\\filesystem")
- set(ENV{PKG_CONFIG_PATH} "C:\\baz")
-else()
- set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}/dummy-pkg-config.sh")
- set(ENV{CMAKE_FRAMEWORK_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/pc-bar:/this/directory/should/not/exist/in/the/filesystem")
- set(ENV{PKG_CONFIG_PATH} "/baz")
-endif()
-
+set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}/dummy-pkg-config.sh")
+set(ENV{CMAKE_FRAMEWORK_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/pc-bar:/this/directory/should/not/exist/in/the/filesystem")
+set(ENV{PKG_CONFIG_PATH} "/baz")
find_package(PkgConfig)
-
-if(NOT DEFINED CMAKE_SYSTEM_NAME
- OR (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$"
- AND NOT CMAKE_CROSSCOMPILING))
- if(EXISTS "/etc/debian_version") # is this a debian system ?
- if(CMAKE_LIBRARY_ARCHITECTURE MATCHES "^(i386-linux-gnu|x86_64-linux-gnu)$")
- # Cannot create directories for all the existing architectures...
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- else()
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- endif()
- else()
- # not debian, check the FIND_LIBRARY_USE_LIB64_PATHS and FIND_LIBRARY_USE_LIB64_PATHS properties
- get_property(uselibx32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS)
- get_property(uselib32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS)
- get_property(uselib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
- if(uselibx32 AND CMAKE_INTERNAL_PLATFORM_ABI STREQUAL "ELF X32")
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/libx32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/libx32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- elseif(uselib32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- elseif(uselib64 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- else()
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- endif()
- endif()
-else()
- if(WIN32)
- set(expected_path "C:\\baz;${CMAKE_CURRENT_SOURCE_DIR}\\pc-foo\\lib\\pkgconfig;${CMAKE_CURRENT_SOURCE_DIR}\\pc-bar\\lib\\pkgconfig")
- else()
- set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
- endif()
-endif()
-
+set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
pkg_check_modules(FOO "${expected_path}")
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_extract_frameworks.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_extract_frameworks.cmake
new file mode 100644
index 0000000..fde886d
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_extract_frameworks.cmake
@@ -0,0 +1,13 @@
+find_package(PkgConfig)
+
+set(foobar_LDFLAGS_OTHER "-Wl,xy;-framework;bar;-Wl,other-framework;-framework;baz;-Wl,abc;-framework;gosh;-frameworkcrap;-frame;j;-framework;nix;-Wl,def")
+set(foobar_LIBRARIES "-lz;-lm")
+
+_pkgconfig_extract_frameworks("foobar")
+
+if (NOT foobar_LDFLAGS_OTHER STREQUAL "-Wl,xy;-Wl,other-framework;-Wl,abc;-frameworkcrap;-frame;j;-Wl,def")
+ message(SEND_ERROR "foobar_LDFLAGS_OTHER did not match: ${foobar_LDFLAGS_OTHER}")
+endif ()
+if (NOT foobar_LIBRARIES STREQUAL "-lz;-lm;-framework bar;-framework baz;-framework gosh;-framework nix")
+ message(SEND_ERROR "foobar_LIBRARIES did not match: ${foobar_LIBRARIES}")
+endif ()
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_extract_frameworks_target.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_extract_frameworks_target.cmake
new file mode 100644
index 0000000..5501d9f
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_extract_frameworks_target.cmake
@@ -0,0 +1,29 @@
+# Prepare environment to reuse bletch.pc
+file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pc-bletch/lib/pkgconfig" PC_PATH)
+if(UNIX)
+ string(REPLACE "\\ " " " PC_PATH "${PC_PATH}")
+endif()
+set(ENV{PKG_CONFIG_PATH} "${PC_PATH}")
+
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(Bletch IMPORTED_TARGET REQUIRED bletch-framework)
+
+if (Bletch_LDFLAGS_OTHER)
+ message(SEND_ERROR "Bletch_LDFLAGS_OTHER should be empty, but is '${Bletch_LDFLAGS_OTHER}'")
+endif ()
+
+if (NOT Bletch_LINK_LIBRARIES STREQUAL "-framework foo;-framework bar;bletch;-framework baz")
+ message(SEND_ERROR "Bletch_LINK_LIBRARIES has wrong value '${Bletch_LINK_LIBRARIES}'")
+endif ()
+
+foreach (prop IN ITEMS INTERFACE_INCLUDE_DIRECTORIES INTERFACE_LINK_OPTIONS INTERFACE_COMPILE_OPTIONS)
+ get_target_property(prop_value PkgConfig::Bletch ${prop})
+ if (prop_value)
+ message(SEND_ERROR "target property ${prop} should not be set, but is '${prop_value}'")
+ endif ()
+endforeach ()
+
+get_target_property(prop_value PkgConfig::Bletch INTERFACE_LINK_LIBRARIES)
+if (NOT prop_value STREQUAL Bletch_LINK_LIBRARIES)
+ message(SEND_ERROR "target property INTERFACE_LINK_LIBRARIES has wrong value '${prop_value}'")
+endif ()
diff --git a/Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist-stdout.txt b/Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist-stdout.txt
new file mode 100644
index 0000000..ef5f7f6
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist-stdout.txt
@@ -0,0 +1,6 @@
+-- Could NOT find PkgConfig \(missing: PKG_CONFIG_EXECUTABLE\) *
+ Reason given by package: The command
+ "pkg-config-does-not-exist" --version
+ failed with output.*
+-- PKG_CONFIG_FOUND='FALSE'
+-- PKG_CONFIG_EXECUTABLE=''
diff --git a/Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist.cmake b/Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist.cmake
new file mode 100644
index 0000000..a4fabde
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist.cmake
@@ -0,0 +1,4 @@
+set(PKG_CONFIG_EXECUTABLE "pkg-config-does-not-exist" CACHE FILEPATH "")
+find_package(PkgConfig)
+message(STATUS "PKG_CONFIG_FOUND='${PKG_CONFIG_FOUND}'")
+message(STATUS "PKG_CONFIG_EXECUTABLE='${PKG_CONFIG_EXECUTABLE}'")
diff --git a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
index b77bb54..dc77915 100644
--- a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
@@ -1,11 +1,15 @@
include(RunCMake)
+run_cmake(PkgConfigDoesNotExist)
+
run_cmake(FindPkgConfig_NO_PKGCONFIG_PATH)
run_cmake(FindPkgConfig_PKGCONFIG_PATH)
run_cmake(FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH)
run_cmake(FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH)
+run_cmake(FindPkgConfig_extract_frameworks)
if(APPLE)
+ run_cmake(FindPkgConfig_extract_frameworks_target)
run_cmake(FindPkgConfig_CMAKE_FRAMEWORK_PATH)
run_cmake(FindPkgConfig_CMAKE_APPBUNDLE_PATH)
endif()
diff --git a/Tests/RunCMake/FindPkgConfig/pc-bletch/lib/pkgconfig/bletch-framework.pc b/Tests/RunCMake/FindPkgConfig/pc-bletch/lib/pkgconfig/bletch-framework.pc
new file mode 100644
index 0000000..cc680ae
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/pc-bletch/lib/pkgconfig/bletch-framework.pc
@@ -0,0 +1,9 @@
+prefix=/opt/bletch
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Bletch
+Description: Dummy packaget to test variable support
+Version: 1.3
+Libs: -L${libdir} -framework foo -framework bar -lbletch -framework baz
diff --git a/Tests/RunCMake/FindSWIG/CMakeLists.txt b/Tests/RunCMake/FindSWIG/CMakeLists.txt
new file mode 100644
index 0000000..d1b0d2c
--- /dev/null
+++ b/Tests/RunCMake/FindSWIG/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.10)
+project(${RunCMake_TEST} C)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/FindSWIG/RunCMakeTest.cmake b/Tests/RunCMake/FindSWIG/RunCMakeTest.cmake
new file mode 100644
index 0000000..5f5f7f5
--- /dev/null
+++ b/Tests/RunCMake/FindSWIG/RunCMakeTest.cmake
@@ -0,0 +1,4 @@
+include(RunCMake)
+
+run_cmake(components)
+run_cmake(missing-components)
diff --git a/Tests/RunCMake/FindSWIG/components-stdout.txt b/Tests/RunCMake/FindSWIG/components-stdout.txt
new file mode 100644
index 0000000..3977b08
--- /dev/null
+++ b/Tests/RunCMake/FindSWIG/components-stdout.txt
@@ -0,0 +1,6 @@
+-- Found SWIG: [^ ]+ \(found version "[0-9.]+"\) found components: java python missing components: PERL
+-- SWIG_VERSION='[0-9.]+'
+-- SWIG_java_FOUND=TRUE
+-- SWIG_python_FOUND=TRUE
+-- SWIG_PERL_FOUND=
+-- Configuring done
diff --git a/Tests/RunCMake/FindSWIG/components.cmake b/Tests/RunCMake/FindSWIG/components.cmake
new file mode 100644
index 0000000..b79a81e
--- /dev/null
+++ b/Tests/RunCMake/FindSWIG/components.cmake
@@ -0,0 +1,9 @@
+# Note that 'perl' will not be found because it is not lowercase.
+find_package(SWIG REQUIRED
+ COMPONENTS java
+ OPTIONAL_COMPONENTS python PERL)
+
+message(STATUS "SWIG_VERSION='${SWIG_VERSION}'")
+foreach(_lang java python PERL)
+ message(STATUS "SWIG_${_lang}_FOUND=${SWIG_${_lang}_FOUND}")
+endforeach()
diff --git a/Tests/RunCMake/FindSWIG/missing-components-result.txt b/Tests/RunCMake/FindSWIG/missing-components-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/FindSWIG/missing-components-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/FindSWIG/missing-components-stderr.txt b/Tests/RunCMake/FindSWIG/missing-components-stderr.txt
new file mode 100644
index 0000000..c937532
--- /dev/null
+++ b/Tests/RunCMake/FindSWIG/missing-components-stderr.txt
@@ -0,0 +1 @@
+Could NOT find SWIG \(missing: invalid\)
diff --git a/Tests/RunCMake/FindSWIG/missing-components.cmake b/Tests/RunCMake/FindSWIG/missing-components.cmake
new file mode 100644
index 0000000..1d05ae4
--- /dev/null
+++ b/Tests/RunCMake/FindSWIG/missing-components.cmake
@@ -0,0 +1,3 @@
+find_package(SWIG REQUIRED
+ COMPONENTS invalid
+ OPTIONAL_COMPONENTS alsoinvalid)
diff --git a/Tests/RunCMake/Framework/FrameworkMultiConfigPostfix-build-final-check.cmake b/Tests/RunCMake/Framework/FrameworkMultiConfigPostfix-build-final-check.cmake
new file mode 100644
index 0000000..76fe6b8
--- /dev/null
+++ b/Tests/RunCMake/Framework/FrameworkMultiConfigPostfix-build-final-check.cmake
@@ -0,0 +1,45 @@
+include("${RunCMake_TEST_BINARY_DIR}/FrameworkMultiConfigPostfixInfo.cmake")
+
+get_filename_component(framework_location "${framework_dir}" DIRECTORY)
+set(non_existent_debug_framework_dir "${framework_location}/${target_file_name}_debug.framework")
+set(framework_resources "${framework_dir}/Resources")
+set(plist_file "${framework_resources}/Info.plist")
+
+set(symlink_release_path "${framework_dir}/${target_file_name}")
+set(framework_release_path "${framework_dir}/Versions/A/${target_file_name}")
+
+# When using a multi config generator (like Ninja Multi-Config and Xcode),
+# the postfix will be applied to the debug framework library name and the symlink name.
+# For single config generators, the name stays the same as the the release framework.
+if(is_multi_config)
+ set(symlink_debug_path "${framework_dir}/${target_file_name}_debug")
+ set(framework_debug_path "${framework_dir}/Versions/A/${target_file_name}_debug")
+else()
+ set(symlink_debug_path "${framework_dir}/${target_file_name}")
+ set(framework_debug_path "${framework_dir}/Versions/A/${target_file_name}")
+endif()
+
+if(NOT IS_DIRECTORY ${framework_dir})
+ message(SEND_ERROR "Framework dir not found at ${framework_dir}")
+endif()
+
+if(IS_DIRECTORY ${non_existent_debug_framework_dir})
+ message(SEND_ERROR
+ "A framework dir with a debug suffix should not exist at ${non_existent_debug_framework_dir}")
+endif()
+
+if(NOT IS_SYMLINK "${symlink_release_path}")
+ message(SEND_ERROR "Release framework symlink not found at ${symlink_release_path}")
+endif()
+
+if(NOT IS_SYMLINK "${symlink_debug_path}")
+ message(SEND_ERROR "Debug framework symlink not found at ${symlink_debug_path}")
+endif()
+
+if(NOT EXISTS "${framework_release_path}")
+ message(SEND_ERROR "Release framework not found at ${framework_release_path}")
+endif()
+
+if(NOT EXISTS "${framework_debug_path}")
+ message(SEND_ERROR "Debug framework not found at ${framework_debug_path}")
+endif()
diff --git a/Tests/RunCMake/Framework/FrameworkMultiConfigPostfix.cmake b/Tests/RunCMake/Framework/FrameworkMultiConfigPostfix.cmake
new file mode 100644
index 0000000..51e627d
--- /dev/null
+++ b/Tests/RunCMake/Framework/FrameworkMultiConfigPostfix.cmake
@@ -0,0 +1,25 @@
+enable_language(C)
+
+set(CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_DEBUG "_debug")
+
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/lib)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/lib)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/bin)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/bin)
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/lib)
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/lib)
+
+set(target_name "mylib")
+add_library(${target_name} SHARED foo.c)
+set_property(TARGET ${target_name} PROPERTY FRAMEWORK ON)
+get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+
+string(APPEND content
+ "set(is_multi_config \"${is_multi_config}\")\n"
+ "set(framework_dir \"$<TARGET_BUNDLE_DIR:${target_name}>\")\n"
+ "set(target_file_name ${target_name})\n")
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/FrameworkMultiConfigPostfixInfo.cmake
+ CONTENT "${content}")
diff --git a/Tests/RunCMake/Framework/RunCMakeTest.cmake b/Tests/RunCMake/Framework/RunCMakeTest.cmake
index 965fbf4..6ee61a3 100644
--- a/Tests/RunCMake/Framework/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Framework/RunCMakeTest.cmake
@@ -45,3 +45,39 @@ framework_type_test(ios SHARED YES)
framework_type_test(ios STATIC YES)
framework_type_test(osx SHARED YES)
framework_type_test(osx STATIC YES)
+
+function(framework_multi_config_postfix_test)
+ set(configure_name "FrameworkMultiConfigPostfix")
+ set(build_name "${configure_name}-build-intermediate")
+ set(build_name_final "${configure_name}-build-final")
+
+ if(RunCMake_GENERATOR MATCHES "Ninja Multi-Config")
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release;-DCMAKE_CROSS_CONFIGS=all")
+ elseif(RunCMake_GENERATOR MATCHES "Xcode")
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release")
+ else()
+ set(RunCMake_TEST_OPTIONS "-DCMAKE_BUILD_TYPE=Debug")
+ endif()
+
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${configure_name})
+ set(RunCMake_TEST_NO_CLEAN 1)
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+ run_cmake(${configure_name})
+ unset(RunCMake_TEST_OPTIONS)
+
+ if(RunCMake_GENERATOR MATCHES "Ninja Multi-Config")
+ run_cmake_command(${build_name_final} ${CMAKE_COMMAND} --build . --target all:all)
+ elseif(RunCMake_GENERATOR MATCHES "Xcode")
+ run_cmake_command(${build_name} ${CMAKE_COMMAND} --build . --config Release)
+ run_cmake_command(${build_name} ${CMAKE_COMMAND} --build . --config Debug)
+ run_cmake_command(${build_name_final} ${CMAKE_COMMAND} --build . --config Debug)
+ else()
+ run_cmake_command(${build_name_final} ${CMAKE_COMMAND} --build .)
+ endif()
+endfunction()
+
+framework_multi_config_postfix_test()
diff --git a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
index 18c3340..b3977f1 100644
--- a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
@@ -26,4 +26,12 @@ function(run_GEH)
endforeach()
endfunction()
+# remove these flags from the enviornment if they have been set
+# so the tests run the correct env
+set(env_cxx_flags $ENV{CXXFLAGS})
+if(env_cxx_flags)
+ string(REPLACE "-fvisibility=hidden" "" env_cxx_flags "${env_cxx_flags}")
+ string(REPLACE "-fvisibility-inlines-hidden" "" env_cxx_flags "${env_cxx_flags}")
+ set(ENV{CXXFLAGS} "${env_cxx_flags}")
+endif()
run_GEH()
diff --git a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp
index ba77679..dcaa4f2 100644
--- a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp
+++ b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp
@@ -32,14 +32,14 @@ void compare(const char* refName, const char* testName)
// trailing null to the string that we need to strip before testing for a
// trailing space.
if (refLine.size() && refLine[refLine.size() - 1] == 0) {
- refLine = refLine.substr(0, refLine.size() - 1);
+ refLine.resize(refLine.size() - 1);
}
if (testLine.size() && testLine[testLine.size() - 1] == 0) {
- testLine = testLine.substr(0, testLine.size() - 1);
+ testLine.resize(testLine.size() - 1);
}
// The reference files never have trailing spaces:
if (testLine.size() && testLine[testLine.size() - 1] == ' ') {
- testLine = testLine.substr(0, testLine.size() - 1);
+ testLine.resize(testLine.size() - 1);
}
if (refLine != testLine) {
std::cout << "Ref and test are not the same:\n Ref: \"" << refLine
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-stderr.txt
new file mode 100644
index 0000000..eb15834
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at DEVICE_LINK-add_custom_command.cmake:[0-9]+ \(add_custom_command\):
+ Error evaluating generator expression:
+
+ \$<DEVICE_LINK>
+
+ \$<DEVICE_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command.cmake
new file mode 100644
index 0000000..01b3784
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command.cmake
@@ -0,0 +1,4 @@
+add_custom_target(drive)
+add_custom_command(TARGET drive PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E echo $<DEVICE_LINK>
+)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-stderr.txt
new file mode 100644
index 0000000..cdd3043
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at DEVICE_LINK-add_custom_target.cmake:[0-9]+ \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<DEVICE_LINK>
+
+ \$<DEVICE_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target.cmake
new file mode 100644
index 0000000..35728e9
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target.cmake
@@ -0,0 +1,3 @@
+add_custom_target(drive
+ COMMAND ${CMAKE_COMMAND} -E echo $<DEVICE_LINK>
+)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-stderr.txt
new file mode 100644
index 0000000..56b595c
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at DEVICE_LINK-add_executable.cmake:[0-9]+ \(add_executable\):
+ Error evaluating generator expression:
+
+ \$<DEVICE_LINK:empty.c>
+
+ \$<DEVICE_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable.cmake
new file mode 100644
index 0000000..899f8f6
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable.cmake
@@ -0,0 +1 @@
+add_executable(empty $<DEVICE_LINK:empty.c>)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-stderr.txt
new file mode 100644
index 0000000..4477e00
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at DEVICE_LINK-add_library.cmake:[0-9]+ \(add_library\):
+ Error evaluating generator expression:
+
+ \$<DEVICE_LINK:empty.c>
+
+ \$<DEVICE_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library.cmake
new file mode 100644
index 0000000..fc8547b
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library.cmake
@@ -0,0 +1 @@
+add_library(empty $<DEVICE_LINK:empty.c>)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-stderr.txt
new file mode 100644
index 0000000..99561fe
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at DEVICE_LINK-add_test.cmake:[0-9]+ \(add_test\):
+ Error evaluating generator expression:
+
+ \$<DEVICE_LINK>
+
+ \$<DEVICE_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test.cmake
new file mode 100644
index 0000000..87d6ba1
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test.cmake
@@ -0,0 +1,5 @@
+
+include(CTest)
+enable_testing()
+
+add_test(NAME dummy COMMAND ${CMAKE_COMMAND} -E echo $<DEVICE_LINK>)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-stderr.txt
new file mode 100644
index 0000000..afb3090
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error:
+ Error evaluating generator expression:
+
+ \$<DEVICE_LINK:empty>
+
+ \$<DEVICE_LINK:...> may only be used with binary targets to specify link
+ options.
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install.cmake
new file mode 100644
index 0000000..4b6dbef
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install.cmake
@@ -0,0 +1,5 @@
+
+install(FILES
+ $<DEVICE_LINK:empty>
+ DESTINATION src
+)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-stderr.txt
new file mode 100644
index 0000000..4fa0522
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error:
+ Error evaluating generator expression:
+
+ \$<DEVICE_LINK:lib>
+
+ \$<DEVICE_LINK:...> may only be used with binary targets to specify link
+ options.
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends.cmake
new file mode 100644
index 0000000..8129514
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends.cmake
@@ -0,0 +1,7 @@
+
+enable_language(C)
+
+add_library(lib empty.c)
+
+add_executable(empty empty.c)
+set_property(TARGET empty PROPERTY LINK_DEPENDS $<DEVICE_LINK:lib>)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-stderr.txt
new file mode 100644
index 0000000..c0185e3
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at DEVICE_LINK-target_compile_definitions.cmake:[0-9]+ \(target_compile_definitions\):
+ Error evaluating generator expression:
+
+ \$<DEVICE_LINK:DEF>
+
+ \$<DEVICE_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions.cmake
new file mode 100644
index 0000000..aaa8efc
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_compile_definitions(empty PRIVATE $<DEVICE_LINK:DEF>)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-stderr.txt
new file mode 100644
index 0000000..34ca4f2
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at DEVICE_LINK-target_compile_options.cmake:[0-9]+ \(target_compile_options\):
+ Error evaluating generator expression:
+
+ \$<DEVICE_LINK:-OPT>
+
+ \$<DEVICE_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options.cmake
new file mode 100644
index 0000000..a9cb7fd
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_compile_options(empty PRIVATE $<DEVICE_LINK:-OPT>)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-stderr.txt
new file mode 100644
index 0000000..4d1642d
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at DEVICE_LINK-target_include_directories.cmake:[0-9]+ \(target_include_directories\):
+ Error evaluating generator expression:
+
+ \$<DEVICE_LINK:/DIR>
+
+ \$<DEVICE_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories.cmake
new file mode 100644
index 0000000..03cc413
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_include_directories(empty PRIVATE $<DEVICE_LINK:/DIR>)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-stderr.txt
new file mode 100644
index 0000000..d924916
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at DEVICE_LINK-target_link_directories.cmake:[0-9]+ \(target_link_directories\):
+ Error evaluating generator expression:
+
+ \$<DEVICE_LINK:/DIR>
+
+ \$<DEVICE_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories.cmake
new file mode 100644
index 0000000..e50d27d
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories.cmake
@@ -0,0 +1,7 @@
+
+enable_language(C)
+
+add_library(lib empty.c)
+
+add_executable(empty empty.c)
+target_link_directories(empty PRIVATE $<DEVICE_LINK:/DIR>)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-stderr.txt
new file mode 100644
index 0000000..1436fa8
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at DEVICE_LINK-target_link_libraries.cmake:[0-9]+ \(target_link_libraries\):
+ Error evaluating generator expression:
+
+ \$<DEVICE_LINK:lib>
+
+ \$<DEVICE_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries.cmake
new file mode 100644
index 0000000..971f562
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries.cmake
@@ -0,0 +1,7 @@
+
+enable_language(C)
+
+add_library(lib empty.c)
+
+add_executable(empty empty.c)
+target_link_libraries(empty PRIVATE $<DEVICE_LINK:lib>)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-stderr.txt
new file mode 100644
index 0000000..c9b602d
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at DEVICE_LINK-target_sources.cmake:[0-9]+ \(target_sources\):
+ Error evaluating generator expression:
+
+ \$<DEVICE_LINK:empty.c>
+
+ \$<DEVICE_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources.cmake
new file mode 100644
index 0000000..94bac9e
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources.cmake
@@ -0,0 +1,2 @@
+add_library(empty)
+target_sources(empty PRIVATE $<DEVICE_LINK:empty.c>)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-stderr.txt
new file mode 100644
index 0000000..5ad41b9
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at HOST_LINK-add_custom_command.cmake:[0-9]+ \(add_custom_command\):
+ Error evaluating generator expression:
+
+ \$<HOST_LINK>
+
+ \$<HOST_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command.cmake
new file mode 100644
index 0000000..4d6e305
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command.cmake
@@ -0,0 +1,4 @@
+add_custom_target(drive)
+add_custom_command(TARGET drive PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E echo $<HOST_LINK>
+)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-stderr.txt
new file mode 100644
index 0000000..c44202a
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at HOST_LINK-add_custom_target.cmake:[0-9]+ \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<HOST_LINK>
+
+ \$<HOST_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target.cmake
new file mode 100644
index 0000000..eec072a
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target.cmake
@@ -0,0 +1,3 @@
+add_custom_target(drive
+ COMMAND ${CMAKE_COMMAND} -E echo $<HOST_LINK>
+)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-stderr.txt
new file mode 100644
index 0000000..b395515
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at HOST_LINK-add_executable.cmake:[0-9]+ \(add_executable\):
+ Error evaluating generator expression:
+
+ \$<HOST_LINK:empty.c>
+
+ \$<HOST_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable.cmake
new file mode 100644
index 0000000..c9f74a5
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable.cmake
@@ -0,0 +1 @@
+add_executable(empty $<HOST_LINK:empty.c>)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-stderr.txt
new file mode 100644
index 0000000..4bd27be
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at HOST_LINK-add_library.cmake:[0-9]+ \(add_library\):
+ Error evaluating generator expression:
+
+ \$<HOST_LINK:empty.c>
+
+ \$<HOST_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library.cmake
new file mode 100644
index 0000000..44135af
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library.cmake
@@ -0,0 +1 @@
+add_library(empty $<HOST_LINK:empty.c>)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-stderr.txt
new file mode 100644
index 0000000..012ad21
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at HOST_LINK-add_test.cmake:[0-9]+ \(add_test\):
+ Error evaluating generator expression:
+
+ \$<HOST_LINK>
+
+ \$<HOST_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test.cmake
new file mode 100644
index 0000000..4b472af
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test.cmake
@@ -0,0 +1,5 @@
+
+include(CTest)
+enable_testing()
+
+add_test(NAME dummy COMMAND ${CMAKE_COMMAND} -E echo $<HOST_LINK>)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-install-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-install-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-install-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-install-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-install-stderr.txt
new file mode 100644
index 0000000..c265ec4
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-install-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error:
+ Error evaluating generator expression:
+
+ \$<HOST_LINK:empty>
+
+ \$<HOST_LINK:...> may only be used with binary targets to specify link
+ options.
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-install.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-install.cmake
new file mode 100644
index 0000000..b4dff68
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-install.cmake
@@ -0,0 +1,5 @@
+
+install(FILES
+ $<HOST_LINK:empty>
+ DESTINATION src
+)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-stderr.txt
new file mode 100644
index 0000000..24b8b82
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-stderr.txt
@@ -0,0 +1,7 @@
+CMake Error:
+ Error evaluating generator expression:
+
+ \$<HOST_LINK:lib>
+
+ \$<HOST_LINK:...> may only be used with binary targets to specify link
+ options.
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends.cmake
new file mode 100644
index 0000000..0402f43
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends.cmake
@@ -0,0 +1,7 @@
+
+enable_language(C)
+
+add_library(lib empty.c)
+
+add_executable(empty empty.c)
+set_property(TARGET empty PROPERTY LINK_DEPENDS $<HOST_LINK:lib>)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-stderr.txt
new file mode 100644
index 0000000..6ab3c14
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at HOST_LINK-target_compile_definitions.cmake:[0-9]+ \(target_compile_definitions\):
+ Error evaluating generator expression:
+
+ \$<HOST_LINK:DEF>
+
+ \$<HOST_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions.cmake
new file mode 100644
index 0000000..f6c130d
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_compile_definitions(empty PRIVATE $<HOST_LINK:DEF>)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-stderr.txt
new file mode 100644
index 0000000..0f5bbc3
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at HOST_LINK-target_compile_options.cmake:[0-9]+ \(target_compile_options\):
+ Error evaluating generator expression:
+
+ \$<HOST_LINK:-OPT>
+
+ \$<HOST_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options.cmake
new file mode 100644
index 0000000..53afea1
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_compile_options(empty PRIVATE $<HOST_LINK:-OPT>)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-stderr.txt
new file mode 100644
index 0000000..9a2634a
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at HOST_LINK-target_include_directories.cmake:[0-9]+ \(target_include_directories\):
+ Error evaluating generator expression:
+
+ \$<HOST_LINK:/DIR>
+
+ \$<HOST_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories.cmake
new file mode 100644
index 0000000..aff1009
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_include_directories(empty PRIVATE $<HOST_LINK:/DIR>)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-stderr.txt
new file mode 100644
index 0000000..5225a52
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at HOST_LINK-target_link_directories.cmake:[0-9]+ \(target_link_directories\):
+ Error evaluating generator expression:
+
+ \$<HOST_LINK:/DIR>
+
+ \$<HOST_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories.cmake
new file mode 100644
index 0000000..97488ee
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories.cmake
@@ -0,0 +1,7 @@
+
+enable_language(C)
+
+add_library(lib empty.c)
+
+add_executable(empty empty.c)
+target_link_directories(empty PRIVATE $<HOST_LINK:/DIR>)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-stderr.txt
new file mode 100644
index 0000000..6c4441f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at HOST_LINK-target_link_libraries.cmake:[0-9]+ \(target_link_libraries\):
+ Error evaluating generator expression:
+
+ \$<HOST_LINK:lib>
+
+ \$<HOST_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries.cmake
new file mode 100644
index 0000000..d74c92d
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries.cmake
@@ -0,0 +1,7 @@
+
+enable_language(C)
+
+add_library(lib empty.c)
+
+add_executable(empty empty.c)
+target_link_libraries(empty PRIVATE $<HOST_LINK:lib>)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-stderr.txt
new file mode 100644
index 0000000..0e25568
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at HOST_LINK-target_sources.cmake:[0-9]+ \(target_sources\):
+ Error evaluating generator expression:
+
+ \$<HOST_LINK:empty.c>
+
+ \$<HOST_LINK:...> may only be used with binary targets to specify link
+ options.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources.cmake
new file mode 100644
index 0000000..ea7bf55
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources.cmake
@@ -0,0 +1,2 @@
+add_library(empty)
+target_sources(empty PRIVATE $<HOST_LINK:empty.c>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_command-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_command-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_command-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_command-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_command-stderr.txt
new file mode 100644
index 0000000..0b0d458
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_command-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANGUAGE-add_custom_command.cmake:2 \(add_custom_command\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_command.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_command.cmake
new file mode 100644
index 0000000..a378c1c
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_command.cmake
@@ -0,0 +1,4 @@
+add_custom_target(drive)
+add_custom_command(TARGET drive PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E echo $<LINK_LANGUAGE>
+)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_target-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_target-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_target-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_target-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_target-stderr.txt
new file mode 100644
index 0000000..92da634
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_target-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANGUAGE-add_custom_target.cmake:1 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_target.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_target.cmake
new file mode 100644
index 0000000..60b6c75
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_custom_target.cmake
@@ -0,0 +1,3 @@
+add_custom_target(drive
+ COMMAND ${CMAKE_COMMAND} -E echo $<LINK_LANGUAGE>
+)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_executable-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_executable-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_executable-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_executable-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_executable-stderr.txt
new file mode 100644
index 0000000..3bdc8e4
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_executable-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANGUAGE-add_executable.cmake:1 \(add_executable\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_executable.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_executable.cmake
new file mode 100644
index 0000000..2176b39
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_executable.cmake
@@ -0,0 +1 @@
+add_executable(empty empty.$<LINK_LANGUAGE>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_library-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_library-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_library-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_library-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_library-stderr.txt
new file mode 100644
index 0000000..1bacdeb
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_library-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANGUAGE-add_library.cmake:1 \(add_library\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_library.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_library.cmake
new file mode 100644
index 0000000..253f82a
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_library.cmake
@@ -0,0 +1 @@
+add_library(empty empty.$<LINK_LANGUAGE>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_test-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_test-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_test-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_test-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_test-stderr.txt
new file mode 100644
index 0000000..f22efde
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_test-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANGUAGE-add_test.cmake:5 \(add_test\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_test.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_test.cmake
new file mode 100644
index 0000000..4fd547d
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-add_test.cmake
@@ -0,0 +1,5 @@
+
+include(CTest)
+enable_testing()
+
+add_test(NAME dummy COMMAND ${CMAKE_COMMAND} -E echo $<LINK_LANGUAGE>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-file_generate-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-file_generate-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-file_generate-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-file_generate-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-file_generate-stderr.txt
new file mode 100644
index 0000000..21d26de
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-file_generate-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANGUAGE-file_generate.cmake:3 \(file\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-file_generate.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-file_generate.cmake
new file mode 100644
index 0000000..519b883
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-file_generate.cmake
@@ -0,0 +1,6 @@
+enable_language(CXX C)
+
+file(GENERATE
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/output.txt
+ CONTENT "LANG_IS_$<LINK_LANGUAGE>\n"
+)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-install-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-install-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-install-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-install-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-install-stderr.txt
new file mode 100644
index 0000000..73afc33
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-install-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error:
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+
+
+CMake Generate step failed. Build files cannot be regenerated correctly.
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-install.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-install.cmake
new file mode 100644
index 0000000..533c0b4
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-install.cmake
@@ -0,0 +1,5 @@
+
+install(FILES
+ empty.$<LINK_LANGUAGE>
+ DESTINATION src
+)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-target_sources-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-target_sources-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-target_sources-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-target_sources-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-target_sources-stderr.txt
new file mode 100644
index 0000000..d8121cc
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-target_sources-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANGUAGE-target_sources.cmake:2 \(target_sources\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-target_sources.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-target_sources.cmake
new file mode 100644
index 0000000..c134c01
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-target_sources.cmake
@@ -0,0 +1,2 @@
+add_library(empty)
+target_sources(empty PRIVATE empty.$<LINK_LANGUAGE>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-unknown-lang.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-unknown-lang.cmake
new file mode 100644
index 0000000..0ba472d
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-unknown-lang.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_link_options(empty PRIVATE $<$<LINK_LANGUAGE:CXX>:$<TARGET_EXISTS:too,many,parameters>>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage1-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage1-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage1-stderr.txt
new file mode 100644
index 0000000..1e3a83b
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage1-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANGUAGE-wrong-usage1.cmake:4 \(target_compile_definitions\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE:C>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage1.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage1.cmake
new file mode 100644
index 0000000..90b7ce0
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage1.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_compile_definitions(empty PRIVATE $<$<LINK_LANGUAGE:C>:DEF>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage2-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage2-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage2-stderr.txt
new file mode 100644
index 0000000..7fe4310
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage2-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANGUAGE-wrong-usage2.cmake:4 \(target_compile_options\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE:C>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage2.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage2.cmake
new file mode 100644
index 0000000..e761897
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage2.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_compile_options(empty PRIVATE $<$<LINK_LANGUAGE:C>:-OPT>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage3-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage3-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage3-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage3-stderr.txt
new file mode 100644
index 0000000..cb20e99
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage3-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANGUAGE-wrong-usage3.cmake:4 \(target_include_directories\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE:C>
+
+ \$<LINK_LANGUAGE:...> may only be used with binary targets to specify link
+ libraries, link directories, link options and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage3.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage3.cmake
new file mode 100644
index 0000000..96a72a1
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage3.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_include_directories(empty PRIVATE $<$<LINK_LANGUAGE:C>:/DIR>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage4-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage4-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage4-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage4-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage4-stderr.txt
new file mode 100644
index 0000000..ee36912
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage4-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at LINK_LANGUAGE-wrong-usage4.cmake:7 \(target_link_libraries\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE>
+
+ \$<LINK_LANGUAGE> is not supported in link libraries expression.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage4.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage4.cmake
new file mode 100644
index 0000000..3ecaabb
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANGUAGE-wrong-usage4.cmake
@@ -0,0 +1,7 @@
+
+enable_language(C)
+
+add_library(libC empty.c)
+
+add_executable(empty empty.c)
+target_link_libraries(empty PRIVATE lib$<LINK_LANGUAGE>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_command-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_command-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_command-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_command-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_command-stderr.txt
new file mode 100644
index 0000000..2ff62bc
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_command-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANG_AND_ID-add_custom_command.cmake:2 \(add_custom_command\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANG_AND_ID:LANG,ID>
+
+ \$<LINK_LANG_AND_ID:lang,id> may only be used with binary targets to specify
+ link libraries, link directories, link options, and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_command.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_command.cmake
new file mode 100644
index 0000000..9df9232
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_command.cmake
@@ -0,0 +1,4 @@
+add_custom_target(drive)
+add_custom_command(TARGET drive PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E echo $<LINK_LANG_AND_ID:LANG,ID>
+)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_target-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_target-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_target-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_target-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_target-stderr.txt
new file mode 100644
index 0000000..0749c44
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_target-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANG_AND_ID-add_custom_target.cmake:2 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANG_AND_ID:LANG,ID>
+
+ \$<LINK_LANG_AND_ID:lang,id> may only be used with binary targets to specify
+ link libraries, link directories, link options, and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_target.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_target.cmake
new file mode 100644
index 0000000..e5f76bc
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_custom_target.cmake
@@ -0,0 +1,4 @@
+
+add_custom_target(drive
+ COMMAND ${CMAKE_COMMAND} -E echo $<LINK_LANG_AND_ID:LANG,ID>
+)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_executable-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_executable-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_executable-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_executable-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_executable-stderr.txt
new file mode 100644
index 0000000..595312a
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_executable-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANG_AND_ID-add_executable.cmake:1 \(add_executable\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANG_AND_ID:C,MSVC>
+
+ \$<LINK_LANG_AND_ID:lang,id> may only be used with binary targets to specify
+ link libraries, link directories, link options, and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_executable.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_executable.cmake
new file mode 100644
index 0000000..4d6c674
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_executable.cmake
@@ -0,0 +1,5 @@
+add_executable(empty main.c
+ $<$<LINK_LANG_AND_ID:C,MSVC>:empty.c>
+ $<$<LINK_LANG_AND_ID:C,GNU>:empty2.c>
+ $<$<LINK_LANG_AND_ID:C,Clang>:empty3.c>
+ )
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_library-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_library-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_library-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_library-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_library-stderr.txt
new file mode 100644
index 0000000..be46e28
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_library-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANG_AND_ID-add_library.cmake:2 \(add_library\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANG_AND_ID:C,MSVC>
+
+ \$<LINK_LANG_AND_ID:lang,id> may only be used with binary targets to specify
+ link libraries, link directories, link options, and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_library.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_library.cmake
new file mode 100644
index 0000000..a8199cf
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_library.cmake
@@ -0,0 +1,2 @@
+
+add_library(empty empty.$<LINK_LANG_AND_ID:C,MSVC>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_test-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_test-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_test-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_test-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_test-stderr.txt
new file mode 100644
index 0000000..2a29492
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_test-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANG_AND_ID-add_test.cmake:5 \(add_test\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANG_AND_ID:CXX,GNU>
+
+ \$<LINK_LANG_AND_ID:lang,id> may only be used with binary targets to specify
+ link libraries, link directories, link options, and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_test.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_test.cmake
new file mode 100644
index 0000000..fd700d7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-add_test.cmake
@@ -0,0 +1,5 @@
+
+include(CTest)
+enable_testing()
+
+add_test(NAME dummy COMMAND ${CMAKE_COMMAND} -E echo $<LINK_LANG_AND_ID:CXX,GNU>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-file_generate-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-file_generate-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-file_generate-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-file_generate-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-file_generate-stderr.txt
new file mode 100644
index 0000000..e57b55c
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-file_generate-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANG_AND_ID-file_generate.cmake:3 \(file\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANG_AND_ID:C,GNU>
+
+ \$<LINK_LANG_AND_ID:lang,id> may only be used with binary targets to specify
+ link libraries, link directories, link options, and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-file_generate.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-file_generate.cmake
new file mode 100644
index 0000000..67c1bda
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-file_generate.cmake
@@ -0,0 +1,6 @@
+enable_language(CXX C)
+
+file(GENERATE
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/output.txt
+ CONTENT "LANG_IS_$<$<LINK_LANG_AND_ID:C,GNU>:C>\n"
+)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-install-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-install-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-install-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-install-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-install-stderr.txt
new file mode 100644
index 0000000..965f974
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-install-stderr.txt
@@ -0,0 +1,10 @@
+CMake Error:
+ Error evaluating generator expression:
+
+ \$<LINK_LANG_AND_ID:C,MSVC>
+
+ \$<LINK_LANG_AND_ID:lang,id> may only be used with binary targets to specify
+ link libraries, link directories, link options, and link depends.
+
+
+CMake Generate step failed. Build files cannot be regenerated correctly.
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-install.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-install.cmake
new file mode 100644
index 0000000..b8f9323
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-install.cmake
@@ -0,0 +1,5 @@
+
+install(FILES
+ empty.$<LINK_LANG_AND_ID:C,MSVC>
+ DESTINATION src
+)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-target_sources-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-target_sources-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-target_sources-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-target_sources-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-target_sources-stderr.txt
new file mode 100644
index 0000000..e86602a
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-target_sources-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at LINK_LANG_AND_ID-target_sources.cmake:2 \(target_sources\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANG_AND_ID>
+
+ \$<LINK_LANG_AND_ID> expression requires at least two parameters.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-target_sources.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-target_sources.cmake
new file mode 100644
index 0000000..da5faf4
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-target_sources.cmake
@@ -0,0 +1,2 @@
+add_library(empty)
+target_sources(empty PRIVATE empty.$<LINK_LANG_AND_ID>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-unknown-lang.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-unknown-lang.cmake
new file mode 100644
index 0000000..99dd337
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-unknown-lang.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_link_options(empty PRIVATE $<$<LINK_LANG_AND_ID:CXX,GNU>:$<TARGET_EXISTS:too,many,parameters>>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage1-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage1-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage1-stderr.txt
new file mode 100644
index 0000000..95611c3
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage1-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANG_AND_ID-wrong-usage1.cmake:4 \(target_compile_definitions\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANG_AND_ID:C,GNU>
+
+ \$<LINK_LANG_AND_ID:lang,id> may only be used with binary targets to specify
+ link libraries, link directories, link options, and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage1.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage1.cmake
new file mode 100644
index 0000000..e58e3b44
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage1.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_compile_definitions(empty PRIVATE $<$<LINK_LANG_AND_ID:C,GNU>:DEF>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage2-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage2-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage2-stderr.txt
new file mode 100644
index 0000000..53bdcb2
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage2-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANG_AND_ID-wrong-usage2.cmake:4 \(target_compile_options\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANG_AND_ID:C,GNU>
+
+ \$<LINK_LANG_AND_ID:lang,id> may only be used with binary targets to specify
+ link libraries, link directories, link options, and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage2.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage2.cmake
new file mode 100644
index 0000000..998daa9
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage2.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_compile_options(empty PRIVATE $<$<LINK_LANG_AND_ID:C,GNU>:-OPT>)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage3-result.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage3-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage3-stderr.txt b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage3-stderr.txt
new file mode 100644
index 0000000..a34a2ea
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage3-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at LINK_LANG_AND_ID-wrong-usage3.cmake:4 \(target_include_directories\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANG_AND_ID:C,GNU>
+
+ \$<LINK_LANG_AND_ID:lang,id> may only be used with binary targets to specify
+ link libraries, link directories, link options, and link depends.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage3.cmake b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage3.cmake
new file mode 100644
index 0000000..0543056
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/LINK_LANG_AND_ID-wrong-usage3.cmake
@@ -0,0 +1,4 @@
+
+enable_language(C)
+add_executable(empty empty.c)
+target_include_directories(empty PRIVATE $<$<LINK_LANG_AND_ID:C,GNU>:/DIR>)
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 68a0172..24c3642 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -39,6 +39,61 @@ 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(LINK_LANGUAGE-add_custom_target)
+run_cmake(LINK_LANGUAGE-add_custom_command)
+run_cmake(LINK_LANGUAGE-install)
+run_cmake(LINK_LANGUAGE-target_sources)
+run_cmake(LINK_LANGUAGE-add_executable)
+run_cmake(LINK_LANGUAGE-add_library)
+run_cmake(LINK_LANGUAGE-add_test)
+run_cmake(LINK_LANGUAGE-unknown-lang)
+run_cmake(LINK_LANGUAGE-wrong-usage1)
+run_cmake(LINK_LANGUAGE-wrong-usage2)
+run_cmake(LINK_LANGUAGE-wrong-usage3)
+run_cmake(LINK_LANGUAGE-wrong-usage4)
+run_cmake(LINK_LANGUAGE-file_generate)
+run_cmake(LINK_LANG_AND_ID-add_custom_target)
+run_cmake(LINK_LANG_AND_ID-add_custom_command)
+run_cmake(LINK_LANG_AND_ID-install)
+run_cmake(LINK_LANG_AND_ID-target_sources)
+run_cmake(LINK_LANG_AND_ID-add_executable)
+run_cmake(LINK_LANG_AND_ID-add_library)
+run_cmake(LINK_LANG_AND_ID-add_test)
+run_cmake(LINK_LANG_AND_ID-unknown-lang)
+run_cmake(LINK_LANG_AND_ID-wrong-usage1)
+run_cmake(LINK_LANG_AND_ID-wrong-usage2)
+run_cmake(LINK_LANG_AND_ID-wrong-usage3)
+run_cmake(LINK_LANG_AND_ID-file_generate)
+run_cmake(HOST_LINK-add_custom_target)
+run_cmake(HOST_LINK-add_custom_command)
+run_cmake(HOST_LINK-install)
+run_cmake(HOST_LINK-add_executable)
+run_cmake(HOST_LINK-add_library)
+run_cmake(HOST_LINK-add_test)
+run_cmake(HOST_LINK-target_sources)
+run_cmake(HOST_LINK-target_compile_definitions)
+run_cmake(HOST_LINK-target_compile_options)
+run_cmake(HOST_LINK-target_include_directories)
+run_cmake(HOST_LINK-target_link_libraries)
+run_cmake(HOST_LINK-target_link_directories)
+if(RunCMake_GENERATOR MATCHES "(Ninja|Makefile)")
+ run_cmake(HOST_LINK-link_depends)
+endif()
+run_cmake(DEVICE_LINK-add_custom_target)
+run_cmake(DEVICE_LINK-add_custom_command)
+run_cmake(DEVICE_LINK-install)
+run_cmake(DEVICE_LINK-add_executable)
+run_cmake(DEVICE_LINK-add_library)
+run_cmake(DEVICE_LINK-add_test)
+run_cmake(DEVICE_LINK-target_sources)
+run_cmake(DEVICE_LINK-target_compile_definitions)
+run_cmake(DEVICE_LINK-target_compile_options)
+run_cmake(DEVICE_LINK-target_include_directories)
+run_cmake(DEVICE_LINK-target_link_libraries)
+run_cmake(DEVICE_LINK-target_link_directories)
+if(RunCMake_GENERATOR MATCHES "(Ninja|Makefile)")
+ run_cmake(DEVICE_LINK-link_depends)
+endif()
run_cmake(TARGET_FILE-recursion)
run_cmake(OUTPUT_NAME-recursion)
run_cmake(TARGET_FILE_PREFIX)
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-configuration-debug-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-configuration-debug-stdout.txt
new file mode 100644
index 0000000..1f5d1a5
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-configuration-debug-stdout.txt
@@ -0,0 +1,5 @@
+Test project .*GoogleTest-discovery-multi-config
+[ \t]*Test #[0-9]+: configuration\.case_release \(Disabled\)
+[ \t]*Test #[0-9]+: configuration\.case_debug
++
+Total Tests: 2
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-configuration-release-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-configuration-release-stdout.txt
new file mode 100644
index 0000000..4f91664
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-configuration-release-stdout.txt
@@ -0,0 +1,5 @@
+Test project .*GoogleTest-discovery-multi-config
+[ \t]*Test #[0-9]+: configuration\.case_release
+[ \t]*Test #[0-9]+: configuration\.case_debug \(Disabled\)
++
+Total Tests: 2
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-timeout-result.txt b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-build-result.txt
index d197c91..d197c91 100644
--- a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-timeout-result.txt
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-build-result.txt
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-timeout-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-build-stdout.txt
index 3a6572c..3a6572c 100644
--- a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-timeout-stdout.txt
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-build-stdout.txt
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-result.txt b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-stderr.txt b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-stderr.txt
new file mode 100644
index 0000000..f6be939
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-stderr.txt
@@ -0,0 +1,2 @@
+Unable to find executable: discovery_timeout_test_NOT_BUILT
+Errors while running CTest
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-stdout.txt
new file mode 100644
index 0000000..d9de3f8
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-POST_BUILD-timeout-test-stdout.txt
@@ -0,0 +1,18 @@
+Test project .*GoogleTest-discovery-timeout
+[ \t]*Start [0-9]+: discovery_timeout_test_NOT_BUILT
+Could not find executable discovery_timeout_test_NOT_BUILT
+Looked in the following places:
+discovery_timeout_test_NOT_BUILT
+discovery_timeout_test_NOT_BUILT(\.exe)?
+Debug/discovery_timeout_test_NOT_BUILT
+Debug/discovery_timeout_test_NOT_BUILT(\.exe)?
+Debug/discovery_timeout_test_NOT_BUILT
+Debug/discovery_timeout_test_NOT_BUILT(\.exe)?
+[^\n]+discovery_timeout_test_NOT_BUILT +\.+\*\*\*Not Run +[0-9.]+ sec
++
+0% tests passed, 1 tests failed out of 1
++
+Total Test time \(real\) = +[0-9.]+ sec
++
+The following tests FAILED:
+[^\n]+discovery_timeout_test_NOT_BUILT \(Not Run\)
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-PRE_TEST-timeout-test-stderr.txt b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-PRE_TEST-timeout-test-stderr.txt
new file mode 100644
index 0000000..75afe4a
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-PRE_TEST-timeout-test-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at .*GoogleTestAddTests.cmake:[0-9]+ \(message\):
+[ \t]*Error running test executable.
++
+[ \t]*Path: '.*discovery_timeout_test(\.exe)?'
+[ \t]*Result: Process terminated due to timeout
+[ \t]*Output:
+[ \t]*timeout.
+[ \t]*case
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-discovery-PRE_TEST-timeout-test-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-PRE_TEST-timeout-test-stdout.txt
new file mode 100644
index 0000000..d65061f
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-discovery-PRE_TEST-timeout-test-stdout.txt
@@ -0,0 +1 @@
+Test project .*GoogleTest-discovery-timeout
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-skip-timeout-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-skip-timeout-stdout.txt
new file mode 100644
index 0000000..eeecb6a
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-skip-timeout-stdout.txt
@@ -0,0 +1,10 @@
+Test project .*
+ Start 20: skip_test.test1
+1/1 Test #20: skip_test.test1 \.+\*\*\*Skipped +[0-9.]+ sec
+
+100% tests passed, 0 tests failed out of 1
+
+Total Test time \(real\) = +[0-9.]+ sec
+
+The following tests did not run:
+.*20 - skip_test\.test1 \(Skipped\)
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt
index 5f7753d..7fb3919 100644
--- a/Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt
@@ -1,22 +1,28 @@
Test project .*
- Start 1: TEST:basic\.case_foo!1
-1/8 Test #1: TEST:basic\.case_foo!1 \.+ +Passed +[0-9.]+ sec
- Start 2: TEST:basic\.case_bar!1
-2/8 Test #2: TEST:basic\.case_bar!1 \.+ +Passed +[0-9.]+ sec
- Start 3: TEST:basic\.disabled_case!1
-3/8 Test #3: TEST:basic\.disabled_case!1 \.+\*+Not Run \(Disabled\) +[0-9.]+ sec
- Start 4: TEST:disabled\.case!1
-4/8 Test #4: TEST:disabled\.case!1 \.+\*+Not Run \(Disabled\) +[0-9.]+ sec
- Start 5: TEST:typed/short\.case!1
-5/8 Test #5: TEST:typed/short\.case!1 \.+ +Passed +[0-9.]+ sec
- Start 6: TEST:typed/float\.case!1
-6/8 Test #6: TEST:typed/float\.case!1 \.+ +Passed +[0-9.]+ sec
- Start 7: TEST:value/test\.case/1!1
-7/8 Test #7: TEST:value/test\.case/1!1 \.+ +Passed +[0-9.]+ sec
- Start 8: TEST:value/test\.case/"foo"!1
-8/8 Test #8: TEST:value/test\.case/"foo"!1 \.+ +Passed +[0-9.]+ sec
+ Start 1: TEST:basic\.case_foo!1
+ 1/11 Test #1: TEST:basic\.case_foo!1 \.+ +Passed +[0-9.]+ sec
+ Start 2: TEST:basic\.case_bar!1
+ 2/11 Test #2: TEST:basic\.case_bar!1 \.+ +Passed +[0-9.]+ sec
+ Start 3: TEST:basic\.disabled_case!1
+ 3/11 Test #3: TEST:basic\.disabled_case!1 \.+\*+Not Run \(Disabled\) +[0-9.]+ sec
+ Start 4: TEST:disabled\.case!1
+ 4/11 Test #4: TEST:disabled\.case!1 \.+\*+Not Run \(Disabled\) +[0-9.]+ sec
+ Start 5: TEST:typed/short\.case!1
+ 5/11 Test #5: TEST:typed/short\.case!1 \.+ +Passed +[0-9.]+ sec
+ Start 6: TEST:typed/float\.case!1
+ 6/11 Test #6: TEST:typed/float\.case!1 \.+ +Passed +[0-9.]+ sec
+ Start 7: TEST:value/test\.case/1!1
+ 7/11 Test #7: TEST:value/test\.case/1!1 \.+ +Passed +[0-9.]+ sec
+ Start 8: TEST:value/test\.case/"foo"!1
+ 8/11 Test #8: TEST:value/test\.case/"foo"!1 \.+ +Passed +[0-9.]+ sec
+ Start 9: TEST:param/special\.case/"semicolon;"!1
+ 9/11 Test #9: TEST:param/special\.case/"semicolon;"!1 \.+ +Passed +[0-9.]+ sec
+ Start 10: TEST:param/special\.case/"backslash\\"!1
+10/11 Test #10: TEST:param/special\.case/"backslash\\"!1 \.+ +Passed +[0-9.]+ sec
+ Start 11: TEST:param/special\.case/"\$\{var\}"!1
+11/11 Test #11: TEST:param/special\.case/"\$\{var\}"!1 \.+ +Passed +[0-9.]+ sec
-100% tests passed, 0 tests failed out of 6
+100% tests passed, 0 tests failed out of 9
Total Test time \(real\) = +[0-9.]+ sec
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt
index 960c0b9..58c4d10 100644
--- a/Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt
+++ b/Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt
@@ -1,25 +1,31 @@
Test project .*
- Start 9: TEST:basic\.case_foo!2
-1/8 Test #9: TEST:basic\.case_foo!2 \.+ +Passed +[0-9.]+ sec
- Start 10: TEST:basic\.case_bar!2
-2/8 Test #10: TEST:basic\.case_bar!2 \.+ +Passed +[0-9.]+ sec
- Start 11: TEST:basic\.disabled_case!2
-3/8 Test #11: TEST:basic\.disabled_case!2 \.+\*+Not Run \(Disabled\) +[0-9.]+ sec
- Start 12: TEST:disabled\.case!2
-4/8 Test #12: TEST:disabled\.case!2 \.+\*+Not Run \(Disabled\) +[0-9.]+ sec
- Start 13: TEST:typed/short\.case!2
-5/8 Test #13: TEST:typed/short\.case!2 \.+ +Passed +[0-9.]+ sec
- Start 14: TEST:typed/float\.case!2
-6/8 Test #14: TEST:typed/float\.case!2 \.+ +Passed +[0-9.]+ sec
- Start 15: TEST:value/test\.case/1!2
-7/8 Test #15: TEST:value/test\.case/1!2 \.+ +Passed +[0-9.]+ sec
- Start 16: TEST:value/test\.case/"foo"!2
-8/8 Test #16: TEST:value/test\.case/"foo"!2 \.+ +Passed +[0-9.]+ sec
+ Start 12: TEST:basic\.case_foo!2
+ 1/11 Test #12: TEST:basic\.case_foo!2 \.+ +Passed +[0-9.]+ sec
+ Start 13: TEST:basic\.case_bar!2
+ 2/11 Test #13: TEST:basic\.case_bar!2 \.+ +Passed +[0-9.]+ sec
+ Start 14: TEST:basic\.disabled_case!2
+ 3/11 Test #14: TEST:basic\.disabled_case!2 \.+\*+Not Run \(Disabled\) +[0-9.]+ sec
+ Start 15: TEST:disabled\.case!2
+ 4/11 Test #15: TEST:disabled\.case!2 \.+\*+Not Run \(Disabled\) +[0-9.]+ sec
+ Start 16: TEST:typed/short\.case!2
+ 5/11 Test #16: TEST:typed/short\.case!2 \.+ +Passed +[0-9.]+ sec
+ Start 17: TEST:typed/float\.case!2
+ 6/11 Test #17: TEST:typed/float\.case!2 \.+ +Passed +[0-9.]+ sec
+ Start 18: TEST:value/test\.case/1!2
+ 7/11 Test #18: TEST:value/test\.case/1!2 \.+ +Passed +[0-9.]+ sec
+ Start 19: TEST:value/test\.case/"foo"!2
+ 8/11 Test #19: TEST:value/test\.case/"foo"!2 \.+ +Passed +[0-9.]+ sec
+ Start 20: TEST:param/special\.case/"semicolon;"!2
+ 9/11 Test #20: TEST:param/special\.case/"semicolon;"!2 \.+ +Passed +[0-9.]+ sec
+ Start 21: TEST:param/special\.case/"backslash\\"!2
+10/11 Test #21: TEST:param/special\.case/"backslash\\"!2 \.+ +Passed +[0-9.]+ sec
+ Start 22: TEST:param/special\.case/"\$\{var\}"!2
+11/11 Test #22: TEST:param/special\.case/"\$\{var\}"!2 \.+ +Passed +[0-9.]+ sec
-100% tests passed, 0 tests failed out of 6
+100% tests passed, 0 tests failed out of 9
Total Test time \(real\) = +[0-9.]+ sec
The following tests did not run:
-.*11 - TEST:basic\.disabled_case!2 \(Disabled\)
-.*12 - TEST:disabled\.case!2 \(Disabled\)
+.*14 - TEST:basic\.disabled_case!2 \(Disabled\)
+.*15 - TEST:disabled\.case!2 \(Disabled\)
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest.cmake b/Tests/RunCMake/GoogleTest/GoogleTest.cmake
index 31808c6..fca292a 100644
--- a/Tests/RunCMake/GoogleTest/GoogleTest.cmake
+++ b/Tests/RunCMake/GoogleTest/GoogleTest.cmake
@@ -50,10 +50,8 @@ gtest_discover_tests(
PROPERTIES TIMEOUT 2
)
-add_executable(discovery_timeout_test timeout_test.cpp)
-target_compile_definitions(discovery_timeout_test PRIVATE discoverySleepSec=10)
+add_executable(skip_test skip_test.cpp)
+
gtest_discover_tests(
- discovery_timeout_test
- TEST_PREFIX discovery_
- DISCOVERY_TIMEOUT 2
+ skip_test
)
diff --git a/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryMultiConfig.cmake b/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryMultiConfig.cmake
new file mode 100644
index 0000000..1919dc1
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryMultiConfig.cmake
@@ -0,0 +1,14 @@
+project(test_include_dirs)
+include(CTest)
+include(GoogleTest)
+
+enable_testing()
+
+add_executable(configuration_gtest configuration_gtest.cpp)
+target_compile_definitions(configuration_gtest PRIVATE $<$<CONFIG:Debug>:DEBUG=1>)
+
+gtest_discover_tests(
+ configuration_gtest
+ PROPERTIES LABELS CONFIG
+ DISCOVERY_MODE PRE_TEST
+)
diff --git a/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryTimeout.cmake b/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryTimeout.cmake
new file mode 100644
index 0000000..7398faf
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTestDiscoveryTimeout.cmake
@@ -0,0 +1,14 @@
+project(test_include_dirs)
+include(CTest)
+include(GoogleTest)
+
+enable_testing()
+
+add_executable(discovery_timeout_test timeout_test.cpp)
+target_compile_definitions(discovery_timeout_test PRIVATE discoverySleepSec=10)
+gtest_discover_tests(
+ discovery_timeout_test
+ TEST_PREFIX discovery_
+ DISCOVERY_TIMEOUT 2
+ DISCOVERY_MODE ${DISCOVERY_MODE}
+)
diff --git a/Tests/RunCMake/GoogleTest/GoogleTestXML-result-check.cmake b/Tests/RunCMake/GoogleTest/GoogleTestXML-result-check.cmake
new file mode 100644
index 0000000..3bfdac3
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTestXML-result-check.cmake
@@ -0,0 +1,4 @@
+set(RESULT_FILE "${RunCMake_TEST_BINARY_DIR}/GoogleTestXML.Foo.xml")
+if(NOT EXISTS ${RESULT_FILE})
+ set(RunCMake_TEST_FAILED "Result XML file ${RESULT_FILE} was not created")
+endif()
diff --git a/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake b/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake
new file mode 100644
index 0000000..c86de63
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake
@@ -0,0 +1,11 @@
+project(test_include_dirs)
+include(CTest)
+include(GoogleTest)
+
+enable_testing()
+
+add_executable(xml_output xml_output.cpp)
+gtest_discover_tests(
+ xml_output
+ XML_OUTPUT_DIR ${CMAKE_BINARY_DIR}
+)
diff --git a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake
index 0fa4e2a..efd22be 100644
--- a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake
@@ -1,6 +1,6 @@
include(RunCMake)
-function(run_GoogleTest)
+function(run_GoogleTest DISCOVERY_MODE)
# Use a single build tree for a few tests without cleaning.
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/GoogleTest-build)
set(RunCMake_TEST_NO_CLEAN 1)
@@ -10,7 +10,7 @@ function(run_GoogleTest)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
- run_cmake(GoogleTest)
+ run_cmake_with_options(GoogleTest -DCMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE=${DISCOVERY_MODE})
run_cmake_command(GoogleTest-build
${CMAKE_COMMAND}
@@ -26,15 +26,6 @@ function(run_GoogleTest)
--target property_timeout_test
)
- set(RunCMake_TEST_OUTPUT_MERGE 1)
- run_cmake_command(GoogleTest-discovery-timeout
- ${CMAKE_COMMAND}
- --build .
- --config Debug
- --target discovery_timeout_test
- )
- set(RunCMake_TEST_OUTPUT_MERGE 0)
-
run_cmake_command(GoogleTest-test1
${CMAKE_CTEST_COMMAND}
-C Debug
@@ -69,6 +60,123 @@ function(run_GoogleTest)
-R property_timeout\\.case_with_discovery
--no-label-summary
)
+
+ run_cmake_command(GoogleTest-build
+ ${CMAKE_COMMAND}
+ --build .
+ --config Debug
+ --target skip_test
+ )
+
+ run_cmake_command(GoogleTest-skip-test
+ ${CMAKE_CTEST_COMMAND}
+ -C Debug
+ -R skip_test
+ --no-label-summary
+ )
endfunction()
-run_GoogleTest()
+function(run_GoogleTestXML DISCOVERY_MODE)
+ # Use a single build tree for a few tests without cleaning.
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/GoogleTestXML-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
+ endif()
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake_with_options(GoogleTestXML -DCMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE=${DISCOVERY_MODE})
+
+ run_cmake_command(GoogleTestXML-discovery
+ ${CMAKE_COMMAND}
+ --build .
+ --config Debug
+ --target xml_output
+ )
+
+ run_cmake_command(GoogleTestXML-result
+ ${CMAKE_CTEST_COMMAND}
+ -C Debug
+ -R GoogleTestXML
+ --no-label-summary
+ )
+endfunction()
+
+function(run_GoogleTest_discovery_timeout DISCOVERY_MODE)
+ # Use a single build tree for a few tests without cleaning.
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/GoogleTest-discovery-timeout)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
+ endif()
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake_with_options(GoogleTestDiscoveryTimeout -DDISCOVERY_MODE=${DISCOVERY_MODE})
+
+ set(RunCMake_TEST_OUTPUT_MERGE 1)
+ run_cmake_command(GoogleTest-discovery-${DISCOVERY_MODE}-timeout-build
+ ${CMAKE_COMMAND}
+ --build .
+ --config Debug
+ --target discovery_timeout_test
+ )
+ set(RunCMake_TEST_OUTPUT_MERGE 0)
+
+ run_cmake_command(GoogleTest-discovery-${DISCOVERY_MODE}-timeout-test
+ ${CMAKE_CTEST_COMMAND}
+ -C Debug
+ -R discovery_timeout_test
+ --no-label-sumary
+ )
+endfunction()
+
+function(run_GoogleTest_discovery_multi_config)
+ # Use a single build tree for a few tests without cleaning.
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/GoogleTest-discovery-multi-config)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(GoogleTestDiscoveryMultiConfig)
+
+ run_cmake_command(GoogleTest-build-release
+ ${CMAKE_COMMAND}
+ --build .
+ --config Release
+ --target configuration_gtest
+ )
+ run_cmake_command(GoogleTest-build-debug
+ ${CMAKE_COMMAND}
+ --build .
+ --config Debug
+ --target configuration_gtest
+ )
+ run_cmake_command(GoogleTest-configuration-release
+ ${CMAKE_CTEST_COMMAND}
+ -C Release
+ -L CONFIG
+ -N
+ )
+ run_cmake_command(GoogleTest-configuration-debug
+ ${CMAKE_CTEST_COMMAND}
+ -C Debug
+ -L CONFIG
+ -N
+ )
+
+endfunction()
+
+foreach(DISCOVERY_MODE POST_BUILD PRE_TEST)
+ message("Testing ${DISCOVERY_MODE} discovery mode via CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE global override...")
+ run_GoogleTest(${DISCOVERY_MODE})
+ run_GoogleTestXML(${DISCOVERY_MODE})
+ message("Testing ${DISCOVERY_MODE} discovery mode via DISCOVERY_MODE option...")
+ run_GoogleTest_discovery_timeout(${DISCOVERY_MODE})
+endforeach()
+
+if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ message("Testing PRE_TEST discovery multi configuration...")
+ run_GoogleTest_discovery_multi_config()
+endif()
diff --git a/Tests/RunCMake/GoogleTest/configuration_gtest.cpp b/Tests/RunCMake/GoogleTest/configuration_gtest.cpp
new file mode 100644
index 0000000..3cbb134
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/configuration_gtest.cpp
@@ -0,0 +1,23 @@
+#include <iostream>
+#include <string>
+
+int main(int argc, char** argv)
+{
+ // Note: GoogleTest.cmake doesn't actually depend on Google Test as such;
+ // it only requires that we produces output in the expected format when
+ // invoked with --gtest_list_tests. Thus, we fake that here. This allows us
+ // to test the module without actually needing Google Test.
+ if (argc > 1 && std::string(argv[1]) == "--gtest_list_tests") {
+ std::cout << "configuration." << std::endl;
+#ifdef DEBUG
+ std::cout << " DISABLED_case_release" << std::endl;
+ std::cout << " case_debug" << std::endl;
+#else
+ std::cout << " case_release" << std::endl;
+ std::cout << " DISABLED_case_debug" << std::endl;
+#endif
+ return 0;
+ }
+
+ return 1;
+}
diff --git a/Tests/RunCMake/GoogleTest/fake_gtest.cpp b/Tests/RunCMake/GoogleTest/fake_gtest.cpp
index f1bd7ef..a8127bf 100644
--- a/Tests/RunCMake/GoogleTest/fake_gtest.cpp
+++ b/Tests/RunCMake/GoogleTest/fake_gtest.cpp
@@ -21,6 +21,10 @@ int main(int argc, char** argv)
std::cout << "value/test." << std::endl;
std::cout << " case/0 # GetParam() = 1" << std::endl;
std::cout << " case/1 # GetParam() = \"foo\"" << std::endl;
+ std::cout << "param/special." << std::endl;
+ std::cout << " case/0 # GetParam() = \"semicolon;\"" << std::endl;
+ std::cout << " case/1 # GetParam() = \"backslash\\\"" << std::endl;
+ std::cout << " case/2 # GetParam() = \"${var}\"" << std::endl;
return 0;
}
diff --git a/Tests/RunCMake/GoogleTest/skip_test.cpp b/Tests/RunCMake/GoogleTest/skip_test.cpp
new file mode 100644
index 0000000..2bc9fe1
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/skip_test.cpp
@@ -0,0 +1,18 @@
+#include <iostream>
+#include <string>
+
+int main(int argc, char** argv)
+{
+ // Note: GoogleTest.cmake doesn't actually depend on Google Test as such;
+ // it only requires that we produces output in the expected format when
+ // invoked with --gtest_list_tests. Thus, we fake that here. This allows us
+ // to test the module without actually needing Google Test.
+ if (argc > 1 && std::string(argv[1]) == "--gtest_list_tests") {
+ std::cout << "skip_test." << std::endl;
+ std::cout << " test1" << std::endl;
+ return 0;
+ }
+
+ std::cout << "[ SKIPPED ] skip_test.test1" << std::endl;
+ return 0;
+}
diff --git a/Tests/RunCMake/GoogleTest/timeout_test.cpp b/Tests/RunCMake/GoogleTest/timeout_test.cpp
index b8ad055..5506269 100644
--- a/Tests/RunCMake/GoogleTest/timeout_test.cpp
+++ b/Tests/RunCMake/GoogleTest/timeout_test.cpp
@@ -4,9 +4,10 @@
# include <unistd.h>
#endif
-#include <iostream>
#include <string>
+#include <stdio.h>
+
void sleepFor(unsigned seconds)
{
#if defined(_WIN32)
@@ -23,8 +24,8 @@ int main(int argc, char** argv)
// invoked with --gtest_list_tests. Thus, we fake that here. This allows us
// to test the module without actually needing Google Test.
if (argc > 1 && std::string(argv[1]) == "--gtest_list_tests") {
- std::cout << "timeout." << std::endl;
- std::cout << " case" << std::endl;
+ printf("timeout.\n case\n");
+ fflush(stdout);
#ifdef discoverySleepSec
sleepFor(discoverySleepSec);
#endif
diff --git a/Tests/RunCMake/GoogleTest/xml_output.cpp b/Tests/RunCMake/GoogleTest/xml_output.cpp
new file mode 100644
index 0000000..e130231
--- /dev/null
+++ b/Tests/RunCMake/GoogleTest/xml_output.cpp
@@ -0,0 +1,26 @@
+#include <fstream>
+#include <iostream>
+#include <string>
+
+int main(int argc, char** argv)
+{
+ // Note: GoogleTestXML.cmake doesn't actually depend on Google Test as such;
+ // it only mimicks the output file creation using the path passed to this
+ // test without any content
+ for (int i = 0; i < argc; i++) {
+ std::string param(argv[i]);
+ if (param.find("--gtest_list_tests") != std::string::npos) {
+ // This actually defines the name of the file passed in the 2nd run
+ std::cout << "GoogleTestXML." << std::endl;
+ std::cout << " Foo" << 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);
+ ostrm << "--gtest_output=xml: mockup file\n";
+ }
+ }
+
+ return 0;
+}
diff --git a/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake b/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake
index 772f312..10cd2bc 100644
--- a/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake
+++ b/Tests/RunCMake/Graphviz/GraphvizTestProject.cmake
@@ -32,7 +32,7 @@ target_link_libraries(GraphicLibrary PRIVATE CoreLibrary)
# Test target labels with quotes in them; they should be escaped in the dot
# file.
-# See https://gitlab.kitware.com/cmake/cmake/issues/19746
+# See https://gitlab.kitware.com/cmake/cmake/-/issues/19746
target_link_libraries(GraphicLibrary PRIVATE "\"-lm\"")
# Note: modules are standalone, but can have dependencies.
diff --git a/Tests/RunCMake/Languages/LINKER_LANGUAGE-genex-result.txt b/Tests/RunCMake/Languages/LINKER_LANGUAGE-genex-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Languages/LINKER_LANGUAGE-genex-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt b/Tests/RunCMake/Languages/LINKER_LANGUAGE-genex-stderr.txt
index 03c002e..7abf76a 100644
--- a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-stderr.txt
+++ b/Tests/RunCMake/Languages/LINKER_LANGUAGE-genex-stderr.txt
@@ -1,4 +1,4 @@
-CMake Error at LINK_LANGUAGE-genex.cmake:[0-9]+ \(target_link_libraries\):
+CMake Error at LINKER_LANGUAGE-genex.cmake:[0-9]+ \(target_link_libraries\):
Error evaluating generator expression:
\$<TARGET_PROPERTY:LINKER_LANGUAGE>
diff --git a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex.cmake b/Tests/RunCMake/Languages/LINKER_LANGUAGE-genex.cmake
index 64f394c..64f394c 100644
--- a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex.cmake
+++ b/Tests/RunCMake/Languages/LINKER_LANGUAGE-genex.cmake
diff --git a/Tests/RunCMake/Languages/RunCMakeTest.cmake b/Tests/RunCMake/Languages/RunCMakeTest.cmake
index 2a534b3..48216e9 100644
--- a/Tests/RunCMake/Languages/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Languages/RunCMakeTest.cmake
@@ -1,7 +1,7 @@
include(RunCMake)
run_cmake(NoLangSHARED)
-run_cmake(LINK_LANGUAGE-genex)
+run_cmake(LINKER_LANGUAGE-genex)
run_cmake(link-libraries-TARGET_FILE-genex)
run_cmake(link-libraries-TARGET_FILE-genex-ok)
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index 0eada08..8f9c263 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -18,6 +18,12 @@ else()
message(FATAL_ERROR "'ninja --version' reported:\n${ninja_out}")
endif()
+if(CMAKE_HOST_WIN32)
+ run_cmake(SelectCompilerWindows)
+else()
+ run_cmake(SelectCompilerUNIX)
+endif()
+
function(run_NinjaToolMissing)
set(RunCMake_MAKE_PROGRAM ninja-tool-missing)
run_cmake(NinjaToolMissing)
diff --git a/Tests/RunCMake/Ninja/SelectCompiler/1/gcc b/Tests/RunCMake/Ninja/SelectCompiler/1/gcc
new file mode 100755
index 0000000..151dfa6
--- /dev/null
+++ b/Tests/RunCMake/Ninja/SelectCompiler/1/gcc
@@ -0,0 +1,2 @@
+#!/bin/sh
+false
diff --git a/Tests/RunCMake/Ninja/SelectCompiler/2/cc b/Tests/RunCMake/Ninja/SelectCompiler/2/cc
new file mode 100755
index 0000000..151dfa6
--- /dev/null
+++ b/Tests/RunCMake/Ninja/SelectCompiler/2/cc
@@ -0,0 +1,2 @@
+#!/bin/sh
+false
diff --git a/Tests/RunCMake/Ninja/SelectCompilerUNIX-result.txt b/Tests/RunCMake/Ninja/SelectCompilerUNIX-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Ninja/SelectCompilerUNIX-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Ninja/SelectCompilerUNIX-stderr.txt b/Tests/RunCMake/Ninja/SelectCompilerUNIX-stderr.txt
new file mode 100644
index 0000000..a2baa48
--- /dev/null
+++ b/Tests/RunCMake/Ninja/SelectCompilerUNIX-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at .*/Modules/CMakeTestCCompiler.cmake:[0-9]+ \(message\):
+ The C compiler
+
+ "[^"]*/Tests/RunCMake/Ninja/SelectCompiler/2/cc"
+
+ is not able to compile a simple test program.
diff --git a/Tests/RunCMake/Ninja/SelectCompilerUNIX.cmake b/Tests/RunCMake/Ninja/SelectCompilerUNIX.cmake
new file mode 100644
index 0000000..02c8439
--- /dev/null
+++ b/Tests/RunCMake/Ninja/SelectCompilerUNIX.cmake
@@ -0,0 +1,3 @@
+set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}/SelectCompiler/1:${CMAKE_CURRENT_SOURCE_DIR}/SelectCompiler/2:$ENV{PATH}")
+unset(ENV{CC})
+enable_language(C)
diff --git a/Tests/RunCMake/Ninja/SelectCompilerWindows-result.txt b/Tests/RunCMake/Ninja/SelectCompilerWindows-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Ninja/SelectCompilerWindows-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Ninja/SelectCompilerWindows-stderr.txt b/Tests/RunCMake/Ninja/SelectCompilerWindows-stderr.txt
new file mode 100644
index 0000000..e4b506e
--- /dev/null
+++ b/Tests/RunCMake/Ninja/SelectCompilerWindows-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at .*/Modules/CMakeTestCCompiler.cmake:[0-9]+ \(message\):
+ The C compiler
+
+ "[^"]*/Tests/RunCMake/Ninja/SelectCompiler/1/gcc"
+
+ is not able to compile a simple test program.
diff --git a/Tests/RunCMake/Ninja/SelectCompilerWindows.cmake b/Tests/RunCMake/Ninja/SelectCompilerWindows.cmake
new file mode 100644
index 0000000..f5a7e2b
--- /dev/null
+++ b/Tests/RunCMake/Ninja/SelectCompilerWindows.cmake
@@ -0,0 +1,3 @@
+set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}/SelectCompiler/1;${CMAKE_CURRENT_SOURCE_DIR}/SelectCompiler/2;$ENV{PATH}")
+unset(ENV{CC})
+enable_language(C)
diff --git a/Tests/RunCMake/NinjaMultiConfig/CudaSimple.cmake b/Tests/RunCMake/NinjaMultiConfig/CudaSimple.cmake
index 2e9b1cb..00d8a1b 100644
--- a/Tests/RunCMake/NinjaMultiConfig/CudaSimple.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/CudaSimple.cmake
@@ -1,3 +1,4 @@
+cmake_policy(SET CMP0104 NEW)
enable_language(CUDA)
file(TOUCH ${CMAKE_BINARY_DIR}/empty.cmake)
diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
index d4a08a9..76b488e 100644
--- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
@@ -289,7 +289,8 @@ run_cmake_command(NoUnusedVariables ${CMAKE_COMMAND} ${CMAKE_CURRENT_LIST_DIR}
"-DCMAKE_DEFAULT_CONFIGS=all"
)
-if(CMake_TEST_CUDA)
+# CudaSimple uses separable compilation, which is currently only supported on NVCC.
+if(CMake_TEST_CUDA AND NOT CMake_TEST_CUDA STREQUAL "Clang")
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CudaSimple-build)
run_cmake_configure(CudaSimple)
include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
diff --git a/Tests/RunCMake/ObjectLibrary/b.c b/Tests/RunCMake/ObjectLibrary/b.c
index 220ce03..2c65a2b 100644
--- a/Tests/RunCMake/ObjectLibrary/b.c
+++ b/Tests/RunCMake/ObjectLibrary/b.c
@@ -5,7 +5,7 @@
#endif
extern int a(void);
-EXPORT int b()
+EXPORT int b(void)
{
return a();
}
diff --git a/Tests/RunCMake/ObjectLibrary/requires.c b/Tests/RunCMake/ObjectLibrary/requires.c
index 685632b..a5b429a 100644
--- a/Tests/RunCMake/ObjectLibrary/requires.c
+++ b/Tests/RunCMake/ObjectLibrary/requires.c
@@ -1,5 +1,5 @@
#ifdef REQUIRED
-int required()
+int required(void)
{
return 0;
}
diff --git a/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake b/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake
new file mode 100644
index 0000000..3e7fb30
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake
@@ -0,0 +1,22 @@
+if (NOT CMAKE_C_COMPILER_ID MATCHES "GNU|Intel" OR
+ (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND CMAKE_HOST_WIN32))
+ return()
+endif()
+
+file(STRINGS ${RunCMake_TEST_BINARY_DIR}/compile_commands.json empty_dir_commands
+ REGEX "command.*-Winvalid-pch.*empty.dir/cmake_pch.h")
+file(STRINGS ${RunCMake_TEST_BINARY_DIR}/compile_commands.json foo_dir_commands
+ REGEX "command.*-Winvalid-pch.*foo.dir/cmake_pch.h")
+
+list(LENGTH empty_dir_commands empty_dir_commands_size)
+list(LENGTH foo_dir_commands foo_dir_commands_size)
+
+if (empty_dir_commands_size EQUAL 0)
+ set(RunCMake_TEST_FAILED "empty target should have -Winvalid-pch compile option present")
+ return()
+endif()
+
+if (foo_dir_commands_size GREATER 0)
+ set(RunCMake_TEST_FAILED "foo target should not have -Winvalid-pch compile option present")
+ return()
+endif()
diff --git a/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid.cmake b/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid.cmake
new file mode 100644
index 0000000..4525664
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid.cmake
@@ -0,0 +1,16 @@
+enable_language(C)
+
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
+add_library(empty empty.c)
+target_precompile_headers(empty PUBLIC
+ <stdio.h>
+ <string.h>
+)
+
+add_library(foo foo.c)
+target_precompile_headers(foo PUBLIC
+ <stdio.h>
+ <string.h>
+)
+set_target_properties(foo PROPERTIES PCH_WARN_INVALID OFF)
diff --git a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
index f587c7d..381b800 100644
--- a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
@@ -4,12 +4,9 @@ include(RunCMake)
function(run_test name)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-build)
run_cmake(${name})
- # Precompiled headers are not supported with multiple architectures.
- if(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]")
- set(RunCMake_TEST_NO_CLEAN 1)
- run_cmake_command(${name}-build ${CMAKE_COMMAND} --build . --config Debug)
- run_cmake_command(${name}-test ${CMAKE_CTEST_COMMAND} -C Debug)
- endif()
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(${name}-build ${CMAKE_COMMAND} --build . --config Debug)
+ run_cmake_command(${name}-test ${CMAKE_CTEST_COMMAND} -C Debug)
endfunction()
run_cmake(DisabledPch)
@@ -21,3 +18,6 @@ run_test(PchReuseFrom)
run_test(PchReuseFromPrefixed)
run_test(PchReuseFromSubdir)
run_cmake(PchMultilanguage)
+if(RunCMake_GENERATOR MATCHES "Make|Ninja")
+ run_cmake(PchWarnInvalid)
+endif()
diff --git a/Tests/RunCMake/PrecompileHeaders/empty.c b/Tests/RunCMake/PrecompileHeaders/empty.c
index 30ae1c4..2a51ebc 100644
--- a/Tests/RunCMake/PrecompileHeaders/empty.c
+++ b/Tests/RunCMake/PrecompileHeaders/empty.c
@@ -1,3 +1,3 @@
-void nothing()
+void nothing(void)
{
}
diff --git a/Tests/RunCMake/Syntax/CommandEOF-stderr.txt b/Tests/RunCMake/Syntax/CommandEOF-stderr.txt
index 31cbc08..b9f8fd1 100644
--- a/Tests/RunCMake/Syntax/CommandEOF-stderr.txt
+++ b/Tests/RunCMake/Syntax/CommandEOF-stderr.txt
@@ -1,4 +1,4 @@
-^CMake Error in CommandEOF.cmake:
+^CMake Error at CommandEOF.cmake:1:
Unexpected end of file.
Parse error. Function missing opening "\(".
diff --git a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
index 9a1e027..2d270c5 100644
--- a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
+++ b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
@@ -29,6 +29,8 @@
\* CMP0083
\* CMP0095
\* CMP0099
+ \* CMP0104
+ \* CMP0105
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/UnityBuild/RunCMakeTest.cmake b/Tests/RunCMake/UnityBuild/RunCMakeTest.cmake
index 24daa64..9ba3c85 100644
--- a/Tests/RunCMake/UnityBuild/RunCMakeTest.cmake
+++ b/Tests/RunCMake/UnityBuild/RunCMakeTest.cmake
@@ -1,14 +1,20 @@
include(RunCMake)
run_cmake(unitybuild_c)
+run_cmake(unitybuild_c_batch)
+run_cmake(unitybuild_c_group)
run_cmake(unitybuild_cxx)
+run_cmake(unitybuild_cxx_group)
run_cmake(unitybuild_c_and_cxx)
+run_cmake(unitybuild_c_and_cxx_group)
run_cmake(unitybuild_batchsize)
run_cmake(unitybuild_default_batchsize)
run_cmake(unitybuild_skip)
run_cmake(unitybuild_code_before_and_after_include)
run_cmake(unitybuild_c_no_unity_build)
+run_cmake(unitybuild_c_no_unity_build_group)
run_cmake(unitybuild_order)
+run_cmake(unitybuild_invalid_mode)
function(run_test name)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-build)
diff --git a/Tests/RunCMake/UnityBuild/f.c b/Tests/RunCMake/UnityBuild/f.c
new file mode 100644
index 0000000..d5813c6
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/f.c
@@ -0,0 +1,5 @@
+int f(int x)
+{
+ (void)x;
+ return 0;
+}
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx_group-check.cmake b/Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx_group-check.cmake
new file mode 100644
index 0000000..b027682
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx_group-check.cmake
@@ -0,0 +1,42 @@
+set(unitybuild_a_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_a_c.c")
+if(NOT EXISTS "${unitybuild_a_c}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_a_c} does not exist.")
+ return()
+else()
+ #verify that the 4 c file is part of this grouping and therefore UNITY_BUILD_BATCH_SIZE
+ #was ignored
+ file(STRINGS ${unitybuild_a_c} unitybuild_a_c_strings)
+ string(REGEX MATCH ".*#include.*s1.c.*#include.*s2.c.*#include.*s3.c.*#include.*s4.c.*" matched_code ${unitybuild_a_c_strings})
+ if(NOT matched_code)
+ set(RunCMake_TEST_FAILED "Generated unity file doesn't include expected source files")
+ return()
+ endif()
+endif()
+
+set(unitybuild_b_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_b_c.c")
+if(NOT EXISTS "${unitybuild_b_c}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_b_c} does not exist.")
+ return()
+endif()
+
+
+set(unitybuild_a_cxx "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_a_cxx.cxx")
+if(NOT EXISTS "${unitybuild_a_cxx}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_a_cxx} does not exist.")
+ return()
+else()
+ #verify that the 4 cxx file are part of this grouping and therefore UNITY_BUILD_BATCH_SIZE
+ #was ignored
+ file(STRINGS ${unitybuild_a_cxx} unitybuild_a_cxx_strings)
+ string(REGEX MATCH ".*#include.*s1.cxx.*#include.*s2.cxx.*#include.*s3.cxx.*#include.*s4.cxx.*" matched_code ${unitybuild_a_cxx_strings})
+ if(NOT matched_code)
+ set(RunCMake_TEST_FAILED "Generated unity file doesn't include expected source files")
+ return()
+ endif()
+endif()
+
+set(unitybuild_b_cxx "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_b_cxx.cxx")
+if(NOT EXISTS "${unitybuild_b_cxx}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_b_cxx} does not exist.")
+ return()
+endif()
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx_group.cmake b/Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx_group.cmake
new file mode 100644
index 0000000..7bf3f4b
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_c_and_cxx_group.cmake
@@ -0,0 +1,39 @@
+project(unitybuild_c_and_cxx C CXX)
+
+set(srcs f.c)
+foreach(s RANGE 1 8)
+ set(src_c "${CMAKE_CURRENT_BINARY_DIR}/s${s}.c")
+ file(WRITE "${src_c}" "
+int f(int);\n
+int s${s}(void) { return f(${s}); }\n"
+ )
+
+ set(src_cxx "${CMAKE_CURRENT_BINARY_DIR}/s${s}.cxx")
+ file(WRITE "${src_cxx}" "
+extern \"C\" { \n
+ int f(int); \n
+}\n
+ int s${s}(void) { return f(${s}); }\n"
+ )
+
+ list(APPEND srcs "${src_c}")
+ list(APPEND srcs "${src_cxx}")
+endforeach()
+
+
+
+add_library(tgt SHARED ${srcs})
+
+set_target_properties(tgt PROPERTIES UNITY_BUILD ON
+ UNITY_BUILD_MODE GROUP
+ #UNITY_BUILD_BATCH_SIZE will be ignored
+ UNITY_BUILD_BATCH_SIZE 2)
+
+set_source_files_properties(s1.c s2.c s3.c s4.c
+ s1.cxx s2.cxx s3.cxx s4.cxx
+ PROPERTIES UNITY_GROUP "a"
+ )
+set_source_files_properties(s5.c s6.c s7.c s8.c
+ s5.cxx s6.cxx s7.cxx s8.cxx
+ PROPERTIES UNITY_GROUP "b"
+ )
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_c_batch-check.cmake b/Tests/RunCMake/UnityBuild/unitybuild_c_batch-check.cmake
new file mode 100644
index 0000000..024286d
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_c_batch-check.cmake
@@ -0,0 +1,5 @@
+set(unitybuild_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_0_c.c")
+if(NOT EXISTS "${unitybuild_c}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_c} does not exist.")
+ return()
+endif()
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_c_batch.cmake b/Tests/RunCMake/UnityBuild/unitybuild_c_batch.cmake
new file mode 100644
index 0000000..33873b6
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_c_batch.cmake
@@ -0,0 +1,15 @@
+project(unitybuild_c C)
+
+set(srcs "")
+foreach(s RANGE 1 8)
+ set(src "${CMAKE_CURRENT_BINARY_DIR}/s${s}.c")
+ file(WRITE "${src}" "int s${s}(void) { return 0; }\n")
+ list(APPEND srcs "${src}")
+endforeach()
+
+add_library(tgt SHARED ${srcs})
+
+set_target_properties(tgt PROPERTIES
+ UNITY_BUILD ON
+ UNITY_BUILD_MODE BATCH
+ )
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_c_group-check.cmake b/Tests/RunCMake/UnityBuild/unitybuild_c_group-check.cmake
new file mode 100644
index 0000000..0b9ea15
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_c_group-check.cmake
@@ -0,0 +1,11 @@
+set(unitybuild_a_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_a_c.c")
+if(NOT EXISTS "${unitybuild_a_c}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_a_c} does not exist.")
+ return()
+endif()
+
+set(unitybuild_b_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_b_c.c")
+if(NOT EXISTS "${unitybuild_b_c}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_b_c} does not exist.")
+ return()
+endif()
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_c_group.cmake b/Tests/RunCMake/UnityBuild/unitybuild_c_group.cmake
new file mode 100644
index 0000000..1fa17f3
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_c_group.cmake
@@ -0,0 +1,17 @@
+project(unitybuild_c C)
+
+set(srcs "")
+foreach(s RANGE 1 8)
+ set(src "${CMAKE_CURRENT_BINARY_DIR}/s${s}.c")
+ file(WRITE "${src}" "int s${s}(void) { return 0; }\n")
+ list(APPEND srcs "${src}")
+endforeach()
+
+add_library(tgt SHARED ${srcs})
+
+set_target_properties(tgt PROPERTIES UNITY_BUILD ON
+ UNITY_BUILD_MODE GROUP)
+
+set_source_files_properties(s1.c PROPERTIES UNITY_GROUP "a")
+set_source_files_properties(s2.c PROPERTIES UNITY_GROUP "a")
+set_source_files_properties(s3.c s4.c PROPERTIES UNITY_GROUP "b")
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_c_no_unity_build_group-check.cmake b/Tests/RunCMake/UnityBuild/unitybuild_c_no_unity_build_group-check.cmake
new file mode 100644
index 0000000..e344627
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_c_no_unity_build_group-check.cmake
@@ -0,0 +1,5 @@
+set(unitybuild_c "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_a_c.c")
+if(EXISTS "${unitybuild_c}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_c} should not exist.")
+ return()
+endif()
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_c_no_unity_build_group.cmake b/Tests/RunCMake/UnityBuild/unitybuild_c_no_unity_build_group.cmake
new file mode 100644
index 0000000..7b26dc1
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_c_no_unity_build_group.cmake
@@ -0,0 +1,16 @@
+project(unitybuild_c_no_unity_build C)
+
+set(srcs "")
+foreach(s RANGE 1 8)
+ set(src "${CMAKE_CURRENT_BINARY_DIR}/s${s}.c")
+ file(WRITE "${src}" "int s${s}(void) { return 0; }\n")
+ list(APPEND srcs "${src}")
+endforeach()
+
+add_library(tgt SHARED ${srcs})
+
+#These should be ignored as UNITY_BUILD is off
+set_target_properties(tgt PROPERTIES UNITY_BUILD_MODE GROUP)
+set_source_files_properties(s1.c s2.c s3.c s4.c s5.c s6.c s7.c s8.c
+ PROPERTIES UNITY_GROUP "a"
+ )
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_cxx_group-check.cmake b/Tests/RunCMake/UnityBuild/unitybuild_cxx_group-check.cmake
new file mode 100644
index 0000000..ecef3a3
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_cxx_group-check.cmake
@@ -0,0 +1,27 @@
+set(unitybuild_a_cxx "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_a_cxx.cxx")
+if(NOT EXISTS "${unitybuild_a_cxx}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_a_cxx} does not exist.")
+ return()
+else()
+ #verify that odr2 is not part of this source set
+ file(STRINGS ${unitybuild_a_cxx} unitybuild_a_cxx_strings)
+ string(REGEX MATCH ".*#include.*odr2.cxx" matched_code ${unitybuild_a_cxx_strings})
+ if(matched_code)
+ set(RunCMake_TEST_FAILED "Generated unity file includes un-expected ord2.cxx source file")
+ return()
+ endif()
+endif()
+
+set(unitybuild_b_cxx "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_b_cxx.cxx")
+if(NOT EXISTS "${unitybuild_b_cxx}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_b_cxx} does not exist.")
+ return()
+else()
+ #verify that odr1 is not part of this source set
+ file(STRINGS ${unitybuild_b_cxx} unitybuild_b_cxx_strings)
+ string(REGEX MATCH ".*#include.*odr1.cxx" matched_code ${unitybuild_b_cxx_strings})
+ if(matched_code)
+ set(RunCMake_TEST_FAILED "Generated unity file includes un-expected ord1.cxx source file")
+ return()
+ endif()
+endif()
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_cxx_group.cmake b/Tests/RunCMake/UnityBuild/unitybuild_cxx_group.cmake
new file mode 100644
index 0000000..9804289
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_cxx_group.cmake
@@ -0,0 +1,27 @@
+project(unitybuild_cxx CXX)
+
+set(srcs "")
+foreach(s RANGE 1 4)
+ set(src "${CMAKE_CURRENT_BINARY_DIR}/s${s}.cxx")
+ file(WRITE "${src}" "int s${s}(void) { return 0; }\n")
+ list(APPEND srcs "${src}")
+endforeach()
+
+foreach(s RANGE 1 2)
+ set(src "${CMAKE_CURRENT_BINARY_DIR}/odr${s}.cxx")
+ file(WRITE "${src}" "namespace odr { int s${s}(void) { return 0; } }\n")
+ list(APPEND srcs "${src}")
+endforeach()
+
+add_library(tgt SHARED ${srcs})
+
+set_target_properties(tgt PROPERTIES UNITY_BUILD ON
+ UNITY_BUILD_MODE GROUP
+ )
+
+set_source_files_properties(s1.cxx s2.cxx odr1.cxx
+ PROPERTIES UNITY_GROUP "a"
+ )
+set_source_files_properties(s3.cxx s4.cxx odr2.cxx
+ PROPERTIES UNITY_GROUP "b"
+ )
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_invalid_mode-result.txt b/Tests/RunCMake/UnityBuild/unitybuild_invalid_mode-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_invalid_mode-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_invalid_mode-stderr.txt b/Tests/RunCMake/UnityBuild/unitybuild_invalid_mode-stderr.txt
new file mode 100644
index 0000000..b1b17a0
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_invalid_mode-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error in CMakeLists.txt:
+ Invalid UNITY_BUILD_MODE value of INVALID assigned to target tgt\.
+ Acceptable values are BATCH and GROUP\.
+.*
+CMake Generate step failed\. Build files cannot be regenerated correctly\.$
diff --git a/Tests/RunCMake/UnityBuild/unitybuild_invalid_mode.cmake b/Tests/RunCMake/UnityBuild/unitybuild_invalid_mode.cmake
new file mode 100644
index 0000000..0212200
--- /dev/null
+++ b/Tests/RunCMake/UnityBuild/unitybuild_invalid_mode.cmake
@@ -0,0 +1,12 @@
+project(unitybuild_c C)
+
+set(srcs "")
+foreach(s RANGE 1 8)
+ set(src "${CMAKE_CURRENT_BINARY_DIR}/s${s}.c")
+ file(WRITE "${src}" "int s${s}(void) { return 0; }\n")
+ list(APPEND srcs "${src}")
+endforeach()
+
+add_library(tgt SHARED ${srcs})
+
+set_target_properties(tgt PROPERTIES UNITY_BUILD ON UNITY_BUILD_MODE INVALID)
diff --git a/Tests/RunCMake/VS10Project/CSharpSourceGroup/foo.cs b/Tests/RunCMake/VS10Project/CSharpSourceGroup/foo.cs
new file mode 100644
index 0000000..3695dc9
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/CSharpSourceGroup/foo.cs
@@ -0,0 +1,3 @@
+void foo()
+{
+}
diff --git a/Tests/RunCMake/VS10Project/CSharpSourceGroup/images/empty.bmp b/Tests/RunCMake/VS10Project/CSharpSourceGroup/images/empty.bmp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/CSharpSourceGroup/images/empty.bmp
diff --git a/Tests/RunCMake/VS10Project/CSharpSourceGroup/nested/baz.cs b/Tests/RunCMake/VS10Project/CSharpSourceGroup/nested/baz.cs
new file mode 100644
index 0000000..d5d334a
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/CSharpSourceGroup/nested/baz.cs
@@ -0,0 +1,3 @@
+void baz()
+{
+}
diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
index 8a04f78..93ef603 100644
--- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
@@ -3,12 +3,12 @@ cmake_policy(SET CMP0057 NEW)
include(RunCMake)
cmake_policy(SET CMP0054 NEW)
+run_cmake(VsCsharpSourceGroup)
run_cmake(VsCSharpCompilerOpts)
run_cmake(ExplicitCMakeLists)
run_cmake(RuntimeLibrary)
run_cmake(SourceGroupCMakeLists)
run_cmake(SourceGroupTreeCMakeLists)
-
run_cmake(VsConfigurationType)
run_cmake(VsTargetsFileReferences)
run_cmake(VsCustomProps)
@@ -30,6 +30,10 @@ run_cmake(VsDpiAware)
run_cmake(VsDpiAwareBadParam)
run_cmake(VsPrecompileHeaders)
run_cmake(VsPrecompileHeadersReuseFromCompilePDBName)
+run_cmake(VsDeployEnabled)
+run_cmake(VsSettings)
+run_cmake(VsSourceSettingsTool)
+run_cmake(VsPlatformToolset)
run_cmake(VsWinRTByDefault)
@@ -52,6 +56,7 @@ if (RunCMake_GENERATOR MATCHES "Visual Studio 1[0-4] 201[0-5]" OR
run_cmake(UnityBuildPre2017)
else()
run_cmake(UnityBuildNative)
+ run_cmake(UnityBuildNativeGrouped)
endif()
run_cmake(VsDotnetTargetFramework)
diff --git a/Tests/RunCMake/VS10Project/UnityBuildNativeGrouped-check.cmake b/Tests/RunCMake/VS10Project/UnityBuildNativeGrouped-check.cmake
new file mode 100644
index 0000000..d6380da
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/UnityBuildNativeGrouped-check.cmake
@@ -0,0 +1,56 @@
+set(unitybuild_c0 "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_poolA_c.c")
+if(NOT EXISTS "${unitybuild_c0}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_c0} does not exist.")
+ return()
+endif()
+
+set(unitybuild_c1 "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_poolB_c.c")
+if(NOT EXISTS "${unitybuild_c1}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_c1} does not exist.")
+ return()
+endif()
+
+set(tgt_project "${RunCMake_TEST_BINARY_DIR}/tgt.vcxproj")
+if (NOT EXISTS "${tgt_project}")
+ set(RunCMake_TEST_FAILED "Generated project file ${tgt_project} doesn't exist.")
+ return()
+endif()
+
+file(STRINGS ${tgt_project} tgt_projects_strings)
+
+foreach(line IN LISTS tgt_projects_strings)
+ if (line MATCHES "<EnableUnitySupport>true</EnableUnitySupport>")
+ set(have_unity_support ON)
+ endif()
+
+ if (line MATCHES "<ClCompile Include=.*IncludeInUnityFile=\"false\" CustomUnityFile=\"true\"")
+ list(APPEND unity_source_lines ${line})
+ endif()
+
+ if (line MATCHES "<ClCompile Include=.*IncludeInUnityFile=\"true\" CustomUnityFile=\"true\"")
+ list(APPEND sources_list ${line})
+ endif()
+endforeach()
+
+if (NOT have_unity_support)
+ set(RunCMake_TEST_FAILED "Generated project should include the <EnableUnitySupport> block.")
+ return()
+endif()
+
+string(REPLACE "\\" "/" unity_source_lines "${unity_source_lines}")
+string(FIND "${unity_source_lines}" "CMakeFiles/tgt.dir/Unity/unity_poolA_c.c" unity_source_file_position)
+if (unity_source_file_position EQUAL "-1")
+ set(RunCMake_TEST_FAILED "Generated project should include the generated unity source file 'poolA'.")
+ return()
+endif()
+string(FIND "${unity_source_lines}" "CMakeFiles/tgt.dir/Unity/unity_poolB_c.c" unity_source_file_position)
+if (unity_source_file_position EQUAL "-1")
+ set(RunCMake_TEST_FAILED "Generated project should include the generated unity source file 'poolB'.")
+ return()
+endif()
+
+list(LENGTH sources_list number_of_sources)
+if(NOT number_of_sources EQUAL 7)
+ set(RunCMake_TEST_FAILED "Generated project doesn't include the expect number of files.")
+ return()
+endif()
diff --git a/Tests/RunCMake/VS10Project/UnityBuildNativeGrouped.cmake b/Tests/RunCMake/VS10Project/UnityBuildNativeGrouped.cmake
new file mode 100644
index 0000000..b740e3b
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/UnityBuildNativeGrouped.cmake
@@ -0,0 +1,20 @@
+project(unitybuild_c C)
+
+set(srcs "")
+foreach(s RANGE 1 8)
+ set(src "${CMAKE_CURRENT_BINARY_DIR}/s${s}.c")
+ file(WRITE "${src}" "int s${s}(void) { return 0; }\n")
+ list(APPEND srcs "${src}")
+endforeach()
+
+add_library(tgt SHARED ${srcs})
+
+set_target_properties(tgt PROPERTIES UNITY_BUILD ON UNITY_BUILD_MODE GROUP)
+
+set_source_files_properties(s1.c s2.c s3.c s4.c
+ PROPERTIES UNITY_GROUP "poolA"
+ )
+
+set_source_files_properties(s5.c s6.c s7.c
+ PROPERTIES UNITY_GROUP "poolB"
+ )
diff --git a/Tests/RunCMake/VS10Project/UnityBuildPre2017Grouped-check.cmake b/Tests/RunCMake/VS10Project/UnityBuildPre2017Grouped-check.cmake
new file mode 100644
index 0000000..d9b8c01
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/UnityBuildPre2017Grouped-check.cmake
@@ -0,0 +1,59 @@
+set(unitybuild_c0 "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_poolA.c")
+if(NOT EXISTS "${unitybuild_c0}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_c0} does not exist.")
+ return()
+endif()
+
+set(unitybuild_c1 "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/Unity/unity_poolB.c")
+if(NOT EXISTS "${unitybuild_c1}")
+ set(RunCMake_TEST_FAILED "Generated unity source files ${unitybuild_c1} does not exist.")
+ return()
+endif()
+
+set(tgt_project "${RunCMake_TEST_BINARY_DIR}/tgt.vcxproj")
+if (NOT EXISTS "${tgt_project}")
+ set(RunCMake_TEST_FAILED "Generated project file ${tgt_project} doesn't exist.")
+ return()
+endif()
+
+file(STRINGS ${tgt_project} tgt_projects_strings)
+
+foreach(line IN LISTS tgt_projects_strings)
+ if (line MATCHES "<ClCompile Include=.*/>")
+ set(unity_source_line ${line})
+ endif()
+
+ if (line MATCHES "<ClCompile Include=\"[^\"]*\">")
+ string(REGEX MATCH "<ClCompile Include=\"([^\"]*)\">" source_file ${line})
+ list(APPEND sources_list ${source_file})
+ endif()
+
+ if (line MATCHES "<ExcludedFromBuild.*</ExcludedFromBuild>")
+ list(APPEND excluded_sources_list ${source_file})
+ endif()
+endforeach()
+
+string(REPLACE "\\" "/" unity_source_line ${unity_source_line})
+string(FIND "${unity_source_line}" "CMakeFiles/tgt.dir/Unity/unity_poolA.c" unity_source_file_position)
+if (unity_source_file_position EQUAL "-1")
+ set(RunCMake_TEST_FAILED "Generated project should include the generated unity source file.")
+ return()
+endif()
+string(FIND "${unity_source_line}" "CMakeFiles/tgt.dir/Unity/unity_poolB.c" unity_source_file_position)
+if (unity_source_file_position EQUAL "-1")
+ set(RunCMake_TEST_FAILED "Generated project should include the generated unity source file.")
+ return()
+endif()
+
+list(LENGTH sources_list number_of_sources)
+if(NOT number_of_sources EQUAL 7)
+ set(RunCMake_TEST_FAILED "Generated project doesn't include the expect number of files.")
+ return()
+endif()
+
+# Exclusions for Debug|Release|MinSizeRel|RelWithDebInfo
+list(LENGTH excluded_sources_list number_of_excluded_sources)
+if(NOT number_of_excluded_sources EQUAL 28)
+ set(RunCMake_TEST_FAILED "Generated project doesn't exclude the source files for all configurations.")
+ return()
+endif()
diff --git a/Tests/RunCMake/VS10Project/UnityBuildPre2017Grouped.cmake b/Tests/RunCMake/VS10Project/UnityBuildPre2017Grouped.cmake
new file mode 100644
index 0000000..b740e3b
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/UnityBuildPre2017Grouped.cmake
@@ -0,0 +1,20 @@
+project(unitybuild_c C)
+
+set(srcs "")
+foreach(s RANGE 1 8)
+ set(src "${CMAKE_CURRENT_BINARY_DIR}/s${s}.c")
+ file(WRITE "${src}" "int s${s}(void) { return 0; }\n")
+ list(APPEND srcs "${src}")
+endforeach()
+
+add_library(tgt SHARED ${srcs})
+
+set_target_properties(tgt PROPERTIES UNITY_BUILD ON UNITY_BUILD_MODE GROUP)
+
+set_source_files_properties(s1.c s2.c s3.c s4.c
+ PROPERTIES UNITY_GROUP "poolA"
+ )
+
+set_source_files_properties(s5.c s6.c s7.c
+ PROPERTIES UNITY_GROUP "poolB"
+ )
diff --git a/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake
new file mode 100644
index 0000000..3b5c70f
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake
@@ -0,0 +1,22 @@
+set(csProjFile "${RunCMake_TEST_BINARY_DIR}/VsCsharpSourceGroup.csproj")
+if(NOT EXISTS "${csProjFile}")
+ set(RunCMake_TEST_FAILED "Project file ${csProjFile} does not exist.")
+ return()
+endif()
+
+file(STRINGS "${csProjFile}" lines)
+
+include(${RunCMake_TEST_SOURCE_DIR}/VsCsharpSourceGroupHelpers.cmake)
+
+set(SOURCE_GROUPS_TO_FIND
+ "CSharpSourceGroup"
+ "CSharpSourceGroup/nested"
+ "Images"
+)
+
+foreach(GROUP_NAME IN LISTS ${SOURCE_GROUPS_TO_FIND})
+ find_source_group("${lines}" ${GROUP_NAME})
+ if(NOT ${SOURCE_GROUP_FOUND})
+ return()
+ endif()
+endforeach()
diff --git a/Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake
new file mode 100644
index 0000000..024993c
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake
@@ -0,0 +1,16 @@
+enable_language(CSharp)
+set(CMAKE_CONFIGURATION_TYPES Debug)
+
+set(SRC_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/foo.cs
+ ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/nested/baz.cs
+)
+
+set(IMAGE_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/Images/empty.bmp
+)
+
+add_library(VsCsharpSourceGroup SHARED ${SRC_FILES} ${IMAGE_FILES})
+source_group("CSharpSourceGroup" FILES ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/foo.cs)
+source_group("CSharpSourceGroup/nested" FILES ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/nested/baz.cs)
+source_group("Images" FILES ${IMAGE_FILES})
diff --git a/Tests/RunCMake/VS10Project/VsCsharpSourceGroupHelpers.cmake b/Tests/RunCMake/VS10Project/VsCsharpSourceGroupHelpers.cmake
new file mode 100644
index 0000000..bfa9a67
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsCsharpSourceGroupHelpers.cmake
@@ -0,0 +1,15 @@
+function(find_source_group LINES NAME)
+ set(foundSourceGroupLink 0)
+ foreach(line IN LISTS LINES)
+ if(line MATCHES "<Link>${NAME}</Link>")
+ set(foundSourceGroupLink 1)
+ endif()
+ endforeach()
+
+ if(NOT foundSourceGroupLink)
+ set(RunCMake_TEST_FAILED "Source group link for ${NAME} not found." PARENT_SCOPE)
+ set(SOURCE_GROUP_FOUND 0 PARENT_SCOPE)
+ return()
+ endif()
+ set(SOURCE_GROUP_FOUND 1 PARENT_SCOPE)
+endfunction()
diff --git a/Tests/RunCMake/VS10Project/VsDeployEnabled-check.cmake b/Tests/RunCMake/VS10Project/VsDeployEnabled-check.cmake
new file mode 100644
index 0000000..0ff8678
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsDeployEnabled-check.cmake
@@ -0,0 +1,58 @@
+set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
+if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+ return()
+endif()
+#
+# Test solution file for deployment.
+#
+
+set(vcSlnFile "${RunCMake_TEST_BINARY_DIR}/VsDeployEnabled.sln")
+if(NOT EXISTS "${vcSlnFile}")
+ set(RunCMake_TEST_FAILED "Solution file ${vcSlnFile} does not exist.")
+ return()
+endif()
+
+
+
+set(FooProjGUID "")
+set(FoundFooProj FALSE)
+set(InFooProj FALSE)
+set(FoundReleaseDeploy FALSE)
+set(DeployConfigs Debug MinSizeRel RelWithDebInfo )
+
+file(STRINGS "${vcSlnFile}" lines)
+foreach(line IN LISTS lines)
+#message(STATUS "${line}")
+ if( (NOT InFooProj ) AND (line MATCHES "^[ \\t]*Project\\(\"{[A-F0-9-]+}\"\\) = \"foo\", \"foo.vcxproj\", \"({[A-F0-9-]+})\"[ \\t]*$"))
+ # First, identify the GUID for the foo project, and record it.
+ set(FoundFooProj TRUE)
+ set(InFooProj TRUE)
+ set(FooProjGUID ${CMAKE_MATCH_1})
+ elseif(InFooProj AND line MATCHES "EndProject")
+ set(InFooProj FALSE)
+ elseif((NOT InFooProj) AND line MATCHES "${FooProjGUID}\\.Release.*\\.Deploy\\.0")
+ # If foo's Release configuration is set to deploy, this is the error.
+ set(FoundReleaseDeploy TRUE)
+ endif()
+ if( line MATCHES "{[A-F0-9-]+}\\.([^\\|]+).*\\.Deploy\\.0" )
+ # Check that the other configurations ARE set to deploy.
+ list( REMOVE_ITEM DeployConfigs ${CMAKE_MATCH_1})
+ endif()
+endforeach()
+
+if(FoundReleaseDeploy)
+ set(RunCMake_TEST_FAILED "Release deployment enabled.")
+ return()
+endif()
+
+if(NOT FoundFooProj)
+ set(RunCMake_TEST_FAILED "Failed to find foo project in the solution.")
+ return()
+endif()
+
+list(LENGTH DeployConfigs length)
+if( length GREATER 0 )
+ set(RunCMake_TEST_FAILED "Failed to find Deploy lines for non-Release configurations. (${length})")
+ return()
+endif()
diff --git a/Tests/RunCMake/VS10Project/VsDeployEnabled.cmake b/Tests/RunCMake/VS10Project/VsDeployEnabled.cmake
new file mode 100644
index 0000000..02b42b2
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsDeployEnabled.cmake
@@ -0,0 +1,12 @@
+enable_language(CXX)
+
+set(DEPLOY_DIR
+ "temp\\foodir"
+)
+
+add_library(foo SHARED foo.cpp)
+
+set_target_properties(foo
+ PROPERTIES
+ VS_SOLUTION_DEPLOY $<NOT:$<CONFIG:Release>>
+)
diff --git a/Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake b/Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake
new file mode 100644
index 0000000..416220b
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsPlatformToolset-check.cmake
@@ -0,0 +1,36 @@
+macro(ReadPlatformToolset tgt outvar)
+ set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/${tgt}.vcxproj")
+ if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj does not exist.")
+ return()
+ endif()
+
+ set(HAVE_PlatformToolset 0)
+
+ file(STRINGS "${vcProjectFile}" lines)
+ foreach(line IN LISTS lines)
+ if(line MATCHES "^ *<PlatformToolset>([^<>]+)</PlatformToolset>")
+ set(${outvar} "${CMAKE_MATCH_1}")
+ set(HAVE_PlatformToolset 1)
+ break()
+ endif()
+ endforeach()
+
+ if(NOT HAVE_PlatformToolset)
+ set(RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj does not have a <PlatformToolset> field.")
+ return()
+ endif()
+endmacro()
+
+ReadPlatformToolset(NormalPlatformToolset NORMAL_TOOLSET)
+ReadPlatformToolset(OverridenPlatformToolset OVERRIDEN_TOOLSET)
+
+if (NOT "${OVERRIDEN_TOOLSET}" STREQUAL "MyCustomToolset")
+ set(RunCMake_TEST_FAILED "Failed to override the platform toolset")
+ return()
+endif()
+
+if ("${NORMAL_TOOLSET}" STREQUAL "MyCustomToolset")
+ set(RunCMake_TEST_FAILED "Main toolset was overriden (it shouldn't)")
+ return()
+endif()
diff --git a/Tests/RunCMake/VS10Project/VsPlatformToolset.cmake b/Tests/RunCMake/VS10Project/VsPlatformToolset.cmake
new file mode 100644
index 0000000..dce9717
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsPlatformToolset.cmake
@@ -0,0 +1,6 @@
+enable_language(CXX)
+
+add_library(NormalPlatformToolset foo.cpp)
+add_library(OverridenPlatformToolset foo.cpp)
+set_target_properties(OverridenPlatformToolset
+ PROPERTIES VS_PLATFORM_TOOLSET MyCustomToolset)
diff --git a/Tests/RunCMake/VS10Project/VsSettings-check.cmake b/Tests/RunCMake/VS10Project/VsSettings-check.cmake
new file mode 100644
index 0000000..0f8b26c
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsSettings-check.cmake
@@ -0,0 +1,23 @@
+macro(ensure_props_set projectFile)
+ if(NOT EXISTS "${projectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${projectFile} does not exist.")
+ return()
+ endif()
+
+ set(SettingFound FALSE)
+
+ file(STRINGS "${projectFile}" lines)
+ foreach(line IN LISTS lines)
+ if(line MATCHES "<SourceProperty1.*Debug.*>SourceProperty1Value</SourceProperty1>")
+ message("SourceProperty1 setting found")
+ set(SettingFound TRUE)
+ endif()
+ endforeach()
+
+ if (NOT SettingFound)
+ set(RunCMake_TEST_FAILED "SourceProperty1 setting was not found")
+ return()
+ endif()
+endmacro()
+
+ensure_props_set("${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
diff --git a/Tests/RunCMake/VS10Project/VsSettings.cmake b/Tests/RunCMake/VS10Project/VsSettings.cmake
new file mode 100644
index 0000000..a4b321b
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsSettings.cmake
@@ -0,0 +1,5 @@
+enable_language(CXX)
+
+add_library(foo foo.cpp shader.hlsl)
+set_property(SOURCE shader.hlsl PROPERTY VS_SETTINGS
+ "$<$<CONFIG:DEBUG>:SourceProperty1=SourceProperty1Value>")
diff --git a/Tests/RunCMake/VS10Project/VsSourceSettingsTool-check.cmake b/Tests/RunCMake/VS10Project/VsSourceSettingsTool-check.cmake
new file mode 100644
index 0000000..29a89c3
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsSourceSettingsTool-check.cmake
@@ -0,0 +1,34 @@
+macro(ensure_props_set projectFile)
+ if(NOT EXISTS "${projectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${projectFile} does not exist.")
+ return()
+ endif()
+
+ set(FirstSettingFound FALSE)
+ set(SecondSettingFound FALSE)
+
+ file(STRINGS "${projectFile}" lines)
+ foreach(line IN LISTS lines)
+ if(line MATCHES "<TargetProperty1.*Debug.*>TargetProperty1ValueDebug</TargetProperty1>")
+ if (FirstSettingFound)
+ message("TargetProperty1 setting found twice")
+ set(SecondSettingFound TRUE)
+ else()
+ message("TargetProperty1 setting found once")
+ set(FirstSettingFound TRUE)
+ endif()
+ endif()
+ endforeach()
+
+ if (NOT FirstSettingFound)
+ set(RunCMake_TEST_FAILED "TargetProperty1 setting not found at all")
+ return()
+ endif()
+
+ if (NOT SecondSettingFound)
+ set(RunCMake_TEST_FAILED "TargetProperty1 setting found once when it should be found twice")
+ return()
+ endif()
+endmacro()
+
+ensure_props_set("${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
diff --git a/Tests/RunCMake/VS10Project/VsSourceSettingsTool.cmake b/Tests/RunCMake/VS10Project/VsSourceSettingsTool.cmake
new file mode 100644
index 0000000..498962f
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsSourceSettingsTool.cmake
@@ -0,0 +1,5 @@
+enable_language(CXX)
+
+add_library(foo foo.cpp shader.hlsl shader2.hlsl)
+set_property(TARGET foo PROPERTY VS_SOURCE_SETTINGS_FXCompile
+ "$<$<CONFIG:DEBUG>:TargetProperty1=TargetProperty1ValueDebug>")
diff --git a/Tests/RunCMake/VS10Project/shader.hlsl b/Tests/RunCMake/VS10Project/shader.hlsl
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/shader.hlsl
@@ -0,0 +1 @@
+
diff --git a/Tests/RunCMake/VS10Project/shader2.hlsl b/Tests/RunCMake/VS10Project/shader2.hlsl
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/shader2.hlsl
@@ -0,0 +1 @@
+
diff --git a/Tests/RunCMake/add_link_options/GENEX_LINK_LANG.cmake b/Tests/RunCMake/add_link_options/GENEX_LINK_LANG.cmake
new file mode 100644
index 0000000..cc4ce4c
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/GENEX_LINK_LANG.cmake
@@ -0,0 +1,16 @@
+
+enable_language(C)
+
+set(obj "${CMAKE_C_OUTPUT_EXTENSION}")
+if(BORLAND)
+ set(pre -)
+endif()
+
+add_link_options ($<$<LINK_LANGUAGE:C>:${pre}BADFLAG_LANG_C${obj}>
+ $<$<LINK_LANGUAGE:CXX>:${pre}BADFLAG_LANG_CXX${obj}>)
+
+add_library(LinkOptions_shared SHARED LinkOptionsLib.c)
+
+add_library(LinkOptions_mod MODULE LinkOptionsLib.c)
+
+add_executable(LinkOptions_exe LinkOptionsExe.c)
diff --git a/Tests/RunCMake/add_link_options/LINKER_expansion-validation.cmake b/Tests/RunCMake/add_link_options/LINKER_expansion-validation.cmake
index bebd6c7..ece3ba0 100644
--- a/Tests/RunCMake/add_link_options/LINKER_expansion-validation.cmake
+++ b/Tests/RunCMake/add_link_options/LINKER_expansion-validation.cmake
@@ -11,5 +11,8 @@ endif()
file(READ "${RunCMake_TEST_BINARY_DIR}/LINKER.txt" linker_flag)
if (NOT actual_stdout MATCHES "${linker_flag}")
- set (RunCMake_TEST_FAILED "LINKER: was not expanded correctly.")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "LINKER: was not expanded correctly.")
endif()
diff --git a/Tests/RunCMake/add_link_options/LINK_OPTIONS-exe-check.cmake b/Tests/RunCMake/add_link_options/LINK_OPTIONS-exe-check.cmake
index 4a22d7e..127a2f5 100644
--- a/Tests/RunCMake/add_link_options/LINK_OPTIONS-exe-check.cmake
+++ b/Tests/RunCMake/add_link_options/LINK_OPTIONS-exe-check.cmake
@@ -3,5 +3,8 @@ if (NOT actual_stdout MATCHES "BADFLAG_EXECUTABLE_RELEASE")
set (RunCMake_TEST_FAILED "Not found expected 'BADFLAG_EXECUTABLE_RELEASE'.")
endif()
if (actual_stdout MATCHES "BADFLAG_(SHARED|MODULE)_RELEASE")
- set (RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_(SHARED|MODULE)_RELEASE'.")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_(SHARED|MODULE)_RELEASE'.")
endif()
diff --git a/Tests/RunCMake/add_link_options/LINK_OPTIONS-mod-check.cmake b/Tests/RunCMake/add_link_options/LINK_OPTIONS-mod-check.cmake
index d695761..874e0ad 100644
--- a/Tests/RunCMake/add_link_options/LINK_OPTIONS-mod-check.cmake
+++ b/Tests/RunCMake/add_link_options/LINK_OPTIONS-mod-check.cmake
@@ -3,5 +3,8 @@ if (NOT actual_stdout MATCHES "BADFLAG_MODULE_RELEASE")
set (RunCMake_TEST_FAILED "Not found expected 'BADFLAG_MODULE_RELEASE'.")
endif()
if (actual_stdout MATCHES "BADFLAG_(SHARED|EXECUTABLE)_RELEASE")
- set (RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_(SHARED|EXECUTABLE)_RELEASE'.")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_(SHARED|EXECUTABLE)_RELEASE'.")
endif()
diff --git a/Tests/RunCMake/add_link_options/LINK_OPTIONS-shared-check.cmake b/Tests/RunCMake/add_link_options/LINK_OPTIONS-shared-check.cmake
index eaac8e3..ecba17e 100644
--- a/Tests/RunCMake/add_link_options/LINK_OPTIONS-shared-check.cmake
+++ b/Tests/RunCMake/add_link_options/LINK_OPTIONS-shared-check.cmake
@@ -3,5 +3,8 @@ if (NOT actual_stdout MATCHES "BADFLAG_SHARED_RELEASE")
set (RunCMake_TEST_FAILED "Not found expected 'BADFLAG_SHARED_RELEASE'.")
endif()
if (actual_stdout MATCHES "BADFLAG_(MODULE|EXECUTABLE)_RELEASE")
- set (RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_(MODULE|EXECUTABLE)_RELEASE'.")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_(MODULE|EXECUTABLE)_RELEASE'.")
endif()
diff --git a/Tests/RunCMake/add_link_options/LinkOptionsLib.cxx b/Tests/RunCMake/add_link_options/LinkOptionsLib.cxx
new file mode 100644
index 0000000..9bbd24c
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/LinkOptionsLib.cxx
@@ -0,0 +1,7 @@
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+ int flags_lib(void)
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/add_link_options/RunCMakeTest.cmake b/Tests/RunCMake/add_link_options/RunCMakeTest.cmake
index 4f5df72..465ff85 100644
--- a/Tests/RunCMake/add_link_options/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_link_options/RunCMakeTest.cmake
@@ -23,6 +23,21 @@ if (NOT CMAKE_C_COMPILER_ID STREQUAL "Intel")
run_cmake_target(LINK_OPTIONS mod LinkOptions_mod --config Release)
run_cmake_target(LINK_OPTIONS exe LinkOptions_exe --config Release)
+
+ run_cmake(genex_LINK_LANGUAGE)
+
+ run_cmake_target(genex_LINK_LANGUAGE shared_c LinkOptions_shared_c --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE shared_cxx LinkOptions_shared_cxx --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE mod LinkOptions_mod --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE exe LinkOptions_exe --config Release)
+
+ run_cmake(genex_LINK_LANG_AND_ID)
+
+ run_cmake_target(genex_LINK_LANG_AND_ID shared_c LinkOptions_shared_c --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID shared_cxx LinkOptions_shared_cxx --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID mod LinkOptions_mod --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID exe LinkOptions_exe --config Release)
+
unset(RunCMake_TEST_OPTIONS)
unset(RunCMake_TEST_OUTPUT_MERGE)
endif()
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-exe-check.cmake b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-exe-check.cmake
new file mode 100644
index 0000000..71f641d
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-exe-check.cmake
@@ -0,0 +1,2 @@
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANGUAGE-validation.cmake")
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-exe-result.txt b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-exe-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-exe-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-mod-check.cmake b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-mod-check.cmake
new file mode 100644
index 0000000..71f641d
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-mod-check.cmake
@@ -0,0 +1,2 @@
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANGUAGE-validation.cmake")
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-mod-result.txt b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-mod-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-mod-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_c-check.cmake b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_c-check.cmake
new file mode 100644
index 0000000..ba0120c
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_c-check.cmake
@@ -0,0 +1,5 @@
+
+set (VALID_LANG C)
+set (INVALID_LANG CXX)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANGUAGE-validation.cmake")
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_c-result.txt b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_c-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_c-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_cxx-check.cmake b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_cxx-check.cmake
new file mode 100644
index 0000000..aa39810
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_cxx-check.cmake
@@ -0,0 +1,5 @@
+
+set (VALID_LANG CXX)
+set (INVALID_LANG C)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANGUAGE-validation.cmake")
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_cxx-result.txt b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_cxx-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-shared_cxx-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-validation.cmake b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-validation.cmake
new file mode 100644
index 0000000..f0237ab
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE-validation.cmake
@@ -0,0 +1,17 @@
+
+if (NOT DEFINED VALID_LANG)
+ set (VALID_LANG C)
+endif()
+if (NOT DEFINED INVALID_LANG)
+ set (INVALID_LANG CXX)
+endif()
+
+if (NOT actual_stdout MATCHES "BADFLAG_${VALID_LANG}_LANG")
+ set (RunCMake_TEST_FAILED "Not found expected 'BADFLAG_${VALID_LANG}_LANG'.")
+endif()
+if (actual_stdout MATCHES "BADFLAG_${INVALID_LANG}_LANG")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_${INVALID_LANG}_LANG'.")
+endif()
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE.cmake b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE.cmake
new file mode 100644
index 0000000..d74d448
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANGUAGE.cmake
@@ -0,0 +1,17 @@
+
+enable_language(C)
+enable_language(CXX)
+
+if(BORLAND)
+ set(pre -)
+endif()
+
+add_link_options ($<$<LINK_LANGUAGE:C>:${pre}BADFLAG_$<LINK_LANGUAGE>_LANG${CMAKE_C_OUTPUT_EXTENSION}>
+ $<$<LINK_LANGUAGE:CXX>:${pre}BADFLAG_$<LINK_LANGUAGE>_LANG${CMAKE_CXX_OUTPUT_EXTENSION}>)
+
+add_library(LinkOptions_shared_c SHARED LinkOptionsLib.c)
+add_library(LinkOptions_shared_cxx SHARED LinkOptionsLib.cxx)
+
+add_library(LinkOptions_mod MODULE LinkOptionsLib.c)
+
+add_executable(LinkOptions_exe LinkOptionsExe.c)
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-exe-check.cmake b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-exe-check.cmake
new file mode 100644
index 0000000..6bddee1
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-exe-check.cmake
@@ -0,0 +1,2 @@
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANG_AND_ID-validation.cmake")
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-exe-result.txt b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-exe-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-exe-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-mod-check.cmake b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-mod-check.cmake
new file mode 100644
index 0000000..6bddee1
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-mod-check.cmake
@@ -0,0 +1,2 @@
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANG_AND_ID-validation.cmake")
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-mod-result.txt b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-mod-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-mod-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_c-check.cmake b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_c-check.cmake
new file mode 100644
index 0000000..cf498d9
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_c-check.cmake
@@ -0,0 +1,5 @@
+
+set (VALID_LANG C)
+set (INVALID_LANG CXX)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANG_AND_ID-validation.cmake")
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_c-result.txt b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_c-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_c-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_cxx-check.cmake b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_cxx-check.cmake
new file mode 100644
index 0000000..ed4f851
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_cxx-check.cmake
@@ -0,0 +1,5 @@
+
+set (VALID_LANG CXX)
+set (INVALID_LANG C)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANG_AND_ID-validation.cmake")
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_cxx-result.txt b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_cxx-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-shared_cxx-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-validation.cmake b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-validation.cmake
new file mode 100644
index 0000000..a5dc27f
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID-validation.cmake
@@ -0,0 +1,23 @@
+
+if (NOT VALID_LANG)
+ set (VALID_LANG C)
+endif()
+if (NOT INVALID_LANG)
+ set (INVALID_LANG CXX)
+endif()
+
+if (NOT actual_stdout MATCHES "BADFLAG_${VALID_LANG}_LANG_ID")
+ set (RunCMake_TEST_FAILED "Not found expected 'BADFLAG_${VALID_LANG}_LANG_ID'.\n")
+endif()
+if (actual_stdout MATCHES "BADFLAG_${INVALID_LANG}_LANG_ID")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_${INVALID_LANG}_LANG_ID '.")
+endif()
+if (actual_stdout MATCHES "BADFLAG_(${VALID_LANG}|${INVALID_LANG})_BADID")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_(${VALID_LANG}|${INVALID_LANG})_BADID'.")
+endif()
diff --git a/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID.cmake b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID.cmake
new file mode 100644
index 0000000..c807050
--- /dev/null
+++ b/Tests/RunCMake/add_link_options/genex_LINK_LANG_AND_ID.cmake
@@ -0,0 +1,19 @@
+
+enable_language(C)
+enable_language(CXX)
+
+if(BORLAND)
+ set(pre -)
+endif()
+
+add_link_options ($<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:${pre}BADFLAG_C_LANG_ID${CMAKE_C_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:CXX,${CMAKE_CXX_COMPILER_ID}>:${pre}BADFLAG_CXX_LANG_ID${CMAKE_CXX_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:C,BADID>:${pre}BADFLAG_C_BADID${CMAKE_C_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:CXX,BADID>:${pre}BADFLAG_CXX_BADID${CMAKE_CXX_OUTPUT_EXTENSION}>)
+
+add_library(LinkOptions_shared_c SHARED LinkOptionsLib.c)
+add_library(LinkOptions_shared_cxx SHARED LinkOptionsLib.cxx)
+
+add_library(LinkOptions_mod MODULE LinkOptionsLib.c)
+
+add_executable(LinkOptions_exe LinkOptionsExe.c)
diff --git a/Tests/RunCMake/add_test/CMakeLists.txt.in b/Tests/RunCMake/add_test/CMakeLists.txt.in
new file mode 100644
index 0000000..495240d
--- /dev/null
+++ b/Tests/RunCMake/add_test/CMakeLists.txt.in
@@ -0,0 +1,27 @@
+if (NOT DEFINED RUN_AS_SCRIPT)
+
+ cmake_minimum_required(VERSION 3.7)
+ project(@CASE_NAME@ NONE)
+ include(CTest)
+
+ # Two fallback tests for set_tests_properties.
+ add_test(NAME PrefixTest COMMAND "${CMAKE_COMMAND}" --version)
+ add_test(NAME SuffixTest COMMAND "${CMAKE_COMMAND}" --version)
+
+ add_test(
+ NAME @CASE_CMAKELISTS_NAME_1@
+ COMMAND "${CMAKE_COMMAND}" -D RUN_AS_SCRIPT=1 -P "${CMAKE_CURRENT_LIST_FILE}"
+ )
+ set_tests_properties(
+ @CASE_CMAKELISTS_NAME_2@
+ PROPERTIES
+ ENVIRONMENT CMAKE_add_test_ENVVAR=1
+ )
+
+else()
+
+ if(NOT DEFINED ENV{CMAKE_add_test_ENVVAR})
+ message(FATAL_ERROR "Setting property on test did not succeed!")
+ endif()
+
+endif()
diff --git a/Tests/RunCMake/add_test/NameContainsBracketArgument1-stdout.txt b/Tests/RunCMake/add_test/NameContainsBracketArgument1-stdout.txt
new file mode 100644
index 0000000..00865d0
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsBracketArgument1-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \[=\[BracketArgument;SuffixTest\]=\] \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/NameContainsBracketArgument2-stdout.txt b/Tests/RunCMake/add_test/NameContainsBracketArgument2-stdout.txt
new file mode 100644
index 0000000..a744beb
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsBracketArgument2-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: BracketArgument;SuffixTest \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/NameContainsBracketArgument3-result.txt b/Tests/RunCMake/add_test/NameContainsBracketArgument3-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsBracketArgument3-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsBracketArgument3-stderr.txt b/Tests/RunCMake/add_test/NameContainsBracketArgument3-stderr.txt
new file mode 100644
index 0000000..32c2112
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsBracketArgument3-stderr.txt
@@ -0,0 +1,2 @@
+Error\(s\) when configuring the project
+No tests were found!!!
diff --git a/Tests/RunCMake/add_test/NameContainsBracketArgument4-result.txt b/Tests/RunCMake/add_test/NameContainsBracketArgument4-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsBracketArgument4-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsBracketArgument4-stderr.txt b/Tests/RunCMake/add_test/NameContainsBracketArgument4-stderr.txt
new file mode 100644
index 0000000..32c2112
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsBracketArgument4-stderr.txt
@@ -0,0 +1,2 @@
+Error\(s\) when configuring the project
+No tests were found!!!
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote1-result.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote1-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedQuote1-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote1-stderr.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote1-stderr.txt
new file mode 100644
index 0000000..0661945
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedQuote1-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: SuffixTest
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote1-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote1-stdout.txt
new file mode 100644
index 0000000..4875409
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedQuote1-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: EscapedQuote \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote2-result.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote2-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedQuote2-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote2-stderr.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote2-stderr.txt
new file mode 100644
index 0000000..0661945
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedQuote2-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: SuffixTest
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote2-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote2-stdout.txt
new file mode 100644
index 0000000..4875409
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedQuote2-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: EscapedQuote \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote3-result.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote3-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedQuote3-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote3-stderr.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote3-stderr.txt
new file mode 100644
index 0000000..0661945
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedQuote3-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: SuffixTest
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote3-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote3-stdout.txt
new file mode 100644
index 0000000..4875409
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedQuote3-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: EscapedQuote \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote4-result.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote4-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedQuote4-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote4-stderr.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote4-stderr.txt
new file mode 100644
index 0000000..0661945
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedQuote4-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: SuffixTest
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote4-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote4-stdout.txt
new file mode 100644
index 0000000..4875409
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedQuote4-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: EscapedQuote \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars1-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars1-stdout.txt
new file mode 100644
index 0000000..80435b6
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars1-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \(\) # \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars2-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars2-stdout.txt
new file mode 100644
index 0000000..80435b6
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars2-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \(\) # \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars3-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars3-stdout.txt
new file mode 100644
index 0000000..80435b6
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars3-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \(\) # \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars4-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars4-stdout.txt
new file mode 100644
index 0000000..80435b6
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars4-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \(\) # \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax1-stdout.txt b/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax1-stdout.txt
new file mode 100644
index 0000000..172ff99
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax1-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \$<BOOL:0> \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax2-stdout.txt b/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax2-stdout.txt
new file mode 100644
index 0000000..172ff99
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax2-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \$<BOOL:0> \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax3-stdout.txt b/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax3-stdout.txt
new file mode 100644
index 0000000..172ff99
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax3-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \$<BOOL:0> \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax4-stdout.txt b/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax4-stdout.txt
new file mode 100644
index 0000000..172ff99
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax4-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: \$<BOOL:0> \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsOtherSpecialChars1-stdout.txt b/Tests/RunCMake/add_test/NameContainsOtherSpecialChars1-stdout.txt
new file mode 100644
index 0000000..83e3f86
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsOtherSpecialChars1-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: !§\$%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsOtherSpecialChars2-stdout.txt b/Tests/RunCMake/add_test/NameContainsOtherSpecialChars2-stdout.txt
new file mode 100644
index 0000000..83e3f86
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsOtherSpecialChars2-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: !§\$%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsOtherSpecialChars3-stdout.txt b/Tests/RunCMake/add_test/NameContainsOtherSpecialChars3-stdout.txt
new file mode 100644
index 0000000..83e3f86
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsOtherSpecialChars3-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: !§\$%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsOtherSpecialChars4-stdout.txt b/Tests/RunCMake/add_test/NameContainsOtherSpecialChars4-stdout.txt
new file mode 100644
index 0000000..83e3f86
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsOtherSpecialChars4-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: !§\$%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsSemicolon1-stdout.txt b/Tests/RunCMake/add_test/NameContainsSemicolon1-stdout.txt
new file mode 100644
index 0000000..0fbf486
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsSemicolon1-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: PrefixTest;SuffixTest \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsSemicolon2-result.txt b/Tests/RunCMake/add_test/NameContainsSemicolon2-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsSemicolon2-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsSemicolon2-stderr.txt b/Tests/RunCMake/add_test/NameContainsSemicolon2-stderr.txt
new file mode 100644
index 0000000..32c2112
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsSemicolon2-stderr.txt
@@ -0,0 +1,2 @@
+Error\(s\) when configuring the project
+No tests were found!!!
diff --git a/Tests/RunCMake/add_test/NameContainsSemicolon3-stdout.txt b/Tests/RunCMake/add_test/NameContainsSemicolon3-stdout.txt
new file mode 100644
index 0000000..c5ab1d8
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsSemicolon3-stdout.txt
@@ -0,0 +1,3 @@
+3/3 Test #3: PrefixTest;SuffixTest \.+\*\*\*Failed.*
+CMake Error at .+/CMakeLists.txt:[0-9]+ \(message\):
+[ ]*Setting property on test did not succeed!
diff --git a/Tests/RunCMake/add_test/NameContainsSemicolon4-result.txt b/Tests/RunCMake/add_test/NameContainsSemicolon4-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsSemicolon4-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsSemicolon4-stderr.txt b/Tests/RunCMake/add_test/NameContainsSemicolon4-stderr.txt
new file mode 100644
index 0000000..32c2112
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsSemicolon4-stderr.txt
@@ -0,0 +1,2 @@
+Error\(s\) when configuring the project
+No tests were found!!!
diff --git a/Tests/RunCMake/add_test/NameContainsSpaces1-stdout.txt b/Tests/RunCMake/add_test/NameContainsSpaces1-stdout.txt
new file mode 100644
index 0000000..a255fb1
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsSpaces1-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: PrefixTest SuffixTest \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsSpaces2-result.txt b/Tests/RunCMake/add_test/NameContainsSpaces2-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsSpaces2-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsSpaces2-stderr.txt b/Tests/RunCMake/add_test/NameContainsSpaces2-stderr.txt
new file mode 100644
index 0000000..32c2112
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsSpaces2-stderr.txt
@@ -0,0 +1,2 @@
+Error\(s\) when configuring the project
+No tests were found!!!
diff --git a/Tests/RunCMake/add_test/NameContainsSpaces3-stdout.txt b/Tests/RunCMake/add_test/NameContainsSpaces3-stdout.txt
new file mode 100644
index 0000000..3d42b0b
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsSpaces3-stdout.txt
@@ -0,0 +1,3 @@
+3/3 Test #3: PrefixTest SuffixTest \.+\*\*\*Failed.*
+CMake Error at .+/CMakeLists.txt:[0-9]+ \(message\):
+[ ]*Setting property on test did not succeed!
diff --git a/Tests/RunCMake/add_test/NameContainsSpaces4-result.txt b/Tests/RunCMake/add_test/NameContainsSpaces4-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsSpaces4-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsSpaces4-stderr.txt b/Tests/RunCMake/add_test/NameContainsSpaces4-stderr.txt
new file mode 100644
index 0000000..32c2112
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsSpaces4-stderr.txt
@@ -0,0 +1,2 @@
+Error\(s\) when configuring the project
+No tests were found!!!
diff --git a/Tests/RunCMake/add_test/NameContainsValidSpecialChars1-stdout.txt b/Tests/RunCMake/add_test/NameContainsValidSpecialChars1-stdout.txt
new file mode 100644
index 0000000..ae1a0b1
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsValidSpecialChars1-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsValidSpecialChars2-stdout.txt b/Tests/RunCMake/add_test/NameContainsValidSpecialChars2-stdout.txt
new file mode 100644
index 0000000..ae1a0b1
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsValidSpecialChars2-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsValidSpecialChars3-stdout.txt b/Tests/RunCMake/add_test/NameContainsValidSpecialChars3-stdout.txt
new file mode 100644
index 0000000..ae1a0b1
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsValidSpecialChars3-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsValidSpecialChars4-stdout.txt b/Tests/RunCMake/add_test/NameContainsValidSpecialChars4-stdout.txt
new file mode 100644
index 0000000..ae1a0b1
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameContainsValidSpecialChars4-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameIsAlphaNumeric1-stdout.txt b/Tests/RunCMake/add_test/NameIsAlphaNumeric1-stdout.txt
new file mode 100644
index 0000000..ed939bf
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameIsAlphaNumeric1-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameIsAlphaNumeric2-stdout.txt b/Tests/RunCMake/add_test/NameIsAlphaNumeric2-stdout.txt
new file mode 100644
index 0000000..ed939bf
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameIsAlphaNumeric2-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameIsAlphaNumeric3-stdout.txt b/Tests/RunCMake/add_test/NameIsAlphaNumeric3-stdout.txt
new file mode 100644
index 0000000..ed939bf
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameIsAlphaNumeric3-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameIsAlphaNumeric4-stdout.txt b/Tests/RunCMake/add_test/NameIsAlphaNumeric4-stdout.txt
new file mode 100644
index 0000000..ed939bf
--- /dev/null
+++ b/Tests/RunCMake/add_test/NameIsAlphaNumeric4-stdout.txt
@@ -0,0 +1 @@
+Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/RunCMakeTest.cmake b/Tests/RunCMake/add_test/RunCMakeTest.cmake
new file mode 100644
index 0000000..6e9edda
--- /dev/null
+++ b/Tests/RunCMake/add_test/RunCMakeTest.cmake
@@ -0,0 +1,263 @@
+include(RunCTest)
+
+set(ENV{CTEST_OUTPUT_ON_FAILURE} 1)
+
+function(run_NameIsAlphaNumeric1_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ abcdefghijklmnopqrstuvwxyz0123456789 ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ abcdefghijklmnopqrstuvwxyz0123456789 ]==])
+ run_ctest(NameIsAlphaNumeric1)
+endfunction()
+run_NameIsAlphaNumeric1_test()
+
+function(run_NameIsAlphaNumeric2_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["abcdefghijklmnopqrstuvwxyz0123456789"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["abcdefghijklmnopqrstuvwxyz0123456789"]==])
+ run_ctest(NameIsAlphaNumeric2)
+endfunction()
+run_NameIsAlphaNumeric2_test()
+
+function(run_NameIsAlphaNumeric3_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["abcdefghijklmnopqrstuvwxyz0123456789"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ abcdefghijklmnopqrstuvwxyz0123456789 ]==])
+ run_ctest(NameIsAlphaNumeric3)
+endfunction()
+run_NameIsAlphaNumeric3_test()
+
+function(run_NameIsAlphaNumeric4_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ abcdefghijklmnopqrstuvwxyz0123456789 ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["abcdefghijklmnopqrstuvwxyz0123456789"]==])
+ run_ctest(NameIsAlphaNumeric4)
+endfunction()
+run_NameIsAlphaNumeric4_test()
+
+
+function(run_NameContainsValidSpecialChars1_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ abc_.+-012 ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ abc_.+-012 ]==])
+ run_ctest(NameContainsValidSpecialChars1)
+endfunction()
+run_NameContainsValidSpecialChars1_test()
+
+function(run_NameContainsValidSpecialChars2_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["abc_.+-012"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["abc_.+-012"]==])
+ run_ctest(NameContainsValidSpecialChars2)
+endfunction()
+run_NameContainsValidSpecialChars2_test()
+
+function(run_NameContainsValidSpecialChars3_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["abc_.+-012"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ abc_.+-012 ]==])
+ run_ctest(NameContainsValidSpecialChars3)
+endfunction()
+run_NameContainsValidSpecialChars3_test()
+
+function(run_NameContainsValidSpecialChars4_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ abc_.+-012 ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["abc_.+-012"]==])
+ run_ctest(NameContainsValidSpecialChars4)
+endfunction()
+run_NameContainsValidSpecialChars4_test()
+
+
+function(run_NameContainsOtherSpecialChars1_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ !§$%&/ü:*😤~ ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ !§$%&/ü:*😤~ ]==])
+ run_ctest(NameContainsOtherSpecialChars1)
+endfunction()
+run_NameContainsOtherSpecialChars1_test()
+
+function(run_NameContainsOtherSpecialChars2_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["!§$%&/ü:*😤~"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["!§$%&/ü:*😤~"]==])
+ run_ctest(NameContainsOtherSpecialChars2)
+endfunction()
+run_NameContainsOtherSpecialChars2_test()
+
+function(run_NameContainsOtherSpecialChars3_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["!§$%&/ü:*😤~"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ !§$%&/ü:*😤~ ]==])
+ run_ctest(NameContainsOtherSpecialChars3)
+endfunction()
+run_NameContainsOtherSpecialChars3_test()
+
+function(run_NameContainsOtherSpecialChars4_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ !§$%&/ü:*😤~ ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["!§$%&/ü:*😤~"]==])
+ run_ctest(NameContainsOtherSpecialChars4)
+endfunction()
+run_NameContainsOtherSpecialChars4_test()
+
+
+function(run_NameContainsEscapedSpecialChars1_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ \(\)\ \# ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ \(\)\ \# ]==])
+ run_ctest(NameContainsEscapedSpecialChars1)
+endfunction()
+run_NameContainsEscapedSpecialChars1_test()
+
+function(run_NameContainsEscapedSpecialChars2_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["\(\)\ \#"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["\(\)\ \#"]==])
+ run_ctest(NameContainsEscapedSpecialChars2)
+endfunction()
+run_NameContainsEscapedSpecialChars2_test()
+
+function(run_NameContainsEscapedSpecialChars3_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["\(\)\ \#"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ \(\)\ \# ]==])
+ run_ctest(NameContainsEscapedSpecialChars3)
+endfunction()
+run_NameContainsEscapedSpecialChars3_test()
+
+function(run_NameContainsEscapedSpecialChars4_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ \(\)\ \# ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["\(\)\ \#"]==])
+ run_ctest(NameContainsEscapedSpecialChars4)
+endfunction()
+run_NameContainsEscapedSpecialChars4_test()
+
+
+function(run_NameContainsGeneratorExpressionSyntax1_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ $<BOOL:0> ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ $<BOOL:0> ]==])
+ run_ctest(NameContainsGeneratorExpressionSyntax1)
+endfunction()
+run_NameContainsGeneratorExpressionSyntax1_test()
+
+function(run_NameContainsGeneratorExpressionSyntax2_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["$<BOOL:0>"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["$<BOOL:0>"]==])
+ run_ctest(NameContainsGeneratorExpressionSyntax2)
+endfunction()
+run_NameContainsGeneratorExpressionSyntax2_test()
+
+function(run_NameContainsGeneratorExpressionSyntax3_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["$<BOOL:0>"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ $<BOOL:0> ]==])
+ run_ctest(NameContainsGeneratorExpressionSyntax3)
+endfunction()
+run_NameContainsGeneratorExpressionSyntax3_test()
+
+function(run_NameContainsGeneratorExpressionSyntax4_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ $<BOOL:0> ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["$<BOOL:0>"]==])
+ run_ctest(NameContainsGeneratorExpressionSyntax4)
+endfunction()
+run_NameContainsGeneratorExpressionSyntax4_test()
+
+
+function(run_NameContainsSpaces1_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["PrefixTest SuffixTest"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["PrefixTest SuffixTest"]==])
+ run_ctest(NameContainsSpaces1)
+endfunction()
+run_NameContainsSpaces1_test()
+
+function(run_NameContainsSpaces2_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ PrefixTest SuffixTest ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ PrefixTest SuffixTest ]==])
+ run_ctest(NameContainsSpaces2)
+endfunction()
+run_NameContainsSpaces2_test()
+
+function(run_NameContainsSpaces3_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["PrefixTest SuffixTest"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ PrefixTest SuffixTest ]==])
+ run_ctest(NameContainsSpaces3)
+endfunction()
+run_NameContainsSpaces3_test()
+
+function(run_NameContainsSpaces4_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ PrefixTest SuffixTest ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["PrefixTest SuffixTest"]==])
+ run_ctest(NameContainsSpaces4)
+endfunction()
+run_NameContainsSpaces4_test()
+
+
+function(run_NameContainsSemicolon1_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["PrefixTest;SuffixTest"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["PrefixTest;SuffixTest"]==])
+ run_ctest(NameContainsSemicolon1)
+endfunction()
+run_NameContainsSemicolon1_test()
+
+function(run_NameContainsSemicolon2_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ PrefixTest;SuffixTest ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ PrefixTest;SuffixTest ]==])
+ run_ctest(NameContainsSemicolon2)
+endfunction()
+run_NameContainsSemicolon2_test()
+
+function(run_NameContainsSemicolon3_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["PrefixTest;SuffixTest"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ PrefixTest;SuffixTest ]==])
+ run_ctest(NameContainsSemicolon3)
+endfunction()
+run_NameContainsSemicolon3_test()
+
+function(run_NameContainsSemicolon4_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ PrefixTest;SuffixTest ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["PrefixTest;SuffixTest"]==])
+ run_ctest(NameContainsSemicolon4)
+endfunction()
+run_NameContainsSemicolon4_test()
+
+
+function(run_NameContainsEscapedQuote1_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["EscapedQuote\"\"SuffixTest"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["EscapedQuote\"\"SuffixTest"]==])
+ run_ctest(NameContainsEscapedQuote1)
+endfunction()
+run_NameContainsEscapedQuote1_test()
+
+function(run_NameContainsEscapedQuote2_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ EscapedQuote\"\"SuffixTest ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ EscapedQuote\"\"SuffixTest ]==])
+ run_ctest(NameContainsEscapedQuote2)
+endfunction()
+run_NameContainsEscapedQuote2_test()
+
+function(run_NameContainsEscapedQuote3_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["EscapedQuote\"\"SuffixTest"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ EscapedQuote\"\"SuffixTest ]==])
+ run_ctest(NameContainsEscapedQuote3)
+endfunction()
+run_NameContainsEscapedQuote3_test()
+
+function(run_NameContainsEscapedQuote4_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ EscapedQuote\"\"SuffixTest ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["EscapedQuote\"\"SuffixTest"]==])
+ run_ctest(NameContainsEscapedQuote4)
+endfunction()
+run_NameContainsEscapedQuote4_test()
+
+
+function(run_NameContainsBracketArgument1_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["[=[BracketArgument;SuffixTest]=]"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["[=[BracketArgument;SuffixTest]=]"]==])
+ run_ctest(NameContainsBracketArgument1)
+endfunction()
+run_NameContainsBracketArgument1_test()
+
+function(run_NameContainsBracketArgument2_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ [=[BracketArgument;SuffixTest]=] ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ [=[BracketArgument;SuffixTest]=] ]==])
+ run_ctest(NameContainsBracketArgument2)
+endfunction()
+run_NameContainsBracketArgument2_test()
+
+function(run_NameContainsBracketArgument3_test)
+ set(CASE_CMAKELISTS_NAME_1 [==["[=[BracketArgument;SuffixTest]=]"]==])
+ set(CASE_CMAKELISTS_NAME_2 [==[ [=[BracketArgument;SuffixTest]=] ]==])
+ run_ctest(NameContainsBracketArgument3)
+endfunction()
+run_NameContainsBracketArgument3_test()
+
+function(run_NameContainsBracketArgument4_test)
+ set(CASE_CMAKELISTS_NAME_1 [==[ [=[BracketArgument;SuffixTest]=] ]==])
+ set(CASE_CMAKELISTS_NAME_2 [==["[=[BracketArgument;SuffixTest]=]"]==])
+ run_ctest(NameContainsBracketArgument4)
+endfunction()
+run_NameContainsBracketArgument4_test()
diff --git a/Tests/RunCMake/add_test/test.cmake.in b/Tests/RunCMake/add_test/test.cmake.in
new file mode 100644
index 0000000..9821c1c
--- /dev/null
+++ b/Tests/RunCMake/add_test/test.cmake.in
@@ -0,0 +1,16 @@
+cmake_minimum_required(VERSION 3.17)
+
+set(CTEST_SITE "test-site")
+set(CTEST_BUILD_NAME "test-build-name")
+set(CTEST_SOURCE_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@")
+set(CTEST_BINARY_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@-build")
+set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@")
+set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@")
+set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@")
+set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
+
+set(ctest_test_args "@CASE_CTEST_TEST_ARGS@")
+ctest_start(Experimental)
+ctest_configure()
+#ctest_build()
+ctest_test(${ctest_test_args})
diff --git a/Tests/RunCMake/alias_targets/RunCMakeTest.cmake b/Tests/RunCMake/alias_targets/RunCMakeTest.cmake
index dded248..676de08 100644
--- a/Tests/RunCMake/alias_targets/RunCMakeTest.cmake
+++ b/Tests/RunCMake/alias_targets/RunCMakeTest.cmake
@@ -2,6 +2,8 @@ include(RunCMake)
run_cmake(no-targets)
run_cmake(multiple-targets)
+run_cmake(duplicate-target-CMP0107-OLD)
+run_cmake(duplicate-target-CMP0107-NEW)
run_cmake(exclude-from-all)
run_cmake(imported)
run_cmake(invalid-name)
diff --git a/Tests/RunCMake/alias_targets/duplicate-target-CMP0107-NEW-result.txt b/Tests/RunCMake/alias_targets/duplicate-target-CMP0107-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/alias_targets/duplicate-target-CMP0107-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/alias_targets/duplicate-target-CMP0107-NEW-stderr.txt b/Tests/RunCMake/alias_targets/duplicate-target-CMP0107-NEW-stderr.txt
new file mode 100644
index 0000000..03ba5a6
--- /dev/null
+++ b/Tests/RunCMake/alias_targets/duplicate-target-CMP0107-NEW-stderr.txt
@@ -0,0 +1,30 @@
+CMake Error at duplicate-target.cmake:[0-9]+ \(add_library\):
+ add_library cannot create ALIAS target "alias1" because another target with
+ the same name already exists.
+Call Stack \(most recent call first\):
+ duplicate-target-CMP0107-NEW.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+
+
+CMake Error at duplicate-target.cmake:[0-9]+ \(add_library\):
+ add_library cannot create ALIAS target "alias1" because another target with
+ the same name already exists.
+Call Stack \(most recent call first\):
+ duplicate-target-CMP0107-NEW.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+
+
+CMake Error at duplicate-target.cmake:[0-9]+ \(add_library\):
+ add_library cannot create ALIAS target "alias2" because another target with
+ the same name already exists.
+Call Stack \(most recent call first\):
+ duplicate-target-CMP0107-NEW.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+
+
+CMake Error at duplicate-target.cmake:[0-9]+ \(add_library\):
+ add_library cannot create ALIAS target "alias2" because another target with
+ the same name already exists.
+Call Stack \(most recent call first\):
+ duplicate-target-CMP0107-NEW.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/alias_targets/duplicate-target-CMP0107-NEW.cmake b/Tests/RunCMake/alias_targets/duplicate-target-CMP0107-NEW.cmake
new file mode 100644
index 0000000..609857f
--- /dev/null
+++ b/Tests/RunCMake/alias_targets/duplicate-target-CMP0107-NEW.cmake
@@ -0,0 +1,4 @@
+
+cmake_policy (SET CMP0107 NEW)
+
+include (duplicate-target.cmake)
diff --git a/Tests/RunCMake/alias_targets/duplicate-target-CMP0107-OLD.cmake b/Tests/RunCMake/alias_targets/duplicate-target-CMP0107-OLD.cmake
new file mode 100644
index 0000000..d5bc998
--- /dev/null
+++ b/Tests/RunCMake/alias_targets/duplicate-target-CMP0107-OLD.cmake
@@ -0,0 +1,4 @@
+
+cmake_policy (SET CMP0107 OLD)
+
+include (duplicate-target.cmake)
diff --git a/Tests/RunCMake/alias_targets/duplicate-target.cmake b/Tests/RunCMake/alias_targets/duplicate-target.cmake
new file mode 100644
index 0000000..f81921b
--- /dev/null
+++ b/Tests/RunCMake/alias_targets/duplicate-target.cmake
@@ -0,0 +1,20 @@
+
+add_library (foo1 INTERFACE)
+add_library (foo2 INTERFACE)
+
+add_library (imp1 SHARED IMPORTED GLOBAL)
+add_library (imp2 SHARED IMPORTED GLOBAL)
+
+
+add_library (alias1 ALIAS foo1)
+# same alias to different library
+add_library (alias1 ALIAS foo2)
+# same alias to different imported library
+add_library (alias1 ALIAS imp1)
+
+
+add_library (alias2 ALIAS imp1)
+# same alias to different imported library
+add_library (alias2 ALIAS imp2)
+# same alias to different library
+add_library (alias2 ALIAS foo1)
diff --git a/Tests/RunCMake/cmake_language/CMakeLists.txt b/Tests/RunCMake/cmake_language/CMakeLists.txt
new file mode 100644
index 0000000..2632ffa
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.16)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/cmake_language/CallInvalidCommand.cmake b/Tests/RunCMake/cmake_language/CallInvalidCommand.cmake
new file mode 100644
index 0000000..8bee6f2
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/CallInvalidCommand.cmake
@@ -0,0 +1,2 @@
+
+cmake_language(CALL ${COMMAND})
diff --git a/Tests/RunCMake/cmake_language/CheckIncludeGuard.cmake b/Tests/RunCMake/cmake_language/CheckIncludeGuard.cmake
new file mode 100644
index 0000000..902c1e4
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/CheckIncludeGuard.cmake
@@ -0,0 +1,4 @@
+
+cmake_language (CALL "include_guard")
+
+set (GUARD_VALUE 1)
diff --git a/Tests/RunCMake/cmake_language/CheckProject/CMakeLists.txt b/Tests/RunCMake/cmake_language/CheckProject/CMakeLists.txt
new file mode 100644
index 0000000..9a27692
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/CheckProject/CMakeLists.txt
@@ -0,0 +1,19 @@
+
+cmake_language (CALL cmake_minimum_required VERSION 3.17...3.18)
+
+cmake_language (CALL project CheckProject VERSION 1.2.3 LANGUAGES C)
+
+if (NOT PROJECT_NAME STREQUAL "CheckProject")
+ message (SEND_ERROR "error on project() usage.")
+endif()
+
+if (NOT CheckProject_VERSION VERSION_EQUAL "1.2.3")
+ message (SEND_ERROR "error on project() usage.")
+endif()
+
+get_property (languages GLOBAL PROPERTY ENABLED_LANGUAGES)
+if (NOT "C" IN_LIST languages)
+ message (SEND_ERROR "error on project() usage.")
+endif()
+
+add_library (lib SHARED lib.c)
diff --git a/Tests/RunCMake/cmake_language/CheckProject/lib.c b/Tests/RunCMake/cmake_language/CheckProject/lib.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/CheckProject/lib.c
diff --git a/Tests/RunCMake/cmake_language/RunCMakeTest.cmake b/Tests/RunCMake/cmake_language/RunCMakeTest.cmake
new file mode 100644
index 0000000..5fb93c8
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/RunCMakeTest.cmake
@@ -0,0 +1,25 @@
+include(RunCMake)
+
+run_cmake(no_parameters)
+run_cmake(unknown_meta_operation)
+run_cmake(call_invalid_command)
+run_cmake(call_valid_command)
+run_cmake(call_double_evaluation)
+run_cmake(call_expanded_command)
+run_cmake(call_expanded_command_and_arguments)
+run_cmake(call_expanded_command_with_explicit_argument)
+run_cmake(call_expand_command_name)
+run_cmake(call_expand_function_name)
+run_cmake(call_message)
+run_cmake(call_message_fatal_error)
+run_cmake(call_no_parameters)
+run_cmake(call_preserve_arguments)
+run_cmake(call_unknown_function)
+run_cmake(eval_expand_command_name)
+run_cmake(eval_expanded_command_and_arguments)
+run_cmake(eval_extra_parameters_between_eval_and_code)
+run_cmake(eval_message)
+run_cmake(eval_message_fatal_error)
+run_cmake(eval_no_code)
+run_cmake(eval_no_parameters)
+run_cmake(eval_variable_outside_message)
diff --git a/Tests/RunCMake/cmake_language/call_double_evaluation-stderr.txt b/Tests/RunCMake/cmake_language/call_double_evaluation-stderr.txt
new file mode 100644
index 0000000..59a70bd
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_double_evaluation-stderr.txt
@@ -0,0 +1 @@
+var='\${foo}'
diff --git a/Tests/RunCMake/cmake_language/call_double_evaluation.cmake b/Tests/RunCMake/cmake_language/call_double_evaluation.cmake
new file mode 100644
index 0000000..cf8fc91
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_double_evaluation.cmake
@@ -0,0 +1,2 @@
+set(var [[${foo}]])
+cmake_language(CALL cmake_language CALL message "var='${var}'")
diff --git a/Tests/RunCMake/cmake_language/call_expand_command_name-stderr.txt b/Tests/RunCMake/cmake_language/call_expand_command_name-stderr.txt
new file mode 100644
index 0000000..d640661
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_expand_command_name-stderr.txt
@@ -0,0 +1 @@
+OK!
diff --git a/Tests/RunCMake/cmake_language/call_expand_command_name.cmake b/Tests/RunCMake/cmake_language/call_expand_command_name.cmake
new file mode 100644
index 0000000..e03bb1f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_expand_command_name.cmake
@@ -0,0 +1,2 @@
+set (my_call "CALL")
+cmake_language (${my_call} message "OK!")
diff --git a/Tests/RunCMake/cmake_language/call_expand_function_name-stderr.txt b/Tests/RunCMake/cmake_language/call_expand_function_name-stderr.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_expand_function_name-stderr.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/call_expand_function_name.cmake b/Tests/RunCMake/cmake_language/call_expand_function_name.cmake
new file mode 100644
index 0000000..565a7df
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_expand_function_name.cmake
@@ -0,0 +1,11 @@
+function(some_function_1)
+ message(1)
+endfunction()
+
+function(some_function_2)
+ message(2)
+endfunction()
+
+set(function_version 1)
+
+cmake_language(CALL some_function_${function_version})
diff --git a/Tests/RunCMake/cmake_language/call_expanded_command-stderr.txt b/Tests/RunCMake/cmake_language/call_expanded_command-stderr.txt
new file mode 100644
index 0000000..d640661
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_expanded_command-stderr.txt
@@ -0,0 +1 @@
+OK!
diff --git a/Tests/RunCMake/cmake_language/call_expanded_command.cmake b/Tests/RunCMake/cmake_language/call_expanded_command.cmake
new file mode 100644
index 0000000..e76e612
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_expanded_command.cmake
@@ -0,0 +1,6 @@
+function (itsok)
+ message(OK!)
+endfunction()
+
+set (cmd CALL itsok)
+cmake_language (${cmd})
diff --git a/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-result.txt b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-stderr.txt b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-stderr.txt
new file mode 100644
index 0000000..e87e9bc
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at call_expanded_command_and_arguments.cmake:2 \(cmake_language\):
+ cmake_language called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments.cmake b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments.cmake
new file mode 100644
index 0000000..4ce6b34
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments.cmake
@@ -0,0 +1,2 @@
+set(call_message CALL message a b)
+cmake_language(${call_message})
diff --git a/Tests/RunCMake/cmake_language/call_expanded_command_with_explicit_argument-stderr.txt b/Tests/RunCMake/cmake_language/call_expanded_command_with_explicit_argument-stderr.txt
new file mode 100644
index 0000000..d640661
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_expanded_command_with_explicit_argument-stderr.txt
@@ -0,0 +1 @@
+OK!
diff --git a/Tests/RunCMake/cmake_language/call_expanded_command_with_explicit_argument.cmake b/Tests/RunCMake/cmake_language/call_expanded_command_with_explicit_argument.cmake
new file mode 100644
index 0000000..0563400
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_expanded_command_with_explicit_argument.cmake
@@ -0,0 +1,2 @@
+set (cmd CALL message)
+cmake_language (${cmd} "OK!")
diff --git a/Tests/RunCMake/cmake_language/call_invalid_command.cmake b/Tests/RunCMake/cmake_language/call_invalid_command.cmake
new file mode 100644
index 0000000..88bf08c
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_invalid_command.cmake
@@ -0,0 +1,14 @@
+
+foreach (command IN ITEMS "function" "ENDFUNCTION"
+ "macro" "endMACRO"
+ "if" "elseif" "else" "endif"
+ "while" "endwhile"
+ "foreach" "endforeach")
+ execute_process(COMMAND "${CMAKE_COMMAND}" -DCOMMAND=${command}
+ -P "${CMAKE_CURRENT_SOURCE_DIR}/CallInvalidCommand.cmake"
+ OUTPUT_QUIET ERROR_QUIET
+ RESULT_VARIABLE result)
+ if (NOT result)
+ message (SEND_ERROR "cmake_language(CALL ${command}) unexpectedly successfull.")
+ endif()
+endforeach()
diff --git a/Tests/RunCMake/cmake_language/call_message-stderr.txt b/Tests/RunCMake/cmake_language/call_message-stderr.txt
new file mode 100644
index 0000000..cfc8694
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_message-stderr.txt
@@ -0,0 +1 @@
+WORKS!
diff --git a/Tests/RunCMake/cmake_language/call_message.cmake b/Tests/RunCMake/cmake_language/call_message.cmake
new file mode 100644
index 0000000..31aefdf
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_message.cmake
@@ -0,0 +1 @@
+cmake_language(CALL message WORKS!)
diff --git a/Tests/RunCMake/cmake_language/call_message_fatal_error-result.txt b/Tests/RunCMake/cmake_language/call_message_fatal_error-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_message_fatal_error-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/call_message_fatal_error-stderr.txt b/Tests/RunCMake/cmake_language/call_message_fatal_error-stderr.txt
new file mode 100644
index 0000000..83eb3d8
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_message_fatal_error-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at call_message_fatal_error.cmake:1 \(message\):
+ error!
+Call Stack \(most recent call first\):
+ call_message_fatal_error.cmake:1 \(cmake_language\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/cmake_language/call_message_fatal_error.cmake b/Tests/RunCMake/cmake_language/call_message_fatal_error.cmake
new file mode 100644
index 0000000..935b437
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_message_fatal_error.cmake
@@ -0,0 +1 @@
+cmake_language(CALL message FATAL_ERROR error!)
diff --git a/Tests/RunCMake/cmake_language/call_no_parameters-result.txt b/Tests/RunCMake/cmake_language/call_no_parameters-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_no_parameters-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/call_no_parameters-stderr.txt b/Tests/RunCMake/cmake_language/call_no_parameters-stderr.txt
new file mode 100644
index 0000000..9e2c08f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_no_parameters-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at call_no_parameters.cmake:1 \(cmake_language\):
+ cmake_language called with incorrect number of arguments
diff --git a/Tests/RunCMake/cmake_language/call_no_parameters.cmake b/Tests/RunCMake/cmake_language/call_no_parameters.cmake
new file mode 100644
index 0000000..8353e08
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_no_parameters.cmake
@@ -0,0 +1 @@
+cmake_language(CALL)
diff --git a/Tests/RunCMake/cmake_language/call_preserve_arguments-stderr.txt b/Tests/RunCMake/cmake_language/call_preserve_arguments-stderr.txt
new file mode 100644
index 0000000..8ec5483
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_preserve_arguments-stderr.txt
@@ -0,0 +1,6 @@
+foo\(...\)
+\[a;b\]
+\[c;d\]
+cmake_language\(CALL foo ...\)
+\[a;b\]
+\[c;d\]
diff --git a/Tests/RunCMake/cmake_language/call_preserve_arguments.cmake b/Tests/RunCMake/cmake_language/call_preserve_arguments.cmake
new file mode 100644
index 0000000..bfef0fd
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_preserve_arguments.cmake
@@ -0,0 +1,12 @@
+function(foo arg1 arg2)
+ math(EXPR last "${ARGC} - 1")
+ foreach(i RANGE 0 ${last})
+ message("[${ARGV${i}}]")
+ endforeach()
+endfunction()
+
+message("foo(...)")
+foo("a;b" "c;d")
+
+message("cmake_language(CALL foo ...)")
+cmake_language(CALL foo "a;b" "c;d")
diff --git a/Tests/RunCMake/cmake_language/call_unknown_function-result.txt b/Tests/RunCMake/cmake_language/call_unknown_function-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_unknown_function-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/call_unknown_function-stderr.txt b/Tests/RunCMake/cmake_language/call_unknown_function-stderr.txt
new file mode 100644
index 0000000..d09e708
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_unknown_function-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at call_unknown_function.cmake:1 \(unknown\):
+ Unknown CMake command "unknown".
diff --git a/Tests/RunCMake/cmake_language/call_unknown_function.cmake b/Tests/RunCMake/cmake_language/call_unknown_function.cmake
new file mode 100644
index 0000000..efd6baf
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_unknown_function.cmake
@@ -0,0 +1 @@
+cmake_language(CALL unknown)
diff --git a/Tests/RunCMake/cmake_language/call_valid_command.cmake b/Tests/RunCMake/cmake_language/call_valid_command.cmake
new file mode 100644
index 0000000..2e965dc
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/call_valid_command.cmake
@@ -0,0 +1,99 @@
+
+## check continue() usage
+set (VALUE 0)
+foreach (i RANGE 1 4)
+ set (VALUE "${i}")
+ cmake_language (CALL "continue")
+ set (VALUE "0")
+endforeach()
+if (NOT VALUE EQUAL "4")
+ message (SEND_ERROR "error on continue() usage.")
+endif()
+
+
+## check break() usage
+set (VALUE 0)
+foreach (i RANGE 1 4)
+ set (VALUE "${i}")
+ cmake_language (CALL "break")
+ set (VALUE 0)
+endforeach()
+if (NOT VALUE EQUAL "1")
+ message (SEND_ERROR "error on break() usage.")
+endif()
+
+
+## check return() usage in macro
+macro (call_return_in_macro)
+ cmake_language (CALL "return")
+ set (VALUE 1)
+endmacro()
+function (wrapper)
+ call_return_in_macro()
+ set (VALUE 1 PARENT_SCOPE)
+endfunction()
+
+set (VALUE 0)
+wrapper()
+if (NOT VALUE EQUAL "0")
+ message (SEND_ERROR "error on return() usage in macro.")
+endif()
+
+set (VALUE 0)
+cmake_language (CALL "wrapper")
+if (NOT VALUE EQUAL "0")
+ message (SEND_ERROR "error on return() usage in macro.")
+endif()
+
+function (wrapper2)
+ cmake_language (CALL "call_return_in_macro")
+ set (VALUE 1 PARENT_SCOPE)
+endfunction()
+
+set (VALUE 0)
+wrapper2()
+if (NOT VALUE EQUAL "0")
+ message (SEND_ERROR "error on return() usage in macro.")
+endif()
+
+set (VALUE 0)
+cmake_language (CALL "wrapper2")
+if (NOT VALUE EQUAL "0")
+ message (SEND_ERROR "error on return() usage in macro.")
+endif()
+
+## check return() usage in function
+function (call_return_in_function)
+ cmake_language (CALL "return")
+ set (VALUE 1 PARENT_SCOPE)
+endfunction()
+
+set (VALUE 0)
+call_return_in_function()
+if (NOT VALUE EQUAL "0")
+ message (SEND_ERROR "error on return() usage in function.")
+endif()
+
+set (VALUE 0)
+cmake_language (CALL "call_return_in_function")
+if (NOT VALUE EQUAL "0")
+ message (SEND_ERROR "error on return() usage in function.")
+endif()
+
+
+## check usage of include_guard()
+set (GUARD_VALUE 0)
+include ("${CMAKE_CURRENT_SOURCE_DIR}/CheckIncludeGuard.cmake")
+if (NOT GUARD_VALUE EQUAL "1")
+ message (SEND_ERROR "error on include_guard() on first include.")
+endif()
+
+set (GUARD_VALUE 0)
+include ("${CMAKE_CURRENT_SOURCE_DIR}/CheckIncludeGuard.cmake")
+if (NOT GUARD_VALUE EQUAL "0")
+ message (SEND_ERROR "error on include_guard() on second include.")
+endif()
+
+
+## check usage of cmake_minimum_required() and project()
+add_subdirectory (CheckProject)
diff --git a/Tests/RunCMake/cmake_language/eval_expand_command_name-stderr.txt b/Tests/RunCMake/cmake_language/eval_expand_command_name-stderr.txt
new file mode 100644
index 0000000..d640661
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_expand_command_name-stderr.txt
@@ -0,0 +1 @@
+OK!
diff --git a/Tests/RunCMake/cmake_language/eval_expand_command_name.cmake b/Tests/RunCMake/cmake_language/eval_expand_command_name.cmake
new file mode 100644
index 0000000..2397232
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_expand_command_name.cmake
@@ -0,0 +1,2 @@
+set (my_eval "EVAL")
+cmake_language (${my_eval} CODE message("OK!"))
diff --git a/Tests/RunCMake/cmake_language/eval_expanded_command_and_arguments-stderr.txt b/Tests/RunCMake/cmake_language/eval_expanded_command_and_arguments-stderr.txt
new file mode 100644
index 0000000..d640661
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_expanded_command_and_arguments-stderr.txt
@@ -0,0 +1 @@
+OK!
diff --git a/Tests/RunCMake/cmake_language/eval_expanded_command_and_arguments.cmake b/Tests/RunCMake/cmake_language/eval_expanded_command_and_arguments.cmake
new file mode 100644
index 0000000..f7d2d51
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_expanded_command_and_arguments.cmake
@@ -0,0 +1,2 @@
+set(cmd EVAL CODE [[message("OK!")]])
+cmake_language(${cmd})
diff --git a/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code-result.txt b/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code-stderr.txt b/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code-stderr.txt
new file mode 100644
index 0000000..d32054f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at eval_extra_parameters_between_eval_and_code.cmake:1 \(cmake_language\):
+ cmake_language called with unsupported arguments between EVAL and CODE
+ arguments
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code.cmake b/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code.cmake
new file mode 100644
index 0000000..7c004d7
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code.cmake
@@ -0,0 +1 @@
+cmake_language(EVAL BAD CODE "message(BAD CODE)")
diff --git a/Tests/RunCMake/cmake_language/eval_message-stderr.txt b/Tests/RunCMake/cmake_language/eval_message-stderr.txt
new file mode 100644
index 0000000..cfc8694
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_message-stderr.txt
@@ -0,0 +1 @@
+WORKS!
diff --git a/Tests/RunCMake/cmake_language/eval_message.cmake b/Tests/RunCMake/cmake_language/eval_message.cmake
new file mode 100644
index 0000000..91edcdd
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_message.cmake
@@ -0,0 +1 @@
+cmake_language(EVAL CODE message(WORKS!))
diff --git a/Tests/RunCMake/cmake_language/eval_message_fatal_error-result.txt b/Tests/RunCMake/cmake_language/eval_message_fatal_error-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_message_fatal_error-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/eval_message_fatal_error-stderr.txt b/Tests/RunCMake/cmake_language/eval_message_fatal_error-stderr.txt
new file mode 100644
index 0000000..5cf11e3
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_message_fatal_error-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at eval_message_fatal_error.cmake:1:EVAL:2 \(message\):
+ error!
+Call Stack \(most recent call first\):
+ eval_message_fatal_error.cmake:1 \(cmake_language\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/cmake_language/eval_message_fatal_error.cmake b/Tests/RunCMake/cmake_language/eval_message_fatal_error.cmake
new file mode 100644
index 0000000..72e155d
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_message_fatal_error.cmake
@@ -0,0 +1,5 @@
+cmake_language(EVAL CODE
+"
+ message(FATAL_ERROR error!)
+"
+)
diff --git a/Tests/RunCMake/cmake_language/eval_no_code-result.txt b/Tests/RunCMake/cmake_language/eval_no_code-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_no_code-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/eval_no_code-stderr.txt b/Tests/RunCMake/cmake_language/eval_no_code-stderr.txt
new file mode 100644
index 0000000..608ba88
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_no_code-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at eval_no_code.cmake:1 \(cmake_language\):
+ cmake_language called without CODE argument
diff --git a/Tests/RunCMake/cmake_language/eval_no_code.cmake b/Tests/RunCMake/cmake_language/eval_no_code.cmake
new file mode 100644
index 0000000..7f5bc21
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_no_code.cmake
@@ -0,0 +1 @@
+cmake_language(EVAL message "too many parameters")
diff --git a/Tests/RunCMake/cmake_language/eval_no_parameters-result.txt b/Tests/RunCMake/cmake_language/eval_no_parameters-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_no_parameters-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/eval_no_parameters-stderr.txt b/Tests/RunCMake/cmake_language/eval_no_parameters-stderr.txt
new file mode 100644
index 0000000..6166898
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_no_parameters-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at eval_no_parameters.cmake:1 \(cmake_language\):
+ cmake_language called with incorrect number of arguments
diff --git a/Tests/RunCMake/cmake_language/eval_no_parameters.cmake b/Tests/RunCMake/cmake_language/eval_no_parameters.cmake
new file mode 100644
index 0000000..e7ae808
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_no_parameters.cmake
@@ -0,0 +1 @@
+cmake_language(EVAL)
diff --git a/Tests/RunCMake/cmake_language/eval_variable_outside_message-stderr.txt b/Tests/RunCMake/cmake_language/eval_variable_outside_message-stderr.txt
new file mode 100644
index 0000000..cfc8694
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_variable_outside_message-stderr.txt
@@ -0,0 +1 @@
+WORKS!
diff --git a/Tests/RunCMake/cmake_language/eval_variable_outside_message.cmake b/Tests/RunCMake/cmake_language/eval_variable_outside_message.cmake
new file mode 100644
index 0000000..71f0457
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/eval_variable_outside_message.cmake
@@ -0,0 +1,2 @@
+cmake_language(EVAL CODE "set(phrase \"WORKS!\")")
+message(${phrase})
diff --git a/Tests/RunCMake/cmake_language/no_parameters-result.txt b/Tests/RunCMake/cmake_language/no_parameters-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/no_parameters-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/no_parameters-stderr.txt b/Tests/RunCMake/cmake_language/no_parameters-stderr.txt
new file mode 100644
index 0000000..194bbe3
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/no_parameters-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at no_parameters.cmake:1 \(cmake_language\):
+ cmake_language called with incorrect number of arguments
diff --git a/Tests/RunCMake/cmake_language/no_parameters.cmake b/Tests/RunCMake/cmake_language/no_parameters.cmake
new file mode 100644
index 0000000..8353e08
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/no_parameters.cmake
@@ -0,0 +1 @@
+cmake_language(CALL)
diff --git a/Tests/RunCMake/cmake_language/unknown_meta_operation-result.txt b/Tests/RunCMake/cmake_language/unknown_meta_operation-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/unknown_meta_operation-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_language/unknown_meta_operation-stderr.txt b/Tests/RunCMake/cmake_language/unknown_meta_operation-stderr.txt
new file mode 100644
index 0000000..6a1d4fd
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/unknown_meta_operation-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at unknown_meta_operation.cmake:1 \(cmake_language\):
+ cmake_language called with unknown meta-operation
diff --git a/Tests/RunCMake/cmake_language/unknown_meta_operation.cmake b/Tests/RunCMake/cmake_language/unknown_meta_operation.cmake
new file mode 100644
index 0000000..699f36f
--- /dev/null
+++ b/Tests/RunCMake/cmake_language/unknown_meta_operation.cmake
@@ -0,0 +1 @@
+cmake_language(UNKNOWN)
diff --git a/Tests/RunCMake/configure_file/RerunCMake.cmake b/Tests/RunCMake/configure_file/RerunCMake.cmake
index 890cc1f..98387d0 100644
--- a/Tests/RunCMake/configure_file/RerunCMake.cmake
+++ b/Tests/RunCMake/configure_file/RerunCMake.cmake
@@ -1,8 +1,4 @@
message("Running CMake on RerunCMake") # write to stderr if cmake reruns
-configure_file(
- "${CMAKE_CURRENT_BINARY_DIR}/ConfigureFileInput.txt.in"
- "${CMAKE_CURRENT_BINARY_DIR}/ConfigureFileOutput.txt"
- @ONLY
- )
+add_subdirectory(RerunCMake)
# make sure CMakeCache.txt is newer than ConfigureFileOutput.txt
execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1)
diff --git a/Tests/RunCMake/configure_file/RerunCMake/CMakeLists.txt b/Tests/RunCMake/configure_file/RerunCMake/CMakeLists.txt
new file mode 100644
index 0000000..c9681c7
--- /dev/null
+++ b/Tests/RunCMake/configure_file/RerunCMake/CMakeLists.txt
@@ -0,0 +1,5 @@
+configure_file(
+ "${CMAKE_CURRENT_BINARY_DIR}/ConfigureFileInput.txt.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/ConfigureFileOutput.txt"
+ @ONLY
+ )
diff --git a/Tests/RunCMake/configure_file/RunCMakeTest.cmake b/Tests/RunCMake/configure_file/RunCMakeTest.cmake
index de14468..32a0770 100644
--- a/Tests/RunCMake/configure_file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/configure_file/RunCMakeTest.cmake
@@ -22,7 +22,7 @@ if(RunCMake_GENERATOR MATCHES "Make")
set(RunCMake_TEST_NO_CLEAN 1)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
- set(in_conf "${RunCMake_TEST_BINARY_DIR}/ConfigureFileInput.txt.in")
+ set(in_conf "${RunCMake_TEST_BINARY_DIR}/RerunCMake/ConfigureFileInput.txt.in")
file(WRITE "${in_conf}" "1")
message(STATUS "RerunCMake: first configuration...")
@@ -42,7 +42,7 @@ if(RunCMake_GENERATOR MATCHES "Make")
run_cmake_command(RerunCMake-nowork ${CMAKE_COMMAND} --build .)
message(STATUS "RerunCMake: remove configure_file output...")
- file(REMOVE "${RunCMake_TEST_BINARY_DIR}/ConfigureFileOutput.txt")
+ file(REMOVE "${RunCMake_TEST_BINARY_DIR}/RerunCMake/ConfigureFileOutput.txt")
run_cmake_command(RerunCMake-rerun ${CMAKE_COMMAND} --build .)
run_cmake_command(RerunCMake-nowork ${CMAKE_COMMAND} --build .)
diff --git a/Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake
index ca36a7c..58c94d7 100644
--- a/Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake
+++ b/Tests/RunCMake/ctest_memcheck/testAddressLeakSanitizer.cmake
@@ -2,7 +2,7 @@
# options
message("ASAN_OPTIONS = [$ENV{ASAN_OPTIONS}]")
-string(REGEX REPLACE ".*log_path=\'([^\']*)\'.*" "\\1" LOG_FILE "$ENV{ASAN_OPTIONS}")
+string(REGEX REPLACE ".*log_path='([^']*)'.*" "\\1" LOG_FILE "$ENV{ASAN_OPTIONS}")
message("LOG_FILE=[${LOG_FILE}]")
# if we are not asked to simulate AddressSanitizer don't do it
diff --git a/Tests/RunCMake/ctest_memcheck/testAddressSanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testAddressSanitizer.cmake
index 1219666..8f18cd0 100644
--- a/Tests/RunCMake/ctest_memcheck/testAddressSanitizer.cmake
+++ b/Tests/RunCMake/ctest_memcheck/testAddressSanitizer.cmake
@@ -2,7 +2,7 @@
# options
message("ASAN_OPTIONS = [$ENV{ASAN_OPTIONS}]")
-string(REGEX REPLACE ".*log_path=\'([^\']*)\'.*" "\\1" LOG_FILE "$ENV{ASAN_OPTIONS}")
+string(REGEX REPLACE ".*log_path='([^']*)'.*" "\\1" LOG_FILE "$ENV{ASAN_OPTIONS}")
message("LOG_FILE=[${LOG_FILE}]")
# if we are not asked to simulate address sanitizer don't do it
diff --git a/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake
index 6d51f83..4990792 100644
--- a/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake
+++ b/Tests/RunCMake/ctest_memcheck/testLeakSanitizer.cmake
@@ -2,7 +2,7 @@
# options
message("LSAN_OPTIONS = [$ENV{LSAN_OPTIONS}]")
-string(REGEX REPLACE ".*log_path=\'([^\']*)\'.*" "\\1" LOG_FILE "$ENV{LSAN_OPTIONS}")
+string(REGEX REPLACE ".*log_path='([^']*)'.*" "\\1" LOG_FILE "$ENV{LSAN_OPTIONS}")
message("LOG_FILE=[${LOG_FILE}]")
# if we are not asked to simulate LeakSanitizer don't do it
diff --git a/Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake
index 3b3ac22..4a6adb1 100644
--- a/Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake
+++ b/Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake
@@ -2,7 +2,7 @@
# options
message("MSAN_OPTIONS = [$ENV{MSAN_OPTIONS}]")
-string(REGEX REPLACE ".*log_path=\'([^\']*)\'.*" "\\1" LOG_FILE "$ENV{MSAN_OPTIONS}")
+string(REGEX REPLACE ".*log_path='([^']*)'.*" "\\1" LOG_FILE "$ENV{MSAN_OPTIONS}")
message("LOG_FILE=[${LOG_FILE}]")
# if we are not asked to simulate address sanitizer don't do it
diff --git a/Tests/RunCMake/ctest_memcheck/testThreadSanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testThreadSanitizer.cmake
index e7a5c9f..96251c3 100644
--- a/Tests/RunCMake/ctest_memcheck/testThreadSanitizer.cmake
+++ b/Tests/RunCMake/ctest_memcheck/testThreadSanitizer.cmake
@@ -2,7 +2,7 @@
# options
message("TSAN_OPTIONS = [$ENV{TSAN_OPTIONS}]")
-string(REGEX REPLACE ".*log_path=\'([^\']*)\'.*" "\\1" LOG_FILE "$ENV{TSAN_OPTIONS}")
+string(REGEX REPLACE ".*log_path='([^']*)'.*" "\\1" LOG_FILE "$ENV{TSAN_OPTIONS}")
message("LOG_FILE=[${LOG_FILE}]")
set(error_types
diff --git a/Tests/RunCMake/ctest_memcheck/testUndefinedBehaviorSanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testUndefinedBehaviorSanitizer.cmake
index ba6122d..7160280 100644
--- a/Tests/RunCMake/ctest_memcheck/testUndefinedBehaviorSanitizer.cmake
+++ b/Tests/RunCMake/ctest_memcheck/testUndefinedBehaviorSanitizer.cmake
@@ -2,7 +2,7 @@
# UndefinedBehaviorSanitizer options
message("UBSAN_OPTIONS = [$ENV{UBSAN_OPTIONS}]")
-string(REGEX REPLACE ".*log_path=\'([^\']*)\'.*" "\\1" LOG_FILE "$ENV{UBSAN_OPTIONS}")
+string(REGEX REPLACE ".*log_path='([^']*)'.*" "\\1" LOG_FILE "$ENV{UBSAN_OPTIONS}")
message("LOG_FILE=[${LOG_FILE}]")
# if we are not asked to simulate address sanitizer don't do it
diff --git a/Tests/RunCMake/ctest_start/NoStartTimeNightly-result.txt b/Tests/RunCMake/ctest_start/NoStartTimeNightly-result.txt
new file mode 100644
index 0000000..b57e2de
--- /dev/null
+++ b/Tests/RunCMake/ctest_start/NoStartTimeNightly-result.txt
@@ -0,0 +1 @@
+(-1|255)
diff --git a/Tests/RunCMake/ctest_start/NoStartTimeNightly-stderr.txt b/Tests/RunCMake/ctest_start/NoStartTimeNightly-stderr.txt
new file mode 100644
index 0000000..79756eb
--- /dev/null
+++ b/Tests/RunCMake/ctest_start/NoStartTimeNightly-stderr.txt
@@ -0,0 +1,4 @@
+^WARNING: No nightly start time found please set in CTestConfig\.cmake or DartConfig\.cmake
+CMake Error at [^
+]*/Tests/RunCMake/ctest_start/NoStartTimeNightly/test\.cmake:[0-9]+ \(ctest_start\):
+ ctest_start unknown error\.$
diff --git a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake
index da85b39..f11f1ec 100644
--- a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake
@@ -48,6 +48,8 @@ run_ctest_start(TooManyArgs Experimental
${RunCMake_BINARY_DIR}/TooManyArgs-build
${RunCMake_BINARY_DIR}/TooManyArgs-build
${RunCMake_BINARY_DIR}/TooManyArgs-build)
+run_ctest_start(NoStartTimeExperimental Experimental)
+run_ctest_start(NoStartTimeNightly Nightly)
function(run_ConfigInBuild)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ConfigInBuild-build)
diff --git a/Tests/RunCMake/ctest_start/test.cmake.in b/Tests/RunCMake/ctest_start/test.cmake.in
index 8cd3cff..4063ece 100644
--- a/Tests/RunCMake/ctest_start/test.cmake.in
+++ b/Tests/RunCMake/ctest_start/test.cmake.in
@@ -8,7 +8,9 @@ set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@")
set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@")
set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
+if(NOT "@CASE_NAME@" MATCHES "^NoStartTime")
+ set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
+endif()
function(setup_tests)
ctest_start(${ctest_start_args})
diff --git a/Tests/RunCMake/ctest_test/RunCMakeTest.cmake b/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
index d0a6e5f..b82335f 100644
--- a/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_test/RunCMakeTest.cmake
@@ -121,3 +121,26 @@ add_test(NAME testNotRun
]])
run_TestRepeat(NotRun RETURN_VALUE:1 REPEAT UNTIL_PASS:3)
unset(CASE_CMAKELISTS_SUFFIX_CODE)
+
+# test --stop-on-failure
+function(run_stop_on_failure)
+ set(CASE_CTEST_TEST_ARGS EXCLUDE RunCMakeVersion)
+ set(CASE_CMAKELISTS_SUFFIX_CODE [[
+add_test(NAME StoppingTest COMMAND ${CMAKE_COMMAND} -E false)
+add_test(NAME NotRunTest COMMAND ${CMAKE_COMMAND} -E true)
+ ]])
+
+ run_ctest_test(stop-on-failure STOP_ON_FAILURE)
+endfunction()
+run_stop_on_failure()
+
+# Make sure environment gets logged
+function(run_environment)
+ set(ENV{BAD_ENVIRONMENT_VARIABLE} "Bad environment variable")
+ set(CASE_CMAKELISTS_SUFFIX_CODE [[
+set_property(TEST RunCMakeVersion PROPERTY ENVIRONMENT "ENV1=env1;ENV2=env2")
+ ]])
+
+ run_ctest(TestEnvironment)
+endfunction()
+run_environment()
diff --git a/Tests/RunCMake/ctest_test/TestEnvironment-check.cmake b/Tests/RunCMake/ctest_test/TestEnvironment-check.cmake
new file mode 100644
index 0000000..91c9731
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestEnvironment-check.cmake
@@ -0,0 +1,10 @@
+file(READ "${RunCMake_TEST_BINARY_DIR}/Testing/TAG" _tag)
+string(REGEX REPLACE "^([^\n]*)\n.*$" "\\1" _date "${_tag}")
+file(READ "${RunCMake_TEST_BINARY_DIR}/Testing/${_date}/Test.xml" _test_contents)
+
+if(NOT _test_contents MATCHES "<Value>ENV1=env1\nENV2=env2\n#CTEST_RESOURCE_GROUP_COUNT=</Value>")
+ string(APPEND RunCMake_TEST_FAILED "Could not find expected environment variables in Test.xml")
+endif()
+if(_test_contents MATCHES "BAD_ENVIRONMENT_VARIABLE")
+ string(APPEND RunCMake_TEST_FAILED "Found BAD_ENVIRONMENT_VARIABLE in Test.xml")
+endif()
diff --git a/Tests/RunCMake/ctest_test/stop-on-failure-stdout.txt b/Tests/RunCMake/ctest_test/stop-on-failure-stdout.txt
new file mode 100644
index 0000000..fa4bce0
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/stop-on-failure-stdout.txt
@@ -0,0 +1,13 @@
+Test project [^
+]*/Tests/RunCMake/ctest_test/stop-on-failure-build
+ Start 1: RunCMakeVersion
+1/3 Test #1: RunCMakeVersion .................. Passed +[0-9.]+ sec
+ Start 2: StoppingTest
+2/3 Test #2: StoppingTest .....................\*\*\*Failed +[0-9.]+ sec
++
+50% tests passed, 1 tests failed out of 2
++
+Total Test time \(real\) = +[0-9.]+ sec
++
+The following tests FAILED:
+[ ]+2 - StoppingTest \(Failed\)$
diff --git a/Tests/RunCMake/execute_process/EchoVariable-stderr.txt b/Tests/RunCMake/execute_process/EchoVariable-stderr.txt
new file mode 100644
index 0000000..d927553
--- /dev/null
+++ b/Tests/RunCMake/execute_process/EchoVariable-stderr.txt
@@ -0,0 +1,3 @@
+CMake Error at [^
+]*EchoVariableOutput.cmake:2 \(message\):
+ Text to stderr
diff --git a/Tests/RunCMake/execute_process/EchoVariable-stdout.txt b/Tests/RunCMake/execute_process/EchoVariable-stdout.txt
new file mode 100644
index 0000000..7c868bd
--- /dev/null
+++ b/Tests/RunCMake/execute_process/EchoVariable-stdout.txt
@@ -0,0 +1 @@
+-- Text to stdout
diff --git a/Tests/RunCMake/execute_process/EchoVariable.cmake b/Tests/RunCMake/execute_process/EchoVariable.cmake
new file mode 100644
index 0000000..99999c7
--- /dev/null
+++ b/Tests/RunCMake/execute_process/EchoVariable.cmake
@@ -0,0 +1,23 @@
+execute_process(
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/EchoVariableOutput.cmake
+ OUTPUT_VARIABLE stdout
+ ERROR_QUIET
+ ECHO_OUTPUT_VARIABLE
+)
+
+file(READ ${CMAKE_CURRENT_LIST_DIR}/EchoVariable-stdout.txt expected_stdout)
+if (NOT stdout MATCHES "${expected_stdout}")
+ message(FATAL_ERROR "stdout differs from the expected stdout")
+endif()
+
+execute_process(
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/EchoVariableOutput.cmake
+ ERROR_VARIABLE stderr
+ OUTPUT_QUIET
+ ECHO_ERROR_VARIABLE
+)
+
+file(READ ${CMAKE_CURRENT_LIST_DIR}/EchoVariable-stderr.txt expected_stderr)
+if (NOT stderr MATCHES "${expected_stderr}")
+ message(FATAL_ERROR "stderr differs from the expected stderr")
+endif()
diff --git a/Tests/RunCMake/execute_process/EchoVariableOutput.cmake b/Tests/RunCMake/execute_process/EchoVariableOutput.cmake
new file mode 100644
index 0000000..e636567
--- /dev/null
+++ b/Tests/RunCMake/execute_process/EchoVariableOutput.cmake
@@ -0,0 +1,2 @@
+message(STATUS "Text to stdout")
+message(FATAL_ERROR "Text to stderr")
diff --git a/Tests/RunCMake/execute_process/RunCMakeTest.cmake b/Tests/RunCMake/execute_process/RunCMakeTest.cmake
index b203aab..89ad6b2 100644
--- a/Tests/RunCMake/execute_process/RunCMakeTest.cmake
+++ b/Tests/RunCMake/execute_process/RunCMakeTest.cmake
@@ -24,3 +24,5 @@ run_cmake_command(EchoCommand2 ${CMAKE_COMMAND} -P
run_cmake_command(EchoCommand3 ${CMAKE_COMMAND}
-DCHECK_ERROR_OUTPUT_LOCATION=TRUE -P
${RunCMake_SOURCE_DIR}/EchoCommand.cmake)
+
+run_cmake_command(EchoVariable ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/EchoVariable.cmake)
diff --git a/Tests/RunCMake/exit_code.c b/Tests/RunCMake/exit_code.c
index 3eba019..9fa8eca 100644
--- a/Tests/RunCMake/exit_code.c
+++ b/Tests/RunCMake/exit_code.c
@@ -21,7 +21,8 @@ int main(int argc, const char* argv[])
}
if (strcmp(str, substring_success) == 0) {
return EXIT_SUCCESS;
- } else if (strcmp(str, substring_failure) == 0) {
+ }
+ if (strcmp(str, substring_failure) == 0) {
return EXIT_FAILURE;
}
fprintf(stderr, "Failed to find string '%s' in '%s'\n", substring_success,
diff --git a/Tests/RunCMake/export/DependOnDoubleExport-stderr.txt b/Tests/RunCMake/export/DependOnDoubleExport-stderr.txt
index b78c7e4..e8f8a09 100644
--- a/Tests/RunCMake/export/DependOnDoubleExport-stderr.txt
+++ b/Tests/RunCMake/export/DependOnDoubleExport-stderr.txt
@@ -3,8 +3,7 @@ CMake Error in CMakeLists.txt:
that is not in this export set, but in multiple other export sets:
.*/Tests/RunCMake/export/DependOnDoubleExport-build/exportset.cmake,
.*/Tests/RunCMake/export/DependOnDoubleExport-build/manual.cmake.
-
-
++
An exported target cannot depend upon another target which is exported
multiple times. Consider consolidating the exports of the "doubleexported"
target to a single export.
diff --git a/Tests/RunCMake/export/Repeat-CMP0103-NEW-result.txt b/Tests/RunCMake/export/Repeat-CMP0103-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/export/Repeat-CMP0103-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/export/Repeat-CMP0103-NEW-stderr.txt b/Tests/RunCMake/export/Repeat-CMP0103-NEW-stderr.txt
new file mode 100644
index 0000000..48ab7b1
--- /dev/null
+++ b/Tests/RunCMake/export/Repeat-CMP0103-NEW-stderr.txt
@@ -0,0 +1,17 @@
+CMake Error at Repeat.cmake:[0-9]+ \(export\):
+ export command already specified for the file
+
+ foo.cmake
+
+ Did you miss 'APPEND' keyword\?
+Call Stack \(most recent call first\):
+ Repeat-CMP0103-NEW.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+
+
+CMake Error at Repeat/CMakeLists.txt:[0-9]+ \(export\):
+ export command already specified for the file
+
+ .+/foo.cmake
+
+ Did you miss 'APPEND' keyword\?
diff --git a/Tests/RunCMake/export/Repeat-CMP0103-NEW.cmake b/Tests/RunCMake/export/Repeat-CMP0103-NEW.cmake
new file mode 100644
index 0000000..69381df
--- /dev/null
+++ b/Tests/RunCMake/export/Repeat-CMP0103-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0103 NEW)
+include(Repeat.cmake)
diff --git a/Tests/RunCMake/export/Repeat-CMP0103-OLD.cmake b/Tests/RunCMake/export/Repeat-CMP0103-OLD.cmake
new file mode 100644
index 0000000..25134d6
--- /dev/null
+++ b/Tests/RunCMake/export/Repeat-CMP0103-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0103 OLD)
+include(Repeat.cmake)
diff --git a/Tests/RunCMake/export/Repeat-CMP0103-WARN-stderr.txt b/Tests/RunCMake/export/Repeat-CMP0103-WARN-stderr.txt
new file mode 100644
index 0000000..28e849d
--- /dev/null
+++ b/Tests/RunCMake/export/Repeat-CMP0103-WARN-stderr.txt
@@ -0,0 +1,26 @@
+CMake Warning \(dev\) at Repeat.cmake:[0-9]+ \(export\):
+ Policy CMP0103 is not set: Multiple export\(\) with same FILE without APPEND
+ is not allowed. Run "cmake --help-policy CMP0103" for policy details. Use
+ the cmake_policy command to set the policy and suppress this warning.
+
+ export\(\) command already specified for the file
+
+ foo.cmake
+
+ Did you miss 'APPEND' keyword\?
+Call Stack \(most recent call first\):
+ Repeat-CMP0103-WARN.cmake:[0-9]+ \(include\)
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
+
+CMake Warning \(dev\) at Repeat/CMakeLists.txt:[0-9]+ \(export\):
+ Policy CMP0103 is not set: Multiple export\(\) with same FILE without APPEND
+ is not allowed. Run "cmake --help-policy CMP0103" for policy details. Use
+ the cmake_policy command to set the policy and suppress this warning.
+
+ export\(\) command already specified for the file
+
+ .+/foo.cmake
+
+ Did you miss 'APPEND' keyword\?
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/export/Repeat-CMP0103-WARN.cmake b/Tests/RunCMake/export/Repeat-CMP0103-WARN.cmake
new file mode 100644
index 0000000..3a630c5
--- /dev/null
+++ b/Tests/RunCMake/export/Repeat-CMP0103-WARN.cmake
@@ -0,0 +1 @@
+include(Repeat.cmake)
diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake
index df35d95..1c74762 100644
--- a/Tests/RunCMake/export/RunCMakeTest.cmake
+++ b/Tests/RunCMake/export/RunCMakeTest.cmake
@@ -2,7 +2,9 @@ include(RunCMake)
run_cmake(CustomTarget)
run_cmake(Empty)
-run_cmake(Repeat)
+run_cmake(Repeat-CMP0103-WARN)
+run_cmake(Repeat-CMP0103-OLD)
+run_cmake(Repeat-CMP0103-NEW)
run_cmake(TargetNotFound)
run_cmake(AppendExport)
run_cmake(OldIface)
diff --git a/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-result.txt b/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-stderr.txt
new file mode 100644
index 0000000..1552baa
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at DOWNLOAD-tls-cainfo-not-set.cmake:[0-9]+ \(file\):
+ file DOWNLOAD missing file value for TLS_CAINFO.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set.cmake b/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set.cmake
new file mode 100644
index 0000000..b476425
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-tls-cainfo-not-set.cmake
@@ -0,0 +1 @@
+file(DOWNLOAD "" "" TLS_CAINFO)
diff --git a/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-result.txt b/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-stderr.txt
new file mode 100644
index 0000000..2f46c0c
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at DOWNLOAD-tls-verify-not-set.cmake:[0-9]+ \(file\):
+ file DOWNLOAD missing bool value for TLS_VERIFY.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set.cmake b/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set.cmake
new file mode 100644
index 0000000..919368c
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-tls-verify-not-set.cmake
@@ -0,0 +1 @@
+file(DOWNLOAD "" "" TLS_VERIFY)
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index f5461ad..a4de1d3 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -8,6 +8,8 @@ run_cmake(DOWNLOAD-hash-mismatch)
run_cmake(DOWNLOAD-unused-argument)
run_cmake(DOWNLOAD-httpheader-not-set)
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(TOUCH)
run_cmake(TOUCH-error-in-source-directory)
@@ -15,6 +17,8 @@ run_cmake(TOUCH-error-missing-directory)
run_cmake(UPLOAD-unused-argument)
run_cmake(UPLOAD-httpheader-not-set)
run_cmake(UPLOAD-netrc-bad)
+run_cmake(UPLOAD-tls-cainfo-not-set)
+run_cmake(UPLOAD-tls-verify-not-set)
run_cmake(UPLOAD-pass-not-set)
run_cmake(INSTALL-DIRECTORY)
run_cmake(INSTALL-FILES_FROM_DIR)
diff --git a/Tests/RunCMake/file/UPLOAD-tls-cainfo-not-set-result.txt b/Tests/RunCMake/file/UPLOAD-tls-cainfo-not-set-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/UPLOAD-tls-cainfo-not-set-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/UPLOAD-tls-cainfo-not-set-stderr.txt b/Tests/RunCMake/file/UPLOAD-tls-cainfo-not-set-stderr.txt
new file mode 100644
index 0000000..a5fa4e8
--- /dev/null
+++ b/Tests/RunCMake/file/UPLOAD-tls-cainfo-not-set-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at UPLOAD-tls-cainfo-not-set.cmake:[0-9]+ \(file\):
+ file UPLOAD missing file value for TLS_CAINFO.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/file/UPLOAD-tls-cainfo-not-set.cmake b/Tests/RunCMake/file/UPLOAD-tls-cainfo-not-set.cmake
new file mode 100644
index 0000000..8eb7c83
--- /dev/null
+++ b/Tests/RunCMake/file/UPLOAD-tls-cainfo-not-set.cmake
@@ -0,0 +1 @@
+file(UPLOAD "" "" TLS_CAINFO)
diff --git a/Tests/RunCMake/file/UPLOAD-tls-verify-not-set-result.txt b/Tests/RunCMake/file/UPLOAD-tls-verify-not-set-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/file/UPLOAD-tls-verify-not-set-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/file/UPLOAD-tls-verify-not-set-stderr.txt b/Tests/RunCMake/file/UPLOAD-tls-verify-not-set-stderr.txt
new file mode 100644
index 0000000..c4dffcd
--- /dev/null
+++ b/Tests/RunCMake/file/UPLOAD-tls-verify-not-set-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at UPLOAD-tls-verify-not-set.cmake:[0-9]+ \(file\):
+ file UPLOAD missing bool value for TLS_VERIFY.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/file/UPLOAD-tls-verify-not-set.cmake b/Tests/RunCMake/file/UPLOAD-tls-verify-not-set.cmake
new file mode 100644
index 0000000..8b9d293
--- /dev/null
+++ b/Tests/RunCMake/file/UPLOAD-tls-verify-not-set.cmake
@@ -0,0 +1 @@
+file(UPLOAD "" "" TLS_VERIFY)
diff --git a/Tests/RunCMake/find_file/Required-result.txt b/Tests/RunCMake/find_file/Required-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/find_file/Required-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/find_file/Required-stderr.txt b/Tests/RunCMake/find_file/Required-stderr.txt
new file mode 100644
index 0000000..f9c337c
--- /dev/null
+++ b/Tests/RunCMake/find_file/Required-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at Required.cmake:9 \(find_file\):
+ Could not find FILE_doNotExists using the following files: doNotExists.h
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/find_file/Required-stdout.txt b/Tests/RunCMake/find_file/Required-stdout.txt
new file mode 100644
index 0000000..87a8e86
--- /dev/null
+++ b/Tests/RunCMake/find_file/Required-stdout.txt
@@ -0,0 +1 @@
+-- FILE_exists='[^']*/Tests/RunCMake/find_file/include/PrefixInPATH.h'
diff --git a/Tests/RunCMake/find_file/Required.cmake b/Tests/RunCMake/find_file/Required.cmake
new file mode 100644
index 0000000..9cf0927
--- /dev/null
+++ b/Tests/RunCMake/find_file/Required.cmake
@@ -0,0 +1,12 @@
+find_file(FILE_exists
+ NAMES PrefixInPATH.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ NO_DEFAULT_PATH
+ REQUIRED
+ )
+message(STATUS "FILE_exists='${FILE_exists}'")
+
+find_file(FILE_doNotExists
+ NAMES doNotExists.h
+ REQUIRED
+ )
diff --git a/Tests/RunCMake/find_file/RunCMakeTest.cmake b/Tests/RunCMake/find_file/RunCMakeTest.cmake
index 9f56a57..93dfb78 100644
--- a/Tests/RunCMake/find_file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_file/RunCMakeTest.cmake
@@ -3,3 +3,4 @@ include(RunCMake)
run_cmake(FromPATHEnv)
run_cmake(FromPrefixPath)
run_cmake(PrefixInPATH)
+run_cmake(Required)
diff --git a/Tests/RunCMake/find_library/Required-result.txt b/Tests/RunCMake/find_library/Required-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/find_library/Required-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/find_library/Required-stderr.txt b/Tests/RunCMake/find_library/Required-stderr.txt
new file mode 100644
index 0000000..545d164
--- /dev/null
+++ b/Tests/RunCMake/find_library/Required-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at Required.cmake:11 \(find_library\):
+ Could not find LIB_doNotExists using the following names: doNotExists
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/find_library/Required-stdout.txt b/Tests/RunCMake/find_library/Required-stdout.txt
new file mode 100644
index 0000000..b88ab79
--- /dev/null
+++ b/Tests/RunCMake/find_library/Required-stdout.txt
@@ -0,0 +1 @@
+-- LIB_exists='[^']*/Tests/RunCMake/find_library/lib/libPrefixInPATH.a'
diff --git a/Tests/RunCMake/find_library/Required.cmake b/Tests/RunCMake/find_library/Required.cmake
new file mode 100644
index 0000000..78c9f87
--- /dev/null
+++ b/Tests/RunCMake/find_library/Required.cmake
@@ -0,0 +1,14 @@
+list(APPEND CMAKE_FIND_LIBRARY_PREFIXES lib)
+list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .a)
+find_library(LIB_exists
+ NAMES PrefixInPATH
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/lib
+ NO_DEFAULT_PATH
+ REQUIRED
+ )
+message(STATUS "LIB_exists='${LIB_exists}'")
+
+find_library(LIB_doNotExists
+ NAMES doNotExists
+ REQUIRED
+ )
diff --git a/Tests/RunCMake/find_library/RunCMakeTest.cmake b/Tests/RunCMake/find_library/RunCMakeTest.cmake
index 643a5b9..b6aadce 100644
--- a/Tests/RunCMake/find_library/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_library/RunCMakeTest.cmake
@@ -7,3 +7,4 @@ if(CMAKE_HOST_UNIX)
run_cmake(LibArchLink)
endif()
run_cmake(PrefixInPATH)
+run_cmake(Required)
diff --git a/Tests/RunCMake/find_path/Required-result.txt b/Tests/RunCMake/find_path/Required-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/find_path/Required-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/find_path/Required-stderr.txt b/Tests/RunCMake/find_path/Required-stderr.txt
new file mode 100644
index 0000000..db65c2f
--- /dev/null
+++ b/Tests/RunCMake/find_path/Required-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at Required.cmake:9 \(find_path\):
+ Could not find PATH_doNotExists using the following files: doNotExists.h
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/find_path/Required-stdout.txt b/Tests/RunCMake/find_path/Required-stdout.txt
new file mode 100644
index 0000000..225fcab
--- /dev/null
+++ b/Tests/RunCMake/find_path/Required-stdout.txt
@@ -0,0 +1 @@
+-- PATH_exists='[^']*/Tests/RunCMake/find_path/include'
diff --git a/Tests/RunCMake/find_path/Required.cmake b/Tests/RunCMake/find_path/Required.cmake
new file mode 100644
index 0000000..172dc11
--- /dev/null
+++ b/Tests/RunCMake/find_path/Required.cmake
@@ -0,0 +1,12 @@
+find_path(PATH_exists
+ NAMES PrefixInPATH.h
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ NO_DEFAULT_PATH
+ REQUIRED
+ )
+message(STATUS "PATH_exists='${PATH_exists}'")
+
+find_path(PATH_doNotExists
+ NAMES doNotExists.h
+ REQUIRED
+ )
diff --git a/Tests/RunCMake/find_path/RunCMakeTest.cmake b/Tests/RunCMake/find_path/RunCMakeTest.cmake
index ed55f51..5c919bb 100644
--- a/Tests/RunCMake/find_path/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_path/RunCMakeTest.cmake
@@ -3,6 +3,7 @@ include(RunCMake)
run_cmake(EmptyOldStyle)
run_cmake(FromPATHEnv)
run_cmake(PrefixInPATH)
+run_cmake(Required)
if(APPLE)
run_cmake(FrameworksWithSubdirs)
diff --git a/Tests/RunCMake/find_program/ExeNoRead-stdout.txt b/Tests/RunCMake/find_program/ExeNoRead-stdout.txt
new file mode 100644
index 0000000..35a83f2
--- /dev/null
+++ b/Tests/RunCMake/find_program/ExeNoRead-stdout.txt
@@ -0,0 +1 @@
+-- ExeNoRead_EXECUTABLE='.*/Tests/RunCMake/find_program/ExeNoRead-build/ExeNoRead'
diff --git a/Tests/RunCMake/find_program/ExeNoRead.cmake b/Tests/RunCMake/find_program/ExeNoRead.cmake
new file mode 100644
index 0000000..7e22dc5
--- /dev/null
+++ b/Tests/RunCMake/find_program/ExeNoRead.cmake
@@ -0,0 +1,4 @@
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/ExeNoRead" "#!/bin/sh\n")
+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}'")
diff --git a/Tests/RunCMake/find_program/Required-result.txt b/Tests/RunCMake/find_program/Required-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/find_program/Required-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/find_program/Required-stderr.txt b/Tests/RunCMake/find_program/Required-stderr.txt
new file mode 100644
index 0000000..214a8d4
--- /dev/null
+++ b/Tests/RunCMake/find_program/Required-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at Required.cmake:9 \(find_program\):
+ Could not find PROG_AandB using the following names: testAandB
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/find_program/Required-stdout.txt b/Tests/RunCMake/find_program/Required-stdout.txt
new file mode 100644
index 0000000..3c8f1b5
--- /dev/null
+++ b/Tests/RunCMake/find_program/Required-stdout.txt
@@ -0,0 +1 @@
+-- PROG_A='[^']*/Tests/RunCMake/find_program/A/testA'
diff --git a/Tests/RunCMake/find_program/Required.cmake b/Tests/RunCMake/find_program/Required.cmake
new file mode 100644
index 0000000..a75aa53
--- /dev/null
+++ b/Tests/RunCMake/find_program/Required.cmake
@@ -0,0 +1,12 @@
+find_program(PROG_A
+ NAMES testA
+ PATHS ${CMAKE_CURRENT_SOURCE_DIR}/A
+ NO_DEFAULT_PATH
+ REQUIRED
+ )
+message(STATUS "PROG_A='${PROG_A}'")
+
+find_program(PROG_AandB
+ NAMES testAandB
+ REQUIRED
+ )
diff --git a/Tests/RunCMake/find_program/RunCMakeTest.cmake b/Tests/RunCMake/find_program/RunCMakeTest.cmake
index 6903f05..95ffd84 100644
--- a/Tests/RunCMake/find_program/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_program/RunCMakeTest.cmake
@@ -4,8 +4,13 @@ run_cmake(EnvAndHints)
run_cmake(DirsPerName)
run_cmake(NamesPerDir)
run_cmake(RelAndAbsPath)
+run_cmake(Required)
if(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN)$")
run_cmake(WindowsCom)
run_cmake(WindowsExe)
endif()
+
+if(UNIX)
+ run_cmake(ExeNoRead)
+endif()
diff --git a/Tests/RunCMake/get_filename_component/KnownComponents.cmake b/Tests/RunCMake/get_filename_component/KnownComponents.cmake
index 54b858f..c2762ad 100644
--- a/Tests/RunCMake/get_filename_component/KnownComponents.cmake
+++ b/Tests/RunCMake/get_filename_component/KnownComponents.cmake
@@ -85,12 +85,12 @@ check("PROGRAM with args output: args" "${test_program_args}" " arg1 arg2")
get_filename_component(test_program_name " " PROGRAM)
check("PROGRAM with just a space" "${test_program_name}" "")
-get_filename_component(test_program_name "${CMAKE_CURRENT_LIST_FILE}" PROGRAM)
-check("PROGRAM specified explicitly without quoting" "${test_program_name}" "${CMAKE_CURRENT_LIST_FILE}")
+get_filename_component(test_program_name "${CMAKE_CURRENT_LIST_DIR}/KnownComponents.sh" PROGRAM)
+check("PROGRAM specified explicitly without quoting" "${test_program_name}" "${CMAKE_CURRENT_LIST_DIR}/KnownComponents.sh")
-get_filename_component(test_program_name "\"${CMAKE_CURRENT_LIST_FILE}\" arg1 arg2" PROGRAM
+get_filename_component(test_program_name "\"${CMAKE_CURRENT_LIST_DIR}/KnownComponents.sh\" arg1 arg2" PROGRAM
PROGRAM_ARGS test_program_args)
-check("PROGRAM specified explicitly with arguments: name" "${test_program_name}" "${CMAKE_CURRENT_LIST_FILE}")
+check("PROGRAM specified explicitly with arguments: name" "${test_program_name}" "${CMAKE_CURRENT_LIST_DIR}/KnownComponents.sh")
check("PROGRAM specified explicitly with arguments: args" "${test_program_args}" " arg1 arg2")
list(APPEND non_cache_vars test_program_name)
diff --git a/Tests/RunCMake/get_filename_component/KnownComponents.sh b/Tests/RunCMake/get_filename_component/KnownComponents.sh
new file mode 100755
index 0000000..1a24852
--- /dev/null
+++ b/Tests/RunCMake/get_filename_component/KnownComponents.sh
@@ -0,0 +1 @@
+#!/bin/sh
diff --git a/Tests/RunCMake/get_property/RunCMakeTest.cmake b/Tests/RunCMake/get_property/RunCMakeTest.cmake
index 6e36473..c4ee53d 100644
--- a/Tests/RunCMake/get_property/RunCMakeTest.cmake
+++ b/Tests/RunCMake/get_property/RunCMakeTest.cmake
@@ -5,6 +5,7 @@ run_cmake(directory_properties)
run_cmake(global_properties)
run_cmake(install_properties)
run_cmake(source_properties)
+run_cmake(source_properties_failures)
run_cmake(target_properties)
run_cmake(test_properties)
run_cmake(DebugConfigurations)
diff --git a/Tests/RunCMake/get_property/source_properties_failures-result.txt b/Tests/RunCMake/get_property/source_properties_failures-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/get_property/source_properties_failures-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/get_property/source_properties_failures-stderr.txt b/Tests/RunCMake/get_property/source_properties_failures-stderr.txt
new file mode 100644
index 0000000..a500e2e
--- /dev/null
+++ b/Tests/RunCMake/get_property/source_properties_failures-stderr.txt
@@ -0,0 +1,66 @@
+^CMake Error at source_properties_failures.cmake:1 \(set_source_files_properties\):
+ set_source_files_properties called with incorrect number of arguments no
+ value provided to the DIRECTORY option
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at source_properties_failures.cmake:2 \(set_source_files_properties\):
+ set_source_files_properties given non-existent DIRECTORY non_existing_dir
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at source_properties_failures.cmake:3 \(set_source_files_properties\):
+ set_source_files_properties called with incorrect number of arguments no
+ value provided to the TARGET_DIRECTORY option
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at source_properties_failures.cmake:4 \(set_source_files_properties\):
+ set_source_files_properties given non-existent target for DIRECTORY_TARGET
+ non_existing_target
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at source_properties_failures.cmake:6 \(get_property\):
+ get_property called with incorrect number of arguments no value provided to
+ the DIRECTORY option
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at source_properties_failures.cmake:7 \(get_property\):
+ get_property given non-existent DIRECTORY non_existing_dir
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at source_properties_failures.cmake:8 \(get_property\):
+ get_property called with incorrect number of arguments no value provided to
+ the TARGET_DIRECTORY option
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at source_properties_failures.cmake:9 \(get_property\):
+ get_property given non-existent target for DIRECTORY_TARGET
+ non_existing_dir
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at source_properties_failures.cmake:11 \(get_source_file_property\):
+ get_source_file_property given non-existent DIRECTORY PROPERTY
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at source_properties_failures.cmake:12 \(get_source_file_property\):
+ get_source_file_property called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at source_properties_failures.cmake:13 \(get_source_file_property\):
+ get_source_file_property given non-existent target for DIRECTORY_TARGET
+ PROPERTY
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at source_properties_failures.cmake:14 \(get_source_file_property\):
+ get_source_file_property called with incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/get_property/source_properties_failures.cmake b/Tests/RunCMake/get_property/source_properties_failures.cmake
new file mode 100644
index 0000000..f4b87f9
--- /dev/null
+++ b/Tests/RunCMake/get_property/source_properties_failures.cmake
@@ -0,0 +1,14 @@
+set_source_files_properties(a.txt DIRECTORY PROPERTIES COMPILE_DEFINITIONS "def")
+set_source_files_properties(a.txt DIRECTORY non_existing_dir PROPERTIES COMPILE_DEFINITIONS "def")
+set_source_files_properties(a.txt TARGET_DIRECTORY PROPERTIES COMPILE_DEFINITIONS "def")
+set_source_files_properties(a.txt TARGET_DIRECTORY non_existing_target PROPERTIES COMPILE_DEFINITIONS "def")
+
+get_property(in_var SOURCE a.txt DIRECTORY PROPERTY COMPILE_DEFINITIONS)
+get_property(in_var SOURCE a.txt DIRECTORY non_existing_dir PROPERTY COMPILE_DEFINITIONS)
+get_property(in_var SOURCE a.txt TARGET_DIRECTORY PROPERTY COMPILE_DEFINITIONS)
+get_property(in_var SOURCE a.txt TARGET_DIRECTORY non_existing_dir PROPERTY COMPILE_DEFINITIONS)
+
+get_source_file_property(in_var a.txt DIRECTORY PROPERTY COMPILE_DEFINITIONS)
+get_source_file_property(in_var a.txt DIRECTORY non_existing_dir PROPERTY COMPILE_DEFINITIONS)
+get_source_file_property(in_var a.txt TARGET_DIRECTORY PROPERTY COMPILE_DEFINITIONS)
+get_source_file_property(in_var a.txt TARGET_DIRECTORY non_existing_dir PROPERTY COMPILE_DEFINITIONS)
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index 70570b7..c50e552 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -174,6 +174,12 @@ elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs1)
run_cmake(file-GET_RUNTIME_DEPENDENCIES-badargs2)
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
+ if(DEFINED ENV{LDFLAGS})
+ # Some setups prebake disable-new-dtags into LDFLAGS
+ string(REPLACE "-Wl,--disable-new-dtags" "" new_ldflags "$ENV{LDFLAGS}")
+ set(ENV{LDFLAGS} "${new_ldflags}")
+ endif()
+
if(NOT CMAKE_C_COMPILER_ID MATCHES "^XL")
run_install_test(file-GET_RUNTIME_DEPENDENCIES-linux)
endif()
@@ -188,6 +194,7 @@ else()
endif()
set(run_install_test_components 1)
+run_install_test(file-GET_RUNTIME_DEPENDENCIES-variable-propagation)
run_install_test(FILES-EXCLUDE_FROM_ALL)
run_install_test(TARGETS-EXCLUDE_FROM_ALL)
run_install_test(TARGETS-NAMELINK_COMPONENT)
diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-result.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-stderr.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-stderr.txt
new file mode 100644
index 0000000..591a5e7
--- /dev/null
+++ b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-all-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at cmake_install\.cmake:[0-9]+ \(message\):
+.*
+.*CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM: custom-platform.*
+.*CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL: custom-platform-objdump.*
+.*CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND: path/to/custom-objdump.*
+.*CMAKE_OBJDUMP: custom-objdump.*
diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-result.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-stderr.txt b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-stderr.txt
new file mode 100644
index 0000000..591a5e7
--- /dev/null
+++ b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation-dev-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at cmake_install\.cmake:[0-9]+ \(message\):
+.*
+.*CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM: custom-platform.*
+.*CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL: custom-platform-objdump.*
+.*CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND: path/to/custom-objdump.*
+.*CMAKE_OBJDUMP: custom-objdump.*
diff --git a/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation.cmake b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation.cmake
new file mode 100644
index 0000000..07bbc5e
--- /dev/null
+++ b/Tests/RunCMake/install/file-GET_RUNTIME_DEPENDENCIES-variable-propagation.cmake
@@ -0,0 +1,17 @@
+enable_language(C)
+
+set(CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM "custom-platform")
+set(CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL "custom-platform-objdump")
+set(CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND "path/to/custom-objdump")
+set(CMAKE_OBJDUMP "custom-objdump")
+
+install(CODE [[
+message(FATAL_ERROR "
+ CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM: ${CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM}
+ CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL: ${CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL}
+ CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND: ${CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND}
+ CMAKE_OBJDUMP: ${CMAKE_OBJDUMP}
+")
+]]
+COMPONENT dev
+)
diff --git a/Tests/RunCMake/message/message-indent-multiline.cmake b/Tests/RunCMake/message/message-indent-multiline.cmake
index 0f789bf..3815569 100644
--- a/Tests/RunCMake/message/message-indent-multiline.cmake
+++ b/Tests/RunCMake/message/message-indent-multiline.cmake
@@ -9,5 +9,5 @@ message]]) # No `\n` at the end!
message(STATUS "${msg}\n\n")
message(STATUS "${msg}")
# This is just to make sure NOTICE messages are also get indented:
-# https://gitlab.kitware.com/cmake/cmake/issues/19418#note_588011
+# https://gitlab.kitware.com/cmake/cmake/-/issues/19418#note_588011
message(NOTICE "${msg}")
diff --git a/Tests/RunCMake/pseudo_cppcheck.c b/Tests/RunCMake/pseudo_cppcheck.c
index 5b1531b..e80620c 100644
--- a/Tests/RunCMake/pseudo_cppcheck.c
+++ b/Tests/RunCMake/pseudo_cppcheck.c
@@ -11,7 +11,8 @@ int main(int argc, char* argv[])
fprintf(stdout, "stdout from bad command line arg '-bad'\n");
fprintf(stderr, "stderr from bad command line arg '-bad'\n");
return 1;
- } else if (strcmp(argv[i], "-error") == 0) {
+ }
+ if (strcmp(argv[i], "-error") == 0) {
// The real cppcheck allows to set the exitcode with --error-exitcode
result = 5;
}
diff --git a/Tests/RunCMake/set_property/RunCMakeTest.cmake b/Tests/RunCMake/set_property/RunCMakeTest.cmake
index 8d4614c..692c6b9 100644
--- a/Tests/RunCMake/set_property/RunCMakeTest.cmake
+++ b/Tests/RunCMake/set_property/RunCMakeTest.cmake
@@ -9,6 +9,7 @@ run_cmake(LINK_OPTIONS)
run_cmake(LINK_DIRECTORIES)
run_cmake(LINK_LIBRARIES)
run_cmake(SOURCES)
+run_cmake(SOURCE_FILE)
run_cmake(TYPE)
run_cmake(USER_PROP)
run_cmake(USER_PROP_INHERITED)
diff --git a/Tests/RunCMake/set_property/SOURCE_FILE-result.txt b/Tests/RunCMake/set_property/SOURCE_FILE-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/set_property/SOURCE_FILE-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/set_property/SOURCE_FILE-stderr.txt b/Tests/RunCMake/set_property/SOURCE_FILE-stderr.txt
new file mode 100644
index 0000000..2e0b238
--- /dev/null
+++ b/Tests/RunCMake/set_property/SOURCE_FILE-stderr.txt
@@ -0,0 +1,22 @@
+^CMake Error at SOURCE_FILE.cmake:1 \(set_property\):
+ set_property called with incorrect number of arguments no value provided to
+ the DIRECTORY option
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at SOURCE_FILE.cmake:2 \(set_property\):
+ set_property given non-existent DIRECTORY non_existing_dir
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at SOURCE_FILE.cmake:3 \(set_property\):
+ set_property called with incorrect number of arguments no value provided to
+ the TARGET_DIRECTORY option
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
++
+CMake Error at SOURCE_FILE.cmake:4 \(set_property\):
+ set_property given non-existent target for DIRECTORY_TARGET
+ non_existing_target
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/set_property/SOURCE_FILE.cmake b/Tests/RunCMake/set_property/SOURCE_FILE.cmake
new file mode 100644
index 0000000..b1d78bd
--- /dev/null
+++ b/Tests/RunCMake/set_property/SOURCE_FILE.cmake
@@ -0,0 +1,4 @@
+set_property(SOURCE a.txt DIRECTORY PROPERTY COMPILE_DEFINITIONS "def")
+set_property(SOURCE a.txt DIRECTORY non_existing_dir PROPERTY COMPILE_DEFINITIONS "def")
+set_property(SOURCE a.txt TARGET_DIRECTORY PROPERTY COMPILE_DEFINITIONS "def")
+set_property(SOURCE a.txt TARGET_DIRECTORY non_existing_target PROPERTY COMPILE_DEFINITIONS "def")
diff --git a/Tests/RunCMake/string/Hex.cmake b/Tests/RunCMake/string/Hex.cmake
new file mode 100644
index 0000000..1c5aaa1
--- /dev/null
+++ b/Tests/RunCMake/string/Hex.cmake
@@ -0,0 +1,20 @@
+function(assert_strequal input actual expected)
+ if(NOT expected STREQUAL actual)
+ message(SEND_ERROR "Output did not match expected\nInput string:\n ${input}\nExpected:\n ${expected}\nActual:\n ${actual}")
+ endif()
+endfunction()
+
+set(_input1 "The quick brown fox jumps over the lazy dog.")
+string(HEX "${_input1}" _result1)
+assert_strequal("${_input1}" "${_result1}" "54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f672e")
+
+set(_input2 "Hello world!")
+string(HEX "${_input2}" _result2)
+assert_strequal("${_input2}" "${_result2}" "48656c6c6f20776f726c6421")
+
+set(_input3 "Ash nazg durbatulûk\nAsh nazg gimbatul\nAsh nazg thrakatulûk\nAgh burzum-ishi krimpatul")
+string(HEX "${_input3}" _result3)
+assert_strequal("${_input3}" "${_result3}" "417368206e617a6720647572626174756cc3bb6b0a417368206e617a672067696d626174756c0a417368206e617a6720746872616b6174756cc3bb6b0a416768206275727a756d2d69736869206b72696d706174756c")
+
+string(HEX "" _result_empty)
+assert_strequal("" "${_result_empty}" "")
diff --git a/Tests/RunCMake/string/HexNotEnoughArgs-result.txt b/Tests/RunCMake/string/HexNotEnoughArgs-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/string/HexNotEnoughArgs-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/string/HexNotEnoughArgs-stderr.txt b/Tests/RunCMake/string/HexNotEnoughArgs-stderr.txt
new file mode 100644
index 0000000..444f79d
--- /dev/null
+++ b/Tests/RunCMake/string/HexNotEnoughArgs-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at HexNotEnoughArgs\.cmake:[0-9]+ \(string\):
+ string Incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:3 \(include\)$
diff --git a/Tests/RunCMake/string/HexNotEnoughArgs.cmake b/Tests/RunCMake/string/HexNotEnoughArgs.cmake
new file mode 100644
index 0000000..7002af0
--- /dev/null
+++ b/Tests/RunCMake/string/HexNotEnoughArgs.cmake
@@ -0,0 +1 @@
+string(HEX "Hello world!")
diff --git a/Tests/RunCMake/string/HexTooManyArgs-result.txt b/Tests/RunCMake/string/HexTooManyArgs-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/string/HexTooManyArgs-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/string/HexTooManyArgs-stderr.txt b/Tests/RunCMake/string/HexTooManyArgs-stderr.txt
new file mode 100644
index 0000000..91b40ed
--- /dev/null
+++ b/Tests/RunCMake/string/HexTooManyArgs-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at HexTooManyArgs\.cmake:[0-9]+ \(string\):
+ string Incorrect number of arguments
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:3 \(include\)$
diff --git a/Tests/RunCMake/string/HexTooManyArgs.cmake b/Tests/RunCMake/string/HexTooManyArgs.cmake
new file mode 100644
index 0000000..8986cf8
--- /dev/null
+++ b/Tests/RunCMake/string/HexTooManyArgs.cmake
@@ -0,0 +1 @@
+string(HEX "Hello world!" _output bad)
diff --git a/Tests/RunCMake/string/RunCMakeTest.cmake b/Tests/RunCMake/string/RunCMakeTest.cmake
index c432b4e..bb7cb17 100644
--- a/Tests/RunCMake/string/RunCMakeTest.cmake
+++ b/Tests/RunCMake/string/RunCMakeTest.cmake
@@ -37,3 +37,7 @@ run_cmake(UTF-32LE)
run_cmake(Repeat)
run_cmake(RepeatNoArgs)
run_cmake(RepeatNegativeCount)
+
+run_cmake(Hex)
+run_cmake(HexTooManyArgs)
+run_cmake(HexNotEnoughArgs)
diff --git a/Tests/RunCMake/target_link_directories/CMP0099.cmake b/Tests/RunCMake/target_link_directories/CMP0099.cmake
index a2be279..aff1e33 100644
--- a/Tests/RunCMake/target_link_directories/CMP0099.cmake
+++ b/Tests/RunCMake/target_link_directories/CMP0099.cmake
@@ -5,7 +5,7 @@ set(CMAKE_VERBOSE_MAKEFILE TRUE)
set(CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES FALSE)
add_library(LinkDirs_interface INTERFACE)
-target_link_directories (LinkDirs_interface INTERFACE "/DIR_INTERFACE"})
+target_link_directories (LinkDirs_interface INTERFACE "/DIR_INTERFACE")
add_library(LinkDirs_static STATIC lib.c)
target_link_libraries (LinkDirs_static PRIVATE LinkDirs_interface)
diff --git a/Tests/RunCMake/target_link_directories/RunCMakeTest.cmake b/Tests/RunCMake/target_link_directories/RunCMakeTest.cmake
index a74ee25..699e871 100644
--- a/Tests/RunCMake/target_link_directories/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_link_directories/RunCMakeTest.cmake
@@ -21,10 +21,21 @@ if(RunCMake_GENERATOR MATCHES "(Ninja|Makefiles)" AND
set(VERBOSE -- -v)
endif()
+ run_cmake(genex_LINK_LANGUAGE)
+ run_cmake_target(genex_LINK_LANGUAGE interface LinkDirs_exe_interface --config Release ${VERBOSE})
+ run_cmake_target(genex_LINK_LANGUAGE basic LinkDirs_exe_c --config Release ${VERBOSE})
+ run_cmake_target(genex_LINK_LANGUAGE LINKER_LANGUAGE LinkDirs_exe_cxx --config Release ${VERBOSE})
+
+ run_cmake(genex_LINK_LANG_AND_ID)
+
+ run_cmake_target(genex_LINK_LANG_AND_ID interface LinkDirs_exe_interface --config Release ${VERBOSE})
+ run_cmake_target(genex_LINK_LANG_AND_ID basic LinkDirs_exe_c --config Release ${VERBOSE})
+ run_cmake_target(genex_LINK_LANG_AND_ID LINKER_LANGUAGE LinkDirs_exe_cxx --config Release ${VERBOSE})
+
+
run_cmake(CMP0099-NEW)
run_cmake_target(CMP0099-NEW basic LinkDirs_exe ${VERBOSE})
-
run_cmake(CMP0099-OLD)
run_cmake_target(CMP0099-OLD basic LinkDirs_exe ${VERBOSE})
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-LINKER_LANGUAGE-check.cmake b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-LINKER_LANGUAGE-check.cmake
new file mode 100644
index 0000000..aa39810
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-LINKER_LANGUAGE-check.cmake
@@ -0,0 +1,5 @@
+
+set (VALID_LANG CXX)
+set (INVALID_LANG C)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANGUAGE-validation.cmake")
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-LINKER_LANGUAGE-result.txt b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-LINKER_LANGUAGE-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-LINKER_LANGUAGE-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-basic-check.cmake b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-basic-check.cmake
new file mode 100644
index 0000000..71f641d
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-basic-check.cmake
@@ -0,0 +1,2 @@
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANGUAGE-validation.cmake")
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-basic-result.txt b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-basic-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-basic-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-interface-check.cmake b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-interface-check.cmake
new file mode 100644
index 0000000..8313de6
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-interface-check.cmake
@@ -0,0 +1,4 @@
+
+set (TYPE INTERFACE)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANGUAGE-validation.cmake")
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-interface-result.txt b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-interface-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-interface-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-validation.cmake b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-validation.cmake
new file mode 100644
index 0000000..298564e
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE-validation.cmake
@@ -0,0 +1,20 @@
+
+if (NOT VALID_LANG)
+ set (VALID_LANG C)
+endif()
+if (NOT INVALID_LANG)
+ set (INVALID_LANG CXX)
+endif()
+if (NOT TYPE)
+ set (TYPE EXE)
+endif()
+
+if (NOT actual_stdout MATCHES "DIR_${VALID_LANG}_${TYPE}")
+ set (RunCMake_TEST_FAILED "Not found expected 'DIR_${VALID_LANG}_${TYPE}'.")
+endif()
+if (actual_stdout MATCHES "DIR_${INVALID_LANG}_${TYPE}")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'DIR_${INVALID_LANG}_${TYPE}'.")
+endif()
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE.cmake b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE.cmake
new file mode 100644
index 0000000..1f266b1
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANGUAGE.cmake
@@ -0,0 +1,23 @@
+
+enable_language(C)
+enable_language(CXX)
+
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+set(CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES FALSE)
+set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES FALSE)
+
+add_library(LinkDirs_interface INTERFACE)
+target_link_directories (LinkDirs_interface INTERFACE "$<$<LINK_LANGUAGE:C>:/DIR_C_INTERFACE>"
+ "$<$<LINK_LANGUAGE:CXX>:/DIR_CXX_INTERFACE>")
+
+add_executable(LinkDirs_exe_interface exe.c)
+target_link_libraries (LinkDirs_exe_interface PRIVATE LinkDirs_interface)
+
+add_executable(LinkDirs_exe_c exe.c)
+target_link_directories (LinkDirs_exe_c PRIVATE "$<$<LINK_LANGUAGE:C>:/DIR_C_EXE>"
+ "$<$<LINK_LANGUAGE:CXX>:/DIR_CXX_EXE>")
+
+add_executable(LinkDirs_exe_cxx exe.c)
+target_link_directories (LinkDirs_exe_cxx PRIVATE "$<$<LINK_LANGUAGE:C>:/DIR_C_EXE>"
+ "$<$<LINK_LANGUAGE:CXX>:/DIR_CXX_EXE>")
+set_property (TARGET LinkDirs_exe_cxx PROPERTY LINKER_LANGUAGE CXX)
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-check.cmake b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-check.cmake
new file mode 100644
index 0000000..ed4f851
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-check.cmake
@@ -0,0 +1,5 @@
+
+set (VALID_LANG CXX)
+set (INVALID_LANG C)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANG_AND_ID-validation.cmake")
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-result.txt b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-basic-check.cmake b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-basic-check.cmake
new file mode 100644
index 0000000..6bddee1
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-basic-check.cmake
@@ -0,0 +1,2 @@
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANG_AND_ID-validation.cmake")
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-basic-result.txt b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-basic-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-basic-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-interface-check.cmake b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-interface-check.cmake
new file mode 100644
index 0000000..a328738
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-interface-check.cmake
@@ -0,0 +1,4 @@
+
+set (TYPE INTERFACE)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANG_AND_ID-validation.cmake")
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-interface-result.txt b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-interface-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-interface-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-validation.cmake b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-validation.cmake
new file mode 100644
index 0000000..9872953
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID-validation.cmake
@@ -0,0 +1,26 @@
+
+if (NOT VALID_LANG)
+ set (VALID_LANG C)
+endif()
+if (NOT INVALID_LANG)
+ set (INVALID_LANG CXX)
+endif()
+if (NOT TYPE)
+ set (TYPE EXE)
+endif()
+
+if (NOT actual_stdout MATCHES "DIR_${VALID_LANG}_${TYPE}")
+ set (RunCMake_TEST_FAILED "Not found expected 'DIR_${VALID_LANG}_${TYPE}'.\n")
+endif()
+if (actual_stdout MATCHES "DIR_${INVALID_LANG}_${TYPE}")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'DIR_${INVALID_LANG}_${TYPE} '.")
+endif()
+if (actual_stdout MATCHES "DIR_(${VALID_LANG}|${INVALID_LANG})_BADID_${TYPE}")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'DIR_(${VALID_LANG}|${INVALID_LANG})_BADID_${TYPE}'.")
+endif()
diff --git a/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID.cmake b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID.cmake
new file mode 100644
index 0000000..eb3b342
--- /dev/null
+++ b/Tests/RunCMake/target_link_directories/genex_LINK_LANG_AND_ID.cmake
@@ -0,0 +1,29 @@
+
+enable_language(C)
+enable_language(CXX)
+
+set(CMAKE_VERBOSE_MAKEFILE TRUE)
+set(CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES FALSE)
+set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES FALSE)
+
+add_library(LinkDirs_interface INTERFACE)
+target_link_directories (LinkDirs_interface INTERFACE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:/DIR_C_INTERFACE>
+ $<$<LINK_LANG_AND_ID:CXX,${CMAKE_CXX_COMPILER_ID}>:/DIR_CXX_INTERFACE>
+ $<$<LINK_LANG_AND_ID:C,BADID>:/DIR_C_BADID_INTERFACE>
+ $<$<LINK_LANG_AND_ID:CXX,BADID>:/DIR_CXX_BADID_INTERFACE>)
+
+add_executable(LinkDirs_exe_interface exe.c)
+target_link_libraries (LinkDirs_exe_interface PRIVATE LinkDirs_interface)
+
+add_executable(LinkDirs_exe_c exe.c)
+target_link_options (LinkDirs_exe_c PRIVATE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:/DIR_C_EXE>
+ $<$<LINK_LANG_AND_ID:CXX,${CMAKE_CXX_COMPILER_ID}>:/DIR_CXX_EXE>
+ $<$<LINK_LANG_AND_ID:C,BADID>:/DIR_C_BADID_EXE>
+ $<$<LINK_LANG_AND_ID:CXX,BADID>:/DIR_CXX_BADID_EXE>)
+
+add_executable(LinkDirs_exe_cxx exe.c)
+target_link_directories (LinkDirs_exe_cxx PRIVATE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:/DIR_C_EXE>
+ $<$<LINK_LANG_AND_ID:CXX,${CMAKE_CXX_COMPILER_ID}>:/DIR_CXX_EXE>
+ $<$<LINK_LANG_AND_ID:C,BADID>:/DIR_C_BADID_EXE>
+ $<$<LINK_LANG_AND_ID:CXX,BADID>:/DIR_CXX_BADID_EXE>)
+set_property (TARGET LinkDirs_exe_cxx PROPERTY LINKER_LANGUAGE CXX)
diff --git a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
index 8eed986..fb223ab 100644
--- a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake
@@ -28,3 +28,57 @@ run_cmake(StaticPrivateDepNotExported)
run_cmake(StaticPrivateDepNotTarget)
run_cmake(UNKNOWN-IMPORTED-GLOBAL)
run_cmake(empty_keyword_args)
+run_cmake(genex_LINK_LANGUAGE-bad-usage)
+
+if (RunCMake_GENERATOR MATCHES "Makefiles|Ninja|Visual Studio|Xcode|Watcom WMake")
+
+ run_cmake(genex_LINK_LANGUAGE-bad-mix-lang)
+ run_cmake(genex_LINK_LANG_AND_ID-bad-mix-lang)
+
+ macro(run_cmake_target test subtest target)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(${test}-${subtest} ${CMAKE_COMMAND} --build . --target ${target} ${ARGN})
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ endmacro()
+
+ set(RunCMake_TEST_OUTPUT_MERGE TRUE)
+ if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release)
+ endif()
+
+ run_cmake(genex_LINK_LANGUAGE)
+
+ run_cmake_target(genex_LINK_LANGUAGE lib LinkLibraries_lib --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE lib2 LinkLibraries_lib2 --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE lib3 LinkLibraries_lib3 --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE exe LinkLibraries_exe --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE C_import LinkLibraries_C_import --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE CXX_import LinkLibraries_CXX_import --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE C_interface LinkLibraries_C_interface --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE CXX_interface LinkLibraries_CXX_interface --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE C_interface2 LinkLibraries_C_interface2 --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE CXX_interface2 LinkLibraries_CXX_interface2 --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE C_static LinkLibraries_C_static --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE CXX_static LinkLibraries_CXX_static --config Release)
+
+ run_cmake(genex_LINK_LANG_AND_ID)
+
+ run_cmake_target(genex_LINK_LANG_AND_ID lib LinkLibraries_lib --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID lib2 LinkLibraries_lib2 --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID lib3 LinkLibraries_lib3 --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID exe LinkLibraries_exe --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID C_import LinkLibraries_C_import --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID CXX_import LinkLibraries_CXX_import --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID C_interface LinkLibraries_C_interface --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID CXX_interface LinkLibraries_CXX_interface --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID C_interface2 LinkLibraries_C_interface2 --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID CXX_interface2 LinkLibraries_CXX_interface2 --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID CXX_static LinkLibraries_CXX_static --config Release)
+
+ unset(RunCMake_TEST_OPTIONS)
+ unset(RunCMake_TEST_OUTPUT_MERGE)
+
+endif()
diff --git a/Tests/RunCMake/target_link_libraries/func.c b/Tests/RunCMake/target_link_libraries/func.c
new file mode 100644
index 0000000..415a9bf
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/func.c
@@ -0,0 +1,7 @@
+
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+ void func_c()
+{
+}
diff --git a/Tests/RunCMake/target_link_libraries/func.cxx b/Tests/RunCMake/target_link_libraries/func.cxx
new file mode 100644
index 0000000..a12caca
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/func.cxx
@@ -0,0 +1,7 @@
+
+#if defined(_WIN32)
+__declspec(dllexport)
+#endif
+ void func_cxx()
+{
+}
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-mix-lang-result.txt b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-mix-lang-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-mix-lang-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-mix-lang-stderr.txt b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-mix-lang-stderr.txt
new file mode 100644
index 0000000..2ecdc0c
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-mix-lang-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error: Evaluation of \$<LINK_LANGUAGE:...> or \$<LINK_LAND_AND_ID:...> changes
+the linker language for target "LinkLibraries_bad_mix_languages" \(from 'C' to 'CXX'\) which is invalid.
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-mix-lang.cmake b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-mix-lang.cmake
new file mode 100644
index 0000000..e8efa75
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-mix-lang.cmake
@@ -0,0 +1,8 @@
+
+enable_language(C)
+enable_language(CXX)
+
+add_library(static_CXX STATIC func.cxx)
+
+add_executable(LinkLibraries_bad_mix_languages main.c)
+target_link_libraries (LinkLibraries_bad_mix_languages PRIVATE $<$<LINK_LANGUAGE:C>:static_CXX>)
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-usage-result.txt b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-usage-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-usage-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-usage-stderr.txt b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-usage-stderr.txt
new file mode 100644
index 0000000..469f1fe
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-usage-stderr.txt
@@ -0,0 +1,8 @@
+CMake Error at genex_LINK_LANGUAGE-bad-usage.cmake:4 \(target_link_libraries\):
+ Error evaluating generator expression:
+
+ \$<LINK_LANGUAGE>
+
+ \$<LINK_LANGUAGE> is not supported in link libraries expression.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-usage.cmake b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-usage.cmake
new file mode 100644
index 0000000..81cfb0c
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE-bad-usage.cmake
@@ -0,0 +1,4 @@
+enable_language(C)
+
+add_library(simple SHARED empty.c)
+target_link_libraries(simple PRIVATE lib$<LINK_LANGUAGE>)
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE.cmake b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE.cmake
new file mode 100644
index 0000000..f3fe955
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANGUAGE.cmake
@@ -0,0 +1,72 @@
+
+cmake_minimum_required(VERSION 3.16...3.17)
+
+enable_language(C)
+enable_language(CXX)
+
+add_library(shared_C SHARED func.c)
+add_library(shared_CXX SHARED func.cxx)
+
+
+add_library(static1_C STATIC empty.c)
+target_link_libraries (static1_C INTERFACE $<$<LINK_LANGUAGE:C>:shared_C>)
+
+add_library(static2_C STATIC empty.c)
+target_link_libraries (static2_C PRIVATE $<$<LINK_LANGUAGE:C>:shared_C>)
+
+
+set (binary_dir "${CMAKE_BINARY_DIR}")
+get_property (is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+if (is_multi_config)
+ string (APPEND binary_dir "/Release")
+endif()
+add_library(import STATIC IMPORTED)
+set_property(TARGET import PROPERTY IMPORTED_LOCATION "${binary_dir}/${CMAKE_STATIC_LIBRARY_PREFIX}static1_C${CMAKE_STATIC_LIBRARY_SUFFIX}")
+target_link_libraries (import INTERFACE $<$<LINK_LANGUAGE:C>:shared_C>)
+target_link_libraries (import INTERFACE $<$<LINK_LANGUAGE:CXX>:shared_CXX>)
+
+
+add_library(interface INTERFACE)
+target_link_libraries (interface INTERFACE $<$<LINK_LANGUAGE:C>:shared_C>
+ $<$<LINK_LANGUAGE:CXX>:shared_CXX>)
+
+
+add_library(interface2 INTERFACE)
+target_link_libraries (interface2 INTERFACE import)
+
+
+add_library(static3 STATIC empty.c)
+target_link_libraries (static3 PRIVATE interface)
+
+
+add_library(LinkLibraries_lib SHARED lib.c)
+target_link_libraries (LinkLibraries_lib PRIVATE $<$<LINK_LANGUAGE:C>:shared_C>)
+
+add_library(LinkLibraries_lib2 SHARED lib.c)
+target_link_libraries (LinkLibraries_lib2 PRIVATE $<$<LINK_LANGUAGE:C>:static1_C>)
+
+add_library(LinkLibraries_lib3 SHARED lib.c)
+target_link_libraries (LinkLibraries_lib3 PRIVATE $<$<LINK_LANGUAGE:C>:static2_C>)
+
+add_executable(LinkLibraries_exe main.c)
+target_link_libraries (LinkLibraries_exe PRIVATE $<$<LINK_LANGUAGE:C>:shared_C>)
+
+add_executable(LinkLibraries_C_import main.c)
+target_link_libraries (LinkLibraries_C_import PRIVATE import)
+add_executable(LinkLibraries_CXX_import main.cxx)
+target_link_libraries (LinkLibraries_CXX_import PRIVATE import)
+
+add_executable(LinkLibraries_C_interface main.c)
+target_link_libraries (LinkLibraries_C_interface PRIVATE interface)
+add_executable(LinkLibraries_CXX_interface main.cxx)
+target_link_libraries (LinkLibraries_CXX_interface PRIVATE interface)
+
+add_executable(LinkLibraries_C_interface2 main.c)
+target_link_libraries (LinkLibraries_C_interface2 PRIVATE interface2)
+add_executable(LinkLibraries_CXX_interface2 main.cxx)
+target_link_libraries (LinkLibraries_CXX_interface2 PRIVATE interface2)
+
+add_executable(LinkLibraries_C_static main.c)
+target_link_libraries (LinkLibraries_C_static PRIVATE static3)
+add_executable(LinkLibraries_CXX_static main.cxx)
+target_link_libraries (LinkLibraries_CXX_static PRIVATE static3)
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-bad-mix-lang-result.txt b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-bad-mix-lang-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-bad-mix-lang-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-bad-mix-lang-stderr.txt b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-bad-mix-lang-stderr.txt
new file mode 100644
index 0000000..2ecdc0c
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-bad-mix-lang-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error: Evaluation of \$<LINK_LANGUAGE:...> or \$<LINK_LAND_AND_ID:...> changes
+the linker language for target "LinkLibraries_bad_mix_languages" \(from 'C' to 'CXX'\) which is invalid.
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-bad-mix-lang.cmake b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-bad-mix-lang.cmake
new file mode 100644
index 0000000..f80010a
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-bad-mix-lang.cmake
@@ -0,0 +1,8 @@
+
+enable_language(C)
+enable_language(CXX)
+
+add_library(static_CXX STATIC func.cxx)
+
+add_executable(LinkLibraries_bad_mix_languages main.c)
+target_link_libraries (LinkLibraries_bad_mix_languages PRIVATE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:static_CXX>)
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-basic-result.txt b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-basic-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-basic-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-exe_c-result.txt b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-exe_c-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-exe_c-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-exe_cxx-result.txt b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-exe_cxx-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-exe_cxx-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-interface-result.txt b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-interface-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-interface-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-no_language-result.txt b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-no_language-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID-no_language-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID.cmake b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID.cmake
new file mode 100644
index 0000000..9feccd0
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/genex_LINK_LANG_AND_ID.cmake
@@ -0,0 +1,73 @@
+
+cmake_minimum_required(VERSION 3.16...3.17)
+
+enable_language(C)
+enable_language(CXX)
+
+
+add_library(shared_C SHARED func.c)
+add_library(shared_CXX SHARED func.cxx)
+
+
+add_library(static1_C STATIC empty.c)
+target_link_libraries (static1_C INTERFACE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:shared_C>)
+
+add_library(static2_C STATIC empty.c)
+target_link_libraries (static2_C PRIVATE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:shared_C>)
+
+
+set (binary_dir "${CMAKE_BINARY_DIR}")
+get_property (is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+if (is_multi_config)
+ string (APPEND binary_dir "/Release")
+endif()
+add_library(import STATIC IMPORTED)
+set_property(TARGET import PROPERTY IMPORTED_LOCATION "${binary_dir}/${CMAKE_STATIC_LIBRARY_PREFIX}static1_C${CMAKE_STATIC_LIBRARY_SUFFIX}")
+target_link_libraries (import INTERFACE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:shared_C>)
+target_link_libraries (import INTERFACE $<$<LINK_LANG_AND_ID:CXX,${CMAKE_CXX_COMPILER_ID}>:shared_CXX>)
+
+
+add_library(interface INTERFACE)
+target_link_libraries (interface INTERFACE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:shared_C>
+ $<$<LINK_LANG_AND_ID:CXX,${CMAKE_CXX_COMPILER_ID}>:shared_CXX>)
+
+
+add_library(interface2 INTERFACE)
+target_link_libraries (interface2 INTERFACE import)
+
+
+add_library(static3 STATIC empty.c)
+target_link_libraries (static3 PRIVATE interface)
+
+
+add_library(LinkLibraries_lib SHARED lib.c)
+target_link_libraries (LinkLibraries_lib PRIVATE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:shared_C>)
+
+add_library(LinkLibraries_lib2 SHARED lib.c)
+target_link_libraries (LinkLibraries_lib2 PRIVATE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:static1_C>)
+
+add_library(LinkLibraries_lib3 SHARED lib.c)
+target_link_libraries (LinkLibraries_lib3 PRIVATE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:static2_C>)
+
+add_executable(LinkLibraries_exe main.c)
+target_link_libraries (LinkLibraries_exe PRIVATE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:shared_C>)
+
+add_executable(LinkLibraries_C_import main.c)
+target_link_libraries (LinkLibraries_C_import PRIVATE import)
+add_executable(LinkLibraries_CXX_import main.cxx)
+target_link_libraries (LinkLibraries_CXX_import PRIVATE import)
+
+add_executable(LinkLibraries_C_interface main.c)
+target_link_libraries (LinkLibraries_C_interface PRIVATE interface)
+add_executable(LinkLibraries_CXX_interface main.cxx)
+target_link_libraries (LinkLibraries_CXX_interface PRIVATE interface)
+
+add_executable(LinkLibraries_C_interface2 main.c)
+target_link_libraries (LinkLibraries_C_interface2 PRIVATE interface2)
+add_executable(LinkLibraries_CXX_interface2 main.cxx)
+target_link_libraries (LinkLibraries_CXX_interface2 PRIVATE interface2)
+
+add_executable(LinkLibraries_C_static main.c)
+target_link_libraries (LinkLibraries_C_static PRIVATE static3)
+add_executable(LinkLibraries_CXX_static main.cxx)
+target_link_libraries (LinkLibraries_CXX_static PRIVATE static3)
diff --git a/Tests/RunCMake/target_link_libraries/lib.c b/Tests/RunCMake/target_link_libraries/lib.c
new file mode 100644
index 0000000..b2d1b66
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/lib.c
@@ -0,0 +1,10 @@
+
+#if defined(_WIN32)
+__declspec(dllimport)
+#endif
+ void func_c();
+
+void lib()
+{
+ func_c();
+}
diff --git a/Tests/RunCMake/target_link_libraries/main.c b/Tests/RunCMake/target_link_libraries/main.c
new file mode 100644
index 0000000..a908dea
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/main.c
@@ -0,0 +1,12 @@
+
+#if defined(_WIN32)
+__declspec(dllimport)
+#endif
+ void func_c();
+
+int main()
+{
+ func_c();
+
+ return 0;
+}
diff --git a/Tests/RunCMake/target_link_libraries/main.cxx b/Tests/RunCMake/target_link_libraries/main.cxx
new file mode 100644
index 0000000..ffaa3b4
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/main.cxx
@@ -0,0 +1,12 @@
+
+#if defined(_WIN32)
+__declspec(dllimport)
+#endif
+ void func_cxx();
+
+int main()
+{
+ func_cxx();
+
+ return 0;
+}
diff --git a/Tests/RunCMake/target_link_options/LinkOptionsDevice.cu b/Tests/RunCMake/target_link_options/LinkOptionsDevice.cu
new file mode 100644
index 0000000..96504e1
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/LinkOptionsDevice.cu
@@ -0,0 +1,14 @@
+#include <cuda.h>
+
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ int simplelib()
+{
+ return 0;
+}
+
+int main(void)
+{
+ return simplelib();
+}
diff --git a/Tests/RunCMake/target_link_options/RunCMakeTest.cmake b/Tests/RunCMake/target_link_options/RunCMakeTest.cmake
index cdfdd7b..8ef13f9 100644
--- a/Tests/RunCMake/target_link_options/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_link_options/RunCMakeTest.cmake
@@ -13,8 +13,9 @@ endmacro()
if (NOT CMAKE_C_COMPILER_ID STREQUAL "Intel")
# Intel compiler does not reject bad flags or objects!
set(RunCMake_TEST_OUTPUT_MERGE TRUE)
+ set(RunCMake_TEST_OPTIONS -DCMake_TEST_CUDA=${CMake_TEST_CUDA})
if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
- set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release)
+ list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release)
endif()
run_cmake(LINK_OPTIONS)
@@ -27,6 +28,39 @@ if (NOT CMAKE_C_COMPILER_ID STREQUAL "Intel")
run_cmake_target(LINK_OPTIONS mod LinkOptions_mod --config Release)
run_cmake_target(LINK_OPTIONS exe LinkOptions_exe --config Release)
+
+ run_cmake(genex_LINK_LANGUAGE)
+
+ run_cmake_target(genex_LINK_LANGUAGE interface LinkOptions_shared_interface --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE shared_c LinkOptions_shared_c --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE LINKER_LANGUAGE LinkOptions_shared_cxx --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE mod LinkOptions_mod --config Release)
+ run_cmake_target(genex_LINK_LANGUAGE exe LinkOptions_exe --config Release)
+
+ run_cmake(genex_LINK_LANG_AND_ID)
+
+ run_cmake_target(genex_LINK_LANG_AND_ID interface LinkOptions_shared_interface --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID shared_c LinkOptions_shared_c --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID LINKER_LANGUAGE LinkOptions_shared_cxx --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID mod LinkOptions_mod --config Release)
+ run_cmake_target(genex_LINK_LANG_AND_ID exe LinkOptions_exe --config Release)
+
+ run_cmake(genex_DEVICE_LINK)
+
+ run_cmake_target(genex_DEVICE_LINK interface LinkOptions_shared_interface --config Release)
+ run_cmake_target(genex_DEVICE_LINK private LinkOptions_private --config Release)
+ if (CMake_TEST_CUDA)
+ # Separable compilation is only supported on NVCC.
+ if(NOT CMake_TEST_CUDA STREQUAL "Clang")
+ run_cmake_target(genex_DEVICE_LINK CMP0105_UNSET LinkOptions_CMP0105_UNSET --config Release)
+ run_cmake_target(genex_DEVICE_LINK CMP0105_OLD LinkOptions_CMP0105_OLD --config Release)
+ run_cmake_target(genex_DEVICE_LINK CMP0105_NEW LinkOptions_CMP0105_NEW --config Release)
+ run_cmake_target(genex_DEVICE_LINK device LinkOptions_device --config Release)
+ endif()
+
+ run_cmake_target(genex_DEVICE_LINK no_device LinkOptions_no_device --config Release)
+ endif()
+
unset(RunCMake_TEST_OPTIONS)
unset(RunCMake_TEST_OUTPUT_MERGE)
endif()
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-CMP0105_NEW-check.cmake b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-CMP0105_NEW-check.cmake
new file mode 100644
index 0000000..20c4fab
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-CMP0105_NEW-check.cmake
@@ -0,0 +1,4 @@
+
+if (NOT actual_stdout MATCHES "BADFLAG_DEVICE_LINK")
+ set (RunCMake_TEST_FAILED "Not found expected 'BADFLAG_DEVICE_LINK'.")
+endif()
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-CMP0105_NEW-result.txt b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-CMP0105_NEW-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-CMP0105_NEW-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-device-check.cmake b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-device-check.cmake
new file mode 100644
index 0000000..23c3b46
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-device-check.cmake
@@ -0,0 +1,3 @@
+set (DEVICE_LINK TRUE)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_DEVICE_LINK-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-device-result.txt b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-device-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-device-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-interface-check.cmake b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-interface-check.cmake
new file mode 100644
index 0000000..8431e22
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-interface-check.cmake
@@ -0,0 +1,3 @@
+set (DEVICE_LINK FALSE)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_DEVICE_LINK-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-interface-result.txt b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-interface-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-interface-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-no_device-check.cmake b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-no_device-check.cmake
new file mode 100644
index 0000000..8431e22
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-no_device-check.cmake
@@ -0,0 +1,3 @@
+set (DEVICE_LINK FALSE)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_DEVICE_LINK-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-no_device-result.txt b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-no_device-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-no_device-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-private-check.cmake b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-private-check.cmake
new file mode 100644
index 0000000..8431e22
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-private-check.cmake
@@ -0,0 +1,3 @@
+set (DEVICE_LINK FALSE)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_DEVICE_LINK-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-private-result.txt b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-private-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-private-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-validation.cmake b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-validation.cmake
new file mode 100644
index 0000000..28f5d01
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-validation.cmake
@@ -0,0 +1,22 @@
+
+if (NOT DEFINED DEVICE_LINK)
+ set (DEVICE_LINK FALSE)
+endif()
+
+if (DEVICE_LINK)
+ set (VALID_ID DEVICE_LINK)
+ set (INVALID_ID NORMAL_LINK)
+else()
+ set (VALID_ID NORMAL_LINK)
+ set (INVALID_ID DEVICE_LINK)
+endif()
+
+if (NOT actual_stdout MATCHES "BADFLAG_${VALID_ID}")
+ set (RunCMake_TEST_FAILED "Not found expected 'BADFLAG_${VALID_ID}'.")
+endif()
+if (actual_stdout MATCHES "BADFLAG_${INVALID_ID}")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_${INVALID_ID}'.")
+endif()
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK.cmake b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK.cmake
new file mode 100644
index 0000000..4d0c02f
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK.cmake
@@ -0,0 +1,48 @@
+
+enable_language(C)
+
+set (obj "${CMAKE_C_OUTPUT_EXTENSION}")
+if(BORLAND)
+ set(pre -)
+endif()
+
+add_library(LinkOptions_interface INTERFACE)
+target_link_options (LinkOptions_interface INTERFACE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>
+ $<HOST_LINK:${pre}BADFLAG_NORMAL_LINK${obj}>)
+
+add_library(LinkOptions_shared_interface SHARED LinkOptionsLib.c)
+target_link_libraries (LinkOptions_shared_interface PRIVATE LinkOptions_interface)
+
+
+add_library(LinkOptions_private SHARED LinkOptionsLib.c)
+target_link_options (LinkOptions_private PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>
+ $<HOST_LINK:${pre}BADFLAG_NORMAL_LINK${obj}>)
+
+if (CMake_TEST_CUDA)
+ enable_language(CUDA)
+
+ add_executable(LinkOptions_CMP0105_UNSET LinkOptionsDevice.cu)
+ set_property(TARGET LinkOptions_CMP0105_UNSET PROPERTY CUDA_SEPARABLE_COMPILATION ON)
+ target_link_options(LinkOptions_CMP0105_UNSET PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>)
+
+ cmake_policy(SET CMP0105 OLD)
+
+ add_executable(LinkOptions_CMP0105_OLD LinkOptionsDevice.cu)
+ set_property(TARGET LinkOptions_CMP0105_OLD PROPERTY CUDA_SEPARABLE_COMPILATION ON)
+ target_link_options(LinkOptions_CMP0105_OLD PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>)
+
+ cmake_policy(SET CMP0105 NEW)
+
+ add_executable(LinkOptions_CMP0105_NEW LinkOptionsDevice.cu)
+ set_property(TARGET LinkOptions_CMP0105_NEW PROPERTY CUDA_SEPARABLE_COMPILATION ON)
+ target_link_options(LinkOptions_CMP0105_NEW PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>)
+
+ add_executable(LinkOptions_device LinkOptionsDevice.cu)
+ set_property(TARGET LinkOptions_device PROPERTY CUDA_SEPARABLE_COMPILATION ON)
+ target_link_options(LinkOptions_device PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>
+ $<HOST_LINK:${pre}BADFLAG_NORMAL_LINK${obj}>)
+
+ add_executable(LinkOptions_no_device LinkOptionsDevice.cu)
+ target_link_options(LinkOptions_no_device PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}>
+ $<HOST_LINK:${pre}BADFLAG_NORMAL_LINK${obj}>)
+endif()
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-LINKER_LANGUAGE-check.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-LINKER_LANGUAGE-check.cmake
new file mode 100644
index 0000000..aa39810
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-LINKER_LANGUAGE-check.cmake
@@ -0,0 +1,5 @@
+
+set (VALID_LANG CXX)
+set (INVALID_LANG C)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANGUAGE-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-LINKER_LANGUAGE-result.txt b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-LINKER_LANGUAGE-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-LINKER_LANGUAGE-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-exe-check.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-exe-check.cmake
new file mode 100644
index 0000000..71f641d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-exe-check.cmake
@@ -0,0 +1,2 @@
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANGUAGE-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-exe-result.txt b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-exe-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-exe-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-interface-check.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-interface-check.cmake
new file mode 100644
index 0000000..ba0120c
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-interface-check.cmake
@@ -0,0 +1,5 @@
+
+set (VALID_LANG C)
+set (INVALID_LANG CXX)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANGUAGE-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-interface-result.txt b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-interface-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-interface-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-mod-check.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-mod-check.cmake
new file mode 100644
index 0000000..71f641d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-mod-check.cmake
@@ -0,0 +1,2 @@
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANGUAGE-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-mod-result.txt b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-mod-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-mod-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-shared_c-check.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-shared_c-check.cmake
new file mode 100644
index 0000000..ba0120c
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-shared_c-check.cmake
@@ -0,0 +1,5 @@
+
+set (VALID_LANG C)
+set (INVALID_LANG CXX)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANGUAGE-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-shared_c-result.txt b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-shared_c-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-shared_c-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-validation.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-validation.cmake
new file mode 100644
index 0000000..f0237ab
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE-validation.cmake
@@ -0,0 +1,17 @@
+
+if (NOT DEFINED VALID_LANG)
+ set (VALID_LANG C)
+endif()
+if (NOT DEFINED INVALID_LANG)
+ set (INVALID_LANG CXX)
+endif()
+
+if (NOT actual_stdout MATCHES "BADFLAG_${VALID_LANG}_LANG")
+ set (RunCMake_TEST_FAILED "Not found expected 'BADFLAG_${VALID_LANG}_LANG'.")
+endif()
+if (actual_stdout MATCHES "BADFLAG_${INVALID_LANG}_LANG")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_${INVALID_LANG}_LANG'.")
+endif()
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE.cmake
new file mode 100644
index 0000000..61e6159
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANGUAGE.cmake
@@ -0,0 +1,32 @@
+
+enable_language(C)
+enable_language(CXX)
+
+set (obj "${CMAKE_C_OUTPUT_EXTENSION}")
+if(BORLAND)
+ set(pre -)
+endif()
+
+add_library(LinkOptions_interface INTERFACE)
+target_link_options (LinkOptions_interface INTERFACE $<$<LINK_LANGUAGE:C>:${pre}BADFLAG_$<LINK_LANGUAGE>_LANG${obj}>
+ $<$<LINK_LANGUAGE:CXX>:${pre}BADFLAG_$<LINK_LANGUAGE>_LANG${obj}>)
+
+add_library(LinkOptions_shared_interface SHARED LinkOptionsLib.c)
+target_link_libraries (LinkOptions_shared_interface PRIVATE LinkOptions_interface)
+
+add_library(LinkOptions_shared_c SHARED LinkOptionsLib.c)
+target_link_options (LinkOptions_shared_c PRIVATE $<$<LINK_LANGUAGE:C>:${pre}BADFLAG_$<LINK_LANGUAGE>_LANG${obj}>
+ $<$<LINK_LANGUAGE:CXX>:${pre}BADFLAG_$<LINK_LANGUAGE>_LANG${obj}>)
+
+add_library(LinkOptions_shared_cxx SHARED LinkOptionsLib.c)
+target_link_options (LinkOptions_shared_cxx PRIVATE $<$<LINK_LANGUAGE:C>:${pre}BADFLAG_$<LINK_LANGUAGE>_LANG${obj}>
+ $<$<LINK_LANGUAGE:CXX>:${pre}BADFLAG_$<LINK_LANGUAGE>_LANG${obj}>)
+set_property (TARGET LinkOptions_shared_cxx PROPERTY LINKER_LANGUAGE CXX)
+
+add_library(LinkOptions_mod MODULE LinkOptionsLib.c)
+target_link_options (LinkOptions_mod PRIVATE $<$<LINK_LANGUAGE:C>:${pre}BADFLAG_$<LINK_LANGUAGE>_LANG${obj}>
+ $<$<LINK_LANGUAGE:CXX>:${pre}BADFLAG_$<LINK_LANGUAGE>_LANG${obj}>)
+
+add_executable(LinkOptions_exe LinkOptionsExe.c)
+target_link_options (LinkOptions_exe PRIVATE $<$<LINK_LANGUAGE:C>:${pre}BADFLAG_$<LINK_LANGUAGE>_LANG${obj}>
+ $<$<LINK_LANGUAGE:CXX>:${pre}BADFLAG_$<LINK_LANGUAGE>_LANG${obj}>)
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-check.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-check.cmake
new file mode 100644
index 0000000..ed4f851
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-check.cmake
@@ -0,0 +1,5 @@
+
+set (VALID_LANG CXX)
+set (INVALID_LANG C)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANG_AND_ID-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-result.txt b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-LINKER_LANGUAGE-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-exe-check.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-exe-check.cmake
new file mode 100644
index 0000000..6bddee1
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-exe-check.cmake
@@ -0,0 +1,2 @@
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANG_AND_ID-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-exe-result.txt b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-exe-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-exe-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-interface-check.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-interface-check.cmake
new file mode 100644
index 0000000..cf498d9
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-interface-check.cmake
@@ -0,0 +1,5 @@
+
+set (VALID_LANG C)
+set (INVALID_LANG CXX)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANG_AND_ID-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-interface-result.txt b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-interface-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-interface-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-mod-check.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-mod-check.cmake
new file mode 100644
index 0000000..6bddee1
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-mod-check.cmake
@@ -0,0 +1,2 @@
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANG_AND_ID-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-mod-result.txt b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-mod-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-mod-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-shared_c-check.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-shared_c-check.cmake
new file mode 100644
index 0000000..cf498d9
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-shared_c-check.cmake
@@ -0,0 +1,5 @@
+
+set (VALID_LANG C)
+set (INVALID_LANG CXX)
+
+include ("${CMAKE_CURRENT_LIST_DIR}/genex_LINK_LANG_AND_ID-validation.cmake")
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-shared_c-result.txt b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-shared_c-result.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-shared_c-result.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-validation.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-validation.cmake
new file mode 100644
index 0000000..a5dc27f
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID-validation.cmake
@@ -0,0 +1,23 @@
+
+if (NOT VALID_LANG)
+ set (VALID_LANG C)
+endif()
+if (NOT INVALID_LANG)
+ set (INVALID_LANG CXX)
+endif()
+
+if (NOT actual_stdout MATCHES "BADFLAG_${VALID_LANG}_LANG_ID")
+ set (RunCMake_TEST_FAILED "Not found expected 'BADFLAG_${VALID_LANG}_LANG_ID'.\n")
+endif()
+if (actual_stdout MATCHES "BADFLAG_${INVALID_LANG}_LANG_ID")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_${INVALID_LANG}_LANG_ID '.")
+endif()
+if (actual_stdout MATCHES "BADFLAG_(${VALID_LANG}|${INVALID_LANG})_BADID")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_(${VALID_LANG}|${INVALID_LANG})_BADID'.")
+endif()
diff --git a/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID.cmake b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID.cmake
new file mode 100644
index 0000000..db0f500
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_LINK_LANG_AND_ID.cmake
@@ -0,0 +1,41 @@
+
+enable_language(C)
+enable_language(CXX)
+
+if(BORLAND)
+ set(pre -)
+endif()
+
+add_library(LinkOptions_interface INTERFACE)
+target_link_options (LinkOptions_interface INTERFACE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:${pre}BADFLAG_C_LANG_ID${CMAKE_C_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:CXX,${CMAKE_CXX_COMPILER_ID}>:${pre}BADFLAG_CXX_LANG_ID${CMAKE_CXX_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:C,BADID>:${pre}BADFLAG_C_BADID${CMAKE_C_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:CXX,BADID>:${pre}BADFLAG_CXX_BADID${CMAKE_CXX_OUTPUT_EXTENSION}>)
+
+add_library(LinkOptions_shared_interface SHARED LinkOptionsLib.c)
+target_link_libraries (LinkOptions_shared_interface PRIVATE LinkOptions_interface)
+
+add_library(LinkOptions_shared_c SHARED LinkOptionsLib.c)
+target_link_options (LinkOptions_shared_c PRIVATE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:${pre}BADFLAG_C_LANG_ID${CMAKE_C_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:CXX,${CMAKE_CXX_COMPILER_ID}>:${pre}BADFLAG_CXX_LANG_ID${CMAKE_CXX_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:C,BADID>:${pre}BADFLAG_C_BADID${CMAKE_C_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:CXX,BADID>:${pre}BADFLAG_CXX_BADID${CMAKE_CXX_OUTPUT_EXTENSION}>)
+
+add_library(LinkOptions_shared_cxx SHARED LinkOptionsLib.c)
+target_link_options (LinkOptions_shared_cxx PRIVATE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:${pre}BADFLAG_C_LANG_ID${CMAKE_C_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:CXX,${CMAKE_CXX_COMPILER_ID}>:${pre}BADFLAG_CXX_LANG_ID${CMAKE_CXX_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:C,BADID>:${pre}BADFLAG_C_BADID${CMAKE_C_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:CXX,BADID>:${pre}BADFLAG_CXX_BADID${CMAKE_CXX_OUTPUT_EXTENSION}>)
+set_property (TARGET LinkOptions_shared_cxx PROPERTY LINKER_LANGUAGE CXX)
+
+add_library(LinkOptions_mod MODULE LinkOptionsLib.c)
+target_link_options (LinkOptions_mod PRIVATE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:${pre}BADFLAG_C_LANG_ID${CMAKE_C_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:CXX,${CMAKE_CXX_COMPILER_ID}>:${pre}BADFLAG_CXX_LANG_ID${CMAKE_CXX_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:C,BADID>:${pre}BADFLAG_C_BADID${CMAKE_C_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:CXX,BADID>:${pre}BADFLAG_CXX_BADID${CMAKE_CXX_OUTPUT_EXTENSION}>)
+
+add_executable(LinkOptions_exe LinkOptionsExe.c)
+target_link_options (LinkOptions_exe PRIVATE $<$<LINK_LANG_AND_ID:C,${CMAKE_C_COMPILER_ID}>:${pre}BADFLAG_C_LANG_ID${CMAKE_C_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:CXX,${CMAKE_CXX_COMPILER_ID}>:${pre}BADFLAG_CXX_LANG_ID${CMAKE_CXX_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:C,BADID>:${pre}BADFLAG_C_BADID${CMAKE_C_OUTPUT_EXTENSION}>
+ $<$<LINK_LANG_AND_ID:CXX,BADID>:${pre}BADFLAG_CXX_BADID${CMAKE_CXX_OUTPUT_EXTENSION}>)