Explicitly setting CMAKE_BUILD_TYPE overrides any option the user might set. Instead let's check if it's set first, effectively making it a default.
While Release is a nice default for production, we still wanna be able to build other configurations so we can use Debug builds with Debug programs (in C++ all libs and programs must have the same configuration or nasty crashes will happen).
Explicitly setting CMAKE_BUILD_TYPE overrides any option the user might set. Instead let's check if it's set first, effectively making it a default.
While Release is a nice default for production, we still wanna be able to build other configurations so we can use Debug builds with Debug programs (in C++ all libs and programs must have the same configuration or nasty crashes will happen).