From 8739623a08d132b6b547d7268c7acdacb9bee2e1 Mon Sep 17 00:00:00 2001 From: Username404 Date: Tue, 10 Aug 2021 10:44:17 +0200 Subject: [PATCH] Move the Clang flags to the CMAKE_CXX_FLAGS_RELEASE, and add another flag. --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ea944a..9f46c91 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,8 +57,7 @@ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang) if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${MINIMAL_CLANG}) message(FATAL_ERROR "Clang ${MINIMAL_CLANG} or higher is required.") endif() - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") - set(CMAKE_CXX_FLAGS "-fwhole-program-vtables ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fwhole-program-vtables -fstrict-vtable-pointers") endif() if (MINGW OR MSVC)