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
ae09dd3f
Commit
ae09dd3f
authored
14 years ago
by
Emilie Marchandise
Browse files
Options
Downloads
Patches
Plain Diff
First bench Multiphase flow
parent
2fc2238f
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
+29
-38
29 additions, 38 deletions
CMakeLists.txt
with
29 additions
and
38 deletions
CMakeLists.txt
+
29
−
38
View file @
ae09dd3f
...
...
@@ -44,7 +44,7 @@ option(ENABLE_NETGEN "Enable Netgen mesh generator" ON)
option
(
ENABLE_OCC
"Enable Open CASCADE geometrical models"
ON
)
option
(
ENABLE_OSMESA
"Use OSMesa for offscreen rendering"
OFF
)
option
(
ENABLE_PARSER
"Build the GEO file parser"
ON
)
option
(
ENABLE_PETSC
"Enable PETSc linear algebra solvers"
O
N
)
option
(
ENABLE_PETSC
"Enable PETSc linear algebra solvers"
O
FF
)
option
(
ENABLE_PLUGINS
"Build the post-processing plugins"
ON
)
option
(
ENABLE_POST
"Build the post-processing module"
ON
)
option
(
ENABLE_QT
"Build QT GUI"
OFF
)
...
...
@@ -463,17 +463,13 @@ if(ENABLE_GMM)
endif
(
ENABLE_GMM
)
if
(
ENABLE_KBIPACK
)
add_subdirectory
(
contrib/kbipack
)
include_directories
(
contrib/kbipack
)
set_config_option
(
HAVE_KBIPACK
"Kbipack"
)
find_library
(
GMP_LIB NAMES gmp
)
if
(
GMP_LIB
)
find_path
(
GMP_INC
"gmp.h"
PATH_SUFFIXES src include
)
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
)
set_config_option
(
HAVE_GMP
"GMP"
)
list
(
APPEND EXTERNAL_LIBRARIES
${
GMP_LIB
}
)
endif
(
GMP_LIB
)
endif
(
ENABLE_KBIPACK
)
...
...
@@ -483,6 +479,17 @@ if(ENABLE_MATHEX)
set_config_option
(
HAVE_MATHEX
"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
)
add_subdirectory
(
contrib/mpeg_encode
)
include_directories
(
contrib/mpeg_encode/headers
)
...
...
@@ -605,7 +612,6 @@ if(ENABLE_PETSC)
set
(
ENV_PETSC_ARCH $ENV{PETSC_ARCH}
)
if
(
EXISTS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/conf/petscvariables
)
set_config_option
(
HAVE_PETSC
"PETSc"
)
set_config_option
(
HAVE_MPI
"MPI"
)
file
(
STRINGS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/conf/petscvariables
PETSC_VARIABLES NEWLINE_CONSUME
)
# find include directories
...
...
@@ -615,31 +621,26 @@ if(ENABLE_PETSC)
${
PETSC_VARIABLES
}
)
string
(
REPLACE
"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
" "
";"
PETSC_PACKAGES_INCLUDES
${
PETSC_PACKAGES_INCLUDES
}
)
foreach
(
VAR
${
PETSC_PACKAGES_INCLUDES
}
)
list
(
APPEND EXTERNAL_INCLUDES
${
VAR
}
)
endforeach
(
VAR
)
endif
(
PETSC_PACKAGES_INCLUDES
)
endif
(
PETSC_PACKAGES_INCLUDES
)
# find libraries (<= 3.0)
set
(
PETSC_LIBS_REQUIRED petscksp petscdm petscmat petscvec petsc
)
find_all_libraries
(
PETSC_LIBS PETSC_LIBS_REQUIRED
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/lib
""
)
# petsc 3.1 create
s
only one library (libpetsc)
if
(
NOT PETSC_LIBS
)
find_library
(
PETSC_LIBS petsc PATHS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/lib
)
# petsc 3.1 create only one library (libpetsc)
if
(
NOT PETSC_LIBS
)
find_library
(
PETSC_LIBS petsc PATHS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/lib
)
endif
(
NOT PETSC_LIBS
)
list
(
APPEND EXTERNAL_LIBRARIES
${
PETSC_LIBS
}
)
# find additional libraries to link with
string
(
REGEX MATCH
"PACKAGES_LIBS = [^
\n\r
]*"
PLIBS
${
PETSC_VARIABLES
}
)
string
(
REPLACE
"PACKAGES_LIBS = "
""
PLIBS
${
PLIBS
}
)
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
}
"
)
string
(
REGEX MATCH
"PACKAGES_LIBS = [^
\n\r
]*"
PETSC_PACKAGES_LIBS
${
PETSC_VARIABLES
}
)
string
(
REPLACE
"PACKAGES_LIBS = "
""
PETSC_PACKAGES_LIBS
${
PETSC_PACKAGES_LIBS
}
)
list
(
APPEND EXTERNAL_LIBRARIES
${
PETSC_LIBS
}
"
${
PETSC_PACKAGES_LIBS
}
"
)
endif
(
EXISTS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/conf/petscvariables
)
endif
(
ENABLE_PETSC
)
...
...
@@ -653,18 +654,6 @@ if(HAVE_PETSC AND ENABLE_SLEPC)
endif
(
SLEPC_LIB
)
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
(
WIN32
)
set
(
OCC_SYS_NAME win32
)
...
...
@@ -695,6 +684,8 @@ if(ENABLE_OCC)
# unset(OCC_LIB CACHE) # cleaner, but only available in cmake >= 2.6.4
endforeach
(
OCC
)
list
(
LENGTH OCC_LIBS NUM_OCC_LIBS
)
if
(
NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED
)
find_path
(
OCC_INC
"BRep_Tool.hxx"
PATHS ENV CASROOT PATH_SUFFIXES inc
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