Catch2 icon indicating copy to clipboard operation
Catch2 copied to clipboard

Centralize compiler detection for GCC, clang, MSVC and MINGW32.

Open HoseynHeydari opened this issue 3 years ago • 4 comments

Description

Macros detecting compilers GCC, clang, MSVC and MINGW32 added to catch_compiler_capabilities.hpp . New macros are replaced with former conditions that detect the compiler. If detecting compilers needs more conditions we can just change macros at catch_compiler_capabilities.hpp instead of multi places in code.

GitHub Issues

Closes #2094

HoseynHeydari avatar Apr 15 '22 11:04 HoseynHeydari

Codecov Report

Merging #2410 (e1827f7) into devel (7b93a20) will not change coverage. The diff coverage is n/a.

:exclamation: Current head e1827f7 differs from pull request most recent head 56d04d2. Consider uploading reports for the commit 56d04d2 to get more accurate results

@@           Coverage Diff           @@
##            devel    #2410   +/-   ##
=======================================
  Coverage   91.10%   91.10%           
=======================================
  Files         157      157           
  Lines        7414     7414           
=======================================
  Hits         6754     6754           
  Misses        660      660           

codecov[bot] avatar Apr 15 '22 21:04 codecov[bot]

Some includes should be removed before merging. :| I try to handle it by review but there were a lot of files.

HoseynHeydari avatar Apr 15 '22 21:04 HoseynHeydari

Some lines missing while renaming macro from CATCH_COMPILER_MSC to CATCH_COMPILER_MSVC. After testing with clang and MSVC compiler on my machine I will push new changes.

HoseynHeydari avatar Apr 17 '22 21:04 HoseynHeydari

I think this PR is currently trying to do too much. I'd recommend starting by merging the reworked compiler detection macros and the code can be converted to use them iteratively later on.

horenmar avatar Apr 18 '22 19:04 horenmar