Merge pull request #236 from pclausen/mingw32-fix

Adding fix for mingw32 compiling on windows
This commit is contained in:
Emily Bache 2021-05-25 17:30:27 +02:00 committed by GitHub
commit 1517c64964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,11 @@ target_include_directories(approvaltests
INTERFACE ${catch2_SOURCE_DIR}/single_include/catch2
)
if( MINGW )
# https://stackoverflow.com/questions/31890021/mingw-too-many-sections-bug-while-compiling-huge-header-file-in-qt
set (CMAKE_CXX_FLAGS "-Wa,-mbig-obj ")
endif()
add_executable(gildedrose_catch2
src/GildedRose.h
src/GildedRose.cc
@ -42,6 +47,8 @@ target_include_directories(gildedrose_catch2
PUBLIC src)
target_link_libraries(gildedrose_catch2 Catch2::Catch2 approvaltests)
include(CTest)
include(ParseAndAddCatchTests)
ParseAndAddCatchTests(gildedrose_catch2)