From ac1a12a5415bd52dc6a736af61324c468b6be594 Mon Sep 17 00:00:00 2001 From: ebraraktas Date: Fri, 12 Jan 2024 11:28:07 +0300 Subject: [PATCH] build: use static omp in Android --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b7d0bf7c..5f4a23737 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -268,6 +268,11 @@ endif() if(NOT OPENMP_RUNTIME STREQUAL "NONE") if(WIN32) add_compile_options("/openmp") + elseif(ANDROID) + # use static omp in Android + set(OpenMP_CXX_LIBRARIES -fopenmp -static-openmp) + add_compile_options("-fopenmp") + set(OpenMP_CXX_FOUND 1) else() find_package(OpenMP) if(OpenMP_CXX_FOUND)