From 317123c7b99508e1a59964ad328b56c53e95a308 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Sat, 2 Oct 2021 23:28:24 +0100 Subject: [PATCH] Remove flags not available on windows --- app/CMakeLists.txt | 4 +++- app/external/qcustomplot/CMakeLists.txt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index c63557c..4f96dcf 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -126,7 +126,9 @@ QT5_ADD_RESOURCES(Calyp_App_RCC ${Calyp_App_RCC}) # Instruct CMake to run moc automatically when needed. SET(CMAKE_AUTOMOC ON) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-enum-enum-conversion") +IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-enum-enum-conversion") +ENDIF() # Windows application icon IF(WIN32) diff --git a/app/external/qcustomplot/CMakeLists.txt b/app/external/qcustomplot/CMakeLists.txt index 00fa408..d71910a 100644 --- a/app/external/qcustomplot/CMakeLists.txt +++ b/app/external/qcustomplot/CMakeLists.txt @@ -8,7 +8,9 @@ SET(qcustomplot_SRCS qcustomplot.cpp qcustomplot.h) SET(CMAKE_AUTOMOC ON) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations -Wno-deprecated-enum-enum-conversion") +IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations -Wno-deprecated-enum-enum-conversion") +ENDIF() ADD_LIBRARY(QCustomPlotLib STATIC ${qcustomplot_SRCS}) TARGET_LINK_LIBRARIES(QCustomPlotLib Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)