Skip to content

Commit

Permalink
Replace regex used for handling multiple '/' from find_find() (TriBIT…
Browse files Browse the repository at this point in the history
…SPub#411)

This replaces '[/]*/' which will match one or more '/' chars in a row with
'/?/' which will match one or two '/' in a row (which is what I wanted).

This addreses review feedback from @KyleFromKitware in PR TriBITSPub#565.
  • Loading branch information
bartlettroscoe committed Feb 28, 2023
1 parent 393fa09 commit 3a828fa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,24 +197,24 @@ function(TribitsExampleProject2_find_tpl_parts sharedOrStatic findingTplsMetho
"Tpl1_LIBRARY_NAMES='tpl1'"
"Found lib '${tplInstallBaseDir}/install_tpl1/lib/libtpl1${libextregex}'"
"TPL_Tpl1_LIBRARIES='${tplInstallBaseDir}/install_tpl1/lib/libtpl1${libextregex}'"
"Found header '${tplInstallBaseDir}/install_tpl1/include[/]*/Tpl1.hpp'"
"Found header '${tplInstallBaseDir}/install_tpl1/include/?/Tpl1.hpp'"
"TPL_Tpl1_INCLUDE_DIRS='${tplInstallBaseDir}/install_tpl1/include'"

"Tpl2_LIBRARY_NAMES='tpl2b[;]tpl2a'"
" Found lib '${tplInstallBaseDir}/install_tpl2/lib/libtpl2b${libextregex}'"
" Found lib '${tplInstallBaseDir}/install_tpl2/lib/libtpl2a${libextregex}'"
"TPL_Tpl2_LIBRARIES='${tplInstallBaseDir}/install_tpl2/lib/libtpl2b${libextregex}[;]${tplInstallBaseDir}/install_tpl2/lib/libtpl2a${libextregex}'"
" Found header '${tplInstallBaseDir}/install_tpl2/include[/]*/Tpl2a.hpp'"
" Found header '${tplInstallBaseDir}/install_tpl2/include/?/Tpl2a.hpp'"
"Found TPL 'Tpl2' include dirs '${tplInstallBaseDir}/install_tpl2/include'"
"TPL_Tpl2_INCLUDE_DIRS='${tplInstallBaseDir}/install_tpl2/include'"

"Tpl3_LIBRARY_NAMES='tpl3'"
" Found lib '${tplInstallBaseDir}/install_tpl3/lib/libtpl3${libextregex}'"
"TPL_Tpl3_LIBRARIES='${tplInstallBaseDir}/install_tpl3/lib/libtpl3${libextregex}'"
" Found header '${tplInstallBaseDir}/install_tpl3/include[/]*/Tpl3.hpp'"
" Found header '${tplInstallBaseDir}/install_tpl3/include/?/Tpl3.hpp'"
"TPL_Tpl3_INCLUDE_DIRS='${tplInstallBaseDir}/install_tpl3/include'"

" Found header '${tplInstallBaseDir}/install_tpl4/include[/]*/Tpl4.hpp'"
" Found header '${tplInstallBaseDir}/install_tpl4/include/?/Tpl4.hpp'"
"TPL_Tpl4_INCLUDE_DIRS='${tplInstallBaseDir}/install_tpl4/include'"

${searchingTplLibAndINcDirsRegexes}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2584,7 +2584,7 @@ tribits_add_advanced_test( TribitsExampleProject_HeaderOnlyTpl_FailThenPass
PASS_REGULAR_EXPRESSION_ALL
"Processing enabled external package/TPL: HeaderOnlyTpl .enabled by SimpleCxx, disable with -DTPL_ENABLE_HeaderOnlyTpl=OFF."
"-- Searching for headers in HeaderOnlyTpl_INCLUDE_DIRS='.*/tribits/examples/tpls/HeaderOnlyTpl'"
"Found header '.*/tribits/examples/tpls/HeaderOnlyTpl[/]*/HeaderOnlyTpl_stuff.hpp'"
"Found header '.*/tribits/examples/tpls/HeaderOnlyTpl/?/HeaderOnlyTpl_stuff.hpp'"
"Found TPL 'HeaderOnlyTpl' include dirs '.*/tribits/examples/tpls/HeaderOnlyTpl'"
"TPL_HeaderOnlyTpl_INCLUDE_DIRS='.*/tribits/examples/tpls/HeaderOnlyTpl'"
"Configuring done"
Expand Down
10 changes: 5 additions & 5 deletions test/core/ProcessEnabledTpls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ create_process_enabled_tpls_test_case(
"-- Searching for headers in HeaderOnlyTpl_INCLUDE_DIRS='.+/HeaderOnlyTpl'"
"-- Searching for a header file in the set .HeaderOnlyTpl_stuff.hpp.:"
"-- Searching for header 'HeaderOnlyTpl_stuff.hpp' ..."
"-- Found header '.+/HeaderOnlyTpl[/]*/HeaderOnlyTpl_stuff.hpp'"
"-- Found header '.+/HeaderOnlyTpl/?/HeaderOnlyTpl_stuff.hpp'"
"-- Found TPL 'HeaderOnlyTpl' include dirs '.+/HeaderOnlyTpl'"
"-- TPL_HeaderOnlyTpl_INCLUDE_DIRS='.+/HeaderOnlyTpl'"
"Exported TPL_ENABLE_HeaderOnlyTpl='ON'"
Expand Down Expand Up @@ -332,10 +332,10 @@ create_process_enabled_tpls_test_case(
"-- Searching for headers in HeadersAndLibsTpl_INCLUDE_DIRS='.+/HeadersAndLibsTpl/include'"
"-- Searching for a header file in the set .HeadersAndLibsTpl_header1.hpp.:"
"-- Searching for header 'HeadersAndLibsTpl_header1.hpp' [.][.][.]"
"-- Found header '.+/HeadersAndLibsTpl/include[/]*/HeadersAndLibsTpl_header1.hpp'"
"-- Found header '.+/HeadersAndLibsTpl/include/?/HeadersAndLibsTpl_header1.hpp'"
"-- Searching for a header file in the set .HeadersAndLibsTpl_header2.hpp.:"
"-- Searching for header 'HeadersAndLibsTpl_header2.hpp' [.][.][.]"
"-- Found header '.+/HeadersAndLibsTpl/include[/]*/HeadersAndLibsTpl_header2.hpp'"
"-- Found header '.+/HeadersAndLibsTpl/include/?/HeadersAndLibsTpl_header2.hpp'"
"-- Found TPL 'HeadersAndLibsTpl' include dirs '.+/HeadersAndLibsTpl/include'"
"-- TPL_HeadersAndLibsTpl_INCLUDE_DIRS='.+/HeadersAndLibsTpl/include'"
"Exported TPL_HeadersAndLibsTpl_NOT_FOUND='FALSE'"
Expand Down Expand Up @@ -370,11 +370,11 @@ create_process_enabled_tpls_test_case(
"-- Searching for a header file in the set .MissingHeader1.hpp HeadersAndLibsTpl_header1.hpp.:"
"-- Searching for header 'MissingHeader1.hpp' [.][.][.]"
"-- Searching for header 'HeadersAndLibsTpl_header1.hpp' [.][.][.]"
"-- Found header '.+/HeadersAndLibsTpl/include[/]*/HeadersAndLibsTpl_header1.hpp'"
"-- Found header '.+/HeadersAndLibsTpl/include/?/HeadersAndLibsTpl_header1.hpp'"
"-- Searching for a header file in the set .MissingHeader2.hpp HeadersAndLibsTpl_header2.hpp.:"
"-- Searching for header 'MissingHeader2.hpp' [.][.][.]"
"-- Searching for header 'HeadersAndLibsTpl_header2.hpp' [.][.][.]"
"-- Found header '.+/HeadersAndLibsTpl/include[/]*/HeadersAndLibsTpl_header2.hpp'"
"-- Found header '.+/HeadersAndLibsTpl/include/?/HeadersAndLibsTpl_header2.hpp'"
"-- Found TPL 'HeadersAndLibsTpl' include dirs '.+/HeadersAndLibsTpl/include'"
"-- TPL_HeadersAndLibsTpl_INCLUDE_DIRS='.+/HeadersAndLibsTpl/include'"
"Exported TPL_HeadersAndLibsTpl_NOT_FOUND='FALSE'"
Expand Down

0 comments on commit 3a828fa

Please sign in to comment.