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)