Home Download Buy Blog Forum Support

Local build system files

Local build system files

Postby praetorian on Thu Aug 02, 2012 11:00 pm

Hi,
Is there a way to add project specific build system files?

For instance, let's say I have a C++ project which needs some additional / different compiler arguments than the default C++ build system file. If I make a new build system file that includes these arguments, do I have to place the file in the Packages/User directory? Is there a way to place it in the project directory instead? If there is, how do I get the editor to execute this build file?

Thanks!
praetorian
 
Posts: 2
Joined: Thu Aug 02, 2012 10:56 pm

Re: Local build system files

Postby pete340 on Fri Aug 03, 2012 12:41 pm

praetorian wrote:Hi,
Is there a way to add project specific build system files?

For instance, let's say I have a C++ project which needs some additional / different compiler arguments than the default C++ build system file. If I make a new build system file that includes these arguments, do I have to place the file in the Packages/User directory? Is there a way to place it in the project directory instead? If there is, how do I get the editor to execute this build file?

Thanks!


You can put your build systems directly in the project file (Project|Edit Project):

Code: Select all
{
   "folders":
   [
      {
         "path": "source",
         "file_exclude_patterns": ["a.out", "*.gch"],
         "folder_exclude_patterns": ["a.out.dSYM"]
      }
   ],
   "build_systems":
   [
      {
         "name": "C++ build",
         "cmd": ["/opt/gcc-4.7.0/bin/g++", "$file"],
         "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
         "working_dir": "${file_path}",
         "selector": "source.c, source.c++, source.makefile"
      }
   ]
}


I've edited the text a bit to remove proprietary information, so think of this as an example. It might not work as written, but you get the idea...
pete340
 
Posts: 71
Joined: Mon Oct 10, 2011 9:45 pm

Re: Local build system files

Postby praetorian on Fri Aug 03, 2012 9:43 pm

Perfect! That's exactly what I was looking for. Thanks a bunch!
praetorian
 
Posts: 2
Joined: Thu Aug 02, 2012 10:56 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 25 guests