Skip to content

Instantly share code, notes, and snippets.

@sansecy
sansecy / CmakeAndNdkBuild
Created May 14, 2023 06:50 — forked from lizhangqu/CmakeAndNdkBuild
cmake and ndk build
# for cmake
# c++11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
#debug or release
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} -s")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -s")
#if CMAKE_STATIC_LINKER_FLAGS_RELEASE or CMAKE_SHARED_LINKER_FLAGS_RELEASE not work use this
#if(CMAKE_BUILD_TYPE MATCHES Release)
@sansecy
sansecy / HeaderViewRecyclerAdapter.java
Created June 2, 2019 07:30 — forked from darnmason/HeaderViewRecyclerAdapter.java
RecyclerView adapter designed to wrap an existing adapter allowing the addition of header views and footer views.
/*
* Copyright (C) 2014 darnmason
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software