Skip to content

Commit d37fc7a

Browse files
committed
Merge pull request #10235
c55949d cmake: don't redefine static_assert for cxx (tobtoht)
2 parents 1d8f5d8 + c55949d commit d37fc7a

File tree

2 files changed

+1
-42
lines changed

2 files changed

+1
-42
lines changed

CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -768,13 +768,6 @@ include(CheckTrezor)
768768
set(STATIC_ASSERT_FLAG "-Dstatic_assert=_Static_assert")
769769
endif()
770770

771-
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)
772-
if(STATIC_ASSERT_CPP_RES)
773-
set(STATIC_ASSERT_CPP_FLAG "")
774-
else()
775-
set(STATIC_ASSERT_CPP_FLAG "-Dstatic_assert=_Static_assert")
776-
endif()
777-
778771
monero_enable_coverage()
779772
# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
780773
# is fixed in the code (Issue #847), force compiler to be conservative.
@@ -859,7 +852,7 @@ include(CheckTrezor)
859852
message(STATUS "Using linker security hardening flags: ${LD_SECURITY_FLAGS}")
860853

861854
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${PIC_FLAG} ${C_SECURITY_FLAGS}")
862-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_CPP_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${PIC_FLAG} ${CXX_SECURITY_FLAGS}")
855+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${PIC_FLAG} ${CXX_SECURITY_FLAGS}")
863856
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS}")
864857

865858
# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that

cmake/test-static-assert.cpp

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)