diff options
author | Brad King <brad.king@kitware.com> | 2007-03-22 13:45:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-03-22 13:45:25 (GMT) |
commit | 5a32aa5919bd9dab272748c0e0ea12fbcd36436b (patch) | |
tree | b4b0d2c70b896a8c95c91c88112ec2b3bb9d987d /Source/cmMakefile.cxx | |
parent | 187816c9371e49769c02481ea46491b2d7e22d66 (diff) | |
download | CMake-5a32aa5919bd9dab272748c0e0ea12fbcd36436b.zip CMake-5a32aa5919bd9dab272748c0e0ea12fbcd36436b.tar.gz CMake-5a32aa5919bd9dab272748c0e0ea12fbcd36436b.tar.bz2 |
ENH: Added target property ENABLE_EXPORTS for executable targets. It enables the executables for linking by loadable modules that import symbols from the executable. This finishes the executable import library support mentioned in bug #4210.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 78b44a4..e5dc29b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -944,13 +944,16 @@ void cmMakefile::AddLinkLibraryForTarget(const char *target, } // if it is not a static or shared library then you can not link to it if(!((tgt->GetType() == cmTarget::STATIC_LIBRARY) || - (tgt->GetType() == cmTarget::SHARED_LIBRARY))) + (tgt->GetType() == cmTarget::SHARED_LIBRARY) || + (tgt->GetType() == cmTarget::EXECUTABLE && + tgt->GetPropertyAsBool("ENABLE_EXPORTS")))) { cmOStringStream e; e << "Attempt to add link target " << lib << " of type: " << cmTarget::TargetTypeNames[static_cast<int>(tgt->GetType())] << "\nto target " << target - << ". You can only link to STATIC or SHARED libraries."; + << ". One can only link to STATIC or SHARED libraries, or " + << "to executables with the ENABLE_EXPORTS property set."; // in older versions of cmake linking to modules was allowed if( tgt->GetType() == cmTarget::MODULE_LIBRARY ) { |