cmake: re-enable warnings on windows, organize common

This commit is contained in:
brainiac 2025-12-28 02:17:58 -08:00
parent 94ca0c44d1
commit 82f9f7a02a
2 changed files with 6 additions and 22 deletions

View File

@ -20,7 +20,7 @@ endif()
project(EQEmu
VERSION 24.10.3
LANGUAGES CXX
LANGUAGES CXX
)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
@ -42,10 +42,10 @@ option(EQEMU_BUILD_PCH "Build with precompiled headers (Windows)" ON)
if(MSVC)
add_compile_options(/bigobj)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS NOMINMAX CRASH_LOGGING _HAS_AUTO_PTR_ETC)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS NOMINMAX WIN32_LEAN_AND_MEAN CRASH_LOGGING _HAS_AUTO_PTR_ETC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
option(EQEMU_DISABLE_MSVC_WARNINGS "Disable MSVC compile warnings." ON)
option(EQEMU_DISABLE_MSVC_WARNINGS "Disable MSVC compile warnings." OFF)
if(EQEMU_DISABLE_MSVC_WARNINGS)
add_compile_options(/W0 /wd4005 /wd4996 /nologo /Os)
endif()

View File

@ -725,25 +725,9 @@ set(common_headers
zone_store.h
)
# Source Groups (Regex based for automatic subdirectory handling)
source_group("CLI" REGULAR_EXPRESSION "^cli/")
source_group("Content" REGULAR_EXPRESSION "^content/")
source_group("Cron" REGULAR_EXPRESSION "^cron/")
source_group("Database" REGULAR_EXPRESSION "^database/")
source_group("Discord" REGULAR_EXPRESSION "^discord/")
source_group("Event" REGULAR_EXPRESSION "^event/")
source_group("Events" REGULAR_EXPRESSION "^events/")
source_group("Http" REGULAR_EXPRESSION "^http/")
source_group("Json" REGULAR_EXPRESSION "^json/")
source_group("Memory" REGULAR_EXPRESSION "^memory/")
source_group("Net" REGULAR_EXPRESSION "^net/")
source_group("Patches" REGULAR_EXPRESSION "^patches/")
source_group("Process" REGULAR_EXPRESSION "^process/")
source_group("Repositories" REGULAR_EXPRESSION "^repositories/")
source_group("StackWalker" REGULAR_EXPRESSION "^StackWalker/")
source_group("Stacktrace" REGULAR_EXPRESSION "^stacktrace/")
source_group("Termcolor" REGULAR_EXPRESSION "^termcolor/")
source_group("Util" REGULAR_EXPRESSION "^util/")
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${common_sources})
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Header Files" FILES ${common_headers})
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}/repositories" PREFIX "Repositories" FILES ${repositories})
option(EQEMU_ADD_PROFILER "Link with Google perftools profiler" OFF)
#PRNG options