Help for integrating an CppTranspiler

I need Help for integrating an Cpp Transpiler (Purescript to cpp see purescript-native-build. The custom command has the characteristics that it works on a set of input files and will produce an set of output files. If only one input file has changed then at least the associated output file will be updated.
My problem is how I could tell this to cmake, especially the dependency mapping.
I created a minimal example for illustration:

cmake_minimum_required(VERSION 3.10)
project(foo)
set( BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR} )

set( A ${BUILD_DIR}/a.t )
set( B ${BUILD_DIR}/b.t )
set( AA ${BUILD_DIR}/aa.t )
set( BB ${BUILD_DIR}/bb.t )

set( UPDATE
  cp -u ${A} ${AA} $<SEMICOLON>
  cp -u ${B} ${BB}
  )

add_custom_command(
  OUTPUT ${AA}
  COMMAND ${UPDATE}
  DEPENDS ${A}
  COMMENT "update ${AA}"
  )

add_custom_command(
  OUTPUT ${BB}
  COMMAND ${UPDATE}
  DEPENDS ${B}
  COMMENT "update ${BB}"
  )

add_custom_target(zoo ALL
  DEPENDS ${AA} ${BB}
  )

This will mimic the desired behviour for A->AA and B->BB . But I have to write
the custom command twice to get the right mappings, exists there a more preferable
way which also will not infere with parallel builds.

Thank you for your time,
Regards,
Robert

The real world CMakeList file is here:
CMakeList.txt