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
ae629d9b
Commit
ae629d9b
authored
11 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
better fix for petsc 3.4
parent
fd18c6e6
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
+13
-7
13 additions, 7 deletions
CMakeLists.txt
with
13 additions
and
7 deletions
CMakeLists.txt
+
13
−
7
View file @
ae629d9b
...
...
@@ -869,19 +869,25 @@ if(HAVE_SOLVER)
# old-style PETSc installations (using PETSC_DIR and PETSC_ARCH)
message
(
STATUS
"Using PETSc dir:
${
ENV_PETSC_DIR
}
"
)
message
(
STATUS
"Using PETSc arch:
${
ENV_PETSC_ARCH
}
"
)
# find includes by parsing the petscvariables file
file
(
STRINGS
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/conf/petscvariables
PETSC_VARIABLES NEWLINE_CONSUME
)
# find include directories
list
(
APPEND EXTERNAL_INCLUDES
${
ENV_PETSC_DIR
}
/include
)
#if(NOT HAVE_MPI) # necessary for PETSC >= 3.4
# list(APPEND EXTERNAL_INCLUDES ${ENV_PETSC_DIR}/include/mpiuni)
#endif(NOT HAVE_MPI)
list
(
APPEND EXTERNAL_INCLUDES
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/include
)
string
(
REGEX MATCH
"PACKAGES_INCLUDES = [^
\n\r
]*"
PETSC_PACKAGES_INCLUDES
# try to find PETSC_CC_INCLUDES for PETSc >= 3.4
string
(
REGEX MATCH
"PETSC_CC_INCLUDES = [^
\n\r
]*"
PETSC_PACKAGES_INCLUDES
${
PETSC_VARIABLES
}
)
if
(
PETSC_PACKAGES_INCLUDES
)
string
(
REPLACE
"PETSC_CC_INCLUDES = "
""
PETSC_PACKAGES_INCLUDES
${
PETSC_PACKAGES_INCLUDES
}
)
else
(
PETSC_PACKAGES_INCLUDES
)
# try to find PETSC_PACKAGES_INCLUDES in older versions
list
(
APPEND EXTERNAL_INCLUDES
${
ENV_PETSC_DIR
}
/include
)
list
(
APPEND EXTERNAL_INCLUDES
${
ENV_PETSC_DIR
}
/
${
ENV_PETSC_ARCH
}
/include
)
string
(
REGEX MATCH
"PACKAGES_INCLUDES = [^
\n\r
]*"
PETSC_PACKAGES_INCLUDES
${
PETSC_VARIABLES
}
)
string
(
REPLACE
"PACKAGES_INCLUDES = "
""
PETSC_PACKAGES_INCLUDES
${
PETSC_PACKAGES_INCLUDES
}
)
endif
(
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
}
)
...
...
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