11 April, 2014

SublimeText & SCons - part one

First step in my goal to make a decent development environment on Windows using SublimeText 3, SCons and clang (or failing that, Intel compiler suite) is to make SublimeText able to use SCons as a build system.

As a sandbox I will use my public domain foundation library available at https://github.com/rampantpixels/foundation_lib (you can find the SCons build scripts in there for reference).

To begin with, I create a SublimeText project and add the main source directory as a folder in the project. I save the project in the build subdirectory as I hate cluttering the main directory with project files. I also add a project local build system defintion for scons:
{
 "folders":
 [
  {
   "follow_symlinks": true,
   "path": "..\\foundation"
  }
 ],
 "build_systems":
 [
  {
   "name": "SCons",
   "shell_cmd": "scons",
   "working_dir": "${project_path:${folder:${file_path}}}\\..",
  }
 ]
}
Trying it out by selecting SCons as the build system and starting a build results in
scons: Reading SConscript files ...
Building on win32 (x86_64) for  ()
Building RELEASE configuration
scons: done reading SConscript files.
scons: Building targets ...
cl /Fobuild\scons\release-\tools\bin2hex\main.obj /c tools\bin2hex\main.c /nologo /DBUILD_RELEASE=1 /I. /Itools
scons: *** [build\scons\release-\tools\bin2hex\main.obj] error : (2, 'CreateProcess', 'The system cannot find the file specified.')
So now I need to modify my SCons build scripts to use clang and/or Intel toolchain. I decided to go with Intel since I already had that installed on my system, and adding intelc as tools to the SCons environment creation should do the trick. However, the Intel tool setup and version detection is really outdated in SCons, so next step will be to modify this to support version 14.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home