Skip to content

Android NDK OpenMP configuration

Environment

NDK r23b with CMake.

Configuration

Adding fllowing codes to CMakeLists.txt.

add_compile_options(-fopenmp -static)
target_link_libraries(hpcTest "libomp.a")

FAQ

OpenMP not working for Android NDK

Your NDK version is to old, please use NDK r21 or later version.

Leave a Reply