From: Victor Cebollada Date: Mon, 10 Aug 2020 08:09:58 +0000 (+0100) Subject: Specified C++17 standard for the CMake projects. X-Git-Tag: dali_1.9.25~3 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=20196b9291c2c999f22f9175cc070264f7ea62bf Specified C++17 standard for the CMake projects. Change-Id: I2b1f24a003f37a0a16157ab49af7012a3201665c Signed-off-by: Victor Cebollada --- diff --git a/README.md b/README.md index 99a47a6..b43261f 100644 --- a/README.md +++ b/README.md @@ -20,15 +20,11 @@ ### Minimum Requirements - - Ubuntu 14.04 or later + - Ubuntu 16.04 or later - Environment created using dali_env script in dali-core repository - - GCC version 6 + - GCC version 9 -DALi requires a compiler supporting C++11 features. -Ubuntu 16.04 is the first version to offer this by default (GCC v5.4.0). - -GCC version 6 is recommended since it has fixes for issues in version 5 -e.g. it avoids spurious 'defined but not used' warnings in header files. +DALi requires a compiler supporting C++17 features. ### Building the Repository diff --git a/build/tizen/CMakeLists.txt b/build/tizen/CMakeLists.txt index 6280e33..be96e15 100644 --- a/build/tizen/CMakeLists.txt +++ b/build/tizen/CMakeLists.txt @@ -1,7 +1,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.1) CMAKE_POLICY(SET CMP0012 NEW) # Prevent dereferencing of OFF/ON as variables -SET(CMAKE_CXX_STANDARD 11) SET(CMAKE_C_STANDARD 99) PROJECT(${name} CXX) SET(PKG_NAME ${name}) @@ -106,12 +105,14 @@ ENDIF() # Set up compiler flags and warnings IF( UNIX ) + ADD_COMPILE_OPTIONS( -std=c++17 ) # c++17 support ADD_COMPILE_OPTIONS( -Wall ${DALI_CFLAGS} )# -Wextra -Wno-unused-parameter )# -Wfloat-equal ) ELSEIF( WIN32 ) # WIN32 includes x64 as well according to the cmake doc. ADD_COMPILE_OPTIONS( /FIdali-windows-dependencies.h ) # ADD_COMPILE_OPTIONS( /FIextern-definitions.h ) # Adds missing definitions. ADD_COMPILE_OPTIONS( /FIpreprocessor-definitions.h ) # ADD_COMPILE_OPTIONS( /vmg ) # Avoids a 'reinterpret_cast' compile error while compiling signals and callbacks. + ADD_COMPILE_OPTIONS( /std:c++17 ) # c++17 support ADD_COMPILE_OPTIONS( /wd4251 ) # Ignores warning C4251: "'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'" ENDIF()