CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
88 lines
2.9 KiB
CMake
88 lines
2.9 KiB
CMake
include(HandleFlags)
|
|
|
|
# Warning flags ===============================================================
|
|
function(cxx_add_warning_flags target enable_werror enable_pedantic)
|
|
target_compile_definitions(${target} PRIVATE -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
|
if (MSVC)
|
|
# -W4 is the cl.exe/clang-cl equivalent of -Wall. (In cl.exe and clang-cl,
|
|
# -Wall is equivalent to -Weverything in GCC style compiler drivers.)
|
|
target_add_compile_flags_if_supported(${target} PRIVATE -W4)
|
|
else()
|
|
target_add_compile_flags_if_supported(${target} PRIVATE -Wall)
|
|
endif()
|
|
# TODO: Should -Wconversion be enabled?
|
|
target_add_compile_flags_if_supported(${target} PRIVATE
|
|
-Wextra
|
|
-Wnewline-eof
|
|
-Wshadow
|
|
-Wwrite-strings
|
|
-Wno-unused-parameter
|
|
-Wno-long-long
|
|
-Werror=return-type
|
|
-Wextra-semi
|
|
-Wundef
|
|
-Wunused-template
|
|
-Wformat-nonliteral
|
|
-Wzero-length-array
|
|
-Wdeprecated-redundant-constexpr-static-def
|
|
-Wno-nullability-completeness
|
|
-Wmissing-prototypes
|
|
)
|
|
|
|
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
|
target_add_compile_flags_if_supported(${target} PRIVATE
|
|
-Wno-user-defined-literals
|
|
-Wno-covered-switch-default
|
|
-Wno-suggest-override
|
|
)
|
|
if (LIBCXX_TARGETING_CLANG_CL)
|
|
target_add_compile_flags_if_supported(${target} PRIVATE
|
|
-Wno-c++98-compat
|
|
-Wno-c++98-compat-pedantic
|
|
-Wno-c++11-compat
|
|
-Wno-undef
|
|
-Wno-reserved-id-macro
|
|
-Wno-gnu-include-next
|
|
-Wno-gcc-compat # For ignoring "'diagnose_if' is a clang extension" warnings
|
|
-Wno-zero-as-null-pointer-constant # FIXME: Remove this and fix all occurrences.
|
|
-Wno-deprecated-dynamic-exception-spec # For auto_ptr
|
|
-Wno-sign-conversion
|
|
-Wno-old-style-cast
|
|
-Wno-deprecated # FIXME: Remove this and fix all occurrences.
|
|
-Wno-shift-sign-overflow # FIXME: Why do we need this with clang-cl but not clang?
|
|
-Wno-double-promotion # FIXME: remove me
|
|
)
|
|
endif()
|
|
|
|
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
|
|
|
|
target_add_compile_flags_if_supported(${target} PRIVATE
|
|
-Wstrict-aliasing=2
|
|
-Wstrict-overflow=4
|
|
-Wno-attributes
|
|
-Wno-literal-suffix
|
|
-Wno-c++14-compat
|
|
-Wno-noexcept-type
|
|
-Wno-suggest-override
|
|
-Wno-alloc-size-larger-than
|
|
-Wno-deprecated-declarations
|
|
-Wno-dangling-reference
|
|
-Wno-strict-overflow
|
|
-Wno-maybe-uninitialized
|
|
-Wno-strict-aliasing
|
|
)
|
|
|
|
endif()
|
|
if (${enable_werror})
|
|
target_add_compile_flags_if_supported(${target} PRIVATE -Werror)
|
|
target_add_compile_flags_if_supported(${target} PRIVATE -WX)
|
|
else()
|
|
# TODO(EricWF) Remove this. We shouldn't be suppressing errors when -Werror is
|
|
# added elsewhere.
|
|
target_add_compile_flags_if_supported(${target} PRIVATE -Wno-error)
|
|
endif()
|
|
if (${enable_pedantic})
|
|
target_add_compile_flags_if_supported(${target} PRIVATE -pedantic)
|
|
endif()
|
|
endfunction()
|