MESSAGE(STATUS " Optional packages - Detection report ")
MESSAGE(STATUS " ==================================== ")
MESSAGE(STATUS "")
- LIST(LENGTH _SALOME_OPTIONAL_PACKAGES_names _list_len)
- # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
- MATH(EXPR _range "${_list_len}-1")
- FOREACH(_idx RANGE ${_range})
- LIST(GET _SALOME_OPTIONAL_PACKAGES_names ${_idx} _pkg_name)
- LIST(GET _SALOME_OPTIONAL_PACKAGES_found ${_idx} _pkg_found)
- LIST(GET _SALOME_OPTIONAL_PACKAGES_flags ${_idx} _pkg_flag)
- SALOME_JUSTIFY_STRING(${_pkg_name} ${_length} _pkg_name)
- IF(_pkg_found)
- SET(_found_msg "Found")
- SET(_flag_msg "")
- ELSE()
- SET(_will_fail ON)
- SET(_found_msg "NOT Found")
- SET(_flag_msg " - ${_pkg_flag} can be switched OFF to skip this prerequisite.")
- ENDIF()
+ IF(DEFINED _SALOME_OPTIONAL_PACKAGES_names)
+ LIST(LENGTH _SALOME_OPTIONAL_PACKAGES_names _list_len)
+ # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
+ MATH(EXPR _range "${_list_len}-1")
+ FOREACH(_idx RANGE ${_range})
+ LIST(GET _SALOME_OPTIONAL_PACKAGES_names ${_idx} _pkg_name)
+ LIST(GET _SALOME_OPTIONAL_PACKAGES_found ${_idx} _pkg_found)
+ LIST(GET _SALOME_OPTIONAL_PACKAGES_flags ${_idx} _pkg_flag)
+ SALOME_JUSTIFY_STRING(${_pkg_name} ${_length} _pkg_name)
+ IF(_pkg_found)
+ SET(_found_msg "Found")
+ SET(_flag_msg "")
+ ELSE()
+ SET(_will_fail ON)
+ SET(_found_msg "NOT Found")
+ SET(_flag_msg " - ${_pkg_flag} can be switched OFF to skip this prerequisite.")
+ ENDIF()
- MESSAGE(STATUS " * ${_pkg_name} -> ${_found_msg}${_flag_msg}")
- ENDFOREACH()
+ MESSAGE(STATUS " * ${_pkg_name} -> ${_found_msg}${_flag_msg}")
+ ENDFOREACH()
+ ENDIF(DEFINED _SALOME_OPTIONAL_PACKAGES_names)
MESSAGE(STATUS "")
MESSAGE(STATUS "")