[PATCH] D42229: [cmake] [libcxxabi] Don't print warning when tests are disabled.

2018-01-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL322870: [cmake] [libcxxabi] Don't print warning when 
tests are disabled. (authored by dhinton, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D42229

Files:
  libcxxabi/trunk/CMakeLists.txt


Index: libcxxabi/trunk/CMakeLists.txt
===
--- libcxxabi/trunk/CMakeLists.txt
+++ libcxxabi/trunk/CMakeLists.txt
@@ -440,18 +440,21 @@
 # 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()


Index: libcxxabi/trunk/CMakeLists.txt
===
--- libcxxabi/trunk/CMakeLists.txt
+++ libcxxabi/trunk/CMakeLists.txt
@@ -440,18 +440,21 @@
 # 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()
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D42229: [cmake] [libcxxabi] Don't print warning when tests are disabled.

2018-01-17 Thread Don Hinton via Phabricator via cfe-commits
hintonda created this revision.
hintonda added reviewers: compnerd, bryant, beanz.
Herald added a subscriber: mgorny.
Herald added a reviewer: EricWF.
Herald added a reviewer: EricWF.

Don't print, possibly erroneous, warning if
LIBCXXABI_INCLUDE_TESTS is false.

This patch fixes a problem introduced in r291367.


Repository:
  rCXXA libc++abi

https://reviews.llvm.org/D42229

Files:
  CMakeLists.txt


Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -440,18 +440,21 @@
 # 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()


Index: CMakeLists.txt
===
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -440,18 +440,21 @@
 # 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()
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits