Skip to content

Commit

Permalink
append CMAKE_CXX_FLAGS_RELEASE
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmorato committed Oct 4, 2024
1 parent d773d5a commit e99cdd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions Native/CMakeListsTemplate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 1 addition & 2 deletions Native/OpenDDSWrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit e99cdd8

Please sign in to comment.