microsoft / DirectXMesh

DirectXMesh geometry processing library
https://walbourn.github.io/directxmesh/
MIT License
787 stars 151 forks source link

Add CMake project and fix clang warnings #40

Closed walbourn closed 5 years ago

walbourn commented 5 years ago

With VS 2019 Update 1 supporting the clang/LLVM toolset, I've formally added CMake files as well as addressed a number of clang warnings.

walbourn commented 5 years ago

-Wc++98-compat -Wc++98-compat-pedantic -Wc++98-compat-local-type-template-args

Even though I have set the C++14 language standard, clang still complains about C++98 compat

-Wcovered-switch-default

DXGI_FORMAT contains over a 100 enum values. Satisfying these warnings is pointless.

-Wfloat-equal

I get what this is after (i.e. use epsilon comparisions instead), but there are still cases where binary equality is just fine.

-Wreserved-id-macro

The long-established control macros for DirectXMath trigger this due to the _XM_* format. Changing that would break existing clients, so I'll ignore this for now.for now.