summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-06-11 23:59:26 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-06-11 23:59:26 +0000
commit0b727c2521423f19b1a00003fba2f9d8030d1cf8 (patch)
treeb7152aa4697014643bbcfee79605f2236cfe683b /src
parentc03d53cadbd4f7629bc5ad83035018252b8b9b7b (diff)
build: use cmake to pass -std=c++11
Rather than manually checking for support for the spelling of the C++ standard, indicate to CMake that we require that the compiler support C++11 and that we compile without the GNU extensions. This simplifies the flags handling in libc++abi itself by relying on CMake to translate the flag and add it as appropriate. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@305175 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d4a68fc..ff47ed3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -111,6 +111,12 @@ endif()
add_library(cxxabi_objects OBJECT ${LIBCXXABI_SOURCES} ${LIBCXXABI_HEADERS})
set_target_properties(cxxabi_objects
PROPERTIES
+ CXX_EXTENSIONS
+ OFF
+ CXX_STANDARD
+ 11
+ CXX_STANDARD_REQUIRED
+ ON
COMPILE_FLAGS
"${LIBCXXABI_COMPILE_FLAGS}"
POSITION_INDEPENDENT_CODE
@@ -124,6 +130,12 @@ if (LIBCXXABI_ENABLE_SHARED)
target_link_libraries(cxxabi_shared ${LIBCXXABI_LIBRARIES})
set_target_properties(cxxabi_shared
PROPERTIES
+ CXX_EXTENSIONS
+ OFF
+ CXX_STANDARD
+ 11
+ CXX_STANDARD_REQUIRED
+ ON
LINK_FLAGS
"${LIBCXXABI_LINK_FLAGS} ${LIBCXXABI_SHARED_LINK_FLAGS}"
OUTPUT_NAME
@@ -143,6 +155,12 @@ if (LIBCXXABI_ENABLE_STATIC)
target_link_libraries(cxxabi_static ${LIBCXXABI_LIBRARIES})
set_target_properties(cxxabi_static
PROPERTIES
+ CXX_EXTENSIONS
+ OFF
+ CXX_STANDARD
+ 11
+ CXX_STANDARD_REQUIRED
+ ON
LINK_FLAGS
"${LIBCXXABI_LINK_FLAGS}"
OUTPUT_NAME