Skip to content

Commit 1b50308

Browse files
committed
CMakeLists changes to properly deal with CMAKE_CXX_FLAGS etc.
1 parent 5cb8676 commit 1b50308

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
4949
INCLUDE(CheckCXXCompilerFlag)
5050
CHECK_CXX_COMPILER_FLAG(-std=c++11 HAVE_STD11)
5151
if (HAVE_STD11)
52-
list(APPEND CMAKE_CXX_FLAGS "-std=c++11 -Wall")
52+
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11 -Wall")
5353
else()
5454
message(FATAL_ERROR "No advanced standard C++ support (-std=c++11 not defined).")
5555
endif()
@@ -58,10 +58,10 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
5858
CHECK_CXX_COMPILER_FLAG(-std=c++11 HAVE_STD11)
5959
if (HAVE_STD11)
6060
if (CPP-NETLIB_DISABLE_LIBCXX)
61-
list(APPEND CMAKE_CXX_FLAGS "-std=c++11 -Wall")
62-
list(APPEND CMAKE_CXX_LINK_FLAGS "-std=c++11")
61+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
6362
else()
64-
list(APPEND CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ -Wall")
63+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++ -Wall")
64+
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -stdlib=libc++")
6565
endif()
6666
else()
6767
message(FATAL_ERROR "No C++11 support for Clang version. Please upgrade Clang to a version supporting C++11.")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy