Merge pull request #220 from VectorCamp/feature/fatruntime-enabled-on-x86

Feature/fatruntime enabled on x86
This commit is contained in:
Konstantinos Margaritis 2024-01-10 22:47:23 +02:00 committed by GitHub
commit 6e1c3a10fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 4 deletions

View File

@ -23,7 +23,6 @@ INCLUDE (CheckLibraryExists)
INCLUDE (CheckSymbolExists)
include (CMakeDependentOption)
include (GNUInstallDirs)
include (${CMAKE_MODULE_PATH}/platform.cmake)
include (${CMAKE_MODULE_PATH}/boost.cmake)
include (${CMAKE_MODULE_PATH}/ragel.cmake)
@ -123,6 +122,10 @@ if (RELEASE_BUILD)
add_definitions(-DNDEBUG)
endif()
# Architecture detection
include (${CMAKE_MODULE_PATH}/platform.cmake)
# Detect OS and if Fat Runtime is available
include (${CMAKE_MODULE_PATH}/osdetection.cmake)

View File

@ -26,6 +26,9 @@ if (NOT FAT_RUNTIME)
set(ARCH_CXX_FLAGS "-msse4.2")
endif()
else()
set(BUILD_AVX512VBMI ON)
set(BUILD_AVX512 ON)
set(BUILD_AVX2 ON)
set(ARCH_C_FLAGS "-msse4.2")
set(ARCH_CXX_FLAGS "-msse4.2")
endif()
@ -129,5 +132,3 @@ else (NOT FAT_RUNTIME)
message(FATAL_ERROR "A minimum of SSE4.2 compiler support is required")
endif ()
endif ()

View File

@ -6,7 +6,12 @@ if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
set(FREEBSD true)
endif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
option(FAT_RUNTIME "Build a library that supports multiple microarchitectures" OFF)
if (ARCH_IA32 OR ARCH_X86_64)
option(FAT_RUNTIME "Build a library that supports multiple microarchitectures" ON)
else()
option(FAT_RUNTIME "Build a library that supports multiple microarchitectures" OFF)
endif()
if (FAT_RUNTIME)
message("Checking Fat Runtime Requirements...")
if (NOT LINUX)