summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/include_external_msproject/SkipGetTargetFrameworkProperties-check.cmake
blob: 375b231221b9db01b6d78a03827cec9a5f262421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()