Skip to content

Commit 10a431a

Browse files
a3d4Leo Alt
authored andcommitted
Enable asserts in MSVC RelWithDebInfo configuration
1 parent e3e77c0 commit 10a431a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmake/EthCompilerSettings.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
151151

152152
# The major alternative compiler to GCC/Clang is Microsoft's Visual C++ compiler, only available on Windows.
153153
elseif (DEFINED MSVC)
154+
# Remove NDEBUG from RELWITHDEBINFO (to enable asserts)
155+
string(REPLACE "/DNDEBUG" " " CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
154156

155-
add_compile_options(/MP) # enable parallel compilation
157+
add_compile_options(/MP) # enable parallel compilation
156158
add_compile_options(/EHsc) # specify Exception Handling Model in msvc
157159
add_compile_options(/WX) # enable warnings-as-errors
158160
add_compile_options(/wd4068) # disable unknown pragma warning (4068)

0 commit comments

Comments
 (0)