blob: 85e28581b44d9d6aeb8f7826d2c3fbbd49946e46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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(found_LanguageStandard_stdcpp17 0)
set(found_LanguageStandard_C_stdc11 0)
file(STRINGS "${vcProjectFile}" lines)
foreach(line IN LISTS lines)
if(line MATCHES "<LanguageStandard>stdcpp17</LanguageStandard>")
set(found_LanguageStandard_stdcpp17 1)
endif()
if(line MATCHES "<LanguageStandard_C>stdc11</LanguageStandard_C>")
set(found_LanguageStandard_C_stdc11 1)
endif()
endforeach()
if(NOT found_LanguageStandard_stdcpp17)
string(APPEND RunCMake_TEST_FAILED "LanguageStandard stdcpp17 not found in\n ${vcProjectFile}\n")
endif()
if(NOT found_LanguageStandard_C_stdc11)
string(APPEND RunCMake_TEST_FAILED "LanguageStandard_C stdc11 not found in\n ${vcProjectFile}\n")
endif()
|