-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathCM_definitions.cmake
More file actions
16 lines (14 loc) · 815 Bytes
/
Copy pathCM_definitions.cmake
File metadata and controls
16 lines (14 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# DarkHelp - C++ helper class for Darknet's C API.
# Copyright 2019-2024 Stephane Charette <stephanecharette@gmail.com>
# MIT license applies. See "license.txt" for details.
IF (WIN32)
ADD_COMPILE_OPTIONS ( /W4 ) # warning level (high)
ADD_COMPILE_OPTIONS ( /WX ) # treat warnings as errors
ADD_COMPILE_OPTIONS ( /permissive- ) # stick to C++ standards (turn off Microsoft-specific extensions)
ADD_COMPILE_OPTIONS ( /wd4100 ) # disable "unreferenced formal parameter"
ADD_COMPILE_OPTIONS ( /wd4127 ) # disable "conditional expression is constant"
ADD_COMPILE_DEFINITIONS ( _CRT_SECURE_NO_WARNINGS ) # don't complain about localtime()
SET ( CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
ELSE ()
ADD_COMPILE_OPTIONS ( -Wall -Wextra -Werror -Wno-unused-parameter )
ENDIF ()