diff options
author | Brad King <brad.king@kitware.com> | 2008-01-09 15:30:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-09 15:30:11 (GMT) |
commit | b761da39c14c9f003d9113418aca9370f30a5e6e (patch) | |
tree | 3307dab56eb95df89992cb8c407dbe6d9d625fe4 /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | 09e309c3d097f8cc58fc16c4194d0f51dec9f02d (diff) | |
download | CMake-b761da39c14c9f003d9113418aca9370f30a5e6e.zip CMake-b761da39c14c9f003d9113418aca9370f30a5e6e.tar.gz CMake-b761da39c14c9f003d9113418aca9370f30a5e6e.tar.bz2 |
ENH: Patch from Maik to add preprocessor directive handling to Fortran dependency scanning. Also added -fpp flag to Intel Fortran compiler on Windows by default.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 0976e17..1613b82 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1485,7 +1485,13 @@ cmLocalUnixMakefileGenerator3 #ifdef CMAKE_BUILD_WITH_CMAKE else if(lang == "Fortran") { - scanner = new cmDependsFortran(includes); + std::vector<std::string> defines; + if(const char* c_defines = mf->GetDefinition("CMAKE_DEFINITIONS")) + { + cmSystemTools::ExpandListArgument(c_defines, defines); + } + + scanner = new cmDependsFortran(includes, defines); } else if(lang == "Java") { @@ -1845,6 +1851,14 @@ void cmLocalUnixMakefileGenerator3 << cid << "\")\n"; } } + + cmakefileStream + << "\n" + << "# Preprocessor definitions for this directory.\n" + << "SET(CMAKE_DEFINITIONS\n" + << " " << this->Makefile->GetDefineFlags() << "\n" + << " )\n"; + } //---------------------------------------------------------------------------- |