summaryrefslogtreecommitdiffstats
path: root/Source/cmCoreTryCompile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-26 20:24:44 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-01-26 20:24:44 (GMT)
commit7f37eac6dd7f26c33b0c80b99f862ac0f53e6a8e (patch)
tree9480019f987f0fc8803f16394493797dab612d22 /Source/cmCoreTryCompile.cxx
parent7e6a00465989208905432bd41885db6133fa2742 (diff)
parent5792d3a38a67c8e3fffa7e2743a106a87ff7096c (diff)
downloadCMake-7f37eac6dd7f26c33b0c80b99f862ac0f53e6a8e.zip
CMake-7f37eac6dd7f26c33b0c80b99f862ac0f53e6a8e.tar.gz
CMake-7f37eac6dd7f26c33b0c80b99f862ac0f53e6a8e.tar.bz2
Merge topic 'outdir-CMAKE_USER_MAKE_RULES_OVERRIDE'
5792d3a Always place try_compile executables predictably (#11724) a5300f1 Clarify CMAKE_USER_MAKE_RULES_OVERRIDE documentation (#11724)
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r--Source/cmCoreTryCompile.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 25b3216..e1cb0bb 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -283,6 +283,10 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
cmakeFlags.push_back(flag);
}
+ /* Put the executable at a known location (for COPY_FILE). */
+ fprintf(fout, "SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY \"%s\")\n",
+ this->BinaryDirectory.c_str());
+ /* Create the actual executable. */
fprintf(fout, "ADD_EXECUTABLE(cmTryCompileExec \"%s\")\n",source.c_str());
fprintf(fout,
"TARGET_LINK_LIBRARIES(cmTryCompileExec ${LINK_LIBRARIES})\n");