Help: try_compile how to pass compiler options
it wasn't obvious how to pass compiler options. Since the old add_definitions() is used we can workaround this by passing compiler options there.
This commit is contained in:
parent
40513f6a90
commit
fc2bce54c7
@ -156,8 +156,9 @@ The options for the above signatures are:
|
|||||||
Specify flags of the form :option:`-DVAR:TYPE=VALUE <cmake -D>` to be passed
|
Specify flags of the form :option:`-DVAR:TYPE=VALUE <cmake -D>` to be passed
|
||||||
to the :manual:`cmake(1)` command-line used to drive the test build.
|
to the :manual:`cmake(1)` command-line used to drive the test build.
|
||||||
The above example shows how values for variables
|
The above example shows how values for variables
|
||||||
``INCLUDE_DIRECTORIES``, ``LINK_DIRECTORIES``, and ``LINK_LIBRARIES``
|
``COMPILE_DEFINITIONS``, ``INCLUDE_DIRECTORIES``, ``LINK_DIRECTORIES``,
|
||||||
are used.
|
``LINK_LIBRARIES``, and ``LINK_OPTIONS`` are used. Compiler options
|
||||||
|
can be passed in like `CMAKE_FLAGS -DCOMPILE_DEFINITIONS=-Werror`.
|
||||||
|
|
||||||
``COMPILE_DEFINITIONS <defs>...``
|
``COMPILE_DEFINITIONS <defs>...``
|
||||||
Specify ``-Ddefinition`` arguments to pass to :command:`add_definitions`
|
Specify ``-Ddefinition`` arguments to pass to :command:`add_definitions`
|
||||||
|
Loading…
Reference in New Issue
Block a user