From 4abf2893f9b665380064d5b1ce78379c2f91edea Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 12 Sep 2019 03:35:32 +1000 Subject: [PATCH] enable compiler warnings for msvc and gcc --- app/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index fe83b475b..d5361499b 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -62,10 +62,11 @@ endif() target_compile_definitions(${OLIVE_TARGET} PRIVATE ${OLIVE_DEFINITIONS}) -target_compile_options( - ${OLIVE_TARGET} - PRIVATE - $<$:-Werror -Wuninitialized -pedantic-errors -Wall -Wextra -Wconversion -Wsign-conversion>) +if(MSVC) + target_compile_options(${OLIVE_TARGET} PRIVATE /W4 /WX) +else() + target_compile_options(${OLIVE_TARGET} PRIVATE -Werror -Wuninitialized -pedantic-errors -Wall -Wextra -Wconversion -Wsign-conversion>) +endif() target_include_directories( ${OLIVE_TARGET}