Skip to content

stdlib cannot be used as CMake subproject #285

Closed
@awvwgk

Description

@awvwgk

Using stdlib as CMake subproject is currently not possible. Attempting to include stdlib by add_subdirectory or with the FetchContent module will fail with:

❯ cmake -B _build -G Ninja -DCMAKE_INSTALL_PREFIX=$PWD/_dist
-- Retrieving stdlib from https://github.com/fortran-lang/stdlib
CMake Error at _build/_deps/stdlib-src/CMakeLists.txt:5 (include):
  include could not find load file:

    /home/awvwgk/projects/src/git/stdlib-cmake-example/cmake/stdlib.cmake


CMake Error at _build/_deps/stdlib-src/src/CMakeLists.txt:36 (fypp_f90):
  Unknown CMake command "fypp_f90".


-- Configuring incomplete, errors occurred!
See also "/home/awvwgk/projects/src/git/stdlib-cmake-example/_build/CMakeFiles/CMakeOutput.log".

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions