Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
SWE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
SWE
Commits
cf57f79e
Commit
cf57f79e
authored
Oct 10, 2012
by
Sebastian Rettenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cudaSDK path completely form scons
TODO: build/options/* should be updated accordingly
parent
f6789853
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
44 deletions
+3
-44
CudaTool.py
CudaTool.py
+3
-41
SConstruct
SConstruct
+0
-3
No files found.
CudaTool.py
View file @
cf57f79e
...
...
@@ -34,6 +34,8 @@ breuera - changes (see original: http://www.scons.org/wiki/CudaTool)
* commented out *.linkinfo
* lib64 instead of lib
* removed unnecessary SDK, "cudaSDKPath + '/lib64', cudaSDKPath + '/common/lib64' + cudaSDKSubLibDir, ", from LIBSPATH
rettenbs
* removed SDK path completely
***
"""
...
...
@@ -128,51 +130,11 @@ def generate(env):
sys
.
exit
(
"Cannot find the CUDA Toolkit path. Please modify your SConscript or add the path in cudaenv.py"
)
env
[
'CUDA_TOOLKIT_PATH'
]
=
cudaToolkitPath
# find CUDA SDK path and set CUDA_SDK_PATH
try
:
cudaSDKPath
=
env
[
'CUDA_SDK_PATH'
]
except
:
paths
=
[
home
+
'/NVIDIA_CUDA_SDK'
,
# i am just guessing here
home
+
'/Apps/NVIDIA_CUDA_SDK'
,
home
+
'/Apps/CudaSDK'
,
'/usr/local/NVIDIA_CUDA_SDK'
,
'/usr/local/CUDASDK'
,
'/usr/local/cuda_sdk'
,
'/Developer/NVIDIA CUDA SDK'
,
'/Developer/CUDA SDK'
,
'/Developer/CUDA'
,
'/Developer/GPU Computing/C'
,
programfiles
+
'NVIDIA Corporation/NVIDIA CUDA SDK'
,
programfiles
+
'NVIDIA/NVIDIA CUDA SDK'
,
programfiles
+
'NVIDIA CUDA SDK'
,
programfiles
+
'CudaSDK'
,
homedrive
+
'/NVIDIA CUDA SDK'
,
homedrive
+
'/CUDA SDK'
,
homedrive
+
'/CUDA/SDK'
]
pathFound
=
False
for
path
in
paths
:
if
os
.
path
.
isdir
(
path
):
pathFound
=
True
print
'scons: CUDA SDK found in '
+
path
cudaSDKPath
=
path
break
if
not
pathFound
:
sys
.
exit
(
"Cannot find the CUDA SDK path. Please set env['CUDA_SDK_PATH'] to point to your SDK path"
)
env
[
'CUDA_SDK_PATH'
]
=
cudaSDKPath
# cuda libraries
if
env
[
'PLATFORM'
]
==
'posix'
:
cudaSDKSubLibDir
=
'/linux'
elif
env
[
'PLATFORM'
]
==
'darwin'
:
cudaSDKSubLibDir
=
'/darwin'
else
:
cudaSDKSubLibDir
=
''
# add nvcc to PATH
env
.
PrependENVPath
(
'PATH'
,
cudaToolkitPath
+
'/bin'
)
# add required libraries
env
.
Append
(
CPPPATH
=
[
cuda
SDKPath
+
'/common/inc'
,
cuda
ToolkitPath
+
'/include'
])
env
.
Append
(
CPPPATH
=
[
cudaToolkitPath
+
'/include'
])
env
.
Append
(
LIBPATH
=
[
cudaToolkitPath
+
'/lib64'
])
env
.
Append
(
LIBS
=
[
'cudart'
])
...
...
SConstruct
View file @
cf57f79e
...
...
@@ -181,9 +181,6 @@ if env['parallelization'] in ['cuda', 'mpi_with_cuda']:
if
'cudaToolkitDir'
in
env
:
env
[
'CUDA_TOOLKIT_PATH'
]
=
env
[
'cudaToolkitDir'
]
env
.
Append
(
RPATH
=
[
os
.
path
.
join
(
env
[
'cudaToolkitDir'
],
'lib64'
)])
if
'cudaSDKDir'
in
env
:
env
[
'CUDA_SDK_PATH'
]
=
env
[
'cudaSDKDir'
]
env
.
Append
(
RPATH
=
[
os
.
path
.
join
(
env
[
'cudaSDKDir'
],
'lib64'
)])
env
.
Tool
(
'CudaTool'
,
toolpath
=
[
'.'
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment