v4.14.0 (#9)
This commit is contained in:
committed by
GitHub
parent
86bb9c4968
commit
9bce73eb42
@@ -14,20 +14,12 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||
In order to build, please create a new `build` directory and run `cmake ..` from there.")
|
||||
endif()
|
||||
|
||||
# Check build type
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "No build type selected, default to Debug")
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
endif()
|
||||
message(STATUS "Building ${PROJECT_NAME} in ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
# Set compiler flags in HAILORT_COMPILE_OPTIONS
|
||||
# TODO: Change HAILORT_COMPILE_OPTIONS to add_compile_options
|
||||
if(WIN32)
|
||||
# TODO: set this eventually? set(HAILORT_COMPILE_OPTIONS /Wall)
|
||||
set(HAILORT_COMPILE_OPTIONS ${HAILORT_COMPILE_OPTIONS}
|
||||
/W4
|
||||
/WX
|
||||
/DWIN32_LEAN_AND_MEAN
|
||||
/DNOMINMAX # NOMINMAX is required in order to play nice with std::min/std::max (otherwise Windows.h defines it's own)
|
||||
/D_HAILO_EXPORTING
|
||||
@@ -37,9 +29,9 @@ if(WIN32)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Disable "unsafe function" warnings
|
||||
elseif(UNIX)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "QCC")
|
||||
set(HAILORT_COMPILE_OPTIONS ${HAILORT_COMPILE_OPTIONS} -Werror -Wall -Wextra -Wconversion)
|
||||
set(HAILORT_COMPILE_OPTIONS ${HAILORT_COMPILE_OPTIONS} -Wall -Wextra -Wconversion)
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(HAILORT_COMPILE_OPTIONS ${HAILORT_COMPILE_OPTIONS} -Werror -Wall -Wextra
|
||||
set(HAILORT_COMPILE_OPTIONS ${HAILORT_COMPILE_OPTIONS} -Wall -Wextra
|
||||
# TODO: remove me warnings
|
||||
-Wno-conversion
|
||||
-Wno-deprecated-declarations # On c structures with deprecated attribute, clang generates implicit move ctor
|
||||
|
||||
Reference in New Issue
Block a user