Debian Codegraph @

cmake/tribits/examples/TribitsExampleApp2/CMakeLists.txt

raw
1 cmake_minimum_required(VERSION 3.23.1)
2
3 project(TribitsExApp2
4 DESCRIPTION
5 "Example raw CMake project using packages installed from TribitsExampleProject2"
6 VERSION 0.0.0
7 LANGUAGES NONE # Defined below after reading in compilers
8 )
9
10 set(${PROJECT_NAME}_USE_COMPONENTS "" CACHE STRING
11 "Components/Packages to use from TribitsExampleProject2: <C0>,<C1>,..." )
12 string(REPLACE "," ";" ${PROJECT_NAME}_USE_COMPONENTS
13 "${${PROJECT_NAME}_USE_COMPONENTS}")
14
15 list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
16 include(AppHelperFuncs)
17
18 getTribitsExProj2StuffForApp()
19
20 # Enable the compilers now that we have gotten them from the *Config.cmake file
21 enable_language(C)
22 enable_language(CXX)
23 if (CMAKE_Fortran_COMPILER)
24 enable_language(Fortran)
25 endif()
26
27 # Build the APP and link to libraries from TribitsExProj packages
28 add_executable(app app.cpp)
29 target_link_libraries(app PRIVATE ${APP_DEPS_LIB_TARGETS})
30 addAppDepCompileDefines()
31
32 # Set up tests
33
34 enable_testing()
35
36 getExpectedAppDepsStr(expectedDepsStr)
37
38 add_test(app_test app)
39 set_tests_properties(app_test PROPERTIES
40 PASS_REGULAR_EXPRESSION "Full Deps: ${expectedDepsStr}"
41 )