intgemm icon indicating copy to clipboard operation
intgemm copied to clipboard

Install targets handling...

Open XapaJIaMnu opened this issue 3 years ago • 1 comments

Marian seems to be moving to using CMake install targets https://github.com/marian-nmt/marian-dev/issues/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:

https://github.com/kpu/intgemm/blob/47ab01ad8f0a9ac8bad217f837479c1bd517bc2a/CMakeLists.txt#L64

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:

https://github.com/kpu/intgemm/blob/47ab01ad8f0a9ac8bad217f837479c1bd517bc2a/CMakeLists.txt#L61

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?

XapaJIaMnu avatar Apr 21 '21 15:04 XapaJIaMnu

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

kpu avatar Apr 21 '21 16:04 kpu