summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2014-11-18 20:37:53 +0000
committerEric Fiselier <eric@efcs.ca>2014-11-18 20:37:53 +0000
commitc365bb5f3fdebf464f4b04ca26ea180c3a331f86 (patch)
treec80f08c9b88e3ee5b11f1857745f2d3d9ead3873 /src/CMakeLists.txt
parent739316681b138814fd8f9241a23dfe69722f154c (diff)
[libcxxabi] Refactor CMakeLists.txt's handling of compile and link flags to suppress warnings.
Summary: This patch mirrors the recent change to libc++ found here http://reviews.llvm.org/D6277. This fixes PR20395 (http://llvm.org/bugs/show_bug.cgi?id=20395). Reviewers: jroelofs, mclow.lists, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6286 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@222252 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 774ef27..3367850 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -58,31 +58,31 @@ endif()
target_link_libraries(cxxabi ${libraries})
# Setup flags.
-append_if(compile_flags LIBCXXABI_HAS_FPIC_FLAG -fPIC)
-append_if(link_flags LIBCXXABI_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs)
+append_if(LIBCXXABI_COMPILE_FLAGS LIBCXXABI_HAS_FPIC_FLAG -fPIC)
+append_if(LIBCXXABI_LINK_FLAGS LIBCXXABI_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs)
if ( APPLE )
if ( CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "10.6" )
- list(APPEND compile_flags "-U__STRICT_ANSI__")
- list(APPEND link_flags
+ list(APPEND LIBCXXABI_COMPILE_FLAGS "-U__STRICT_ANSI__")
+ list(APPEND LIBCXXABI_LINK_FLAGS
"-compatibility_version 1"
"-current_version 1"
"-install_name /usr/lib/libc++abi.1.dylib"
"/usr/lib/libSystem.B.dylib")
else()
- list(APPEND link_flags
+ list(APPEND LIBCXXABI_LINK_FLAGS
"-compatibility_version 1"
"-install_name /usr/lib/libc++abi.1.dylib")
endif()
endif()
-string(REPLACE ";" " " compile_flags "${compile_flags}")
-string(REPLACE ";" " " link_flags "${link_flags}")
+string(REPLACE ";" " " LIBCXXABI_COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS}")
+string(REPLACE ";" " " LIBCXXABI_LINK_FLAGS "${LIBCXXABI_LINK_FLAGS}")
set_target_properties(cxxabi
PROPERTIES
- COMPILE_FLAGS "${compile_flags}"
- LINK_FLAGS "${link_flags}"
+ COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS}"
+ LINK_FLAGS "${LIBCXXABI_LINK_FLAGS}"
OUTPUT_NAME "c++abi"
VERSION "1.0"
SOVERSION "1"