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

Freemine.cmake.external.proj #29455

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

freemine
Copy link
Contributor

@freemine freemine commented Jan 2, 2025

Description

with the hope of clarifying building system of TDengine itself, to isolate source code, external project and building-binaries, so that further work, such as test-cases-running, rebuilding among branches, could be simplied and less error prone.

this is still in early stage, and /contrib directory is still containing both source-code and downloaded external projects and there-built-binaries. but it's believed easy to isolate them later on.

wish you guys might think this potentially useful, and looking forward to your comments.

Checklist

Please check the items in the checklist if applicable.

  • Is the user manual updated?
  • Are the test cases passed and automated?
  • Is there no significant decrease in test coverage?

@freemine
Copy link
Contributor Author

freemine commented Jan 2, 2025

btw, currently, this PR only tested under linux, not including windows or macosx yet.

@freemine
Copy link
Contributor Author

freemine commented Jan 2, 2025

in order to make external project downloaded to be compiled within the main project of TDengine itself with ADD_SUBDIRECTORY, by setting CMAKE__XXX variable and option(YYY), is really not a good practice, because it ruins the global namespace.
SAY, if project A compiles with CMAKE_XXX set to TRUE, while project B compiles with CMAKE_XXX set FALSE,how ugly the directives in contrib/CMakeLists.txt would be?
with ExternalProject_ADD, you can isolate elegantly easy.

截屏2025-01-02 22 04 03

@freemine
Copy link
Contributor Author

freemine commented Jan 2, 2025

截屏2025-01-03 06 43 37

and
截屏2025-01-03 06 45 02

which means: no matter you build the TDengine with -DBUILD_CONTRIB:BOOL=ON or not, taosd likely link with /deps//rocksdb_static/librocksdb.a

this really smells bad.

@tomchon tomchon requested review from stephenkgu, guanshengliang and yihaoDeng and removed request for stephenkgu and guanshengliang January 3, 2025 08:50
@freemine
Copy link
Contributor Author

freemine commented Jan 4, 2025

comparison of built binary images

截屏2025-01-04 08 23 49

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.

1 participant