X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=CMakeLists.txt;h=1513d6dd1f14da578c66561859142628b6ed85ce;hp=0d3464b78fb51493987539b76e5aac5eb9905a01;hb=3efda736308edc11468a4b59bdb28d5793902529;hpb=d4384c6d5c7cb6dc16979c650cd21aa29f0aedb5 diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d3464b7..1513d6dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,11 +28,11 @@ project(pulseview) #------------------------------------------------------------------------------- option(ENABLE_TESTS "Enable unit tests" FALSE) -option(STATIC_PKGDEPS_LIBS "Statically link to sigrok libraries" FALSE) +option(STATIC_PKGDEPS_LIBS "Statically link to (pkgconfig) libraries" FALSE) if(WIN32) - # On Windows/MinGW we need to statically link to libraries - # This option is user configurable, but enable it by default on win32 + # On Windows/MinGW we need to statically link to libraries. + # This option is user configurable, but enable it by default on win32. set(STATIC_PKGDEPS_LIBS TRUE) endif() @@ -49,10 +49,11 @@ pkg_check_modules(PKGDEPS REQUIRED # On Windows/MinGW we explicitly point cmake to the Boost directory. if(WIN32) set(BOOST_ROOT /usr/local) -endif(WIN32) +endif() find_package(Qt4 REQUIRED) -find_package(Boost 1.46 COMPONENTS unit_test_framework REQUIRED) + +find_package(Boost 1.46) #=============================================================================== #= Config Header @@ -89,8 +90,10 @@ set(pulseview_SOURCES pv/signaldata.cpp pv/sigsession.cpp pv/signal.cpp + pv/view/cursor.cpp pv/view/header.cpp pv/view/ruler.cpp + pv/view/timemarker.cpp pv/view/view.cpp pv/view/viewport.cpp ) @@ -100,8 +103,10 @@ set(pulseview_HEADERS pv/mainwindow.h pv/samplingbar.h pv/sigsession.h + pv/view/cursor.h pv/view/header.h pv/view/ruler.h + pv/view/timemarker.h pv/view/view.h pv/view/viewport.h ) @@ -114,13 +119,6 @@ set(pulseview_RESOURCES pulseview.qrc ) -set(pulseview_TEST_SOURCES - pv/datasnapshot.cpp - pv/logicdatasnapshot.cpp - test/logicdatasnapshot.cpp - test/test.cpp -) - qt4_wrap_cpp(pulseview_HEADERS_MOC ${pulseview_HEADERS}) qt4_wrap_ui(pulseview_FORMS_HEADERS ${pulseview_FORMS}) qt4_add_resources(pulseview_RESOURCES_RCC ${pulseview_RESOURCES}) @@ -132,6 +130,7 @@ include(${QT_USE_FILE}) #------------------------------------------------------------------------------- add_definitions(${QT_DEFINITIONS}) +add_definitions(-Werror -Wall) #=============================================================================== #= Global Include Directories @@ -188,18 +187,7 @@ install(PROGRAMS ${PROJECT_NAME} DESTINATION bin/) #------------------------------------------------------------------------------- if(ENABLE_TESTS) - - add_definitions(pulseview-tests - -DBOOST_TEST_DYN_LINK - ) - - add_executable(pulseview-test - ${pulseview_TEST_SOURCES} - ) - - target_link_libraries(pulseview-test ${PULSEVIEW_LINK_LIBS}) - + add_subdirectory(test) enable_testing() - add_test(test ${CMAKE_CURRENT_BINARY_DIR}/pulseview-test) - + add_test(test ${CMAKE_CURRENT_BINARY_DIR}/test/pulseview-test) endif(ENABLE_TESTS)