Commit 297718b9 authored by Alexis SALZMAN's avatar Alexis SALZMAN
Browse files

cmake: Introduce boost path+somme path+MYENV corection

This commit is in the continuation of GemUtil commit 12aa2c6. It use a
BOOST_SPECIAL_INCLUDE_PATH variable in Xfem and SplitMesh/test to force
usage of a boost library in a non conventional location.
This have to be spread all around in eXlibris.
It replace properly what was done in eXlibrisType.
Boost version checking mechanism may have to be adapted.

Somme path are added to path (mainly DEVROOT/External/ include and lib)

For MYENV there was missing path in previous commit on the subject.
parent 2e94963f
Pipeline #109 skipped
......@@ -12,6 +12,7 @@ set_cxx_compiler(EXTERNAL_INCLUDES EXTERNAL_LIBRARIES)
project(atomic-spiltmesh)
enable_testing()
list(APPEND EXTERNAL_INCLUDES ${BOOST_SPECIAL_INCLUDE_PATH})
find_and_set(EXLIBRISTYPES EXLIBRISTYPES EXTERNAL_INCLUDES NOTHING)
find_and_set(EXLIBRISTOOLS EXLIBRISTOOLS EXTERNAL_INCLUDES EXTERNAL_LIBRARIES)
find_and_set(AOMDInterfaceGeneral AOMDIG EXTERNAL_INCLUDES NOTHING)
......
......@@ -21,6 +21,7 @@ find_library(ANN_LIBRARIES ANN ann
HINTS /usr/lib
${DEVROOT}/ExternalLib/ann/lib/*
${DEVROOT}/ExternalLib/ann/lib/
${DEVROOT}/ExternalLib/lib
${DISTROOT}/ExternalLib/ann/lib/*
${DISTROOT}/ExternalLib/ann/lib/
${DEVROOT}/eXternalLib/lib
......@@ -41,9 +42,10 @@ else()
HINTS /usr/local/ExternalLib/gcc/include/ANN
${DEVROOT}/ExternalLib/ann/lib/*
${DEVROOT}/ExternalLib/ann/lib/
${DEVROOT}/ExternalLib/ann/lib
${DEVROOT}/ExternalLib/lib
${DEVROOT}/ExternalLib/ann/*
${DEVROOT}/ExternalLib/ann/*/*
${DEVROOT}/ExternalLib/lib
${DEVROOT}/eXternalLib/*/lib
${DEVROOT}/eXternalLib/lib
)
......@@ -52,8 +54,9 @@ else()
else()
message(" ANN found as ${ANN_LIBRARIES}" )
find_path(ANN_INCLUDE_DIR ANN/ANN.h
HINTS
HINTS
${DEVROOT}/ExternalLib/ann/include
${DEVROOT}/ExternalLib/include
${DEVROOT}/eXternalLib/include
${DEVROOT}/eXternalLib/ann*/include
)
......
......@@ -79,6 +79,7 @@ if(USE_PARMETIS)
find_library(PARMETIS_LIBRARIES parmetis
PATH_SUFFIXES parmetis lib lib64
HINTS /usr/local/ExternalLib/gcc/${MPI_IMPLEMENTATION}/*
${DEVROOT}/ExternalLib/lib
${DEVROOT}/ExternalLib/parmetis/*
# ${DISTROOT}/ExternalLib/parmetis/*
)
......@@ -86,6 +87,7 @@ if(USE_PARMETIS)
find_path(PARMETIS_INCLUDE_DIR parmetis.h
HINTS ${PARMETIS_LIBRARIES}/../../include/parmetis
/usr/local/ExternalLib/gcc/${MPI_IMPLEMENTATION}/include/
${DEVROOT}/ExternalLib/include
${DEVROOT}/ExternalLib/parmetis/*
# ${DISTROOT}/ExternalLib/parmetis/*
)
......
......@@ -34,7 +34,7 @@ if(NOT MUMPS_LIBRARIES OR NOT MUMPS_INCLUDE_DIR )
set(MUMPS_LIBRARIES )
set(PACKAGE_DIR
/usr/local/ExternalLib/gcc/${MPI_IMPLEMENTATION}/lib64
${DEVROOT}/ExternalLib/Solver/lib
${DEVROOT}/ExternalLib/lib
${DEVROOT}/ExternalLib/Solver/lib/*
${DISTROOT}/ExternalLib/Solver/lib/*
/usr/*
......@@ -51,7 +51,7 @@ if(NOT MUMPS_LIBRARIES OR NOT MUMPS_INCLUDE_DIR )
find_path(MUMPS_INCLUDE_DIR dmumps_c.h
PATHS
/usr/local/ExternalLib/gcc/${MPI_IMPLEMENTATION}/include/mumps
${DEVROOT}/ExternalLib/Solver/include
${DEVROOT}/ExternalLib/include
${DEVROOT}/ExternalLib/Solver/lib/*
${DISTROOT}/ExternalLib/Solver/lib/*
/usr/*
......
......@@ -25,6 +25,7 @@ if(NOT SCOTCH_LIBRARIES)
set(PACKAGE_DIR
/usr/local/ExternalLib/gcc/${MPI_IMPLEMENTATION}/lib64
/usr/local/ExternalLib/gcc/lib64
${DEVROOT}/ExternalLib/lib
${DEVROOT}/ExternalLib/Solver/lib/*
${DISTROOT}/ExternalLib/Solver/lib/*
/usr/*lib64
......@@ -82,6 +83,7 @@ if(NOT SCOTCH_INCLUDE_DIR )
PATHS
/usr/local/ExternalLib/gcc/${MPI_IMPLEMENTATION}/include/scotch
/usr/local/ExternalLib/gcc/${MPI_IMPLEMENTATION}/include/ptscotch
${DEVROOT}/ExternalLib/include
${DEVROOT}/ExternalLib/Solver/lib/*
${DISTROOT}/ExternalLib/Solver/lib/*
/usr/*include
......
......@@ -267,6 +267,7 @@ function(create_tests_from_list)
set(MYTEST_PATH ${DEVROOT}/mytest/${testname})
else()
set(TARGET_NAME ${testname})
set(MYTEST_PATH ${CMAKE_CURRENT_BINARY_DIR}/${testname})
endif()
if(EXISTS ${test}/main.cc OR EXISTS ${test}/main.cpp)
message(" -- create test : ${TARGET_NAME} ")
......@@ -295,9 +296,9 @@ function(create_tests_from_list)
endif()
add_custom_command(TARGET "${TARGET_NAME}"
COMMAND bash ${DEVROOT}/Xfiles/Util/cmakeUtil/do_link.sh ${CMAKE_CURRENT_SOURCE_DIR}/${testname}/data ${CMAKE_CURRENT_BINARY_DIR}/${testname}/data)
COMMAND bash ${DEVROOT}/Xfiles/Util/cmakeUtil/do_link.sh ${CMAKE_CURRENT_SOURCE_DIR}/${testname}/data ${MYTEST_PATH}/data)
add_custom_command(TARGET "${TARGET_NAME}"
COMMAND bash ${DEVROOT}/Xfiles/Util/cmakeUtil/do_link.sh ${CMAKE_CURRENT_SOURCE_DIR}/${testname}/reference ${CMAKE_CURRENT_BINARY_DIR}/${testname}/reference)
COMMAND bash ${DEVROOT}/Xfiles/Util/cmakeUtil/do_link.sh ${CMAKE_CURRENT_SOURCE_DIR}/${testname}/reference ${MYTEST_PATH}/reference)
endif()
add_subdirectory(${testname})
......
......@@ -57,7 +57,7 @@ find_package(Trellis)
find_package(Boost)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/Boost_Version.info "${Boost_VERSION}")
include_directories(${EXLIBRISTYPES_INCLUDE_DIR} ${INCLUDES_DIR} ${TRELLIS_INCLUDE_DIR} ${EXLIBRISTOOLS_INCLUDE_DIR} ${AOMDIG_INCLUDE_DIR} ${SolverBase_INCLUDE_DIR} ${Lapack_INCLUDE_DIR} )
include_directories(${BOOST_SPECIAL_INCLUDE_PATH} ${EXLIBRISTYPES_INCLUDE_DIR} ${INCLUDES_DIR} ${TRELLIS_INCLUDE_DIR} ${EXLIBRISTOOLS_INCLUDE_DIR} ${AOMDIG_INCLUDE_DIR} ${SolverBase_INCLUDE_DIR} ${Lapack_INCLUDE_DIR} )
set_target_properties(Xfem PROPERTIES COMPILE_FLAGS "-Wno-deprecated ${FLAGS}" )
target_link_libraries(Xfem ${ANN_LIBRARIES} )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment