about summary refs log tree commit diff homepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt20
1 files changed, 8 insertions, 12 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index a5418a51..2ff9b0eb 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -135,23 +135,19 @@ add_subdirectory(Concrete)
 ###############################################################################
 
 # Find path to libkleeRuntest target for `lit.site.cfg`.
-# FIXME: This is not the right way to get the location of the target we have to
-# set CMP0026 to old.
-# This will likely break if using a multi-configuration generator.
-if (POLICY CMP0026)
-  # HACK: Allow reading `LOCATION` property.
-  cmake_policy(SET CMP0026 OLD)
-endif()
-get_property(LIB_KLEE_RUN_TEST_PATH
-  TARGET kleeRuntest
-  PROPERTY LOCATION
-)
+set(LIB_KLEE_RUN_TEST_PATH $<TARGET_FILE:kleeRuntest>)
 
 configure_file(lit.site.cfg.in
-  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
+  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.imd
   @ONLY
 )
 
+# Evaluate all generator expressions inserted during the configure step.
+file(GENERATE
+  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
+  INPUT  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.imd
+)
+
 add_custom_target(systemtests
   COMMAND "${LIT_TOOL}" ${LIT_ARGS} "${CMAKE_CURRENT_BINARY_DIR}"
   DEPENDS klee kleaver klee-replay kleeRuntest gen-bout gen-random-bout