message: Check if CMAKE_BUILD_TYPE set before project().
diff: # Minimum CMake required
  cmake_minimum_required(VERSION 3.1)
  +# Set default build type
  +if(NOT CMAKE_BUILD_TYPE)
  + message(STATUS "Build type not set - defaulting to Release")
  + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build from: Debug Release RelWithDebInfo MinSizeRel Coverage." FORCE)
  +endif()
  +
  # Project
  project(onnx C CXX)
  option(ONNX_BUILD_BENCHMARKS "Build ONNX micro-benchmarks" OFF)
  @@ -15,12 +21,6 @@ set(ONNX_ROOT ${PROJECT_SOURCE_DIR})
  set(CMAKE_MODULE_PATH "")
  list(APPEND CMAKE_MODULE_PATH ${ONNX_ROOT}/cmake/Modules)
  -# Set default build type
  -if(NOT CMAKE_BUILD_TYPE)
  - message(STATUS "Build type not set - defaulting to Release")
  - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build from: Debug Release RelWithDebInfo MinSizeRel Coverage." FORCE)
  -endif()
  -
  if(TARGET protobuf::libprotobuf)
  # Sometimes we need to use protoc compiled for host architecture while
  # linking libprotobuf against target architecture. See
  