Skip to content

Commit

Permalink
Apply flag only to debug mode (#51)
Browse files Browse the repository at this point in the history
This problem occurs in MSVC Debug mode only. Thus, we only add the required in debug mode only.
  • Loading branch information
franziska-wegner authored Dec 26, 2023
1 parent 04a58a8 commit 9fb0083
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmake/CompilerConfiguration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@ set(PEDANTIC_FLAGS "-pedantic")
# Microsoft Visual Studio ##########################################
####################################################################
if(MSVC)
# D:\a\egoa\egoa\tests\DataStructures\Graphs\TestGraph.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj [D:\a\egoa\egoa\build\tests\TestGraph.vcxproj]
add_definitions(/MP /DNOMINMAX /bigobj)
add_definitions(/MP /DNOMINMAX)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
# D:\a\egoa\egoa\tests\DataStructures\Graphs\TestGraph.cpp : fatal
# error C1128: number of sections exceeded object file format limit:
# compile with /bigobj [D:\a\egoa\egoa\build\tests\TestGraph.vcxproj]
add_definitions(/bigobj)
endif()
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /Debug:fastlink")
# https://docs.microsoft.com/en-us/cpp/build/reference/wx-treat-linker-warnings-as-errors?view=vs-2019
set(EGOA_WARNINGS_AS_ERRORS_FLAG "/WX")
Expand Down

0 comments on commit 9fb0083

Please sign in to comment.