1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 13:41:13 +02:00

Added options.cmake, with CMAKE_EXPORT_COMPILE_COMMANDS ON

This commit solves #170

It adds one options.cmake file to allow for flags configuration.
The only flag added so far is CMAKE_EXPORT_COMPILE_COMMANDS

To test:

cmake -S all -B build/
find . -name compile_commands.json
--> ./build/compile_commands.json
This commit is contained in:
Rober Morales-Chaparro 2025-03-26 21:14:27 +01:00
parent 12cf5de1a8
commit 785ba14814
2 changed files with 2 additions and 0 deletions

View file

@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 3.14...3.22)
project(BuildAll LANGUAGES CXX)
include(../cmake/options.cmake)
include(../cmake/tools.cmake)
# needed to generate test target

1
cmake/options.cmake Normal file
View file

@ -0,0 +1 @@
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)