Skip to content

Commit

Permalink
Fixed dependency on boost
Browse files Browse the repository at this point in the history
  • Loading branch information
HFTrader committed Mar 24, 2024
1 parent 15d12d5 commit 829bb5c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions libs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@ set( LIBRARY_CPP_FILES Snapshot.cpp PerfGroup.cpp PerfUtils.cpp CpuUtils.cpp )
if ( HAVE_LIBPFM )
set( LIBRARY_DEPENDENCIES pfm )
endif()
if ( Armadillo_FOUND )
if ( Armadillo_FOUND AND Boost_CONTAINER_FOUND )
list( APPEND LIBRARY_CPP_FILES Regression.cpp )
list( APPEND LIBRARY_DEPENDENCIES armadillo )
list( APPEND LIBRARY_DEPENDENCIES armadillo Boost::container )
endif()
add_library( tinyperfstats SHARED ${LIBRARY_CPP_FILES} )
target_link_libraries( tinyperfstats ${LIBRARY_DEPENDENCIES} )

set( HEADER_LIST Allocators.h BitUtils.h CpuUtils.h DateUtils.h Histogram.h KahanSum.h MicroStats.h PerfCounter.h Snapshot.h StringUtils.h Ticker.h TimingUtils.h Regression.h )
foreach( HEADER ${HEADER_LIST} )
file( REAL_PATH ${HEADER} ABSHEADER BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
list( APPEND ALLHEADERS ${ABSHEADER} )
foreach( header ${HEADER_LIST} )
list( APPEND ALLHEADERS "${CMAKE_CURRENT_SOURCE_DIR}/${header}" )
endforeach()

set_target_properties( tinyperfstats PROPERTIES
PUBLIC_HEADER "${ALLHEADERS}" )
target_include_directories( tinyperfstats PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" )
target_include_directories( tinyperfstats PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" )

0 comments on commit 829bb5c

Please sign in to comment.