Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gersemirc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/BlankSpruce/gersemi/0.26.1/gersemi/configuration.schema.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/BlankSpruce/gersemi/0.27.0/gersemi/configuration.schema.json

definitions:
- cmake/gersemi_definitions.cmake
Expand Down
15 changes: 5 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ include(${CCF_DIR}/cmake/evercbor.cmake)

# Launcher library
list(
APPEND
CCF_LAUNCHER_SOURCES
APPEND CCF_LAUNCHER_SOURCES
${CCF_DIR}/src/host/run.cpp
${CCF_DIR}/src/host/env.cpp
)
Expand Down Expand Up @@ -363,8 +362,7 @@ configure_file(
install(FILES ${CCF_DIR}/include/ccf/version.h DESTINATION include/ccf)

file(
READ
${CCF_DIR}/doc/host_config_schema/cchost_config.json
READ ${CCF_DIR}/doc/host_config_schema/cchost_config.json
HOST_CONFIG_SCHEMA
)
set_property(
Expand All @@ -380,8 +378,7 @@ configure_file(
)

file(
READ
${CCF_DIR}/doc/schemas/gov/2023-06-01-preview/gov.json
READ ${CCF_DIR}/doc/schemas/gov/2023-06-01-preview/gov.json
GOV_API_SCHEMA_2023_06_01_PREVIEW
)
set_property(
Expand All @@ -392,8 +389,7 @@ set_property(
${CCF_DIR}/doc/schemas/gov/2023-06-01-preview/gov.json
)
file(
READ
${CCF_DIR}/doc/schemas/gov/2024-07-01/gov.json
READ ${CCF_DIR}/doc/schemas/gov/2024-07-01/gov.json
GOV_API_SCHEMA_2024_07_01
)
set_property(
Expand Down Expand Up @@ -1417,8 +1413,7 @@ if(BUILD_TESTS)
endforeach()
string(REPLACE ";" "\n" _cov_binaries_nl "${_cov_binaries}")
file(
GENERATE OUTPUT
"${CMAKE_BINARY_DIR}/coverage_binaries.txt"
GENERATE OUTPUT "${CMAKE_BINARY_DIR}/coverage_binaries.txt"
CONTENT "${_cov_binaries_nl}\n"
)
endif()
Expand Down
3 changes: 1 addition & 2 deletions cmake/ccf_app.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ endif()
# Enclave library wrapper
function(add_ccf_app name)
cmake_parse_arguments(
PARSE_ARGV
1
PARSE_ARGV 1
PARSED_ARGS
""
""
Expand Down
9 changes: 3 additions & 6 deletions cmake/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ endfunction()
# Helper for building end-to-end function tests using the python infrastructure
function(add_e2e_test)
cmake_parse_arguments(
PARSE_ARGV
0
PARSE_ARGV 0
PARSED_ARGS
""
"NAME;PYTHON_SCRIPT;LABEL;CURL_CLIENT"
Expand Down Expand Up @@ -190,8 +189,7 @@ endfunction()
# Helper for building end-to-end perf tests using the python infrastucture
function(add_piccolo_test)
cmake_parse_arguments(
PARSE_ARGV
0
PARSE_ARGV 0
PARSED_ARGS
""
"NAME;PYTHON_SCRIPT;CONSTITUTION;CLIENT_BIN;PERF_LABEL"
Expand Down Expand Up @@ -233,8 +231,7 @@ endfunction()
# Picobench wrapper
function(add_picobench name)
cmake_parse_arguments(
PARSE_ARGV
1
PARSE_ARGV 1
PARSED_ARGS
""
""
Expand Down
18 changes: 8 additions & 10 deletions cmake/gersemi_definitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

function(add_ccf_app name)
cmake_parse_arguments(
PARSE_ARGV
1
PARSE_ARGV 1
PARSED_ARGS
""
""
Expand All @@ -22,8 +21,7 @@ endfunction()

function(add_e2e_test)
cmake_parse_arguments(
PARSE_ARGV
0
PARSE_ARGV 0
PARSED_ARGS
""
"NAME;PYTHON_SCRIPT;LABEL;CURL_CLIENT"
Expand All @@ -33,8 +31,7 @@ endfunction()

function(add_piccolo_test)
cmake_parse_arguments(
PARSE_ARGV
0
PARSE_ARGV 0
PARSED_ARGS
""
"NAME;PYTHON_SCRIPT;CONSTITUTION;CLIENT_BIN;PERF_LABEL"
Expand All @@ -44,8 +41,7 @@ endfunction()

function(add_picobench name)
cmake_parse_arguments(
PARSE_ARGV
1
PARSE_ARGV 1
PARSED_ARGS
""
""
Expand All @@ -56,6 +52,9 @@ endfunction()
function(add_test_bin name)
endfunction()

function(add_fuzz_test name)
Comment thread
achamayou marked this conversation as resolved.
endfunction()

function(add_unit_test name)
endfunction()

Expand All @@ -77,8 +76,7 @@ endfunction()
# Third-party: Corrosion (corrosion-rs/corrosion)
function(corrosion_import_crate)
cmake_parse_arguments(
PARSE_ARGV
0
PARSE_ARGV 0
PARSED_ARGS
""
"MANIFEST_PATH;PROFILE"
Expand Down
7 changes: 5 additions & 2 deletions scripts/check-cmake-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@ if [ ! -x "$(command -v uv)" ]; then
exit 1
fi

GERSEMI="uvx gersemi@0.17.0"
GERSEMI="uvx gersemi@0.27.0 --warnings-as-errors"
Comment thread
achamayou marked this conversation as resolved.

FILES=$(git ls-files "$@" | grep -e '\.cmake$' -e 'CMakeLists\.txt$')

if $fix ; then
# shellcheck disable=SC2086
$GERSEMI -i $FILES
if ! $GERSEMI -i $FILES; then
echo "Formatting failed (unknown commands or other warnings treated as errors)"
exit 1
fi
echo "All files formatted!"
else
# shellcheck disable=SC2086
Expand Down