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,7 +88,7 @@ if(ENABLE_CODEGEN AND EXISTS ${GENERATOR_JAR})
# COMMENT "Generating code for ${CORE_NAME}."
# 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
COMMAND ${GENERATOR} -b ${BE_UPPER} -c ${CORE_NAME} -r ${REPO_DIR} ${${CORE_NAME}_MAPPING} ${INPUT_FILE}
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
@ -96,6 +96,7 @@ if(ENABLE_CODEGEN AND EXISTS ${GENERATOR_JAR})
BYPRODUCTS ${${CORE_NAME}_OUTPUT_FILES}
USES_TERMINAL
)
endif()
execute_process(
COMMAND ${GENERATOR} -b ${BE_UPPER} -c ${CORE_NAME} -r ${REPO_DIR} ${${CORE_NAME}_MAPPING} ${INPUT_FILE}
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}