Skip to content

Commit

Permalink
cmake: Fix Windows build in CI
Browse files Browse the repository at this point in the history
This is a modified version of one of the sed hack from devops to fix the
Windows build.
  • Loading branch information
abinavpp committed Jan 15, 2024
1 parent 0d3b7b1 commit 9f27df0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/EthCompilerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
endif()

# The major alternative compiler to GCC/Clang is Microsoft's Visual C++ compiler, only available on Windows.
elseif (DEFINED MSVC)
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Windows") # FIXME: This breaks the MSVC build

add_compile_options(/MP) # enable parallel compilation
add_compile_options(/EHsc) # specify Exception Handling Model in msvc
Expand All @@ -183,6 +183,7 @@ elseif (DEFINED MSVC)
# warning LNK4099: pdb was not found with lib
# stack size 16MB
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4099,4075 /STACK:16777216")
endif()

# If you don't have GCC, Clang or VC++ then you are on your own. Good luck!
else ()
Expand Down

0 comments on commit 9f27df0

Please sign in to comment.