Minor changes in cmake files

git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@860 e10b68d5-8a6e-419e-a041-bce267b0401d
This commit is contained in:
kmo
2011-03-08 09:23:44 +00:00
committed by Knut Morten Okstad
parent c945dc92a8
commit 3a4e4215e8
5 changed files with 39 additions and 86 deletions

View File

@@ -47,9 +47,6 @@ IF(${ENABLE_SAMG})
ENDIF(${ENABLE_SAMG})
FIND_PACKAGE(VTFWriter)
# Required include directories
SET(INCLUDES ${IFEM_INCLUDES} ${PROJECT_SOURCE_DIR}/../LinearElasticity)
# Required libraries
SET(DEPLIBS ${IFEM_LIBRARIES}
${GoTrivariate_LIBRARIES} ${GoTools_LIBRARIES}
@@ -82,18 +79,17 @@ IF(VTFWRITER_LIBRARIES)
SET(DEPLIBS ${DEPLIBS} ${VTFWRITER_LIBRARIES})
ENDIF(VTFWRITER_LIBRARIES)
INCLUDE_DIRECTORIES(${INCLUDES})
INCLUDE_DIRECTORIES(${IFEM_INCLUDES} ${PROJECT_SOURCE_DIR}/../LinearElasticity)
SET(EXECUTABLE_OUTPUT_PATH bin)
# This line may be needed only on AMD 64 bit... @jbt
# 091120: Adding this because GUV-plugins will need it. (J.O.)
IF(NOT WIN32)
# Emit position-independent code, suitable for dynamic linking
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
# Enable all warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
ENDIF(NOT WIN32)
# Enable all warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
FILE(GLOB_RECURSE NonLinEl_SRCS
${PROJECT_SOURCE_DIR}/../LinearElasticity/SIMLinEl*.C
${PROJECT_SOURCE_DIR}/*.[Cf])

View File

@@ -76,16 +76,16 @@ IF(PETSC_LIBRARIES AND PETSC_INCLUDE_DIR)
SET(DEPLIBS ${DEPLIBS} ${PETSC_LIBRARIES})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_PETSC")
IF(${ENABLE_PARALLEL_PETSC})
FIND_PACKAGE(MPI REQUIRED)
SET(INCLUDES ${INCLUDES} ${MPI_INCLUDE_PATH})
SET(DEPLIBS ${DEPLIBS} ${MPI_LIBRARIES})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPARALLEL_PETSC")
FIND_PACKAGE(MPI REQUIRED)
SET(INCLUDES ${INCLUDES} ${MPI_INCLUDE_PATH})
SET(DEPLIBS ${DEPLIBS} ${MPI_LIBRARIES})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPARALLEL_PETSC")
ENDIF(${ENABLE_PARALLEL_PETSC})
FIND_PACKAGE(SLEPc)
IF(SLEPC_LIBRARIES AND SLEPC_INCLUDES)
SET(INCLUDES ${INCLUDES} ${SLEPC_INCLUDES})
SET(DEPLIBS ${DEPLIBS} ${SLEPC_LIBRARIES})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_SLEPC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAS_SLEPC")
ENDIF(SLEPC_LIBRARIES AND SLEPC_INCLUDES)
ENDIF(PETSC_LIBRARIES AND PETSC_INCLUDE_DIR)
@@ -106,20 +106,17 @@ INCLUDE_DIRECTORIES(${INCLUDES})
SET(EXECUTABLE_OUTPUT_PATH bin)
SET(LIBRARY_OUTPUT_PATH lib)
# This line may be needed only on AMD 64 bit... @jbt
# 091120: Adding this because GUV-plugins will need it. (J.O.)
IF(NOT WIN32)
# Emit position-independent code, suitable for dynamic linking
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
# Enable all warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-parentheses")
ENDIF(NOT WIN32)
# Enable all warnings
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
# Make the IFEM library
FILE(GLOB_RECURSE IFEM_SRCS ${PROJECT_SOURCE_DIR}/src/*.[Cf])
ADD_LIBRARY(IFEM ${IFEM_SRCS})
#TARGET_LINK_LIBRARIES(IFEM ${DEPLIBS})
# Make the Apps
FILE(GLOB_RECURSE Poisson_SRCS ${PROJECT_SOURCE_DIR}/Apps/Poisson/*.C)

View File

@@ -1,43 +1,24 @@
# - Tries to find the GoTools Core library
#
# Written by: jan.b.thomassen@sintef.no
#
IF(GoTools_INCLUDE_DIRS AND GoTools_LIBRARIES)
SET(GoTools_FIND_QUIETLY TRUE)
ENDIF(GoTools_INCLUDE_DIRS AND GoTools_LIBRARIES)
# 'GoTools_BUILD_ALL' will be defined in the top-level CMakeLists.txt
# file if we are building all of GoTools in one project.
IF(GoTools_BUILD_ALL)
# Header files
SET(GoTools_INCLUDE_DIRS ${GoToolsCore_SOURCE_DIR}/include
CACHE PATH "Path to GoTools Core header files")
# Library
SET(GoTools_LIBRARIES GoToolsCore
CACHE FILE "GoTools Core library")
ENDIF(GoTools_BUILD_ALL)
# Find header files
FIND_PATH(GoTools_INCLUDE_DIRS "GoTools/geometry/SplineSurface.h"
/sima/libs/GoTools/include
"$ENV{HOME}/include"
FIND_PATH(GoTools_INCLUDE_DIRS
NAMES GoTools/geometry/SplineSurface.h
PATHS "$ENV{HOME}/include"
"$ENV{HOME}/install/include"
"C:/Program Files (x86)/GoTools/include"
)
/sima/libs/GoTools/include
)
# Find library
FIND_LIBRARY(GoTools_LIBRARIES
NAMES GoToolsCore
NAMES GoToolsCore
PATHS "$ENV{HOME}/lib"
"$ENV{HOME}/install/lib"
"C:/Program Files (x86)/GoTools/lib"
/sima/libs/GoTools/lib
PATH_SUFFIXES GoTools
)
)
# Check that we have found everything
SET(GoTools_FOUND FALSE)
IF(GoTools_INCLUDE_DIRS AND GoTools_LIBRARIES)
SET(GoTools_FOUND TRUE)
ENDIF(GoTools_INCLUDE_DIRS AND GoTools_LIBRARIES)
INCLUDE(FindPackageHandleStandardArgs)
IF(GoTools_LIBRARIES)
find_package_handle_standard_args(GoTools DEFAULT_MSG
GoTools_INCLUDE_DIRS GoTools_LIBRARIES)
ENDIF(GoTools_LIBRARIES)

View File

@@ -1,43 +1,24 @@
# - Tries to find the GoTools Trivariate library
#
# Written by: jan.b.thomassen@sintef.no
#
IF(GoTrivariate_INCLUDE_DIRS AND GoTrivariate_LIBRARIES)
SET(GoTrivariate_FIND_QUIETLY TRUE)
ENDIF(GoTrivariate_INCLUDE_DIRS AND GoTrivariate_LIBRARIES)
# 'GoTools_BUILD_ALL' will be defined in the top-level CMakeLists.txt
# file if we are building all of GoTools in one project.
IF(GoTools_BUILD_ALL)
# Header files
SET(GoTrivariate_INCLUDE_DIRS ${GoTrivariate_SOURCE_DIR}/include
CACHE PATH "Path to GoTools Trivariate header files")
# Library
SET(GoTrivariate_LIBRARIES GoTrivariate
CACHE FILE "GoTools Trivariate library")
ENDIF(GoTools_BUILD_ALL)
# Find header files
FIND_PATH(GoTrivariate_INCLUDE_DIRS
"GoTools/trivariate/SplineVolume.h"
"$ENV{HOME}/include"
FIND_PATH(GoTrivariate_INCLUDE_DIRS
NAMES GoTools/trivariate/SplineVolume.h
PATHS "$ENV{HOME}/include"
"$ENV{HOME}/install/include"
"/usr/local/include"
/sima/libs/GoTools/include
"C:/Program Files (x86)/GoTools/include"
)
# Find library
FIND_LIBRARY(GoTrivariate_LIBRARIES
NAMES GoTrivariate
PATHS "$ENV{HOME}/lib"
"$ENV{HOME}/install/lib"
"C:/Program Files (x86)/GoTools/lib"
"/usr/local/lib"
/sima/libs/GoTools/lib
PATH_SUFFIXES GoTools
)
# Check that we have found everything
SET(GoTrivariate_FOUND FALSE)
IF(GoTrivariate_INCLUDE_DIRS AND GoTrivariate_LIBRARIES)
SET(GoTrivariate_FOUND TRUE)
ENDIF(GoTrivariate_INCLUDE_DIRS AND GoTrivariate_LIBRARIES)
INCLUDE(FindPackageHandleStandardArgs)
IF(GoTrivariate_LIBRARIES)
find_package_handle_standard_args(GoTrivariate DEFAULT_MSG
GoTrivariate_INCLUDE_DIRS GoTrivariate_LIBRARIES)
ENDIF(GoTrivariate_LIBRARIES)

View File

@@ -49,5 +49,3 @@ ENDIF(IFEM_INCLUDES)
INCLUDE(FindPackageHandleStandardArgs)
find_package_handle_standard_args(IFEM DEFAULT_MSG
IFEM_INCLUDES IFEM_LIBRARIES)
MARK_AS_ADVANCED(IFEM_INCLUDES IFEM_LIBRARIES)