building non-fat as well

This commit is contained in:
G.E. 2024-07-04 17:41:44 +03:00
parent a32efe9d1f
commit 951b413ad1
3 changed files with 11 additions and 4 deletions

View File

@ -129,6 +129,10 @@ include (${CMAKE_MODULE_PATH}/platform.cmake)
# Detect OS and if Fat Runtime is available
include (${CMAKE_MODULE_PATH}/osdetection.cmake)
if(BUILD_SSE2_SIMDE)
set(SIMDE_BACKEND True)
endif()
if(SIMDE_BACKEND)
include (${CMAKE_MODULE_PATH}/simde.cmake)
elseif (ARCH_IA32 OR ARCH_X86_64)

View File

@ -25,10 +25,6 @@ if (NOT FAT_RUNTIME)
set(ARCH_C_FLAGS "-mavx2")
set(ARCH_CXX_FLAGS "-mavx2")
set(X86_ARCH "core-avx2")
elseif (BUILD_SSE2_SIMDE)
set(ARCH_C_FLAGS "-msse2")
set(ARCH_CXX_FLAGS "-msse2")
set(X86_ARCH "x86-64")
else()
set(ARCH_C_FLAGS "-msse4.2")
set(ARCH_CXX_FLAGS "-msse4.2")

View File

@ -24,6 +24,13 @@ if (SIMDE_SSE42_H_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVS_SIMDE_NATIVE -DSIMDE_ENABLE_OPENMP -fopenmp-simd")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVS_SIMDE_NATIVE -DSIMDE_ENABLE_OPENMP -fopenmp-simd")
endif()
if (BUILD_SSE2_SIMDE)
set(ARCH_C_FLAGS "-msse2")
set(ARCH_CXX_FLAGS "-msse2")
set(X86_ARCH "x86-64")
endif()
else()
message(FATAL_ERROR "SIMDe backend requested but SIMDe is not available on the system")
endif()