Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 3, 2025

Generator expressions like $<CONFIG> are not evaluated in ExternalProject_Add CMAKE_ARGS—they're only processed in target-based commands. This caused the literal string $<CONFIG> to be passed instead of the actual build type.

Changes

  • Replace $<CONFIG> with hardcoded Release in the mimalloc ExternalProject_Add call (using ${CMAKE_BUILD_TYPE} doesn't work for multi-config generators like Visual Studio)
# Before (broken)
-DCMAKE_BUILD_TYPE=$<CONFIG>

# After (works)
-DCMAKE_BUILD_TYPE=Release

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com>
Copilot AI changed the title [WIP] Update optional mimalloc allocator support for Release builds Fix generator expression in ExternalProject_Add for mimalloc Dec 3, 2025
Copilot AI requested a review from asn5d December 3, 2025 23:08
@asn5d
Copy link
Member

asn5d commented Dec 3, 2025

@copilot Using ${CMAKE_BUILD_TYPE} does not work for multi-config generators. Lets just replace it with Release for now.

Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 3, 2025

@copilot Using ${CMAKE_BUILD_TYPE} does not work for multi-config generators. Lets just replace it with Release for now.

Replaced with hardcoded Release in commit 42d54be.

@asn5d asn5d marked this pull request as ready for review December 4, 2025 17:26
@asn5d asn5d merged commit e6eacd8 into feature/mimalloc Dec 4, 2025
@asn5d asn5d deleted the copilot/sub-pr-6 branch December 4, 2025 17:28
asn5d added a commit that referenced this pull request Dec 4, 2025
* Add optional mimalloc allocator support for Release builds.

* Update RoiManager/CMakeLists.txt to check mimalloc target exists before linking.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update PluginManager/CMakeLists.txt to check mimalloc target exists before linking.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update CMakeLists.txt to show message that mimalloc will be linked for Release only.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Added link option /INCLUDE:mi_version in cvutil/CMakeLists.txt  only for MSVC

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updated CMakeLists.txt to include platform specific import locations.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix generator expression in ExternalProject_Add for mimalloc (#8)

* Initial plan

* Replace $<CONFIG> with ${CMAKE_BUILD_TYPE} in ExternalProject_Add

Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com>

* Use hardcoded Release build type for mimalloc ExternalProject

Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com>

* Remove undefined ASAN_RUNTIME_DEP from runtime deps (#9)

* Initial plan

* Remove undefined ASAN_RUNTIME_DEP from EXTRA_RUNTIME_DEPS

Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com>

* Remove undefined ASAN_RUNTIME_DEP from runtime deps (#10)

* Initial plan

* Remove undefined ASAN_RUNTIME_DEP from EXTRA_RUNTIME_DEPS expression

Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com>

* Use $<IF> syntax for EXTRA_RUNTIME_DEPS generator expression

Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asn5d <16312669+asn5d@users.noreply.github.com>

---------

Co-authored-by: Seethepalli <7uz@ornl.gov>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
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.

2 participants