summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-validation.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/target_link_options/genex_DEVICE_LINK-validation.cmake')
-rw-r--r--Tests/RunCMake/target_link_options/genex_DEVICE_LINK-validation.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-validation.cmake b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-validation.cmake
new file mode 100644
index 0000000..28f5d01
--- /dev/null
+++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-validation.cmake
@@ -0,0 +1,22 @@
+
+if (NOT DEFINED DEVICE_LINK)
+ set (DEVICE_LINK FALSE)
+endif()
+
+if (DEVICE_LINK)
+ set (VALID_ID DEVICE_LINK)
+ set (INVALID_ID NORMAL_LINK)
+else()
+ set (VALID_ID NORMAL_LINK)
+ set (INVALID_ID DEVICE_LINK)
+endif()
+
+if (NOT actual_stdout MATCHES "BADFLAG_${VALID_ID}")
+ set (RunCMake_TEST_FAILED "Not found expected 'BADFLAG_${VALID_ID}'.")
+endif()
+if (actual_stdout MATCHES "BADFLAG_${INVALID_ID}")
+ if (RunCMake_TEST_FAILED)
+ string (APPEND RunCMake_TEST_FAILED "\n")
+ endif()
+ string (APPEND RunCMake_TEST_FAILED "Found unexpected 'BADFLAG_${INVALID_ID}'.")
+endif()