Make fpp-to-json opt-in by default (#4449)

This commit is contained in:
M Starch 2025-11-19 12:02:15 -08:00 committed by GitHub
parent 31b6488723
commit 8cbba542fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 25 additions and 6 deletions

View File

@ -38,7 +38,7 @@ jobs:
- uses: ./.github/actions/setup
- name: Build Framework
run: |
fprime-util generate
fprime-util generate -DFPRIME_ENABLE_JSON_MODEL_GENERATION=ON
fprime-util build --all -j4
Ref:
@ -59,7 +59,7 @@ jobs:
- name: Build Ref
run: |
cd Ref
fprime-util generate
fprime-util generate -DFPRIME_ENABLE_JSON_MODEL_GENERATION=ON
fprime-util build -j4
UTs:

View File

@ -33,7 +33,7 @@ jobs:
- name: "Generate UT build cache"
working-directory: ./FppTestProject
run: |
fprime-util generate --ut
fprime-util generate --ut -DFPRIME_ENABLE_JSON_MODEL_GENERATION=ON
shell: bash
- name: "Build UTs"
working-directory: ./FppTestProject/FppTest

View File

@ -30,7 +30,7 @@ jobs:
- name: "Generate Ref Deployment"
working-directory: ./Ref
run: |
fprime-util generate
fprime-util generate -DFPRIME_ENABLE_JSON_MODEL_GENERATION=ON
shell: bash
- name: "Run fpp-to-json on Ref topology"
working-directory: ./Ref/Top

View File

@ -160,7 +160,12 @@ macro(fprime_initialize_build_system)
# Perform necessary sub-builds
if (NOT FPRIME_IS_SUB_BUILD)
run_sub_build(info-cache target/sub-build/fpp_locs target/sub-build/fpp_depend target/sub-build/fpp_to_json target/sub-build/module_info)
set(SUB_BUILD_TARGETS target/sub-build/fpp_locs target/sub-build/fpp_depend)
if (FPRIME_ENABLE_JSON_MODEL_GENERATION)
list(APPEND SUB_BUILD_TARGETS target/sub-build/fpp_to_json)
endif()
list(APPEND SUB_BUILD_TARGETS target/sub-build/module_info)
run_sub_build(info-cache ${SUB_BUILD_TARGETS})
# Import the pre-computed properties!
include("${CMAKE_BINARY_DIR}/fprime_module_info.cmake")
endif()

View File

@ -148,7 +148,7 @@ option(FPRIME_ENABLE_AUTOCODER_UTS "Enable autocoder UT generation" OFF)
option(FPRIME_ENABLE_UT_COVERAGE "Calculate unit test coverage" ON)
####
# `FPRIME_ENABLE_TEXT_LOGGERS:`
# `FPRIME_ENABLE_TEXT_LOGGERS`:
#
# When FPRIME_ENABLE_TEXT_LOGGERS is set, the ActiveTextLogger and PassiveConsoleTextLogger
# svc components are included in the build. When unset, those components are excluded,
@ -163,6 +163,20 @@ option(FPRIME_ENABLE_UT_COVERAGE "Calculate unit test coverage" ON)
####
option(FPRIME_ENABLE_TEXT_LOGGERS "Enable text loggers in build" ON)
####
# `FPRIME_ENABLE_JSON_MODEL_GENERATION`:
#
# Turns on the generation of JSON models for all modules in the build system. This will run `fpp-to-json` and may
# require the user to install `java` and the .jar variants of FPP.
#
# **Values:**
# - ON: enable JSON model generation
# - OFF: (default) disable JSON model generation
#
# e.g. `-DFPRIME_ENABLE_JSON_MODEL_GENERATION=ON`
####
option(FPRIME_ENABLE_JSON_MODEL_GENERATION "Enable JSON model generation" OFF)
####
# `FPRIME_SKIP_TOOLS_VERSION_CHECK`:
#