Skip to content

Commit de35976

Browse files
committed
fix(gcc): try -fabi-compat-version
1 parent 5dc0f90 commit de35976

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ else()
102102
add_compile_options(-Wall -Wextra -pedantic -Werror)
103103
endif()
104104

105+
# Workaround name mangling compatibility in GCC.
106+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
107+
add_compile_options(-fabi-compat-version=19)
108+
endif()
109+
105110
function(add_bigobj_flag target)
106111
if(MSVC)
107112
# MSVC requires the /bigobj flag if the number of sections gets too big.

samples/today/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ cmake_minimum_required(VERSION 3.28)
77
add_subdirectory(schema)
88
add_library(todaygraphql STATIC TodayMock.cpp)
99
target_compile_features(todaygraphql PUBLIC cxx_std_20)
10-
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
11-
target_compile_options(todaygraphql PUBLIC "-fabi-version=0")
12-
endif()
1310
target_link_libraries(todaygraphql PUBLIC today_schema)
1411
target_sources(todaygraphql PUBLIC FILE_SET CXX_MODULES
1512
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}
@@ -19,9 +16,6 @@ target_sources(todaygraphql PUBLIC FILE_SET CXX_MODULES
1916
add_subdirectory(nointrospection)
2017
add_library(todaygraphql_nointrospection STATIC TodayMock.cpp)
2118
target_compile_features(todaygraphql_nointrospection PUBLIC cxx_std_20)
22-
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
23-
target_compile_options(todaygraphql_nointrospection PUBLIC "-fabi-version=0")
24-
endif()
2519
target_link_libraries(todaygraphql_nointrospection PUBLIC today_nointrospection_schema)
2620
target_sources(todaygraphql_nointrospection PUBLIC FILE_SET CXX_MODULES
2721
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}

0 commit comments

Comments
 (0)