change build setup to only generate files during cmake if in CI

This commit is contained in:
Eyck Jentzsch 2021-11-04 08:53:06 +01:00
parent c842327546
commit e62a67cfdb
1 changed files with 9 additions and 8 deletions

View File

@ -88,14 +88,15 @@ if(ENABLE_CODEGEN AND EXISTS ${GENERATOR_JAR})
# COMMENT "Generating code for ${CORE_NAME}." # COMMENT "Generating code for ${CORE_NAME}."
# USES_TERMINAL VERBATIM # USES_TERMINAL VERBATIM
#) #)
#add_custom_target(${CORE_NAME}_cpp DEPENDS ${${CORE_NAME}_OUTPUT_FILES}) if(NOT DEFINED ENV{CI})
add_custom_target(${CORE_NAME}_cpp add_custom_target(${CORE_NAME}_cpp
COMMAND ${GENERATOR} -b ${BE_UPPER} -c ${CORE_NAME} -r ${REPO_DIR} ${${CORE_NAME}_MAPPING} ${INPUT_FILE} COMMAND ${GENERATOR} -b ${BE_UPPER} -c ${CORE_NAME} -r ${REPO_DIR} ${${CORE_NAME}_MAPPING} ${INPUT_FILE}
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
COMMENT "Generating ISS sources" COMMENT "Generating ISS sources"
BYPRODUCTS ${${CORE_NAME}_OUTPUT_FILES} BYPRODUCTS ${${CORE_NAME}_OUTPUT_FILES}
USES_TERMINAL USES_TERMINAL
) )
endif()
execute_process( execute_process(
COMMAND ${GENERATOR} -b ${BE_UPPER} -c ${CORE_NAME} -r ${REPO_DIR} ${${CORE_NAME}_MAPPING} ${INPUT_FILE} COMMAND ${GENERATOR} -b ${BE_UPPER} -c ${CORE_NAME} -r ${REPO_DIR} ${${CORE_NAME}_MAPPING} ${INPUT_FILE}
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}