From b1a25c716ee2fc48b8c23e327a5f046c1e3b2572 Mon Sep 17 00:00:00 2001 From: shahramn Date: Sun, 24 Mar 2024 13:10:43 +0000 Subject: [PATCH] CMake: Fix invalid NVIDIA compiler switches: nvc++-Error-Unknown switch --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bc667d3..7a32bde1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,7 +221,12 @@ if( EC_OS_NAME MATCHES "windows" ) else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wno-overloaded-virtual -Wno-unused-variable -Wno-reorder -Wno-sign-compare") + # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wno-overloaded-virtual -Wno-unused-variable -Wno-reorder -Wno-sign-compare") + ecbuild_add_cxx_flags("-Wno-unused-parameter" NO_FAIL) + ecbuild_add_cxx_flags("-Wno-overloaded-virtual" NO_FAIL) + ecbuild_add_cxx_flags("-Wno-unused-variable" NO_FAIL) + ecbuild_add_cxx_flags("-Wno-reorder" NO_FAIL) + ecbuild_add_cxx_flags("-Wno-sign-compare" NO_FAIL) # set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-overloaded-virtual -Wno-unused-variable -Wno-reorder-ctor -Wno-sign-compare")