Skip to content
Snippets Groups Projects
Select Git revision
  • v2.0.80
  • master default protected
  • al9-jobs
  • engamber-master-patch-62722
  • wip-el
  • wip-sfa
  • v2.0.159 protected
  • v2.0.145 protected
  • v2.0.140 protected
  • v2.0.127 protected
  • v2.0.118 protected
  • v2.0.76 protected
  • v2.0.67 protected
13 results

Depend_cppunit.cmake

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Depend_cppunit.cmake 465 B
    
    option(TESTS "Compile and run unit tests" OFF)
    
    include(CheckFunctionExists)
    check_function_exists(getopt_long HAVE_GETOPT_LONG)
    
    if(TESTS)
    
        # CppUnit now requires a recent version of C++
        set(CMAKE_CXX_STANDARD 11)
    
        include(FindPkgConfig)
        pkg_check_modules(CPPUNIT cppunit REQUIRED)
    
        add_custom_target(test-verbose
            COMMAND ${CMAKE_CTEST_COMMAND} --verbose
            WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
    
        enable_testing()
    
    endif()