mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 00:43:07 +02:00
CMakeLists: don't hardcode libc++ on Darwin
Some Darwin users (for example, users on pre-OS X 10.7 systems) use FSF GCC releases instead of Clang; hardcoding the -stdlib=libc++ flag causes the build to fail for them. Instead, pass this whenever Clang is used.
This commit is contained in:
parent
f0c8c7d1b1
commit
33988c2c90
1 changed files with 4 additions and 1 deletions
|
@ -43,11 +43,14 @@ else (_HAS_CXX11)
|
||||||
message (FATAL_ERROR "C++11 support missing. Try upgrading your C++ compiler. If you have a good reason for using an outdated compiler, please let us know at support@taskwarrior.org.")
|
message (FATAL_ERROR "C++11 support missing. Try upgrading your C++ compiler. If you have a good reason for using an outdated compiler, please let us know at support@taskwarrior.org.")
|
||||||
endif (_HAS_CXX11)
|
endif (_HAS_CXX11)
|
||||||
|
|
||||||
|
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||||
|
set (_CXX11_FLAGS "${_CXX11_FLAGS} -stdlib=libc++")
|
||||||
|
endif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
set (LINUX true)
|
set (LINUX true)
|
||||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
set (DARWIN true)
|
set (DARWIN true)
|
||||||
set (_CXX11_FLAGS "${_CXX11_FLAGS} -stdlib=libc++")
|
|
||||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
|
||||||
set (KFREEBSD true)
|
set (KFREEBSD true)
|
||||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue