From 785ba148140763971693131710f179a80cb428fb Mon Sep 17 00:00:00 2001 From: Rober Morales-Chaparro Date: Wed, 26 Mar 2025 21:14:27 +0100 Subject: [PATCH] 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 --- all/CMakeLists.txt | 1 + cmake/options.cmake | 1 + 2 files changed, 2 insertions(+) create mode 100644 cmake/options.cmake diff --git a/all/CMakeLists.txt b/all/CMakeLists.txt index 8092382..b9ca365 100644 --- a/all/CMakeLists.txt +++ b/all/CMakeLists.txt @@ -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 diff --git a/cmake/options.cmake b/cmake/options.cmake new file mode 100644 index 0000000..87f9c87 --- /dev/null +++ b/cmake/options.cmake @@ -0,0 +1 @@ +set(CMAKE_EXPORT_COMPILE_COMMANDS ON)