Skip to content

Removed incorrect generator expression usage#1226

Open
arnauddgbes wants to merge 1 commit into
madler:developfrom
arnauddgbes:fix/minizip-windows
Open

Removed incorrect generator expression usage#1226
arnauddgbes wants to merge 1 commit into
madler:developfrom
arnauddgbes:fix/minizip-windows

Conversation

@arnauddgbes
Copy link
Copy Markdown

CMake generator expressions cannot be used in the set function, resulting is implementations missing from the runtime libraries, and missing header files in the installation.

CMake generator expressions cannot be used in the set function, resulting is implementations missing from the runtime libraries, and missing header files in the installation.
@Vollstrecker
Copy link
Copy Markdown
Contributor

Maybe you didn't notice the work done in fixes-1.3.2 which is merged but not pushed yet. I just opened another fixes-PR as some more was to be done.

Long story short: Take a look at #1233 to see the current state of the tree.

@arnauddgbes
Copy link
Copy Markdown
Author

As such there is no overlap between both PR. Are you going to apply #1226 into #1233?

@Vollstrecker
Copy link
Copy Markdown
Contributor

Right, missed that one. Will be incorporated.

Vollstrecker pushed a commit to cmake-remake/zlib that referenced this pull request May 15, 2026
@Neustradamus
Copy link
Copy Markdown

@gvollant, @madler: Have you seen this PR?

@dg0yt
Copy link
Copy Markdown

dg0yt commented May 27, 2026

This PR (and its predecessor #1225) were mentioned as potential duplicates in #1243.

This PR has a number of problems.

  • It is vague about the problem it tries to solve.

    implementations missing from the runtime libraries, and missing header files in the installation

    This does not name at all what is actually missing. From changes, one might conclude that is the iowin32 unit. But this is informed guessing - only the original author can clarify.

    An expressive title is an important key for people who look for known issues and solutions.

  • It is wrong about usage of generator expression:

    incorrect generator expression usage

    CMake generator expressions cannot be used in the set function

    The usage is not incorrect, and is absolutely valid to use generator expressions in set functions. Variables are valid way to pass around unevaluated generator expressions. These expressions just do not take effect when the set command is evaluated (CMake step: configuration) but later at generation time (a separate CMake step). In this CMakeListst.txt, relevant generation steps are add_library and add_excutable.

  • It does not fix the problem.

    Even with this PR, the iowin32.c/h is only included in the variables determining the sources and headers for the executables (minizip, miniunzup). There is no effect on the library (libminiunzip).

    And this is the key change in Add iowin32.c to libminizip sources #1243: Add the iowin32.c/h to the variables determining the sources and headers for the minizip library.

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.

4 participants