Skip to content

Commit

Permalink
Add additional comments and reduce verbosity
Browse files Browse the repository at this point in the history
Prior to this CMakeLists was printing the name of every single test.
  • Loading branch information
codeinred committed Sep 23, 2021
1 parent 57519e6 commit b48b3d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ target_include_directories(
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/include/>
$<INSTALL_INTERFACE:include>)

# If we're building this project directly (rather than as a dependency), we
# have to build tests
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)

# Run configure to generate config-host.h, if configure hasn't been run
Expand Down Expand Up @@ -65,9 +67,9 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
list(FILTER liburing_tests EXCLUDE REGEX "helpers.c")
foreach(test_file ${liburing_tests})

# Get the name of the target
# Get the name of the target. This will be the file name, stripped of
# ".c" at the end.
get_filename_component(target ${test_file} NAME_WLE)
message("Adding test '${target}' from test/${target}.c")

# Create an executable target for the test; add test/helpers.c as a source
add_executable(${target} ${test_file} test/helpers.c)
Expand Down

0 comments on commit b48b3d8

Please sign in to comment.