Skip to content

Install targets handling... #87

@XapaJIaMnu

Description

@XapaJIaMnu

Marian seems to be moving to using CMake install targets marian-nmt/marian-dev#862 and intgemm doesn't work as an install target.

It won't work, because after we add this to the cmake lists:

if(GENERATE_MARIAN_INSTALL_TARGETS)
        install(TARGETS intgemm
        EXPORT marian-targets
        DESTINATION intgemm)
    endif(GENERATE_MARIAN_INSTALL_TARGETS)

(Satisfying https://stackoverflow.com/questions/5378528/install-export-problem-for-shared-lib-with-dependencies )

We hit this issue: https://stackoverflow.com/questions/25676277/cmake-target-include-directories-prints-an-error-when-i-try-to-add-the-source
We have referenced to the source directory here:

target_include_directories(intgemm INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})

Which can be changed to:

target_include_directories(intgemm INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:./>)

And here where we include the generated configuration header:

target_include_directories(intgemm PUBLIC ${CMAKE_CURRENT_BINARY_DIR})

I'm not sure how to fix the second one. Do we just define some place where the configuration will be if intgemm is installed as a subpackage?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions