Files
aoc_2025/day1/CMakeLists.txt
Alessio Molinari ba07ab68f3 first three days
2025-12-03 23:29:17 +01:00

30 lines
723 B
CMake

cmake_minimum_required(VERSION 3.10)
# Project name and version
project(Day1 VERSION 1.0)
# Set default build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
# 1. This is the critical line for Clangd.
# It generates the file clangd reads to know where headers are.
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Debug and Release flags
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 -Wall -Wextra")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
# Specify C standard
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Add include directory
include_directories(${PROJECT_SOURCE_DIR}/include)
# Add executable
add_executable(${PROJECT_NAME}
src/main.cpp
)