• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Build rules
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Build rules


  • Subject: Build rules
  • From: Alexander Powell <email@hidden>
  • Date: Sat, 8 May 2004 05:42:36 -0400

I am trying to better integrate nVidia's Cg language with Xcode and could use a bit of help on some issues. I've written the files necessary to get syntax highlighting to work, and I've figured out how to set up build rules to run cgc on the files to check for errors. Here's what I can't figure out:

1. Cg files can be vertex shaders, fragment shaders, or whatever. Is there a clever way to get Xcode to recognize them so as to set the build profile correctly in the arguments to cgc? My original thoughts on this were to just name the files with the profile in the name somehow, but creating a new build rule for every profile type that might be used in a project might be too much work. So, thoughts on automating it are as follows:

a. Maybe I could put the profile name in the filename, then parse it out somehow to put it in the arguments to cgc, like so:

				File:			myprog_arbvp1.cg
				Compiled with:	/usr/bin/cgc -profile arbvp1 myprog_arbvp1.cg

			This way, changing the profile would be a simple filename change.

b. Is there a way to set up a rule for building files on a *per-file* basis? This would be another reasonable solution, though I think I like the one in A a little better, since it could make rapid switching of profiles easier.

c. I think the best solution might be to set up a rule for building files on a *per-group* basis. This way, I could have a group named "arbvp1" or whatever, and every "*.cg" file in that group would be compiled with the "-profile arbvp1" option.

2. When cgc runs successfully, I get a little check next to "Running custom shell script". When it fails, I get a "Build failed (see build log...)" item under the custom shell script item in the build results. My guess is that cgc doesn't format its errors in such a way to actually tell Xcode the line on which the errors occur, or the actual error message. The error messages as returned by cgc are formatted in a *slightly* different way from the error messages that gcc returns. Is there a way to get Xcode to recognize these errors and post them to the build results? Maybe a custom "inbetween" script that reformats the errors to the gcc style would work?

Thanks,

--
Alexander Powell
email@hidden
Georgia Institute of Technology - GVU - GRAPE
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: XCode newbie: Help with plugins and linking
  • Next by Date: Re: Adding/moving a custom executable to "project" level
  • Previous by thread: Re: XCode newbie: Help with plugins and linking
  • Next by thread: -fast and precompiled headers bug
  • Index(es):
    • Date
    • Thread