Improve Covered Default Switch detection (keep try)

Here’s a reduced version of the previous patch.

Keeping it dead simple.

jabbeymbp:build jabbey$ cmake …

– Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
– Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
– Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
– Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed

jabbeymbp:build jabbey$ CC=/usr/bin/clang cmake …

– Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
– Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
– Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
– Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success

Ok to commit?

Joe

improved-covered-default-switch-detection-reduced.patch (1.33 KB)

ATT00001.htm (227 Bytes)

As per discussion on IRC this looks good (enough) to me for commit.
Hopefully if others have better/other ideas about how to do this with
CMake they can provide it in post commit review.

Thanks for the fix,
- David

r168577

Cheers,

Joe