diff options
author | Maxime Schmitt <maxime.schmitt91@gmail.com> | 2018-11-21 00:08:40 +0100 |
---|---|---|
committer | Maxime Schmitt <maxime.schmitt91@gmail.com> | 2018-11-21 13:46:39 +0100 |
commit | a142d1d7ecec12dab9ce1876cb0894dae1baa709 (patch) | |
tree | 1ed536f066679923b0a0be032343c090d6a4a0b0 /cmake | |
parent | 23efa60245c736fcd68ff79776fdb931b3a2d58e (diff) |
CMake: compilation flag helper
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/compile-flags-helpers.cmake | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/cmake/compile-flags-helpers.cmake b/cmake/compile-flags-helpers.cmake index 457e867..9ed3c07 100644 --- a/cmake/compile-flags-helpers.cmake +++ b/cmake/compile-flags-helpers.cmake @@ -60,11 +60,8 @@ function(add_sanitizers_to_target TARGET BUILDTYPE VISIBILITY SANITIZERS) list(APPEND AVAILABLE_SANITIZERS ${SAN}) endif() endforeach() - list(SORT AVAILABLE_SANITIZERS) - list(TRANSFORM AVAILABLE_SANITIZERS PREPEND "-fsanitize=") - list(JOIN AVAILABLE_SANITIZERS " " SANITIZERS_FLAGS) foreach(SAN IN LISTS AVAILABLE_SANITIZERS) - target_compile_options(${TARGET} ${VISIBILITY} $<$<CONFIG:${BUILDTYPE}>:${SAN}>) - target_link_libraries(${TARGET} ${VISIBILITY} $<$<CONFIG:${BUILDTYPE}>:${SAN}>) + target_compile_options(${TARGET} ${VISIBILITY} $<$<CONFIG:${BUILDTYPE}>:-fsanitize=${SAN}>) + target_link_libraries(${TARGET} ${VISIBILITY} $<$<CONFIG:${BUILDTYPE}>:-fsanitize=${SAN}>) endforeach() endfunction() |