From cd0de6830023d362777be54fc07d44f638b1561e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Gr=C3=B6ger?= <tobias.groeger@student.kit.edu> Date: Thu, 13 Jun 2024 18:50:50 +0200 Subject: [PATCH] Fix undefined compiler option on ubuntu 18.04 --- source/ArmarXGui/applications/ArmarXGui/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/ArmarXGui/applications/ArmarXGui/CMakeLists.txt b/source/ArmarXGui/applications/ArmarXGui/CMakeLists.txt index 8fbbc259..a0608985 100644 --- a/source/ArmarXGui/applications/ArmarXGui/CMakeLists.txt +++ b/source/ArmarXGui/applications/ArmarXGui/CMakeLists.txt @@ -41,7 +41,12 @@ set(HEADERS ArmarXGuiApp.h ) if ( CMAKE_COMPILER_IS_GNUCC ) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-enum-enum-conversion") + # old gcc 8.4.0 on ubuntu 18.04 does not support this flag + check_cxx_compiler_flag("-Wno-error=deprecated-enum-enum-conversion" SUPPORTS_DEPRECATED_ENUM_ENUM_CONVERSION) + + if (SUPPORTS_DEPRECATED_ENUM_ENUM_CONVERSION) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-enum-enum-conversion") + endif() endif() find_package(OpenMP) -- GitLab