CMakeLists.txt 1.1 KB

1234567891011121314151617181920212223242526272829
  1. # Copyright Mike Dev 2018
  2. # Copyright Rene Rivera 2018
  3. # Distributed under the Boost Software License, Version 1.0.
  4. # See accompanying file LICENSE_1_0.txt or copy at
  5. # http://www.boost.org/LICENSE_1_0.txt
  6. # NOTE:
  7. # This does NOT run the unit tests for Boost.Predef.
  8. # It only tests, if the CMakeLists.txt file in predef's
  9. # root directory works as expected (i.e. it provides the
  10. # target Boost::predef which in turn provides the
  11. # correct include directory )
  12. # We have very simple cmake requirements we we still require the new style
  13. # declarative targets.
  14. cmake_minimum_required( VERSION 3.0 )
  15. project( PredefCMakeSelfTest )
  16. # Process cmake file at root of library and use
  17. # ${CMAKE_CURRENT_BINARY_DIR}/libs/predef as workspace
  18. add_subdirectory( ../.. ${CMAKE_CURRENT_BINARY_DIR}/libs/predef )
  19. # The executable just includes a predef header to verify that it's used.
  20. add_executable( predef_cmake_test_prj main.cpp )
  21. # The executable needs to "use" the Predef "library" to get the usage
  22. # requirements added to the executable build.
  23. target_link_libraries( predef_cmake_test_prj Boost::predef )