diff options
author | Brad King <brad.king@kitware.com> | 2018-11-19 14:57:06 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-11-19 14:57:13 (GMT) |
commit | d9d8816f39d625f7f5e6f87ec831badcff4f3f5d (patch) | |
tree | 78265bf98f484bf7859e937f011a2b210bec4ed3 /Source | |
parent | 95a735116f51285f78acb04d1bdc7863122fd94a (diff) | |
parent | b10f7ac534ef611fcdd6f09e830be6b9c4e28e11 (diff) | |
download | CMake-d9d8816f39d625f7f5e6f87ec831badcff4f3f5d.zip CMake-d9d8816f39d625f7f5e6f87ec831badcff4f3f5d.tar.gz CMake-d9d8816f39d625f7f5e6f87ec831badcff4f3f5d.tar.bz2 |
Merge topic 'pie-link-options'
b10f7ac534 CMP0083: fix warning message on try_compile
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2619
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 7 |
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", |