aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-08 17:13:34 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-08 17:13:34 +0000
commit733153a0fb52facba02c550ec849f0c734dfa412 (patch)
tree8f249e8b8f6a7803a81bb0fed33213b9249b7ac1 /CMakeLists.txt
parent2fa809d9eabddd820af54059faa8362dd50b51de (diff)
downloadsrc-733153a0fb52facba02c550ec849f0c734dfa412.tar.gz
src-733153a0fb52facba02c550ec849f0c734dfa412.zip
Vendor import of libc++ trunk r302418:vendor/libc++/libc++-trunk-r302418
Notes
Notes: svn path=/vendor/libc++/dist/; revision=317955 svn path=/vendor/libc++/libc++-trunk-r302418/; revision=317956; tag=vendor/libc++/libc++-trunk-r302418
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ef1726b78d9c..8c25a0a0e40a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -344,7 +344,11 @@ set(LIBCXX_COMPILER ${CMAKE_CXX_COMPILER})
set(LIBCXX_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(LIBCXX_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
-set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
+if (LLVM_LIBRARY_OUTPUT_INTDIR)
+ set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+else()
+ set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
+endif()
file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR})
@@ -627,7 +631,12 @@ endif()
# Create the lit.site.cfg file even when LIBCXX_INCLUDE_TESTS is OFF or
# LLVM_FOUND is OFF. This allows users to run the tests manually using
# LIT without requiring a full LLVM checkout.
-add_subdirectory(test)
+#
+# However, since some submission systems strip test/ subdirectories, check for
+# it before adding it.
+if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test")
+ add_subdirectory(test)
+endif()
if (LIBCXX_INCLUDE_TESTS)
add_subdirectory(lib/abi)
endif()