[cmake-developers] CMake, Ninja and Clang on windows?

Tobias Hunger tobias.hunger at gmail.com
Tue Nov 6 05:57:26 EST 2018


Hi CMake Developers,

we are currently trying to support Clang (without the -cl;-) on
Windows. This fails since CMake adds extra compiler flags to the
command line which are not in the expected format.

Stackoverflow[1] suggests to set CMAKE_SYSTEM_NAME to "Generic" to
stop that from happening.

The blog post[2] referenced by StackOverflow suggests setting
CMAKE_C_FLAGS and CMAKE_CXX_FLAGS to TRUE.

Both approaches seem like big hammers to me. Are there better ways to
get this going that will have less potential side effects?

Best Regards,
Tobias

[1]: https://stackoverflow.com/questions/46553436/building-with-cmake-ninja-and-clang-on-windows#46593308
[2]: https://metricpanda.com/rival-fortress-update-27-compiling-with-clang-on-windows


More information about the cmake-developers mailing list