title: Defining C++ Preprocessor macros with SCons
body: <p>I'm trying to define a preprocessor macro within Scons for building a larger C/C++ project. </p>
  
  <p>One of the libraries I'm using needs ALIGN defined. To be more specific, if I add</p>
  
  <pre><code>#define ALIGN(x) __attribute((aligned(x)))
  </code></pre>
  
  <p>to the header file of said library, it compiles fine. However, I should be able to specify this at build time, as this is how the library intends on being used. I know in CMake, I would be able to define the macro using something like </p>
  
  <pre><code>SET(ALIGN_DECL "__attribute__((aligned(x)))") 
  </code></pre>
  
  <p>Defining <i>constants</i> in Scons like this</p>
  
  <pre><code>myEnv.Append(CPPDEFINES = ['IAMADEFINEDCONSTANT']) 
  </code></pre>
  
  <p>works fine, but definine a <i>macro</i> in this way doesn't work. 
  What gives?</p>
  
  <p>Edit: fixed typo</p>