cmake: allow setting build type from outside
MODIFY
CMakeLists.txt
CMakeLists.txt
cmake_minimum_required(VERSION 3.4)
project(Alive2)
+
+if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
+endif()
+
+message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
if (MSVC)
set(CMAKE_CXX_FLAGS "/GL /EHsc /W2")

MODIFY
ir/state.cpp
ir/state.cpp
@@ -31,7 +31,7 @@ const StateValue& State::exec(const Value &v) {
auto p = values.try_emplace(&v, move(val), move(undef_vars));
assert(p.second);
- // cleanup potentailly used temporary values due to undef rewriting
+ // cleanup potentially used temporary values due to undef rewriting
while (i_tmp_values > 0) {
tmp_values[--i_tmp_values] = StateValue();
}

cmake: allow setting build type from outside