Commit bdd7cc25 authored by Reynald Bourtembourg's avatar Reynald Bourtembourg
Browse files

CMakeLists.txt: Only set CMAKE_CXX_STANDARD conditionally to C++17

We now need to compile with C++17 as cppTango main requires that since 99bd6358 (Merge branch 'move-to-cpp17' into 'main', 2023-12-11).

While fixing that we also use the better approach in allowing users to use
more recent CXX standard versions.
parent 4ad5e867
Loading
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -12,6 +12,13 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/TangoCMakeModules)
find_package(MySQL REQUIRED)
find_package(Tango REQUIRED)

if(NOT DEFINED CMAKE_CXX_STANDARD)
    set(CMAKE_CXX_STANDARD 17)
endif()

set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_STANDARD_REQUIRED YES)

set(SOURCES ClassFactory.cpp
            DbUtils.cpp
            TangoAccessControlStateMachine.cpp