Files_and_Targets.txt 6.15 KB
Newer Older
1 2
include_directories(include)

3 4
set(c_filesInpgen io/xml/inputSchema.h io/xml/dropInputSchema.c)
set(c_filesFleur io/xml/inputSchema.h io/xml/dropInputSchema.c io/xml/xmlInterfaceWrapper.c)
5

6 7
set(fleur_F90 main/fleur.F90)
set(fleur_F77 "")
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
include(eigen/CMakeLists.txt)
include(force/CMakeLists.txt)
include(main/CMakeLists.txt)
include(core/CMakeLists.txt)
include(eigen_secvar/CMakeLists.txt)
include(global/CMakeLists.txt)
include(io/CMakeLists.txt)
include(optional/CMakeLists.txt)
include(xc-pot/CMakeLists.txt)
include(cdn/CMakeLists.txt)
include(diagonalization/CMakeLists.txt)
include(eigen_soc/CMakeLists.txt)
include(juDFT/CMakeLists.txt)
include(math/CMakeLists.txt)
include(orbdep/CMakeLists.txt)
include(cdn_mt/CMakeLists.txt)
include(dos/CMakeLists.txt)
include(fermi/CMakeLists.txt)
include(init/CMakeLists.txt)
include(ldau/CMakeLists.txt)
include(mix/CMakeLists.txt)
include(vgen/CMakeLists.txt)
30
include(inpgen/CMakeLists.txt)
31
include(docs/CMakeLists.txt)
32
include(tests/CMakeLists.txt)
33
if (${Fleur_uses_MPI})
34
  include(mpi/CMakeLists.txt)
35 36
endif()

37
#include(wannier/CMakeLists.txt)
38 39 40 41 42 43

set(inpgen_F77 
global/constants.f inpgen/element.f inpgen/atom_input.f inpgen/crystal.f inpgen/lattice2.f inpgen/setab.f inpgen/super_check.f
inpgen/atom_sym.f inpgen/generator.f inpgen/read_record.f inpgen/soc_or_ssdw.f inpgen/symproperties.f
inpgen/bravais_symm.f  inpgen/set_atom_core.f inpgen/spg_gen.f global/triang.f
inpgen/closure.f inpgen/lapw_input.f  inpgen/struct_input.f inpgen/write_struct.f
Gregor Michalicek's avatar
Gregor Michalicek committed
44
global/hybridmix.f  io/calculator.f global/ss_sym.f global/soc_sym.f math/inv3.f  io/rw_symfile.f
45 46 47
global/sort.f init/kptgen_hybrid.f init/od_kptsgen.f init/bravais.f init/divi.f init/brzone.f
init/kptmop.f init/kpttet.f init/bandstr1.F init/ordstar.f init/fulstar.f init/kprep.f
init/tetcon.f init/kvecon.f
48 49 50
)

set(inpgen_F90  io/xsf_io.f90
51
global/types.F90 global/enpara.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 io/rw_inp.f90 juDFT/juDFT.F90
Gregor Michalicek's avatar
Gregor Michalicek committed
52 53
juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 io/w_inpXML.f90 init/julia.f90 global/utility.F90 
init/compile_descr.F90 io/xmlOutput.F90)
54 55 56 57 58 59 60 61 62 63

set(fleur_SRC ${fleur_F90} ${fleur_F77})

set_source_files_properties(${fleur_F90} PROPERTIES Fortran_FORMAT FREE)
set_source_files_properties(${fleur_F77} PROPERTIES Fortran_FORMAT FIXED)
set_source_files_properties(${inpgen_F90} PROPERTIES Fortran_FORMAT FREE)
set_source_files_properties(${inpgen_F77} PROPERTIES Fortran_FORMAT FIXED)

if (${Fleur_uses_serial})
#Serial executables
64
add_executable(fleur ${fleur_SRC} ${c_filesFleur})
65 66 67
target_link_libraries(fleur ${HDF5_LIBS} ${LAPACK_LIBS})
set_target_properties(fleur PROPERTIES Fortran_MODULE_DIRECTORY fleur_modules COMPILE_OPTIONS -Ifleur_modules)

68
add_executable(fleur_INVS ${fleur_SRC} ${c_filesFleur})
69 70 71 72
target_link_libraries(fleur_INVS ${HDF5_LIBS} ${LAPACK_LIBS})
target_compile_definitions(fleur_INVS PUBLIC -DCPP_INVERSION)
set_target_properties(fleur_INVS PROPERTIES Fortran_MODULE_DIRECTORY fleur_INVS_modules COMPILE_OPTIONS -Ifleur_INVS_modules)

73
add_executable(fleur_SOC ${fleur_SRC} ${c_filesFleur})
74 75 76 77
target_link_libraries(fleur_SOC ${HDF5_LIBS} ${LAPACK_LIBS})
target_compile_definitions(fleur_SOC PUBLIC -DCPP_SOC)
set_target_properties(fleur_SOC PROPERTIES Fortran_MODULE_DIRECTORY fleur_SOC_modules COMPILE_OPTIONS -Ifleur_SOC_modules)

78 79

