How do I add a linker or compile flag in a CMake file ...
12/21/2018 · target_compile_options(first-test PRIVATE -fexceptions) The advantage of this method is that you can control propagation of options to other targets that depend on this one via PUBLIC and PRIVATE. As of CMake 3.13 you can also use target_link_options to add linker options which makes the intent more clear.
- Posted by George Phillips
- Buy now: 28
- Select Free Bonus: 5