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

Remove DBCSR_OPT option in cmake #93

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
15 changes: 11 additions & 4 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if(PROGRESS)
find_package(PROGRESS REQUIRED)
endif()

option(DBCSR_OPT "Whether to use DBCSR" OFF)
#option(DBCSR_OPT "Whether to use DBCSR" OFF)

option(GPUOPT "Whether to use the GPU" OFF)
if(GPUOPT)
Expand Down Expand Up @@ -119,20 +119,27 @@ readppotspline.F90 pairpotspline.F90 errors.F90 initcoulombklist.F90
flcnnono.F90 flcnnono_sp.F90 kflcnnono.F90 dosfittab.F90
readppotD.F90 pairpot_plusD.F90)

#if(NOT DBCSR_OPT)
# set(DBCSR)
#else()
# set(DBCSR dbcsr_var_mod.f90 init_dbcsr.f90 shutdown_dbcsr.f90)
#endif()

foreach(_m MYMODULES MYSUBS DBCSR)
set(${_m}_SOURCES)
foreach(_file ${${_m}})
list(APPEND ${_m}_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../src/${_file})
endforeach()
endforeach()

add_library(latte ${MYMODULES_SOURCES} ${MYSUBS_SOURCES} ${DBCSR_SOURCES}
${CMAKE_CURRENT_SOURCE_DIR}/../src/latte_lib.f90
${CMAKE_CURRENT_SOURCE_DIR}/../src/latte_c_bind.f90

if(NOT DBCSR_OPT)
set(DBCSR_SOURCES)
endif()

add_library(latte ${MYMODULES_SOURCES} ${MYSUBS_SOURCES}
${CMAKE_CURRENT_SOURCE_DIR}/../src/latte_lib.F90
${CMAKE_CURRENT_SOURCE_DIR}/../src/latte_c_bind.F90
)
target_compile_options(latte PRIVATE -cpp ${OpenMP_Fortran_FLAGS})
install(TARGETS latte LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
Expand Down