Skip to content

Commit

Permalink
BUG: Using relaive pathing in TBBConfig.cmake.in define _tbb_root is …
Browse files Browse the repository at this point in the history
…not reliable

When SAVE_TO option is used, the relative path for _tbb_root may not be
properly captured.
  • Loading branch information
hjmjohnson committed Jan 18, 2019
1 parent 07ebf89 commit 792183a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmake/TBBMakeConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function(tbb_make_config)
set(tbb_system_name ${tbb_MK_SYSTEM_NAME})
endif()

set(TBB_ROOT ${tbb_MK_TBB_ROOT})
set(tbb_config_dir ${tbb_MK_TBB_ROOT}/cmake)
if (tbb_MK_SAVE_TO)
set(tbb_config_dir ${tbb_MK_SAVE_TO})
Expand Down
3 changes: 1 addition & 2 deletions cmake/templates/TBBConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ endif()

set(TBB_INTERFACE_VERSION @TBB_INTERFACE_VERSION@)

get_filename_component(_tbb_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_tbb_root "${_tbb_root}" PATH)
get_filename_component(_tbb_root "@TBB_ROOT@" PATH)

set(_tbb_x32_subdir @TBB_X32_SUBDIR@)
set(_tbb_x64_subdir @TBB_X64_SUBDIR@)
Expand Down

0 comments on commit 792183a

Please sign in to comment.