Skip to content

Commit 67c67f4

Browse files
Fixed clang warnings in ndk_helper
1 parent 0320f3d commit 67c67f4

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

NativeApp/Android/ndk_helper/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ PUBLIC
3434
native_app_glue
3535
)
3636

37+
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
38+
# WARNING: set_source_files_properties() does not append
39+
# properties, but overwrites them!
40+
# NOTE: target_compile_options() adds the option before -Werror, which has no effect
41+
set_property(SOURCE ${SOURCE}
42+
APPEND_STRING PROPERTY
43+
COMPILE_FLAGS " -Wno-deprecated-copy"
44+
)
45+
endif()
46+
3747
source_group("src" FILES ${SOURCE})
3848
source_group("include" FILES ${INCLUDE})
3949

NativeApp/Android/ndk_helper/include/NDKHelper.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919

2020
#define NDK_HELPER_VERSION "0.90"
2121

22+
#pragma clang diagnostic push
23+
#pragma clang diagnostic ignored "-Wdeprecated-copy"
24+
2225
/******************************************************************
2326
* NDK support helpers
2427
* Utility module to provide misc functionalities that is used widely in native
@@ -39,4 +42,7 @@
3942
#include "perfMonitor.h" // FPS counter
4043
#include "sensorManager.h" // SensorManager
4144
#include "interpolator.h" // Interpolator
45+
46+
#pragma clang diagnostic pop
47+
4248
#endif

0 commit comments

Comments
 (0)