include(Logging)

function(set_default_build_type)
    set(DEFAULT_BUILD_TYPE "DEBUG")
    if(NOT DEFINED CMAKE_BUILD_TYPE)
        log_info("build type was not defined")
        set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}")
    elseif("${CMAKE_BUILD_TYPE}" STREQUAL "")
        log_info("build type was not defined")
        set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}")
    else()
        log_info("build type was defined")
    endif()
    string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" PARENT_SCOPE)
endfunction()
