Rename DEV_MODE to GEN_FILES

GEN_FILES is a bit clearer as it describes what the setting
does more precisely.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
David Horstmann 2021-10-20 17:14:23 +01:00
parent 3e30ad9b0d
commit a8d1406107
7 changed files with 10 additions and 10 deletions

View File

@ -46,7 +46,7 @@ option(ENABLE_PROGRAMS "Build mbed TLS programs." ON)
option(UNSAFE_BUILD "Allow unsafe builds. These builds ARE NOT SECURE." OFF)
option(MBEDTLS_FATAL_WARNINGS "Compiler warnings treated as errors" ON)
option(DEV_MODE "Development mode: (re)generate some files as needed" ON)
option(GEN_FILES "Generate the auto-generated files as needed" ON)
string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}")
string(REGEX MATCH "GNU" CMAKE_COMPILER_IS_GNU "${CMAKE_C_COMPILER_ID}")

View File

@ -109,7 +109,7 @@ set(src_tls
ssl_tls13_generic.c
)
if(DEV_MODE)
if(GEN_FILES)
find_package(Perl REQUIRED)
file(GLOB error_headers ${CMAKE_CURRENT_SOURCE_DIR}/../include/mbedtls/*.h)

View File

@ -4,7 +4,7 @@ set(executables
psa_constant_names
)
if(DEV_MODE)
if(GEN_FILES)
add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/psa_constant_names_generated.c
@ -30,7 +30,7 @@ foreach(exe IN LISTS executables)
endforeach()
target_include_directories(psa_constant_names PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
if(DEV_MODE)
if(GEN_FILES)
add_custom_target(generate_psa_constant_names_generated_c
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/psa_constant_names_generated.c)
add_dependencies(psa_constant_names generate_psa_constant_names_generated_c)

View File

@ -18,7 +18,7 @@ set(executables
ssl_server2
)
if(DEV_MODE)
if(GEN_FILES)
# Inform CMake that the following file will be generated as part of the build
# process, so it doesn't complain that it doesn't exist yet. Starting from
# CMake 3.20, this will no longer be necessary as CMake will automatically
@ -42,7 +42,7 @@ foreach(exe IN LISTS executables)
target_link_libraries(${exe} ${libs})
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
if(exe STREQUAL "ssl_client2" OR exe STREQUAL "ssl_server2")
if(DEV_MODE)
if(GEN_FILES)
add_dependencies(${exe} generate_query_config_c)
endif()
target_include_directories(${exe}

View File

@ -27,7 +27,7 @@ if(TEST_CPP)
target_link_libraries(cpp_dummy_build ${mbedcrypto_target})
endif()
if(DEV_MODE)
if(GEN_FILES)
find_package(Perl REQUIRED)
add_custom_command(

View File

@ -34,7 +34,7 @@ foreach(file ${base_generated_data_files})
list(APPEND generated_data_files ${CMAKE_CURRENT_BINARY_DIR}/${file})
endforeach()
if(DEV_MODE)
if(GEN_FILES)
add_custom_command(
OUTPUT
${generated_data_files}

View File

@ -1007,8 +1007,8 @@ component_test_ref_configs () {
# the generated files only depend on the list of available options, not
# whether they're on or off. So, disable cmake's (over-sensitive here)
# dependency resolution for generated files and just rely on them being
# present (thanks to pre_generate_files) by turning DEV_MODE off.
CC=gcc cmake -D DEV_MODE=Off -D CMAKE_BUILD_TYPE:String=Asan .
# present (thanks to pre_generate_files) by turning GEN_FILES off.
CC=gcc cmake -D GEN_FILES=Off -D CMAKE_BUILD_TYPE:String=Asan .
tests/scripts/test-ref-configs.pl
}