* FindEO.cmake: using conventional cmake function to handle package finding
This commit is contained in:
parent
6b95172600
commit
08e17b3392
4 changed files with 501 additions and 8 deletions
|
|
@ -13,6 +13,7 @@
|
|||
# - es
|
||||
# - ga
|
||||
# - cma
|
||||
# - mpi
|
||||
#
|
||||
# You can use FIND_PACKAGE( EO COMPONENTS ... ) to enable one or several components.
|
||||
#
|
||||
|
|
@ -27,7 +28,7 @@ IF(EO_FIND_COMPONENTS)
|
|||
SET(EO_USE_${_COMPONENT} 1)
|
||||
ENDFOREACH(component)
|
||||
|
||||
# To make sure we don't use PyEO, ES, GA, CMA when not in COMPONENTS
|
||||
# To make sure we don't use PyEO, ES, GA, CMA, MPI when there arent in COMPONENTS
|
||||
IF(NOT EO_USE_PYEO)
|
||||
SET(EO_DONT_USE_PYEO 1)
|
||||
ELSE(NOT EO_USE_PYEO)
|
||||
|
|
@ -51,6 +52,12 @@ IF(EO_FIND_COMPONENTS)
|
|||
ELSE(NOT EO_USE_CMA)
|
||||
SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} cma)
|
||||
ENDIF(NOT EO_USE_CMA)
|
||||
|
||||
IF(NOT EO_USE_MPI)
|
||||
SET(EO_DONT_USE_MPI 1)
|
||||
ELSE(NOT EO_USE_MPI)
|
||||
SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} eompi)
|
||||
ENDIF(NOT EO_USE_MPI)
|
||||
ENDIF(EO_FIND_COMPONENTS)
|
||||
|
||||
IF(NOT EO_INCLUDE_DIRS)
|
||||
|
|
@ -91,10 +98,13 @@ IF(NOT EO_LIBRARIES)
|
|||
ENDFOREACH(component)
|
||||
ENDIF(NOT EO_LIBRARIES)
|
||||
|
||||
IF(EO_INCLUDE_DIRS AND EO_LIBRARY_DIRS AND EO_LIBRARIES)
|
||||
SET(EO_FOUND 1)
|
||||
MARK_AS_ADVANCED(EO_FOUND)
|
||||
MARK_AS_ADVANCED(EO_INCLUDE_DIRS)
|
||||
MARK_AS_ADVANCED(EO_LIBRARY_DIRS)
|
||||
MARK_AS_ADVANCED(EO_LIBRARIES)
|
||||
ENDIF(EO_INCLUDE_DIRS AND EO_LIBRARY_DIRS AND EO_LIBRARIES)
|
||||
# handle the QUIETLY and REQUIRED arguments and set EO_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EO
|
||||
REQUIRED_VARS EO_INCLUDE_DIRS EO_LIBRARY_DIRS EO_LIBRARIES
|
||||
)
|
||||
|
||||
MARK_AS_ADVANCED(EO_INCLUDE_DIRS)
|
||||
MARK_AS_ADVANCED(EO_LIBRARY_DIRS)
|
||||
MARK_AS_ADVANCED(EO_LIBRARIES)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue