Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Compile] Force GLIBCXX_USE_CXX11_ABI=1 #799

Merged
merged 3 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ include(${PROJECT_SOURCE_DIR}/cmake/utils.cmake)
if(NOT MSVC)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "-Wno-format")
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1)
endif(NOT MSVC)

if(UNIX AND (NOT APPLE) AND (NOT ANDROID) AND (NOT ENABLE_TIMVX))
Expand Down
7 changes: 5 additions & 2 deletions FastDeploy.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ list(APPEND FASTDEPLOY_INCS ${CMAKE_CURRENT_LIST_DIR}/include)
# Note(zhoushunjie): include some useful utils function
include(${CMAKE_CURRENT_LIST_DIR}/utils.cmake)

if(NOT CMAKE_CXX_STANDARD)
# Set C++11 as standard for the whole project
if(NOT MSVC)
set(CMAKE_CXX_STANDARD 11)
endif()
set(CMAKE_CXX_FLAGS "-Wno-format")
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1)
endif(NOT MSVC)

if(ANDROID)
add_library(fastdeploy STATIC IMPORTED GLOBAL)
Expand Down