summaryrefslogtreecommitdiffstats
path: root/libcxx/cmake
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2015-10-13 22:12:02 +0000
committerEric Fiselier <eric@efcs.ca>2015-10-13 22:12:02 +0000
commitf9f796e79b95a70346a945a589e833b71123e983 (patch)
treec75b126e469f0ec573e5544a51193077b5e22997 /libcxx/cmake
parenteba62796cb9bb9e4856b4067a0d0117033cb3c1d (diff)
downloadbcm5719-llvm-f9f796e79b95a70346a945a589e833b71123e983.tar.gz
bcm5719-llvm-f9f796e79b95a70346a945a589e833b71123e983.zip
[libcxx] Capture configuration information when installing the libc++ headers
Summary: Hi all, This patch is a successor to D11963. However it has changed dramatically and I felt it would be best to start a new review thread. Please read the design documentation added in this patch for a description of how it works. Reviewers: mclow.lists, danalbert, jroelofs, EricWF Subscribers: vkalintiris, rnk, ed, espositofulvio, asl, eugenis, cfe-commits Differential Revision: http://reviews.llvm.org/D13407 llvm-svn: 250235
Diffstat (limited to 'libcxx/cmake')
-rw-r--r--libcxx/cmake/Modules/HandleLibcxxFlags.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/libcxx/cmake/Modules/HandleLibcxxFlags.cmake b/libcxx/cmake/Modules/HandleLibcxxFlags.cmake
index 223b7b7b8a6..a9e43eaece9 100644
--- a/libcxx/cmake/Modules/HandleLibcxxFlags.cmake
+++ b/libcxx/cmake/Modules/HandleLibcxxFlags.cmake
@@ -49,6 +49,22 @@ macro(define_if_not condition def)
endif()
endmacro()
+macro(config_define_if condition def)
+ if (${condition})
+ set(${def} ON)
+ add_definitions(-D${def})
+ set(LIBCXX_NEEDS_SITE_CONFIG ON)
+ endif()
+endmacro()
+
+macro(config_define_if_not condition def)
+ if (NOT ${condition})
+ set(${def} ON)
+ add_definitions(-D${def})
+ set(LIBCXX_NEEDS_SITE_CONFIG ON)
+ endif()
+endmacro()
+
# Add a specified list of flags to both 'LIBCXX_COMPILE_FLAGS' and
# 'LIBCXX_LINK_FLAGS'.
macro(add_flags)
OpenPOWER on IntegriCloud