diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-06-18 14:33:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-07 23:57:06 (GMT) |
commit | 904ff9fe592882db5dae88e526db2b380d92f87d (patch) | |
tree | 2b03c49057bcfb72c69df6148f3028c48a308e30 /Source/cmMakefile.h | |
parent | d4134352abf69374fdad24d53d67734a135daaa5 (diff) | |
download | CMake-904ff9fe592882db5dae88e526db2b380d92f87d.zip CMake-904ff9fe592882db5dae88e526db2b380d92f87d.tar.gz CMake-904ff9fe592882db5dae88e526db2b380d92f87d.tar.bz2 |
export: Add policy CMP0024 to disallow include() of export files
Currently, export() is executed at configure-time.
One problem with this is that certain exported properties like
the link interface may not be complete at the point the export() is
encountered leading to an incorrect or incomplete exported
representation. Additionally, the generated IMPORTED_LOCATION
property may even be incorrect if commands following the export()
have an effect on it.
Another problem is that it requires the C++ implementation of cmake
to be capable of computing the exported information at configure time.
This is a limitation on the cleanup and maintenance of the code. At
some point in the future, this limitation will be dropped and more
implementation will be moved from cmTarget to cmGeneratorTarget.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 8bce9fd..362b066 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -489,6 +489,18 @@ public: return this->cmCurrentListFile.c_str(); } + void AddExportedTargetsFile(const std::string &filename) + { + this->ExportedTargetsFiles.insert(filename); + } + + bool IsExportedTargetsFile(const std::string &filename) const + { + const std::set<std::string>::const_iterator it + = this->ExportedTargetsFiles.find(filename); + return it != this->ExportedTargetsFiles.end(); + } + //@} /** @@ -1041,7 +1053,7 @@ private: void EnforceDirectoryLevelRules(); bool GeneratingBuildSystem; - + std::set<std::string> ExportedTargetsFiles; /** * Old version of GetSourceFileWithOutput(const char*) kept for * backward-compatibility. It implements a linear search and support |