Last active
December 16, 2015 22:09
-
-
Save akiatoji/5504740 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On OS X, apps started by Finder doesn't pick up PATH from shell's login script. | |
This creates a problem using NVidia CUDA Nsight IDE since it NSight relies finding CUDA SDK in PATH. | |
NVIDIA gives you a shell script for this, but this is uh, lame. | |
BTW, NSight is built on Eclipse and it shouldn't be a problem for NSight to pick up CUDA SDK path | |
without resorting to scanning PATH. We don't have this problem with JDK, for example. | |
Anyways, here's how you fix it: | |
sudo vi /Developer/NVIDIA/CUDA-5.0/libnsight/nsight.app/Contents/Info.plist | |
# and add the following: | |
<key>LSEnvironment</key> | |
<dict> | |
<key>PATH</key> | |
<string>YOURPATH_HERE:/Developer/NVIDIA/CUDA-5.0/bin</string> | |
</dict> | |
Now have launchserver re-read plist file: | |
System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -v -f /Developer/NVIDIA/CUDA-5.0/libnsight/nsight.app | |
Now you can launch Nsight using that shiny cool icon in Dock, and it'll find CUDA SDK so you can compile your super duper GPU code. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment