summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2021-02-14 19:03:29 -0800
committerHans Kristian Rosbach <hk-github@circlestorm.org>2021-02-17 14:59:16 +0100
commit19ea232beef8f4fba7d1ade7eb7eca2a820515ec (patch)
treeb3a385d7037cb9a0936224edcf56156c011bf5c4
parent0a3ab73fa834786f7de6363e25f10450e43c5602 (diff)
Use cmake check_c_compiler_flag for -fno-semantic-interposition compiler flag check.
-rw-r--r--CMakeLists.txt7
1 files changed, 1 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4c4343..07ca512 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -363,12 +363,7 @@ endif()
#
# Check whether compiler supports -fno-semantic-interposition parameter
#
-set(CMAKE_REQUIRED_FLAGS "-fno-semantic-interposition")
-check_c_source_compiles(
- "int main() { return 0; }"
- HAVE_NO_INTERPOSITION
-)
-set(CMAKE_REQUIRED_FLAGS)
+check_c_compiler_flag(-fno-semantic-interposition HAVE_NO_INTERPOSITION)
#
# Check if we can hide zlib internal symbols that are linked between separate source files using hidden