diff options
author | greshilov <slovaricheg@gmail.com> | 2018-01-22 20:43:26 +0300 |
---|---|---|
committer | mgsergio <mgsergio@yandex.ru> | 2018-01-29 17:01:06 +0300 |
commit | 38de57a77a28a1484dc9b3e2b762a5dfe33f2890 (patch) | |
tree | b66bb1c9af8d94861a0ed629b29b0f5ded1c6334 | |
parent | 2b5a6cf37f67a50096aaa1a28128d21549d05922 (diff) |
[cmake] Adding c++14 support
- Fix XCode build
- Remove old compile opt from skin_generator project
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | map/mwm_tests/CMakeLists.txt | 5 | ||||
-rw-r--r-- | skin_generator/CMakeLists.txt | 5 | ||||
-rw-r--r-- | std/unique_ptr.hpp | 9 | ||||
-rw-r--r-- | xcode/common.xcconfig | 2 |
5 files changed, 3 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 11c4cad8f6..57ed00dd82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.2) project(omim C CXX) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 14) get_filename_component(OMIM_ROOT . ABSOLUTE) diff --git a/map/mwm_tests/CMakeLists.txt b/map/mwm_tests/CMakeLists.txt index 0bd8aa1fa8..ddf4a3931e 100644 --- a/map/mwm_tests/CMakeLists.txt +++ b/map/mwm_tests/CMakeLists.txt @@ -1,10 +1,5 @@ project(mwm_tests) -add_compile_options( - "-Wall" - "-std=c++11" -) - set( SRC multithread_mwm_test.cpp diff --git a/skin_generator/CMakeLists.txt b/skin_generator/CMakeLists.txt index aaac777dae..91f8303d73 100644 --- a/skin_generator/CMakeLists.txt +++ b/skin_generator/CMakeLists.txt @@ -1,10 +1,5 @@ project(skin_generator_tool) -add_compile_options( - "-std=c++11" - "-Wno-c++11-narrowing" -) - include_directories( ${OMIM_ROOT}/3party/gflags/src ${OMIM_ROOT}/3party/freetype/include diff --git a/std/unique_ptr.hpp b/std/unique_ptr.hpp index 536fa25230..a8f198b8fd 100644 --- a/std/unique_ptr.hpp +++ b/std/unique_ptr.hpp @@ -6,14 +6,7 @@ #include <memory> using std::unique_ptr; - -/// @todo(y): replace this hand-written helper function by -/// std::make_unique when it will be available in C++14 -template <typename T, typename... Args> -unique_ptr<T> make_unique(Args &&... args) -{ - return unique_ptr<T>(new T(std::forward<Args>(args)...)); -} +using std::make_unique; #ifdef DEBUG_NEW #define new DEBUG_NEW diff --git a/xcode/common.xcconfig b/xcode/common.xcconfig index def48dd0da..2abd427b1e 100644 --- a/xcode/common.xcconfig +++ b/xcode/common.xcconfig @@ -56,7 +56,7 @@ GCC_WARN_ABOUT_MISSING_NEWLINE = YES // Build options ALWAYS_SEARCH_USER_PATHS = NO CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES -CLANG_CXX_LANGUAGE_STANDARD = c++0x +CLANG_CXX_LANGUAGE_STANDARD = c++14 CLANG_ENABLE_MODULES = YES CLANG_ENABLE_OBJC_ARC = YES CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer |