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()