Module: kamailio Branch: master Commit: bcbeb86443e1a058e1439572c93bc043517bdefd URL: https://github.com/kamailio/kamailio/commit/bcbeb86443e1a058e1439572c93bc043517bdefd
Author: Xenofon Karamanos <x...@gilawa.com> Committer: Xenofon Karamanos <x...@gilawa.com> Date: 2025-08-26T11:11:30Z cmake: Add set_if_empty function --- Modified: cmake/compiler-specific.cmake --- Diff: https://github.com/kamailio/kamailio/commit/bcbeb86443e1a058e1439572c93bc043517bdefd.diff Patch: https://github.com/kamailio/kamailio/commit/bcbeb86443e1a058e1439572c93bc043517bdefd.patch --- diff --git a/cmake/compiler-specific.cmake b/cmake/compiler-specific.cmake index db635b0dd83..88929f15f87 100644 --- a/cmake/compiler-specific.cmake +++ b/cmake/compiler-specific.cmake @@ -5,6 +5,21 @@ option(PROFILE "Enable profiling" OFF) add_library(common_compiler_flags INTERFACE) +function(set_if_empty var value) + if(DEFINED ENV{${var}} AND NOT "$ENV{${var}}" STREQUAL "") + set(${var} + ${value} + PARENT_SCOPE + ) + set(${var} "$ENV{${var}}") + else() + set(${var} + ${value} + PARENT_SCOPE + ) + endif() +endfunction() + # Define the flags for the C compiler if(TARGET_ARCH MATCHES "x86_64") _______________________________________________ Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org To unsubscribe send an email to sr-dev-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!