verify.cmake 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 lib3.gpj
  6. ${CMAKE_CURRENT_BINARY_DIR}
  7. ${CMAKE_CURRENT_BINARY_DIR}/lib3
  8. ${CMAKE_CURRENT_BINARY_DIR}/examples
  9. )
  10. if (fileName)
  11. message("Found target lib3: ${fileName}")
  12. else()
  13. message(SEND_ERROR "Could not find target lib3: ${fileName}")
  14. endif()
  15. #test project was generated
  16. unset(fileName CACHE)
  17. find_file (fileName exe3.gpj
  18. ${CMAKE_CURRENT_BINARY_DIR}
  19. ${CMAKE_CURRENT_BINARY_DIR}/exe3
  20. ${CMAKE_CURRENT_BINARY_DIR}/examples
  21. )
  22. if (fileName)
  23. message("Found target exe3: ${fileName}")
  24. else()
  25. message(SEND_ERROR "Could not find target exe3: ${fileName}")
  26. endif()
  27. #test project was not built
  28. unset(fileName CACHE)
  29. find_file (fileName lib3.a
  30. ${CMAKE_CURRENT_BINARY_DIR}
  31. ${CMAKE_CURRENT_BINARY_DIR}/lib3
  32. ${CMAKE_CURRENT_BINARY_DIR}/examples
  33. )
  34. if (fileName)
  35. message(SEND_ERROR "Found target lib3: ${fileName}")
  36. else()
  37. message("Could not find target lib3: ${fileName}")
  38. endif()
  39. unset(fileName CACHE)
  40. find_file (fileName NAMES exe3.as exe3
  41. HINTS
  42. ${CMAKE_CURRENT_BINARY_DIR}
  43. ${CMAKE_CURRENT_BINARY_DIR}/exe3
  44. ${CMAKE_CURRENT_BINARY_DIR}/examples
  45. )
  46. if (fileName)
  47. message(SEND_ERROR "Found target exe3: ${fileName}")
  48. else()
  49. message("Could not find target exe3: ${fileName}")
  50. endif()