diff options
author | Brad King <brad.king@kitware.com> | 2016-09-19 19:36:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-20 12:48:41 (GMT) |
commit | 7b5f85677c8aa067a5fef1cc68f4d8c8600693fa (patch) | |
tree | 1f5d9a419980bb89df73afae0d44aba8c731b314 /Source/cmGeneratorTarget.h | |
parent | 1777570fe5eb194d930f6716865bc909269da57e (diff) | |
download | CMake-7b5f85677c8aa067a5fef1cc68f4d8c8600693fa.zip CMake-7b5f85677c8aa067a5fef1cc68f4d8c8600693fa.tar.gz CMake-7b5f85677c8aa067a5fef1cc68f4d8c8600693fa.tar.bz2 |
Fortran: Use module dir flag if needed for default module directory
Our buildsystem model says that the default Fortran module output
directory is the build tree directory corresponding to the source tree
`CMakeLists.txt` file adding the current target. Extend
`cmGeneratorTarget::GetFortranModuleDirectory` to allow generators to
pass in the compiler working directory. If the working directory does
not match the default Fortran module output directory then we need an
explicit module directory flag (e.g. `-J`) to tell the compiler to
put/use modules in the latter.
This does not affect the Makefile generator but will be useful for
future introduction of Fortran support to the Ninja generator.
Diffstat (limited to 'Source/cmGeneratorTarget.h')
-rw-r--r-- | Source/cmGeneratorTarget.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 715220e..8e17b8f 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -537,12 +537,13 @@ public: void GetTargetVersion(bool soversion, int& major, int& minor, int& patch) const; - std::string GetFortranModuleDirectory() const; + std::string GetFortranModuleDirectory(std::string const& working_dir) const; private: void AddSourceCommon(const std::string& src); - std::string CreateFortranModuleDirectory() const; + std::string CreateFortranModuleDirectory( + std::string const& working_dir) const; mutable bool FortranModuleDirectoryCreated; mutable std::string FortranModuleDirectory; |