aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-04-04 14:03:25 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-04-04 14:03:25 +0200
commitd5ad36fab5ea6270ff6b0a8b14f8ce10f0fb3c34 (patch)
tree4c622b487ea914966f74ef1d92e7caeff07d9d75
parent634f96e2d111820a6b02ca3027c3106a7dfd5d6b (diff)
downloadlibnitrokey-d5ad36fab5ea6270ff6b0a8b14f8ce10f0fb3c34.tar.gz
libnitrokey-d5ad36fab5ea6270ff6b0a8b14f8ce10f0fb3c34.tar.bz2
Do not abort compilation at all on OSX
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--CMakeLists.txt11
1 files changed, 5 insertions, 6 deletions
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")