Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CMake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
André Pedro
CMake
Commits
8f018673
Commit
8f018673
authored
10 years ago
by
Brad King
Browse files
Options
Downloads
Plain Diff
Merge branch 'doc-add_compile_options' into release
parents
1e48ea7a
352cbb6e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Help/command/add_compile_options.rst
+8
-7
8 additions, 7 deletions
Help/command/add_compile_options.rst
Help/command/add_definitions.rst
+6
-4
6 additions, 4 deletions
Help/command/add_definitions.rst
Help/prop_dir/COMPILE_OPTIONS.rst
+3
-3
3 additions, 3 deletions
Help/prop_dir/COMPILE_OPTIONS.rst
with
17 additions
and
14 deletions
Help/command/add_compile_options.rst
+
8
−
7
View file @
8f018673
...
...
@@ -7,15 +7,16 @@ Adds options to the compilation of source files.
add_compile_options(<option> ...)
Adds options to the compiler command line for sources in the current
directory and below. This command can be used to add any options, but
alternative commands exist to add preprocessor definitions
(:command:`target_compile_definitions` and :command:`add_definitions`) or
include directories (:command:`target_include_directories` and
:command:`include_directories`). See documentation of the
:prop_tgt:`directory <COMPILE_OPTIONS>` and
Adds options to the compiler command line for targets in the current
directory and below that are added after this command is invoked.
See documentation of the :prop_dir:`directory <COMPILE_OPTIONS>` and
:prop_tgt:`target <COMPILE_OPTIONS>` ``COMPILE_OPTIONS`` properties.
This command can be used to add any options, but alternative commands
exist to add preprocessor definitions (:command:`target_compile_definitions`
and :command:`add_definitions`) or include directories
(:command:`target_include_directories` and :command:`include_directories`).
Arguments to ``add_compile_options`` may use "generator expressions" with
the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
...
...
This diff is collapsed.
Click to expand it.
Help/command/add_definitions.rst
+
6
−
4
View file @
8f018673
...
...
@@ -7,10 +7,12 @@ Adds -D define flags to the compilation of source files.
add_definitions(-DFOO -DBAR ...)
Adds definitions to the compiler command line for sources in the current
directory and below. This command can be used to add any flags, but
it is intended to add preprocessor definitions. Flags
beginning in -D or /D that look like preprocessor definitions are
Adds definitions to the compiler command line for targets in the current
directory and below (whether added before or after this command is invoked).
This command can be used to add any flags, but it is intended to add
preprocessor definitions (see the :command:`add_compile_options` command
to add other flags).
Flags beginning in -D or /D that look like preprocessor definitions are
automatically added to the :prop_dir:`COMPILE_DEFINITIONS` directory
property for the current directory. Definitions with non-trivial values
may be left in the set of flags instead of being converted for reasons of
...
...
This diff is collapsed.
Click to expand it.
Help/prop_dir/COMPILE_OPTIONS.rst
+
3
−
3
View file @
8f018673
...
...
@@ -6,9 +6,9 @@ List of options to pass to the compiler.
This property specifies the list of options given so far to the
:command:`add_compile_options` command.
This property is used to
populat
e the :prop_tgt:`COMPILE_OPTIONS` target
property, which is used by the generators to set
the options for the
compiler.
This property is used to
initializ
e the :prop_tgt:`COMPILE_OPTIONS` target
property
when a target is created
, which is used by the generators to set
the options for the
compiler.
Contents of ``COMPILE_OPTIONS`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment