(Automated Tests) Remove build error for gcc-14 : std::find_if return value nodiscard 28/320328/2
authorEunki Hong <eunkiki.hong@samsung.com>
Wed, 26 Feb 2025 15:32:06 +0000 (00:32 +0900)
committerEunki Hong <eunkiki.hong@samsung.com>
Tue, 18 Mar 2025 12:33:15 +0000 (21:33 +0900)
Since std::find_if return value has no discard option for latest compiler,
automated-tests compile failed due to [-Werror=unused-result]

Change-Id: I35c0b59d0ebf2a53b6f816f0cac9d622fe1a70ae
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
automated-tests/CMakeLists.txt.in

index b79475b621314879cb9d2c11bb34aa15413909e6..ea6687c7df7eaf58b2e8ee54d1ffa4764f69dad8 100644 (file)
@@ -14,4 +14,12 @@ INCLUDE_DIRECTORIES(
        src/common
 )
 
+# Ignore some warning options
+INCLUDE(CheckCXXCompilerFlag)
+
+CHECK_CXX_COMPILER_FLAG(-Wno-unused-result HAVE_NO_UNUSED_RESULT)
+IF (HAVE_NO_UNUSED_RESULT)
+  ADD_COMPILE_OPTIONS( -Wno-unused-result )
+ENDIF()
+
 ADD_SUBDIRECTORY(src)