mirror of
https://github.com/KjellKod/g3log.git
synced 2025-01-19 08:46:42 +01:00
Fixed build options to allow compilation on linux using clang
This commit is contained in:
parent
1c6ede6db4
commit
a65b99087b
11
Build.cmake
11
Build.cmake
@ -23,7 +23,12 @@ SET(ACTIVE_CPP0xx_DIR "Release")
|
|||||||
IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang")
|
IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang")
|
||||||
MESSAGE("")
|
MESSAGE("")
|
||||||
MESSAGE("cmake for Clang ")
|
MESSAGE("cmake for Clang ")
|
||||||
SET(CMAKE_CXX_FLAGS "-Wall -std=c++11 -stdlib=libc++ -Wunused -D_GLIBCXX_USE_NANOSLEEP")
|
SET(CMAKE_CXX_FLAGS "-Wall -std=c++11 -Wunused -D_GLIBCXX_USE_NANOSLEEP")
|
||||||
|
IF (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++ -pthread")
|
||||||
|
ELSE()
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||||
|
ENDIF()
|
||||||
IF (${CMAKE_SYSTEM} MATCHES "FreeBSD-([0-9]*)\\.(.*)")
|
IF (${CMAKE_SYSTEM} MATCHES "FreeBSD-([0-9]*)\\.(.*)")
|
||||||
IF (${CMAKE_MATCH_1} GREATER 9)
|
IF (${CMAKE_MATCH_1} GREATER 9)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
||||||
@ -31,8 +36,10 @@ IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang")
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
ELSEIF (APPLE)
|
ELSEIF (APPLE)
|
||||||
set(PLATFORM_LINK_LIBRIES c++abi)
|
set(PLATFORM_LINK_LIBRIES c++abi)
|
||||||
ELSE()
|
ELSEIF (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
|
||||||
set(PLATFORM_LINK_LIBRIES rt c++abi)
|
set(PLATFORM_LINK_LIBRIES rt c++abi)
|
||||||
|
ELSE()
|
||||||
|
set(PLATFORM_LINK_LIBRIES rt)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user