diff options
| author | Chris Thrasher | 2025-04-07 22:09:59 -0600 |
|---|---|---|
| committer | Chris Thrasher | 2025-04-26 10:38:36 -0600 |
| commit | 8cfca70ae879ba59699b224e8d371b8bb9fa12ff (patch) | |
| tree | e53b243d3d2b7acc41c27cbd21624e1e28b655cb /examples | |
| parent | 6aac11e17d4fe662e430a8bbfd4bf6886ca7f935 (diff) | |
| download | catch3-8cfca70ae879ba59699b224e8d371b8bb9fa12ff.tar.gz | |
Fix formatting of CMake files
2 spaces seems to be the more common indentation level so that's what
I unified around.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/CMakeLists.txt | 54 |
1 files changed, 25 insertions, 29 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index d45ddfcb..4035a025 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,50 +1,47 @@ -cmake_minimum_required( VERSION 3.16 ) - -project( Catch2Examples LANGUAGES CXX ) - -message( STATUS "Examples included" ) +cmake_minimum_required(VERSION 3.16) +project(Catch2Examples LANGUAGES CXX) +message(STATUS "Examples included") # Some one-offs first: # 1) Tests and main in one file -add_executable( 010-TestCase +add_executable(010-TestCase 010-TestCase.cpp ) # 2) Tests and main across two files -add_executable( 020-MultiFile +add_executable(020-MultiFile 020-TestCase-1.cpp 020-TestCase-2.cpp ) add_executable(231-Cfg_OutputStreams - 231-Cfg-OutputStreams.cpp + 231-Cfg-OutputStreams.cpp ) target_link_libraries(231-Cfg_OutputStreams Catch2_buildall_interface) target_compile_definitions(231-Cfg_OutputStreams PUBLIC CATCH_CONFIG_NOSTDOUT) # These examples use the standard separate compilation -set( SOURCES_IDIOMATIC_EXAMPLES - 030-Asn-Require-Check.cpp - 100-Fix-Section.cpp - 110-Fix-ClassFixture.cpp - 111-Fix-PersistentFixture.cpp - 120-Bdd-ScenarioGivenWhenThen.cpp - 210-Evt-EventListeners.cpp - 232-Cfg-CustomMain.cpp - 300-Gen-OwnGenerator.cpp - 301-Gen-MapTypeConversion.cpp - 302-Gen-Table.cpp - 310-Gen-VariablesInGenerators.cpp - 311-Gen-CustomCapture.cpp +set(SOURCES_IDIOMATIC_EXAMPLES + 030-Asn-Require-Check.cpp + 100-Fix-Section.cpp + 110-Fix-ClassFixture.cpp + 111-Fix-PersistentFixture.cpp + 120-Bdd-ScenarioGivenWhenThen.cpp + 210-Evt-EventListeners.cpp + 232-Cfg-CustomMain.cpp + 300-Gen-OwnGenerator.cpp + 301-Gen-MapTypeConversion.cpp + 302-Gen-Table.cpp + 310-Gen-VariablesInGenerators.cpp + 311-Gen-CustomCapture.cpp ) -string( REPLACE ".cpp" "" BASENAMES_IDIOMATIC_EXAMPLES "${SOURCES_IDIOMATIC_EXAMPLES}" ) -set( TARGETS_IDIOMATIC_EXAMPLES ${BASENAMES_IDIOMATIC_EXAMPLES} ) +string(REPLACE ".cpp" "" BASENAMES_IDIOMATIC_EXAMPLES "${SOURCES_IDIOMATIC_EXAMPLES}") +set(TARGETS_IDIOMATIC_EXAMPLES ${BASENAMES_IDIOMATIC_EXAMPLES}) - -foreach( name ${TARGETS_IDIOMATIC_EXAMPLES} ) - add_executable( ${name} ${name}.cpp ) +foreach(name ${TARGETS_IDIOMATIC_EXAMPLES}) + add_executable(${name} ${name}.cpp) endforeach() set(ALL_EXAMPLE_TARGETS @@ -53,10 +50,9 @@ set(ALL_EXAMPLE_TARGETS 020-MultiFile ) -foreach( name ${ALL_EXAMPLE_TARGETS} ) - target_link_libraries( ${name} Catch2WithMain ) +foreach(name ${ALL_EXAMPLE_TARGETS}) + target_link_libraries(${name} Catch2WithMain) endforeach() - list(APPEND CATCH_WARNING_TARGETS ${ALL_EXAMPLE_TARGETS}) set(CATCH_WARNING_TARGETS ${CATCH_WARNING_TARGETS} PARENT_SCOPE) |