[libcxxabi] r322870 - [cmake] [libcxxabi] Don't print warning when tests are disabled.

Don Hinton via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 18 10:29:36 PST 2018


Author: dhinton
Date: Thu Jan 18 10:29:36 2018
New Revision: 322870

URL: http://llvm.org/viewvc/llvm-project?rev=322870&view=rev
Log:
[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

Modified:
    libcxxabi/trunk/CMakeLists.txt

Modified: libcxxabi/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/CMakeLists.txt?rev=322870&r1=322869&r2=322870&view=diff
==============================================================================
--- libcxxabi/trunk/CMakeLists.txt (original)
+++ libcxxabi/trunk/CMakeLists.txt Thu Jan 18 10:29:36 2018
@@ -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()




More information about the cfe-commits mailing list