diff --git a/libsession-util/build.gradle b/libsession-util/build.gradle index 12cbb892ea..10d1845f7b 100644 --- a/libsession-util/build.gradle +++ b/libsession-util/build.gradle @@ -14,7 +14,6 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { - cppFlags "--std=c++17" } } // ndk { diff --git a/libsession-util/src/main/cpp/CMakeLists.txt b/libsession-util/src/main/cpp/CMakeLists.txt index 753c99e8e9..487fa7e454 100644 --- a/libsession-util/src/main/cpp/CMakeLists.txt +++ b/libsession-util/src/main/cpp/CMakeLists.txt @@ -9,6 +9,11 @@ cmake_minimum_required(VERSION 3.18.1) project("session_util") +# Compiles in C++17 mode +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + # Creates and names a library, sets it as either STATIC # or SHARED, and provides the relative paths to its source code. # You can define multiple libraries, and CMake builds them for you.