add_executable(fleur_INVS_SOC ${fleur_SRC} ${c_filesFleur})
80 81 82
target_link_libraries(fleur_INVS_SOC ${HDF5_LIBS} ${LAPACK_LIBS})
target_compile_definitions(fleur_INVS_SOC PUBLIC -DCPP_SOC -DCPP_INVERSION)
set_target_properties(fleur_INVS_SOC PROPERTIES Fortran_MODULE_DIRECTORY fleur_INVS_SOC_modules COMPILE_OPTIONS -Ifleur_INVS_SOC_modules)
83

84 85 86 87 88
endif()
#parallel executables
if(${Fleur_uses_MPI})
  #Preprocessor switches
  if (${Fleur_uses_ELEMENTAL})
89
    set(MPI_DEFINITIONS ${MPI_DEFINITION} -DCPP_ELEMENTAL)
90 91
  endif()
  if (${Fleur_uses_SCALAPACK})
92
    set(MPI_DEFINITIONS ${MPI_DEFINITION} -DCPP_SCALAPACK )
93 94
  endif()
  if (${Fleur_uses_ELPA})
95
    set(MPI_DEFINITIONS ${MPI_DEFINITION} -DCPP_ELPA -DCPP_ELPA2 )
96
  endif()
97
  set(MPI_DEFINITIONS -DCPP_MPI -DCPP_EVP  ${MPI_DEFINITIONS})
98 99

  #fleur_MPI
100
  add_executable(fleur_MPI ${juDFT_HDF} ${juDFT_SRC_F90} ${fleur_SRC} ${c_filesFleur}
101 102 103 104 105 106
${fleur_SRC_MPI})
  target_compile_definitions(fleur_MPI PUBLIC ${MPI_DEFINITIONS})
  target_link_libraries(fleur_MPI ${HDF5_LIBS} ${LAPACK_LIBS})
  set_target_properties(fleur_MPI PROPERTIES Fortran_MODULE_DIRECTORY fleur_MPI_modules COMPILE_OPTIONS -Ifleur_MPI_modules)

  #fleur_INVS_MPI
107
  add_executable(fleur_INVS_MPI ${juDFT_HDF} ${juDFT_SRC_F90} ${fleur_SRC} ${c_filesFleur}
108 109 110 111 112 113
${fleur_SRC_MPI})
  target_link_libraries(fleur_INVS_MPI ${HDF5_LIBS} ${LAPACK_LIBS})
  target_compile_definitions(fleur_INVS_MPI PUBLIC ${MPI_DEFINITIONS} -DCPP_INVERSION)
  set_target_properties(fleur_INVS_MPI PROPERTIES Fortran_MODULE_DIRECTORY fleur_INVS_MPI_modules COMPILE_OPTIONS -Ifleur_INVS_MPI_modules)

  #fleur_SOC_MPI
114
  add_executable(fleur_SOC_MPI ${juDFT_HDF} ${juDFT_SRC_F90} ${fleur_SRC} ${c_filesFleur}
115 116 117 118 119
${fleur_SRC_MPI})
  target_link_libraries(fleur_SOC_MPI ${HDF5_LIBS} ${LAPACK_LIBS})
  target_compile_definitions(fleur_SOC_MPI PUBLIC ${MPI_DEFINITIONS} -DCPP_SOC)
  set_target_properties(fleur_SOC_MPI PROPERTIES Fortran_MODULE_DIRECTORY fleur_SOC_MPI_modules COMPILE_OPTIONS -Ifleur_SOC_MPI_modules)

120 121 122
  #fleur_INVS_SOC_MPI
  add_executable(fleur_INVS_SOC_MPI ${juDFT_HDF} ${juDFT_SRC_F90} ${fleur_SRC} ${c_filesFleur}
${fleur_SRC_MPI})
123 124 125
  target_link_libraries(fleur_INVS_SOC_MPI ${HDF5_LIBS} ${LAPACK_LIBS})
  target_compile_definitions(fleur_INVS_SOC_MPI PUBLIC ${MPI_DEFINITIONS} -DCPP_SOC -DCPP_INVERSION)
  set_target_properties(fleur_INVS_SOC_MPI PROPERTIES Fortran_MODULE_DIRECTORY fleur_INVS_SOC_MPI_modules COMPILE_OPTIONS -Ifleur_INVS_SOC_MPI_modules)
126 127 128
endif ()

#inpgen executable
129
add_executable(inpgen ${inpgen_F77} ${inpgen_F90} ${juDFT_SRC_F90} ${c_filesInpgen})
130 131 132 133 134 135 136 137 138 139 140 141 142
set_target_properties(inpgen PROPERTIES Fortran_MODULE_DIRECTORY inpgen_modules COMPILE_OPTIONS -Iinpgen_modules)


if (${Fleur_uses_serial})        
install(TARGETS fleur fleur_INVS fleur_SOC 
        CONFIGURATIONS Release
        DESTINATION bin)
endif()
if (${Fleur_uses_MPI})        
install(TARGETS fleur_MPI fleur_INVS_MPI fleur_SOC_MPI
        CONFIGURATIONS Release
        DESTINATION bin)
endif()