Commit 8996a6f0 authored by Gilles MARCKMANN's avatar Gilles MARCKMANN

Updates the CMakeLists.txt to take into account the new_cmake modifications...

Updates the CMakeLists.txt to take into account the new_cmake modifications and the REQUIRED option in the find_package()
parent 89ca0c12
cmake_minimum_required(VERSION 2.6)
message(STATUS "----------------------")
message(STATUS "=================== --")
message(STATUS "PROJECT: TLSDuctile --")
message(STATUS "----------------------")
message(STATUS "=================== --")
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../Xfiles/Util/cmakeUtil/)
include(common_functions)
include(devel_common_functions)
project(TLSDuctile CXX C)
# BEGIN options and parameters
#================================================================================
#ADDITIONAL OPTIONS
#================================================================================
option(TLSDUCTILE_ATOMIC_TEST "include atomic test" OFF)
option(TLSDUCTILE_TEST_DAM "include test dam" ON )
option(TLSDUCTILE_TEST_DYN "include test dyn" OFF)
option(TLSDUCTILE_TEST_PLAST "include test plast" OFF)
option(TLSDUCTILE_TEST_ANIMESH_DAM "include test animesh dam" OFF)
option(TLSDUCTILE_TEST_INFINITE_DAM "include test infinite dam" OFF)
option(FASTMARCHINGINTERFACE "include FastMarchingInterface" ON )
# END
option(TLSDUCTILE_ATOMIC_TEST "include atomic test" OFF)
option(TLSDUCTILE_TEST_DAM "include test dam" ON)
option(TLSDUCTILE_TEST_DYN "include test dyn" OFF)
option(TLSDUCTILE_TEST_PLAST "include test plast" OFF)
option(TLSDUCTILE_TEST_ANIMESH_DAM "include test animesh dam" OFF)
option(TLSDUCTILE_TEST_INFINITE_DAM "include test infinite dam" OFF)
option(FASTMARCHINGINTERFACE "include FastMarchingInterface" ON)
# END
# --------------------------------------------
# setting cxx_compiler following chosen option
# --------------------------------------------
set_cxx_compiler(EXTERNAL_INCLUDES EXTERNAL_LIBRARIES)
project(TLSDuctile)
set(BUILD_LIBS "SHARED")
# set(CXXFLAGS "-Wall -Wno-deprecated")
set(CXXFLAGS "-Wno-deprecated")
# set(CXXFLAGS "-Wno-deprecated -g")
# set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -g")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -g")
# set(CXXFLAGS "-Wno-deprecated -pg")
# set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
find_devroot(DEVROOT)
define_archos_suffixe(ARCHOS)
find_package(EXLIBRISTYPES)
find_package(EXLIBRISTOOLS)
find_package(AOMDInterfaceGeneral)
find_package(DISTMESH)
find_package(Trellis)
find_package(Xinterfaces)
find_package(Xfem)
find_package(Xext)
find_package(Geom)
find_package(xTLS)
find_package(ANN)
#find_package(CGAL)
find_package(BLAS2)
find_package(LAPACK2)
find_package(METIS)
find_package(EXLIBRISTYPES REQUIRED )
find_package(EXLIBRISTOOLS REQUIRED)
find_package(XAOMDInterfaceGeneral REQUIRED)
find_package(DISTMESH REQUIRED )
find_package(Trellis REQUIRED )
find_package(SolverBase REQUIRED )
find_package(InterfaceLapack REQUIRED )
find_package(InterfaceSuperLu REQUIRED )
find_package(InterfaceTaucs REQUIRED )
find_package(Xfem REQUIRED )
find_package(Xext REQUIRED )
find_package(Geom REQUIRED )
find_package(xTLS REQUIRED )
find_package(Xcut REQUIRED )
find_package(ANN REQUIRED )
find_package(CGAL REQUIRED )
find_package(BLAS2 REQUIRED )
find_package(LAPACK2 REQUIRED )
find_package(METIS REQUIRED )
file(GLOB SOURCES src/*)
list(APPEND EXTERNAL_INCLUDES
${EXLIBRISTYPES_INCLUDE_DIR}
${EXLIBRISTOOLS_INCLUDE_DIR}
${AOMDIG_INCLUDE_DIR}
${XAOMDInterfaceGeneral_INCLUDE_DIR}
${DISTMESH_INCLUDE_DIR}
${TRELLIS_INCLUDE_DIR}
${XINTERFACES_INCLUDE_DIR}
${SolverBase_INCLUDE_DIR}
${SuperLu_INCLUDE_DIR}
${Taucs_INCLUDE_DIR}
${Lapack_INCLUDE_DIR}
${InterfaceSuperLu_INCLUDE_DIR}
${InterfaceTaucs_INCLUDE_DIR}
${InterfaceLapack_INCLUDE_DIR}
${XFEM_INCLUDE_DIR}
${XEXT_INCLUDE_DIR}
${GEOM_INCLUDE_DIR}
# ${CGAL_INCLUDE_DIR}
# ${CGAL_INCLUDE_DIR}
${xTLS_INCLUDE_DIR}
${PARMETIS_INCLUDE_DIR}
src
${MPI_CXX_INCLUDE_PATH}
)
list(APPEND EXTERNAL_LIBRARIES
TLSDuctile
${xTLS_LIBRARIES}
${XCUT_LIBRARIES}
${XEXT_LIBRARIES}
${GEOM_LIBRARIES}
${XFEM_LIBRARIES}
${TRELLIS_LIBRARIES}
${SolverBase_LIBRARIES}
${Lapack_LIBRARIES}
${InterfaceLapack_LIBRARIES}
${LAPACK_LIBRARIES}
${BLAS_LIBRARIES}
${SuperLu_LIBRARIES}
${InterfaceSuperLu_LIBRARIES}
${SUPERLU_LIBRARIES}
${Taucs_LIBRARIES}
${InterfaceTaucs_LIBRARIES}
${TAUCS_LIBRARIES}
${PARMETIS_LIBRARIES}
${METIS_LIBRARIES}
${ANN_LIBRARIES}
${DISTMESH_LIBRARIES}
${EXLIBRISTOOLS_LIBRARIES}
# ${CGAL_LIBRARIES}
)
${MPI_CXX_LIBRARIES}
${CGAL_LIBRARIES}
)
if(FASTMARCHINGINTERFACE)
add_definitions(-DHAVE_FASTMARCHING)
find_package(FastMarching)
find_package(FastMarching REQUIRED )
list(APPEND EXTERNAL_INCLUDES ${FASTMARCHING_INCLUDE_DIR})
# list(APPEND EXTERNAL_LIBRARIES ${FASTMARCHING_LIBRARIES})
set(CXXFLAGS "${CXXFLAGS} -std=c++11")
endif(FASTMARCHINGINTERFACE)
add_library(TLSDuctile ${BUILD_LIBS} ${SOURCES})
include_directories(${EXTERNAL_INCLUDES})
set_target_properties(TLSDuctile PROPERTIES COMPILE_FLAGS "${CXXFLAGS}" LINKER_LANGUAGE CXX)
if(TLSDUCTILE_ATOMIC_TEST)
......
......@@ -24,6 +24,11 @@ public:
for_each(values.begin(), values.end(), [&scal](double & val){ val*= scal;} );
return *this;
}
modesValues & operator/=(const double &scal){
for_each(values.begin(), values.end(), [&scal](double & val){ val/= scal;} );
return *this;
}
modesValues & operator+=(const modesValues &in){
transform( values.begin(), values.end(), in.values.begin(), values.begin(), [] (double val1, double val2 ){return val1+val2;});
return *this;
......@@ -42,6 +47,10 @@ public:
friend modesValues operator*(modesValues rhs, const double &lhs){
return rhs *= lhs;
}
friend modesValues operator/(modesValues rhs, const double &lhs){
return rhs /= lhs;
}
std::vector<double> values;
private :
};
......
cmake_minimum_required(VERSION 2.6)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../Xfiles/Util/cmakeUtil/)
include(common_functions)
include(devel_common_functions)
enable_testing()
......
Markdown is supported
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