From 56ce830286c1f136e460799b20d91132182228a9 Mon Sep 17 00:00:00 2001 From: Carlos Cesario Date: Wed, 16 Apr 2014 10:08:47 -0300 Subject: [PATCH] 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 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5909aa1c6..6db40e7c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,11 @@ endif() if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_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)