Use `if(MSVC)`, just like `if(MSVC14)` in a following line of [`CMakeLists.txt`](https://github.com/unittest-cpp/unittest-cpp/blob/ee996164f24a6aed00dda0150c6d0965bac41e92/CMakeLists.txt#L16). See e.g. Stackoverflow [What's the CMake syntax to set and use variables?](https://stackoverflow.com/a/31044116/437272), section *Recursive substitutions*.