summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/BuildDepends/CMakeLists.txt22
-rw-r--r--Tests/BuildDepends/Project/CMakeLists.txt8
-rw-r--r--Tests/CMakeLists.txt27
-rw-r--r--Tests/CMakeOnly/AllFindModules/CMakeLists.txt2
-rw-r--r--Tests/CMakeTests/ListTest.cmake.in23
-rw-r--r--Tests/CPackNSISGenerator/CMakeLists.txt1
-rw-r--r--Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake8
-rw-r--r--Tests/CSharpOnly/CMakeLists.txt4
-rw-r--r--Tests/CSharpOnly/csharponly.cs4
-rw-r--r--Tests/CSharpOnly/nested/lib1.cs13
-rw-r--r--Tests/Cuda/CXXStandardSetTwice/CMakeLists.txt3
-rw-r--r--Tests/Cuda/Complex/CMakeLists.txt2
-rw-r--r--Tests/Cuda/MixedStandardLevels1/CMakeLists.txt3
-rw-r--r--Tests/Cuda/MixedStandardLevels2/CMakeLists.txt3
-rw-r--r--Tests/Cuda/MixedStandardLevels3/CMakeLists.txt2
-rw-r--r--Tests/Cuda/MixedStandardLevels4/CMakeLists.txt3
-rw-r--r--Tests/Cuda/MixedStandardLevels5/CMakeLists.txt3
-rw-r--r--Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt2
-rw-r--r--Tests/Cuda/WithC/CMakeLists.txt2
-rw-r--r--Tests/CudaOnly/Architecture/CMakeLists.txt5
-rw-r--r--Tests/CudaOnly/Architecture/main.cu9
-rw-r--r--Tests/CudaOnly/CMakeLists.txt2
-rw-r--r--Tests/CudaOnly/CircularLinkLine/CMakeLists.txt2
-rw-r--r--Tests/CudaOnly/CompileFlags/CMakeLists.txt16
-rw-r--r--Tests/CudaOnly/CompileFlags/main.cu16
-rw-r--r--Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt2
-rw-r--r--Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt2
-rw-r--r--Tests/CudaOnly/RuntimeControls/CMakeLists.txt3
-rw-r--r--Tests/CudaOnly/SeparateCompilation/CMakeLists.txt4
-rw-r--r--Tests/CudaOnly/Standard98/CMakeLists.txt2
-rw-r--r--Tests/CudaOnly/WithDefs/CMakeLists.txt13
-rw-r--r--Tests/FindPython/ArtifactsInteractive/CMakeLists.txt24
-rw-r--r--Tests/FindPython/CMakeLists.txt52
-rw-r--r--Tests/FindPython/Python/CMakeLists.txt6
-rw-r--r--Tests/FindPython/Python2/CMakeLists.txt9
-rw-r--r--Tests/FindPython/Python2Embedded/CMakeLists.txt15
-rw-r--r--Tests/FindPython/Python2Module/CMakeLists.txt37
-rw-r--r--Tests/FindPython/Python3/CMakeLists.txt15
-rw-r--r--Tests/FindPython/Python3Embedded/CMakeLists.txt15
-rw-r--r--Tests/FindPython/Python3Module/CMakeLists.txt37
-rw-r--r--Tests/FindRuby/CMakeLists.txt57
-rw-r--r--Tests/FindRuby/Fail/CMakeLists.txt5
-rw-r--r--Tests/FindRuby/FailExact/CMakeLists.txt8
-rw-r--r--Tests/FindRuby/Rvm/CMakeLists.txt75
-rw-r--r--Tests/FindRuby/Rvm/RvmDefault.cmake17
-rw-r--r--Tests/FindRuby/Rvm/RvmOnly.cmake41
-rw-r--r--Tests/FindRuby/Rvm/RvmStandard.cmake9
-rw-r--r--Tests/FindRuby/Test/CMakeLists.txt14
-rw-r--r--Tests/FindRuby/Test/ruby_version.c7
-rw-r--r--Tests/FindX11/Test/CMakeLists.txt11
-rw-r--r--Tests/FortranModules/CMakeLists.txt2
-rw-r--r--Tests/FortranOnly/CMakeLists.txt50
-rw-r--r--Tests/IncludeDirectories/CMakeLists.txt33
-rw-r--r--Tests/IncludeDirectories/main.cpp14
-rw-r--r--Tests/ObjectLibrary/CMakeLists.txt2
-rw-r--r--Tests/ObjectLibrary/Transitive/CMakeLists.txt12
-rw-r--r--Tests/ObjectLibrary/Transitive/FooObject.c4
-rw-r--r--Tests/ObjectLibrary/Transitive/FooStatic.c4
-rw-r--r--Tests/ObjectLibrary/Transitive/Transitive.c7
-rw-r--r--Tests/Preprocess/preprocess.c12
-rw-r--r--Tests/Preprocess/preprocess.cxx15
-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.cmake1
-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/CMakeLists.txt25
-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/CTestResourceAllocation/RunCMakeTest.cmake28
-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/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/test.cmake.in14
-rw-r--r--Tests/RunCMake/CommandLine/E_cat_directory-result.txt (renamed from Tests/RunCMake/Languages/LINK_LANGUAGE-genex-result.txt)0
-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/ProfilingTest-check.cmake18
-rw-r--r--Tests/RunCMake/CommandLine/ProfilingTest.cmake1
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake60
-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/FetchContent/DownloadFile.cmake9
-rw-r--r--Tests/RunCMake/FetchContent/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/FetchContent/dummyFile.txt1
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-check.py4758
-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.json213
-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/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/PkgConfigDoesNotExist-stdout.txt6
-rw-r--r--Tests/RunCMake/FindPkgConfig/PkgConfigDoesNotExist.cmake4
-rw-r--r--Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake2
-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/exportheader_test.cpp6
-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.cmake25
-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.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/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/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/NinjaMultiConfig/CudaSimple.cmake1
-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/Syntax/CommandEOF-stderr.txt2
-rw-r--r--Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt1
-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.cmake5
-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/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/cmake_command/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/cmake_command/RunCMakeTest.cmake13
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_message-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_message.cmake1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-result.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-stderr.txt5
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error.cmake5
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_no_code-result.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_no_code-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_no_code.cmake1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-result.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters.cmake1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message.cmake2
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_invoke_message-stderr.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_invoke_message.cmake1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error-result.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error-stderr.txt5
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error.cmake1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters-result.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters.cmake1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function-result.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function.cmake1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_no_parameters-result.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_no_parameters-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_no_parameters.cmake1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation-result.txt1
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation-stderr.txt2
-rw-r--r--Tests/RunCMake/cmake_command/cmake_command_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/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/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/install/RunCMakeTest.cmake1
-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/pseudo_cppcheck.c3
-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/RunCMakeTest.cmake17
-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
-rw-r--r--Tests/SwiftOnly/CMakeLists.txt24
-rw-r--r--Tests/SwiftOnly/L.swift1
-rw-r--r--Tests/SwiftOnly/M.swift2
-rw-r--r--Tests/SwiftOnly/N.swift2
-rw-r--r--Tests/TryCompile/CMakeLists.txt2
-rw-r--r--Tests/UseSWIG/BasicConfiguration.cmake3
-rw-r--r--Tests/UseSWIG/BasicFortran/CMakeLists.txt23
-rw-r--r--Tests/UseSWIG/CMakeLists.txt15
-rw-r--r--Tests/UseSWIG/runme.f9077
-rw-r--r--Tests/VSWinStorePhone/CMakeLists.txt7
-rw-r--r--Tests/VSWinStorePhone/EnsurePropertiesSet.cmake45
550 files changed, 8488 insertions, 4858 deletions
diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt
index c1ad17c..5ddae83 100644
--- a/Tests/BuildDepends/CMakeLists.txt
+++ b/Tests/BuildDepends/CMakeLists.txt
@@ -368,6 +368,28 @@ is not newer than dependency
${TEST_LINK_DEPENDS}
")
endif()
+
+ set(linkdep3 ${BuildDepends_BINARY_DIR}/Project/linkdep3${CMAKE_EXECUTABLE_SUFFIX})
+ if(${linkdep3} IS_NEWER_THAN ${TEST_LINK_DEPENDS})
+ message("$<LINK_LANGUAGE> in LINK_DEPENDS worked")
+ else()
+ message(SEND_ERROR "$<LINK_LANGUAGE> in LINK_DEPENDS failed. Executable
+ ${linkdep3}
+is not newer than dependency
+ ${TEST_LINK_DEPENDS}
+")
+ endif()
+
+ set(linkdep4 ${BuildDepends_BINARY_DIR}/Project/linkdep4${CMAKE_EXECUTABLE_SUFFIX})
+ if(${linkdep4} IS_NEWER_THAN ${TEST_LINK_DEPENDS})
+ message("$<LINK_LANGUAGE> in INTERFACE_LINK_DEPENDS worked")
+ else()
+ message(SEND_ERROR "$<LINK_LANGUAGE> in INTERFACE_LINK_DEPENDS failed. Executable
+ ${linkdep4}
+is not newer than dependency
+ ${TEST_LINK_DEPENDS}
+")
+ endif()
endif()
if(EXISTS "${link_depends_no_shared_check_txt}")
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index 8338800..83583c9 100644
--- a/Tests/BuildDepends/Project/CMakeLists.txt
+++ b/Tests/BuildDepends/Project/CMakeLists.txt
@@ -118,6 +118,14 @@ if(TEST_LINK_DEPENDS)
set_property(TARGET foo_interface PROPERTY INTERFACE_LINK_DEPENDS $<1:${TEST_LINK_DEPENDS}>)
add_executable(linkdep2 linkdep.cxx)
target_link_libraries(linkdep2 PRIVATE foo_interface)
+
+ add_executable(linkdep3 linkdep.cxx)
+ set_property(TARGET linkdep3 PROPERTY LINK_DEPENDS $<$<LINK_LANGUAGE:CXX>:${TEST_LINK_DEPENDS}>)
+
+ add_library(foo_interface2 INTERFACE)
+ set_property(TARGET foo_interface2 PROPERTY INTERFACE_LINK_DEPENDS $<$<LINK_LANGUAGE:CXX>:${TEST_LINK_DEPENDS}>)
+ add_executable(linkdep4 linkdep.cxx)
+ target_link_libraries(linkdep4 PRIVATE foo_interface2)
endif()
add_library(link_depends_no_shared_lib SHARED link_depends_no_shared_lib.c
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 33c7514..cc2931b 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1478,6 +1478,10 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
add_subdirectory(UseSWIG)
endif()
+ if(CMake_TEST_FindRuby)
+ add_subdirectory(FindRuby)
+ endif()
+
add_subdirectory(FindThreads)
# Matlab module
@@ -1605,7 +1609,7 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
DEPENDS ExternalProjectUpdateSetup )
# do each of the tutorial steps
- function(add_tutorial_test step_name use_mymath)
+ function(add_tutorial_test step_name use_mymath tutorial_arg pass_regex)
set(tutorial_test_name Tutorial${step_name})
set(tutorial_build_dir "${CMake_BINARY_DIR}/Tests/Tutorial/${step_name}")
if (use_mymath)
@@ -1623,19 +1627,28 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
${build_generator_args}
--build-project Tutorial
--build-options ${tutorial_build_options}
- --test-command Tutorial 25.0)
+ --test-command Tutorial ${tutorial_arg})
+ set_tests_properties(${tutorial_test_name} PROPERTIES
+ PASS_REGULAR_EXPRESSION ${pass_regex})
+
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/${tutorial_build_dir}_Build")
endfunction()
if(NOT CMake_TEST_EXTERNAL_CMAKE)
foreach(STP RANGE 2 12)
- add_tutorial_test(Step${STP} TRUE)
+ if (STP EQUAL 6)
+ set(pass_regex ".*using log and exp")
+ else()
+ set(pass_regex "The square root of 25 is 5")
+ endif()
+ add_tutorial_test(Step${STP} TRUE 25 ${pass_regex})
endforeach()
- add_tutorial_test(Complete TRUE)
+ set(pass_regex "The square root of 25 is 5")
+ add_tutorial_test(Complete TRUE 25 ${pass_regex})
foreach(STP RANGE 3 12)
- add_tutorial_test(Step${STP} FALSE)
+ add_tutorial_test(Step${STP} FALSE 25 ${pass_regex})
endforeach()
- add_tutorial_test(Complete FALSE)
+ add_tutorial_test(Complete FALSE 25 ${pass_regex})
endif()
add_test(testing ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE}
@@ -3464,6 +3477,8 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
--build-two-config
${build_generator_args}
--build-project IncludeDirectories
+ --build-options
+ -DMAKE_SUPPORTS_SPACES=${MAKE_SUPPORTS_SPACES}
--test-command IncludeDirectories)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/IncludeDirectories")
diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
index a53e441..49a4041 100644
--- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
+++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
@@ -86,7 +86,7 @@ foreach(VTEST ALSA ARMADILLO BZIP2 CUPS CURL EXPAT FREETYPE GETTEXT GIT HG
endforeach()
foreach(VTEST BISON Boost CUDA DOXYGEN FLEX GIF GTK2
- HDF5 JPEG LibArchive OPENSCENEGRAPH RUBY SWIG Protobuf)
+ HDF5 JPEG LibArchive OPENSCENEGRAPH Ruby RUBY SWIG Protobuf)
check_version_string(${VTEST} ${VTEST}_VERSION)
endforeach()
diff --git a/Tests/CMakeTests/ListTest.cmake.in b/Tests/CMakeTests/ListTest.cmake.in
index f517e64..785f41d 100644
--- a/Tests/CMakeTests/ListTest.cmake.in
+++ b/Tests/CMakeTests/ListTest.cmake.in
@@ -85,6 +85,9 @@ set(result ken bill andy brad)
list(SORT result)
TEST("SORT result" "andy;bill;brad;ken")
+list(SORT result COMPARE NATURAL)
+TEST("SORT result COMPARE NATURAL" "andy;bill;brad;ken")
+
set(result andy bill brad ken)
list(REVERSE result)
TEST("REVERSE result" "ken;brad;bill;andy")
@@ -104,6 +107,26 @@ TEST("REVERSE empty result" "")
list(SORT result)
TEST("SORT empty result" "")
+list(SORT result COMPARE NATURAL)
+TEST("SORT result COMPARE NATURAL" "")
+
+set(result 1.1 10.0 11.0 12.0 12.1 2.0 2.1 3.0 3.1 3.2 8.0 9.0)
+
+list(SORT result COMPARE NATURAL)
+TEST("SORT result COMPARE NATURAL" "1.1;2.0;2.1;3.0;3.1;3.2;8.0;9.0;10.0;11.0;12.0;12.1")
+
+list(SORT result)
+TEST("SORT result" "1.1;10.0;11.0;12.0;12.1;2.0;2.1;3.0;3.1;3.2;8.0;9.0")
+
+list(SORT result COMPARE NATURAL ORDER DESCENDING)
+TEST("SORT result COMPARE NATURAL ORDER DESCENDING" "12.1;12.0;11.0;10.0;9.0;8.0;3.2;3.1;3.0;2.1;2.0;1.1")
+
+set(result b-1.1 a-10.0 c-2.0 d 1 00 0)
+
+list(SORT result COMPARE NATURAL)
+TEST("SORT result COMPARE NATURAL" "00;0;1;a-10.0;b-1.1;c-2.0;d")
+
+
# these trigger top-level condition
foreach(cmd IN ITEMS Append Find Get Insert Length Reverse Remove_At Remove_Duplicates Remove_Item Sort)
set(${cmd}-No-Arguments-RESULT 1)
diff --git a/Tests/CPackNSISGenerator/CMakeLists.txt b/Tests/CPackNSISGenerator/CMakeLists.txt
index b8b2ed6..8ed4d59 100644
--- a/Tests/CPackNSISGenerator/CMakeLists.txt
+++ b/Tests/CPackNSISGenerator/CMakeLists.txt
@@ -16,5 +16,6 @@ set(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}\\\\install.ico")
set(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}\\\\uninstall.ico")
set(CPACK_GENERATOR "NSIS")
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
+set(CPACK_NSIS_MANIFEST_DPI_AWARE ON)
include(CPack)
diff --git a/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake b/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake
index 01b37c5..bfbcf9c 100644
--- a/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake
+++ b/Tests/CPackNSISGenerator/RunCPackVerifyResult.cmake
@@ -44,3 +44,11 @@ message(STATUS "Found the bitmap at index ${output_index}")
if("${output_index}" EQUAL "-1")
message(FATAL_ERROR "MUI_HEADERIMAGE_BITMAP not found in the project")
endif()
+
+file(STRINGS "${project_file}" line REGEX "^ManifestDPIAware true")
+string(FIND "${line}" "true" output_index)
+if("${output_index}" EQUAL "-1")
+ message(FATAL_ERROR "ManifestDPIAware true not found in the project")
+else()
+ message(STATUS "Found DPI-aware")
+endif()
diff --git a/Tests/CSharpOnly/CMakeLists.txt b/Tests/CSharpOnly/CMakeLists.txt
index 82049c7..42cbe2e 100644
--- a/Tests/CSharpOnly/CMakeLists.txt
+++ b/Tests/CSharpOnly/CMakeLists.txt
@@ -2,7 +2,9 @@
project (CSharpOnly CSharp)
# C# does not make any difference between STATIC and SHARED libs
-add_library(lib1 STATIC lib1.cs)
+add_library(lib1 STATIC lib1.cs nested/lib1.cs)
+#without the source group this test will fail to compile
+source_group(nested FILES nested/lib1.cs)
add_library(lib2 SHARED lib2.cs)
add_executable(CSharpOnly csharponly.cs)
diff --git a/Tests/CSharpOnly/csharponly.cs b/Tests/CSharpOnly/csharponly.cs
index ad4641a..3890c82 100644
--- a/Tests/CSharpOnly/csharponly.cs
+++ b/Tests/CSharpOnly/csharponly.cs
@@ -5,10 +5,8 @@ namespace CSharpOnly
public static void Main(string[] args)
{
int val = Lib1.getResult();
-
Lib2 l = new Lib2();
- val = l.myVal;
-
+ val = val + l.myVal + nested.Lib1.getResult();
return;
}
}
diff --git a/Tests/CSharpOnly/nested/lib1.cs b/Tests/CSharpOnly/nested/lib1.cs
new file mode 100644
index 0000000..c2fde4b
--- /dev/null
+++ b/Tests/CSharpOnly/nested/lib1.cs
@@ -0,0 +1,13 @@
+namespace CSharpOnly
+{
+ namespace nested
+ {
+ public class Lib1
+ {
+ public static int getResult()
+ {
+ return 23;
+ }
+ }
+ }
+}
diff --git a/Tests/Cuda/CXXStandardSetTwice/CMakeLists.txt b/Tests/Cuda/CXXStandardSetTwice/CMakeLists.txt
index 1941c49..f4ad83a 100644
--- a/Tests/Cuda/CXXStandardSetTwice/CMakeLists.txt
+++ b/Tests/Cuda/CXXStandardSetTwice/CMakeLists.txt
@@ -1,9 +1,8 @@
cmake_minimum_required(VERSION 3.7)
project(CXXStandardSetTwice CXX CUDA)
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
-
set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CUDA_ARCHITECTURES 30)
add_executable(CXXStandardSetTwice main.cu)
target_compile_features(CXXStandardSetTwice PUBLIC cxx_std_11)
diff --git a/Tests/Cuda/Complex/CMakeLists.txt b/Tests/Cuda/Complex/CMakeLists.txt
index 08d1e16..265bd85 100644
--- a/Tests/Cuda/Complex/CMakeLists.txt
+++ b/Tests/Cuda/Complex/CMakeLists.txt
@@ -15,7 +15,7 @@ project (Complex CXX CUDA)
#and also building cpp targets that need cuda implicit libraries
#verify that we can pass explicit cuda arch flags
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
+set(CMAKE_CUDA_ARCHITECTURES 30)
set(CMAKE_CUDA_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CUDA_STANDARD_REQUIRED TRUE)
diff --git a/Tests/Cuda/MixedStandardLevels1/CMakeLists.txt b/Tests/Cuda/MixedStandardLevels1/CMakeLists.txt
index b03e51e..e40ffa6 100644
--- a/Tests/Cuda/MixedStandardLevels1/CMakeLists.txt
+++ b/Tests/Cuda/MixedStandardLevels1/CMakeLists.txt
@@ -1,10 +1,9 @@
cmake_minimum_required(VERSION 3.7)
project(MixedStandardLevels1 CXX CUDA)
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
-
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CUDA_STANDARD 11)
+set(CMAKE_CUDA_ARCHITECTURES 30)
add_executable(MixedStandardLevels1 main.cu lib.cpp)
diff --git a/Tests/Cuda/MixedStandardLevels2/CMakeLists.txt b/Tests/Cuda/MixedStandardLevels2/CMakeLists.txt
index 12dd328..7af8081 100644
--- a/Tests/Cuda/MixedStandardLevels2/CMakeLists.txt
+++ b/Tests/Cuda/MixedStandardLevels2/CMakeLists.txt
@@ -1,9 +1,8 @@
cmake_minimum_required(VERSION 3.7)
project(MixedStandardLevels2 CXX CUDA)
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
-
set(CMAKE_CXX_STANDARD 17) #this can decay
+set(CMAKE_CUDA_ARCHITECTURES 30)
add_executable(MixedStandardLevels2 main.cu lib.cpp)
target_compile_features(MixedStandardLevels2 PUBLIC cuda_std_11)
diff --git a/Tests/Cuda/MixedStandardLevels3/CMakeLists.txt b/Tests/Cuda/MixedStandardLevels3/CMakeLists.txt
index 2b611be..2c42003 100644
--- a/Tests/Cuda/MixedStandardLevels3/CMakeLists.txt
+++ b/Tests/Cuda/MixedStandardLevels3/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.7)
project(MixedStandardLevels3 CXX CUDA)
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
+set(CMAKE_CUDA_ARCHITECTURES 30)
add_executable(MixedStandardLevels3 main.cu lib.cpp)
target_compile_features(MixedStandardLevels3 PUBLIC cuda_std_03 cxx_std_14)
diff --git a/Tests/Cuda/MixedStandardLevels4/CMakeLists.txt b/Tests/Cuda/MixedStandardLevels4/CMakeLists.txt
index faf6869..230230d 100644
--- a/Tests/Cuda/MixedStandardLevels4/CMakeLists.txt
+++ b/Tests/Cuda/MixedStandardLevels4/CMakeLists.txt
@@ -1,9 +1,8 @@
cmake_minimum_required(VERSION 3.7)
project(MixedStandardLevels4 CXX CUDA)
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
-
set(CMAKE_CUDA_STANDARD 03)
+set(CMAKE_CUDA_ARCHITECTURES 30)
add_executable(MixedStandardLevels4 main.cu lib.cpp)
target_compile_features(MixedStandardLevels4 PUBLIC cxx_std_14)
diff --git a/Tests/Cuda/MixedStandardLevels5/CMakeLists.txt b/Tests/Cuda/MixedStandardLevels5/CMakeLists.txt
index 7209f60..5f5ee06 100644
--- a/Tests/Cuda/MixedStandardLevels5/CMakeLists.txt
+++ b/Tests/Cuda/MixedStandardLevels5/CMakeLists.txt
@@ -1,9 +1,8 @@
cmake_minimum_required(VERSION 3.7)
project(MixedStandardLevels5 CXX CUDA)
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
-
set(CMAKE_CXX_STANDARD 98)
+set(CMAKE_CUDA_ARCHITECTURES 30)
add_executable(MixedStandardLevels5 main.cu lib.cpp)
diff --git a/Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt b/Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt
index cb47b09..fe28c3e 100644
--- a/Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt
+++ b/Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.13)
project(ProperDeviceLibraries CXX CUDA)
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_35,code=compute_35 -gencode arch=compute_35,code=sm_35")
set(CMAKE_CUDA_STANDARD 11)
+set(CMAKE_CUDA_ARCHITECTURES 35)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads)
diff --git a/Tests/Cuda/WithC/CMakeLists.txt b/Tests/Cuda/WithC/CMakeLists.txt
index 69aa3f9..049cbce 100644
--- a/Tests/Cuda/WithC/CMakeLists.txt
+++ b/Tests/Cuda/WithC/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.7)
project(WithC CUDA C)
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
+set(CMAKE_CUDA_ARCHITECTURES 30)
add_executable(CudaWithC main.c cuda.cu)
diff --git a/Tests/CudaOnly/Architecture/CMakeLists.txt b/Tests/CudaOnly/Architecture/CMakeLists.txt
new file mode 100644
index 0000000..7270b56
--- /dev/null
+++ b/Tests/CudaOnly/Architecture/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 3.17)
+project(Architecture CUDA)
+
+set(CMAKE_CUDA_ARCHITECTURES 52)
+add_executable(Architecture main.cu)
diff --git a/Tests/CudaOnly/Architecture/main.cu b/Tests/CudaOnly/Architecture/main.cu
new file mode 100644
index 0000000..8c817d5
--- /dev/null
+++ b/Tests/CudaOnly/Architecture/main.cu
@@ -0,0 +1,9 @@
+#ifdef __CUDA_ARCH__
+# if __CUDA_ARCH__ != 520
+# error "Passed architecture 52, but got something else."
+# endif
+#endif
+
+int main()
+{
+}
diff --git a/Tests/CudaOnly/CMakeLists.txt b/Tests/CudaOnly/CMakeLists.txt
index cc1ee1a..d74e810 100644
--- a/Tests/CudaOnly/CMakeLists.txt
+++ b/Tests/CudaOnly/CMakeLists.txt
@@ -1,5 +1,7 @@
+ADD_TEST_MACRO(CudaOnly.Architecture Architecture)
ADD_TEST_MACRO(CudaOnly.CircularLinkLine CudaOnlyCircularLinkLine)
+ADD_TEST_MACRO(CudaOnly.CompileFlags CudaOnlyCompileFlags)
ADD_TEST_MACRO(CudaOnly.EnableStandard CudaOnlyEnableStandard)
ADD_TEST_MACRO(CudaOnly.ExportPTX CudaOnlyExportPTX)
ADD_TEST_MACRO(CudaOnly.GPUDebugFlag CudaOnlyGPUDebugFlag)
diff --git a/Tests/CudaOnly/CircularLinkLine/CMakeLists.txt b/Tests/CudaOnly/CircularLinkLine/CMakeLists.txt
index 5e6f7ab..e10a348 100644
--- a/Tests/CudaOnly/CircularLinkLine/CMakeLists.txt
+++ b/Tests/CudaOnly/CircularLinkLine/CMakeLists.txt
@@ -5,9 +5,9 @@ project (CircularLinkLine CUDA)
# Verify that we de-duplicate the device link line
# Verify that a de-duplicated link line still works with circular static libraries
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=[compute_30]")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CUDA_STANDARD 11)
+set(CMAKE_CUDA_ARCHITECTURES 30)
add_library(CUDACircularDeviceLinking1 STATIC file1.cu)
add_library(CUDACircularDeviceLinking2 STATIC file2.cu)
diff --git a/Tests/CudaOnly/CompileFlags/CMakeLists.txt b/Tests/CudaOnly/CompileFlags/CMakeLists.txt
new file mode 100644
index 0000000..cbce7d6
--- /dev/null
+++ b/Tests/CudaOnly/CompileFlags/CMakeLists.txt
@@ -0,0 +1,16 @@
+cmake_minimum_required(VERSION 3.17)
+cmake_policy(SET CMP0104 OLD)
+project(CompileFlags CUDA)
+
+# Clear defaults.
+set(CMAKE_CUDA_ARCHITECTURES)
+
+add_executable(CudaOnlyCompileFlags main.cu)
+
+# Try passing CUDA architecture flags explicitly.
+if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA")
+ target_compile_options(CudaOnlyCompileFlags PRIVATE
+ -gencode arch=compute_50,code=compute_50
+ --compiler-options=-DHOST_DEFINE
+ )
+endif()
diff --git a/Tests/CudaOnly/CompileFlags/main.cu b/Tests/CudaOnly/CompileFlags/main.cu
new file mode 100644
index 0000000..573d230
--- /dev/null
+++ b/Tests/CudaOnly/CompileFlags/main.cu
@@ -0,0 +1,16 @@
+#ifdef __CUDA_ARCH__
+# if __CUDA_ARCH__ != 500
+# error "Passed architecture 50, but got something else."
+# endif
+#endif
+
+// Check HOST_DEFINE only for nvcc
+#ifndef __CUDA__
+# ifndef HOST_DEFINE
+# error "HOST_DEFINE not defined!"
+# endif
+#endif
+
+int main()
+{
+}
diff --git a/Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt b/Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt
index 6e3697f..1265660 100644
--- a/Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt
+++ b/Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt
@@ -24,9 +24,9 @@ endif()
# Don't resolve the device symbols in the static library
# Don't resolve the device symbols in the executable library
# Verify that we can't use those device symbols from anything
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=[compute_30] -gencode arch=compute_50,code=\\\"compute_50\\\"")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CUDA_STANDARD 11)
+set(CMAKE_CUDA_ARCHITECTURES 30 50)
set(CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS OFF)
add_library(CUDANoDeviceResolve SHARED file1.cu)
diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt b/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt
index 57aa0b9..bd94ec8 100644
--- a/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt
+++ b/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt
@@ -21,7 +21,7 @@ endif()
# confirming that the first static library is on the device link line
# 3. Verify that we can't use those device symbols from anything that links
# to the static library
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=[sm_30] -gencode arch=compute_50,code=\\\"compute_50\\\"")
+set(CMAKE_CUDA_ARCHITECTURES 30 50)
add_library(CUDAResolveDeviceDepsA STATIC file1.cu)
add_library(CUDAResolveDeviceDepsB STATIC file2.cu)
diff --git a/Tests/CudaOnly/RuntimeControls/CMakeLists.txt b/Tests/CudaOnly/RuntimeControls/CMakeLists.txt
index 8b58fec..0da5739 100644
--- a/Tests/CudaOnly/RuntimeControls/CMakeLists.txt
+++ b/Tests/CudaOnly/RuntimeControls/CMakeLists.txt
@@ -15,9 +15,8 @@ else()
endif()
endif()
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=[compute_30]")
-
set(CMAKE_CUDA_STANDARD 11)
+set(CMAKE_CUDA_ARCHITECTURES 30)
set(CMAKE_CUDA_RUNTIME_LIBRARY static)
if(NOT "x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC")
diff --git a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
index c1bd64a..586be81 100644
--- a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
+++ b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt
@@ -9,9 +9,7 @@ project (SeparateCompilation CUDA)
#and executables.
#We complicate the matter by also testing that multiple static libraries
#all containing cuda separable compilation code links properly
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=\\\"compute_30,sm_30,sm_35\\\"")
-string(APPEND CMAKE_CUDA_FLAGS " --generate-code=arch=compute_50,code=[compute_50,sm_50,sm_52]")
-
+set(CMAKE_CUDA_ARCHITECTURES 30 35 50 52)
set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)
add_library(CUDASeparateLibA STATIC file1.cu file2.cu file3.cu)
target_compile_features(CUDASeparateLibA PRIVATE cuda_std_11)
diff --git a/Tests/CudaOnly/Standard98/CMakeLists.txt b/Tests/CudaOnly/Standard98/CMakeLists.txt
index ef9a685..3ba0360 100644
--- a/Tests/CudaOnly/Standard98/CMakeLists.txt
+++ b/Tests/CudaOnly/Standard98/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.7)
project(CudaOnlyStandard98 CUDA)
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
+set(CMAKE_CUDA_ARCHITECTURES 30)
# Support setting CUDA Standard to 98 which internally gets transformed to
# CUDA03
diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt b/Tests/CudaOnly/WithDefs/CMakeLists.txt
index ba9bf04..add8131 100644
--- a/Tests/CudaOnly/WithDefs/CMakeLists.txt
+++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt
@@ -3,17 +3,7 @@ cmake_minimum_required(VERSION 3.7)
project (WithDefs CUDA)
#verify that we can pass explicit cuda arch flags
-string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30")
-if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 9)
- set(debug_compile_flags --generate-code arch=compute_32,code=sm_32)
-else()
- set(debug_compile_flags --generate-code arch=compute_20,code=sm_20)
-endif()
-if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC")
- list(APPEND debug_compile_flags -Xcompiler=-WX)
-else()
- list(APPEND debug_compile_flags -Xcompiler=-Werror)
-endif()
+set(CMAKE_CUDA_ARCHITECTURES 30)
set(release_compile_defs DEFREL)
#Goal for this example:
@@ -29,7 +19,6 @@ target_compile_options(CudaOnlyWithDefs
-DFLAG_COMPILE_LANG_$<COMPILE_LANGUAGE>
-DFLAG_LANG_IS_CUDA=$<COMPILE_LANGUAGE:CUDA>
--compiler-options=-DHOST_DEFINE
- $<$<CONFIG:DEBUG>:$<BUILD_INTERFACE:${debug_compile_flags}>>
)
target_compile_definitions(CudaOnlyWithDefs
diff --git a/Tests/FindPython/ArtifactsInteractive/CMakeLists.txt b/Tests/FindPython/ArtifactsInteractive/CMakeLists.txt
new file mode 100644
index 0000000..524be92
--- /dev/null
+++ b/Tests/FindPython/ArtifactsInteractive/CMakeLists.txt
@@ -0,0 +1,24 @@
+cmake_minimum_required(VERSION 3.1)
+
+project(TestArtifactsInteractive LANGUAGES C)
+
+set (components Interpreter Development)
+if (CMake_TEST_FindPython_NumPy)
+ list (APPEND components NumPy)
+endif()
+
+find_package(Python3 REQUIRED COMPONENTS ${components})
+
+if (Python3_ARTIFACTS_INTERACTIVE)
+ if (NOT DEFINED CACHE{Python3_EXECUTABLE}
+ OR NOT DEFINED CACHE{Python3_LIBRARY} OR NOT DEFINED CACHE{Python3_INCLUDE_DIR}
+ OR (CMake_TEST_FindPython_NumPy AND NOT DEFINED CACHE{Python3_NumPy_INCLUDE_DIR}))
+ message (FATAL_ERROR "Python3_ARTIFACTS_INTERACTIVE=ON Failed.")
+ endif()
+else()
+ if (DEFINED CACHE{Python3_EXECUTABLE}
+ OR DEFINED CACHE{Python3_LIBRARY} OR DEFINED CACHE{Python3_INCLUDE_DIR}
+ OR (CMake_TEST_FindPython_NumPy AND DEFINED CACHE{Python3_NumPy_INCLUDE_DIR}))
+ message (FATAL_ERROR "Python3_ARTIFACTS_INTERACTIVE=OFF Failed.")
+ endif()
+endif()
diff --git a/Tests/FindPython/CMakeLists.txt b/Tests/FindPython/CMakeLists.txt
index 01fa6c3..8ed59d1 100644
--- a/Tests/FindPython/CMakeLists.txt
+++ b/Tests/FindPython/CMakeLists.txt
@@ -20,6 +20,17 @@ if(CMake_TEST_FindPython)
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
+ add_test(NAME FindPython.Python2.Development.Module COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindPython/Python2Module"
+ "${CMake_BINARY_DIR}/Tests/FindPython/Python2Module"
+ ${build_generator_args}
+ --build-project TestPython2Module
+ --build-options ${build_options}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
+
add_test(NAME FindPython.Python2Fail COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
@@ -54,6 +65,17 @@ if(CMake_TEST_FindPython)
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
+ add_test(NAME FindPython.Python3.Development.Module COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindPython/Python3Module"
+ "${CMake_BINARY_DIR}/Tests/FindPython/Python3Module"
+ ${build_generator_args}
+ --build-project TestPython3Module
+ --build-options ${build_options}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
+
add_test(NAME FindPython.Python3Fail COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
@@ -184,6 +206,35 @@ if(CMake_TEST_FindPython)
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
+ add_test(NAME FindPython.ArtifactsInteractive.ON COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindPython/ArtifactsInteractive"
+ "${CMake_BINARY_DIR}/Tests/FindPython/ArtifactsInteractive.ON"
+ ${build_generator_args}
+ --build-project TestArtifactsScope
+ --build-options ${build_options} "-Dbuild_generator_args=${build_generator_args}"
+ "-DCMake_SOURCE_DIR=${CMake_SOURCE_DIR}"
+ "-DCMake_BINARY_DIR=${CMake_BINARY_DIR}"
+ "-DCMake_TEST_FindPython_NumPy=${CMake_TEST_FindPython_NumPy}"
+ "-DPython3_ARTIFACTS_INTERACTIVE=ON"
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
+ add_test(NAME FindPython.ArtifactsInteractive.OFF COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindPython/ArtifactsInteractive"
+ "${CMake_BINARY_DIR}/Tests/FindPython/ArtifactsInteractive.OFF"
+ ${build_generator_args}
+ --build-project TestArtifactsScope
+ --build-options ${build_options} "-Dbuild_generator_args=${build_generator_args}"
+ "-DCMake_SOURCE_DIR=${CMake_SOURCE_DIR}"
+ "-DCMake_BINARY_DIR=${CMake_BINARY_DIR}"
+ "-DCMake_TEST_FindPython_NumPy=${CMake_TEST_FindPython_NumPy}"
+ "-DPython3_ARTIFACTS_INTERACTIVE=OFF"
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
+
add_test(NAME FindPython.CustomFailureMessage COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
@@ -247,7 +298,6 @@ if(CMake_TEST_FindPython_NumPy)
${build_generator_args}
--build-project TestNumPyOnly
--build-options ${build_options}
- --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
endif()
diff --git a/Tests/FindPython/Python/CMakeLists.txt b/Tests/FindPython/Python/CMakeLists.txt
index 3ee38e3..e8828a2 100644
--- a/Tests/FindPython/Python/CMakeLists.txt
+++ b/Tests/FindPython/Python/CMakeLists.txt
@@ -8,6 +8,12 @@ find_package(Python ${Python_REQUESTED_VERSION} REQUIRED COMPONENTS Interpreter
if (NOT Python_FOUND)
message (FATAL_ERROR "Fail to found Python ${Python_REQUESTED_VERSION}")
endif()
+if (NOT Python_Development.Module_FOUND)
+ message (FATAL_ERROR "Fail to found Python ${Python_REQUESTED_VERSION}, COMPONENT 'Development.Module'")
+endif()
+if (NOT Python_Development.Embed_FOUND)
+ message (FATAL_ERROR "Fail to found Python ${Python_REQUESTED_VERSION}, COMPOENENT 'Development.Embed'")
+endif()
if(NOT TARGET Python::Interpreter)
message(SEND_ERROR "Python::Interpreter not found")
diff --git a/Tests/FindPython/Python2/CMakeLists.txt b/Tests/FindPython/Python2/CMakeLists.txt
index cf77ca2..609d80f 100644
--- a/Tests/FindPython/Python2/CMakeLists.txt
+++ b/Tests/FindPython/Python2/CMakeLists.txt
@@ -13,6 +13,15 @@ find_package(Python2 REQUIRED COMPONENTS Interpreter Development)
if (NOT Python2_FOUND)
message (FATAL_ERROR "Fail to found Python 2")
endif()
+if (NOT Python2_Development_FOUND)
+ message (FATAL_ERROR "Fail to found Python 2 'Development' component")
+endif()
+if (NOT Python2_Development.Module_FOUND)
+ message (FATAL_ERROR "Fail to found Python 2 'Development.Module' component")
+endif()
+if (NOT Python2_Development.Embed_FOUND)
+ message (FATAL_ERROR "Fail to found Python 2 'Development.Embed' component")
+endif()
if(NOT TARGET Python2::Interpreter)
message(SEND_ERROR "Python2::Interpreter not found")
diff --git a/Tests/FindPython/Python2Embedded/CMakeLists.txt b/Tests/FindPython/Python2Embedded/CMakeLists.txt
index 0115dea..1cf6034 100644
--- a/Tests/FindPython/Python2Embedded/CMakeLists.txt
+++ b/Tests/FindPython/Python2Embedded/CMakeLists.txt
@@ -4,10 +4,23 @@ project(TestPython2Embedded C)
include(CTest)
-find_package(Python2 REQUIRED COMPONENTS Development)
+find_package(Python2 REQUIRED COMPONENTS Development.Embed)
if (NOT Python2_FOUND)
message (FATAL_ERROR "Fail to found Python 2")
endif()
+if (Python2_Development_FOUND)
+ message (FATAL_ERROR "Python 2, COMPONENT 'Development' unexpectedly found")
+endif()
+if (Python2_Development.Module_FOUND)
+ message (FATAL_ERROR "Python 2, COMPONENT 'Development.Module' unexpectedly found")
+endif()
+if (NOT Python2_Development.Embed_FOUND)
+ message (FATAL_ERROR "Python 2, COMPONENT 'Development.Embed' not found")
+endif()
+
+if(TARGET Python2::Module)
+ message(SEND_ERROR "Python2::Module unexpectedly found")
+endif()
if(NOT TARGET Python2::Python)
message(SEND_ERROR "Python2::Python not found")
diff --git a/Tests/FindPython/Python2Module/CMakeLists.txt b/Tests/FindPython/Python2Module/CMakeLists.txt
new file mode 100644
index 0000000..0bc3390
--- /dev/null
+++ b/Tests/FindPython/Python2Module/CMakeLists.txt
@@ -0,0 +1,37 @@
+cmake_minimum_required(VERSION 3.1)
+
+project(TestPython2Module C)
+
+include(CTest)
+
+find_package(Python2 REQUIRED COMPONENTS Interpreter Development.Module)
+if (NOT Python2_FOUND)
+ message (FATAL_ERROR "Fail to found Python 2")
+endif()
+if (Python2_Development_FOUND)
+ message (FATAL_ERROR "Python 2, COMPONENT 'Development' unexpectedly found")
+endif()
+if (Python2_Development.Embed_FOUND)
+ message (FATAL_ERROR "Python 2, COMPONENT 'Development.Embed' unexpectedly found")
+endif()
+if (NOT Python2_Development.Module_FOUND)
+ message (FATAL_ERROR "Python 2, COMPONENT 'Development.Module' not found")
+endif()
+
+if(NOT TARGET Python2::Interpreter)
+ message(SEND_ERROR "Python2::Interpreter not found")
+endif()
+
+if(TARGET Python2::Python)
+ message(SEND_ERROR "Python2::Python unexpectedly found")
+endif()
+if(NOT TARGET Python2::Module)
+ message(SEND_ERROR "Python2::Module not found")
+endif()
+
+Python2_add_library (spam2 MODULE ../spam.c)
+target_compile_definitions (spam2 PRIVATE PYTHON2)
+
+add_test (NAME python2_spam2
+ COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:spam2>"
+ "${Python2_EXECUTABLE}" -c "import spam2; spam2.system(\"cd\")")
diff --git a/Tests/FindPython/Python3/CMakeLists.txt b/Tests/FindPython/Python3/CMakeLists.txt
index 6691a48..d6e5fdb 100644
--- a/Tests/FindPython/Python3/CMakeLists.txt
+++ b/Tests/FindPython/Python3/CMakeLists.txt
@@ -13,16 +13,25 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
if (NOT Python3_FOUND)
message (FATAL_ERROR "Fail to found Python 3")
endif()
+if (NOT Python3_Development_FOUND)
+ message (FATAL_ERROR "Fail to found Python 3 'Development' component")
+endif()
+if (NOT Python3_Development.Module_FOUND)
+ message (FATAL_ERROR "Fail to found Python 3 'Development.Module' component")
+endif()
+if (NOT Python3_Development.Embed_FOUND)
+ message (FATAL_ERROR "Fail to found Python 3 'Development.Embed' component")
+endif()
if(NOT TARGET Python3::Interpreter)
- message(SEND_ERROR "Python2::Interpreter not found")
+ message(SEND_ERROR "Python3::Interpreter not found")
endif()
if(NOT TARGET Python3::Python)
- message(SEND_ERROR "Python2::Python not found")
+ message(SEND_ERROR "Python3::Python not found")
endif()
if(NOT TARGET Python3::Module)
- message(SEND_ERROR "Python2::Module not found")
+ message(SEND_ERROR "Python3::Module not found")
endif()
Python3_add_library (spam3 MODULE ../spam.c)
diff --git a/Tests/FindPython/Python3Embedded/CMakeLists.txt b/Tests/FindPython/Python3Embedded/CMakeLists.txt
index 4eb7ebc..184c0b4 100644
--- a/Tests/FindPython/Python3Embedded/CMakeLists.txt
+++ b/Tests/FindPython/Python3Embedded/CMakeLists.txt
@@ -4,10 +4,23 @@ project(TestPython3Embedded C)
include(CTest)
-find_package(Python3 REQUIRED COMPONENTS Development)
+find_package(Python3 REQUIRED COMPONENTS Development.Embed)
if (NOT Python3_FOUND)
message (FATAL_ERROR "Fail to found Python 3")
endif()
+if (Python3_Development_FOUND)
+ message (FATAL_ERROR "Python 3, COMPONENT 'Development' unexpectedly found")
+endif()
+if (Python3_Development.Module_FOUND)
+ message (FATAL_ERROR "Python 3, COMPONENT 'Development.Module' unexpectedly found")
+endif()
+if (NOT Python3_Development.Embed_FOUND)
+ message (FATAL_ERROR "Python 3, COMPONENT 'Development.Embed' not found")
+endif()
+
+if(TARGET Python3::Module)
+ message(SEND_ERROR "Python3::Module unexpectedly found")
+endif()
if(NOT TARGET Python3::Python)
message(SEND_ERROR "Python3::Python not found")
diff --git a/Tests/FindPython/Python3Module/CMakeLists.txt b/Tests/FindPython/Python3Module/CMakeLists.txt
new file mode 100644
index 0000000..676f4c8
--- /dev/null
+++ b/Tests/FindPython/Python3Module/CMakeLists.txt
@@ -0,0 +1,37 @@
+cmake_minimum_required(VERSION 3.1)
+
+project(TestPython3Module C)
+
+include(CTest)
+
+find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
+if (NOT Python3_FOUND)
+ message (FATAL_ERROR "Fail to found Python 3")
+endif()
+if (Python3_Development_FOUND)
+ message (FATAL_ERROR "Python 3, COMPONENT 'Development' unexpectedly found")
+endif()
+if (Python3_Development.Embed_FOUND)
+ message (FATAL_ERROR "Python 3, COMPONENT 'Development.Embed' unexpectedly found")
+endif()
+if (NOT Python3_Development.Module_FOUND)
+ message (FATAL_ERROR "Python 3, COMPONENT 'Development.Module' not found")
+endif()
+
+if(NOT TARGET Python3::Interpreter)
+ message(SEND_ERROR "Python3::Interpreter not found")
+endif()
+
+if(TARGET Python3::Python)
+ message(SEND_ERROR "Python3::Python unexpectedly found")
+endif()
+if(NOT TARGET Python3::Module)
+ message(SEND_ERROR "Python3::Module not found")
+endif()
+
+Python3_add_library (spam3 MODULE ../spam.c)
+target_compile_definitions (spam3 PRIVATE PYTHON3)
+
+add_test (NAME python3_spam3
+ COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:spam3>"
+ "${Python3_EXECUTABLE}" -c "import spam3; spam3.system(\"cd\")")
diff --git a/Tests/FindRuby/CMakeLists.txt b/Tests/FindRuby/CMakeLists.txt
new file mode 100644
index 0000000..3f4807c
--- /dev/null
+++ b/Tests/FindRuby/CMakeLists.txt
@@ -0,0 +1,57 @@
+if(CMake_TEST_FindRuby)
+
+ # Looks for ruby >=1.9.9, which is true on any Ubuntu (that installs it) or macOS (> 10.9)
+ add_test(NAME FindRuby.Test COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindRuby/Test"
+ "${CMake_BINARY_DIR}/Tests/FindRuby/Test"
+ ${build_generator_args}
+ --build-project TestRuby
+ --build-options ${build_options}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
+
+ # Looks for ruby >= 50.1.0, which should logically fail
+ add_test(NAME FindRuby.Fail COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindRuby/Fail"
+ "${CMake_BINARY_DIR}/Tests/FindRuby/Fail"
+ ${build_generator_args}
+ --build-project TestRubyFail
+ --build-options ${build_options}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
+ set_tests_properties(FindRuby.Fail PROPERTIES
+ PASS_REGULAR_EXPRESSION "Could NOT find Ruby.*(Required is at least version \"[0-9]+\\.[0-9]+\\.[0-9]+\")")
+
+ # Looks for 1.9.9 EXACTLY, which unlike the "FindRuby" test above will fail on every machine
+ # since this version doesn't exist (ruby goes from 1.9.3 to 2.0.0)
+ add_test(NAME FindRuby.FailExact COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindRuby/FailExact"
+ "${CMake_BINARY_DIR}/Tests/FindRuby/FailExact"
+ ${build_generator_args}
+ --build-project TestRubyFailExact
+ --build-options ${build_options}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
+ set_tests_properties(FindRuby.FailExact PROPERTIES
+ PASS_REGULAR_EXPRESSION "Could NOT find Ruby: Found unsuitable version \".*\", but required is.*exact version \"[0-9]+\\.[0-9]+\\.[0-9]+\" \\(found .*\\)")
+
+ # RVM specific test
+ if(CMake_TEST_FindRuby_RVM)
+ add_test(NAME FindRuby.Rvm COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindRuby/Rvm"
+ "${CMake_BINARY_DIR}/Tests/FindRuby/Rvm"
+ ${build_generator_args}
+ --build-project TestRVM
+ --build-options ${build_options}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
+ endif()
+endif()
diff --git a/Tests/FindRuby/Fail/CMakeLists.txt b/Tests/FindRuby/Fail/CMakeLists.txt
new file mode 100644
index 0000000..9185ba5
--- /dev/null
+++ b/Tests/FindRuby/Fail/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 3.17)
+project(TestRubyFail LANGUAGES NONE)
+
+# Should always fail since there is NO ruby 50.1.0 yet.
+find_package(Ruby 50.1.0 REQUIRED)
diff --git a/Tests/FindRuby/FailExact/CMakeLists.txt b/Tests/FindRuby/FailExact/CMakeLists.txt
new file mode 100644
index 0000000..1ebc0ae
--- /dev/null
+++ b/Tests/FindRuby/FailExact/CMakeLists.txt
@@ -0,0 +1,8 @@
+cmake_minimum_required(VERSION 3.17)
+project(TestRubyFailExact LANGUAGES NONE)
+
+# Should always fail since there is NO ruby 1.9.9 (goes from 1.9.3 to 2.0.0)
+find_package(Ruby 1.9.9 EXACT REQUIRED)
+if (NOT Ruby_FOUND)
+ message (FATAL_ERROR "Failed to find Ruby 1.9.9")
+endif()
diff --git a/Tests/FindRuby/Rvm/CMakeLists.txt b/Tests/FindRuby/Rvm/CMakeLists.txt
new file mode 100644
index 0000000..545fc94
--- /dev/null
+++ b/Tests/FindRuby/Rvm/CMakeLists.txt
@@ -0,0 +1,75 @@
+cmake_minimum_required(VERSION 3.17)
+project(TestRVM LANGUAGES NONE)
+
+include(CTest)
+
+# To run this test, you need to have at least one RVM ruby installed
+# and to ensure that the env variable 'MY_RUBY_HOME' is set to a valid RVM ruby when you run the test
+# (which is the case if you have done `rvm use x.y.z`, but could be manually set too)
+
+# Properly using rvm would require sourcing a shell script, eg `source "$HOME/.rvm/scripts/rvm"`
+# Instead, I'll just rely on the env variable MY_RUBY_HOME
+set(MY_RUBY_HOME "$ENV{MY_RUBY_HOME}")
+if(NOT MY_RUBY_HOME)
+ message(FATAL_ERROR "Env variable MY_RUBY_HOME should be set to a valid RVM ruby location, or you should call `rvm use x.y.z` before")
+endif()
+execute_process (COMMAND "${MY_RUBY_HOME}/bin/ruby" -e "puts RUBY_VERSION"
+ RESULT_VARIABLE result
+ OUTPUT_VARIABLE RVM_RUBY_VERSION
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+if (result)
+ message (FATAL_ERROR "Unable to detect RVM ruby version from `${MY_RUBY_HOME}/bin/ruby`: ${RVM_RUBY_VERSION}")
+endif()
+
+execute_process(COMMAND "${CMAKE_COMMAND}" -E env --unset=MY_RUBY_HOME --unset=PATH
+ "which" "ruby"
+ RESULT_VARIABLE result
+ OUTPUT_VARIABLE SYSTEM_RUBY
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+if (SYSTEM_RUBY MATCHES "^${MY_RUBY_HOME}/.+")
+ message(FATAL_ERROR "Unable to find system ruby, found ${SYSTEM_RUBY} which is part of MY_RUBY_HOME=${MY_RUBY_HOME}")
+endif()
+
+# Check version of the system ruby executable.
+execute_process (COMMAND "${SYSTEM_RUBY}" -e "puts RUBY_VERSION"
+ RESULT_VARIABLE result
+ OUTPUT_VARIABLE SYSTEM_RUBY_VERSION
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+if (result)
+ message (FATAL_ERROR "Unable to detect system ruby version from '${SYSTEM_RUBY}': ${SYSTEM_RUBY_VERSION}")
+endif()
+
+if(SYSTEM_RUBY_VERSION VERSION_EQUAL RVM_RUBY_VERSION)
+ message(FATAL_ERROR "Your RVM Ruby Version and your System ruby version are the same (${RVM_RUBY_VERSION}).")
+endif()
+
+message("Found System Ruby (${SYSTEM_RUBY_VERSION}): ${SYSTEM_RUBY}")
+message("Found RVM Ruby (${RVM_RUBY_VERSION}): ${MY_RUBY_HOME}/bin/ruby")
+
+add_test(NAME FindRuby.RvmDefault
+ COMMAND "${CMAKE_COMMAND}" -E env "MY_RUBY_HOME=${MY_RUBY_HOME}"
+ "${CMAKE_COMMAND}" "-DRUBY_HOME=${MY_RUBY_HOME}"
+ -P "${CMAKE_CURRENT_LIST_DIR}/RvmDefault.cmake")
+
+add_test(NAME FindRuby.RvmOnly
+ COMMAND "${CMAKE_COMMAND}" -E env --unset=PATH
+ "MY_RUBY_HOME=${MY_RUBY_HOME}"
+ "${CMAKE_COMMAND}" "-DRUBY_HOME=${MY_RUBY_HOME}"
+ "-DRVM_RUBY_VERSION=${RVM_RUBY_VERSION}" "-DSYSTEM_RUBY_VERSION=${SYSTEM_RUBY_VERSION}"
+ -P "${CMAKE_CURRENT_LIST_DIR}/RvmOnly.cmake")
+add_test(NAME FindRuby.UnsetRvmOnly
+ COMMAND "${CMAKE_COMMAND}" -E env --unset=MY_RUBY_HOME "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
+ "${CMAKE_COMMAND}" "-DRVM_RUBY_VERSION=${RVM_RUBY_VERSION}" "-DSYSTEM_RUBY_VERSION=${SYSTEM_RUBY_VERSION}"
+ -P "${CMAKE_CURRENT_LIST_DIR}/RvmOnly.cmake")
+
+add_test(NAME FindRuby.RvmStandard
+ COMMAND "${CMAKE_COMMAND}" -E env "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
+ "MY_RUBY_HOME=${MY_RUBY_HOME}"
+ "${CMAKE_COMMAND}" "-DRUBY_HOME=${MY_RUBY_HOME}"
+ -P "${CMAKE_CURRENT_LIST_DIR}/RvmStandard.cmake")
diff --git a/Tests/FindRuby/Rvm/RvmDefault.cmake b/Tests/FindRuby/Rvm/RvmDefault.cmake
new file mode 100644
index 0000000..a66b911
--- /dev/null
+++ b/Tests/FindRuby/Rvm/RvmDefault.cmake
@@ -0,0 +1,17 @@
+set(CMAKE_FIND_LIBRARY_PREFIXES "")
+set(CMAKE_FIND_LIBRARY_SUFFIXES "")
+
+find_package (Ruby 2.1.1 REQUIRED)
+if (NOT RUBY_EXECUTABLE MATCHES "^${RUBY_HOME}/.+")
+ message (FATAL_ERROR "Failed to use RVM environment: ${RUBY_EXECUTABLE}, ${RUBY_HOME}")
+endif()
+
+find_package (Ruby 2.1 REQUIRED)
+if (NOT RUBY_EXECUTABLE MATCHES "^${RUBY_HOME}/.+")
+ message (FATAL_ERROR "Failed to use RVM environment: ${RUBY_EXECUTABLE}, ${RUBY_HOME}")
+endif()
+
+find_package (Ruby REQUIRED)
+if (NOT RUBY_EXECUTABLE MATCHES "^${RUBY_HOME}/.+")
+ message (FATAL_ERROR "Failed to use RVM environment: ${RUBY_EXECUTABLE}, ${RUBY_HOME}")
+endif()
diff --git a/Tests/FindRuby/Rvm/RvmOnly.cmake b/Tests/FindRuby/Rvm/RvmOnly.cmake
new file mode 100644
index 0000000..3851a7c
--- /dev/null
+++ b/Tests/FindRuby/Rvm/RvmOnly.cmake
@@ -0,0 +1,41 @@
+set(CMAKE_FIND_LIBRARY_PREFIXES "")
+set(CMAKE_FIND_LIBRARY_SUFFIXES "")
+
+set(Ruby_FIND_VIRTUALENV ONLY)
+
+# Test: FindRuby.RvmOnly
+if (RUBY_HOME)
+ # => Trying to find exactly system ruby using ONLY virtual environment should fail
+ find_package (Ruby ${SYSTEM_RUBY_VERSION} EXACT QUIET)
+ if(Ruby_FOUND)
+ message (FATAL_ERROR "Ruby unexpectedly found.")
+ endif()
+ # And should work to find the rvm version
+ find_package (Ruby ${RVM_RUBY_VERSION} EXACT QUIET)
+ if(Ruby_FOUND)
+ message (FATAL_ERROR "Ruby unexpectedly found.")
+ endif()
+endif()
+
+
+# Test: FindRuby.UnsetRvmOnly
+if (NOT RUBY_HOME)
+
+ # If ENV{MY_RUBY_HOME} isn't defined, it should default back to "STANDARD"
+ # At which point:
+
+ # It shouldn't find the RVM ruby
+ find_package (Ruby ${RVM_RUBY_VERSION} EXACT QUIET)
+ if(Ruby_FOUND)
+ message(FATAL_ERROR "Found RVM ruby when expecting system")
+ endif()
+
+ # it should find the system ruby
+ find_package (Ruby ${SYSTEM_RUBY_VERSION} EXACT QUIET)
+ if(NOT Ruby_FOUND)
+ message (FATAL_ERROR "Ruby not found.")
+ endif()
+ if (Ruby_FOUND MATCHES "^${RUBY_HOME}/.+")
+ message(FATAL_ERROR "Failed to find system ruby")
+ endif()
+endif()
diff --git a/Tests/FindRuby/Rvm/RvmStandard.cmake b/Tests/FindRuby/Rvm/RvmStandard.cmake
new file mode 100644
index 0000000..26befdb7
--- /dev/null
+++ b/Tests/FindRuby/Rvm/RvmStandard.cmake
@@ -0,0 +1,9 @@
+set(CMAKE_FIND_LIBRARY_PREFIXES "")
+set(CMAKE_FIND_LIBRARY_SUFFIXES "")
+
+set (Ruby_FIND_VIRTUALENV STANDARD)
+find_package (Ruby REQUIRED)
+
+if (RUBY_EXECUTABLE MATCHES "^${RUBY_HOME}/.+")
+ message (FATAL_ERROR "RVM ruby unexpectedly found at ${RUBY_EXECUTABLE}, matches ${RUBY_HOME}")
+endif()
diff --git a/Tests/FindRuby/Test/CMakeLists.txt b/Tests/FindRuby/Test/CMakeLists.txt
new file mode 100644
index 0000000..dcf3ec3
--- /dev/null
+++ b/Tests/FindRuby/Test/CMakeLists.txt
@@ -0,0 +1,14 @@
+cmake_minimum_required(VERSION 3.17)
+project(TestRuby LANGUAGES C)
+include(CTest)
+
+find_package(Ruby 1.9.9 REQUIRED)
+if (NOT Ruby_FOUND)
+ message (FATAL_ERROR "Failed to find Ruby >=1.9.9")
+endif()
+
+add_executable(ruby_version ruby_version.c)
+target_include_directories(ruby_version PRIVATE ${Ruby_INCLUDE_DIRS})
+target_link_libraries(ruby_version PRIVATE ${Ruby_LIBRARIES})
+
+add_test(NAME ruby_version COMMAND ruby_version)
diff --git a/Tests/FindRuby/Test/ruby_version.c b/Tests/FindRuby/Test/ruby_version.c
new file mode 100644
index 0000000..8800436
--- /dev/null
+++ b/Tests/FindRuby/Test/ruby_version.c
@@ -0,0 +1,7 @@
+#include "ruby.h"
+
+int main(void)
+{
+ ruby_show_version();
+ return 0;
+}
diff --git a/Tests/FindX11/Test/CMakeLists.txt b/Tests/FindX11/Test/CMakeLists.txt
index 769271f..b2adfb2 100644
--- a/Tests/FindX11/Test/CMakeLists.txt
+++ b/Tests/FindX11/Test/CMakeLists.txt
@@ -29,6 +29,10 @@ test_x11_component(x11_components SM)
set(X11_X11_FOUND ${X11_FOUND})
test_x11_component(x11_components X11)
test_x11_component(x11_components Xau)
+test_x11_component(x11_components xcb)
+test_x11_component(x11_components X11_xcb)
+test_x11_component(x11_components xcb_icccm)
+test_x11_component(x11_components xcb_xkb)
test_x11_component(x11_components Xcomposite)
test_x11_component(x11_components Xdamage)
test_x11_component(x11_components Xdmcp)
@@ -41,6 +45,8 @@ test_x11_component(x11_components Xfixes)
test_x11_component(x11_components_ignore Xft)
test_x11_component(x11_components Xi)
test_x11_component(x11_components Xinerama)
+test_x11_component(x11_components xkbcommon)
+test_x11_component(x11_components xkbcommon_X11)
test_x11_component(x11_components Xkb)
test_x11_component(x11_components xkbfile)
test_x11_component(x11_components Xmu)
@@ -61,6 +67,9 @@ target_link_libraries(test_var PRIVATE ${X11_LIBRARIES})
# Not included in X11_LIBRARIES.
foreach(lib
Xau
+ xcb
+ X11_xcb
+ xcb_icccm
Xcomposite
Xdamage
Xdmcp
@@ -69,6 +78,8 @@ foreach(lib
Xfixes
Xi
Xinerama
+ xkbcommon
+ xkbcommon_X11
Xkb
xkbfile
Xmu
diff --git a/Tests/FortranModules/CMakeLists.txt b/Tests/FortranModules/CMakeLists.txt
index d056b43..b7a6f68 100644
--- a/Tests/FortranModules/CMakeLists.txt
+++ b/Tests/FortranModules/CMakeLists.txt
@@ -21,7 +21,7 @@ end module parent
submodule ( parent ) child
contains
module procedure id
- f = x
+ id = x
end procedure id
end submodule child
program main
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index d945375..4327c2f 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -51,40 +51,36 @@ add_custom_target(checksayhello ALL
)
add_dependencies(checksayhello sayhello)
-# Exclude this test on IBM XL for now because the check strangely
-# fails with 'ld: 0706-029 Use a number with the -H flag'.
-if(NOT CMAKE_Fortran_COMPILER_ID STREQUAL XL)
- set(err_log ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log)
- file(REMOVE "${err_log}")
- include(CheckFortranSourceCompiles)
- unset(HAVE_PRINT CACHE)
- CHECK_Fortran_SOURCE_COMPILES([[
+set(err_log ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log)
+file(REMOVE "${err_log}")
+include(CheckFortranSourceCompiles)
+unset(HAVE_PRINT CACHE)
+CHECK_Fortran_SOURCE_COMPILES([[
PROGRAM TEST_HAVE_PRINT
PRINT *, 'Hello'
END
]] HAVE_PRINT)
- if(NOT HAVE_PRINT)
- if(EXISTS "${err_log}")
- file(READ "${err_log}" err)
- endif()
- string(REPLACE "\n" "\n " err " ${err}")
- message(SEND_ERROR "CHECK_Fortran_SOURCE_COMPILES for HAVE_PRINT failed:\n"
- "${err}")
+if(NOT HAVE_PRINT)
+ if(EXISTS "${err_log}")
+ file(READ "${err_log}" err)
endif()
+ string(REPLACE "\n" "\n " err " ${err}")
+ message(SEND_ERROR "CHECK_Fortran_SOURCE_COMPILES for HAVE_PRINT failed:\n"
+ "${err}")
+endif()
- unset(Fortran_BOGUS_FLAG CACHE)
- include(CheckFortranCompilerFlag)
- CHECK_Fortran_COMPILER_FLAG(-_this_is_not_a_flag_ Fortran_BOGUS_FLAG)
- if (Fortran_BOGUS_FLAG)
- message(SEND_ERROR "CHECK_Fortran_COMPILER_FLAG() succeeded, but should have failed")
- endif()
+unset(Fortran_BOGUS_FLAG CACHE)
+include(CheckFortranCompilerFlag)
+CHECK_Fortran_COMPILER_FLAG(-_this_is_not_a_flag_ Fortran_BOGUS_FLAG)
+if (Fortran_BOGUS_FLAG)
+ message(SEND_ERROR "CHECK_Fortran_COMPILER_FLAG() succeeded, but should have failed")
+endif()
- unset(Fortran_RUN_FLAG CACHE)
- include(CheckFortranSourceRuns)
- check_fortran_source_runs("program a; end program" Fortran_RUN_FLAG SRC_EXT F90)
- if(NOT Fortran_RUN_FLAG)
- message(SEND_ERROR "CHECK_Fortran_SOURCE_RUNS() failed")
- endif()
+unset(Fortran_RUN_FLAG CACHE)
+include(CheckFortranSourceRuns)
+check_fortran_source_runs("program a; end program" Fortran_RUN_FLAG SRC_EXT F90)
+if(NOT Fortran_RUN_FLAG)
+ message(SEND_ERROR "CHECK_Fortran_SOURCE_RUNS() failed")
endif()
# Test generation of preprocessed sources.
diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt
index fa3309f..eb08676 100644
--- a/Tests/IncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/CMakeLists.txt
@@ -65,6 +65,39 @@ else()
PROPERTIES COMPILE_FLAGS "-ITarProp")
endif()
+# Test escaping of special characters in include directory paths.
+set(special_chars "~@%&{}()!'")
+if(NOT CMAKE_GENERATOR STREQUAL "Watcom WMake")
+ # Watcom seems to have no way to encode these characters.
+ string(APPEND special_chars "#=[]")
+endif()
+if(NOT (MINGW AND CMAKE_GENERATOR MATCHES "(Unix|MSYS) Makefiles"))
+ # FIXME: Dependencies work but command-line generation does not handle '$'.
+ string(APPEND special_chars "$")
+endif()
+if(NOT CMAKE_GENERATOR MATCHES "(Borland|NMake) Makefiles")
+ # NMake and Borland seem to have no way to encode a single '^'.
+ string(APPEND special_chars "^")
+endif()
+if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 9 2008|Watcom WMake")
+ # The vcproj format separates values with ','.
+ string(APPEND special_chars ",")
+endif()
+if(NOT WIN32 AND NOT CYGWIN)
+ string(APPEND special_chars "*?<>")
+endif()
+set(special_dir "${CMAKE_CURRENT_BINARY_DIR}/special-${special_chars}-include")
+file(WRITE "${special_dir}/SpecialDir.h" "#define SPECIAL_DIR_H\n")
+target_include_directories(IncludeDirectories PRIVATE "${special_dir}")
+target_compile_definitions(IncludeDirectories PRIVATE INCLUDE_SPECIAL_DIR)
+
+if(MAKE_SUPPORTS_SPACES)
+ set(special_space_dir "${CMAKE_CURRENT_BINARY_DIR}/special-space ${special_chars}-include")
+ file(WRITE "${special_space_dir}/SpecialSpaceDir.h" "#define SPECIAL_SPACE_DIR_H\n")
+ target_include_directories(IncludeDirectories PRIVATE "${special_space_dir}")
+ target_compile_definitions(IncludeDirectories PRIVATE INCLUDE_SPECIAL_SPACE_DIR)
+endif()
+
add_library(ordertest ordertest.cpp)
target_include_directories(ordertest SYSTEM PUBLIC SystemIncludeDirectories/systemlib)
target_include_directories(ordertest PUBLIC SystemIncludeDirectories/userlib)
diff --git a/Tests/IncludeDirectories/main.cpp b/Tests/IncludeDirectories/main.cpp
index a59d27c..6dc88e2 100644
--- a/Tests/IncludeDirectories/main.cpp
+++ b/Tests/IncludeDirectories/main.cpp
@@ -3,6 +3,20 @@
#include "SrcProp.h"
#include "TarProp.h"
+#ifdef INCLUDE_SPECIAL_DIR
+# include "SpecialDir.h"
+# ifndef SPECIAL_DIR_H
+# error "SPECIAL_DIR_H not defined"
+# endif
+#endif
+
+#ifdef INCLUDE_SPECIAL_SPACE_DIR
+# include "SpecialSpaceDir.h"
+# ifndef SPECIAL_SPACE_DIR_H
+# error "SPECIAL_SPACE_DIR_H not defined"
+# endif
+#endif
+
int main(int argc, char** argv)
{
return 0;
diff --git a/Tests/ObjectLibrary/CMakeLists.txt b/Tests/ObjectLibrary/CMakeLists.txt
index 7897ab9..fca5f41 100644
--- a/Tests/ObjectLibrary/CMakeLists.txt
+++ b/Tests/ObjectLibrary/CMakeLists.txt
@@ -73,3 +73,5 @@ add_executable(UseABstaticObjs $<TARGET_OBJECTS:UseABstatic>)
target_link_libraries(UseABstaticObjs ABstatic)
add_subdirectory(ExportLanguages)
+
+add_subdirectory(Transitive)
diff --git a/Tests/ObjectLibrary/Transitive/CMakeLists.txt b/Tests/ObjectLibrary/Transitive/CMakeLists.txt
new file mode 100644
index 0000000..d616cda
--- /dev/null
+++ b/Tests/ObjectLibrary/Transitive/CMakeLists.txt
@@ -0,0 +1,12 @@
+cmake_policy(SET CMP0022 NEW)
+add_library(FooStatic STATIC FooStatic.c)
+
+add_library(FooObject1 OBJECT FooObject.c)
+target_link_libraries(FooObject1 PRIVATE FooStatic)
+add_executable(Transitive1 Transitive.c)
+target_link_libraries(Transitive1 PRIVATE FooObject1)
+
+add_library(FooObject2 OBJECT FooObject.c)
+target_link_libraries(FooObject2 INTERFACE FooStatic)
+add_executable(Transitive2 Transitive.c)
+target_link_libraries(Transitive2 PRIVATE FooObject2)
diff --git a/Tests/ObjectLibrary/Transitive/FooObject.c b/Tests/ObjectLibrary/Transitive/FooObject.c
new file mode 100644
index 0000000..54c1f29
--- /dev/null
+++ b/Tests/ObjectLibrary/Transitive/FooObject.c
@@ -0,0 +1,4 @@
+int FooObject(void)
+{
+ return 0;
+}
diff --git a/Tests/ObjectLibrary/Transitive/FooStatic.c b/Tests/ObjectLibrary/Transitive/FooStatic.c
new file mode 100644
index 0000000..84649c7
--- /dev/null
+++ b/Tests/ObjectLibrary/Transitive/FooStatic.c
@@ -0,0 +1,4 @@
+int FooStatic(void)
+{
+ return 0;
+}
diff --git a/Tests/ObjectLibrary/Transitive/Transitive.c b/Tests/ObjectLibrary/Transitive/Transitive.c
new file mode 100644
index 0000000..43089b8
--- /dev/null
+++ b/Tests/ObjectLibrary/Transitive/Transitive.c
@@ -0,0 +1,7 @@
+extern int FooObject(void);
+extern int FooStatic(void);
+
+int main(void)
+{
+ return FooObject() + FooStatic();
+}
diff --git a/Tests/Preprocess/preprocess.c b/Tests/Preprocess/preprocess.c
index 958c77e..b3117da 100644
--- a/Tests/Preprocess/preprocess.c
+++ b/Tests/Preprocess/preprocess.c
@@ -15,21 +15,21 @@ int check_defines_C(void)
result = 0;
}
if (strcmp(TARGET_STRING, STRING_VALUE) != 0) {
- fprintf(stderr, "TARGET_STRING has wrong value in C [%s]\n",
- TARGET_STRING);
+ fprintf(stderr, "TARGET_STRING has wrong value in C [%s] vs [%s]\n",
+ TARGET_STRING, STRING_VALUE);
result = 0;
}
{
int x = 2;
int y = 3;
if ((FILE_EXPR) != (EXPR)) {
- fprintf(stderr, "FILE_EXPR did not work in C [%s]\n",
- TO_STRING(FILE_EXPR));
+ fprintf(stderr, "FILE_EXPR did not work in C [%s] vs [%s]\n",
+ TO_STRING(FILE_EXPR), TO_STRING(EXPR));
result = 0;
}
if ((TARGET_EXPR) != (EXPR)) {
- fprintf(stderr, "TARGET_EXPR did not work in C [%s]\n",
- TO_STRING(FILE_EXPR));
+ fprintf(stderr, "TARGET_EXPR did not work in C [%s] vs [%s]\n",
+ TO_STRING(TARGET_EXPR), TO_STRING(EXPR));
result = 0;
}
}
diff --git a/Tests/Preprocess/preprocess.cxx b/Tests/Preprocess/preprocess.cxx
index 34a69c6..f2fffef 100644
--- a/Tests/Preprocess/preprocess.cxx
+++ b/Tests/Preprocess/preprocess.cxx
@@ -12,25 +12,26 @@ int check_defines_CXX()
{
int result = 1;
if (strcmp(FILE_STRING, STRING_VALUE) != 0) {
- fprintf(stderr, "FILE_STRING has wrong value in CXX [%s]\n", FILE_STRING);
+ fprintf(stderr, "FILE_STRING has wrong value in CXX [%s] vs [%s]\n",
+ FILE_STRING, STRING_VALUE);
result = 0;
}
if (strcmp(TARGET_STRING, STRING_VALUE) != 0) {
- fprintf(stderr, "TARGET_STRING has wrong value in CXX [%s]\n",
- TARGET_STRING);
+ fprintf(stderr, "TARGET_STRING has wrong value in CXX [%s] vs [%s]\n",
+ TARGET_STRING, STRING_VALUE);
result = 0;
}
{
int x = 2;
int y = 3;
if ((FILE_EXPR) != (EXPR)) {
- fprintf(stderr, "FILE_EXPR did not work in CXX [%s]\n",
- TO_STRING(FILE_EXPR));
+ fprintf(stderr, "FILE_EXPR did not work in CXX [%s] vs [%s]\n",
+ TO_STRING(FILE_EXPR), TO_STRING(EXPR));
result = 0;
}
if ((TARGET_EXPR) != (EXPR)) {
- fprintf(stderr, "TARGET_EXPR did not work in CXX [%s]\n",
- TO_STRING(FILE_EXPR));
+ fprintf(stderr, "TARGET_EXPR did not work in CXX [%s] vs [%s]\n",
+ TO_STRING(TARGET_EXPR), TO_STRING(EXPR));
result = 0;
}
}
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 14ae243..753417d 100644
--- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
@@ -103,3 +103,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..841d0a8
--- /dev/null
+++ b/Tests/RunCMake/CMP0104/CMP0104-WARN.cmake
@@ -0,0 +1 @@
+include(CMP0104-Common.cmake)
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/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index e9f8bca..34e1fbc 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -116,6 +116,9 @@ endif()
add_RunCMake_test(CMP0069)
add_RunCMake_test(CMP0081)
add_RunCMake_test(CMP0102)
+if(CMake_TEST_CUDA)
+ add_RunCMake_test(CMP0104)
+endif()
# 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 +172,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()
@@ -188,6 +204,7 @@ 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")
@@ -447,6 +464,8 @@ 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)
@@ -649,5 +668,7 @@ 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")
+
+add_RunCMake_test(cmake_command)
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/CTestResourceAllocation/RunCMakeTest.cmake b/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake
index 8584786..777f192 100644
--- a/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake
@@ -140,9 +140,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 +159,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/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/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/Languages/LINK_LANGUAGE-genex-result.txt b/Tests/RunCMake/CommandLine/E_cat_directory-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/Languages/LINK_LANGUAGE-genex-result.txt
+++ b/Tests/RunCMake/CommandLine/E_cat_directory-result.txt
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/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..0f806bc 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -459,6 +459,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 +734,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/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/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/RunCMakeTest.cmake b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
index e28ae96..5e2e5e1 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)
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/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
index de6253f..9ee0c20 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
@@ -1,8 +1,14 @@
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
@@ -471,154 +477,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,4428 +513,52 @@ 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 not os.path.exists(os.path.join(reply_dir, "..", "..", "..", "..", "ipo_enabled.txt")):
@@ -5164,126 +655,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 "):
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..7631837
--- /dev/null
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/cxx_exe.json
@@ -0,0 +1,213 @@
+{
+ "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,
+ "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_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/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/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..9df1d5b 100644
--- a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
@@ -1,5 +1,7 @@
include(RunCMake)
+run_cmake(PkgConfigDoesNotExist)
+
run_cmake(FindPkgConfig_NO_PKGCONFIG_PATH)
run_cmake(FindPkgConfig_PKGCONFIG_PATH)
run_cmake(FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH)
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/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/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..6550f84 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -39,6 +39,31 @@ 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(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.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/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/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/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/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/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..7ffd522 100644
--- a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
+++ b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
@@ -29,6 +29,7 @@
\* CMP0083
\* CMP0095
\* CMP0099
+ \* CMP0104
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
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..5ccca01 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,9 @@ run_cmake(VsDpiAware)
run_cmake(VsDpiAwareBadParam)
run_cmake(VsPrecompileHeaders)
run_cmake(VsPrecompileHeadersReuseFromCompilePDBName)
+run_cmake(VsDeployEnabled)
+run_cmake(VsSettings)
+run_cmake(VsSourceSettingsTool)
run_cmake(VsWinRTByDefault)
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/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/cmake_command/CMakeLists.txt b/Tests/RunCMake/cmake_command/CMakeLists.txt
new file mode 100644
index 0000000..2632ffa
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/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_command/RunCMakeTest.cmake b/Tests/RunCMake/cmake_command/RunCMakeTest.cmake
new file mode 100644
index 0000000..2b6e7a2
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/RunCMakeTest.cmake
@@ -0,0 +1,13 @@
+include(RunCMake)
+
+run_cmake(cmake_command_no_parameters)
+run_cmake(cmake_command_unknown_meta_operation)
+run_cmake(cmake_command_invoke_message)
+run_cmake(cmake_command_invoke_message_fatal_error)
+run_cmake(cmake_command_invoke_no_parameters)
+run_cmake(cmake_command_invoke_unknown_function)
+run_cmake(cmake_command_eval_message)
+run_cmake(cmake_command_eval_message_fatal_error)
+run_cmake(cmake_command_eval_no_code)
+run_cmake(cmake_command_eval_no_parameters)
+run_cmake(cmake_command_eval_variable_outside_message)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_message-stderr.txt
new file mode 100644
index 0000000..cfc8694
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_message-stderr.txt
@@ -0,0 +1 @@
+WORKS!
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_message.cmake
new file mode 100644
index 0000000..9ef5e25
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_message.cmake
@@ -0,0 +1 @@
+cmake_command(EVAL CODE message(WORKS!))
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-result.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-stderr.txt
new file mode 100644
index 0000000..6a8a124
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at cmake_command_eval_message_fatal_error.cmake:1:EVAL:2 \(message\):
+ error!
+Call Stack \(most recent call first\):
+ cmake_command_eval_message_fatal_error.cmake:1 \(cmake_command\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error.cmake
new file mode 100644
index 0000000..22913de
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error.cmake
@@ -0,0 +1,5 @@
+cmake_command(EVAL CODE
+"
+ message(FATAL_ERROR error!)
+"
+)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-result.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-stderr.txt
new file mode 100644
index 0000000..ee53312
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at cmake_command_eval_no_code.cmake:1 \(cmake_command\):
+ cmake_command called without CODE argument
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_code.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code.cmake
new file mode 100644
index 0000000..22e1667
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code.cmake
@@ -0,0 +1 @@
+cmake_command(EVAL message "too many parameters")
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-result.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-stderr.txt
new file mode 100644
index 0000000..e9fc317
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at cmake_command_eval_no_parameters.cmake:1 \(cmake_command\):
+ cmake_command called with incorrect number of arguments
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters.cmake
new file mode 100644
index 0000000..a5ba2c7
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters.cmake
@@ -0,0 +1 @@
+cmake_command(EVAL)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message-stderr.txt
new file mode 100644
index 0000000..cfc8694
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message-stderr.txt
@@ -0,0 +1 @@
+WORKS!
diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message.cmake
new file mode 100644
index 0000000..b7a06a5
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message.cmake
@@ -0,0 +1,2 @@
+cmake_command(EVAL CODE "set(phrase \"WORKS!\")")
+message(${phrase})
diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_message-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_invoke_message-stderr.txt
new file mode 100644
index 0000000..cfc8694
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_invoke_message-stderr.txt
@@ -0,0 +1 @@
+WORKS!
diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_message.cmake b/Tests/RunCMake/cmake_command/cmake_command_invoke_message.cmake
new file mode 100644
index 0000000..336d78a
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_invoke_message.cmake
@@ -0,0 +1 @@
+cmake_command(INVOKE message WORKS!)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error-result.txt b/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error-stderr.txt
new file mode 100644
index 0000000..2c9dab5
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error at cmake_command_invoke_message_fatal_error.cmake:1 \(message\):
+ error!
+Call Stack \(most recent call first\):
+ cmake_command_invoke_message_fatal_error.cmake:1 \(cmake_command\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error.cmake b/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error.cmake
new file mode 100644
index 0000000..6b42764
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error.cmake
@@ -0,0 +1 @@
+cmake_command(INVOKE message FATAL_ERROR error!)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters-result.txt b/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters-stderr.txt
new file mode 100644
index 0000000..7741b41
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at cmake_command_invoke_no_parameters.cmake:1 \(cmake_command\):
+ cmake_command called with incorrect number of arguments
diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters.cmake b/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters.cmake
new file mode 100644
index 0000000..b9c5e14
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters.cmake
@@ -0,0 +1 @@
+cmake_command(INVOKE)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function-result.txt b/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function-stderr.txt
new file mode 100644
index 0000000..50a81a3
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at cmake_command_invoke_unknown_function.cmake:1 \(unknown\):
+ Unknown CMake command "unknown".
diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function.cmake b/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function.cmake
new file mode 100644
index 0000000..f19a04b
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function.cmake
@@ -0,0 +1 @@
+cmake_command(INVOKE unknown)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_no_parameters-result.txt b/Tests/RunCMake/cmake_command/cmake_command_no_parameters-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_no_parameters-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_command/cmake_command_no_parameters-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_no_parameters-stderr.txt
new file mode 100644
index 0000000..772b604
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_no_parameters-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at cmake_command_no_parameters.cmake:1 \(cmake_command\):
+ cmake_command called with incorrect number of arguments
diff --git a/Tests/RunCMake/cmake_command/cmake_command_no_parameters.cmake b/Tests/RunCMake/cmake_command/cmake_command_no_parameters.cmake
new file mode 100644
index 0000000..b9c5e14
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_no_parameters.cmake
@@ -0,0 +1 @@
+cmake_command(INVOKE)
diff --git a/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation-result.txt b/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation-stderr.txt
new file mode 100644
index 0000000..7b9b915
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation-stderr.txt
@@ -0,0 +1,2 @@
+CMake Error at cmake_command_unknown_meta_operation.cmake:1 \(cmake_command\):
+ cmake_command called with unknown meta-operation
diff --git a/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation.cmake b/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation.cmake
new file mode 100644
index 0000000..f7c77e5
--- /dev/null
+++ b/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation.cmake
@@ -0,0 +1 @@
+cmake_command(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/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/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..3104df4
--- /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/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index 70570b7..bd0bbe3 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -188,6 +188,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/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/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/RunCMakeTest.cmake b/Tests/RunCMake/target_link_options/RunCMakeTest.cmake
index cdfdd7b..9fdcdee 100644
--- a/Tests/RunCMake/target_link_options/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_link_options/RunCMakeTest.cmake
@@ -27,6 +27,23 @@ 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)
+
unset(RunCMake_TEST_OPTIONS)
unset(RunCMake_TEST_OUTPUT_MERGE)
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}>)
diff --git a/Tests/SwiftOnly/CMakeLists.txt b/Tests/SwiftOnly/CMakeLists.txt
index f4cbac2..e24279b 100644
--- a/Tests/SwiftOnly/CMakeLists.txt
+++ b/Tests/SwiftOnly/CMakeLists.txt
@@ -1,4 +1,16 @@
cmake_minimum_required(VERSION 3.3)
+
+# NOTE: Force the Release mode configuration as there are some issues with the
+# debug information handling on macOS on certain Xcode builds.
+if(NOT CMAKE_CONFIGURATION_TYPES)
+ set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build" FORCE)
+endif()
+
+# NOTE: enable shared libraries by default. Older Xcode releases do not play
+# well with static libraries, and Windows does not currently support static
+# libraries in Swift.
+set(BUILD_SHARED_LIBS YES)
+
project(SwiftOnly Swift)
if(NOT XCODE_VERSION VERSION_LESS 10.2)
@@ -7,7 +19,19 @@ elseif(NOT XCODE_VERSION VERSION_LESS 8.0)
set(CMAKE_Swift_LANGUAGE_VERSION 3.0)
endif()
+set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift)
+
add_executable(SwiftOnly main.swift)
+add_library(L L.swift)
+
+add_library(M M.swift)
+target_link_libraries(M PUBLIC
+ L)
+
+add_library(N N.swift)
+target_link_libraries(N PUBLIC
+ M)
+
# Dummy to make sure generation works with such targets.
add_library(SwiftIface INTERFACE)
diff --git a/Tests/SwiftOnly/L.swift b/Tests/SwiftOnly/L.swift
new file mode 100644
index 0000000..79ff87e
--- /dev/null
+++ b/Tests/SwiftOnly/L.swift
@@ -0,0 +1 @@
+public let ThirtyTwo: Int = 32
diff --git a/Tests/SwiftOnly/M.swift b/Tests/SwiftOnly/M.swift
new file mode 100644
index 0000000..dd333fe
--- /dev/null
+++ b/Tests/SwiftOnly/M.swift
@@ -0,0 +1,2 @@
+import L
+public let SixtyFour: Int = ThirtyTwo * 2
diff --git a/Tests/SwiftOnly/N.swift b/Tests/SwiftOnly/N.swift
new file mode 100644
index 0000000..990ddf9
--- /dev/null
+++ b/Tests/SwiftOnly/N.swift
@@ -0,0 +1,2 @@
+import M
+public let OneTwentyEight = SixtyFour * 2
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt
index 9ec9b70..df921d8 100644
--- a/Tests/TryCompile/CMakeLists.txt
+++ b/Tests/TryCompile/CMakeLists.txt
@@ -187,7 +187,7 @@ try_compile(SHOULD_FAIL_DUE_TO_BAD_SOURCE
if(SHOULD_FAIL_DUE_TO_BAD_SOURCE AND NOT CMAKE_GENERATOR MATCHES "Watcom WMake|NMake Makefiles")
string(REPLACE "\n" "\n " output " ${output}")
message(SEND_ERROR "try_compile with bad#source.c did not fail:\n${output}")
-elseif(NOT output MATCHES [[(bad#source\.c|bad\\)]])
+elseif(NOT output MATCHES [[(bad#source\.c|bad\.c|bad')]])
string(REPLACE "\n" "\n " output " ${output}")
message(SEND_ERROR "try_compile with bad#source.c failed without mentioning bad source:\n${output}")
else()
diff --git a/Tests/UseSWIG/BasicConfiguration.cmake b/Tests/UseSWIG/BasicConfiguration.cmake
index fd3ac40..d054953 100644
--- a/Tests/UseSWIG/BasicConfiguration.cmake
+++ b/Tests/UseSWIG/BasicConfiguration.cmake
@@ -18,6 +18,9 @@ unset(SWIG_LANG_LIBRARIES)
if(${language} MATCHES csharp)
set(SWIG_LANG_TYPE TYPE SHARED)
endif()
+if(${language} MATCHES fortran)
+ set(SWIG_LANG_TYPE TYPE SHARED)
+endif()
if(${language} MATCHES python)
find_package(Python REQUIRED COMPONENTS Interpreter Development)
set(SWIG_LANG_INCLUDE_DIRECTORIES ${Python_INCLUDE_DIRS})
diff --git a/Tests/UseSWIG/BasicFortran/CMakeLists.txt b/Tests/UseSWIG/BasicFortran/CMakeLists.txt
new file mode 100644
index 0000000..e81fb85
--- /dev/null
+++ b/Tests/UseSWIG/BasicFortran/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 3.12...3.13)
+
+project(TestBasicFortran CXX Fortran)
+
+include(CTest)
+
+set(language "fortran")
+
+include (../BasicConfiguration.cmake)
+get_target_property(EXAMPLE_PREFIX example PREFIX)
+if (NOT EXAMPLE_PREFIX STREQUAL "${CMAKE_SHARED_LIBRARY_PREFIX}"
+ AND NOT EXAMPLE_PREFIX STREQUAL "EXAMPLE_PREFIX-NOTFOUND")
+ message(FATAL_ERROR "Unexpected library prefix on target: got "
+ "'${EXAMPLE_PREFIX}' but expected '${CMAKE_SHARED_LIBRARY_PREFIX}'")
+endif()
+
+
+add_executable(runme ${CMAKE_CURRENT_SOURCE_DIR}/../runme.f90)
+target_link_libraries(runme example)
+set_target_properties(runme PROPERTIES LINKER_LANGUAGE Fortran)
+
+add_test (NAME BasicFortran
+ COMMAND $<TARGET_FILE:runme>)
diff --git a/Tests/UseSWIG/CMakeLists.txt b/Tests/UseSWIG/CMakeLists.txt
index 3cc910f..d102846 100644
--- a/Tests/UseSWIG/CMakeLists.txt
+++ b/Tests/UseSWIG/CMakeLists.txt
@@ -55,6 +55,21 @@ add_test(NAME UseSWIG.BasicPerl COMMAND
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
+if (CMake_TEST_UseSWIG_Fortran)
+ check_language(Fortran)
+ if (CMAKE_Fortran_COMPILER)
+ add_test(NAME UseSWIG.BasicFortran COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/UseSWIG/BasicFortran"
+ "${CMake_BINARY_DIR}/Tests/UseSWIG/BasicFortran"
+ ${build_generator_args}
+ --build-project TestBasicFortran
+ --build-options ${build_options}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
+ endif()
+endif()
add_test(NAME UseSWIG.MultipleModules COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
diff --git a/Tests/UseSWIG/runme.f90 b/Tests/UseSWIG/runme.f90
new file mode 100644
index 0000000..1d985d3
--- /dev/null
+++ b/Tests/UseSWIG/runme.f90
@@ -0,0 +1,77 @@
+! File : runme.f90
+program runme
+ use ISO_FORTRAN_ENV
+ implicit none
+ integer, parameter :: STDOUT = OUTPUT_UNIT
+
+ call run()
+contains
+
+subroutine run()
+ use example
+ use iso_c_binding
+ implicit none
+
+ type(Circle) :: c
+ type(Square), target :: s ! 'target' allows it to be pointed to
+ class(Shape), pointer :: sh
+ integer(C_INT) :: n_shapes
+
+ ! ----- Object creation -----
+
+ write(STDOUT,*) "Creating some objects"
+ c = Circle(10.0d0)
+ s = Square(10.0d0)
+
+ ! ----- Access a static member -----
+ write(STDOUT,'(a,i2,a)')"A total of", s%get_nshapes(), " shapes were created"
+
+ ! ----- Member data access -----
+
+ ! Notice how we can do this using functions specific to
+ ! the 'Circle' class.
+ call c%set_x(20.0d0)
+ call c%set_y(30.0d0)
+
+ ! Now use the same functions in the base class
+ sh => s
+ call sh%set_x(-10.0d0)
+ call sh%set_y( 5.0d0)
+
+ write(STDOUT,*)"Here is their current position:"
+ write(STDOUT,'(a,f5.1,a,f5.1,a)')" Circle = (", c%get_x(), ",", c%get_y(), " )"
+ write(STDOUT,'(a,f5.1,a,f5.1,a)')" Square = (", s%get_x(), ",", s%get_y(), " )"
+
+ ! ----- Call some methods -----
+
+ write(STDOUT,*)"Here are some properties of the shapes:"
+ call print_shape(c)
+ call print_shape(s)
+
+ ! ----- Delete everything -----
+
+ ! Note: this invokes the virtual destructor
+ call c%release()
+ call s%release()
+
+ n_shapes = c%get_nshapes()
+ write(STDOUT,*) n_shapes, "shapes remain"
+ if (n_shapes /= 0) then
+ write(STDOUT,*) "Shapes were not freed properly!"
+ stop 1
+ endif
+
+ write(STDOUT,*) "Goodbye"
+end subroutine
+
+subroutine print_shape(s)
+ use example, only : Shape
+ use iso_c_binding
+ implicit none
+ class(Shape), intent(in) :: s
+
+ write(STDOUT,*)" area = ",s%area()
+ write(STDOUT,*)" perimeter = ",s%perimeter()
+end subroutine
+
+end program
diff --git a/Tests/VSWinStorePhone/CMakeLists.txt b/Tests/VSWinStorePhone/CMakeLists.txt
index b8e157d..558d5de 100644
--- a/Tests/VSWinStorePhone/CMakeLists.txt
+++ b/Tests/VSWinStorePhone/CMakeLists.txt
@@ -127,7 +127,7 @@ set_property(SOURCE ${VERTEXSHADER_FILES} PROPERTY VS_SHADER_ENTRYPOINT mainVS)
set_property(SOURCE ${VERTEXSHADER_FILES} PROPERTY VS_SHADER_MODEL 4.0_level_9_3)
set_property(SOURCE ${VERTEXSHADER_FILES} PROPERTY VS_SHADER_FLAGS "/DFLAGS_ADDED")
set_property(SOURCE ${VERTEXSHADER_FILES} PROPERTY VS_SHADER_OUTPUT_HEADER_FILE "$(OutDir)%(Filename).h")
-
+set_property(SOURCE ${VERTEXSHADER_FILES} PROPERTY VS_SETTINGS "$<$<CONFIG:DEBUG>:SourceProperty1=SourceProperty1Value>")
source_group("Source Files" FILES ${SOURCE_FILES})
source_group("Header Files" FILES ${HEADER_FILES})
@@ -135,6 +135,11 @@ source_group("Resource Files" FILES ${RESOURCE_FILES})
add_executable(${EXE_NAME} WIN32 ${SOURCE_FILES} ${HEADER_FILES} ${RESOURCE_FILES})
set_property(TARGET ${EXE_NAME} PROPERTY VS_WINRT_COMPONENT TRUE)
+set_property(TARGET ${EXE_NAME} PROPERTY VS_SOURCE_SETTINGS_FXCompile
+ "TargetProperty1=$<$<CONFIG:DEBUG>:TargetProperty1ValueDebug>$<$<CONFIG:RELEASE>:TargetProperty1ValueRelease>")
+
+add_custom_command(TARGET ${EXE_NAME} POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -Dvcxproj="${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}.vcxproj" -P "${CMAKE_CURRENT_SOURCE_DIR}/EnsurePropertiesSet.cmake")
string(SUBSTRING "${CMAKE_SYSTEM_VERSION}" 0, 4, SHORT_VERSION)
diff --git a/Tests/VSWinStorePhone/EnsurePropertiesSet.cmake b/Tests/VSWinStorePhone/EnsurePropertiesSet.cmake
new file mode 100644
index 0000000..528c46f
--- /dev/null
+++ b/Tests/VSWinStorePhone/EnsurePropertiesSet.cmake
@@ -0,0 +1,45 @@
+macro(ensure_props_set projectFile)
+ if(NOT EXISTS "${projectFile}")
+ message(FATAL_ERROR "Project file ${projectFile} does not exist.")
+ return()
+ endif()
+
+ set(SourcePropertyFound FALSE)
+ set(DebugTargetPropertyFound FALSE)
+ set(ReleaseTargetPropertyFound FALSE)
+
+ file(STRINGS "${projectFile}" lines)
+ foreach(line IN LISTS lines)
+ if(line MATCHES "<SourceProperty1.*Debug.*>SourceProperty1Value</SourceProperty1>")
+ message("SourceProperty1 setting found")
+ set(SourcePropertyFound TRUE)
+ endif()
+
+ if(line MATCHES "<TargetProperty1.*Debug.*>TargetProperty1ValueDebug</TargetProperty1>")
+ message("Debug TargetProperty1 setting found")
+ set(DebugTargetPropertyFound TRUE)
+ endif()
+
+ if(line MATCHES "<TargetProperty1.*Release.*>TargetProperty1ValueRelease</TargetProperty1>")
+ message("Release TargetProperty1 setting found")
+ set(ReleaseTargetPropertyFound TRUE)
+ endif()
+ endforeach()
+
+ if (NOT SourcePropertyFound)
+ message(FATAL_ERROR "SourceProperty1 setting not found")
+ return()
+ endif()
+
+ if (NOT DebugTargetPropertyFound)
+ message(FATAL_ERROR "Debug TargetProperty1 setting not found")
+ return()
+ endif()
+
+ if (NOT ReleaseTargetPropertyFound)
+ message(FATAL_ERROR "Release TargetProperty1 setting not found")
+ return()
+ endif()
+endmacro()
+
+ensure_props_set("${vcxproj}")