Skip to content

Commit

Permalink
cmake: just don't bother with intel flags on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
blackwer committed Feb 5, 2025
1 parent abb814c commit a7ce723
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ set(HOG_INCLUDES
set(CMAKE_CXX_STANDARD 17)

file(GLOB HOG_SOURCES "src/hog.cpp")
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_library(fasthog SHARED ${HOG_SOURCES})
else()
add_library(hog_sse4 OBJECT src/magnitude_orientation.cpp)
set_property(TARGET hog_sse4 PROPERTY POSITION_INDEPENDENT_CODE ON)
target_compile_options(hog_sse4 PRIVATE -msse4 -DVEC_T=Vec2d)
Expand All @@ -29,8 +31,6 @@ if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
target_include_directories(hog_avx512 PRIVATE ${HOG_INCLUDES})

add_library(fasthog SHARED ${HOG_SOURCES} $<TARGET_OBJECTS:hog_sse4> $<TARGET_OBJECTS:hog_avx2> $<TARGET_OBJECTS:hog_avx512>)
else()
add_library(fasthog SHARED ${HOG_SOURCES})
endif()

target_include_directories(fasthog PUBLIC ${HOG_INCLUDES})
Expand Down

0 comments on commit a7ce723

Please sign in to comment.