verify.cmake 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. #test project was generated
  4. unset(fileName CACHE)
  5. find_file (fileName lib1.gpj
  6. ${CMAKE_CURRENT_BINARY_DIR}
  7. ${CMAKE_CURRENT_BINARY_DIR}/lib1
  8. )
  9. if (fileName)
  10. message("Found target lib1: ${fileName}")
  11. else()
  12. message(SEND_ERROR "Could not find target lib1: ${fileName}")
  13. endif()
  14. #test project was built
  15. unset(fileName CACHE)
  16. find_file (fileName lib1.a
  17. ${CMAKE_CURRENT_BINARY_DIR}
  18. ${CMAKE_CURRENT_BINARY_DIR}/lib1
  19. )
  20. if (fileName)
  21. message(SEND_ERROR "Found target lib1: ${fileName}")
  22. else()
  23. message("Could not find target lib1: ${fileName}")
  24. endif()
  25. #test project was generated
  26. unset(fileName CACHE)
  27. find_file (fileName lib2.gpj
  28. ${CMAKE_CURRENT_BINARY_DIR}
  29. ${CMAKE_CURRENT_BINARY_DIR}/lib2
  30. )
  31. if (fileName)
  32. message("Found target lib2 ${fileName}")
  33. else()
  34. message(SEND_ERROR "Could not find target lib2: ${fileName}")
  35. endif()
  36. #test project was built
  37. unset(fileName CACHE)
  38. find_file (fileName lib2.a
  39. ${CMAKE_CURRENT_BINARY_DIR}
  40. ${CMAKE_CURRENT_BINARY_DIR}/lib2
  41. )
  42. if (fileName)
  43. message(SEND_ERROR "Found target lib2: ${fileName}")
  44. else()
  45. message("Could not find target lib2: ${fileName}")
  46. endif()