1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 21:51:12 +02:00
ModernCppStarter/all/CMakeLists.txt
Rober Morales-Chaparro 785ba14814 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
2025-03-26 21:15:02 +01:00

16 lines
562 B
CMake

# this script adds all subprojects to a single build to allow IDEs understand the full project
# structure.
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
enable_testing()
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../standalone ${CMAKE_BINARY_DIR}/standalone)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../test ${CMAKE_BINARY_DIR}/test)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../documentation ${CMAKE_BINARY_DIR}/documentation)