summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2018-11-15 15:46:02 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2018-11-19 09:56:02 (GMT)
commitb10f7ac534ef611fcdd6f09e830be6b9c4e28e11 (patch)
tree05a105ed8d52c8cc1079845be27a960920d84934 /Source
parent64df9ef33a2f4eb9ef0cb17a2844308d9c7f7034 (diff)
downloadCMake-b10f7ac534ef611fcdd6f09e830be6b9c4e28e11.zip
CMake-b10f7ac534ef611fcdd6f09e830be6b9c4e28e11.tar.gz
CMake-b10f7ac534ef611fcdd6f09e830be6b9c4e28e11.tar.bz2
CMP0083: fix warning message on try_compile
Fixes: #18593
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCoreTryCompile.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 0b50121..f6ec606 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -656,6 +656,13 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
? "NEW"
: "OLD");
+ /* Set the appropriate policy information for PIE link flags */
+ fprintf(fout, "cmake_policy(SET CMP0083 %s)\n",
+ this->Makefile->GetPolicyStatus(cmPolicies::CMP0083) ==
+ cmPolicies::NEW
+ ? "NEW"
+ : "OLD");
+
if (targetType == cmStateEnums::EXECUTABLE) {
/* Put the executable at a known location (for COPY_FILE). */
fprintf(fout, "set(CMAKE_RUNTIME_OUTPUT_DIRECTORY \"%s\")\n",