Merge pull request #4073

3474154 gtest: use -fPIC with CLANG too (moneromooo-monero)
This commit is contained in:
luigi1111 2018-07-19 14:07:49 -05:00
commit 5fad1c505a
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -96,6 +96,10 @@ macro(config_compiler_and_linker)
set(cxx_no_rtti_flags "-fno-rtti -DGTEST_HAS_RTTI=0")
set(cxx_strict_flags
"-Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(cxx_base_flags "-Wall -Wshadow -fPIC")
set(cxx_exception_flags "-fexceptions")
set(cxx_no_exception_flags "-fno-exceptions")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
set(cxx_exception_flags "-features=except")
# Sun Pro doesn't provide macros to indicate whether exceptions and