diff --git a/cmake_modules/Findcsm.cmake b/cmake_modules/Findcsm.cmake index 938022e920cddb287f773480596ffe497d8a0306..6dafd97ded05ef9df2b4b19b318639855fa48af5 100755 --- a/cmake_modules/Findcsm.cmake +++ b/cmake_modules/Findcsm.cmake @@ -47,7 +47,7 @@ macro(csm_report_not_found REASON_MSG) # FindPackage() use the camelcase library name, not uppercase. if (csm_FIND_QUIETLY) message(STATUS "Failed to find csm- " ${REASON_MSG} ${ARGN}) - else (csm_FIND_REQUIRED) + elseif (csm_FIND_REQUIRED) message(FATAL_ERROR "Failed to find csm - " ${REASON_MSG} ${ARGN}) else() # Neither QUIETLY nor REQUIRED, use SEND_ERROR which emits an error