Skip to content

Commit 79421b8

Browse files
committed
avoid APPLE clang++: warning: -ltcmalloc
1 parent a9faf02 commit 79421b8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ else()
7272
add_compile_options(-march=${USE_ARCH})
7373
message("USE_ARCH = ${USE_ARCH}")
7474
endif()
75-
if(NOT APPLE)
76-
message("Disabling AVX512 because performance is worse and results are wildly different with it on")
77-
add_compile_options(-mno-avx512f)
78-
endif()
7975
if(CMAKE_VERBOSE_MAKEFILE)
8076
add_compile_options(-fopt-info-vec-all)
8177
endif()
@@ -84,8 +80,13 @@ else()
8480
"$<$<CONFIG:Release,RelWithDebInfo>:-O3;>"
8581
"$<$<CONFIG:MinSizeRel>:-Os;>"
8682
"$<$<CONFIG:Debug>:-O0;>")
83+
if(NOT APPLE)
84+
message("Disabling AVX512 because performance is worse and results are wildly different with it on")
85+
add_compile_options(-mno-avx512f)
86+
add_compile_options("$<$<CONFIG:Debug,RelWithDebInfo>:-ltcmalloc;>")
87+
endif()
8788
add_compile_options(
88-
"$<$<CONFIG:Debug,RelWithDebInfo>:-ltcmalloc;-g;-fno-omit-frame-pointer;>")
89+
"$<$<CONFIG:Debug,RelWithDebInfo>:-g;-fno-omit-frame-pointer;>")
8990
if(USE_ASAN)
9091
message("Using ASAN")
9192
set(ASAN_ARGS

0 commit comments

Comments
 (0)