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>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c34da9..b0ece2a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,7 +46,7 @@
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}")
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index f3b93fb..18aff5a 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -109,7 +109,7 @@
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)
diff --git a/programs/psa/CMakeLists.txt b/programs/psa/CMakeLists.txt
index fd8eeea..26ca73c 100644
--- a/programs/psa/CMakeLists.txt
+++ b/programs/psa/CMakeLists.txt
@@ -4,7 +4,7 @@
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 @@
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)
diff --git a/programs/ssl/CMakeLists.txt b/programs/ssl/CMakeLists.txt
index 066940e..280bbcf 100644
--- a/programs/ssl/CMakeLists.txt
+++ b/programs/ssl/CMakeLists.txt
@@ -18,7 +18,7 @@
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 @@
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}
diff --git a/programs/test/CMakeLists.txt b/programs/test/CMakeLists.txt
index 94331b8..142a831 100644
--- a/programs/test/CMakeLists.txt
+++ b/programs/test/CMakeLists.txt
@@ -27,7 +27,7 @@
target_link_libraries(cpp_dummy_build ${mbedcrypto_target})
endif()
-if(DEV_MODE)
+if(GEN_FILES)
find_package(Perl REQUIRED)
add_custom_command(
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 0bd94ba..41dceed 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -34,7 +34,7 @@
list(APPEND generated_data_files ${CMAKE_CURRENT_BINARY_DIR}/${file})
endforeach()
-if(DEV_MODE)
+if(GEN_FILES)
add_custom_command(
OUTPUT
${generated_data_files}
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index f0e9a7d..595b1ba 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -1007,8 +1007,8 @@
# 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
}