summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-05-01 14:38:35 (GMT)
committerBrad King <brad.king@kitware.com>2009-05-01 14:38:35 (GMT)
commit430cc2b4b7a817be2fbc445d6803163f1695a533 (patch)
treef41fc7fbf2fb1671bb0fa3b9e36bc6ecc5403957 /Source/cmTarget.cxx
parent2740db5eded92d61ae38e69d67a4e4179ae5d20e (diff)
downloadCMake-430cc2b4b7a817be2fbc445d6803163f1695a533.zip
CMake-430cc2b4b7a817be2fbc445d6803163f1695a533.tar.gz
CMake-430cc2b4b7a817be2fbc445d6803163f1695a533.tar.bz2
ENH: Always imply CLEAN_DIRECT_OUTPUT target prop
This property was left from before CMake always linked using full path library names for targets it builds. In order to safely link with "-lfoo" we needed to avoid having both shared and static libraries in the build tree for targets that switch on BUILD_SHARED_LIBS. This meant cleaning both shared and static names before creating the library, which led to the creation of CLEAN_DIRECT_OUTPUT to disable the behavior. Now that we always link with a full path we do not need to clean old library names left from an alternate setting of BUILD_SHARED_LIBS. This change removes the CLEAN_DIRECT_OUTPUT property and instead uses its behavior always. It removes some complexity from cmTarget internally.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx48
1 files changed, 0 insertions, 48 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 7acfe7e..1f0464d 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -78,17 +78,6 @@ void cmTarget::DefineProperties(cmake *cm)
"CMAKE_BUILD_WITH_INSTALL_RPATH if it is set when a target is created.");
cm->DefineProperty
- ("CLEAN_DIRECT_OUTPUT", cmProperty::TARGET,
- "Do not delete other variants of this target.",
- "When a library is built CMake by default generates code to remove "
- "any existing library using all possible names. This is needed "
- "to support libraries that switch between STATIC and SHARED by "
- "a user option. However when using OUTPUT_NAME to build a static "
- "and shared library of the same name using different logical target "
- "names the two targets will remove each other's files. This can be "
- "prevented by setting the CLEAN_DIRECT_OUTPUT property to 1.");
-
- cm->DefineProperty
("COMPILE_FLAGS", cmProperty::TARGET,
"Additional flags to use when compiling this target's sources.",
"The COMPILE_FLAGS property sets additional compiler flags used "
@@ -2724,43 +2713,6 @@ void cmTarget::GetLibraryNames(std::string& name,
}
//----------------------------------------------------------------------------
-void cmTarget::GetLibraryCleanNames(std::string& staticName,
- std::string& sharedName,
- std::string& sharedSOName,
- std::string& sharedRealName,
- std::string& importName,
- std::string& pdbName,
- const char* config)
-{
- // Get the name as if this were a static library.
- std::string soName;
- std::string realName;
- std::string impName;
- this->GetLibraryNamesInternal(staticName, soName, realName, impName,
- pdbName, cmTarget::STATIC_LIBRARY, config);
-
- // Get the names as if this were a shared library.
- if(this->GetType() == cmTarget::STATIC_LIBRARY)
- {
- // Since the real type is static then the user either specified
- // STATIC or did not specify a type. In the former case the
- // shared library will never be present. In the latter case the
- // type will never be MODULE. Either way the only names that
- // might have to be cleaned are the shared library names.
- this->GetLibraryNamesInternal(sharedName, sharedSOName, sharedRealName,
- importName, pdbName,
- cmTarget::SHARED_LIBRARY, config);
- }
- else
- {
- // Use the name of the real type of the library (shared or module).
- this->GetLibraryNamesInternal(sharedName, sharedSOName, sharedRealName,
- importName, pdbName, this->GetType(),
- config);
- }
-}
-
-//----------------------------------------------------------------------------
void cmTarget::GetLibraryNamesInternal(std::string& name,
std::string& soName,
std::string& realName,