Skip to content

Commit 7c8eb6f

Browse files
committed
cmake: manually-specified variable to enable multilib
1 parent 80eb9e4 commit 7c8eb6f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ project(Bear
99

1010
option(ENABLE_UNIT_TESTS "Build and run unit test for this project" ON)
1111
option(ENABLE_FUNC_TESTS "Build and run functional test for this project" ON)
12+
option(ENABLE_MULTILIB "Enable to build with multilib support" OFF)
1213

1314
set(CMAKE_CXX_STANDARD 17)
1415
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -46,6 +47,7 @@ ExternalProject_Add(BearSource
4647
googletest_dependency
4748
CMAKE_ARGS
4849
-DENABLE_UNIT_TESTS:BOOL=${ENABLE_UNIT_TESTS}
50+
-DENABLE_MULTILIB:BOOL=${ENABLE_MULTILIB}
4951
-DPKG_CONFIG_EXECUTABLE:PATH=${PKG_CONFIG_EXECUTABLE}
5052
CMAKE_CACHE_ARGS
5153
-DCMAKE_PROJECT_VERSION:STRING=${CMAKE_PROJECT_VERSION}

source/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pkg_check_modules(gRPC REQUIRED IMPORTED_TARGET protobuf grpc++)
3232
if (UNIX AND NOT APPLE)
3333
set(SUPPORT_PRELOAD 1)
3434
endif()
35-
if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
35+
if (ENABLE_MULTILIB)
3636
set(SUPPORT_MULTILIB 1)
3737
endif()
3838

0 commit comments

Comments
 (0)