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 is not propagated by CMake #240

Closed
yrzhanov opened this issue Mar 6, 2020 · 5 comments
Closed

TBB is not propagated by CMake #240

yrzhanov opened this issue Mar 6, 2020 · 5 comments
Labels
bug Bug report cmake Related to CMake and build system

Comments

@yrzhanov
Copy link

yrzhanov commented Mar 6, 2020

I use CMake-GUI (3.17.0) on Windows 10 (VS 2015) and set locations of tbb.lib and tbbmalloc.lib.
Nevertheless, the generated *.vcxproj files for examples and timing contain TBB-NOTFOUND

@varunagrawal varunagrawal self-assigned this Mar 29, 2020
@varunagrawal varunagrawal added cmake Related to CMake and build system bug Bug report labels Mar 29, 2020
@varunagrawal varunagrawal removed their assignment Mar 29, 2020
@varunagrawal
Copy link
Collaborator

@jlblancoc please can you take a look at this? I don't have a windows machine to test this one and you are the CMake expert here. I can assist with TBB related questions and support if you need any.

@jorigin
Copy link

jorigin commented Jun 2, 2020

Hello,

I'm actually trying to compile GTSAM:
OS: Windows 10 x64
TBB: 2020.2
BOOST: 1.70.0 dynamic
MSVC: 2019

and with the standard behavior all the generated *.vcxproj files contains reference to tbb-NOT-FOUND

I've been able to avoid this by the following actions:

  • Replace gtsam\CMakeLists.txt line
    set(Boost_USE_STATIC_LIBS ON)
    by
    set(Boost_USE_STATIC_LIBS OFF)

  • Replace gtsam\cmake\FindTBB.cmake line
    add_library(${libname} SHARED IMPORTED)"
    by
    add_library(${libname} STATIC IMPORTED)"

The compilation is working after these changes.

@yrzhanov
Copy link
Author

yrzhanov commented Jun 3, 2020 via email

@varunagrawal varunagrawal modified the milestone: GTSAM 4.1 Jul 13, 2020
@varunagrawal
Copy link
Collaborator

@yrzhanov this seems to be an issue with your boost installation. Please ensure you have the seralization packages of boost installed as well. If you're still having issues, please ask questions on the Google Group or feel free to reopen this issue.

@whu-lyh
Copy link

whu-lyh commented Jun 22, 2021

Hello,

I'm actually trying to compile GTSAM:
OS: Windows 10 x64
TBB: 2020.2
BOOST: 1.70.0 dynamic
MSVC: 2019

and with the standard behavior all the generated *.vcxproj files contains reference to tbb-NOT-FOUND

I've been able to avoid this by the following actions:

* Replace gtsam\CMakeLists.txt line
  set(Boost_USE_STATIC_LIBS ON)
  by
  set(Boost_USE_STATIC_LIBS OFF)

* Replace gtsam\cmake\FindTBB.cmake line
  add_library(${libname} SHARED IMPORTED)"
  by
  add_library(${libname} STATIC IMPORTED)"

The compilation is working after these changes.

Thank you, this do works.
BTW, i still wander this solution is official solution that i have tbb as shared libraries and boost is complied as static library as default. Why should i do this "add_library(${libname} STATIC IMPORTED)" operation seeming funny to me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report cmake Related to CMake and build system
Projects
None yet
Development

No branches or pull requests

4 participants