Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commit-message: update the cmake #432 #474

Merged
merged 5 commits into from
Nov 7, 2024
Merged

Conversation

LvNing-bwt
Copy link
Contributor

What problem were solved in this pull request?

Issue Number: close #432

Problem:增加识别 CMAKE_BUILD_TYPE 选项,删除 DEBUG=ON Cmake选项

What is changed and how it works?

我更改了CMakeLists.txt文件,删除了DEBUG定义,新增CMAKE_BUILD_TYPE 选项的判断
更改了build.sh文件,修改了识别debug那部分命令

Other information

希望验证一下相关功能是否实现,因为不太确定是否只需要修改这两个文件以及这么修改是否正确
如果有问题,期待下一步沟通

@hnwyllmm
Copy link
Collaborator

看起来你对这个变量有些误解,可以看看这些信息:
CMAKE_BUILD_TYPE的官方手册解释
官方手册一个相关的信息
一个问答帖子(这个说的最清楚)

看起来:

  1. cmake 会自己处理CMAKE_BUILD_TYPE,去设置一些变量;
  2. 处理CMAKE_BUILD_TYPE可能需要关心大小写,我看了一些示例,是统一转换成大写或小写;
  3. 可以不增加CMAKE_BUILD_TYPE值的判断,而是设置 CMAKE_C_FLAGS_[DEBUG|RELEASE|...] 等变量增加 -DDEBUG。

还可以参考一些其它项目的做法,比如jsoncpp,只是设置了默认值:
image

@LvNing-bwt
Copy link
Contributor Author

好的好的!!我再试试!!

@hnwyllmm
Copy link
Collaborator

hnwyllmm commented Nov 4, 2024

@LvNing-bwt 进展怎么样?需要先沟通一下吗?

@LvNing-bwt
Copy link
Contributor Author

我现在在学习这个cmake是什么意思

@LvNing-bwt 进展怎么样?需要先沟通一下吗?

@LvNing-bwt
Copy link
Contributor Author

其实有一点每太看懂要干什么

@hnwyllmm
Copy link
Collaborator

hnwyllmm commented Nov 4, 2024 via email

@hnwyllmm hnwyllmm merged commit 51825fc into oceanbase:main Nov 7, 2024
5 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

增加识别 CMAKE_BUILD_TYPE 选项,删除 DEBUG=ON Cmake选项
2 participants