Skip to content

Commit

Permalink
Update CMake test presets for MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Nov 27, 2022
1 parent 92fa6c6 commit bd33664
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,13 @@ if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
foreach(t IN LISTS TOOL_EXES)
target_compile_options(${t} PRIVATE ${WarningsEXE})
endforeach()
endif()
if(MINGW)
elseif(MINGW)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_definitions(${t} PRIVATE $<IF:$<CONFIG:DEBUG>,_DEBUG,NDEBUG>)
target_compile_options(${t} PRIVATE -Wno-ignored-attributes)
target_link_options(${t} PRIVATE -municode)
endforeach()
endif()
if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
elseif ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE /sdl /permissive- /JMC- /Zc:__cplusplus)
endforeach()
Expand Down
11 changes: 8 additions & 3 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"name": "MinGW32",
"hidden": true,
"environment": {
"PATH": "$penv{PATH};c:/mingw32/bin"
"PATH": "$penv{PATH};c:/mingw32/bin;c:/mingw32/libexec/gcc/i686-w64-mingw32/12.2.0"
},
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x86-mingw-static",
Expand All @@ -144,7 +144,7 @@
"name": "MinGW64",
"hidden": true,
"environment": {
"PATH": "$penv{PATH};c:/mingw64/bin"
"PATH": "$penv{PATH};c:/mingw64/bin;c:/mingw64/libexec/gcc/x86_64-w64-mingw32/12.2.0"
},
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-mingw-static",
Expand Down Expand Up @@ -227,6 +227,11 @@
{ "name": "x86-Debug-Clang" , "configurePreset": "x86-Debug-Clang" },
{ "name": "x86-Release-Clang" , "configurePreset": "x86-Release-Clang" },
{ "name": "arm64-Debug-Clang" , "configurePreset": "arm64-Debug-Win10-Clang" },
{ "name": "arm64-Release-Clang", "configurePreset": "arm64-Release-Win10-Clang" }
{ "name": "arm64-Release-Clang", "configurePreset": "arm64-Release-Win10-Clang" },

{ "name": "x64-Debug-MinGW" , "configurePreset": "x64-Debug-MinGW" },
{ "name": "x64-Release-MinGW" , "configurePreset": "x64-Release-MinGW" },
{ "name": "x86-Debug-MinGW" , "configurePreset": "x86-Debug-MinGW" },
{ "name": "x86-Release-MinGW" , "configurePreset": "x86-Release-MinGW" }
]
}

0 comments on commit bd33664

Please sign in to comment.