I would like to set some options (such as /Wall) in the root of my project such that they apply to all code. I tried using add_compile_options but on Windows when I create a project using cmake -G “Visual Studio 17 2022”, these options are added to the ZERO_CHECK target and Visual Studio complains. As an example, adding the /MP option through this method causes problems.
I would rather not have the manual method of ensuring these options are applied repeatedly to each target. And I don’t want to make my own custom macro. I feel like this is a simple enough task that I should be able to accomplish it with out-of-the-box commands. I am using CMake 3.25.1. Can you please guide me towards the correct solution?