Skip to content

cmake: use cmake_push_check_state() around feature checks - #15251

Closed
vszakats wants to merge 10 commits into
curl:masterfrom
vszakats:cm-pushpop-2
Closed

vszakats wants to merge 10 commits into
curl:masterfrom
vszakats:cm-pushpop-2

Conversation

@vszakats

@vszakats vszakats commented Oct 10, 2024 •

Copy link
Copy Markdown
Member

Enclose
CMAKE_EXTRA_INCLUDE_FILES,
CMAKE_REQUIRED_DEFINITIONS,
CMAKE_REQUIRED_FLAGS,
CMAKE_REQUIRED_INCLUDES,
CMAKE_REQUIRED_LIBRARIES,
CMAKE_REQUIRED_LINK_OPTIONS,
settings within cmake_push_check_state()/cmake_pop_check_state()
calls. It prevents spilling them into other feature checks. It also
replaces manual resets found in some places (which can have
the undesired side-effect of destroying values meant for global use.)

Cherry-picked from #15157

@vszakats vszakats added the cmake label Oct 10, 2024
@github-actions github-actions Bot added the build label Oct 10, 2024
@vszakats vszakats closed this in 91519bf Oct 10, 2024
@vszakats
vszakats deleted the cm-pushpop-2 branch October 10, 2024 17:37
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
Enclose
`CMAKE_EXTRA_INCLUDE_FILES`,
`CMAKE_REQUIRED_DEFINITIONS`,
`CMAKE_REQUIRED_FLAGS`,
`CMAKE_REQUIRED_INCLUDES`,
`CMAKE_REQUIRED_LIBRARIES`,
`CMAKE_REQUIRED_LINK_OPTIONS`,
settings within `cmake_push_check_state()`/`cmake_pop_check_state()`
calls. It prevents spilling them into other feature checks. It also
replaces manual resets found in some places (which can have
the undesired side-effect of destroying values meant for global use.)

Cherry-picked from curl#15157
Closes curl#15251
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant