diff options
Diffstat (limited to 'cmake/compiler/gcc')
-rw-r--r-- | cmake/compiler/gcc/settings.cmake | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake index acd71e82fd9..a0c2b737475 100644 --- a/cmake/compiler/gcc/settings.cmake +++ b/cmake/compiler/gcc/settings.cmake @@ -1,7 +1,7 @@ # Set build-directive (used in core to tell which buildtype we used) add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"') -set(GCC_EXPECTED_VERSION 4.7.2) +set(GCC_EXPECTED_VERSION 4.9.0) if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION) message(FATAL_ERROR "GCC: TrinityCore requires version ${GCC_EXPECTED_VERSION} to build but found ${CMAKE_CXX_COMPILER_VERSION}") @@ -34,3 +34,15 @@ if( WITH_COREDEBUG ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3") message(STATUS "GCC: Debug-flags set (-g3)") endif() + +if (BUILD_SHARED_LIBS) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fvisibility=hidden -Wno-attributes") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fvisibility=hidden -Wno-attributes") + + # Should break the build when there are TRINITY_*_API macros missing + # but it complains about missing references in precompiled headers. + # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,--no-undefined") + # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-undefined") + + message(STATUS "GCC: Enabled shared linking") +endif() |