diff --git a/Help/command/add_compile_options.rst b/Help/command/add_compile_options.rst index ad653573d5..0ccebc679b 100644 --- a/Help/command/add_compile_options.rst +++ b/Help/command/add_compile_options.rst @@ -28,13 +28,16 @@ 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) + # warning level 4 + add_compile_options(/W4) else() - # lots of warnings and all warnings as errors - add_compile_options(-Wall -Wextra -pedantic -Werror) + # additional warnings + add_compile_options(-Wall -Wextra -Wpedantic) endif() +To set per-language options, use the :genex:`$` +or :genex:`$` generator expressions. + See Also ^^^^^^^^