Skip to content

Commit 1d5577c

Browse files
committed
Suppress warnings on test script
1 parent 8272df3 commit 1d5577c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ if(TE_BUILD_TEST_RUNNER)
9898
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
9999

100100
add_executable(${CMAKE_PROJECT_NAME} ../tinyexpr.cpp tetests.cpp testingmain.cpp)
101+
# Disable specific -Werror warnings only for tetests.cpp
102+
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
103+
set_source_files_properties(
104+
tetests.cpp
105+
PROPERTIES
106+
COMPILE_OPTIONS
107+
"-Wno-error=parentheses"
108+
"-Wno-error=unused-but-set-variable")
109+
endif()
101110
if(MSVC)
102111
target_compile_definitions(${CMAKE_PROJECT_NAME} PUBLIC _DISABLE_VECTOR_ANNOTATION _DISABLE_STRING_ANNOTATION
103112
$<$<CONFIG:Release>:NDEBUG>)

0 commit comments

Comments
 (0)