Commit cb41c69c authored by Andreas Beckmann's avatar Andreas Beckmann

do not duplicate CMAKE_Fortran_FLAGS from the environment

deterministically clear CMAKE_Fortran_FLAGS before calling project()

fixes: #312
parent ce0145a9
......@@ -4,9 +4,11 @@ if (EXISTS "${CMAKE_BINARY_DIR}/config.cmake")
include("${CMAKE_BINARY_DIR}/config.cmake")
endif()
set(tmp ${CMAKE_Fortran_FLAGS})
# sometimes cmake clears CMAKE_Fortran_FLAGS during project()
set(CMAKE_Fortran_FLAGS_backup ${CMAKE_Fortran_FLAGS})
set(CMAKE_Fortran_FLAGS "")
project(FLEUR LANGUAGES C Fortran)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${tmp}")
string(STRIP "${CMAKE_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS_backup}" CMAKE_Fortran_FLAGS)
include("cmake/CompilerConfig.txt")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment