Merge topic 'vs-intel-dll-implib-outdir'
2516c05
VS: Create a Fortran DLL's import library directory
This commit is contained in:
commit
2d2f79a995
|
@ -863,7 +863,7 @@ cmLocalVisualStudio6Generator::CreateTargetRules(cmTarget &target,
|
||||||
event.Write(target.GetPreBuildCommands());
|
event.Write(target.GetPreBuildCommands());
|
||||||
event.Write(target.GetPreLinkCommands());
|
event.Write(target.GetPreLinkCommands());
|
||||||
cmsys::auto_ptr<cmCustomCommand> pcc(
|
cmsys::auto_ptr<cmCustomCommand> pcc(
|
||||||
this->MaybeCreateImplibDir(target, configName));
|
this->MaybeCreateImplibDir(target, configName, false));
|
||||||
if(pcc.get())
|
if(pcc.get())
|
||||||
{
|
{
|
||||||
event.Write(*pcc);
|
event.Write(*pcc);
|
||||||
|
|
|
@ -1723,7 +1723,7 @@ void cmLocalVisualStudio7Generator
|
||||||
event.Start(tool);
|
event.Start(tool);
|
||||||
event.Write(target.GetPreLinkCommands());
|
event.Write(target.GetPreLinkCommands());
|
||||||
cmsys::auto_ptr<cmCustomCommand> pcc(
|
cmsys::auto_ptr<cmCustomCommand> pcc(
|
||||||
this->MaybeCreateImplibDir(target, configName));
|
this->MaybeCreateImplibDir(target, configName, this->FortranProject));
|
||||||
if(pcc.get())
|
if(pcc.get())
|
||||||
{
|
{
|
||||||
event.Write(*pcc);
|
event.Write(*pcc);
|
||||||
|
|
|
@ -32,13 +32,17 @@ cmLocalVisualStudioGenerator::~cmLocalVisualStudioGenerator()
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmsys::auto_ptr<cmCustomCommand>
|
cmsys::auto_ptr<cmCustomCommand>
|
||||||
cmLocalVisualStudioGenerator::MaybeCreateImplibDir(cmTarget& target,
|
cmLocalVisualStudioGenerator::MaybeCreateImplibDir(cmTarget& target,
|
||||||
const char* config)
|
const char* config,
|
||||||
|
bool isFortran)
|
||||||
{
|
{
|
||||||
cmsys::auto_ptr<cmCustomCommand> pcc;
|
cmsys::auto_ptr<cmCustomCommand> pcc;
|
||||||
|
|
||||||
// If an executable exports symbols then VS wants to create an
|
// If an executable exports symbols then VS wants to create an
|
||||||
// import library but forgets to create the output directory.
|
// import library but forgets to create the output directory.
|
||||||
if(target.GetType() != cmTarget::EXECUTABLE) { return pcc; }
|
// The Intel Fortran plugin always forgets to the directory.
|
||||||
|
if(target.GetType() != cmTarget::EXECUTABLE &&
|
||||||
|
!(isFortran && target.GetType() == cmTarget::SHARED_LIBRARY))
|
||||||
|
{ return pcc; }
|
||||||
std::string outDir = target.GetDirectory(config, false);
|
std::string outDir = target.GetDirectory(config, false);
|
||||||
std::string impDir = target.GetDirectory(config, true);
|
std::string impDir = target.GetDirectory(config, true);
|
||||||
if(impDir == outDir) { return pcc; }
|
if(impDir == outDir) { return pcc; }
|
||||||
|
|
|
@ -47,7 +47,7 @@ protected:
|
||||||
|
|
||||||
/** Construct a custom command to make exe import lib dir. */
|
/** Construct a custom command to make exe import lib dir. */
|
||||||
cmsys::auto_ptr<cmCustomCommand>
|
cmsys::auto_ptr<cmCustomCommand>
|
||||||
MaybeCreateImplibDir(cmTarget& target, const char* config);
|
MaybeCreateImplibDir(cmTarget& target, const char* config, bool isFortran);
|
||||||
|
|
||||||
// Safe object file name generation.
|
// Safe object file name generation.
|
||||||
void ComputeObjectNameRequirements(std::vector<cmSourceGroup> const&);
|
void ComputeObjectNameRequirements(std::vector<cmSourceGroup> const&);
|
||||||
|
|
Loading…
Reference in New Issue