Skip to content

Commit fa4b739

Browse files
committed
fix -latomic test for complex cases
1 parent aa74dbd commit fa4b739

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/modules/SearchInstalledSoftware.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2184,13 +2184,16 @@ endif()
21842184
check_cxx_source_compiles("
21852185
#include <atomic>
21862186
#include <cstdint>
2187+
struct S { int a[100]; };
21872188
int main() {
21882189
std::atomic<int> a1;
21892190
int a1val = a1.load();
21902191
(void)a1val;
21912192
std::atomic<uint64_t> a2;
21922193
uint64_t a2val = a2.load(std::memory_order_relaxed);
21932194
(void)a2val;
2195+
std::atomic<S> s;
2196+
(void)s.is_lock_free();
21942197
return 0;
21952198
}
21962199
" ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB)

0 commit comments

Comments
 (0)