Browse Source

CMake: remove "if (MSVC)"

MSVC is the only generator we use for CMake.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
pull/652/head
Lev Stipakov 1 year ago committed by Lev Stipakov
parent
commit
8b42ea8761
  1. 16
      CMakeLists.txt

16
CMakeLists.txt

@ -30,9 +30,7 @@ add_executable(${PROJECT_NAME} WIN32
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} /guard:cf /Qspectre") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} /guard:cf /Qspectre")
if(MSVC) list(APPEND CMAKE_CONFIGURATION_TYPES Asan)
list(APPEND CMAKE_CONFIGURATION_TYPES Asan)
endif(MSVC)
set(CMAKE_C_FLAGS_ASAN set(CMAKE_C_FLAGS_ASAN
"${CMAKE_C_FLAGS_DEBUG} /fsanitize=address" CACHE STRING "${CMAKE_C_FLAGS_DEBUG} /fsanitize=address" CACHE STRING
@ -168,13 +166,11 @@ target_compile_definitions(${TEST_PLAP_EXE} PRIVATE
WIN32_LEAN_AND_MEAN WIN32_LEAN_AND_MEAN
HAVE_CONFIG_H) HAVE_CONFIG_H)
if(MSVC) target_compile_options(${PROJECT_NAME} PRIVATE "$<$<CONFIG:Release>:/Zi>")
target_compile_options(${PROJECT_NAME} PRIVATE "$<$<CONFIG:Release>:/Zi>") target_link_options(${PROJECT_NAME} PRIVATE
target_link_options(${PROJECT_NAME} PRIVATE "$<$<CONFIG:Release>:/DEBUG:FULL>"
"$<$<CONFIG:Release>:/DEBUG:FULL>" "$<$<CONFIG:Release>:/OPT:REF>"
"$<$<CONFIG:Release>:/OPT:REF>" "$<$<CONFIG:Release>:/OPT:ICF>")
"$<$<CONFIG:Release>:/OPT:ICF>")
endif(MSVC)
target_link_options(${TEST_PLAP_EXE} PRIVATE target_link_options(${TEST_PLAP_EXE} PRIVATE
"/MANIFEST:EMBED" "/MANIFEST:EMBED"

Loading…
Cancel
Save