[test-suite] r313581 - Fix xray CMakeLists.txt

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 15:32:21 PDT 2017


Author: matze
Date: Mon Sep 18 15:32:21 2017
New Revision: 313581

URL: http://llvm.org/viewvc/llvm-project?rev=313581&view=rev
Log:
Fix xray CMakeLists.txt

- cmake would abort with a syntax error if COMPILER_HAS_FXRAY_INSTRUMENT
  was empty.
- Simplify a bunch of expressions; "${A}" can usually be replaced with
  ${A} in cmake: cmake will resolve this as a single argument even when
  there are spaces in the replacement text.

Modified:
    test-suite/trunk/MicroBenchmarks/XRay/CMakeLists.txt

Modified: test-suite/trunk/MicroBenchmarks/XRay/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MicroBenchmarks/XRay/CMakeLists.txt?rev=313581&r1=313580&r2=313581&view=diff
==============================================================================
--- test-suite/trunk/MicroBenchmarks/XRay/CMakeLists.txt (original)
+++ test-suite/trunk/MicroBenchmarks/XRay/CMakeLists.txt Mon Sep 18 15:32:21 2017
@@ -1,6 +1,6 @@
 check_cxx_compiler_flag(-fxray-instrument COMPILER_HAS_FXRAY_INSTRUMENT)
-if("${ARCH}" STREQUAL "x86" AND ${COMPILER_HAS_FXRAY_INSTRUMENT})
-  file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
+if(ARCH STREQUAL "x86" AND COMPILER_HAS_FXRAY_INSTRUMENT)
+  file(COPY lit.local.cfg DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 
   list(APPEND CPPFLAGS -std=c++11 -Wl,--gc-sections -fxray-instrument)
   list(APPEND LDFLAGS -fxray-instrument)
@@ -9,15 +9,15 @@ if("${ARCH}" STREQUAL "x86" AND ${COMPIL
   target_link_libraries(retref-bench benchmark)
 
   file(COPY retref-bench_BM_ReturnNeverInstrumented.test
-       DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
   file(COPY retref-bench_BM_ReturnInstrumentedUnPatched.test
-       DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
   file(COPY retref-bench_BM_ReturnInstrumentedPatchedThenUnpatched.test
-       DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
   file(COPY retref-bench_BM_ReturnInstrumentedPatched.test
-       DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
   file(COPY retref-bench_BM_RDTSCP_Cost.test
-       DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
   file(COPY retref-bench_BM_ReturnInstrumentedPatchedWithLogHandler.test
-       DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
+       DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 endif()




More information about the llvm-commits mailing list