Skip to content

Commit ed7081d

Browse files
authored
exclude linking to lib rt for QNX to avoid linking error (#2114)
1 parent 03325ca commit ed7081d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,12 @@ include(CheckCXXCompilerFlag)
133133
include(CheckLibraryExists)
134134
include(CXXFeatureCheck)
135135

136-
check_library_exists(rt shm_open "" HAVE_LIB_RT)
136+
# Check for rt library, but explicitly disable for QNX
137+
if(QNXNTO)
138+
set(HAVE_LIB_RT FALSE)
139+
else()
140+
check_library_exists(rt shm_open "" HAVE_LIB_RT)
141+
endif()
137142

138143
if (BENCHMARK_BUILD_32_BITS)
139144
add_required_cxx_compiler_flag(-m32)

0 commit comments

Comments
 (0)