On my Ubuntu setup, compilation failes when using med.h, since
libmedc is built with openMPI, while freeCAD selects hdf5-serial. libmed declares functions prototypes which has MPI parameters if built for openMPI, causing compilation errors. Doing some online searches reveals that some users manually changes the include-paths to hdf5-openmpi if this error happens. This patch tries to autodetect this situation.
This commit is contained in:
committed by
Yorik van Havre
parent
2226da3a20
commit
dccf48d3f4
@@ -41,6 +41,10 @@ IF(MEDFILE_ROOT_DIR)
|
||||
ENDIF(MEDFILE_ROOT_DIR)
|
||||
|
||||
FIND_PATH(MEDFILE_INCLUDE_DIRS med.h PATH_SUFFIXES med)
|
||||
find_file(meddotH med.h PATHS ${MEDFILE_INCLUDE_DIRS} NO_DEFAULT_PATH)
|
||||
if(NOT meddotH)
|
||||
message( FATAL_ERROR "med.h not found in an error message above.")
|
||||
endif()
|
||||
#FIND_PROGRAM(MDUMP mdump)
|
||||
FIND_LIBRARY(MEDFILE_C_LIBRARIES NAMES medC)
|
||||
FIND_LIBRARY(MEDFILE_F_LIBRARIES NAMES med)
|
||||
|
||||
Reference in New Issue
Block a user