From d5ad36fab5ea6270ff6b0a8b14f8ce10f0fb3c34 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Tue, 4 Apr 2017 14:03:25 +0200 Subject: Do not abort compilation at all on OSX Signed-off-by: Szczepan Zalega --- CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 5fea2f6..b1103db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,13 +94,12 @@ target_link_libraries(${LIBNAME}-log hidapi-libusb) OPTION(ERROR_ON_WARNING "Stop compilation on warning found (not supported for MSVC)" ON) if (NOT MSVC) set(COMPILE_FLAGS "-Wall -Wno-unused-function -Wcast-qual -Woverloaded-virtual") - if (ERROR_ON_WARNING) - set(COMPILE_FLAGS "${COMPILE_FLAGS} -Werror") - endif() - SET_TARGET_PROPERTIES(${LIBNAME} ${LIBNAME}-log PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} ) - IF(APPLE) - SET_TARGET_PROPERTIES(hidapi-libusb PROPERTIES COMPILE_FLAGS "" ) + IF(NOT APPLE) + if (ERROR_ON_WARNING) + set(COMPILE_FLAGS "${COMPILE_FLAGS} -Werror") + endif() ENDIF() + SET_TARGET_PROPERTIES(${LIBNAME} ${LIBNAME}-log PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} ) endif() SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES COMPILE_DEFINITIONS "NO_LOG") -- cgit v1.2.1