Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base
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
Container Registry
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
base
Commits
b6e9e729
Commit
b6e9e729
authored
3 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
BF: CUDACXXFLAGS was getting mixed into NVCCFLAGS
parent
833861db
No related branches found
No related tags found
1 merge request
!35
Bf/cudacxxflags
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
config/buildSettings.mk
+18
-4
18 additions, 4 deletions
config/buildSettings.mk
with
18 additions
and
4 deletions
config/buildSettings.mk
+
18
−
4
View file @
b6e9e729
...
@@ -168,16 +168,30 @@ ifneq (${NVCC}, )
...
@@ -168,16 +168,30 @@ ifneq (${NVCC}, )
CUDA_VER
=
$(
shell
${
NVCC
}
--version
|
grep
-Po
"release
\K
[0-9
\.
]+"
)
CUDA_VER
=
$(
shell
${
NVCC
}
--version
|
grep
-Po
"release
\K
[0-9
\.
]+"
)
GENCODEFLAGS
?=
$(
shell
${
FSLCONFDIR
}
/supportedGencodes.sh
${
CUDA_VER
})
GENCODEFLAGS
?=
$(
shell
${
FSLCONFDIR
}
/supportedGencodes.sh
${
CUDA_VER
})
# We use nvcc to compile .cu files, g++ to
# compile .cc/.cpp files, and nvcc to perform
# the final linking. So we need to manage
# compiler/linker flags carefully.
# CUDACXXFLAGS is to be used when compiling
# .cc/.cpp files which are to be linked into
# CUDA applications - CUDA-specific include
# paths, and any USRNVCCFLAGS are added to it.
#
# In contrast, NVCCFLAGS is used for compiling
# .cu files (and final linking) - it contains
# nvcc-specific options.
CUDACXXFLAGS
?=
-I
${
CUDA_HOME
}
/include
# We specify the compiler to use with -ccbin, as
# We specify the compiler to use with -ccbin, as
# nvcc might otherwise naively call "g++", rather
# nvcc might otherwise naively call "g++", rather
# than honouring $(CXX). We specifically use
# than honouring $(CXX). We specifically use
# "-ccbin" rather than "--compiler-bindir" here,
# "-ccbin" rather than "--compiler-bindir" here,
# because the conda-forge nvcc wrapper checks for
# because the conda-forge nvcc wrapper checks for
# -ccbin, and adds its own if not present.
# -ccbin, and adds its own if not present.
CUDACXXFLAGS
?=
-I
${
CUDA_HOME
}
/include
NVCCFLAGS
?=
${
GENCODEFLAGS
}
\
NVCCFLAGS
?=
${
GENCODEFLAGS
}
\
-ccbin
$(
CXX
)
\
-ccbin
$(
CXX
)
\
-I
${
CUDA_HOME
}
/include
${
CUDACXXFLAGS
}
NVCCLDFLAGS
?=
-L
${
CUDA_HOME
}
/lib
\
NVCCLDFLAGS
?=
-L
${
CUDA_HOME
}
/lib
\
-L
${
CUDA_HOME
}
/lib64
\
-L
${
CUDA_HOME
}
/lib64
\
-L
${
CUDA_HOME
}
/lib/stubs
\
-L
${
CUDA_HOME
}
/lib/stubs
\
...
...
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