]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Use cmake check_c_compiler_flag for -fno-semantic-interposition compiler flag check.
authorNathan Moinvaziri <nathan@nathanm.com>
Mon, 15 Feb 2021 03:03:29 +0000 (19:03 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 17 Feb 2021 13:59:16 +0000 (14:59 +0100)
CMakeLists.txt

index c4c4343b0fc5c2f7e33a8d1c0a36c84fa7273115..07ca5128badf7d29b28f6f8ab31a8157c1b58c3b 100644 (file)
@@ -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