-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
To reproduce:
mkdir build
cd build
cmake .. -DHTOOL_WITH_EXAMPLES=True -DCMAKE_BUILD_TYPE=Debug
make Use_hmatrixWhen I don't specify -DCMAKE_BUILD_TYPE=Debug or explicitly use -DCMAKE_BUILD_TYPE=Release, everything works. In debug mode, the linker complains that it cannot find some tbb::detail::bla bla functions.
This fixes it:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63d568d..042388c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,7 +109,7 @@ find_package(HPDDM)
#=== HTOOL as header only library
add_library(htool INTERFACE)
target_include_directories(htool INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include> ${HPDDM_INCLUDE_DIRS} ${MKL_INC_DIR})
-target_link_libraries(htool INTERFACE MPI::MPI_CXX BLAS::BLAS LAPACK::LAPACK)
+target_link_libraries(htool INTERFACE MPI::MPI_CXX BLAS::BLAS LAPACK::LAPACK tbb)
if(OpenMP_CXX_FOUND)
target_link_libraries(htool INTERFACE OpenMP::OpenMP_CXX)
endif()but I have no idea why this is not necessary in Release mode.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels