From e99cdd8d75621da31035dc0771702fa1fe8a6753 Mon Sep 17 00:00:00 2001 From: jose_morato Date: Fri, 4 Oct 2024 17:50:21 +0200 Subject: [PATCH] append CMAKE_CXX_FLAGS_RELEASE --- Native/CMakeListsTemplate.txt | 4 +--- Native/OpenDDSWrapper/CMakeLists.txt | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Native/CMakeListsTemplate.txt b/Native/CMakeListsTemplate.txt index b6a0e594..73615b36 100644 --- a/Native/CMakeListsTemplate.txt +++ b/Native/CMakeListsTemplate.txt @@ -18,11 +18,9 @@ add_library(${PROJECT_NAME} SHARED ${WRAPPER_FILES}) if(MSVC) add_compile_options(/bigobj /wd4190) - add_compile_definitions(NDEBUG) - add_compile_definitions(NOMINMAX) add_compile_definitions(_CRT_SECURE_NO_WARNINGS) add_compile_definitions(_WINSOCK_DEPRECATED_NO_WARNINGS) - set(CMAKE_CXX_FLAGS_RELEASE "/O2 /Oi /D NDEBUG /MT") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2 /Oi /D NDEBUG /D NOMINMAX /MT") elseif(APPLE) target_compile_options(${PROJECT_NAME} PUBLIC -Wno-switch -Wno-return-type-c-linkage -Wno-tautological-pointer-compare -Wpointer-arith -pthread) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG") diff --git a/Native/OpenDDSWrapper/CMakeLists.txt b/Native/OpenDDSWrapper/CMakeLists.txt index cfdd3802..0dec39ec 100644 --- a/Native/OpenDDSWrapper/CMakeLists.txt +++ b/Native/OpenDDSWrapper/CMakeLists.txt @@ -71,10 +71,9 @@ add_library(OpenDDSWrapper SHARED if (MSVC) add_compile_options(/bigobj /wd4190) - add_compile_definitions(NOMINMAX) add_compile_definitions(_CRT_SECURE_NO_WARNINGS) add_compile_definitions(_WINSOCK_DEPRECATED_NO_WARNINGS) - set(CMAKE_CXX_FLAGS_RELEASE "/O2 /Oi /D NDEBUG /MT") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2 /Oi /D NDEBUG /D NOMINMAX /MT") elseif (APPLE) target_compile_options(OpenDDSWrapper PUBLIC -Wpointer-arith -Wno-switch -Wno-return-type-c-linkage -Wno-tautological-pointer-compare -pthread) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG")