Skip to content

Commit a97e948

Browse files
committed
style: small refactor of cmake
1 parent ce9d7f3 commit a97e948

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

CMakeLists.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,9 @@ endif()
6565
target_link_libraries(${PROJECT_NAME} PRIVATE ${CPPLM_LINK_LIBRARIES})
6666

6767
if(MSVC)
68-
target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX /Zc:preprocessor)
68+
target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX /Zc:preprocessor $<$<CONFIG:Release>:/Zi>)
6969
else()
70-
target_compile_options(${PROJECT_NAME} PRIVATE -Wextra -Wshadow -Wconversion -Wpedantic -Werror)
71-
endif()
72-
73-
# Produce PDB file for debug
74-
if(MSVC)
75-
target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:Release>:/Zi>)
76-
else()
77-
target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:Release>:-g1>)
70+
target_compile_options(${PROJECT_NAME} PRIVATE -Wextra -Wshadow -Wconversion -Wpedantic -Werror $<$<CONFIG:Release>:-g1>)
7871
endif()
7972

8073
if(APPLE)

0 commit comments

Comments
 (0)