Skip to content

cblas: add include directory to target#170

Merged
julielangou merged 2 commits intoReference-LAPACK:masterfrom
hunter-packages:cblas_add_include
Jul 1, 2017
Merged

cblas: add include directory to target#170
julielangou merged 2 commits intoReference-LAPACK:masterfrom
hunter-packages:cblas_add_include

Conversation

@NeroBurner
Copy link
Copy Markdown

add include directories to target. With this change in a cmake project one can link cblas with just the following

find_package(cblas CONFIG REQUIRED)
add_executable(foo foo.cpp)
target_link_libraries(foo cblas)

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 30, 2017

Codecov Report

Merging #170 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #170   +/-   ##
=======================================
  Coverage   82.25%   82.25%           
=======================================
  Files        1822     1822           
  Lines      177187   177187           
=======================================
  Hits       145752   145752           
  Misses      31435    31435

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e774b43...380178e. Read the comment docs.

Comment thread CBLAS/src/CMakeLists.txt
VERSION ${LAPACK_VERSION}
SOVERSION ${LAPACK_MAJOR_VERSION}
)
target_include_directories(cblas PUBLIC
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake minimum version is set to 2.8.10:

Command target_include_directories is not available:

This can be fixed by updating minimum requirement to 2.8.12:

If update to 2.8.12 is acceptable, alternatively you can use INCLUDES DESTINATION include here:

  • lapack/CMakeLists.txt

    Lines 102 to 107 in e774b43

    install(TARGETS ${lib}
    EXPORT ${LAPACK_INSTALL_EXPORT_NAME}
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    )

Docs:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think INCLUDES DESTINATION is also a v2.8.12 feature. I didn't find it in the v2.8.10 documentation
https://cmake.org/cmake/help/v2.8.10/cmake.html#command:install

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think INCLUDES DESTINATION is also a v2.8.12 feature

Yes, that's what I meant by "If update to 2.8.12 is acceptable, alternatively..." 😉

- needed for `target_include_directories()`
@julielangou julielangou merged commit 8ebb7f3 into Reference-LAPACK:master Jul 1, 2017
@ruslo ruslo deleted the cblas_add_include branch July 2, 2017 12:21
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

Successfully merging this pull request may close these issues.

4 participants