build: check TINYMITM_LOGS From cache, use target compile def
This commit is contained in:
+5
-5
@@ -17,10 +17,6 @@ if (TINYMITM_TEST)
|
|||||||
set(TINYMITM_LOGS ON CACHE BOOL "" FORCE)
|
set(TINYMITM_LOGS ON CACHE BOOL "" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (TINYMITM_LOGS)
|
|
||||||
add_compile_definitions(TINYMITM_LOGS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# ---------------------
|
# ---------------------
|
||||||
# external dependencies
|
# external dependencies
|
||||||
# ---------------------
|
# ---------------------
|
||||||
@@ -38,7 +34,7 @@ FetchContent_Declare(
|
|||||||
|
|
||||||
# seallib config
|
# seallib config
|
||||||
set(SEALLIB_EVENTS ON CACHE BOOL "" FORCE)
|
set(SEALLIB_EVENTS ON CACHE BOOL "" FORCE)
|
||||||
if (TINYMITM_LOGS)
|
if (TINYMITM_LOGS OR $CACHE{TINYMITM_LOGS})
|
||||||
set(SEALLIB_LOG ON CACHE BOOL "" FORCE)
|
set(SEALLIB_LOG ON CACHE BOOL "" FORCE)
|
||||||
endif()
|
endif()
|
||||||
FetchContent_GetProperties(seallib)
|
FetchContent_GetProperties(seallib)
|
||||||
@@ -81,6 +77,10 @@ target_link_libraries(tinymitm PRIVATE tinymitm-warnings)
|
|||||||
target_link_libraries(tinymitm PUBLIC seallib wolfssl)
|
target_link_libraries(tinymitm PUBLIC seallib wolfssl)
|
||||||
set_target_properties(tinymitm PROPERTIES CXX_EXTENSIONS OFF)
|
set_target_properties(tinymitm PROPERTIES CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
|
if (TINYMITM_LOGS OR $CACHE{TINYMITM_LOGS})
|
||||||
|
target_compile_definitions(tinymitm PUBLIC TINYMITM_LOGS)
|
||||||
|
endif()
|
||||||
|
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
# test
|
# test
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user