From cb496a2cd46a4c6798bb71a8046ae599aeb9d353 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 3 May 2022 14:58:08 +0300 Subject: [PATCH] Relax cmake check for CFLAGS/CXXFLAGS/LDFLAGS Fixes: #36854 Signed-off-by: Azat Khuzhin --- PreLoad.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PreLoad.cmake b/PreLoad.cmake index 10e719b1db2..793207e1e31 100644 --- a/PreLoad.cmake +++ b/PreLoad.cmake @@ -20,7 +20,9 @@ if (NOT DEFINED ENV{CLION_IDE} AND NOT DEFINED ENV{XCODE_IDE}) endif() # Check if environment is polluted. -if (DEFINED ENV{CFLAGS} OR DEFINED ENV{CXXFLAGS} OR DEFINED ENV{LDFLAGS} +if (NOT $ENV{CFLAGS} STREQUAL "" + OR NOT $ENV{CXXFLAGS} STREQUAL "" + OR NOT $ENV{LDFLAGS} STREQUAL "" OR CMAKE_C_FLAGS OR CMAKE_CXX_FLAGS OR CMAKE_EXE_LINKER_FLAGS OR CMAKE_SHARED_LINKER_FLAGS OR CMAKE_MODULE_LINKER_FLAGS OR CMAKE_C_FLAGS_INIT OR CMAKE_CXX_FLAGS_INIT OR CMAKE_EXE_LINKER_FLAGS_INIT OR CMAKE_SHARED_LINKER_FLAGS_INIT OR CMAKE_MODULE_LINKER_FLAGS_INIT)