You've already forked TrickyStore
mirror of
https://github.com/5ec1cff/TrickyStore.git
synced 2025-09-06 06:37:07 +00:00
module: Silent noisy cpp warnings
Mostly caused by Dobby and there is no need to take care of them. Signed-off-by: GarfieldHan <2652609017@qq.com>
This commit is contained in:
@@ -57,7 +57,26 @@ cmaker {
|
||||
cFlags += releaseFlags
|
||||
}
|
||||
}
|
||||
cppFlags += "--std=c++23"
|
||||
val commonFlags = arrayOf(
|
||||
// Silent noisy warnings
|
||||
"-Wno-reorder-ctor",
|
||||
"-Wno-overloaded-virtual",
|
||||
"-Wno-unused-function",
|
||||
"-Wno-unused-but-set-variable",
|
||||
"-Wno-unused-private-field",
|
||||
"-Wno-missing-braces",
|
||||
"-Wno-delete-non-abstract-non-virtual-dtor",
|
||||
"-Wno-unused-variable",
|
||||
"-Wno-sometimes-uninitialized",
|
||||
"-Wno-logical-op-parentheses",
|
||||
"-Wno-shift-count-overflow",
|
||||
"-Wno-deprecated-declarations",
|
||||
"-Wno-infinite-recursion",
|
||||
"-Wno-format",
|
||||
"-Wno-deprecated-volatile",
|
||||
)
|
||||
cppFlags += commonFlags
|
||||
cFlags += commonFlags
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.28)
|
||||
project(sample)
|
||||
|
||||
if (CCACHE)
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE})
|
||||
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE})
|
||||
endif ()
|
||||
|
||||
find_package(cxx REQUIRED CONFIG)
|
||||
link_libraries(cxx::cxx)
|
||||
|
||||
find_program(CCACHE ccache)
|
||||
|
||||
set(LINKER_FLAGS "-ffixed-x18 -Wl,--hash-style=both")
|
||||
|
||||
set(CXX_FLAGS "${CXX_FLAGS} -fno-exceptions -fno-rtti")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAGS}")
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
|
||||
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINKER_FLAGS}")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${LINKER_FLAGS}")
|
||||
|
||||
Reference in New Issue
Block a user