summaryrefslogtreecommitdiffstats
path: root/Source/cmCoreTryCompile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-17 12:27:59 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-18 14:29:29 (GMT)
commit1293c1561a58b2f8b0bd4ec05bb249fc36f487ac (patch)
treec45a907930d492790b0ce677c5c9cc4cddabcb98 /Source/cmCoreTryCompile.cxx
parent381e7afd363d64c72b83e69fd6c6cad5fc3eefb4 (diff)
downloadCMake-1293c1561a58b2f8b0bd4ec05bb249fc36f487ac.zip
CMake-1293c1561a58b2f8b0bd4ec05bb249fc36f487ac.tar.gz
CMake-1293c1561a58b2f8b0bd4ec05bb249fc36f487ac.tar.bz2
cmExportTryCompileFileGenerator: Port to cmGeneratorTarget.
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r--Source/cmCoreTryCompile.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 5bb0f99..4a1f770 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -34,7 +34,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
std::string outputVariable;
std::string copyFile;
std::string copyFileError;
- std::vector<cmTarget const*> targets;
+ std::vector<std::string> targets;
std::string libsToLink = " ";
bool useOldLinkLibs = true;
char targetNameBuf[64];
@@ -112,7 +112,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
}
if (tgt->IsImported())
{
- targets.push_back(tgt);
+ targets.push_back(argv[i]);
}
}
}
@@ -375,9 +375,8 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
if (!targets.empty())
{
std::string fname = "/" + std::string(targetName) + "Targets.cmake";
- cmExportTryCompileFileGenerator tcfg(gg);
+ cmExportTryCompileFileGenerator tcfg(gg, targets, this->Makefile);
tcfg.SetExportFile((this->BinaryDirectory + fname).c_str());
- tcfg.SetExports(targets);
tcfg.SetConfig(this->Makefile->GetSafeDefinition(
"CMAKE_TRY_COMPILE_CONFIGURATION"));