Gated the mcx16 flag to C++ compilation (#332)
* Restricted mcx16 option to C++ files as only those can include the snmalloc header
This commit is contained in:
@@ -117,13 +117,13 @@ if(NOT MSVC)
|
||||
target_link_libraries(snmalloc_lib INTERFACE atomic)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
|
||||
target_compile_options(snmalloc_lib INTERFACE -mcx16)
|
||||
target_compile_options(snmalloc_lib INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-mcx16>)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "amd64")
|
||||
target_compile_options(snmalloc_lib INTERFACE -mcx16)
|
||||
target_compile_options(snmalloc_lib INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-mcx16>)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
|
||||
target_compile_options(snmalloc_lib INTERFACE -mcx16)
|
||||
target_compile_options(snmalloc_lib INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-mcx16>)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
|
||||
target_compile_options(snmalloc_lib INTERFACE -mcx16)
|
||||
target_compile_options(snmalloc_lib INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-mcx16>)
|
||||
# XXX elseif ARM?
|
||||
endif()
|
||||
endif()
|
||||
@@ -143,13 +143,13 @@ endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
|
||||
target_compile_options(snmalloc_lib INTERFACE -mcx16)
|
||||
target_compile_options(snmalloc_lib INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-mcx16>)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "amd64")
|
||||
target_compile_options(snmalloc_lib INTERFACE -mcx16)
|
||||
target_compile_options(snmalloc_lib INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-mcx16>)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
|
||||
target_compile_options(snmalloc_lib INTERFACE -mcx16)
|
||||
target_compile_options(snmalloc_lib INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-mcx16>)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
|
||||
target_compile_options(snmalloc_lib INTERFACE -mcx16)
|
||||
target_compile_options(snmalloc_lib INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-mcx16>)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user