Skip to content
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

Trilinos: Wrong parameters for linker in cmake project #13396

Open
TomasOberhuber opened this issue Aug 27, 2024 · 0 comments
Open

Trilinos: Wrong parameters for linker in cmake project #13396

TomasOberhuber opened this issue Aug 27, 2024 · 0 comments
Labels
type: bug The primary issue is a bug in Trilinos code or tests

Comments

@TomasOberhuber
Copy link

Bug Report

The following cmake project using Trillinos

cmake_minimum_required(VERSION 3.24)
project(example
    LANGUAGES CXX CUDA
)

# Require C++17, and disable compiler-specific extensions (if possible).
foreach(lang CXX CUDA)
    set(CMAKE_${lang}_STANDARD 17)
    set(CMAKE_${lang}_STANDARD_REQUIRED ON)
    set(CMAKE_${lang}_EXTENSIONS OFF)
endforeach()

find_package(Trilinos REQUIRED)

# Add executables
add_executable(example-cuda example-cuda.cu)
target_link_libraries(example-cuda PUBLIC Trilinos::all_selected_libs)

Leads to the following error:

make                                                                                                                                                                                                                                                                                                                                                                                                     
[ 50%] Building CUDA object CMakeFiles/example-cuda.dir/example-cuda.cu.o
[100%] Linking CXX executable example-cuda
c++: error: unrecognized command-line option ‘--relocatable-device-code=true’
c++: error: unrecognized command-line option ‘-arch=sm_86’
make[2]: *** [CMakeFiles/example-cuda.dir/build.make:169: example-cuda] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/example-cuda.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
@TomasOberhuber TomasOberhuber added the type: bug The primary issue is a bug in Trilinos code or tests label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The primary issue is a bug in Trilinos code or tests
Projects
None yet
Development

No branches or pull requests

1 participant