From 8b42ea87610c219ab9f063d4cbe8689a7725d085 Mon Sep 17 00:00:00 2001 From: Lev Stipakov Date: Mon, 4 Sep 2023 14:14:10 +0200 Subject: [PATCH] CMake: remove "if (MSVC)" MSVC is the only generator we use for CMake. Signed-off-by: Lev Stipakov --- CMakeLists.txt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 051783f..3b5855d 100644 --- a/CMakeLists.txt +++ b/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_RELEASE "${CMAKE_C_FLAGS} /guard:cf /Qspectre") -if(MSVC) - list(APPEND CMAKE_CONFIGURATION_TYPES Asan) -endif(MSVC) +list(APPEND CMAKE_CONFIGURATION_TYPES Asan) set(CMAKE_C_FLAGS_ASAN "${CMAKE_C_FLAGS_DEBUG} /fsanitize=address" CACHE STRING @@ -168,13 +166,11 @@ target_compile_definitions(${TEST_PLAP_EXE} PRIVATE WIN32_LEAN_AND_MEAN HAVE_CONFIG_H) -if(MSVC) - target_compile_options(${PROJECT_NAME} PRIVATE "$<$:/Zi>") - target_link_options(${PROJECT_NAME} PRIVATE - "$<$:/DEBUG:FULL>" - "$<$:/OPT:REF>" - "$<$:/OPT:ICF>") -endif(MSVC) +target_compile_options(${PROJECT_NAME} PRIVATE "$<$:/Zi>") +target_link_options(${PROJECT_NAME} PRIVATE + "$<$:/DEBUG:FULL>" + "$<$:/OPT:REF>" + "$<$:/OPT:ICF>") target_link_options(${TEST_PLAP_EXE} PRIVATE "/MANIFEST:EMBED"