From: Russ Combs (rucombs) Date: Mon, 11 Jan 2016 18:29:50 +0000 (-0500) Subject: Merge pull request #202 in SNORT/snort3 from ~JOCORNET/snort3:fix_cmake_build to... X-Git-Tag: 3.0.0-233~666 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f2820ebe9ec960d46770c11dfd7fb0f5be1c951;p=thirdparty%2Fsnort3.git Merge pull request #202 in SNORT/snort3 from ~JOCORNET/snort3:fix_cmake_build to master Squashed commit of the following: commit 0cb5a1a6e3169cfd68293a044a071fa2499717fb Author: Joel Cornett Date: Mon Jan 11 12:11:41 2016 -0500 initial --- diff --git a/cmake/compiler_features.cmake b/cmake/compiler_features.cmake index 84466f0e7..f136fdc90 100644 --- a/cmake/compiler_features.cmake +++ b/cmake/compiler_features.cmake @@ -1,4 +1,5 @@ -set ( CMAKE_REQUIRED_FLAGS "-std=c++11 -shared -Wl,-undefined,dynamic_lookup" ) +set ( _SAVE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} ) +set ( CMAKE_REQUIRED_FLAGS "-std=c++11 -fPIC -shared -Wl,-undefined,dynamic_lookup" ) unset ( HAVE_EXTERN_GNU_TLS ) check_cxx_source_compiles ( @@ -23,3 +24,5 @@ if ( NOT HAVE_EXTERN_GNU_TLS ) ) endif ( HAVE_THREAD_LOCAL ) endif ( NOT HAVE_EXTERN_GNU_TLS ) + +set ( CMAKE_REQUIRED_FLAGS ${_SAVE_CMAKE_REQUIRED_FLAGS} )