From 0ce5015c4d8132457fb3bc5c5722a8d261c244cd Mon Sep 17 00:00:00 2001 From: iAmir Date: Wed, 16 Oct 2024 02:11:54 +0330 Subject: [PATCH] set 32bit flags for all dependencies too --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c22d721..e564bdc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,14 @@ include_directories(${EIGEN3_INCLUDE_DIR}) set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY True) set(CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY True) +include(CheckTypeSize) +check_type_size("void*" SIZEOF_VOID_P BUILTIN_TYPES_ONLY) + +if(NOT TARGET_ARCH OR TARGET_ARCH EQUAL x86) + set(CMAKE_C_FLAGS "-m32 ${CMAKE_C_FLAGS}") + set(CMAKE_CXX_FLAGS "-m32 ${CMAKE_CXX_FLAGS}") +endif() + add_subdirectory(lib/omp-sdk) add_subdirectory(lib/omp-gdk) include_directories(${OMP_GDK_PATH})