-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
46 lines (35 loc) · 1.68 KB
/
Copy pathCMakeLists.txt
File metadata and controls
46 lines (35 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
cmake_minimum_required(VERSION 3.5)
#Some stuff might be defined in config file
if (EXISTS "${CMAKE_BINARY_DIR}/config.cmake")
include("${CMAKE_BINARY_DIR}/config.cmake")
endif()
if(${CMAKE_VERSION} VERSION_LESS "3.10.0")
message("Your cmake Version is rather old. Please consider to update cmake")
message("More modern cmake versions might be needed to make sure your compiler settings are detected correctly")
endif()
# sometimes cmake clears CMAKE_Fortran_FLAGS during project()
set(CMAKE_Fortran_FLAGS_backup ${CMAKE_Fortran_FLAGS})
set(CMAKE_Fortran_FLAGS "")
project(FLEUR LANGUAGES C CXX Fortran)
string(STRIP "${CMAKE_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS_backup}" CMAKE_Fortran_FLAGS)
include("cmake/CompilerConfig.txt")
include("cmake/Generate_Schema.cmake")
include("cmake/Files_and_Targets.txt")
include("cmake/filespecific.cmake")
include("cmake/pytest_setup.cmake")
# Also build inpgen2+3
add_subdirectory("src/tools/inpgen2")
add_subdirectory("src/tools/inpgen3")
# Ensure buildinfo.h is generated before inpgen2/3 and fleurinpgen are compiled.
# The 'buildinfo' target (defined in cmake/compileenv.txt) generates the header
# independently, so we no longer need to depend on the full fleur/fleur_MPI builds.
add_dependencies("inpgen2" buildinfo)
add_dependencies("inpgen3" buildinfo)
add_dependencies("fleurinpgen" buildinfo)
#Build fleuriste TUI/CLI
add_subdirectory("src/tools/inpgen3/fleuriste")
include("cmake/ReportConfig.txt")
#install(TARGETS fleur inpgen DESTINATION bin)
install(PROGRAMS ${CMAKE_BINARY_DIR}/fleur DESTINATION bin OPTIONAL)
install(PROGRAMS ${CMAKE_BINARY_DIR}/fleur_MPI DESTINATION bin OPTIONAL)
install(PROGRAMS ${CMAKE_BINARY_DIR}/inpgen DESTINATION bin)