Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-grid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-grid
Commits
58355320
Verified
Commit
58355320
authored
1 month ago
by
Santiago Ospina De Los Ríos
Committed by
Santiago Ospina De Los Ríos
1 week ago
Browse files
Options
Downloads
Patches
Plain Diff
Check if alberta is older than 3.1.0 to handle stdbool
parent
205df962
Branches
Branches containing commit
No related tags found
1 merge request
!769
Add `HAVE_STDBOOL_H` define for Alberta when `stdbool.h` is available
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/modules/FindAlberta.cmake
+7
-3
7 additions, 3 deletions
cmake/modules/FindAlberta.cmake
with
7 additions
and
3 deletions
cmake/modules/FindAlberta.cmake
+
7
−
3
View file @
58355320
...
...
@@ -109,13 +109,17 @@ find_package_handle_standard_args("Alberta"
)
if
(
Alberta_FOUND
)
include
(
CheckIncludeFileCXX
)
check_include_file_cxx
(
"stdbool.h"
HAVE_STDBOOL_H_HEADER
)
if
(
ALBERTA_GRID_VERSION VERSION_LESS 3.1.0
)
unset
(
HAVE_STDBOOL_H_HEADER
)
include
(
CheckIncludeFileCXX
)
check_include_file_cxx
(
"stdbool.h"
HAVE_STDBOOL_H_HEADER
)
endif
()
foreach
(
dim
${
ALBERTA_WORLD_DIMS
}
)
if
(
NOT Alberta::AlbertaGrid
${
dim
}
D
)
if
(
${
HAVE_STDBOOL_H_HEADER
}
)
# Tell Alberta that we have a stdbool.h header so that it doesn't
# Tell Alberta
(<3.1.0)
that we have a stdbool.h header so that it doesn't
# try to define `bool` itself (which would lead to a `typedef bool bool`
# and hence a compile error in clang).
target_compile_definitions
(
PkgConfig::Alberta
${
dim
}
D INTERFACE -DHAVE_STDBOOL_H
)
...
...
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