Skip to content

Commit

Permalink
Issue #800: Fix unknown compile option -Wno-literal-suffix for clang (
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek authored Oct 26, 2022
1 parent f8d758b commit c1c2651
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/c_unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
# -fno-inline: just to be extra sure, no particular reason so far
# -fno-builtin: GCC would optimize e.g. abs() and we would not be able to stub
# -Wno-literal-suffix allows compiling string literals such as "[C%"PRIu64"]" as C++
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD_FLAGS} -fno-inline -fno-builtin -fno-stack-protector -Wno-literal-suffix")
set(CXX_WARNING_GNU "-Wno-literal-suffix")
set(CXX_WARNING_Clang "-Wno-error=reserved-user-defined-literal") # https://sourcecodeartisan.com/2021/03/06/invalid-suffix-on-literal.html
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD_FLAGS} -fno-inline -fno-builtin -fno-stack-protector ${CXX_WARNING_${CMAKE_C_COMPILER_ID}}")

if(NOT dw_lib)
add_compile_definitions("QD_SKIP_LIBDW_TESTS")
Expand Down

0 comments on commit c1c2651

Please sign in to comment.