Boris Kolpackov wrote:
Hm, in my experience it's the other way around: end-users find it too tedious to remember the sequence of options to enable the right set of warnings for each compiler, etc. On the other hand, how often do you write a test that needs to be built with exceptions disables...
Maybe not very often, but each time a user reports "your library doesn't compile/work with exceptions disabled." That's perhaps not as frequent as "your library doesn't compile with -Werror" but it does happen.
... and how hard is it to specify the actual options for essentially two classes of C++ compilers: MSVC and everything else?
boost_test already solves this, as it's smart enough to translate some compile options to msvc-ese https://github.com/boostorg/cmake/blob/6dcde32c82f7c1fef67b6e61db862f73e4809... but that's not quite the same as having built-in support. b2, for instance, allows me to do this run my_test.cpp : : : <target-os>darwin,<undefined-sanitizer>norecover:<build>no ; which isn't as convenient with a flag soup. Expressing something like this, for example https://github.com/boostorg/throw_exception/blob/7c8ec2114bc1f9ab2a8afbd629b... with CMake is much more verbose and not as general.