Skip to content

Commit 4b47231

Browse files
authored
Only need libunwind for testing (#2093)
### Description of changes: * Libunwind is only needed when building tests. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
1 parent 6aa30a9 commit 4b47231

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ if(NOT DISABLE_PERL)
145145
find_package(Perl REQUIRED)
146146
endif()
147147

148-
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND NOT CMAKE_CROSSCOMPILING)
148+
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND BUILD_TESTING AND NOT CMAKE_CROSSCOMPILING)
149149
find_package(PkgConfig QUIET)
150150
if (PkgConfig_FOUND)
151151
pkg_check_modules(LIBUNWIND libunwind-generic)

0 commit comments

Comments
 (0)