Reorganised the Elasticity sources into libraries to better facilitate reuse.

This also includes moving the GETBeam sources from the 3rdparty folder.
This commit is contained in:
Knut Morten Okstad
2016-01-24 16:54:14 +01:00
parent cd4a6e0150
commit 536ed75ae8
5 changed files with 15 additions and 36 deletions

View File

@@ -11,24 +11,32 @@ ENABLE_TESTING()
include_directories(${IFEM_INCLUDES})
SET(ORIG_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IFEM_CXX_FLAGS}")
if(NOT IFEM_AS_SUBMODULE)
IF(NOT IFEM_AS_SUBMODULE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPROFILE_LEVEL=2")
endif()
ENDIF(NOT IFEM_AS_SUBMODULE)
SET(EXECUTABLE_OUTPUT_PATH bin)
SET(IFEM_COMMON_APP_BUILD 1)
ADD_SUBDIRECTORY(Common)
ADD_SUBDIRECTORY(Poisson)
ADD_SUBDIRECTORY(AdvectionDiffusion)
add_subdirectory(Darcy)
ADD_SUBDIRECTORY(Elasticity/Linear)
ADD_SUBDIRECTORY(Elasticity/Dynamic)
ADD_SUBDIRECTORY(Darcy)
ADD_SUBDIRECTORY(Elasticity)
ADD_SUBDIRECTORY(Elasticity/Beam)
ADD_SUBDIRECTORY(Elasticity/BeamEx)
ADD_SUBDIRECTORY(Elasticity/FiniteDeformation)
ADD_SUBDIRECTORY(Elasticity/Linear)
ADD_SUBDIRECTORY(Elasticity/Nonlinear)
ADD_SUBDIRECTORY(Elasticity/BeamSim)
ADD_SUBDIRECTORY(FSWallDistance)
ADD_SUBDIRECTORY(PoroElasticity)
ADD_SUBDIRECTORY(Stokes)
ADD_SUBDIRECTORY(ThermoElasticity)
ADD_SUBDIRECTORY(FractureDynamics)
ADD_SUBDIRECTORY(FSWallDistance)
ADD_SUBDIRECTORY(Stokes)
ADD_SUBDIRECTORY(HDF5toVTx)
# Add 'check' target which builds all test applications, then executes the tests

View File

@@ -1,6 +1,7 @@
PROJECT(IFEM)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(IFEM_VERSION_MAJOR 0)
SET(IFEM_VERSION_MINOR 9)
SET(IFEM_VERSION_PATCH 0)
@@ -103,11 +104,6 @@ TARGET_LINK_LIBRARIES(IFEM ${IFEM_DEPLIBS})
SET_TARGET_PROPERTIES(IFEM PROPERTIES VERSION ${IFEM_VERSION}
SOVERSION ${IFEM_ABI_VERSION})
IF(IFEM_USE_GETBEAM)
FILE(GLOB_RECURSE GETB_SRCS ${PROJECT_SOURCE_DIR}/3rdparty/GETBeam/*.f)
ADD_LIBRARY(GETBeam ${GETB_SRCS})
ENDIF(IFEM_USE_GETBEAM)
# For generating the doxy
ADD_CUSTOM_TARGET(lib_doc doxygen ${PROJECT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}

View File

@@ -60,9 +60,6 @@ IF(IFEM_PATH OR IFEM_AS_SUBMODULE)
ADD_SUBDIRECTORY(${IFEM_PATH} IFEM.dir)
INCLUDE(${CMAKE_BINARY_DIR}/IFEM.dir/IFEMFlags.cmake)
SET(IFEM_LIBRARIES IFEM)
IF(IFEM_USE_GETBEAM)
set(IFEM_LIBRARIES ${IFEM_LIBRARIES} GETBeam)
ENDIF(IFEM_USE_GETBEAM)
ELSE(IFEM_AS_SUBMODULE)
# Build is in-tree
MESSAGE(STATUS "Using in-tree IFEM")
@@ -92,18 +89,6 @@ IF(IFEM_PATH OR IFEM_AS_SUBMODULE)
SET(IFEM_INCLUDES ${IFEM_INCLUDES}
${IFEM_PATH}/3rdparty/tinyxml)
ENDIF(NOT IFEM_USE_SYSTEM_TINYXML)
IF(IFEM_USE_GETBEAM)
FIND_LIBRARY(GETB_LIBRARIES
NAMES GETBeam
PATHS ${IFEM_PATH}/${IFEM_BUILD_TYPE}/lib
${IFEM_PATH}/lib
NO_DEFAULT_PATH)
IF(GETB_LIBRARIES)
SET(IFEM_LIBRARIES ${IFEM_LIBRARIES} ${GETB_LIBRARIES})
ELSE(GETB_LIBRARIES)
SET(IFEM_USE_GETBEAM OFF)
ENDIF(GETB_LIBRARIES)
ENDIF(IFEM_USE_GETBEAM)
set(IFEM_LIBRARIES ${IFEM_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
ENDIF(IFEM_AS_SUBMODULE)
add_custom_target(check-commits

View File

@@ -195,15 +195,6 @@ IF(IFEM_USE_OPENMP)
ENDIF(OPENMP_FOUND)
ENDIF(IFEM_USE_OPENMP)
# Geometrically exact Timoshenko beam
IF(IFEM_USE_GETBEAM)
if ("${IFEM_USE_GETBEAM}" STREQUAL "ON")
set(IFEM_USE_GETBEAM 1)
endif()
SET(IFEM_CXX_FLAGS "${IFEM_CXX_FLAGS} -DHAS_GETBEAM=${IFEM_USE_GETBEAM}")
SET(IFEM_BUILD_CXX_FLAGS "${IFEM_BUILD_CXX_FLAGS} -DHAS_GETBEAM=${IFEM_USE_GETBEAM}")
ENDIF(IFEM_USE_GETBEAM)
# Portability issues
include(CheckFunctionExists)
set(CMAKE_REQUIRED_DEFINITIONS)

View File

@@ -9,7 +9,6 @@ OPTION(IFEM_USE_SPR "Compile with SPR support?" OFF)
OPTION(IFEM_USE_SAMG "Compile with SAMG support?" OFF)
OPTION(IFEM_USE_HDF5 "Compile with HDF5 support?" ON)
OPTION(IFEM_USE_VTFWRITER "Compile with VTFWriter support?" ON)
OPTION(IFEM_USE_GETBEAM "Compile with Timoshenko beam element?" OFF)
OPTION(IFEM_AS_SUBMODULE "Compile IFEM as a submodule of apps?" OFF)
OPTION(IFEM_WHOLE_PROG_OPTIM "Compile IFEM with link-time optimizations?" OFF)
OPTION(IFEM_TEST_MEMCHECK "Run tests through valgrind?" OFF)