Fix #53: only add -Wall/-Wextra for GCC and Clang

This commit is contained in:
Patrick Boettcher 2019-03-20 16:58:03 +01:00
parent b01dcdb984
commit d6ed73f240

View File

@ -60,12 +60,13 @@ target_include_directories(json-schema-validator
target_compile_features(json-schema-validator
PUBLIC
cxx_range_for) # for C++11 - flags
# Enable more compiler warnings, except when using Visual Studio compiler
if(NOT MSVC)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(json-schema-validator
PRIVATE
-Wall -Wextra)
endif()
target_link_libraries(json-schema-validator
PUBLIC
json-hpp)