mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Merge topic 'pie-link-options'
b10f7ac534 CMP0083: fix warning message on try_compile
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2619
This commit is contained in:
@@ -127,7 +127,8 @@ default values:
|
||||
If :policy:`CMP0056` is set to ``NEW``, then
|
||||
:variable:`CMAKE_EXE_LINKER_FLAGS` is passed in as well.
|
||||
|
||||
The current setting of :policy:`CMP0065` is set in the generated project.
|
||||
The current settings of :policy:`CMP0065` and :policy:`CMP0083` are set in the
|
||||
generated project.
|
||||
|
||||
Set the :variable:`CMAKE_TRY_COMPILE_CONFIGURATION` variable to choose
|
||||
a build configuration.
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user