NewForm_Project.cmake 562 B

12345678910111213141516
  1. load_cache(${CMAKE_CURRENT_BINARY_DIR}/../test_project READ_WITH_PREFIX LOAD_CACHE_TEST_
  2. CACHE_STRING
  3. CACHE_BOOL
  4. CACHE_INTERNAL)
  5. if(NOT LOAD_CACHE_TEST_CACHE_STRING STREQUAL "cache string")
  6. message(FATAL_ERROR "CACHE_STRING: was ${CACHE_STRING}, expected \"cache string\"")
  7. endif()
  8. if(NOT LOAD_CACHE_TEST_CACHE_BOOL)
  9. message(FATAL_ERROR "CACHE_BOOL: was falsey, expected ON")
  10. endif()
  11. if(NOT LOAD_CACHE_TEST_CACHE_INTERNAL STREQUAL "cache internal")
  12. message(FATAL_ERROR "CACHE_INTERNAL: was ${CACHE_INTENRAL}, expected \"cache internal\"")
  13. endif()