Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
13e52962
Commit
13e52962
authored
9 years ago
by
Todd Gamblin
Browse files
Options
Downloads
Plain Diff
Merge pull request #802 from gartung/std-cpp14
Handle c++11 and c++14 correctly
parents
10b0cb10
e92da6a6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/spack/spack/compiler.py
+3
-0
3 additions, 0 deletions
lib/spack/spack/compiler.py
lib/spack/spack/compilers/gcc.py
+9
-2
9 additions, 2 deletions
lib/spack/spack/compilers/gcc.py
with
12 additions
and
2 deletions
lib/spack/spack/compiler.py
+
3
−
0
View file @
13e52962
...
...
@@ -97,6 +97,9 @@ class Compiler(object):
# argument used to get C++11 options
cxx11_flag
=
"
-std=c++11
"
# argument used to get C++14 options
cxx14_flag
=
"
-std=c++1y
"
def
__init__
(
self
,
cspec
,
cc
,
cxx
,
f77
,
fc
):
def
check
(
exe
):
...
...
This diff is collapsed.
Click to expand it.
lib/spack/spack/compilers/gcc.py
+
9
−
2
View file @
13e52962
...
...
@@ -54,9 +54,16 @@ def cxx11_flag(self):
if
self
.
version
<
ver
(
'
4.3
'
):
tty
.
die
(
"
Only gcc 4.3 and above support c++11.
"
)
elif
self
.
version
<
ver
(
'
4.7
'
):
return
"
-std=
gnu
++0x
"
return
"
-std=
c
++0x
"
else
:
return
"
-std=gnu++11
"
return
"
-std=c++11
"
@property
def
cxx14_flag
(
self
):
if
self
.
version
<
ver
(
'
4.8
'
):
tty
.
die
(
"
Only gcc 4.8 and above support c++14.
"
)
else
:
return
"
-std=c++14
"
@classmethod
def
fc_version
(
cls
,
fc
):
...
...
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