Skip to content

Commit

Permalink
Fix target_link_libraries calls w/ alias target
Browse files Browse the repository at this point in the history
  • Loading branch information
nmnobre committed Jan 10, 2025
1 parent 51fabc1 commit dcf92f8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion GuidedTutorials/HeatEquation/Exec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ else()

# Add mpi
find_package(MPI REQUIRED)
target_link_libraries(AMReX::amrex INTERFACE ${MPI_LIBRARIES})
get_target_property(AMReX_ALIASED AMReX::amrex ALIASED_TARGET)
target_link_libraries(${AMReX_ALIASED} INTERFACE ${MPI_LIBRARIES})

endif()

Expand Down
3 changes: 2 additions & 1 deletion GuidedTutorials/HeatEquation_Simple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ else()

# Add mpi
find_package(MPI REQUIRED)
target_link_libraries(AMReX::amrex INTERFACE ${MPI_LIBRARIES})
get_target_property(AMReX_ALIASED AMReX::amrex ALIASED_TARGET)
target_link_libraries(${AMReX_ALIASED} INTERFACE ${MPI_LIBRARIES})

endif()

Expand Down
3 changes: 2 additions & 1 deletion GuidedTutorials/HelloWorld/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ else()

# Add mpi
find_package(MPI REQUIRED)
target_link_libraries(AMReX::amrex INTERFACE ${MPI_LIBRARIES})
get_target_property(AMReX_ALIASED AMReX::amrex ALIASED_TARGET)
target_link_libraries(${AMReX_ALIASED} INTERFACE ${MPI_LIBRARIES})

endif()

Expand Down
3 changes: 2 additions & 1 deletion GuidedTutorials/MultiFab/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ else()

# Add mpi
find_package(MPI REQUIRED)
target_link_libraries(AMReX::amrex INTERFACE ${MPI_LIBRARIES})
get_target_property(AMReX_ALIASED AMReX::amrex ALIASED_TARGET)
target_link_libraries(${AMReX_ALIASED} INTERFACE ${MPI_LIBRARIES})

endif()

Expand Down

0 comments on commit dcf92f8

Please sign in to comment.