Skip to content
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

TBB Version cannot be recognized correctly #9475

Closed
xiyuanbao opened this issue Feb 4, 2020 · 1 comment
Closed

TBB Version cannot be recognized correctly #9475

xiyuanbao opened this issue Feb 4, 2020 · 1 comment

Comments

@xiyuanbao
Copy link

xiyuanbao commented Feb 4, 2020

I am using Centos 7 and the tbb-devel tbb from yum source is 4.1.9, older than 4.2. If I build latest TBB from source and set up TBB_DIR TBB_INCLUDE_DIR correctly, deal.ii can find tbb path, but the reported version will be 0.1 since the TBB_VERSION_MAJOR is 2020 in ${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h, while FindTBB.cmake is trying to pick only one digit:

IF(EXISTS ${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h)
  FILE(STRINGS "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h" TBB_VERSION_MAJOR_STRING
    REGEX "#define.*TBB_VERSION_MAJOR")
  STRING(REGEX REPLACE "^.*TBB_VERSION_MAJOR.*([0-9]+).*" "\\1"
    TBB_VERSION_MAJOR "${TBB_VERSION_MAJOR_STRING}"
    )
  FILE(STRINGS "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h" TBB_VERSION_MINOR_STRING
    REGEX "#define.*TBB_VERSION_MINOR")
  STRING(REGEX REPLACE "^.*TBB_VERSION_MINOR.*([0-9]+).*" "\\1"
    TBB_VERSION_MINOR "${TBB_VERSION_MINOR_STRING}"
    )
  SET(TBB_VERSION
    "${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR}"
    )
ENDIF()

Can we modify it like this?
STRING(REGEX REPLACE "^.*TBB_VERSION_MAJOR.*([0-9]+).*" "\\4"

@masterleinad
Copy link
Member

This was fixed in 80b13fe. If it still doesn't work correctly with the develop branch, feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants