CMakeLists.txt 973 B

1234567891011121314151617181920212223242526
  1. # (C) Copyright Raffi Enficiaud 2014.
  2. # Distributed under the Boost Software License, Version 1.0.
  3. # (See accompanying file LICENSE_1_0.txt or copy at
  4. # http://www.boost.org/LICENSE_1_0.txt)
  5. #
  6. # See http://www.boost.org/libs/test for the library home page.
  7. #
  8. # trivial cmake script for running the dataset
  9. # ***************************************************************************
  10. cmake_minimum_required(VERSION 2.8.11)
  11. project(my_first_test)
  12. enable_testing()
  13. # not meant to be included in the documentation
  14. set(BOOST_ROOT ${CMAKE_SOURCE_DIR}/../../../../../..)
  15. message(STATUS "$BOOST_ROOT = ${BOOST_ROOT}")
  16. # creates the executable
  17. add_executable(test_executable test_file.cpp)
  18. # indicates the include paths
  19. target_include_directories(test_executable PRIVATE ${BOOST_ROOT})
  20. # indicates the link paths
  21. target_link_libraries(test_executable ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
  22. # declares a test with our executable
  23. add_test(NAME test1 COMMAND test_executable)