mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Clean up CompilerOptions.cmake
This commit is contained in:
@ -32,7 +32,7 @@ endif()
|
||||
include(GNUInstallDirs)
|
||||
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
# Compiler options (MSVC flags, NOMINMAX, etc.)
|
||||
# Compiler options (MSVC flags)
|
||||
include(cmake/CompilerOptions.cmake)
|
||||
|
||||
# --- Build options ---
|
||||
|
||||
@ -1,20 +1,11 @@
|
||||
# Compiler options for YACReader
|
||||
# Mirrors config.pri: C++20, NOMINMAX, MSVC conformance flags
|
||||
|
||||
add_compile_definitions(NOMINMAX)
|
||||
|
||||
if(MSVC)
|
||||
# Prevent windows.h from defining min/max macros that conflict with
|
||||
# std::min, std::max, std::numeric_limits<T>::max(), etc.
|
||||
add_compile_definitions(NOMINMAX)
|
||||
|
||||
# /Zc:__cplusplus: report correct __cplusplus value
|
||||
# /permissive-: strict standard conformance
|
||||
add_compile_options(/Zc:__cplusplus /permissive-)
|
||||
|
||||
# Release optimizations (mirrors qmake QMAKE_CXXFLAGS_RELEASE)
|
||||
string(APPEND CMAKE_CXX_FLAGS_RELEASE " /DNDEBUG")
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
string(APPEND CMAKE_CXX_FLAGS_RELEASE " -DNDEBUG")
|
||||
endif()
|
||||
|
||||
# Qt deprecation warnings
|
||||
add_compile_definitions(
|
||||
QT_DEPRECATED_WARNINGS
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user