ENH: Fix ADD_DEPENDENCIES on Unix makefiles and fix SimpleInstall test not to link the module
This commit is contained in:
parent
c06828a4a0
commit
59adb4eabe
|
@ -1603,9 +1603,18 @@ void cmLocalUnixMakefileGenerator::OutputDependLibs(std::ostream& fout)
|
||||||
if(emitted.insert(*util).second)
|
if(emitted.insert(*util).second)
|
||||||
{
|
{
|
||||||
// Output this dependency.
|
// Output this dependency.
|
||||||
|
std::string utilType = *util + "_LIBRARY_TYPE";
|
||||||
|
const char* libType = m_Makefile->GetDefinition(utilType.c_str());
|
||||||
|
if ( libType )
|
||||||
|
{
|
||||||
|
this->OutputLibDepend(fout, util->c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
this->OutputExeDepend(fout, util->c_str());
|
this->OutputExeDepend(fout, util->c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
fout << "\n";
|
fout << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,9 @@ ADD_LIBRARY(test1 STATIC lib1.cxx)
|
||||||
ADD_LIBRARY(test2 SHARED lib2.cxx)
|
ADD_LIBRARY(test2 SHARED lib2.cxx)
|
||||||
ADD_LIBRARY(test3 MODULE lib3.cxx)
|
ADD_LIBRARY(test3 MODULE lib3.cxx)
|
||||||
ADD_EXECUTABLE (SimpleInstall inst.cxx foo.c foo.h)
|
ADD_EXECUTABLE (SimpleInstall inst.cxx foo.c foo.h)
|
||||||
TARGET_LINK_LIBRARIES(SimpleInstall test1 test2 test3)
|
TARGET_LINK_LIBRARIES(SimpleInstall test1 test2)
|
||||||
|
|
||||||
|
ADD_DEPENDENCIES(SimpleInstall test3)
|
||||||
|
|
||||||
INSTALL_TARGETS(/bin SimpleInstall)
|
INSTALL_TARGETS(/bin SimpleInstall)
|
||||||
INSTALL_TARGETS(/lib test1 test2 test3)
|
INSTALL_TARGETS(/lib test1 test2 test3)
|
||||||
|
|
|
@ -9,7 +9,9 @@ ADD_LIBRARY(test1 STATIC lib1.cxx)
|
||||||
ADD_LIBRARY(test2 SHARED lib2.cxx)
|
ADD_LIBRARY(test2 SHARED lib2.cxx)
|
||||||
ADD_LIBRARY(test3 MODULE lib3.cxx)
|
ADD_LIBRARY(test3 MODULE lib3.cxx)
|
||||||
ADD_EXECUTABLE (SimpleInstall inst.cxx foo.c foo.h)
|
ADD_EXECUTABLE (SimpleInstall inst.cxx foo.c foo.h)
|
||||||
TARGET_LINK_LIBRARIES(SimpleInstall test1 test2 test3)
|
TARGET_LINK_LIBRARIES(SimpleInstall test1 test2)
|
||||||
|
|
||||||
|
ADD_DEPENDENCIES(SimpleInstall test3)
|
||||||
|
|
||||||
INSTALL_TARGETS(/bin SimpleInstall)
|
INSTALL_TARGETS(/bin SimpleInstall)
|
||||||
INSTALL_TARGETS(/lib test1 test2 test3)
|
INSTALL_TARGETS(/lib test1 test2 test3)
|
||||||
|
|
Loading…
Reference in New Issue