Debian Codegraph @

cmake/tribits/examples/RawAndTribitsHelloWorld/CMakeLists.txt

raw
1 cmake_minimum_required(VERSION 3.23.0 FATAL_ERROR)
2 include(${CMAKE_CURRENT_SOURCE_DIR}/ProjectName.cmake)
3
4 # Called at the top of every CMakeLists.txt file
5 macro(include_tribits_build)
6 if (${PROJECT_NAME}_TRIBITS_DIR)
7 include("${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.tribits.cmake")
8 return()
9 endif()
10 endmacro()
11
12 if (${PROJECT_NAME}_TRIBITS_DIR)
13
14 # TriBITS CMake project
15 project(${PROJECT_NAME} NONE)
16 include("${${PROJECT_NAME}_TRIBITS_DIR}/TriBITS.cmake")
17 # Only one package in this simple project so just enable it :-)
18 set(${PROJECT_NAME}_ENABLE_HelloWorld ON CACHE BOOL "" FORCE)
19 tribits_project()
20
21 else()
22
23 # Raw CMake project
24 project(RawHelloWorld)
25 enable_testing()
26 add_subdirectory(hello_world)
27
28 endif()
29
30 # NOTE: The cmake_minimum_required() and project() commands must be executed
31 # in the base CMakeLists.txt file and *NOT* in an included