Android:等效于NDK-Build Flags
我正在研究一个使用c ++
代码的Android Native项目。我正在使用cmake
来构建c ++
库,该库早些时候使用ndk-Build
。 我在android.mk
中具有以下代码:
ifeq ($(APP_OPTIM), release)
LOCAL_CFLAGS += -DNDEBUG
LOCAL_CPPFLAGS += $(LOCAL_CFLAGS)
else
LOCAL_CFLAGS += -D_DEBUG -DNDK_DEBUG=1
LOCAL_CPPFLAGS += $(LOCAL_CFLAGS)
endif
这些标志等于什么。目前,我正在使用它:
target_compile_definitions( appl
PRIVATE
$<$<CONFIG:Release>:NDEBUG>
$<$<CONFIG:Debug>:_DEBUG=1>
)
但是我想知道这是否正确。
I am working on an android native project which uses C++
code. I am using CMake
to build C++
libraries which earlier used ndk-build
.
I have following code in my Android.mk
:
ifeq ($(APP_OPTIM), release)
LOCAL_CFLAGS += -DNDEBUG
LOCAL_CPPFLAGS += $(LOCAL_CFLAGS)
else
LOCAL_CFLAGS += -D_DEBUG -DNDK_DEBUG=1
LOCAL_CPPFLAGS += $(LOCAL_CFLAGS)
endif
What will be the CMake equivalent of these flags. Currently I am using this:
target_compile_definitions( appl
PRIVATE
lt;lt;CONFIG:Release>:NDEBUG>
lt;lt;CONFIG:Debug>:_DEBUG=1>
)
But I wonder if this is right.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论