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

Install targets handling... #87

Open
XapaJIaMnu opened this issue Apr 21, 2021 · 1 comment
Open

Install targets handling... #87

XapaJIaMnu opened this issue Apr 21, 2021 · 1 comment

Comments

@XapaJIaMnu
Copy link
Collaborator

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?

@kpu
Copy link
Owner

kpu commented Apr 21, 2021

I think we just install the generated configuration header with the rest of the headers.

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

2 participants