-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
project(libdftd3 VERSION 0.9.2 LANGUAGES Fortran) | ||
|
||
set(LIBRARY_ONLY FALSE CACHE BOOL "Whether only library should be compiled") | ||
|
||
set(INSTALL_BIN_DIR "bin") | ||
set(INSTALL_MOD_DIR "include") | ||
set(INSTALL_LIB_DIR "lib") | ||
|
||
add_subdirectory(lib) | ||
if(NOT LIBRARY_ONLY) | ||
add_subdirectory(prg) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
set(sources | ||
api.f90 | ||
common.f90 | ||
core.f90 | ||
pars.f90 | ||
sizes.f90) | ||
|
||
add_library(dftd3 ${sources}) | ||
|
||
set(includedir ${CMAKE_CURRENT_BINARY_DIR}/include) | ||
|
||
set_target_properties(dftd3 PROPERTIES Fortran_MODULE_DIRECTORY ${includedir}) | ||
|
||
target_include_directories(dftd3 INTERFACE ${includedir}) | ||
|
||
install(TARGETS dftd3 | ||
ARCHIVE DESTINATION ${INSTALL_LIB_DIR} | ||
LIBRARY DESTINATION ${INSTALL_LIB_DIR}) | ||
|
||
install(DIRECTORY ${includedir}/ DESTINATION ${INSTALL_MOD_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
set(sources | ||
extras.f90 | ||
main.f90) | ||
|
||
add_executable(dftd3_standalone ${sources}) | ||
|
||
target_link_libraries(dftd3_standalone dftd3) | ||
|
||
set_target_properties(dftd3_standalone PROPERTIES OUTPUT_NAME "dftd3") | ||
|
||
install(TARGETS dftd3_standalone | ||
RUNTIME DESTINATION ${INSTALL_BIN_DIR}) |