TestPlatformToolchain.cmake 634 B

12345678910111213141516
  1. if("x${CMAKE_GENERATOR_PLATFORM}" STREQUAL "xTest Platform")
  2. message(SEND_ERROR "CMAKE_GENERATOR_PLATFORM is \"Test Platform\" as expected.")
  3. else()
  4. message(FATAL_ERROR
  5. "CMAKE_GENERATOR_PLATFORM is \"${CMAKE_GENERATOR_PLATFORM}\" "
  6. "but should be \"Test Platform\"!")
  7. endif()
  8. if(CMAKE_GENERATOR MATCHES "Visual Studio")
  9. if("x${CMAKE_VS_PLATFORM_NAME}" STREQUAL "xTest Platform")
  10. message(SEND_ERROR "CMAKE_VS_PLATFORM_NAME is \"Test Platform\" as expected.")
  11. else()
  12. message(FATAL_ERROR
  13. "CMAKE_VS_PLATFORM_NAME is \"${CMAKE_VS_PLATFORM_NAME}\" "
  14. "but should be \"Test Platform\"!")
  15. endif()
  16. endif()