-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMAKE with RAJA CUDA backend #1654
Comments
How did you run CMake to configure the build for your project? Did you pass |
@rhornung67 thanks for the suggestion. However when I do
If I go ahead and run make anyway, I get the same error:
|
It looks like your example is using CUDA, so you will need to tell CMake to compile your main.cpp file with CUDA, e.g.:
You will also need to add |
@davidbeckingsale. Thanks for the suggestions. I had to add Here is the final cmake_minimum_required(VERSION 3.17)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(THIS raja-example)
project(${THIS})
enable_language(CUDA)
set(CMAKE_CUDA_HOST_COMPILER gcc)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --extended-lambda")
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif(NOT CMAKE_BUILD_TYPE)
find_package(RAJA REQUIRED)
set(SOURCE main.cpp)
set_source_files_properties(${SOURCE} PROPERTIES LANGUAGE CUDA)
add_executable(${THIS} ${SOURCE})
target_link_libraries(${THIS} PRIVATE RAJA) I used |
I get this error when building a project using the RAJA CUDA backend.
Here is my
CMakeLists.txt
fileI installed RAJA using the ENABLE_CUDA cmake build flag, and it appears to install correctly since the examples that come with RAJA run the cuda backend when I execute them.
Please help on how to correctly use cmake for a project that used RAJA CUDA backend. Thanks.
The text was updated successfully, but these errors were encountered: