mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-01 13:20:30 +00:00
Allow cmake to generate error.c
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
f7946a6210
commit
cbdedc54b9
@ -109,6 +109,24 @@ set(src_tls
|
|||||||
ssl_tls13_generic.c
|
ssl_tls13_generic.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
find_package(Perl REQUIRED)
|
||||||
|
|
||||||
|
file(GLOB error_headers ${CMAKE_CURRENT_SOURCE_DIR}/../include/mbedtls/*.h)
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/error.c
|
||||||
|
COMMAND
|
||||||
|
${PERL_EXECUTABLE}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../scripts/generate_errors.pl
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../include/mbedtls
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../scripts/data_files
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/error.c
|
||||||
|
DEPENDS
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../scripts/generate_errors.pl
|
||||||
|
${error_headers}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../scripts/data_files/error.fmt
|
||||||
|
)
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations -Wmissing-prototypes")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations -Wmissing-prototypes")
|
||||||
endif(CMAKE_COMPILER_IS_GNUCC)
|
endif(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user