From: Joel Holdsworth Date: Sat, 20 Oct 2012 18:01:58 +0000 (+0100) Subject: Moved unit test build commands into test/CMakeLists.txt X-Git-Tag: pulseview-0.1.0~238 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a322807e503d55e609bd20afcaa90c73ad00cfbf;p=pulseview.git Moved unit test build commands into test/CMakeLists.txt --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a54708e3..dc576ed1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,11 +53,7 @@ endif() find_package(Qt4 REQUIRED) -if(ENABLE_TESTS) -find_package(Boost 1.46 COMPONENTS unit_test_framework REQUIRED) -else() find_package(Boost 1.46) -endif() #=============================================================================== #= Config Header diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 363470bb..6da1a247 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -18,6 +18,8 @@ ## along with this program. If not, see . ## +find_package(Boost 1.46 COMPONENTS unit_test_framework REQUIRED) + set(pulseview_TEST_SOURCES ${PROJECT_SOURCE_DIR}/pv/datasnapshot.cpp ${PROJECT_SOURCE_DIR}/pv/logicdatasnapshot.cpp @@ -27,6 +29,14 @@ set(pulseview_TEST_SOURCES add_definitions(-DBOOST_TEST_DYN_LINK) +include_directories( + ${Boost_INCLUDE_DIRS} +) + +set(PULSEVIEW_LINK_LIBS + ${Boost_LIBRARIES} +) + add_executable(pulseview-test ${pulseview_TEST_SOURCES} )