aare/cmake/helpers.cmake
Erik Fröjdh b1b020ad60 WIP
2024-10-25 10:23:34 +02:00

7 lines
258 B
CMake

function(default_build_type val)
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE ${val} CACHE STRING "Build type (default ${val})" FORCE)
endif()
endfunction()