nholthaus / units

a compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies.
http://nholthaus.github.io/units/
MIT License
938 stars 134 forks source link

/permissive- definition #245

Open nairaner opened 4 years ago

nairaner commented 4 years ago

Defining /permissive- causes issues when compiling using Clion+CUDA.

First of all /permissive- is compiler flag and not definition. PR #224 fixes it, but causes another issue. It forces standard conformance on library users, which can't always make it happen. I believe it should be hidden behind CMake option or just be removed from CMake and information about compilation time improvement available in README

https://github.com/nholthaus/units/blob/9f09abb32641fdf8dbb2c49ee81717d434624218/CMakeLists.txt#L69

nholthaus commented 3 years ago

I just ran into this myself, I think it's a problem with CLion in general. I think you're right about imposing it on users (as the former only user of the library I took some liberties), so I'll leave it in some compile-time-improvement section of the readme.