2 # MITK_MULTIPLEX_PICTYPE: generate separated source files for different 3 # data types to reduce memory consumption of compiler during template 6 # Param "file" should be named like mitkMyAlgo-TYPE.cpp 7 # in the file, every occurence of @TYPE@ is replaced by the 8 # datatype. For each datatype, a new file mitkMyAlgo-datatype.cpp 9 # is generated and added to CPP_FILES_GENERATED. 12 string(REPLACE
"," ";" TYPES
"${MITK_ACCESSBYITK_PIXEL_TYPES}")
13 foreach(TYPE ${TYPES})
14 # create filename
for destination
15 string(REPLACE
" " "_" quoted_type
"${TYPE}")
16 string(REPLACE TYPE ${quoted_type} quoted_file ${file})
17 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${file} ${CMAKE_CURRENT_BINARY_DIR}/${quoted_file} @ONLY)
18 set(CPP_FILES_GENERATED ${CPP_FILES_GENERATED} ${CMAKE_CURRENT_BINARY_DIR}/${quoted_file})
MITK_MULTIPLEX_PICTYPE(file)