Merge branch 'fortran-module-preprocessor-defs' into release

This commit is contained in:
Brad King 2015-07-06 10:42:42 -04:00
commit b37fb49646
4 changed files with 9 additions and 2 deletions

View File

@ -143,7 +143,7 @@ cmDependsFortran
std::vector<std::string> definitions;
cmMakefile* mf = this->LocalGenerator->GetMakefile();
if(const char* c_defines =
mf->GetDefinition("CMAKE_TARGET_DEFINITIONS"))
mf->GetDefinition("CMAKE_TARGET_DEFINITIONS_Fortran"))
{
cmSystemTools::ExpandListArgument(c_defines, definitions);
}

View File

@ -168,7 +168,7 @@ if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
add_definitions(-DFOO -DBAR=1)
include_directories(${testf_SOURCE_DIR}/include)
add_executable(test_preprocess test_preprocess.F90)
add_executable(test_preprocess test_preprocess.F90 test_preprocess_module.F90)
set(TEST_MODULE_DEPENDS 1)
endif()

View File

@ -46,6 +46,8 @@ PROGRAM PPTEST
#endif
! 0 ; <empty>
USE PPAvailable
#include "test_preprocess.h"
END PROGRAM

View File

@ -0,0 +1,5 @@
#ifdef FOO
MODULE PPAvailable
! no conent
END MODULE
#endif