|
|
@@ -0,0 +1,41 @@
|
|
|
+macro(VsDefaultFlags_check tgt)
|
|
|
+ set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/${tgt}.vcxproj")
|
|
|
+ if(NOT EXISTS "${vcProjectFile}")
|
|
|
+ set(RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj does not exist.")
|
|
|
+ return()
|
|
|
+ endif()
|
|
|
+
|
|
|
+ set(HAVE_ForceConformanceInForLoopScope 0)
|
|
|
+ set(HAVE_RemoveUnreferencedCodeData 0)
|
|
|
+ set(HAVE_TreatWChar_tAsBuiltInType 0)
|
|
|
+
|
|
|
+ file(STRINGS "${vcProjectFile}" lines)
|
|
|
+ foreach(line IN LISTS lines)
|
|
|
+ if(line MATCHES "^ *<ForceConformanceInForLoopScope></ForceConformanceInForLoopScope>")
|
|
|
+ set(HAVE_ForceConformanceInForLoopScope 1)
|
|
|
+ endif()
|
|
|
+ if(line MATCHES "^ *<RemoveUnreferencedCodeData></RemoveUnreferencedCodeData>")
|
|
|
+ set(HAVE_RemoveUnreferencedCodeData 1)
|
|
|
+ endif()
|
|
|
+ if(line MATCHES "^ *<TreatWChar_tAsBuiltInType></TreatWChar_tAsBuiltInType>")
|
|
|
+ set(HAVE_TreatWChar_tAsBuiltInType 1)
|
|
|
+ endif()
|
|
|
+ endforeach()
|
|
|
+
|
|
|
+ if(NOT HAVE_ForceConformanceInForLoopScope)
|
|
|
+ set(RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj does not have a <ForceConformanceInForLoopScope> property.")
|
|
|
+ return()
|
|
|
+ endif()
|
|
|
+
|
|
|
+ if(NOT HAVE_RemoveUnreferencedCodeData)
|
|
|
+ set(RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj does not have a <RemoveUnreferencedCodeData> property.")
|
|
|
+ return()
|
|
|
+ endif()
|
|
|
+
|
|
|
+ if(NOT HAVE_TreatWChar_tAsBuiltInType)
|
|
|
+ set(RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj does not have a <TreatWChar_tAsBuiltInType> property.")
|
|
|
+ return()
|
|
|
+ endif()
|
|
|
+endmacro()
|
|
|
+
|
|
|
+VsDefaultFlags_check(empty)
|