diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a74ff4c902..c175bdd778 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,13 +55,15 @@ file(WRITE ${EXPORT_FILE}) #blank the file (subdirs will append) ######################################################################## # Compiler specific setup ######################################################################## +include(GrMiscUtils) #compiler flag check + if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) #http://gcc.gnu.org/wiki/Visibility - add_definitions(-fvisibility=hidden) + GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN) endif() if(CMAKE_COMPILER_IS_GNUCXX) - add_definitions(-Wsign-compare) + GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-Wsign-compare HAVE_SIGN_COMPARE) endif(CMAKE_COMPILER_IS_GNUCXX) if(MSVC) |