Skip to content

stdlib cannot be used as CMake subproject #285

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

Closed
awvwgk opened this issue Dec 29, 2020 · 1 comment · Fixed by #284
Closed

stdlib cannot be used as CMake subproject #285

awvwgk opened this issue Dec 29, 2020 · 1 comment · Fixed by #284
Labels
bug Something isn't working

Comments

@awvwgk
Copy link
Member

awvwgk commented Dec 29, 2020

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".
@awvwgk awvwgk added the bug Something isn't working label Dec 29, 2020
@awvwgk awvwgk linked a pull request Dec 29, 2020 that will close this issue
@certik
Copy link
Member

certik commented Dec 29, 2020

Yes, we need to fix it.

Long term, I am hoping to simply let fpm generate the cmake files and we check them into the repository, and we ensure that they can be used as a cmake subproject.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants