Skip to content

[Linux] FindSCOTCH.cmake and FindElas.cmake outside of CMAKE_MODULE_PATH. #109

@bartoszek

Description

@bartoszek

I'm having a smalish problem when building elmerfem with mmg:5.5.2 on linux host.
Mainly cmake complains about missing FindSCOTCH.cmake.
FindSCOTCH.cmake gets installed into /usr/lib/cmake/mmg here:

mmg/CMakeLists.txt

Lines 485 to 488 in 71e46c5

install(FILES
${PROJECT_SOURCE_DIR}/cmake/modules/FindSCOTCH.cmake
${PROJECT_SOURCE_DIR}/cmake/modules/FindElas.cmake
DESTINATION ${MMG_CMAKE_INSTALL_DIR} )

Instead of /usr/lib/cmake/Modules which allow cmake to discover it.
You could move the file, or append current dir to path like in for example gnuradio GnuradioConfig.cmake here:

# Allows us to use all .cmake files in this directory
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}")

https://github.com/gnuradio/gnuradio/blob/146e9f34c2e7e8b833c1747867e3275475d94be2/cmake/Modules/GnuradioConfig.cmake.in#L10-L11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions