diff --git a/CMakeLists.txt b/CMakeLists.txt index b626df0..a72ef9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,6 +116,10 @@ add_library(${PACKAGE} ${lib_SRC}) target_include_directories (${PACKAGE} INTERFACE $) +if (NOT MSVC) + target_compile_options(${PACKAGE} PRIVATE -Wall -Wextra -pedantic) +endif() + if(WIN32 AND NOT CYGWIN) set_target_properties(${PACKAGE} PROPERTIES @@ -217,6 +221,9 @@ foreach(executable ${executables}) if(BUILD_TESTING) get_target_property(${executable}_LOC ${executable} LOCATION) file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/script.sed "s?\\./${executable}?${${executable}_LOC}?\n") + endif(BUILD_TEST) + if (NOT MSVC) + target_compile_options(${executable} PRIVATE -Wall -Wextra) endif() endforeach(executable ${executables})