Skip to content

Commit

Permalink
Native builds now use -march=native and -mcpu=native
Browse files Browse the repository at this point in the history
  • Loading branch information
solidpixel committed Sep 21, 2024
1 parent cc71f53 commit fe8ab6b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Source/cmake_core.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,22 @@ macro(astcenc_set_properties ASTCENC_TARGET_NAME ASTCENC_VENEER_TYPE)
PRIVATE
$<${is_gnu_fe}:-mfma>)
endif()

elseif(${ASTCENC_ISA_SIMD} MATCHES "native")
target_compile_definitions(${ASTCENC_TARGET_NAME}
PRIVATE)

if (${ASTCENC_VENEER_TYPE} GREATER 0)
target_compile_options(${ASTCENC_TARGET_NAME}
PRIVATE
$<${is_gnu_fe}:-Wno-unused-command-line-argument>)
else()
target_compile_options(${ASTCENC_TARGET_NAME}
PRIVATE
$<${is_clangcl}:-mcpu=native -march=native>
$<${is_gnu_fe}:-mcpu=native -march=native>
$<${is_gnu_fe}:-Wno-unused-command-line-argument>)
endif()
endif()

endmacro()
Expand Down

0 comments on commit fe8ab6b

Please sign in to comment.