Skip to content

Commit

Permalink
Apply review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kboyarinov committed Feb 6, 2025
1 parent e183300 commit 53a4bf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ if (TBB_DOC_EXAMPLES)
if (NOT EXISTS ${TBB_DOC_EXAMPLES_DIRECTORY})
message(FATAL_ERROR "Documentation examples are not found while testing was enabled")
else()
message(STATUS "Enabling testing for examples from documentation")
enable_testing()
add_subdirectory(${TBB_DOC_EXAMPLES_DIRECTORY})
endif()
Expand Down
11 changes: 2 additions & 9 deletions doc/main/examples_testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ add_custom_target(build-doc-examples
set(doc_examples_test_label "doc-examples")

macro(add_doc_example _doc_example_path)
message(STATUS "Adding ${_doc_example_path}")

get_filename_component(_doc_example_name "${_doc_example_path}" NAME_WE)
add_executable(${_doc_example_name} EXCLUDE_FROM_ALL "${_doc_example_path}")

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

file(GLOB_RECURSE REFERENCE_EXAMPLES_LIST "${_reference_examples_path}/*.cpp")
file(GLOB_RECURSE USERGUIDE_EXAMPLES_LIST "${_userguide_examples_path}/*.cpp")

foreach(_doc_example_path IN LISTS REFERENCE_EXAMPLES_LIST)
add_doc_example(${_doc_example_path})
endforeach()
file(GLOB_RECURSE DOC_EXAMPLES_LIST "${_reference_examples_path}/*.cpp" "${_userguide_examples_path}/*.cpp")

foreach(_doc_example_path IN LISTS USERGUIDE_EXAMPLES_LIST)
foreach(_doc_example_path IN LISTS DOC_EXAMPLES_LIST)
add_doc_example(${_doc_example_path})
endforeach()

0 comments on commit 53a4bf7

Please sign in to comment.