cmake_minimum_required(VERSION 3.12) set(CMAKE_EXPORT_COMPILE_COMMANDS On) project (Example LANGUAGES CXX) find_package (RAJA REQUIRED) find_package (OpenMP REQUIRED) add_executable(TestSum TestSum.cpp) target_link_libraries(TestSum PUBLIC RAJA) if(OpenMP_CXX_FOUND) target_link_libraries(TestSum PUBLIC OpenMP::OpenMP_CXX) endif()