Skip to content

Test possible fix for regex in build dir #13733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

vepadulano
Copy link
Member

In first approximation, this fixes #13731 . I am not sure it's what we want, so for now it's in a rough state. It is based on the discussion at https://gitlab.kitware.com/cmake/cmake/-/issues/18580 . If we decide it's what we want I will polish it a bit.

@phsft-bot
Copy link

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac11/noimt, mac12arm/cxx20, windows10/default
How to customize builds

@bellenot
Copy link
Member

Well, I'm trying this solution:

    set(CMAKE_SOURCE_DIR_ESCAPED ${CMAKE_SOURCE_DIR})
    set(CMAKE_BINARY_DIR_ESCAPED ${CMAKE_BINARY_DIR})
    set(special_chars [ ] + ( ))
    foreach(char ${special_chars})
       string(REPLACE ${char} "\\${char}" CMAKE_SOURCE_DIR_ESCAPED ${CMAKE_SOURCE_DIR_ESCAPED})
       string(REPLACE ${char} "\\${char}" CMAKE_BINARY_DIR_ESCAPED ${CMAKE_BINARY_DIR_ESCAPED})
    endforeach()

    list(FILTER incdirs EXCLUDE REGEX "^${CMAKE_SOURCE_DIR_ESCAPED}")
    list(FILTER incdirs EXCLUDE REGEX "^${CMAKE_BINARY_DIR_ESCAPED}/ginclude")
    list(FILTER incdirs EXCLUDE REGEX "^${CMAKE_BINARY_DIR_ESCAPED}/externals")
    list(FILTER incdirs EXCLUDE REGEX "^${CMAKE_BINARY_DIR_ESCAPED}/builtins")

(but note my comment on #13731), I think we can only escape the + without having to change the way ${ROOTSYS} is used

@github-actions
Copy link

Test Results

         9 files           9 suites   2d 6h 4m 2s ⏱️
  2 489 tests   2 482 ✔️ 0 💤 7
21 450 runs  21 443 ✔️ 0 💤 7

For more details on these failures, see this check.

Results for commit c591b09.

@vepadulano
Copy link
Member Author

Closing this PR as we understood that there is no proper way to treat special characters in build directories in cmake. Possibly, a different PR with a patch to throw an error if special characters are used will be open

@vepadulano vepadulano closed this Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build directory name not allowed to have wildcards in them
3 participants