From a8a3ff954802417d6080fb5240e8d18e803ffab0 Mon Sep 17 00:00:00 2001 From: elsid Date: Fri, 3 Feb 2023 21:11:46 +0100 Subject: [PATCH] Fix setting OPENMW_CXX_FLAGS Using ${OPENMW_CXX_FLAGS} as variable name means using underlying string value which is not correct for fixed cases. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 787d525cb9..96286bcbe6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -604,12 +604,12 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) if (CMAKE_CXX_COMPILER_ID STREQUAL Clang AND NOT APPLE) if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 3.6) - set(${OPENMW_CXX_FLAGS} "${OPENMW_CXX_FLAGS} -Wno-potentially-evaluated-expression") + set(OPENMW_CXX_FLAGS "${OPENMW_CXX_FLAGS} -Wno-potentially-evaluated-expression") endif () endif() if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.6) - set(${OPENMW_CXX_FLAGS} "${OPENMW_CXX_FLAGS} -Wno-unused-but-set-parameter") + set(OPENMW_CXX_FLAGS "${OPENMW_CXX_FLAGS} -Wno-unused-but-set-parameter") endif() endif (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)