More changes to the CMake scripts to be CMAKE_BUILD_TYPE agnostic