teragonaudio/MrsWatson — pull request #176 by amoe (2014-08-26 13:43:07+00:00)
Title: Stop cmake mangling multiple macro definitions on command line

This fixes the build procedure on Linux, as CMake 2.8.9 doesn't seem to handle this attempt to define multiple macros in a single line well.

amoe@kruis2 $ make
[ 1%] Building C object source/CMakeFiles/mrswatsoncore.dir/MrsWatsonOptions.c.o
In file included from /home/amoe/vcs/foo/source/audio/AudioSettings.h:32:0,
from /home/amoe/vcs/foo/source/MrsWatsonOptions.c:30:
/home/amoe/vcs/foo/source/base/CharString.h:47:7: error: token "=" is not valid in preprocessor expressions
make[2]: *** [source/CMakeFiles/mrswatsoncore.dir/MrsWatsonOptions.c.o] Error 1
make[1]: *** [source/CMakeFiles/mrswatsoncore.dir/all] Error 2
make: *** [all] Error 2

Using `VERBOSE=1` shows that the following command is attempted:

cd /home/amoe/vcs/foo/source && /usr/bin/gcc -DLINUX="1 -D_POSIX_C_SOURCE=200809L -D__cdecl=\"\"" -I/home/amoe/vcs/foo/source -I/home/amoe/vcs/foo/vendor/vstsdk2.4/pluginterfaces/vst2.x -m32 -o CMakeFiles/mrswatsoncore.dir/MrsWatsonOptions.c.o -c /home/amoe/vcs/foo/source/MrsWatsonOptions.c

As you can see it attempted to insert the entire rest of the `add_definitions` text into a single value for the `LINUX` macro.