You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
808 B
26 lines
808 B
7 years ago
|
set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
|
||
|
if(NOT EXISTS "${vcProjectFile}")
|
||
|
set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
|
||
|
return()
|
||
|
endif()
|
||
|
|
||
|
set(foundCMakeLists 0)
|
||
|
file(STRINGS "${vcProjectFile}" lines)
|
||
|
foreach(line IN LISTS lines)
|
||
|
if(line MATCHES "<([A-Za-z0-9_]+) +Include=.*CMakeLists.txt")
|
||
|
set(rule "${CMAKE_MATCH_1}")
|
||
|
if(NOT rule STREQUAL "CustomBuild")
|
||
|
set(RunCMake_TEST_FAILED "CMakeLists.txt referenced as ${rule} instead of CustomBuild")
|
||
|
return()
|
||
|
endif()
|
||
|
if(foundCMakeLists)
|
||
|
set(RunCMake_TEST_FAILED "CMakeLists.txt referenced multiple times")
|
||
|
return()
|
||
|
endif()
|
||
|
set(foundCMakeLists 1)
|
||
|
endif()
|
||
|
endforeach()
|
||
|
if(NOT foundCMakeLists)
|
||
|
set(RunCMake_TEST_FAILED "CMakeLists.txt not referenced")
|
||
|
endif()
|