summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VS10Project/NoImpLib-check.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/VS10Project/NoImpLib-check.cmake')
-rw-r--r--Tests/RunCMake/VS10Project/NoImpLib-check.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/Tests/RunCMake/VS10Project/NoImpLib-check.cmake b/Tests/RunCMake/VS10Project/NoImpLib-check.cmake
new file mode 100644
index 0000000..50722b2
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/NoImpLib-check.cmake
@@ -0,0 +1,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_ImportLibrary 0)
+set(found_TargetExt_dll 0)
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "<ImportLibrary>")
+ set(found_ImportLibrary 1)
+ endif()
+ if(line MATCHES "<TargetExt[^\n]*\\.dll")
+ set(found_TargetExt_dll 1)
+ endif()
+endforeach()
+if(found_ImportLibrary)
+ string(APPEND RunCMake_TEST_FAILED "ImportLibrary incorrectly found in\n ${vcProjectFile}\n")
+endif()
+if(NOT found_TargetExt_dll)
+ string(APPEND RunCMake_TEST_FAILED "TargetExt not found in\n ${vcProjectFile}\n")
+endif()