diff options
author | Brad King <brad.king@kitware.com> | 2015-01-26 15:28:25 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-01-26 15:28:25 (GMT) |
commit | 8def82585c8fe81de8ee4c852f8065e19435532e (patch) | |
tree | 0946a90ef04b8ed628c4ae0c2f7f038585d755e1 /Help/command | |
parent | 7fefb97ed770e8ac32729cf50be52e5c913bd7b7 (diff) | |
parent | d0adcccbf4321437f5ecb677c7f88b3e4af484ed (diff) | |
download | CMake-8def82585c8fe81de8ee4c852f8065e19435532e.zip CMake-8def82585c8fe81de8ee4c852f8065e19435532e.tar.gz CMake-8def82585c8fe81de8ee4c852f8065e19435532e.tar.bz2 |
Merge topic 'try-run-link-libraries'
d0adcccb try_run: Add tests for LINK_LIBRARIES with mock libraries.
223c5cb7 try_run: Add test for bad link libraries.
e2b1f058 try_run: Add support for LINK_LIBRARIES option.
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/try_run.rst | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Help/command/try_run.rst b/Help/command/try_run.rst index 9a17ad9..b8ea0fe 100644 --- a/Help/command/try_run.rst +++ b/Help/command/try_run.rst @@ -6,8 +6,9 @@ Try compiling and then running some code. :: try_run(RUN_RESULT_VAR COMPILE_RESULT_VAR - bindir srcfile [CMAKE_FLAGS <Flags>] + bindir srcfile [CMAKE_FLAGS <flags>] [COMPILE_DEFINITIONS <flags>] + [LINK_LIBRARIES <libs>] [COMPILE_OUTPUT_VARIABLE comp] [RUN_OUTPUT_VARIABLE run] [OUTPUT_VARIABLE var] @@ -22,6 +23,12 @@ where the output from the compile step goes. RUN_OUTPUT_VARIABLE specifies the variable where the output from the running executable goes. +The srcfile signature also accepts a LINK_LIBRARIES argument which may +contain a list of libraries or IMPORTED targets which will be linked +to in the generated project. If LINK_LIBRARIES is specified as a +parameter to try_run, then any LINK_LIBRARIES passed as +CMAKE_FLAGS will be ignored. + For compatibility reasons OUTPUT_VARIABLE is still supported, which gives you the output from the compile and run step combined. |