Skip to content

Fix subproject build #284

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

Merged
merged 3 commits into from
Jan 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.14.0)
project(stdlib Fortran)
enable_testing()

include(${CMAKE_SOURCE_DIR}/cmake/stdlib.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/stdlib.cmake)

# --- compiler options
if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
Expand Down Expand Up @@ -52,3 +52,8 @@ if(NOT FYPP)
endif()

add_subdirectory(src)

install(EXPORT fortran_stdlib-targets
NAMESPACE fortran_stdlib::
DESTINATION "lib/cmake/fortran_stdlib"
)
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ endif()
add_subdirectory(tests)

install(TARGETS fortran_stdlib
EXPORT fortran_stdlib-targets
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
)
install(DIRECTORY ${LIB_MOD_DIR} DESTINATION include)