Skip to content
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

Proposition for fixing CMake procedure #923

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 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
72 changes: 5 additions & 67 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#### Pre-process: .fpp -> .f90 via Fypp


jvdp1 marked this conversation as resolved.
Show resolved Hide resolved
# Create a list of the files to be preprocessed
set(fppFiles
stdlib_ascii.fypp
Expand All @@ -21,7 +22,6 @@ set(fppFiles
stdlib_io_npy_load.fypp
stdlib_io_npy_save.fypp
stdlib_kinds.fypp
blas/stdlib_blas_constants.fypp
stdlib_linalg.fypp
stdlib_linalg_diag.fypp
stdlib_linalg_least_squares.fypp
Expand Down Expand Up @@ -86,77 +86,14 @@ set(fppFiles
# Preprocessed files to contain preprocessor directives -> .F90
set(cppFiles
stdlib_linalg_constants.fypp
blas/stdlib_blas.fypp
blas/stdlib_linalg_blas_aux.fypp
blas/stdlib_blas_level1.fypp
blas/stdlib_blas_level2_gen.fypp
blas/stdlib_blas_level2_ban.fypp
blas/stdlib_blas_level2_pac.fypp
blas/stdlib_blas_level2_sym.fypp
blas/stdlib_blas_level2_tri.fypp
blas/stdlib_blas_level3_gen.fypp
blas/stdlib_blas_level3_sym.fypp
blas/stdlib_blas_level3_tri.fypp

lapack/stdlib_lapack_base.fypp
lapack/stdlib_lapack_solve.fypp
lapack/stdlib_lapack_others.fypp
lapack/stdlib_lapack_orthogonal_factors.fypp
lapack/stdlib_lapack_eig_svd_lsq.fypp
lapack/stdlib_linalg_lapack_aux.fypp

lapack/stdlib_lapack_auxiliary.fypp
lapack/stdlib_lapack_blas_like_base.fypp
lapack/stdlib_lapack_blas_like_l1.fypp
lapack/stdlib_lapack_blas_like_l2.fypp
lapack/stdlib_lapack_blas_like_l3.fypp
lapack/stdlib_lapack_blas_like_mnorm.fypp
lapack/stdlib_lapack_blas_like_scalar.fypp
lapack/stdlib_lapack_cosine_sine.fypp
lapack/stdlib_lapack_cosine_sine2.fypp
lapack/stdlib_lapack_eigv_comp.fypp
lapack/stdlib_lapack_eigv_comp2.fypp
lapack/stdlib_lapack_eigv_gen.fypp
lapack/stdlib_lapack_eigv_gen2.fypp
lapack/stdlib_lapack_eigv_gen3.fypp
lapack/stdlib_lapack_eigv_std_driver.fypp
lapack/stdlib_lapack_eigv_svd_bidiag_dc.fypp
lapack/stdlib_lapack_eigv_svd_drivers.fypp
lapack/stdlib_lapack_eigv_svd_drivers2.fypp
lapack/stdlib_lapack_eigv_svd_drivers3.fypp
lapack/stdlib_lapack_eigv_sym_comp.fypp
lapack/stdlib_lapack_eigv_sym.fypp
lapack/stdlib_lapack_eigv_tridiag.fypp
lapack/stdlib_lapack_eigv_tridiag2.fypp
lapack/stdlib_lapack_eigv_tridiag3.fypp
lapack/stdlib_lapack_givens_jacobi_rot.fypp
lapack/stdlib_lapack_householder_reflectors.fypp
lapack/stdlib_lapack_lsq.fypp
lapack/stdlib_lapack_lsq_aux.fypp
lapack/stdlib_lapack_lsq_constrained.fypp
lapack/stdlib_lapack_orthogonal_factors_ql.fypp
lapack/stdlib_lapack_orthogonal_factors_qr.fypp
lapack/stdlib_lapack_orthogonal_factors_rz.fypp
lapack/stdlib_lapack_others_sm.fypp
lapack/stdlib_lapack_solve_aux.fypp
lapack/stdlib_lapack_solve_chol_comp.fypp
lapack/stdlib_lapack_solve_chol.fypp
lapack/stdlib_lapack_solve_ldl_comp.fypp
lapack/stdlib_lapack_solve_ldl_comp2.fypp
lapack/stdlib_lapack_solve_ldl_comp3.fypp
lapack/stdlib_lapack_solve_ldl_comp4.fypp
lapack/stdlib_lapack_solve_ldl.fypp
lapack/stdlib_lapack_solve_lu_comp.fypp
lapack/stdlib_lapack_solve_lu.fypp
lapack/stdlib_lapack_solve_tri_comp.fypp
lapack/stdlib_lapack_svd_bidiag_qr.fypp
lapack/stdlib_lapack_svd_comp.fypp
lapack/stdlib_lapack_svd_comp2.fypp

stdlib_linalg_blas.fypp
stdlib_linalg_lapack.fypp
)

add_subdirectory(blas)
add_subdirectory(lapack)

fypp_f90("${fyppFlags}" "${fppFiles}" outFiles)
fypp_f90pp("${fyppFlags}" "${cppFiles}" outPreprocFiles)

Expand All @@ -183,6 +120,7 @@ set(SRC
${outPreprocFiles}
)

message(${outPreprocFiles})
jvdp1 marked this conversation as resolved.
Show resolved Hide resolved
add_library(${PROJECT_NAME} ${SRC})

set_target_properties(
Expand Down
24 changes: 24 additions & 0 deletions src/blas/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
####

set(dir "${CMAKE_CURRENT_SOURCE_DIR}")

list(APPEND fppFiles
blas/stdlib_blas_constants.fypp
)

list(APPEND cppFiles
blas/stdlib_blas.fypp
blas/stdlib_blas_level1.fypp
blas/stdlib_blas_level2_ban.fypp
blas/stdlib_blas_level2_gen.fypp
blas/stdlib_blas_level2_pac.fypp
blas/stdlib_blas_level2_sym.fypp
blas/stdlib_blas_level2_tri.fypp
blas/stdlib_blas_level3_gen.fypp
blas/stdlib_blas_level3_sym.fypp
blas/stdlib_blas_level3_tri.fypp
blas/stdlib_linalg_blas_aux.fypp
)

set(fppFiles "${fppFiles}" PARENT_SCOPE)
set(cppFiles "${cppFiles}" PARENT_SCOPE)
58 changes: 58 additions & 0 deletions src/lapack/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
list(APPEND cppFiles
lapack/stdlib_lapack_base.fypp
lapack/stdlib_lapack_solve.fypp
lapack/stdlib_lapack_others.fypp
lapack/stdlib_lapack_orthogonal_factors.fypp
lapack/stdlib_lapack_eig_svd_lsq.fypp
lapack/stdlib_linalg_lapack_aux.fypp

lapack/stdlib_lapack_auxiliary.fypp
lapack/stdlib_lapack_blas_like_base.fypp
lapack/stdlib_lapack_blas_like_l1.fypp
lapack/stdlib_lapack_blas_like_l2.fypp
lapack/stdlib_lapack_blas_like_l3.fypp
lapack/stdlib_lapack_blas_like_mnorm.fypp
lapack/stdlib_lapack_blas_like_scalar.fypp
lapack/stdlib_lapack_cosine_sine.fypp
lapack/stdlib_lapack_cosine_sine2.fypp
lapack/stdlib_lapack_eigv_comp.fypp
lapack/stdlib_lapack_eigv_comp2.fypp
lapack/stdlib_lapack_eigv_gen.fypp
lapack/stdlib_lapack_eigv_gen2.fypp
lapack/stdlib_lapack_eigv_gen3.fypp
lapack/stdlib_lapack_eigv_std_driver.fypp
lapack/stdlib_lapack_eigv_svd_bidiag_dc.fypp
lapack/stdlib_lapack_eigv_svd_drivers.fypp
lapack/stdlib_lapack_eigv_svd_drivers2.fypp
lapack/stdlib_lapack_eigv_svd_drivers3.fypp
lapack/stdlib_lapack_eigv_sym_comp.fypp
lapack/stdlib_lapack_eigv_sym.fypp
lapack/stdlib_lapack_eigv_tridiag.fypp
lapack/stdlib_lapack_eigv_tridiag2.fypp
lapack/stdlib_lapack_eigv_tridiag3.fypp
lapack/stdlib_lapack_givens_jacobi_rot.fypp
lapack/stdlib_lapack_householder_reflectors.fypp
lapack/stdlib_lapack_lsq.fypp
lapack/stdlib_lapack_lsq_aux.fypp
lapack/stdlib_lapack_lsq_constrained.fypp
lapack/stdlib_lapack_orthogonal_factors_ql.fypp
lapack/stdlib_lapack_orthogonal_factors_qr.fypp
lapack/stdlib_lapack_orthogonal_factors_rz.fypp
lapack/stdlib_lapack_others_sm.fypp
lapack/stdlib_lapack_solve_aux.fypp
lapack/stdlib_lapack_solve_chol_comp.fypp
lapack/stdlib_lapack_solve_chol.fypp
lapack/stdlib_lapack_solve_ldl_comp.fypp
lapack/stdlib_lapack_solve_ldl_comp2.fypp
lapack/stdlib_lapack_solve_ldl_comp3.fypp
lapack/stdlib_lapack_solve_ldl_comp4.fypp
lapack/stdlib_lapack_solve_ldl.fypp
lapack/stdlib_lapack_solve_lu_comp.fypp
lapack/stdlib_lapack_solve_lu.fypp
lapack/stdlib_lapack_solve_tri_comp.fypp
lapack/stdlib_lapack_svd_bidiag_qr.fypp
lapack/stdlib_lapack_svd_comp.fypp
lapack/stdlib_lapack_svd_comp2.fypp
)

set(cppFiles "${cppFiles}" PARENT_SCOPE)
Loading