Use proper cmake settings for C++17 mode instead of gradle cppflags

This commit is contained in:
Jason Rhinelander 2022-11-29 21:32:37 -04:00 committed by 0x330a
parent e784fa79d0
commit 728471f32a
No known key found for this signature in database
GPG Key ID: 267811D6E6A2698C
2 changed files with 5 additions and 1 deletions

View File

@ -14,7 +14,6 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "--std=c++17"
}
}
// ndk {

View File

@ -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.