ryanhaining / cppitertools

Implementation of python itertools and builtin iteration functions for C++17
https://twitter.com/cppitertools
BSD 2-Clause "Simplified" License
1.37k stars 115 forks source link

Bad check in CMakeLists #76

Closed GabrielRavier closed 3 years ago

GabrielRavier commented 4 years ago

https://github.com/ryanhaining/cppitertools/blob/539a5be8359c4330b3f88ed1821f32bb5c89f5f6/CMakeLists.txt#L4-L19

There are two problems with this :

  1. It is advised to set a Cache variable, but an env variable is checked instead
  2. The warning is pointless as CMake will find that config in either directory, so it doesn't matter that it has been changed
ryanhaining commented 4 years ago

@strega-nil for input

strega-nil commented 4 years ago

@GabrielRavier yeah, I meant to check CACHE{...} I think... I just wrote a bug. However, the reason I wrote that warning is because it's technically a visible change, if someone was depending on it being in share/cppitertools/cmake. I have strong opinions on breaking changes being visible (although everyone can, apparently, write bugs 😛 )