summaryrefslogtreecommitdiffstats
path: root/Source/cmCoreTryCompile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-05-24 20:27:31 (GMT)
committerBrad King <brad.king@kitware.com>2013-05-24 20:30:26 (GMT)
commite65ef08bf2719ffd1cc4226f9594ff7127ad8b5e (patch)
tree148e4a1c3a4a554bbe5c306b768f4475021c57ff /Source/cmCoreTryCompile.cxx
parent5dd8c01429da90a7417b72f17e784cc98f70f57c (diff)
downloadCMake-e65ef08bf2719ffd1cc4226f9594ff7127ad8b5e.zip
CMake-e65ef08bf2719ffd1cc4226f9594ff7127ad8b5e.tar.gz
CMake-e65ef08bf2719ffd1cc4226f9594ff7127ad8b5e.tar.bz2
try_compile: Fix quoting of libraries in generated CMakeLists.txt
Since commit 236133e7 (Handle targets in the LINK_LIBRARIES of try_compile, 2013-02-09) libraries passed to the new LINK_LIBRARIES option of try_compile are not quoted inside the generated CMakeLists.txt file. Quote the library names so they re-parse correctly when loaded by CMake to configure and generate the test project. Reported-by: Bogdan Cristea <cristeab@gmail.com>
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r--Source/cmCoreTryCompile.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 9f38b25..ebfcae0 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -111,7 +111,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
++i)
{
extraArgs++;
- libsToLink += argv[i] + " ";
+ libsToLink += "\"" + argv[i] + "\" ";
cmTarget *tgt = this->Makefile->FindTargetToUse(argv[i].c_str());
if (!tgt)
{