summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Hinton <hintonda@gmail.com>2018-01-18 18:29:36 +0000
committerDon Hinton <hintonda@gmail.com>2018-01-18 18:29:36 +0000
commit964ea50ff84e3b15a47f7672ee435b5308c2a62b (patch)
treec06e715956513332671bf06b7fd4b29fec2d73a9
parent9f49676a8a6720bb69e93fa3fecd70fa84d05c20 (diff)
downloadbcm5719-llvm-964ea50ff84e3b15a47f7672ee435b5308c2a62b.tar.gz
bcm5719-llvm-964ea50ff84e3b15a47f7672ee435b5308c2a62b.zip
[cmake] [libcxxabi] Don't print warning when tests are disabled.
Summary: Don't print, possibly erroneous, warning if LIBCXXABI_INCLUDE_TESTS is false. This patch fixes a problem introduced in r291367. Differential Revision: https://reviews.llvm.org/D42229 llvm-svn: 322870
-rw-r--r--libcxxabi/CMakeLists.txt31
1 files changed, 17 insertions, 14 deletions
diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index cc27aedf0ec..dd43da2f5cb 100644
--- a/libcxxabi/CMakeLists.txt
+++ b/libcxxabi/CMakeLists.txt
@@ -440,18 +440,21 @@ endif()
# soname, etc...
add_subdirectory(src)
-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-
- # standalone build).
- message(WARNING "The libc++abi tests aren't valid when libc++abi is built "
- "standalone (i.e. outside of llvm/projects/libcxxabi ) and "
- "is built without a shared library. Either build a shared "
- "library, build libc++abi at the same time as you build "
- "libc++, or do without testing. No check target will be "
- "available!")
-else()
- add_subdirectory(test)
- add_subdirectory(fuzz)
+if (LIBCXXABI_INCLUDE_TESTS)
+ if (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- standalone build).
+ message(WARNING "The libc++abi tests aren't valid when libc++abi "
+ "is built standalone (i.e. outside of "
+ "llvm/projects/libcxxabi ) and is built without "
+ "a shared library. Either build a shared "
+ "library, build libc++abi at the same time as "
+ "you build libc++, or do without testing. No "
+ "check target will be available!")
+ else()
+ add_subdirectory(test)
+ add_subdirectory(fuzz)
+ endif()
endif()
OpenPOWER on IntegriCloud