From 3efecfdbad83ac9a17f41b5de39961fc5054c98d Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Sun, 21 Jan 2024 17:51:16 +0100 Subject: [PATCH] ignore '-z' on Windows --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b6f74a0..487f9114 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,7 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Werror) # add_compile_options(-Wpedantic) add_compile_options(-Wno-shift-negative-value) - if(NOT CMAKE_C_COMPILER_ID MATCHES "AppleClang") + if(NOT CMAKE_C_COMPILER_ID MATCHES "AppleClang" OR CMAKE_C_SIMULATE_ID MATCHES "MSVC") add_link_options("-Wl,-z,relro,-z,now,-z,defs") endif() endif()