Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cross-compilation #1352

Merged
merged 1 commit into from
Dec 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions cmake/XRootDSystemCheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ compiler_define_if_found( HAVE_ET_COM_ERR_H HAVE_ET_COM_ERR_H )
#-------------------------------------------------------------------------------
# Check for the atomics
#-------------------------------------------------------------------------------
check_cxx_source_runs(
if (CMAKE_CROSSCOMPILING)
message(WARNING "Cannot detect atomics support when cross-compiling, assuming atmoics are available")
set(HAVE_ATOMICS ON)
else()
check_cxx_source_runs(
"
int main()
{
Expand All @@ -120,7 +124,9 @@ check_cxx_source_runs(
return 0;
}
"
HAVE_ATOMICS )
HAVE_ATOMICS )
endif()

option(EnableAtomicsIfPresent "EnableAtomicsIfPresent" ON)
if ( EnableAtomicsIfPresent )
compiler_define_if_found( HAVE_ATOMICS HAVE_ATOMICS )
Expand Down