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

Linker errors if MPICC is not set #65

Open
lukashuebner opened this issue Jun 29, 2022 · 0 comments
Open

Linker errors if MPICC is not set #65

lukashuebner opened this issue Jun 29, 2022 · 0 comments

Comments

@lukashuebner
Copy link

The linkMPI function does nothing, if MPICC is not set (and MPI should be searched among the installed libraries), resulting in linker errors for all MPI functions.

#Helper function for linking with MPI only if needed
function(linkMPI TOLINK)
    #We only want to try to find MPI outrselves if it wasn't provided in MPICC by user
    if("a$ENV{MPICC}" STREQUAL "a")
           #find_package(MPI REQUIRED)
           target_link_libraries(${TOLINK} MPI::MPI_C)
    endif()    
endfunction(linkMPI)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant