diff --git a/CMakeLists.txt b/CMakeLists.txt index 29990979..fb47c289 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,9 @@ project(diskann) cmake_minimum_required(VERSION 3.15) -set(CMAKE_STANDARD 14) +set(CMAKE_STANDARD 17) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) if(NOT MSVC) set(CMAKE_CXX_COMPILER g++) @@ -212,7 +214,7 @@ endif() #Main compiler/linker settings if(MSVC) #language options - add_compile_options(/permissive- /openmp:experimental /Zc:twoPhase- /Zc:inline /WX- /std:c++14 /Gd /W3 /MP /Zi /FC /nologo) + add_compile_options(/permissive- /openmp:experimental /Zc:twoPhase- /Zc:inline /WX- /std:c++17 /Gd /W3 /MP /Zi /FC /nologo) #code generation options add_compile_options(/arch:AVX2 /fp:fast /fp:except- /EHsc /GS- /Gy) #optimization options diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 545d2a58..89f5f8d4 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.18...3.22) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) if (PYTHON_EXECUTABLE) set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 598ea170..3eec7a5c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,7 @@ #Copyright(c) Microsoft Corporation.All rights reserved. #Licensed under the MIT license. -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_COMPILE_WARNING_AS_ERROR ON) if(MSVC) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c223e049..dfbf7931 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_COMPILE_WARNING_AS_ERROR ON) add_executable(build_memory_index build_memory_index.cpp) diff --git a/tests/restapi/CMakeLists.txt b/tests/restapi/CMakeLists.txt index e0f31a9c..c73b427d 100644 --- a/tests/restapi/CMakeLists.txt +++ b/tests/restapi/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) add_executable(inmem_server inmem_server.cpp) if(MSVC) diff --git a/tests/utils/CMakeLists.txt b/tests/utils/CMakeLists.txt index fadac129..a9826017 100644 --- a/tests/utils/CMakeLists.txt +++ b/tests/utils/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_COMPILE_WARNING_AS_ERROR ON)