zeek / cmake

CMake scripts used in Zeek
https://www.zeek.org
Other
48 stars 59 forks source link

Check for C++17 before adding flags #18

Closed Neverlord closed 4 years ago

Neverlord commented 4 years ago

Currently, we first unconditionally add a C++17 flag and then try to compile. If a user (or parent project) already provides CXX flags that select a suitable C++ version, we should make sure not to "downgrade" the selected standard (for example if the user selects C++20). Hence, we first check whether C++17 is already enabled before modifying the flags and trying again.