aboutsummaryrefslogtreecommitdiff
path: root/tests/gtest
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-06-28 16:33:22 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-06-28 16:42:52 +0100
commit3474154b75cb6cf22af10454a0fe5e18dc57acb3 (patch)
tree94f71f25900aaf84a8dfdfd4921351411399a7d5 /tests/gtest
parentMerge pull request #4067 (diff)
downloadmonero-3474154b75cb6cf22af10454a0fe5e18dc57acb3.tar.xz
gtest: use -fPIC with CLANG too
Diffstat (limited to 'tests/gtest')
-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