⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.23
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
cmake3
/
Help
/
command
/
View File Name :
add_compile_options.rst
add_compile_options ------------------- Add options to the compilation of source files. .. code-block:: cmake add_compile_options(<option> ...) Adds options to the :prop_dir:`COMPILE_OPTIONS` directory property. These options are used when compiling targets from the current directory and below. Arguments ^^^^^^^^^ Arguments to ``add_compile_options`` may use "generator expressions" with the syntax ``$<...>``. See the :manual:`cmake3-generator-expressions(7)` manual for available expressions. See the :manual:`cmake3-buildsystem(7)` manual for more on defining buildsystem properties. .. include:: OPTIONS_SHELL.txt Example ^^^^^^^ Since different compilers support different options, a typical use of this command is in a compiler-specific conditional clause: .. code-block:: cmake if (MSVC) # warning level 4 and all warnings as errors add_compile_options(/W4 /WX) else() # lots of warnings and all warnings as errors add_compile_options(-Wall -Wextra -pedantic -Werror) endif() See Also ^^^^^^^^ This command can be used to add any options. However, for adding preprocessor definitions and include directories it is recommended to use the more specific commands :command:`add_compile_definitions` and :command:`include_directories`. The command :command:`target_compile_options` adds target-specific options.