-# Copyright (C) 2010-2020 CEA/DEN, EDF R&D
+# Copyright (C) 2010-2022 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
LIST(APPEND _subdirs ParaSMESHCorba)
ENDIF()
+if(SALOME_USE_MPI)
+ # see https://stackoverflow.com/questions/20239334/cmake-set-subdirectory-options
+ # force to ON MEDREADER option instead of a simple set(MEDREADER_USE_MPI ON)
+ set(MEDREADER_USE_MPI ON CACHE BOOL "Activate parallel reading for MEDREADER" FORCE)
+endif(SALOME_USE_MPI)
+
FOREACH(_dir ${_subdirs})
ADD_SUBDIRECTORY(${_dir})
ENDFOREACH()