diff options
author | Brad King <brad.king@kitware.com> | 2014-12-03 19:52:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-12-03 19:53:14 (GMT) |
commit | a4f9b6f0ca9248530b9749b7fa9628053a3f8f98 (patch) | |
tree | b3f28fc0e296c43836821abda5dd67172ea91cc0 /Source | |
parent | dc3b222143d16ef0af6e6450f7869ec418b911d7 (diff) | |
download | CMake-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.cxx | 2 |
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"); |