-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: fix
ENABLE_DEBUG=ON
builds in default/release mode
`ENABLE_DEBUG=ON` enables curl-level debug features. Building and running the curl test suite requires setting this option. Before this patch, while building the `testdeps` target with debug features on with the default ('Release') CMake config, the build stopped with this linker error: ``` ld: CMakeFiles/unit1395.dir/unit1395.c.o: in function `test': unit1395.c:(.text+0x1a0): undefined reference to `dedotdotify' A failure has been detected in another branch of the parallel make ``` Ref: https://github.com/curl/curl/actions/runs/9037287098/job/24835990826#step:3:2483 It happened because `dedotdotify` compiled as a static function into `libcurlu` due to the undefined `DEBUGBUILD` macro. Then `unit1395` failed to link it. Even though the build requires the `DEBUGBUILD` macro, our CMake logic defined it when building with CMake's 'Debug' configuration only. That configuration is not required to build or run the test suite, nor to use curl-level debug features. This patch fixes this by always defining `DEBUGBUILD` when setting `ENABLE_DEBUG=ON`. Decoupling this custom option from the selected CMake Release/Debug configuration. This change may also allow dropping Debug mode in AppVeyor CMake builds, possibly making them build faster and run smoother. Also delete the internal variable `ENABLE_CURLDEBUG` which was a copy of `ENABLE_DEBUG`. Use the latter everywhere instead. Ref: curl#13583 Closes #xxxxx
- Loading branch information
Showing
5 changed files
with
6 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters