mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-12 10:23:50 +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")
|
||||
MESSAGE("")
|
||||
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_MATCH_1} GREATER 9)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
||||
@ -31,8 +36,10 @@ IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang")
|
||||
ENDIF()
|
||||
ELSEIF (APPLE)
|
||||
set(PLATFORM_LINK_LIBRIES c++abi)
|
||||
ELSE()
|
||||
ELSEIF (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
|
||||
set(PLATFORM_LINK_LIBRIES rt c++abi)
|
||||
ELSE()
|
||||
set(PLATFORM_LINK_LIBRIES rt)
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user