-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
CMake build would delete the source file zconf.h #781
Comments
I'm running into this same issue. When I |
I had the same problem. It was solved by adding the following line before linking: I am not sure if I solved it correctly but it would be great if this can be simplified in the future. My project tree is as follows:
|
Do you think the part (Line69~79) can be deleted? @madler @jfern2011 @RandallFlagg? |
The solution, whatever it is, will need to be more elegant than that. It is there to fix someone's workflow. If I just delete it, then their's will be broken and yours might be fixed. It appears to be difficult to concoct a CMakeLists.txt that will make everyone happy. |
Thanks for your reply. You're exactly right. Build scripts affect most users. But in my opinion, breaking most people's source code in order to consider someone's using their own zconf.h for compilation doesn't seem so reasonable. In fact, they have other ways to solve this problem without having to customize CMakeLists, such as replace their zconf.h to the source code or using their own CMakeLists for compilation, etc. What's more, my company has many products use zlib while no one use their own zconf.h for compilation. Probably very few people use this feature. |
+1 For @fredgan, I would suggest externalizing this whole logic in a cmake file and enable it only if custom |
Hi @madler,
It only breaks for others if an upstream update takes place. Breaking changes are acceptable. it's very difficult to make progress without it. the idea is to keep the balance by when and how much to break, too little and you get stagnant, too much and users run away. It's legitimate to pave a new path, no one is forced to follow, the current version remains unchanged by definition. This Bug in the CMake script is just an easily fixable annoyance. |
See #1027 . |
Hi, @madler
The CMake build would rename
zconf.h
tozconf.h.included
.Mostly this would not be a quesion. But sometimes, some build rules or system would require that source file should not be changed after the build.
The git blame shows that the rename part
zconf.h
inCMakeLists.txt
is changed 10 years ago. Perhaps this part can be optimized.The text was updated successfully, but these errors were encountered: