From 27a4b067ff43710964f4b7e1e816d9a6adaddd8f Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 23 Jul 2018 19:13:29 +0300 Subject: [PATCH] 0029980: Configuration, CMake - impossible to override CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS Variables are not assigning only if have not been previously defined. --- adm/cmake/occt_defs_flags.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake index 09da18d382..c722d1482a 100644 --- a/adm/cmake/occt_defs_flags.cmake +++ b/adm/cmake/occt_defs_flags.cmake @@ -86,8 +86,13 @@ if (MSVC AND (MSVC_VERSION GREATER 1400)) endif() # generate a single response file which enlist all of the object files -SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1) -SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1) +if (NOT DEFINED CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS) + SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1) +endif() +if (NOT DEFINED CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS) + SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1) +endif() + # increase compiler warnings level (-W4 for MSVC, -Wextra for GCC) if (MSVC) if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")