mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-10-21 16:17:57 +00:00
cmake_package_install: Fail in case of warnings with GNU GCC
Fail the cmake package install demonstration in case of warnings when building the cmake_package_install executable. This would have caught the library installation issue reported in #10022. Signed-off-by: Ronald Cron <[email protected]>
This commit is contained in:
@@ -37,5 +37,11 @@ find_package(MbedTLS REQUIRED)
|
|||||||
#
|
#
|
||||||
|
|
||||||
add_executable(cmake_package_install cmake_package_install.c)
|
add_executable(cmake_package_install cmake_package_install.c)
|
||||||
|
|
||||||
|
string(REGEX MATCH "GNU" CMAKE_COMPILER_IS_GNU "${CMAKE_C_COMPILER_ID}")
|
||||||
|
if(CMAKE_COMPILER_IS_GNU)
|
||||||
|
target_compile_options(cmake_package_install PRIVATE -Wall -Werror)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(cmake_package_install
|
target_link_libraries(cmake_package_install
|
||||||
MbedTLS::mbedtls MbedTLS::mbedx509 MbedTLS::tfpsacrypto)
|
MbedTLS::mbedtls MbedTLS::mbedx509 MbedTLS::tfpsacrypto)
|
||||||
|
|||||||
Reference in New Issue
Block a user