diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-19 12:44:02 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-19 12:44:10 +0200 |
commit | 330336c28507e0ee3a77d20e03dbc994618c213c (patch) | |
tree | 9b161a52b8983be5069e30ab05d8e3a48d35507d /cppbuild.cc | |
parent | 9fe6626a63718635cca6ce8920e1669d099d46a7 (diff) |
Support multiple build config files.
Diffstat (limited to 'cppbuild.cc')
-rw-r--r-- | cppbuild.cc | 85 |
1 files changed, 15 insertions, 70 deletions
diff --git a/cppbuild.cc b/cppbuild.cc index b1b31ed..e68ac0b 100644 --- a/cppbuild.cc +++ b/cppbuild.cc @@ -23,9 +23,6 @@ Nested build configurations for for example unit-tests in a test folder #include "test/cppbuild.cc" */ -std::vector<BuildConfiguration> configs() -{ - reg(__FILE__); /* Glob convenience methods std::string glob = getFilesInDir(...); @@ -50,6 +47,10 @@ så kan man kalde f.eks. imageconvert /* Compiler selection per-target (for arm cross-compilation) */ +namespace +{ +std::vector<BuildConfiguration> myConfigs() +{ return { { @@ -94,73 +95,13 @@ Compiler selection per-target (for arm cross-compilation) "-pthread", } }, + }; +} - { - .target = "src.a", - .sources = { - "drumgizmo/src/audiocache.cc", - "drumgizmo/src/audiocacheeventhandler.cc", - "drumgizmo/src/audiocachefile.cc", - "drumgizmo/src/audiocacheidmanager.cc", - "drumgizmo/src/audiofile.cc", - "drumgizmo/src/audioinputengine.cc", - "drumgizmo/src/audioinputenginemidi.cc", - "drumgizmo/src/audiooutputengine.cc", - "drumgizmo/src/bytesizeparser.cc", - "drumgizmo/src/channel.cc", - "drumgizmo/src/channelmixer.cc", - "drumgizmo/src/configfile.cc", - "drumgizmo/src/configparser.cc", - "drumgizmo/src/dgxmlparser.cc", - "drumgizmo/src/directory.cc", - "drumgizmo/src/domloader.cc", - "drumgizmo/src/drumgizmo.cc", - "drumgizmo/src/drumgizmoconf.cc", - "drumgizmo/src/drumkit.cc", - "drumgizmo/src/drumkitloader.cc", - "drumgizmo/src/events.cc", - "drumgizmo/src/events_ds.cc", - "drumgizmo/src/inputprocessor.cc", - "drumgizmo/src/instrument.cc", - "drumgizmo/src/latencyfilter.cc", - "drumgizmo/src/midimapparser.cc", - "drumgizmo/src/midimapper.cc", - "drumgizmo/src/path.cc", - "drumgizmo/src/powerlist.cc", - "drumgizmo/src/powermap.cc", - "drumgizmo/src/powermapfilter.cc", - "drumgizmo/src/random.cc", - "drumgizmo/src/sample.cc", - "drumgizmo/src/sample_selection.cc", - "drumgizmo/src/sem.cc", - "drumgizmo/src/staminafilter.cc", - "drumgizmo/src/thread.cc", - "drumgizmo/src/translation.cc", - "drumgizmo/src/velocityfilter.cc", - "drumgizmo/src/versionstr.cc", - "drumgizmo/src/zrwrapper.cc", - }, - .depends = {}, - .cxxflags = { - "-fPIC", - "-DUI_X11", - "-O3", - "-g", - "-Wall", - "-Werror", - "-std=c++11", - "-Idrumgizmo/getoptpp", - "-Idrumgizmo/", - "-Idrumgizmo/hugin", - "-Idrumgizmo/plugingui/", - "-Idrumgizmo/src/", - "-Idrumgizmo/zita-resampler/libs", - "-Idrumgizmo/pugixml/src", - }, - .cflags = {}, - .ldflags = {} - }, - +std::vector<BuildConfiguration> myConfigs2() +{ + return + { { .target = "libplugingui.so", .sources = { @@ -247,6 +188,10 @@ Compiler selection per-target (for arm cross-compilation) }, .cflags = {}, .ldflags = {} - }, + } }; } + +int a = reg(__FILE__, myConfigs); +int b = reg(__FILE__, myConfigs2); +} |