Skip to content

Commit

Permalink
[Compile] Force GLIBCXX_USE_CXX11_ABI=1 (#799)
Browse files Browse the repository at this point in the history
* Force =1

* Update CMakeLists.txt

* Update FastDeploy.cmake.in
  • Loading branch information
jiangjiajun committed Dec 5, 2022
1 parent ffea55e commit 8b6bb17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit 8b6bb17

Please sign in to comment.