GNU C++ pthread compiler option for AIX.

Ref. https://www.ibm.com/developerworks/aix/library/au-gnu.html

Fixes #5999

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
This commit is contained in:
Carlos Cesario 2014-04-16 10:08:47 -03:00 committed by Michael Friedrich
parent 7805b23330
commit 56ce830286
1 changed files with 5 additions and 1 deletions

View File

@ -87,8 +87,12 @@ endif()
if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
if(${CMAKE_SYSTEM_NAME} MATCHES AIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -lpthread")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
endif()
endif()
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)