Hi, Stefan!

In this situation, I would suggest using RELEASES approach for different InterSystems Data Platforms. E.g. you can generate XML release package from the code base in git and then replace all the specific places for a given version on a build release phase. As a result you will have different XML packages for Ensemble and for InterSystems IRIS and have one code base, say in IRIS.

For example, you can see that approach @Eduard Lebedyuk used for RESTForms distribution. There are 2016.1 and 2016.2 release packages which can be installed in 2016.1 and 2016.2+ Caché or Ensemble versions respectfully.

To simplify release building I can recommend ISC.DEV utility which can export a release or patch file(upon git commits) for a given mask of classes.

HTH

And one more topic from me: 

InterSystems Open Exchange -  marketplace of Solutions, Tools and Adapters for InterSystems Data Platforms!

The updated the agenda is here and in the topic:

Tuesday 10/02, at Tech Exchange Global Summit 2018!

2 pm Open source approaches to work with Documents @Eduard Lebedyuk, InterSystems

2-15 InterSystems IRIS on Kubernetes by @Dmitry Maslennikov

2-30 Visual Studio Code IDE for InterSystems Data Platforms by @John Murray, GeorgeJames Software

2-45 Static Analysis for ObjectScript with CacheQuality by @Daniel Tamajon, Lite Solutions

3-00 InterSystems Open Exchange by @Evgeny Shvarov, InterSystems

3-15 Q&A Session on Developer Community, Global Masters and Open Exchange

Few days before Global Summit 2018!

And I can announce yet another presenter: @Eduard Lebedyuk, InterSystems.

Title: Open source approaches to work with Documents.

And we have the day and time!

Find Developer Community Flash Talks "Share Your InterSystems IRIS Solution!"  on Tuesday the 2nd of October on Flash Talks Stage from 2pm to 3-30 pm.