Browse Source

cmake for carl: handle situation where carl version information is missing

Older carl versions don't provide detailed version information, so we
provide an informative error message instead of cmake syntax errors during
the comparison.
tempestpy_adaptions
Joachim Klein 7 years ago
parent
commit
40a982430c
  1. 4
      resources/3rdparty/CMakeLists.txt

4
resources/3rdparty/CMakeLists.txt

@ -215,6 +215,10 @@ if(USE_CARL)
else() else()
message(SEND_ERROR "File ${carlLOCATION} does not exist, did you build carl?") message(SEND_ERROR "File ${carlLOCATION} does not exist, did you build carl?")
endif() endif()
if("${carl_MINORYEARVERSION}" STREQUAL "" OR "${carl_MINORMONTHVERSION}" STREQUAL "" OR "${carl_MAINTENANCEVERSION}" STREQUAL "")
# don't have detailed version information, probably an old version of carl
message(FATAL_ERROR "Carl at ${carlLOCATION} outdated, require ${CARL_MINYEAR}.${CARL_MINMONTH}.${CARL_MINPATCH}, have ${carl_VERSION}")
endif()
if(${carl_MINORYEARVERSION} LESS ${CARL_MINYEAR}) if(${carl_MINORYEARVERSION} LESS ${CARL_MINYEAR})
message(SEND_ERROR "Carl outdated, require ${CARL_MINYEAR}.${CARL_MINMONTH}.${CARL_MINPATCH}, have ${carl_VERSION}") message(SEND_ERROR "Carl outdated, require ${CARL_MINYEAR}.${CARL_MINMONTH}.${CARL_MINPATCH}, have ${carl_VERSION}")
elseif(${carl_MINORYEARVERSION} EQUAL ${CARL_MINYEAR}) elseif(${carl_MINORYEARVERSION} EQUAL ${CARL_MINYEAR})

Loading…
Cancel
Save