Skip to content

Commit

Permalink
drop -mavx2 compiler flag if its not required
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilDohne committed Mar 7, 2024
1 parent 14687d5 commit af0f3bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PhotoshopAPI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ if(MSVC)
target_compile_options(PhotoshopAPI PRIVATE /MP /DNOMINMAX)
target_compile_options(PhotoshopAPI PUBLIC /arch:AVX2)
else()
target_compile_options(PhotoshopAPI PUBLIC -mavx2)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-mavx2" COMPILER_SUPPORTS_AVX2)
if(COMPILER_SUPPORTS_AVX2)
target_compile_options(PhotoshopAPI PUBLIC -mavx2)
endif()
endif()

0 comments on commit af0f3bf

Please # to comment.