From 15062f3443e12de421d8a526f26a0dbd813d34a6 Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Tue, 6 Aug 2013 18:32:53 -0500 Subject: [PATCH] Add a cmake option for disabling usage of atomics. Without this, if a platform has atomics support detected, there isn't any simple way for a developer to disable them for debugging purposes. --- cmake/XRootDSystemCheck.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 () +