aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-07-19 14:07:49 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-07-19 14:07:49 -0500
commit5fad1c505aed8493598876d3deedea74858d280a (patch)
tree806e03259855cf89b35e49c43e5aa2ee41b1842c /tests
parentMerge pull request #4071 (diff)
parentgtest: use -fPIC with CLANG too (diff)
downloadmonero-5fad1c505aed8493598876d3deedea74858d280a.tar.xz
Merge pull request #4073
3474154 gtest: use -fPIC with CLANG too (moneromooo-monero)
Diffstat (limited to 'tests')
-rw-r--r--tests/gtest/cmake/internal_utils.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/gtest/cmake/internal_utils.cmake b/tests/gtest/cmake/internal_utils.cmake
index 567edaa30..ae45d7d7a 100644
--- a/tests/gtest/cmake/internal_utils.cmake
+++ b/tests/gtest/cmake/internal_utils.cmake
@@ -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