summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GenEx-DEVICE_LINK/try_compile.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-25 15:29:27 (GMT)
committerBrad King <brad.king@kitware.com>2021-06-25 15:29:46 (GMT)
commita95cbf389015ed71443921e5815369cff30349ee (patch)
tree08680feb23800f3f2570557e64974465fa9dbcb1 /Tests/RunCMake/GenEx-DEVICE_LINK/try_compile.cmake
parent4a0e68266b74479275ca62aca258ca876bc15fc4 (diff)
downloadCMake-a95cbf389015ed71443921e5815369cff30349ee.zip
CMake-a95cbf389015ed71443921e5815369cff30349ee.tar.gz
CMake-a95cbf389015ed71443921e5815369cff30349ee.tar.bz2
Tests: Shorten RunCMake.GenEx-* case names
Reduce the length of the longest path on disk needed by the tests.
Diffstat (limited to 'Tests/RunCMake/GenEx-DEVICE_LINK/try_compile.cmake')
-rw-r--r--Tests/RunCMake/GenEx-DEVICE_LINK/try_compile.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/try_compile.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/try_compile.cmake
new file mode 100644
index 0000000..281f8aa
--- /dev/null
+++ b/Tests/RunCMake/GenEx-DEVICE_LINK/try_compile.cmake
@@ -0,0 +1,9 @@
+
+enable_language(C)
+
+add_library(demo INTERFACE IMPORTED)
+set_property(TARGET demo PROPERTY INTERFACE_LINK_OPTIONS "$<DEVICE_LINK:>")
+
+set(CMAKE_TRY_COMPILE_TARGET_TYPE EXECUTABLE)
+try_compile(result "${CMAKE_CURRENT_BINARY_DIR}/tc" "${CMAKE_CURRENT_SOURCE_DIR}/empty.c"
+ LINK_LIBRARIES demo)