[libcxxabi] r291367 - [libcxxabi] Add flag to conditionally enable tests

Bryant Wong via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 7 14:14:04 PST 2017


Author: bryant
Date: Sat Jan  7 16:14:04 2017
New Revision: 291367

URL: http://llvm.org/viewvc/llvm-project?rev=291367&view=rev
Log:
[libcxxabi] Add flag to conditionally enable tests

Differential Revision: https://reviews.llvm.org/D28449

Modified:
    libcxxabi/trunk/CMakeLists.txt

Modified: libcxxabi/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/CMakeLists.txt?rev=291367&r1=291366&r2=291367&view=diff
==============================================================================
--- libcxxabi/trunk/CMakeLists.txt (original)
+++ libcxxabi/trunk/CMakeLists.txt Sat Jan  7 16:14:04 2017
@@ -122,6 +122,7 @@ option(LIBCXXABI_HAS_EXTERNAL_THREAD_API
   "Build libc++abi with an externalized threading API.
   This option may only be set to ON when LIBCXXABI_ENABLE_THREADS=ON." OFF)
 option(LIBCXXABI_BUILD_32_BITS "Build 32 bit libc++abi." ${LLVM_BUILD_32_BITS})
+option(LIBCXXABI_INCLUDE_TESTS "Generate build targets for the libc++abi unit tests." ${LLVM_INCLUDE_TESTS})
 set(LIBCXXABI_TARGET_TRIPLE "" CACHE STRING "Target triple for cross compiling.")
 set(LIBCXXABI_GCC_TOOLCHAIN "" CACHE PATH "GCC toolchain for cross compiling.")
 set(LIBCXXABI_SYSROOT "" CACHE PATH "Sysroot for cross compiling.")
@@ -448,7 +449,7 @@ endif()
 # soname, etc...
 add_subdirectory(src)
 
-if (LIBCXXABI_STANDALONE_BUILD AND NOT LIBCXXABI_ENABLE_SHARED)
+if (NOT LIBCXXABI_INCLUDE_TESTS OR (LIBCXXABI_STANDALONE_BUILD AND NOT LIBCXXABI_ENABLE_SHARED))
   # We can't reasonably test the system C++ library with a static libc++abi.
   # We either need to be able to replace libc++abi at run time (with a shared
   # libc++abi), or we need to be able to replace the C++ runtime (with a non-




More information about the cfe-commits mailing list