[PATCH] D22843: cmake: Option to enable/disable bitcode + clang version check
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 19:01:02 PDT 2016
MatzeB created this revision.
MatzeB added a reviewer: asbirlea.
MatzeB added subscribers: mehdi_amini, llvm-commits.
MatzeB set the repository for this revision to rL LLVM.
Herald added a subscriber: mcrosier.
Add an option to enable/disable bitcode tests. The option is enabled automatically if "mainline" clang (as opposed to apple clang) is detected with a new enough version.
Repository:
rL LLVM
https://reviews.llvm.org/D22843
Files:
Bitcode/CMakeLists.txt
Index: Bitcode/CMakeLists.txt
===================================================================
--- Bitcode/CMakeLists.txt
+++ Bitcode/CMakeLists.txt
@@ -1,7 +1,17 @@
-if(NOT TEST_SUITE_BENCHMARKING_ONLY)
- llvm_add_subdirectories(Regression)
- if(ARCH STREQUAL "x86")
- llvm_add_subdirectories(simd_ops)
- endif()
+# We need at least clang 3.9 to process the bitcode here.
+if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND
+ CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
+ NOT CMAKE_C_COMPILER_VERSION VERSION_LESS "3.9" AND
+ NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.9")
+ set(ENABLE_BITCODE_DEFAULT "True")
endif()
+set(TEST_SUITE_ENABLE_BITCODE_TESTS ${ENABLE_BITCODE_DEFAULT} CACHE BOOL "Enable bitcode tests")
+if(TEST_SUITE_ENABLE_BITCODE_TESTS)
+ if(NOT TEST_SUITE_BENCHMARKING_ONLY)
+ llvm_add_subdirectories(Regression)
+ if(ARCH STREQUAL "x86")
+ llvm_add_subdirectories(simd_ops)
+ endif()
+ endif()
+endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22843.65646.patch
Type: text/x-patch
Size: 956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160727/e5db4a33/attachment.bin>
More information about the llvm-commits
mailing list