[compiler-rt] r201666 - [CMake] Introduce COMPILER_RT_INCLUDE_TESTS option
Alexey Samsonov
samsonov at google.com
Wed Feb 19 03:18:47 PST 2014
Author: samsonov
Date: Wed Feb 19 05:18:47 2014
New Revision: 201666
URL: http://llvm.org/viewvc/llvm-project?rev=201666&view=rev
Log:
[CMake] Introduce COMPILER_RT_INCLUDE_TESTS option
Modified:
compiler-rt/trunk/CMakeLists.txt
compiler-rt/trunk/lib/asan/CMakeLists.txt
compiler-rt/trunk/lib/msan/CMakeLists.txt
compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
compiler-rt/trunk/lib/tsan/CMakeLists.txt
compiler-rt/trunk/test/asan/CMakeLists.txt
compiler-rt/trunk/test/msan/CMakeLists.txt
compiler-rt/trunk/test/tsan/CMakeLists.txt
Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=201666&r1=201665&r2=201666&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Wed Feb 19 05:18:47 2014
@@ -38,12 +38,15 @@ if (NOT COMPILER_RT_STANDALONE_BUILD)
# Setup the paths where compiler-rt runtimes and headers should be stored.
set(COMPILER_RT_OUTPUT_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION})
set(COMPILER_RT_INSTALL_PATH lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION})
+ option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests."
+ ${LLVM_INCLUDE_TESTS})
else()
# Take output dir and install path from the user.
set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
"Path where built compiler-rt libraries should be stored.")
set(COMPILER_RT_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} CACHE PATH
"Path where built compiler-rt libraries should be installed.")
+ option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." OFF)
set(LLVM_CONFIG_PATH "" CACHE PATH "Path to llvm-config binary")
if (NOT LLVM_CONFIG_PATH)
@@ -296,7 +299,7 @@ endif()
add_subdirectory(lib)
-if(LLVM_INCLUDE_TESTS)
+if(COMPILER_RT_INCLUDE_TESTS)
add_subdirectory(unittests)
endif()
add_subdirectory(test)
Modified: compiler-rt/trunk/lib/asan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/CMakeLists.txt?rev=201666&r1=201665&r2=201666&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/CMakeLists.txt Wed Feb 19 05:18:47 2014
@@ -135,6 +135,6 @@ add_compiler_rt_resource_file(asan_black
add_dependencies(asan asan_blacklist)
add_dependencies(compiler-rt asan)
-if(LLVM_INCLUDE_TESTS)
+if(COMPILER_RT_INCLUDE_TESTS)
add_subdirectory(tests)
endif()
Modified: compiler-rt/trunk/lib/msan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/CMakeLists.txt?rev=201666&r1=201665&r2=201666&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/msan/CMakeLists.txt Wed Feb 19 05:18:47 2014
@@ -37,6 +37,6 @@ add_compiler_rt_resource_file(msan_black
add_dependencies(msan msan_blacklist)
add_dependencies(compiler-rt msan)
-if(LLVM_INCLUDE_TESTS)
+if(COMPILER_RT_INCLUDE_TESTS)
add_subdirectory(tests)
endif()
Modified: compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt?rev=201666&r1=201665&r2=201666&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt Wed Feb 19 05:18:47 2014
@@ -137,6 +137,6 @@ endif()
add_dependencies(compiler-rt sanitizer_common)
# Unit tests for common sanitizer runtime.
-if(LLVM_INCLUDE_TESTS)
+if(COMPILER_RT_INCLUDE_TESTS)
add_subdirectory(tests)
endif()
Modified: compiler-rt/trunk/lib/tsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/CMakeLists.txt?rev=201666&r1=201665&r2=201666&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/tsan/CMakeLists.txt Wed Feb 19 05:18:47 2014
@@ -73,6 +73,6 @@ endif()
add_dependencies(compiler-rt tsan)
-if(LLVM_INCLUDE_TESTS)
+if(COMPILER_RT_INCLUDE_TESTS)
add_subdirectory(tests)
endif()
Modified: compiler-rt/trunk/test/asan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/CMakeLists.txt?rev=201666&r1=201665&r2=201666&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/asan/CMakeLists.txt Wed Feb 19 05:18:47 2014
@@ -39,7 +39,7 @@ if(CAN_TARGET_i386)
list(APPEND ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/32bitConfig)
endif()
-if(LLVM_INCLUDE_TESTS)
+if(COMPILER_RT_INCLUDE_TESTS)
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
@@ -53,7 +53,7 @@ set(ASAN_TEST_DEPS
set(ASAN_TEST_PARAMS
asan_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
# FIXME: support unit test in the android test runner
-if(LLVM_INCLUDE_TESTS AND NOT CAN_TARGET_arm_android)
+if(COMPILER_RT_INCLUDE_TESTS AND NOT CAN_TARGET_arm_android)
list(APPEND ASAN_TEST_DEPS AsanUnitTests)
list(APPEND ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Unit)
endif()
Modified: compiler-rt/trunk/test/msan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/CMakeLists.txt?rev=201666&r1=201665&r2=201666&view=diff
==============================================================================
--- compiler-rt/trunk/test/msan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/msan/CMakeLists.txt Wed Feb 19 05:18:47 2014
@@ -8,7 +8,7 @@ set(MSAN_TEST_DEPS
${SANITIZER_COMMON_LIT_TEST_DEPS}
msan)
-if(LLVM_INCLUDE_TESTS AND COMPILER_RT_HAS_LIBCXX_SOURCES)
+if(COMPILER_RT_INCLUDE_TESTS AND COMPILER_RT_HAS_LIBCXX_SOURCES)
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg)
Modified: compiler-rt/trunk/test/tsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/CMakeLists.txt?rev=201666&r1=201665&r2=201666&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/tsan/CMakeLists.txt Wed Feb 19 05:18:47 2014
@@ -6,7 +6,7 @@ set(TSAN_TEST_DEPS
${SANITIZER_COMMON_LIT_TEST_DEPS}
tsan)
-if(LLVM_INCLUDE_TESTS)
+if(COMPILER_RT_INCLUDE_TESTS)
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg)
More information about the llvm-commits
mailing list