From 61e55b7087c66c02901cee4583aa1b4754c54261 Mon Sep 17 00:00:00 2001 From: Matthieu Longo Date: Thu, 27 Jul 2017 15:55:47 +0200 Subject: [PATCH] [solaris][sunpro] -D_REENTRANT is not defined even if we specify -pthread --- c/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt index 3bf83bb41d..0d7b315486 100644 --- a/c/CMakeLists.txt +++ b/c/CMakeLists.txt @@ -106,11 +106,11 @@ endif () # Set Compiler extra flags for Solaris when using SunStudio if (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mt") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mt -D_REENTRANT") endif() if (CMAKE_C_COMPILER_ID STREQUAL "SunPro") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mt") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mt -D_REENTRANT") endif() # Set linker's extra flags for Solaris (used by SunStudio and GCC without discrimination)