diff --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt --- a/openmp/CMakeLists.txt +++ b/openmp/CMakeLists.txt @@ -74,7 +74,8 @@ # Currently libomptarget cannot be compiled on Windows or MacOS X. # Since the device plugins are only supported on Linux anyway, # there is no point in trying to compile libomptarget on other OSes. -if (APPLE OR WIN32 OR NOT OPENMP_HAVE_STD_CPP17_FLAG) +# 32-bit systems are not supported either. +if (APPLE OR WIN32 OR NOT OPENMP_HAVE_STD_CPP17_FLAG OR NOT CMAKE_SIZEOF_VOID_P EQUAL 8) set(ENABLE_LIBOMPTARGET OFF) endif() @@ -100,6 +101,8 @@ message(FATAL_ERROR "libomptarget cannot be built on Windows and MacOS X!") elseif (NOT OPENMP_HAVE_STD_CPP17_FLAG) message(FATAL_ERROR "Host compiler must support C++17 to build libomptarget!") + elseif (NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + message(FATAL_ERROR "libomptarget on 32-bit systems are not supported!") endif() add_subdirectory(libomptarget)