Contents Menu Expand Light mode Dark mode Auto light/dark mode
CMOPTS
CMOPTS

Package

  • Module documentation
    • Options
    • cmopts_add_tests
    • cmopts_setup_coverage
    • cmopts_setup_target
    • cmopts_setup_test
    • cmopts_target_disable_analysis
    • cmopts_target_link_system_libraries
    • cmopts_test_disable_analysis

Development

  • Git Guides
    • Commit Message Tags
Back to top
Edit this page

cmopts_target_link_system_libraries#

Link multiple library targets as system libraries (which suppresses their warnings).

cmopts_target_link_system_libraries(<target>
                                    <PRIVATE|PUBLIC|INTERFACE> <item>...
                                    [<PRIVATE|PUBLIC|INTERFACE> <item>...]...)

The function accepts the same arguments as target_link_libraries.

Note

It is worth to mention that this method is implemented on aminya’s project_options CMake module side and cmopts package simply aliases target_link_system_libraries method.

Arguments#

The named <target> must have been created by a command such as add_executable or add_library and must not be an ALIAS target.

The PUBLIC, PRIVATE and INTERFACE scope keywords can be used to specify both the link dependencies and the link interface in one command.

Libraries and targets following PUBLIC are linked to, and are made part of the link interface. Libraries and targets following PRIVATE are linked to, but are not made part of the link interface. Libraries following INTERFACE are appended to the link interface and are not used for linking <target>.

Output#

The include directories of the library are included as SYSTEM to suppress their warnings.

Next
cmopts_test_disable_analysis
Previous
cmopts_target_disable_analysis
Copyright © 2021-2024, Bytes Mess
Made with Sphinx and @pradyunsg's Furo
Last updated on b6b5f4d5 (main), 24-06-15 19:36:50
On this page
  • cmopts_target_link_system_libraries
    • Arguments
    • Output