Align osx&linux build

This commit is contained in:
Nils O. Selåsdal
2025-07-17 14:04:14 +02:00
parent 2bd91ae751
commit abf430dabb
2 changed files with 10 additions and 3 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 4.0.0)
cmake_minimum_required(VERSION 3.12)
project(libucore C)
execute_process(COMMAND git -C ${CMAKE_SOURCE_DIR} describe --abbrev=5 --dirty --always OUTPUT_VARIABLE version_revision WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -28,6 +28,12 @@ if (BUILD_SANITIZE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
endif()
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
# Set the property for multi-config generators as well, if applicable
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release RelWithDebInfo MinSizeRel)
endif()
include_directories(include)
add_subdirectory(src)