diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-01-13 16:33:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-24 14:11:05 (GMT) |
commit | ae1e1909a13fa6e68c33fe92cc8f5c76c30df76f (patch) | |
tree | 20f52a77199a163a7e8f4fd6a786ba1b77ac22f9 /Tests/RunCMake/include_external_msproject | |
parent | 93d414861251cb6c88021756f53621160b98bf96 (diff) | |
download | CMake-ae1e1909a13fa6e68c33fe92cc8f5c76c30df76f.zip CMake-ae1e1909a13fa6e68c33fe92cc8f5c76c30df76f.tar.gz CMake-ae1e1909a13fa6e68c33fe92cc8f5c76c30df76f.tar.bz2 |
VS: Add support for .NET Standard and .NET Core
Fixes: #20105
Diffstat (limited to 'Tests/RunCMake/include_external_msproject')
3 files changed, 30 insertions, 0 deletions
diff --git a/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake b/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake index 47dac34..7ed0773 100644 --- a/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake +++ b/Tests/RunCMake/include_external_msproject/RunCMakeTest.cmake @@ -5,3 +5,7 @@ run_cmake(CustomGuid) run_cmake(CustomTypePlatform) run_cmake(CustomGuidTypePlatform) run_cmake(CustomConfig) + +if(RunCMake_GENERATOR MATCHES "Visual Studio ([^9]|9[0-9])") + run_cmake(SkipGetTargetFrameworkProperties) +endif() diff --git a/Tests/RunCMake/include_external_msproject/SkipGetTargetFrameworkProperties-check.cmake b/Tests/RunCMake/include_external_msproject/SkipGetTargetFrameworkProperties-check.cmake new file mode 100644 index 0000000..375b231 --- /dev/null +++ b/Tests/RunCMake/include_external_msproject/SkipGetTargetFrameworkProperties-check.cmake @@ -0,0 +1,21 @@ +file(READ "${RunCMake_TEST_BINARY_DIR}/ALL_BUILD.vcxproj" all_build) + +macro(project_reference EXTERNAL_PROJECT) + string(REGEX MATCH + "<ProjectReference.Include=.${${EXTERNAL_PROJECT}}.>.*</SkipGetTargetFrameworkProperties>" + EndOfProjectReference + ${all_build} + ) +endmacro() + +set(external_project "external.project") +project_reference(external_project) +if(NOT ${EndOfProjectReference} MATCHES ".*</ProjectReference>") + set(RunCMake_TEST_FAILED "${test} is being set unexpectedly.") +endif() + +set(external_project "external.csproj") +project_reference(external_project) +if(${EndOfProjectReference} MATCHES ".*</ProjectReference>") + set(RunCMake_TEST_FAILED "${test} is not set.") +endif() diff --git a/Tests/RunCMake/include_external_msproject/SkipGetTargetFrameworkProperties.cmake b/Tests/RunCMake/include_external_msproject/SkipGetTargetFrameworkProperties.cmake new file mode 100644 index 0000000..f660bd0 --- /dev/null +++ b/Tests/RunCMake/include_external_msproject/SkipGetTargetFrameworkProperties.cmake @@ -0,0 +1,5 @@ +include_external_msproject(external1 external.project + GUID aaa-bbb-ccc-000) + +include_external_msproject(external2 external.csproj + GUID aaa-bbb-ccc-001) |