From 69d947309ae08c7a17b4e6c25414229dc8e34c61 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Mon, 16 Sep 2024 08:53:19 +0200 Subject: [PATCH] Ubuntu 24.04 support: modernize pip install, and silence gcc 13 warnings. --- CMakeLists.txt | 13 ++++++++++--- GrpcInterface/CMakeLists.txt | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7e68405de..9378325474 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,9 +56,16 @@ elseif(MSVC) endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - set(CMAKE_CXX_FLAGS - "-DCVF_LINUX -pipe -Wextra -Woverloaded-virtual -Wformat -Wno-unused-parameter" - ) + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CMAKE_CXX_FLAGS + "-DCVF_LINUX -pipe -Wextra -Woverloaded-virtual -Wformat -Wno-unused-parameter" + ) + + else() + set(CMAKE_CXX_FLAGS + "-DCVF_LINUX -pipe -Wextra -Woverloaded-virtual -Wformat -Wno-unused-parameter -Wno-array-bounds -Wno-dangling-reference -Wno-stringop-overflow" + ) + endif() set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -g3 -O0 -DDEBUG -D_DEBUG") set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNO_DEBUG") endif() diff --git a/GrpcInterface/CMakeLists.txt b/GrpcInterface/CMakeLists.txt index 6b296dd382..e65a2fecf4 100644 --- a/GrpcInterface/CMakeLists.txt +++ b/GrpcInterface/CMakeLists.txt @@ -250,7 +250,7 @@ if(RESINSIGHT_GRPC_PYTHON_EXECUTABLE AND RESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE) message(STATUS "Installing Python modules (dev-requirements.txt)") add_custom_command( TARGET PipInstall - COMMAND ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE} ARGS -m pip install -r ${GRPC_PYTHON_SOURCE_PATH}/dev-requirements.txt --user ) + COMMAND ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE} ARGS -m pip install -r ${GRPC_PYTHON_SOURCE_PATH}/dev-requirements.txt ) endif() if(RESINSIGHT_GRPC_PYTHON_EXECUTABLE AND RESINSIGHT_GRPC_BUNDLE_PYTHON_MODULE)