Missing PRIVATE in cmake. (#539)

This commit is contained in:
Matthew Parkinson
2022-06-07 16:13:36 +01:00
committed by GitHub
parent e7e558badf
commit e17672d3c1

View File

@@ -299,7 +299,7 @@ if(NOT SNMALLOC_HEADER_ONLY_LIBRARY)
if(SNMALLOC_OPTIMISE_FOR_CURRENT_MACHINE)
check_cxx_compiler_flag(-march=native SUPPORT_MARCH_NATIVE)
if (SUPPORT_MARCH_NATIVE)
target_compile_options(${name} -march=native)
target_compile_options(${name} PRIVATE -march=native)
else()
message(WARNING "Compiler does not support `-march=native` required by SNMALLOC_OPTIMISE_FOR_CURRENT_MACHINE")
endif()