Commit 8fe45443 authored by Ghislain MARY's avatar Ghislain MARY

Use bc_apply_compile_flags from bctoolbox CMake utils.

parent d3682d90
......@@ -31,22 +31,6 @@ option(ENABLE_STRICT "Build with strict compile options." YES)
option(ENABLE_TESTS "Enable compilation of unit tests." NO)
macro(apply_compile_flags SOURCE_FILES)
if(${SOURCE_FILES})
set(options "")
foreach(a ${ARGV})
if(STRICT_OPTIONS_${a})
string(REPLACE ";" " " options_${a} "${STRICT_OPTIONS_${a}}")
set(options "${options} ${options_${a}}")
endif()
endforeach()
if(options)
set_source_files_properties(${${SOURCE_FILES}} PROPERTIES COMPILE_FLAGS "${options}")
endif()
endif()
endmacro()
if(NOT CMAKE_INSTALL_RPATH AND CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
message(STATUS "Setting install rpath to ${CMAKE_INSTALL_RPATH}")
......
......@@ -34,7 +34,7 @@ elseif(MBEDTLS_FOUND)
list(APPEND SOURCE_FILES cryptoMbedtls.c)
endif()
apply_compile_flags(SOURCE_FILES "CPP")
bc_apply_compile_flags(SOURCE_FILES STRICT_OPTIONS_CPP)
if(ENABLE_STATIC)
add_library(bzrtp-static STATIC ${SOURCE_FILES})
......
......@@ -34,7 +34,7 @@ set(TEST_SOURCES
../src/zidCache.c
)
apply_compile_flags(TEST_SOURCES "CPP")
bc_apply_compile_flags(TEST_SOURCES STRICT_OPTIONS_CPP)
add_executable(bzrtpTest ${TEST_SOURCES})
set_target_properties(bzrtpTest PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment