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

Keep a pure usage of generic.cmake #9612

Closed
wangkuiyi opened this issue Apr 3, 2018 · 1 comment
Closed

Keep a pure usage of generic.cmake #9612

wangkuiyi opened this issue Apr 3, 2018 · 1 comment
Assignees

Comments

@wangkuiyi
Copy link
Collaborator

I notice new hacks in our CMakeLists.txt like the following

set(DISTRIBUTE_COMPILE_FLAGS "-Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor")
set_source_files_properties(serde_test.cc grpc_server_test.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})

Please remove such hack and never use them. Please make sure that CMakeLists.txt includes only calls to CMake functions defined in generic.cmake.

We used to suffer from the problem that CMake provides a very flexible language and we hack our CMakeLists.txt everywhere. This made it extremely challenging to keep our build process understandable, and it took a huge effort of the team, particular thanks to @gangliao , to clean everything up by developing generic.cmake.

@typhoonzero
Copy link
Contributor

typhoonzero commented Apr 4, 2018

Because grpc implementation and generated code have non-virtual destructors, and the default functions see this as an error. We have to put this hack code in CMakeLists.txt to let distributed library compiles. Will consider a better way to do this. @wangkuiyi

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

No branches or pull requests

3 participants