Skip to content

Comments

CMake: use sanitizer flags for internal targets only#771

Merged
ppd merged 1 commit intosolvespace:masterfrom
ppd:cmake-sanitize
Oct 23, 2020
Merged

CMake: use sanitizer flags for internal targets only#771
ppd merged 1 commit intosolvespace:masterfrom
ppd:cmake-sanitize

Conversation

@ppd
Copy link
Member

@ppd ppd commented Oct 23, 2020

Previously sanitizer flags were set unconditionally for all code, including that of external libraries.
Set them only for targets in src/, tests/ and exposed/.

Unfortunately, the linker equivalent to add_compile_options,
add_link_options, is only available for CMake version >= 3.13.
So add the sanitizer flags manually to each target's linker options.

Should help with #766

Previously sanitizer flags were set unconditionally for
all code, including that of external libraries.
Set them only for targets in src/, tests/ and exposed/.

Unfortunately, the linker equivalent to add_compile_options,
add_link_options, is only available for CMake version >= 3.13.
So add the sanitizer flags manually to each target's linker options.
@vespakoen
Copy link
Contributor

Awesome! Looks good to me.

Let's merge this in first, then I'll bring #766 up to date so it can cleanly merge with master

@ppd ppd merged commit 68b1abf into solvespace:master Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants