summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-03 19:52:05 (GMT)
committerBrad King <brad.king@kitware.com>2014-12-03 19:53:14 (GMT)
commita4f9b6f0ca9248530b9749b7fa9628053a3f8f98 (patch)
treeb3f28fc0e296c43836821abda5dd67172ea91cc0 /Source
parentdc3b222143d16ef0af6e6450f7869ec418b911d7 (diff)
downloadCMake-a4f9b6f0ca9248530b9749b7fa9628053a3f8f98.zip
CMake-a4f9b6f0ca9248530b9749b7fa9628053a3f8f98.tar.gz
CMake-a4f9b6f0ca9248530b9749b7fa9628053a3f8f98.tar.bz2
CMakeDetermineCompilerABI: Use normal linker flags in ABI project
When compiling the ABI detection test project, do not override CMAKE_EXE_LINKER_FLAGS completely. The normally selected value of this variable may influence how the link is done and may be needed to be representative of how the calling project will be built. Instead pass a variable that try_compile will reference as additional flags. Leave this behavior of try_compile undocumented for now.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCoreTryCompile.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 512f5cf..3506323 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -331,6 +331,8 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
fprintf(fout, "set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}"
" ${COMPILE_DEFINITIONS}\")\n", li->c_str(), li->c_str());
}
+ fprintf(fout, "set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}"
+ " ${EXE_LINKER_FLAGS}\")\n");
fprintf(fout, "include_directories(${INCLUDE_DIRECTORIES})\n");
fprintf(fout, "set(CMAKE_SUPPRESS_REGENERATION 1)\n");
fprintf(fout, "link_directories(${LINK_DIRECTORIES})\n");