diff --git a/graphics/lib/CMakeLists.txt b/graphics/lib/CMakeLists.txt index 65457ee23..a7ba627de 100644 --- a/graphics/lib/CMakeLists.txt +++ b/graphics/lib/CMakeLists.txt @@ -35,54 +35,6 @@ IF(QT4_FOUND AND QWT_FOUND) ENDIF(QT4_FOUND AND QWT_FOUND) -######################################################################## -# Setup Boost -######################################################################## -MESSAGE(STATUS "") -MESSAGE(STATUS "Configuring Boost C++ Libraries...") -SET(BOOST_REQUIRED_COMPONENTS - program_options - system - thread - unit_test_framework -) - -IF(UNIX AND EXISTS "/usr/lib64") - LIST(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix -ENDIF(UNIX AND EXISTS "/usr/lib64") - -IF(MSVC) - SET(BOOST_ALL_DYN_LINK "${BOOST_ALL_DYN_LINK}" CACHE BOOL "boost enable dynamic linking") - IF(BOOST_ALL_DYN_LINK) - ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc - ELSE(BOOST_ALL_DYN_LINK) - UNSET(BOOST_REQUIRED_COMPONENTS) #empty components list for static link - ENDIF(BOOST_ALL_DYN_LINK) -ENDIF(MSVC) - -SET(Boost_ADDITIONAL_VERSIONS - "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39" "1.40.0" "1.40" - "1.41.0" "1.41" "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44" - "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44" "1.45.0" "1.45" - "1.46.0" "1.46" "1.47.0" "1.47" "1.48.0" "1.48" "1.49.0" "1.49" - "1.50.0" "1.50" "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53") -FIND_PACKAGE(Boost 1.37 REQUIRED ${BOOST_REQUIRED_COMPONENTS}) -MESSAGE(STATUS "Boost version: ${Boost_VERSION}") - -IF(Boost_VERSION LESS 104600) - ADD_DEFINITIONS( -DBOOST_FILESYSTEM_VERSION=2 ) #use filesystem version 2 in boost < 1.46 - MESSAGE(STATUS "Using Boost Filesystem V2") -ENDIF(Boost_VERSION LESS 104600) - -INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) -LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) - -MESSAGE(STATUS "Boost include directories: ${Boost_INCLUDE_DIRS}") -MESSAGE(STATUS "Boost library directories: ${Boost_LIBRARY_DIRS}") -MESSAGE(STATUS "Boost libraries: ${Boost_LIBRARIES}") - - - ######################################################################## # Build the graphics library @@ -104,7 +56,7 @@ IF(QWT_MAJOR_VERSION LESS 6) MESSAGE(STATUS "QWT6 is required.") ENDIF(QWT_MAJOR_VERSION LESS 6) -IF(QT4_FOUND AND QWT_FOUND AND Boost_FOUND AND QWT_MAJOR_VERSION EQUAL 6) +IF(QT4_FOUND AND QWT_FOUND AND QWT_MAJOR_VERSION EQUAL 6) QT4_WRAP_CPP(lineplotwraps common/Lineplot.h) QT4_WRAP_CPP(pointplotwraps common/Pointplot.h) QT4_WRAP_CPP(spectrogramplotwraps common/Spectrogramplot.h) @@ -131,11 +83,11 @@ IF(QT4_FOUND AND QWT_FOUND AND Boost_FOUND AND QWT_MAJOR_VERSION EQUAL 6) MESSAGE(STATUS " GRAPHICS library will be installed.") -ELSE(QT4_FOUND AND QWT_FOUND AND Boost_FOUND AND QWT_MAJOR_VERSION EQUAL 6) +ELSE(QT4_FOUND AND QWT_FOUND AND AND QWT_MAJOR_VERSION EQUAL 6) - MESSAGE(STATUS " QT4/Qwt6 or Boost not found. GRAPHICS library is not generated") + MESSAGE(STATUS " QT4 or Qwt6 not found. GRAPHICS library is not generated") -ENDIF(QT4_FOUND AND QWT_FOUND AND Boost_FOUND AND QWT_MAJOR_VERSION EQUAL 6) +ENDIF(QT4_FOUND AND QWT_FOUND AND QWT_MAJOR_VERSION EQUAL 6) diff --git a/graphics/lib/complexplot/test/complexplot_test.cpp b/graphics/lib/complexplot/test/complexplot_test.cpp index 1a01ad386..e3f7f93de 100644 --- a/graphics/lib/complexplot/test/complexplot_test.cpp +++ b/graphics/lib/complexplot/test/complexplot_test.cpp @@ -31,8 +31,6 @@ * Main test file for Complexplot class. */ -#define BOOST_TEST_MODULE Complexplot_Test - #include "Complexplot.h" #include diff --git a/graphics/lib/realplot/test/realplot_test.cpp b/graphics/lib/realplot/test/realplot_test.cpp index e6a00219d..111d07de6 100644 --- a/graphics/lib/realplot/test/realplot_test.cpp +++ b/graphics/lib/realplot/test/realplot_test.cpp @@ -31,8 +31,6 @@ * Main test file for Realplot class. */ -#define BOOST_TEST_MODULE Realplot_Test - #include "Realplot.h" #include @@ -67,7 +65,7 @@ void *threadMain1(void *arg) { for (int i = 0; i < 100; i++) { getPoints(data, 504); plot.setNewData(data, 504); - boost::this_thread::sleep(boost::posix_time::milliseconds(5)); + usleep(5000); } return NULL; } diff --git a/graphics/lib/scatterplot/test/scatterplot_test.cpp b/graphics/lib/scatterplot/test/scatterplot_test.cpp index a40eabc58..fcc104b7c 100644 --- a/graphics/lib/scatterplot/test/scatterplot_test.cpp +++ b/graphics/lib/scatterplot/test/scatterplot_test.cpp @@ -31,8 +31,6 @@ * Main test file for scatterplot class. */ -#define BOOST_TEST_MODULE Scatterplot_Test - #include "Scatterplot.h" #include @@ -94,7 +92,7 @@ void *threadMain3(void *arg) { for (int i = 0; i < 10; i++) { getPoints(v.begin(), v.end()); plot.setNewData(v.begin(), v.end()); - boost::this_thread::sleep(boost::posix_time::milliseconds(100)); + usleep(100000); } return NULL; } diff --git a/graphics/lib/waterfallplot/test/Waterfallplot_test.cpp b/graphics/lib/waterfallplot/test/Waterfallplot_test.cpp index 84dd958c8..6be65f77a 100644 --- a/graphics/lib/waterfallplot/test/Waterfallplot_test.cpp +++ b/graphics/lib/waterfallplot/test/Waterfallplot_test.cpp @@ -31,11 +31,9 @@ * Main test file for Waterfallplot class. */ -#define BOOST_TEST_MODULE Waterfallplot_Test - #include "Waterfallplot.h" - +#include #include #include #include @@ -64,7 +62,7 @@ void *threadMain1(void *arg) { return NULL; } -void threadMain2() { +void *threadMain2(void *arg) { int n = 2048; Waterfallplot plot(n, n); plot.setTitle("Double"); @@ -76,8 +74,9 @@ void threadMain2() { for (int i = 0; i < n; i++) { plot.appendNewData(data + i, n); - boost::this_thread::sleep(boost::posix_time::milliseconds(1)); + usleep(1000); } + return NULL; } void *threadMain3(void *arg) { @@ -93,8 +92,9 @@ void *threadMain3(void *arg) { for (int i = 0; i < n; i++) { plot.appendNewData(data.begin() + i, data.begin() + i + n); - boost::this_thread::sleep(boost::posix_time::milliseconds(1)); + usleep(1000); } + return NULL; } int main(int argc, char *argv[]) {