Files
hailort/hailort/cmake/common_compiler_options.cmake
HailoRT-Automation d61a3bc83f v4.10.0
v4.10.0
2022-09-28 22:49:02 +03:00

24 lines
776 B
CMake

cmake_minimum_required(VERSION 3.0.0)
FUNCTION(disable_exceptions target)
if(WIN32)
# TODO: Find the right flag for windows (-fno-exceptions equivalent)
elseif(UNIX)
target_compile_options(${target} PRIVATE -fno-exceptions)
else()
message(FATAL_ERROR "Unexpeced host, stopping build")
endif()
ENDFUNCTION()
FUNCTION(exclude_archive_libs_symbols target)
if(WIN32)
# TODO: check it
elseif(UNIX)
get_property(TEMP_LINK_FLAGS TARGET ${target} PROPERTY LINK_FLAGS)
set(TEMP_LINK_FLAGS "${TEMP_LINK_FLAGS} -Wl,--exclude-libs=ALL")
set_property(TARGET ${target} PROPERTY LINK_FLAGS ${TEMP_LINK_FLAGS})
else()
message(FATAL_ERROR "Unexpeced host, stopping build")
endif()
ENDFUNCTION()