Use target_compile_options instead of variables to add -fomit-frame-pointer to mbedtls
This commit is contained in:
parent
02775e52c4
commit
7b3372ad38
@ -277,6 +277,12 @@ endif()
|
|||||||
# (PolarSSL also has test and example programs in their CMakeLists.txt, we don't want those)
|
# (PolarSSL also has test and example programs in their CMakeLists.txt, we don't want those)
|
||||||
include(lib/polarssl.cmake EXCLUDE_FROM_ALL)
|
include(lib/polarssl.cmake EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
|
if(NOT MSVC AND "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")
|
||||||
|
# mbed TLS uses the frame pointer's register in inline assembly:
|
||||||
|
# https://tls.mbed.org/kb/development/arm-thumb-error-r7-cannot-be-used-in-asm-here
|
||||||
|
target_compile_options(mbedtls PUBLIC -fomit-frame-pointer)
|
||||||
|
endif()
|
||||||
|
|
||||||
set_exe_flags()
|
set_exe_flags()
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
@ -107,13 +107,6 @@ macro(set_flags)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")
|
|
||||||
# mbed TLS uses the frame pointer's register in inline assembly:
|
|
||||||
# https://tls.mbed.org/kb/development/arm-thumb-error-r7-cannot-be-used-in-asm-here
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fomit-frame-pointer")
|
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fomit-frame-pointer")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11")
|
||||||
set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -std=c++11")
|
set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -std=c++11")
|
||||||
|
Loading…
Reference in New Issue
Block a user