diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-11-27 18:26:54 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-11-29 11:24:59 (GMT) |
commit | e1348056662b9ae0d399374b6726173d7bf0e9bb (patch) | |
tree | 5b1552d3942ab21a54c9d0844aac0b3fe202cdda /Source/cmExportInstallFileGenerator.cxx | |
parent | bb5905bb1342229c06cecee735322a8a28916b76 (diff) | |
download | CMake-e1348056662b9ae0d399374b6726173d7bf0e9bb.zip CMake-e1348056662b9ae0d399374b6726173d7bf0e9bb.tar.gz CMake-e1348056662b9ae0d399374b6726173d7bf0e9bb.tar.bz2 |
Export: Disallow export of targets with INTERFACE_SOURCES
This can be allowed in the next release, but it needs to have some
features present and tested such as
* Ensuring that relative paths do not appear in the generated property.
* Ensuring that paths to the source or build directories do not appear.
* Generating a check in the file for CMake 3.1 or later so that the
resulting property will be consumed.
* Ensuring that any referenced targets are part of an export set and
generating a check for them.
* INSTALL_INTERFACE and BUILD_INTERFACE content.
All of these checks are already done for INTERFACE_INCLUDE_DIRECTORIES,
but it is too late to add them for INTERFACE_SOURCES for CMake 3.1.
As the checks introduce some new error conditions, it is better to
disallow exporting fully for this case and introduce proper error
conditions later instead of policies.
Diffstat (limited to 'Source/cmExportInstallFileGenerator.cxx')
-rw-r--r-- | Source/cmExportInstallFileGenerator.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 89071c0..23180f1 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -123,6 +123,17 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) { cmTarget* te = (*tei)->Target; + if (te->GetProperty("INTERFACE_SOURCES")) + { + cmOStringStream e; + e << "Target \"" + << te->GetName() + << "\" has a populated INTERFACE_SOURCES property. This is not " + "currently supported."; + cmSystemTools::Error(e.str().c_str()); + return false; + } + requiresConfigFiles = requiresConfigFiles || te->GetType() != cmTarget::INTERFACE_LIBRARY; |