CMakeLists.txt 1.04 KB
Newer Older
Daniel Wortmann's avatar
Daniel Wortmann committed
1 2 3 4 5 6
cmake_minimum_required(VERSION 3.0)
#Some stuff might be defined in config file
if (EXISTS "${CMAKE_BINARY_DIR}/config.cmake")
   include("${CMAKE_BINARY_DIR}/config.cmake")
endif()

7 8 9 10 11
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()

12 13 14
# sometimes cmake clears CMAKE_Fortran_FLAGS during project()
set(CMAKE_Fortran_FLAGS_backup ${CMAKE_Fortran_FLAGS})
set(CMAKE_Fortran_FLAGS "")
15
project(FLEUR LANGUAGES C CXX Fortran)
16
string(STRIP "${CMAKE_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS_backup}" CMAKE_Fortran_FLAGS)
17 18

include("cmake/CompilerConfig.txt")
19

20
include("cmake/Generate_Schema.cmake")
21

22 23
include("cmake/Files_and_Targets.txt")

24
include("cmake/filespecific.cmake")
25

26 27
include("cmake/ReportConfig.txt")

28

29
#install(TARGETS fleur inpgen DESTINATION bin)
30
install(PROGRAMS ${CMAKE_BINARY_DIR}/fleur
31 32 33
        CONFIGURATIONS Debug
        DESTINATION bin
        RENAME fleur_dbg)