CMakeLists.txt 913 Bytes
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
project(FLEUR LANGUAGES C Fortran)

Daniel Wortmann's avatar
Daniel Wortmann committed
9 10


11 12
#some variables might be set in the environment
set(FLEUR_LIBRARIES ${FLEUR_LIBRARIES} $ENV{FLEUR_LIBRARIES})
Daniel Wortmann's avatar
Daniel Wortmann committed
13
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FLEUR_Fortran_FLAGS} $ENV{CMAKE_Fortran_FLAGS}")
14

Daniel Wortmann's avatar
Daniel Wortmann committed
15 16
if (DEFINED ENV{FLEUR_USE_SERIAL})
	set(FLEUR_USE_SERIAL ENV{FLEUR_USE_SERIAL})
17
else()
Daniel Wortmann's avatar
Daniel Wortmann committed
18
	set(FLEUR_USE_SERIAL TRUE)
19 20 21 22
endif()


include("cmake/CompilerConfig.txt")
23 24

include("cmake/ReportConfig.txt")
25
include("cmake/Generate_Schema.cmake")
26 27
include("cmake/Files_and_Targets.txt")

28 29
include("cmake/filespecific.cmake")

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