Stop redefining static_assert for C++ cross-builds
This commit is contained in:
@@ -806,12 +806,11 @@ else()
|
||||
set(STATIC_ASSERT_FLAG "-Dstatic_assert=_Static_assert")
|
||||
endif()
|
||||
|
||||
try_compile(STATIC_ASSERT_CPP_RES "${CMAKE_CURRENT_BINARY_DIR}/static-assert" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/test-static-assert.cpp" CMAKE_FLAGS -DCMAKE_CXX_STANDARD=11)
|
||||
if(STATIC_ASSERT_CPP_RES)
|
||||
set(STATIC_ASSERT_CPP_FLAG "")
|
||||
else()
|
||||
set(STATIC_ASSERT_CPP_FLAG "-Dstatic_assert=_Static_assert")
|
||||
endif()
|
||||
# Cross try_compile has been observed to incorrectly fail for some C++ toolchains
|
||||
# even though the compiler fully supports C++11 static_assert. Remapping
|
||||
# static_assert breaks modern libstdc++/Boost headers, so keep the C fallback
|
||||
# only and never redefine static_assert for C++.
|
||||
set(STATIC_ASSERT_CPP_FLAG "")
|
||||
|
||||
monero_enable_coverage()
|
||||
# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
|
||||
|
||||
Reference in New Issue
Block a user