diff --git a/CMakeLists.txt b/CMakeLists.txt index a1957cf1d..d570954d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,10 +165,10 @@ if (LOG4CPLUS_INCLUDE_DIR) target_link_libraries(mrmc ${LOG4CPLUS_LIBRARY}) target_link_libraries(mrmc-tests ${LOG4CPLUS_LIBRARY}) # On Linux, we have to link against librt - if (UNIX) - target_link_libraries(mrmc rt) - target_link_libraries(mrmc-tests rt) - endif(UNIX) + if (UNIX AND NOT APPLE) + target_link_libraries(mrmc rt) + target_link_libraries(mrmc-tests rt) + endif(UNIX AND NOT APPLE) endif(LOG4CPLUS_INCLUDE_DIR) if (THREADS_FOUND) diff --git a/resources/3rdparty/log4cplus-1.1.0/CMakeLists.txt b/resources/3rdparty/log4cplus-1.1.0/CMakeLists.txt index 4f671decf..126111828 100644 --- a/resources/3rdparty/log4cplus-1.1.0/CMakeLists.txt +++ b/resources/3rdparty/log4cplus-1.1.0/CMakeLists.txt @@ -6,7 +6,12 @@ set (log4cplus_version_minor 1) set (log4cplus_version_patch 0) set (log4cplus_soversion 0) set (log4cplus_postfix "") -set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -std=c++0x) + +if(CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") +else(CLANG) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++") +endif() option(LOG4CPLUS_BUILD_TESTING "Build the test suite." ON)