FIND_PACKAGE(Threads REQUIRED)
IF(DEAL_II_USE_CONTRIB)
- # Compiles and links libtbb, exports the TBB_* variables as well:
+ # compile and link the contrib tbb library:
ADD_SUBDIRECTORY(contrib/tbb)
+
+ # This sets TBB_LIBRARY and TBB_DEBUG_LIBRARY to the full path of the
+ # _installed_ library location
+
ELSE()
FIND_PACKAGE(TBB REQUIRED)
ENDIF()
INCLUDE_DIRECTORIES(${TBB_INCLUDE_DIR})
+IF(NOT DEAL_II_USE_CONTRIB)
+ SET(deal_ii_include_paths
+ ${deal_ii_include_paths}
+ ${TBB_INCLUDE_DIR}
+ )
+ENDIF()
+
SET(deal_ii_external_libraries
${deal_ii_external_libraries}
${TBB_LIBRARY}
FIND_PACKAGE(BLAS REQUIRED)
IF(DEAL_II_USE_CONTRIB)
- # Compiles and links libumfpack, exports the Umfpack_* variables as well:
- ADD_SUBDIRECTORY(contrib/umfpack)
+ #
+ # Add umfpack and amd directly to the object files of deal.II
+ #
+
+ ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/contrib/umfpack/UMFPACK/Source)
+ ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/contrib/umfpack/AMD/Source)
+
+ INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_DIR}/contrib/umfpack/UMFPACK/Include
+ ${CMAKE_SOURCE_DIR}/contrib/umfpack/AMD/Include
+ )
+
+ SET(deal_ii_additional_object_files
+ ${deal_ii_additional_object_files}
+ $<TARGET_OBJECTS:obj_umfpack>
+ $<TARGET_OBJECTS:obj_amd>
+ )
ELSE()
FIND_PACKAGE(Umfpack REQUIRED)
FIND_PACKAGE(AMD REQUIRED)
-ENDIF()
-INCLUDE_DIRECTORIES(${Umfpack_INCLUDE_DIR} ${AMD_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES(${Umfpack_INCLUDE_DIR} ${AMD_INCLUDE_DIR})
-SET(deal_ii_external_libraries
- ${deal_ii_external_libraries}
- ${Umfpack_LIBRARY} ${AMD_LIBRARY} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}
- )
+ #
+ # We skip *_INCLUDE_DIR because it is not needed for the use of the
+ # deal.II library
+ #
+
+ SET(deal_ii_external_libraries
+ ${deal_ii_external_libraries}
+ ${Umfpack_LIBRARY} ${AMD_LIBRARY} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}
+ )
+
+ SET(deal_ii_external_debug_libraries
+ ${deal_ii_external_debug_libraries}
+ ${Umfpack_LIBRARY} ${AMD_LIBRARY} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}
+ )
+ENDIF()
-SET(deal_ii_external_debug_libraries
- ${deal_ii_external_debug_libraries}
- ${Umfpack_LIBRARY} ${AMD_LIBRARY} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}
- )
SET(HAVE_LIBBLAS TRUE)
SET(HAVE_LIBLAPACK TRUE)