From 2d06b3b8feedb04849bd0de2121e33e0c2242ab3 Mon Sep 17 00:00:00 2001 From: theskywinds Date: Fri, 13 Jun 2025 10:46:34 +0200 Subject: [PATCH] Removed broken windows support. --- CMakeLists.txt | 69 +++++++++++--------------------------------------- 1 file changed, 15 insertions(+), 54 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 578765a..09865b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,59 +13,20 @@ find_package(pugixml CONFIG REQUIRED) target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE libs) target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE pugixml::static pugixml::pugixml) -# Check if we're using MinGW or compiling for Windows -if(MINGW OR WIN32) - # Windows/MinGW specific settings - target_compile_options(${PROJECT_NAME} PRIVATE - # Make all warnings into errors - -Werror +target_compile_options(${PROJECT_NAME} PRIVATE + # Make all warnings into errors + -Werror - # Basic warning flags - -Wall # Enable all common warnings - -Wextra # Enable extra warnings not covered by -Wall - -Wpedantic # Issue warnings demanded by strict ISO C and ISO C++ - -pedantic-errors # Like -Wpedantic but errors instead of warnings + # Basic warning flags + -Wall # Enable all common warnings + -Wextra # Enable extra warnings not covered by -Wall + -Wpedantic # Issue warnings demanded by strict ISO C and ISO C++ + -pedantic-errors # Like -Wpedantic but errors instead of warnings - # Specific warning categories - -Wshadow # Warn when a variable declaration shadows another - -Wcast-align # Warn for potential performance problems from memory alignment - -Wconversion # Warn on type conversions that may lose data - -Wsign-conversion # Warn on sign conversions - -Wnull-dereference # Warn about null pointer dereference - - # MinGW/Windows specific flags - -static-libgcc # Link libgcc statically - -static-libstdc++ # Link libstdc++ statically - ) - - # Windows-specific linker flags - target_link_options(${PROJECT_NAME} PRIVATE - -static # Create a static executable - -Wl,--no-undefined # Don't allow undefined symbols - ) - - # Define Windows macros if needed - target_compile_definitions(${PROJECT_NAME} PRIVATE - WIN32_LEAN_AND_MEAN # Exclude rarely-used stuff from Windows headers - NOMINMAX # Prevent Windows.h from defining min/max macros - ) -else() - # Linux/Unix specific settings - target_compile_options(${PROJECT_NAME} PRIVATE - # Make all warnings into errors - -Werror - - # Basic warning flags - -Wall # Enable all common warnings - -Wextra # Enable extra warnings not covered by -Wall - -Wpedantic # Issue warnings demanded by strict ISO C and ISO C++ - -pedantic-errors # Like -Wpedantic but errors instead of warnings - - # Specific warning categories - -Wshadow # Warn when a variable declaration shadows another - -Wcast-align # Warn for potential performance problems from memory alignment - -Wconversion # Warn on type conversions that may lose data - -Wsign-conversion # Warn on sign conversions - -Wnull-dereference # Warn about null pointer dereference - ) -endif() \ No newline at end of file + # Specific warning categories + -Wshadow # Warn when a variable declaration shadows another + -Wcast-align # Warn for potential performance problems from memory alignment + -Wconversion # Warn on type conversions that may lose data + -Wsign-conversion # Warn on sign conversions + -Wnull-dereference # Warn about null pointer dereference +) \ No newline at end of file