Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
8c98cdb7
Commit
8c98cdb7
authored
14 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
add missing petsc link libs
parent
f3c7b855
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+38
-29
38 additions, 29 deletions
CMakeLists.txt
with
38 additions
and
29 deletions
CMakeLists.txt
+
38
−
29
View file @
8c98cdb7
...
@@ -44,7 +44,7 @@ option(ENABLE_NETGEN "Enable Netgen mesh generator" ON)
...
@@ -44,7 +44,7 @@ option(ENABLE_NETGEN "Enable Netgen mesh generator" ON)
option
(
ENABLE_OCC
"Enable Open CASCADE geometrical models"
ON
)
option
(
ENABLE_OCC
"Enable Open CASCADE geometrical models"
ON
)
option
(
ENABLE_OSMESA
"Use OSMesa for offscreen rendering"
OFF
)
option
(
ENABLE_OSMESA
"Use OSMesa for offscreen rendering"
OFF
)
option
(
ENABLE_PARSER
"Build the GEO file parser"
ON
)
option
(
ENABLE_PARSER
"Build the GEO file parser"
ON
)
option
(
ENABLE_PETSC
"Enable PETSc linear algebra solvers"
O
FF
)
option
(
ENABLE_PETSC
"Enable PETSc linear algebra solvers"
O
N
)
option
(
ENABLE_PLUGINS
"Build the post-processing plugins"
ON
)
option
(
ENABLE_PLUGINS
"Build the post-processing plugins"
ON
)
option
(
ENABLE_POST
"Build the post-processing module"
ON
)
option
(
ENABLE_POST
"Build the post-processing module"
ON
)
option
(
ENABLE_QT
"Build QT GUI"
OFF
)
option
(
ENABLE_QT
"Build QT GUI"
OFF
)
...
@@ -463,13 +463,17 @@ if(ENABLE_GMM)
...
@@ -463,13 +463,17 @@ if(ENABLE_GMM)
endif
(
ENABLE_GMM
)
endif
(
ENABLE_GMM
)
if
(
ENABLE_KBIPACK
)
if
(
ENABLE_KBIPACK
)
add_subdirectory
(
contrib/kbipack
)
include_directories
(
contrib/kbipack
)
set_config_option
(
HAVE_KBIPACK
"Kbipack"
)
find_library
(
GMP_LIB NAMES gmp
)
find_library
(
GMP_LIB NAMES gmp
)
if
(
GMP_LIB
)
if
(
GMP_LIB
)
set_config_option
(
HAVE_GMP
"GMP"
)
find_path
(
GMP_INC
"gmp.h"
PATH_SUFFIXES src include
)
list
(
APPEND EXTERNAL_LIBRARIES
${
GMP_LIB
}
)
if
(
GMP_INC
)
set_config_option
(
HAVE_GMP
"GMP"
)
list
(
APPEND EXTERNAL_LIBRARIES
${
GMP_LIB
}
)
list
(
APPEND EXTERNAL_INCLUDES
${
GMP_INC
}
)
add_subdirectory
(
contrib/kbipack
)
include_directories
(
contrib/kbipack
)
set_config_option
(
HAVE_KBIPACK
"Kbipack"
)
endif
(
GMP_INC
)
endif
(
GMP_LIB
)
endif
(
GMP_LIB
)
endif
(
ENABLE_KBIPACK
)
endif
(
ENABLE_KBIPACK
)
...
@@ -479,17 +483,6 @@ if(ENABLE_MATHEX)
...
@@ -479,17 +483,6 @@ if(ENABLE_MATHEX)
set_config_option
(
HAVE_MATHEX
"MathEx"
)
set_config_option
(
HAVE_MATHEX
"MathEx"
)
endif
(
ENABLE_MATHEX
)
endif
(
ENABLE_MATHEX
)
if
(
ENABLE_MPI
)
find_package
(
MPI
)
if
(
MPI_FOUND
)
set_config_option
(
HAVE_MPI
"MPI"
)
list
(
APPEND EXTERNAL_INCLUDES
${
MPI_INCLUDE_DIR
}
)
list
(
APPEND EXTERNAL_LIBRARIES
${
MPI_LIBRARIES
}
)
include
(
CMakeForceCompiler
)
cmake_force_cxx_compiler
(
${
MPI_COMPILER
}
"MPI C++ Compiler"
)
endif
(
MPI_FOUND
)
endif
(
ENABLE_MPI
)
if
(
ENABLE_MPEG_ENCODE
)
if
(
ENABLE_MPEG_ENCODE
)
add_subdirectory
(
contrib/mpeg_encode
)
add_subdirectory
(
contrib/mpeg_encode
)
include_directories
(
contrib/mpeg_encode/headers
)
include_directories
(
contrib/mpeg_encode/headers
)
...
@@ -612,6 +605,7 @@ if(ENABLE_PETSC)
...
@@ -612,6 +605,7 @@ if(ENABLE_PETSC)
set
(
ENV_PETSC_ARCH $ENV{PETSC_ARCH}
)
set
(
ENV_PETSC_ARCH $ENV{PETSC_ARCH}
)
if
(
EXISTS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/conf/petscvariables
)
if
(
EXISTS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/conf/petscvariables
)
set_config_option
(
HAVE_PETSC
"PETSc"
)
set_config_option
(
HAVE_PETSC
"PETSc"
)
set_config_option
(
HAVE_MPI
"MPI"
)
file
(
STRINGS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/conf/petscvariables
file
(
STRINGS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/conf/petscvariables
PETSC_VARIABLES NEWLINE_CONSUME
)
PETSC_VARIABLES NEWLINE_CONSUME
)
# find include directories
# find include directories
...
@@ -621,26 +615,31 @@ if(ENABLE_PETSC)
...
@@ -621,26 +615,31 @@ if(ENABLE_PETSC)
${
PETSC_VARIABLES
}
)
${
PETSC_VARIABLES
}
)
string
(
REPLACE
"PACKAGES_INCLUDES = "
""
PETSC_PACKAGES_INCLUDES
string
(
REPLACE
"PACKAGES_INCLUDES = "
""
PETSC_PACKAGES_INCLUDES
${
PETSC_PACKAGES_INCLUDES
}
)
${
PETSC_PACKAGES_INCLUDES
}
)
if
(
PETSC_PACKAGES_INCLUDES
)
if
(
PETSC_PACKAGES_INCLUDES
)
string
(
REPLACE
"-I"
""
PETSC_PACKAGES_INCLUDES
${
PETSC_PACKAGES_INCLUDES
}
)
string
(
REPLACE
"-I"
""
PETSC_PACKAGES_INCLUDES
${
PETSC_PACKAGES_INCLUDES
}
)
string
(
REPLACE
" "
";"
PETSC_PACKAGES_INCLUDES
${
PETSC_PACKAGES_INCLUDES
}
)
string
(
REPLACE
" "
";"
PETSC_PACKAGES_INCLUDES
${
PETSC_PACKAGES_INCLUDES
}
)
foreach
(
VAR
${
PETSC_PACKAGES_INCLUDES
}
)
foreach
(
VAR
${
PETSC_PACKAGES_INCLUDES
}
)
list
(
APPEND EXTERNAL_INCLUDES
${
VAR
}
)
list
(
APPEND EXTERNAL_INCLUDES
${
VAR
}
)
endforeach
(
VAR
)
endforeach
(
VAR
)
endif
(
PETSC_PACKAGES_INCLUDES
)
endif
(
PETSC_PACKAGES_INCLUDES
)
# find libraries (<= 3.0)
# find libraries (<= 3.0)
set
(
PETSC_LIBS_REQUIRED petscksp petscdm petscmat petscvec petsc
)
set
(
PETSC_LIBS_REQUIRED petscksp petscdm petscmat petscvec petsc
)
find_all_libraries
(
PETSC_LIBS PETSC_LIBS_REQUIRED
find_all_libraries
(
PETSC_LIBS PETSC_LIBS_REQUIRED
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/lib
""
)
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/lib
""
)
# petsc 3.1 create only one library (libpetsc)
# petsc 3.1 create
s
only one library (libpetsc)
if
(
NOT PETSC_LIBS
)
if
(
NOT PETSC_LIBS
)
find_library
(
PETSC_LIBS petsc PATHS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/lib
)
find_library
(
PETSC_LIBS petsc PATHS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/lib
)
endif
(
NOT PETSC_LIBS
)
endif
(
NOT PETSC_LIBS
)
string
(
REGEX MATCH
"PACKAGES_LIBS = [^
\n\r
]*"
PETSC_PACKAGES_LIBS
list
(
APPEND EXTERNAL_LIBRARIES
${
PETSC_LIBS
}
)
${
PETSC_VARIABLES
}
)
# find additional libraries to link with
string
(
REPLACE
"PACKAGES_LIBS = "
""
PETSC_PACKAGES_LIBS
string
(
REGEX MATCH
"PACKAGES_LIBS = [^
\n\r
]*"
PLIBS
${
PETSC_VARIABLES
}
)
${
PETSC_PACKAGES_LIBS
}
)
string
(
REPLACE
"PACKAGES_LIBS = "
""
PLIBS
${
PLIBS
}
)
list
(
APPEND EXTERNAL_LIBRARIES
${
PETSC_LIBS
}
"
${
PETSC_PACKAGES_LIBS
}
"
)
string
(
STRIP
${
PLIBS
}
PLIBS
)
list
(
APPEND EXTERNAL_LIBRARIES
"
${
PLIBS
}
"
)
string
(
REGEX MATCH
"PCC_LINKER_LIBS = [^
\n\r
]*"
LLIBS
${
PETSC_VARIABLES
}
)
string
(
REPLACE
"PCC_LINKER_LIBS = "
""
LLIBS
${
LLIBS
}
)
string
(
STRIP
${
LLIBS
}
LLIBS
)
list
(
APPEND EXTERNAL_LIBRARIES
"
${
LLIBS
}
"
)
endif
(
EXISTS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/conf/petscvariables
)
endif
(
EXISTS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/conf/petscvariables
)
endif
(
ENABLE_PETSC
)
endif
(
ENABLE_PETSC
)
...
@@ -654,6 +653,18 @@ if(HAVE_PETSC AND ENABLE_SLEPC)
...
@@ -654,6 +653,18 @@ if(HAVE_PETSC AND ENABLE_SLEPC)
endif
(
SLEPC_LIB
)
endif
(
SLEPC_LIB
)
endif
(
HAVE_PETSC AND ENABLE_SLEPC
)
endif
(
HAVE_PETSC AND ENABLE_SLEPC
)
if
(
ENABLE_MPI AND NOT HAVE_PETSC
)
# if we use PETSc we assume that we use petsc's mpi config
find_package
(
MPI
)
if
(
MPI_FOUND
)
set_config_option
(
HAVE_MPI
"MPI"
)
list
(
APPEND EXTERNAL_INCLUDES
${
MPI_INCLUDE_DIR
}
)
list
(
APPEND EXTERNAL_LIBRARIES
${
MPI_LIBRARIES
}
)
include
(
CMakeForceCompiler
)
cmake_force_cxx_compiler
(
${
MPI_COMPILER
}
"MPI C++ Compiler"
)
endif
(
MPI_FOUND
)
endif
(
ENABLE_MPI AND NOT HAVE_PETSC
)
if
(
ENABLE_OCC
)
if
(
ENABLE_OCC
)
if
(
WIN32
)
if
(
WIN32
)
set
(
OCC_SYS_NAME win32
)
set
(
OCC_SYS_NAME win32
)
...
@@ -684,8 +695,6 @@ if(ENABLE_OCC)
...
@@ -684,8 +695,6 @@ if(ENABLE_OCC)
# unset(OCC_LIB CACHE) # cleaner, but only available in cmake >= 2.6.4
# unset(OCC_LIB CACHE) # cleaner, but only available in cmake >= 2.6.4
endforeach
(
OCC
)
endforeach
(
OCC
)
list
(
LENGTH OCC_LIBS NUM_OCC_LIBS
)
list
(
LENGTH OCC_LIBS NUM_OCC_LIBS
)
if
(
NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED
)
if
(
NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED
)
find_path
(
OCC_INC
"BRep_Tool.hxx"
PATHS ENV CASROOT PATH_SUFFIXES inc
find_path
(
OCC_INC
"BRep_Tool.hxx"
PATHS ENV CASROOT PATH_SUFFIXES inc
include opencascade
)
include opencascade
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment