Merge pull request #571 from jdduke/fix_cmake

Fix issue with CMAKE_CXX_FLAGS initialization
pull/572/head
Alexander Gessler 2015-05-24 00:52:13 +02:00
commit 8e24695f29
1 changed files with 2 additions and 2 deletions

View File

@ -62,9 +62,9 @@ if( CMAKE_COMPILER_IS_MINGW )
endif()
if((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT CMAKE_COMPILER_IS_MINGW)
set(CMAKE_CXX_FLAGS "-fPIC") # this is a very important switch and some libraries seem now to have it....
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # this is a very important switch and some libraries seem now to have it....
# hide all not-exported symbols
set(CMAKE_CXX_FLAGS "-fvisibility=hidden -Wall" )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall" )
elseif(MSVC)
# enable multi-core compilation with MSVC
add_definitions(/MP)