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
45 lines
2.1 KiB
CMake
45 lines
2.1 KiB
CMake
include(CheckCXXCompilerFlag)
|
|
include(CheckCXXSourceCompiles)
|
|
|
|
# Check for oneAPI compiler (some older CMake versions detect as Clang)
|
|
if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|
check_cxx_source_compiles("#if (defined(__INTEL_CLANG_COMPILER) || defined(__INTEL_LLVM_COMPILER))
|
|
int main() { return 0; }
|
|
#else
|
|
not oneAPI
|
|
#endif" OPENMP_HAVE_ONEAPI_COMPILER)
|
|
if (OPENMP_HAVE_ONEAPI_COMPILER)
|
|
# According to CMake documentation, the compiler id should
|
|
# be IntelLLVM when detected oneAPI
|
|
set(CMAKE_C_COMPILER_ID "IntelLLVM")
|
|
set(CMAKE_CXX_COMPILER_ID "IntelLLVM")
|
|
endif()
|
|
endif()
|
|
|
|
check_cxx_compiler_flag(-Wall OPENMP_HAVE_WALL_FLAG)
|
|
check_cxx_compiler_flag(-Werror OPENMP_HAVE_WERROR_FLAG)
|
|
check_cxx_compiler_flag(-fcolor-diagnostics OPENMP_HAVE_COLOR_DIAGNOSTICS)
|
|
|
|
# Additional warnings that are not enabled by -Wall.
|
|
check_cxx_compiler_flag(-Wcast-qual OPENMP_HAVE_WCAST_QUAL_FLAG)
|
|
check_cxx_compiler_flag(-Wformat-pedantic OPENMP_HAVE_WFORMAT_PEDANTIC_FLAG)
|
|
check_cxx_compiler_flag(-Wimplicit-fallthrough OPENMP_HAVE_WIMPLICIT_FALLTHROUGH_FLAG)
|
|
check_cxx_compiler_flag(-Wsign-compare OPENMP_HAVE_WSIGN_COMPARE_FLAG)
|
|
|
|
# Warnings that we want to disable because they are too verbose or fragile.
|
|
|
|
# GCC silently accepts any -Wno-<foo> option, but warns about those options
|
|
# being unrecognized only if the compilation triggers other warnings to be
|
|
# printed. Therefore, check for whether the compiler supports options in the
|
|
# form -W<foo>, and if supported, add the corresponding -Wno-<foo> option.
|
|
|
|
check_cxx_compiler_flag(-Wextra OPENMP_HAVE_WEXTRA_FLAG)
|
|
check_cxx_compiler_flag(-Wpedantic OPENMP_HAVE_WPEDANTIC_FLAG)
|
|
check_cxx_compiler_flag(-Wmaybe-uninitialized OPENMP_HAVE_WMAYBE_UNINITIALIZED_FLAG)
|
|
|
|
# Additional flags for optimizing created libraries.
|
|
|
|
check_cxx_compiler_flag(-fno-semantic-interposition OPENMP_HAVE_NO_SEMANTIC_INTERPOSITION)
|
|
check_cxx_compiler_flag(-ffunction-section OPENMP_HAVE_FUNCTION_SECTIONS)
|
|
check_cxx_compiler_flag(-fdata-sections OPENMP_HAVE_DATA_SECTIONS)
|