Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -4,9 +4,17 @@ add_subdirectory(runtime) + +set(ENABLE_LIBOMPTARGET ON) # 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 (NOT (WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")) +if (WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(ENABLE_LIBOMPTARGET OFF) +endif() + +option(OPENMP_ENABLE_LIBOMPTARGET "Enable building libomptarget for offloading." + ${ENABLE_LIBOMPTARGET}) +if (OPENMP_ENABLE_LIBOMPTARGET) add_subdirectory(libomptarget) endif()