From bd3366407159a2b2d77b15aa0c0b9929e3b94b8b Mon Sep 17 00:00:00 2001 From: walbourn Date: Sun, 27 Nov 2022 12:24:29 -0800 Subject: [PATCH] Update CMake test presets for MinGW --- CMakeLists.txt | 6 ++---- CMakePresets.json | 11 ++++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c8c924d4..647a9318 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 $,_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() diff --git a/CMakePresets.json b/CMakePresets.json index 133cc323..6cff8d4a 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -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", @@ -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", @@ -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" } ] } \ No newline at end of file