summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetLinkLibrariesCommand.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-10-02 18:50:46 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-10-02 18:50:46 (GMT)
commit1e62f2392ced335cc5ae34b6ea6ed869a3f899ae (patch)
treea4b56ab028ad60e3d78e42b75ebc8d13c3d33fcc /Source/cmTargetLinkLibrariesCommand.cxx
parenta1d61afcf6a35a1db0bfff25ddccf5cc087f71f5 (diff)
downloadCMake-1e62f2392ced335cc5ae34b6ea6ed869a3f899ae.zip
CMake-1e62f2392ced335cc5ae34b6ea6ed869a3f899ae.tar.gz
CMake-1e62f2392ced335cc5ae34b6ea6ed869a3f899ae.tar.bz2
ENH: Add CMAKE_IGNORE_DEPENDENCIES_ORDERING to prevent warnings about dependency problems
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index d2d80df..6b3e50f 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -85,19 +85,22 @@ void cmTargetLinkLibrariesCommand::FinalPass()
{
std::vector<std::string>::size_type cc;
std::string libPath;
- for ( cc = 0; cc < m_HasLocation.size(); cc ++ )
+ if ( !m_Makefile->GetDefinition("CMAKE_IGNORE_DEPENDENCIES_ORDERING") )
{
- libPath = m_HasLocation[cc] + "_CMAKE_PATH";
- const char* dir = m_Makefile->GetDefinition(libPath.c_str());
- if ( dir )
+ for ( cc = 0; cc < m_HasLocation.size(); cc ++ )
{
- std::string str = "Library " + m_HasLocation[cc] +
- " is defined using ADD_LIBRARY after the library is used "
- "using TARGET_LINK_LIBRARIES for the target " + m_TargetName +
- ". This breaks CMake's dependency "
- "handling. Please fix the CMakeLists.txt file.";
- this->SetError(str.c_str());
- cmSystemTools::Message(str.c_str(), "CMake Error");
+ libPath = m_HasLocation[cc] + "_CMAKE_PATH";
+ const char* dir = m_Makefile->GetDefinition(libPath.c_str());
+ if ( dir )
+ {
+ std::string str = "Library " + m_HasLocation[cc] +
+ " is defined using ADD_LIBRARY after the library is used "
+ "using TARGET_LINK_LIBRARIES for the target " + m_TargetName +
+ ". This breaks CMake's dependency "
+ "handling. Please fix the CMakeLists.txt file.";
+ this->SetError(str.c_str());
+ cmSystemTools::Message(str.c_str(), "CMake Error");
+ }
}
}
}