summaryrefslogtreecommitdiffstats
path: root/libcxx/cmake/Modules/HandleLibcxxFlags.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/cmake/Modules/HandleLibcxxFlags.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