From d1d488d07f79057c0d107c74a167c547e64f6fa2 Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Sat, 1 Aug 2015 10:41:50 +0200 Subject: [PATCH] fix for problem with F90 modules observed on IBM --- modules/fc.cmake | 5 +++-- modules/fc_optional.cmake | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/fc.cmake b/modules/fc.cmake index eadc10d..7169e7d 100644 --- a/modules/fc.cmake +++ b/modules/fc.cmake @@ -11,7 +11,7 @@ # # Variables defined:: # -# CMAKE_Fortran_MODULE_DIRECTORY (${PROJECT_BINARY_DIR}/include/fortran) +# CMAKE_Fortran_MODULE_DIRECTORY # # Variables modified:: # @@ -30,7 +30,8 @@ enable_language(Fortran) -set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/include/fortran) +set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/modules) +include_directories(${PROJECT_BINARY_DIR}/modules) if(NOT DEFINED CMAKE_Fortran_COMPILER_ID) message(FATAL_ERROR "CMAKE_Fortran_COMPILER_ID variable is not defined!") diff --git a/modules/fc_optional.cmake b/modules/fc_optional.cmake index b29673c..86e7fff 100644 --- a/modules/fc_optional.cmake +++ b/modules/fc_optional.cmake @@ -12,7 +12,7 @@ # # Variables defined:: # -# CMAKE_Fortran_MODULE_DIRECTORY (${PROJECT_BINARY_DIR}/include/fortran) +# CMAKE_Fortran_MODULE_DIRECTORY # # Variables modified:: # @@ -40,7 +40,8 @@ option(ENABLE_FC_SUPPORT "Enable Fortran language support" ON) if(ENABLE_FC_SUPPORT) enable_language(Fortran) - set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/include/fortran) + set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/modules) + include_directories(${PROJECT_BINARY_DIR}/modules) if(NOT DEFINED CMAKE_Fortran_COMPILER_ID) message(FATAL_ERROR "CMAKE_Fortran_COMPILER_ID variable is not defined!")