diff --git a/cmake/XRootDSystemCheck.cmake b/cmake/XRootDSystemCheck.cmake index 0c741c60dbb..36247dcb7f6 100644 --- a/cmake/XRootDSystemCheck.cmake +++ b/cmake/XRootDSystemCheck.cmake @@ -118,4 +118,8 @@ check_cxx_source_runs( } " HAVE_ATOMICS ) -compiler_define_if_found( HAVE_ATOMICS HAVE_ATOMICS ) +option(EnableAtomicsIfPresent "EnableAtomicsIfPresent" ON) +if ( EnableAtomicsIfPresent ) + compiler_define_if_found( HAVE_ATOMICS HAVE_ATOMICS ) +endif () +