SMP in findParadisEO.cmake
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2722 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
f90ff04e2c
commit
0bed8d3483
5 changed files with 40 additions and 15 deletions
|
|
@ -53,7 +53,7 @@ After getting ParadisEO sources from repository, you have to create a build dire
|
||||||
|
|
||||||
To make the installation easier, ParadisEO propose you two installation types which are "Full" and "Min".
|
To make the installation easier, ParadisEO propose you two installation types which are "Full" and "Min".
|
||||||
Full corresponds examples / lessons, tests and obviously libraries.
|
Full corresponds examples / lessons, tests and obviously libraries.
|
||||||
Min corresponds to libraries and headers and it's the standard behavior.
|
Min corresponds to libraries and headers and it is the standard behavior.
|
||||||
|
|
||||||
You can specified an installation type by adding the following declaration to cmake :
|
You can specified an installation type by adding the following declaration to cmake :
|
||||||
|
|
||||||
|
|
@ -76,7 +76,17 @@ There are 2 types of build : Release or Debug.
|
||||||
To explicitly change the type, add -DDEBUG=true, otherwise, it will be the Release type.
|
To explicitly change the type, add -DDEBUG=true, otherwise, it will be the Release type.
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
1.3 INSTALLATION
|
1.3 COMPILERS
|
||||||
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
You can change the compiler used by CMake with the following options :
|
||||||
|
|
||||||
|
>-DCMAKE_C_COMPILER=/path/to/your/c/compiler
|
||||||
|
|
||||||
|
>-DCMAKE_CXX_COMPILER=/path/to/your/c++/compiler
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------
|
||||||
|
1.4 INSTALLATION
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
WARNING : This require administration rights.
|
WARNING : This require administration rights.
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ if(UNIX)
|
||||||
set(CPACK_BINARY_TGZ "OFF")
|
set(CPACK_BINARY_TGZ "OFF")
|
||||||
set(CPACK_BINARY_STGZ "OFF")
|
set(CPACK_BINARY_STGZ "OFF")
|
||||||
|
|
||||||
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/mac.rtf")
|
#set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/mac.rtf")
|
||||||
|
|
||||||
else()
|
else()
|
||||||
# Generators for Unix-like
|
# Generators for Unix-like
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@
|
||||||
# - cma
|
# - cma
|
||||||
# - flowshop
|
# - flowshop
|
||||||
# - moeo
|
# - moeo
|
||||||
# You can use find_package(Paradiseo COMPONENTS ... ) to enable one or several components. If you not specifie component, all components will be load.
|
# - smp
|
||||||
|
# You can use find_package(Paradiseo COMPONENTS ... ) to enable one or several components. If you not specifie component, all components will be load except SMP for compatibility reasons.
|
||||||
#
|
#
|
||||||
# Output
|
# Output
|
||||||
# ------
|
# ------
|
||||||
|
|
@ -69,11 +70,25 @@ find_path(MO_INCLUDE_DIR mo
|
||||||
find_path(MOEO_INCLUDE_DIR moeo
|
find_path(MOEO_INCLUDE_DIR moeo
|
||||||
PATH_SUFFIXES include${INSTALL_SUB_DIR}/moeo moeo/src
|
PATH_SUFFIXES include${INSTALL_SUB_DIR}/moeo moeo/src
|
||||||
PATHS ${PARADISEO_SRC_PATHS})
|
PATHS ${PARADISEO_SRC_PATHS})
|
||||||
|
|
||||||
|
# Specific for SMP
|
||||||
|
foreach(COMP ${PARADISEO_LIBRARIES_TO_FIND})
|
||||||
|
if(${COMP} STREQUAL "smp")
|
||||||
|
set(SMP_FOUND true)
|
||||||
|
find_path(SMP_INCLUDE_DIR smp
|
||||||
|
PATH_SUFFIXES include${INSTALL_SUB_DIR}/smp smp/src
|
||||||
|
PATHS ${PARADISEO_SRC_PATHS})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
set(PARADISEO_INCLUDE_DIR ${EO_INCLUDE_DIR} ${MO_INCLUDE_DIR} ${MOEO_INCLUDE_DIR})
|
if(SMP_FOUND)
|
||||||
|
set(PARADISEO_INCLUDE_DIR ${EO_INCLUDE_DIR} ${MO_INCLUDE_DIR} ${MOEO_INCLUDE_DIR} ${SMP_INCLUDE_DIR})
|
||||||
|
else()
|
||||||
|
set(PARADISEO_INCLUDE_DIR ${EO_INCLUDE_DIR} ${MO_INCLUDE_DIR} ${MOEO_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
# find the requested modules
|
# find the requested modules
|
||||||
set(PARADISEO_FOUND TRUE) # will be set to false if one of the required modules is not found
|
set(PARADISEO_FOUND true) # will be set to false if one of the required modules is not found
|
||||||
|
|
||||||
set(FIND_PARADISEO_LIB_PATHS
|
set(FIND_PARADISEO_LIB_PATHS
|
||||||
${PARADISEO_ROOT}/${BUILD_DIR}
|
${PARADISEO_ROOT}/${BUILD_DIR}
|
||||||
|
|
@ -94,6 +109,7 @@ set(PARADISEO_LIB_PATHS_SUFFIXES
|
||||||
mo/lib
|
mo/lib
|
||||||
moeo/lib
|
moeo/lib
|
||||||
moeo/tutorial/examples/flowshop/lib #For flowshop library
|
moeo/tutorial/examples/flowshop/lib #For flowshop library
|
||||||
|
smp/lib
|
||||||
lib
|
lib
|
||||||
lib32
|
lib32
|
||||||
lib64
|
lib64
|
||||||
|
|
@ -108,11 +124,11 @@ foreach(FIND_PARADISEO_COMPONENT ${PARADISEO_LIBRARIES_TO_FIND})
|
||||||
PATHS ${FIND_PARADISEO_LIB_PATHS})
|
PATHS ${FIND_PARADISEO_LIB_PATHS})
|
||||||
if (PARADISEO_${FIND_PARADISEO_COMPONENT_UPPER}_LIBRARY)
|
if (PARADISEO_${FIND_PARADISEO_COMPONENT_UPPER}_LIBRARY)
|
||||||
# library found
|
# library found
|
||||||
set(PARADISEO_${FIND_PARADISEO_COMPONENT_UPPER}_FOUND TRUE)
|
set(PARADISEO_${FIND_PARADISEO_COMPONENT_UPPER}_FOUND true)
|
||||||
else()
|
else()
|
||||||
# library not found
|
# library not found
|
||||||
set(PARADISEO_FOUND FALSE)
|
set(PARADISEO_FOUND false)
|
||||||
set(PARADISEO_${FIND_PARADISEO_COMPONENT_UPPER}_FOUND FALSE)
|
set(PARADISEO_${FIND_PARADISEO_COMPONENT_UPPER}_FOUND false)
|
||||||
set(FIND_PARADISEO_MISSING "${FIND_PARADISEO_MISSING} ${FIND_PARADISEO_COMPONENT}")
|
set(FIND_PARADISEO_MISSING "${FIND_PARADISEO_MISSING} ${FIND_PARADISEO_COMPONENT}")
|
||||||
endif()
|
endif()
|
||||||
set(PARADISEO_LIBRARIES ${PARADISEO_LIBRARIES} "${PARADISEO_${FIND_PARADISEO_COMPONENT_UPPER}_LIBRARY}")
|
set(PARADISEO_LIBRARIES ${PARADISEO_LIBRARIES} "${PARADISEO_${FIND_PARADISEO_COMPONENT_UPPER}_LIBRARY}")
|
||||||
|
|
@ -124,6 +140,9 @@ if(PARADISEO_FOUND)
|
||||||
message(${EO_INCLUDE_DIR})
|
message(${EO_INCLUDE_DIR})
|
||||||
message(${MO_INCLUDE_DIR})
|
message(${MO_INCLUDE_DIR})
|
||||||
message(${MOEO_INCLUDE_DIR})
|
message(${MOEO_INCLUDE_DIR})
|
||||||
|
if(${SMP_FOUND})
|
||||||
|
message(${SMP_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
# include directory or library not found
|
# include directory or library not found
|
||||||
message(FATAL_ERROR "Could NOT find ParadisEO (missing : ${FIND_PARADISEO_MISSING})")
|
message(FATAL_ERROR "Could NOT find ParadisEO (missing : ${FIND_PARADISEO_MISSING})")
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||||
### 0) If you want to set your variables in eo-conf.cmake and avoid the cmd line
|
### 0) If you want to set your variables in eo-conf.cmake and avoid the cmd line
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE(eo-conf.cmake OPTIONAL)
|
#INCLUDE(eo-conf.cmake OPTIONAL)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
|
|
@ -134,6 +134,6 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/eo.pc DESTINATION ${LIB}/pkgconfig COM
|
||||||
### 7) Include packaging
|
### 7) Include packaging
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
||||||
INCLUDE(Packaging.cmake)
|
#INCLUDE(Packaging.cmake)
|
||||||
|
|
||||||
######################################################################################
|
######################################################################################
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,3 @@ execute_process(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/t-data.dat
|
${CMAKE_CURRENT_SOURCE_DIR}/t-data.dat
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/t-data.dat)
|
${CMAKE_CURRENT_BINARY_DIR}/t-data.dat)
|
||||||
|
|
||||||
execute_process(
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/bench.sh
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/bench.sh)
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue