🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
2.2 KiB

2 years ago
2 years ago
2 years ago
2 years ago
  1. # Copyright (c) 2014 Jarryd Beck
  2. #
  3. # Permission is hereby granted, free of charge, to any person obtaining a copy
  4. # of this software and associated documentation files (the "Software"), to deal
  5. # in the Software without restriction, including without limitation the rights
  6. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. # copies of the Software, and to permit persons to whom the Software is
  8. # furnished to do so, subject to the following conditions:
  9. #
  10. # The above copyright notice and this permission notice shall be included in
  11. # all copies or substantial portions of the Software.
  12. #
  13. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. # THE SOFTWARE.
  20. add_executable(options_test main.cpp options.cpp)
  21. target_link_libraries(options_test cxxopts)
  22. add_test(options options_test)
  23. # test if the targets are findable from the build directory
  24. add_test(find-package-test ${CMAKE_CTEST_COMMAND}
  25. -C ${CMAKE_BUILD_TYPE}
  26. --build-and-test
  27. "${CMAKE_CURRENT_SOURCE_DIR}/find-package-test"
  28. "${CMAKE_CURRENT_BINARY_DIR}/find-package-test"
  29. --build-generator ${CMAKE_GENERATOR}
  30. --build-makeprogram ${CMAKE_MAKE_PROGRAM}
  31. --build-options
  32. "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
  33. "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
  34. "-Dcxxopts_DIR=${PROJECT_BINARY_DIR}"
  35. )
  36. # test if the targets are findable when add_subdirectory is used
  37. add_test(add-subdirectory-test ${CMAKE_CTEST_COMMAND}
  38. -C ${CMAKE_BUILD_TYPE}
  39. --build-and-test
  40. "${CMAKE_CURRENT_SOURCE_DIR}/add-subdirectory-test"
  41. "${CMAKE_CURRENT_BINARY_DIR}/add-subdirectory-test"
  42. --build-generator ${CMAKE_GENERATOR}
  43. --build-makeprogram ${CMAKE_MAKE_PROGRAM}
  44. --build-options
  45. "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
  46. "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
  47. )
  48. add_executable(link_test link_a.cpp link_b.cpp)
  49. target_link_libraries(link_test cxxopts)