mdavidsaver / cmake4epics

support for using CMake to find EPICS and build IOCs
Other
6 stars 3 forks source link

Bug in FindEPICSTools #4

Open triskeldeian opened 6 years ago

triskeldeian commented 6 years ago

Dear developers, I found an important bug in the FindEPICSTools module In line number 100 of the module you should replace break() with continue() otherwise only the first of the input DBDs gets integrated in the output DBD of the IOC

mdavidsaver commented 6 years ago

Do you mean?

https://github.com/mdavidsaver/cmake4epics/blob/37430d3d32df61bdd506664d618c6ab705d83378/cmake/Modules/FindEPICSTools.cmake#L95-L101

In which case, yes it looks like it should be continue.

triskeldeian commented 6 years ago

Yes, exactly there. I copied your macro in a small IOC project of mine and with that modification it seems to be working fine.

On a side note I also think you should add the following search path in the FindEPICSModule.cmake file, as that seems to be the standard path for many modules in EPICS:

find_path(${FEM_NAME}_DIR NAMES ${FEM_IDFILES} HINTS ENV ${FEM_NAME}_DIR PATHS ${EPICS_MODULE_PATH} ${FEM_PATH}
${EPICS_BASE_DIR}/../modules/${FEM_NAME} # Caiazza: Add an additional search path ${EPICS_BASE_DIR}/../${FEM_NAME} ${EPICS_BASE_DIR} NO_DEFAULT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH )

mdavidsaver commented 6 years ago

Should be fixed by 25c8960b00da5907095e00e90bde7703eaefe82d