[Cmake-commits] CMake branch, next, updated. v3.3.0-2236-gb5cc08f
Chuck Atkins
chuck.atkins at kitware.com
Fri Aug 14 12:05:16 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via b5cc08fa9acd1678a671b7a4cefaa9c901bb15b7 (commit)
via 7f0b83e0185f4e131110a61d898cec4a96bd9a7d (commit)
via fb77c2c54bc341e76a83f646e6d75662c44179fc (commit)
from 6428e163380112586eff21c301f4d4b19d7d0a15 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b5cc08fa9acd1678a671b7a4cefaa9c901bb15b7
commit b5cc08fa9acd1678a671b7a4cefaa9c901bb15b7
Merge: 6428e16 7f0b83e
Author: Chuck Atkins <chuck.atkins at kitware.com>
AuthorDate: Fri Aug 14 12:05:15 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Aug 14 12:05:15 2015 -0400
Merge topic 'propagate-link-search-to-try_compile' into next
7f0b83e0 try_compile: Update documentation for other propagated variables
fb77c2c5 try_compile: Propogate the CMAKE_LINK_SEARCH_ variables
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f0b83e0185f4e131110a61d898cec4a96bd9a7d
commit 7f0b83e0185f4e131110a61d898cec4a96bd9a7d
Author: Chuck Atkins <chuck.atkins at kitware.com>
AuthorDate: Fri Aug 14 11:48:54 2015 -0400
Commit: Chuck Atkins <chuck.atkins at kitware.com>
CommitDate: Fri Aug 14 11:48:54 2015 -0400
try_compile: Update documentation for other propagated variables
diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst
index 23c26ad..1ed24df 100644
--- a/Help/command/try_compile.rst
+++ b/Help/command/try_compile.rst
@@ -102,6 +102,10 @@ default values:
* :variable:`CMAKE_LINK_SEARCH_START_STATIC`
* :variable:`CMAKE_LINK_SEARCH_END_STATIC`
+* :variable:`CMAKE_POSITION_INDEPENDENT_CODE`
+
+If :policy:`CMP0056` is set to ``NEW``, then
+:variable:`CMAKE_EXE_LINKER_FLAGS` is passed in as well.
Set the :variable:`CMAKE_TRY_COMPILE_CONFIGURATION` variable to choose
a build configuration.
diff --git a/Help/variable/CMAKE_POSITION_INDEPENDENT_CODE.rst b/Help/variable/CMAKE_POSITION_INDEPENDENT_CODE.rst
index 5e71665..43b1397 100644
--- a/Help/variable/CMAKE_POSITION_INDEPENDENT_CODE.rst
+++ b/Help/variable/CMAKE_POSITION_INDEPENDENT_CODE.rst
@@ -1,8 +1,9 @@
CMAKE_POSITION_INDEPENDENT_CODE
-------------------------------
-Default value for POSITION_INDEPENDENT_CODE of targets.
+Default value for :prop_tgt:`POSITION_INDEPENDENT_CODE` of targets.
-This variable is used to initialize the POSITION_INDEPENDENT_CODE
-property on all the targets. See that target property for additional
-information.
+This variable is used to initialize the
+:prop_tgt:`POSITION_INDEPENDENT_CODE` property on all the targets.
+See that target property for additional information. If set, it's
+value is also used by the :command:`try_compile` command.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb77c2c54bc341e76a83f646e6d75662c44179fc
commit fb77c2c54bc341e76a83f646e6d75662c44179fc
Author: Chuck Atkins <chuck.atkins at kitware.com>
AuthorDate: Fri Aug 14 11:48:01 2015 -0400
Commit: Chuck Atkins <chuck.atkins at kitware.com>
CommitDate: Fri Aug 14 11:48:01 2015 -0400
try_compile: Propogate the CMAKE_LINK_SEARCH_ variables
diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst
index 9a70885..23c26ad 100644
--- a/Help/command/try_compile.rst
+++ b/Help/command/try_compile.rst
@@ -96,5 +96,12 @@ the try_compile call of interest, and then re-run cmake again with
Other Behavior Settings
^^^^^^^^^^^^^^^^^^^^^^^
+If set, the following variables are passed in to the generated
+try_compile CMakeLists.txt to initialize compile target properties with
+default values:
+
+* :variable:`CMAKE_LINK_SEARCH_START_STATIC`
+* :variable:`CMAKE_LINK_SEARCH_END_STATIC`
+
Set the :variable:`CMAKE_TRY_COMPILE_CONFIGURATION` variable to choose
a build configuration.
diff --git a/Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst b/Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst
index 8a9951d..673f5d8 100644
--- a/Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst
+++ b/Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst
@@ -13,6 +13,7 @@ back to its starting type. This property switches the final linker
search type to -Bstatic regardless of how it started.
This variable is used to initialize the target property
-LINK_SEARCH_END_STATIC for all targets.
+:prop_tgt:`LINK_SEARCH_END_STATIC` for all targets. If set, it's
+value is also used by the :command:`try_compile` command.
-See also CMAKE_LINK_SEARCH_START_STATIC.
+See also :variable:`CMAKE_LINK_SEARCH_START_STATIC`.
diff --git a/Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst b/Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst
index 715db4b..223702c 100644
--- a/Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst
+++ b/Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst
@@ -14,6 +14,7 @@ when linking an executable statically (e.g. with the GNU -static
option).
This variable is used to initialize the target property
-LINK_SEARCH_START_STATIC for all targets.
+:prop_tgt:`LINK_SEARCH_START_STATIC` for all targets. If set, it's
+value is also used by the :command:`try_compile` command.
-See also CMAKE_LINK_SEARCH_END_STATIC.
+See also :variable:`CMAKE_LINK_SEARCH_END_STATIC`.
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index ffb349e..9411555 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -470,6 +470,16 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
{
fprintf(fout, "set(CMAKE_POSITION_INDEPENDENT_CODE \"ON\")\n");
}
+ if (const char *lssDef = this->Makefile->GetDefinition(
+ "CMAKE_LINK_SEARCH_START_STATIC"))
+ {
+ fprintf(fout, "set(CMAKE_LINK_SEARCH_START_STATIC \"%s\")\n", lssDef);
+ }
+ if (const char *lssDef = this->Makefile->GetDefinition(
+ "CMAKE_LINK_SEARCH_END_STATIC"))
+ {
+ fprintf(fout, "set(CMAKE_LINK_SEARCH_END_STATIC \"%s\")\n", lssDef);
+ }
/* Put the executable at a known location (for COPY_FILE). */
fprintf(fout, "set(CMAKE_RUNTIME_OUTPUT_DIRECTORY \"%s\")\n",
-----------------------------------------------------------------------
Summary of changes:
Help/command/try_compile.rst | 11 +++++++++++
Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst | 5 +++--
Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst | 5 +++--
Help/variable/CMAKE_POSITION_INDEPENDENT_CODE.rst | 9 +++++----
Source/cmCoreTryCompile.cxx | 10 ++++++++++
5 files changed, 32 insertions(+), 8 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list