From ae18d8b1bfb613c6153f06f6e7e6229c0df4b8a3 Mon Sep 17 00:00:00 2001 From: David Beckingsale Date: Mon, 2 Oct 2017 13:46:42 -0700 Subject: [PATCH] Move location of default value --- cmake/BLTMacros.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/BLTMacros.cmake b/cmake/BLTMacros.cmake index 80d7d97f9..b7ae282ac 100644 --- a/cmake/BLTMacros.cmake +++ b/cmake/BLTMacros.cmake @@ -367,6 +367,10 @@ macro(blt_add_library) DESTINATION ${headers_build_dir}) endif() + + # Clear value of _have_fortran from previous calls + set(_have_fortran False) + # Must tell fortran where to look for modules # CMAKE_Fortran_MODULE_DIRECTORY is the location of generated modules foreach (_file ${arg_SOURCES}) @@ -379,9 +383,6 @@ macro(blt_add_library) target_include_directories(${arg_NAME} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}) endif() - # Otherwise _have_fortran is set for other targets - set(_have_fortran False) - blt_setup_target( NAME ${arg_NAME} DEPENDS_ON ${arg_DEPENDS_ON} )