bilke / cmake-modules

Additional CMake functionality. Most of the modules are from Ryan Pavlik (https://github.com/rpavlik/cmake-modules)
Boost Software License 1.0
547 stars 214 forks source link

CodeCoverage triggers warning on Multi-Config Generators #59

Closed globberwops closed 3 years ago

globberwops commented 3 years ago

https://github.com/bilke/cmake-modules/blob/d6d1a778e41cb114e5cdf279b8a659fa0ce9a0d4/CodeCoverage.cmake#L194 This line triggers a warning on Multi-Config Generators.

You could check if GENERATOR_IS_MULTI_CONFIG e.g.

get_property(MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT MULTI_CONFIG)
...
bilke commented 3 years ago

Pull requests are welcome!