Skip to content

Commit 53a4bf7

Browse files
committed
Apply review comments
1 parent e183300 commit 53a4bf7

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ if (TBB_DOC_EXAMPLES)
336336
if (NOT EXISTS ${TBB_DOC_EXAMPLES_DIRECTORY})
337337
message(FATAL_ERROR "Documentation examples are not found while testing was enabled")
338338
else()
339+
message(STATUS "Enabling testing for examples from documentation")
339340
enable_testing()
340341
add_subdirectory(${TBB_DOC_EXAMPLES_DIRECTORY})
341342
endif()

doc/main/examples_testing/CMakeLists.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ add_custom_target(build-doc-examples
2323
set(doc_examples_test_label "doc-examples")
2424

2525
macro(add_doc_example _doc_example_path)
26-
message(STATUS "Adding ${_doc_example_path}")
27-
2826
get_filename_component(_doc_example_name "${_doc_example_path}" NAME_WE)
2927
add_executable(${_doc_example_name} EXCLUDE_FROM_ALL "${_doc_example_path}")
3028

@@ -36,13 +34,8 @@ macro(add_doc_example _doc_example_path)
3634
set_tests_properties(${_doc_example_name} PROPERTIES LABELS "${doc_examples_test_label}")
3735
endmacro()
3836

39-
file(GLOB_RECURSE REFERENCE_EXAMPLES_LIST "${_reference_examples_path}/*.cpp")
40-
file(GLOB_RECURSE USERGUIDE_EXAMPLES_LIST "${_userguide_examples_path}/*.cpp")
41-
42-
foreach(_doc_example_path IN LISTS REFERENCE_EXAMPLES_LIST)
43-
add_doc_example(${_doc_example_path})
44-
endforeach()
37+
file(GLOB_RECURSE DOC_EXAMPLES_LIST "${_reference_examples_path}/*.cpp" "${_userguide_examples_path}/*.cpp")
4538

46-
foreach(_doc_example_path IN LISTS USERGUIDE_EXAMPLES_LIST)
39+
foreach(_doc_example_path IN LISTS DOC_EXAMPLES_LIST)
4740
add_doc_example(${_doc_example_path})
4841
endforeach()

0 commit comments

Comments
 (0)