https://github.com/Kitware/CMake
Raw File
Tip revision: ef5e2e8a62982ebccf4883fc7a01cdb66f8ca183 authored by Brad King on 13 June 2018, 14:52:11 UTC
Merge branch 'sphinx-info' into release-3.12
Tip revision: ef5e2e8
MathTestScript.cmake
message(STATUS "testname='${testname}'")

if(testname STREQUAL empty) # fail
  math()

elseif(testname STREQUAL bogus) # fail
  math(BOGUS)

elseif(testname STREQUAL not_enough_args) # fail
  math(EXPR x)

elseif(testname STREQUAL cannot_parse) # fail
  math(EXPR x "1 + 2 +")

else() # fail
  message(FATAL_ERROR "testname='${testname}' - error: no such test in '${CMAKE_CURRENT_LIST_FILE}'")

endif()
back to top