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
4be454f9
Commit
4be454f9
authored
14 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
trying to fix missing petsc libs, second try
parent
ae09dd3f
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
+16
-11
16 additions, 11 deletions
CMakeLists.txt
with
16 additions
and
11 deletions
CMakeLists.txt
+
16
−
11
View file @
4be454f9
...
@@ -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
)
...
@@ -621,26 +621,31 @@ if(ENABLE_PETSC)
...
@@ -621,26 +621,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
)
...
...
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