adding LTO to tests

This commit is contained in:
Erik Frojdh
2021-11-24 17:40:14 +01:00
parent 77e610f5a5
commit b0a5a76065
6 changed files with 21 additions and 13 deletions

View File

@ -7,9 +7,9 @@ function(enable_cxx_warning flag target)
check_cxx_compiler_flag(${flag} ${flag_name})
if(${flag_name})
target_compile_options(${target} INTERFACE ${flag})
message("Adding: ${flag} to ${target}")
message(STATUS "Adding: ${flag} to ${target}")
else()
message("Flag: ${flag} not supported")
message(STATUS "Flag: ${flag} not supported")
endif()
endfunction()
@ -18,9 +18,9 @@ function(enable_c_warning flag target)
check_c_compiler_flag(${flag} ${flag_name})
if(${flag_name})
target_compile_options(${target} INTERFACE ${flag})
message("Adding: ${flag} to ${target}")
message(STATUS "Adding: ${flag} to ${target}")
else()
message("Flag: ${flag} not supported")
message(STATUS "Flag: ${flag} not supported")
endif()
endfunction()
@ -31,10 +31,10 @@ function(disable_cxx_warning flag target)
if(${flag_name})
string(REPLACE "-W" "-Wno-" neg_flag ${flag})
message("Adding: ${neg_flag} to ${target}")
message(STATUS "Adding: ${neg_flag} to ${target}")
target_compile_options(${target} INTERFACE ${neg_flag})
else()
message("Warning: ${flag} not supported no need to disable")
message(STATUS "Warning: ${flag} not supported no need to disable")
endif()
endfunction()
@ -43,10 +43,10 @@ function(disable_c_warning flag target)
check_c_compiler_flag(${flag} ${flag_name})
if(${flag_name})
string(REPLACE "-W" "-Wno-" neg_flag ${flag})
message("Adding: ${neg_flag} to ${target}")
message(STATUS "Adding: ${neg_flag} to ${target}")
target_compile_options(${target} INTERFACE ${neg_flag})
else()
message("Warning: ${flag} not supported no need to disable")
message(STATUS "Warning: ${flag} not supported no need to disable")
endif()
endfunction()