Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tbgl
tools
arbd
Commits
4dcdd3f3
Commit
4dcdd3f3
authored
4 years ago
by
cmaffeo2
Browse files
Options
Downloads
Patches
Plain Diff
Makefile logic to decide C std
parent
7352affc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Makefile
+15
-5
15 additions, 5 deletions
src/Makefile
with
15 additions
and
5 deletions
src/Makefile
+
15
−
5
View file @
4dcdd3f3
...
...
@@ -31,22 +31,32 @@ CC_FLAGS += -DVERSION="\"$(VERSION)\"" -DSIGNAL
CC_FLAGS
+=
-I
$(
CUDA_PATH
)
/include
CC_FLAGS
+=
-Wall
-Wno-write-strings
-std
=
c++14
-pedantic
# TODO: test on Mac OSX and other architectures
CC_FLAGS
+=
-Wall
-Wno-write-strings
-pedantic
# TODO: test on Mac OSX and other architectures
ifeq
($(dbg),1)
NV_FLAGS
+=
-lineinfo
else
NV_FLAGS
+=
-lineinfo
endif
CUDA_VERSION_GT10
=
$(
shell
expr
`
nvcc
-V
|
tr
'V'
' '
|
tr
' '
'\n'
|
tail
-n1
|
cut
-f1
-d
.
`
\>
10
)
ifeq
"$(CUDA_VERSION_GT10)" "1"
CSTD
:=
c++14
else
CSTD
:=
c++11
endif
NV_FLAGS
:=
$(
NV_FLAGS
)
-std
=
$(
CSTD
)
ifneq
($(DARWIN),)
LIBRARY
=
$(
CUDA_PATH
)
/lib
LIBRARY
=
$(
CUDA_PATH
)
/lib
else
LIBRARY
=
$(
CUDA_PATH
)
/lib64
LIBRARY
=
$(
CUDA_PATH
)
/lib64
ifeq
"$(CSTD)" "c++11"
CSTD
:=
c++1y
endif
endif
CC_FLAGS
+=
-std
=
$(
CSTD
)
# NV_FLAGS += -ftz=true # TODO: test if this preserves accurate simulation
$(info
$(NVCC))
## Find valid compute capabilities for this machine
SMS
?=
30 35 37 50 52 60 61
$(info
Testing
CUDA
toolkit
with
compute
capabilities
SMS
=
'
$(
SMS
)
'
)
...
...
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