boost_contract-config.cmake 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # Generated by Boost 1.76.0
  2. if(TARGET Boost::contract)
  3. return()
  4. endif()
  5. if(Boost_VERBOSE OR Boost_DEBUG)
  6. message(STATUS "Found boost_contract ${boost_contract_VERSION} at ${boost_contract_DIR}")
  7. endif()
  8. mark_as_advanced(boost_contract_DIR)
  9. # Compute the include and library directories relative to this file.
  10. get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" REALPATH)
  11. # If the computed and the original directories are symlink-equivalent, use original
  12. if(EXISTS "C:/Program Files/Boost/lib/cmake")
  13. get_filename_component(_BOOST_CMAKEDIR_ORIGINAL "C:/Program Files/Boost/lib/cmake" REALPATH)
  14. if(_BOOST_CMAKEDIR STREQUAL _BOOST_CMAKEDIR_ORIGINAL)
  15. set(_BOOST_CMAKEDIR "C:/Program Files/Boost/lib/cmake")
  16. endif()
  17. unset(_BOOST_CMAKEDIR_ORIGINAL)
  18. endif()
  19. get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../include/boost-1_76/" ABSOLUTE)
  20. get_filename_component(_BOOST_LIBDIR "${_BOOST_CMAKEDIR}/../" ABSOLUTE)
  21. include(${CMAKE_CURRENT_LIST_DIR}/../BoostDetectToolset-1.76.0.cmake)
  22. if(Boost_DEBUG)
  23. message(STATUS "Scanning ${CMAKE_CURRENT_LIST_DIR}/libboost_contract-variant*.cmake")
  24. endif()
  25. file(GLOB __boost_variants "${CMAKE_CURRENT_LIST_DIR}/libboost_contract-variant*.cmake")
  26. macro(_BOOST_SKIPPED fname reason)
  27. if(Boost_VERBOSE OR Boost_DEBUG)
  28. message(STATUS " [ ] ${fname}")
  29. endif()
  30. list(APPEND __boost_skipped "${fname} (${reason})")
  31. endmacro()
  32. list(LENGTH __boost_variants _BOOST_SINGLE_VARIANT)
  33. if(NOT _BOOST_SINGLE_VARIANT EQUAL 1)
  34. set(_BOOST_SINGLE_VARIANT 0)
  35. endif()
  36. foreach(f IN LISTS __boost_variants)
  37. if(Boost_DEBUG)
  38. message(STATUS " Including ${f}")
  39. endif()
  40. include(${f})
  41. endforeach()
  42. unset(_BOOST_SINGLE_VARIANT)
  43. unset(_BOOST_LIBDIR)
  44. unset(_BOOST_INCLUDEDIR)
  45. unset(_BOOST_CMAKEDIR)
  46. if(NOT __boost_variants AND (Boost_VERBOSE OR Boost_DEBUG))
  47. message(STATUS " Library has no variants and is considered not found")
  48. endif()
  49. if(NOT TARGET Boost::contract)
  50. set(__boost_message "No suitable build variant has been found.")
  51. if(__boost_skipped)
  52. set(__boost_message "${__boost_message}\nThe following variants have been tried and rejected:")
  53. foreach(s IN LISTS __boost_skipped)
  54. set(__boost_message "${__boost_message}\n* ${s}")
  55. endforeach()
  56. endif()
  57. set(boost_contract_FOUND 0)
  58. set(boost_contract_NOT_FOUND_MESSAGE ${__boost_message})
  59. unset(__boost_message)
  60. unset(__boost_skipped)
  61. unset(__boost_variants)
  62. unset(_BOOST_CONTRACT_DEPS)
  63. return()
  64. endif()
  65. unset(__boost_skipped)
  66. unset(__boost_variants)
  67. if(_BOOST_CONTRACT_DEPS)
  68. list(REMOVE_DUPLICATES _BOOST_CONTRACT_DEPS)
  69. if(Boost_VERBOSE OR Boost_DEBUG)
  70. message(STATUS "Adding boost_contract dependencies: ${_BOOST_CONTRACT_DEPS}")
  71. endif()
  72. endif()
  73. foreach(dep_boost_contract IN LISTS _BOOST_CONTRACT_DEPS)
  74. set(_BOOST_QUIET)
  75. if(boost_contract_FIND_QUIETLY)
  76. set(_BOOST_QUIET QUIET)
  77. endif()
  78. set(_BOOST_REQUIRED)
  79. if(boost_contract_FIND_REQUIRED)
  80. set(_BOOST_REQUIRED REQUIRED)
  81. endif()
  82. get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE)
  83. find_package(boost_${dep_boost_contract} 1.76.0 EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HINTS ${_BOOST_CMAKEDIR})
  84. set_property(TARGET Boost::contract APPEND PROPERTY INTERFACE_LINK_LIBRARIES Boost::${dep_boost_contract})
  85. unset(_BOOST_QUIET)
  86. unset(_BOOST_REQUIRED)
  87. unset(_BOOST_CMAKEDIR)
  88. if(NOT boost_${dep_boost_contract}_FOUND)
  89. set(boost_contract_FOUND 0)
  90. set(boost_contract_NOT_FOUND_MESSAGE "A required dependency, boost_${dep_boost_contract}, has not been found.")
  91. unset(_BOOST_CONTRACT_DEPS)
  92. return()
  93. endif()
  94. endforeach()
  95. unset(_BOOST_CONTRACT_DEPS)