Skip to content

[cmake] When building against MPICH, mpi_c target shows libmpicxx in INTERFACE_LINK_LIBRARIES #5

@Wentzell

Description

@Wentzell

Description

libmpicxx should not be required to compile the TRIQS/mpi headers, but is listed in the INTERFACE_LINK_LIBRARIES
of the mpi::mpi_c cmake target, only when building against MPICH.

See e.g. PREFIX/lib/cmake/mpi/mpi-targets.cmake file for the py38h82d08ca_3 build of the https://github.com/conda-forge/triqs-feedstock

 67 set_target_properties(mpi::mpi PROPERTIES
 68   INTERFACE_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX;OMPI_SKIP_MPICXX;_MPICC_H"
 69   INTERFACE_INCLUDE_DIRECTORIES "PREFIX/include"
 70   INTERFACE_LINK_LIBRARIES "PREFIX/lib/libmpicxx.dylib;PREFIX/lib/libmpi.dylib;PREFIX/lib/libpmpi.dylib"
 71   INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "PREFIX/include"
 72 )

Versions

Confirmed for Version 1.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions