Skip to content

update CMAKE_ARGS in one go in activate.bat#104

Merged
conda-forge-admin merged 1 commit into
conda-forge:mainfrom
h-vetinari:fix
Jul 21, 2025
Merged

update CMAKE_ARGS in one go in activate.bat#104
conda-forge-admin merged 1 commit into
conda-forge:mainfrom
h-vetinari:fix

Conversation

@h-vetinari
Copy link
Copy Markdown
Member

In conda-forge/wxwidgets-feedstock#61 there's something very strange. The value of CMAKE_ARGS appears to get set correctly in activation

(%BUILD_PREFIX%) %SRC_DIR%>IF "1" == "1" (
set "CMAKE_ARGS=-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%PREFIX%\Library -DCMAKE_PROGRAM_PATH=%BUILD_PREFIX%\bin;%BUILD_PREFIX%\Scripts;%BUILD_PREFIX%\Library\bin;%PREFIX%\bin;%PREFIX%\Scripts;%PREFIX%\Library\bin"  
 set "CMAKE_ARGS=!CMAKE_ARGS! -DPython_FIND_REGISTRY=NEVER -DPython3_FIND_REGISTRY=NEVER" 
) 

(%BUILD_PREFIX%) %SRC_DIR%>IF NOT "win-64" == "win-64" (
set "CONDA_BUILD_CROSS_COMPILATION=1"  
 set "CMAKE_ARGS=-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%PREFIX%\Library -DCMAKE_PROGRAM_PATH=%BUILD_PREFIX%\bin;%BUILD_PREFIX%\Scripts;%BUILD_PREFIX%\Library\bin;%PREFIX%\bin;%PREFIX%\Scripts;%PREFIX%\Library\bin -DPython_FIND_REGISTRY=NEVER -DPython3_FIND_REGISTRY=NEVER -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=AMD64" 
)  else (set "CONDA_BUILD_CROSS_COMPILATION=0" ) 

(note: the second branch here is not taken, but I've pasted it because it shows the previously set value of CMAKE_ARGS)

but then when the build is invoked, CMAKE_ARGS is empty

(%BUILD_PREFIX%) %SRC_DIR%\build_>cmake <CMAKE_ARGS_SHOULD_BE_HERE>  -GNinja     -DCMAKE_INSTALL_PREFIX=%PREFIX%\Library     -DwxUSE_REGEX=sys       -DwxUSE_ZLIB=sys        -DwxUSE_EXPAT=sys       -DwxUSE_LIBJPEG=sys     -DwxUSE_LIBPNG=sys      -DwxUSE_LIBTIFF=sys     -DwxUSE_LIBLZMA=sys     -DwxBUILD_VENDOR=     .. 
-- Setting build type to 'Debug' as none was specified.         # should be 'Release'!

So instead of putting -DPython_FIND_REGISTRY=... on a separate line as done in #99 and fixed up in #101, let's just update it in one go.

Sorry for the thrashing, batch files are an apparently endless source of insanity that keeps uppercutting my jaw.

@h-vetinari h-vetinari requested a review from 183amir as a code owner July 21, 2025 22:58
@h-vetinari h-vetinari added the automerge Merge the PR when CI passes label Jul 21, 2025
@conda-forge-admin
Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe/meta.yaml:

  • ℹ️ The recipe is not parsable by parser conda-souschef (grayskull). This parser is not currently used by conda-forge, but may be in the future. We are collecting information to see which recipes are compatible with grayskull.
  • ℹ️ The recipe is not parsable by parser conda-recipe-manager. The recipe can only be automatically migrated to the new v1 format if it is parseable by conda-recipe-manager.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/16430037491. Examine the logs at this URL for more detail.

@conda-forge-admin conda-forge-admin merged commit a6cad82 into conda-forge:main Jul 21, 2025
13 checks passed
@conda-forge-admin
Copy link
Copy Markdown
Contributor

Hi! This is the friendly conda-forge automerge bot!

I considered the following status checks when analyzing this PR:

  • linter: passed
  • azure: passed

Thus the PR was passing and merged! Have a great day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Merge the PR when CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants