Repository navigation
Conversation
Support multi-target cmake builds via `CURL_DIRSUFFIX` env. Drop using using `-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_*=` as a workaround in CI. Also: - replace `resolve` references in tests with a new `%RESOLVE` variable. - fix `-c` option format in manual. - fix some whitespace. Ref: curl#15000 Cherry-picked from curl#16394
Support multi-target cmake builds via `CURL_DIRSUFFIX` env. For example:
`export CURL_DIRSUFFIX=Debug/`.
Multi-target generators place their output to `src/<subdir>/`,
`lib/<subdir>/`, `tests/server/<subdir>`, `tests/libtest/<subdir>` and
`tests/unit/<subdir>/` by default. Before this patch, `runtests.pl`
couldn't run on such builds because it expected the binaries under the
their `<subdir>`-less directories. This patch allows to set such subdir
and make `runtests.pl` find the binaries. In CI we use multi-target
builds with tests for MSVC. It also helps Xcode-generator builds, though
in CI we don't have such job running tests.
There may be better solutions to configure this, but passing a custom
value to `runtests.pl` including its subprocesses is somewhat tricky.
The reason the configuration value expects the slash at the end is
because MSYS is automagically expanding the env to a (wrong) absolute
path if the slash is in the front.
Also:
- drop the `-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_*=` workaround from CI.
- replace `resolve` references in tests with a new `%RESOLVE` variable.
It didn't use a filename extension before. After this patch it uses
`exe_ext('TOOL')`. I'm not sure if this is the correct choice vs.
`exe_ext('SRV')`.
- fix `-c` option format in manual.
- fix some whitespace.
Note, in CI we still tweak `CMAKE_RUNTIME_OUTPUT_DIRECTORY_*` in jobs
which share steps between `./configure` and cmake. It's easier that way.
Ref: curl#15000
Cherry-picked from curl#16394
Closes curl#16452
| my $GDBW = ($gdbxwin) ? "-w" : ""; | ||
| runclient("$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " $GDBW -x $LOGDIR/gdbcmd"); | ||
| runclient("$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " $GDBW -x $LOGDIR" . "gdbcmd"); | ||
| $cmdres=0; # makes it always continue after a debugged run |
There was a problem hiding this comment.
@vszakats what's the thinking here? What's this change for? This completely breaks runtests -g.
There was a problem hiding this comment.
I made #16495 in the mean time, but there might be something I don't understand here
There was a problem hiding this comment.
I made $LIBDIR extendable with extra subdirs (for multi-target) via an env. That env should have started with a slash. Eg /Debug. MSYS automagically "corrects" such values to an abs path. So my solution (also to avoid MSYS specific tricks) was to make $LIBPATH end with a slash by default, and pass Debug/ with an ending slash via the env.
But there seem to be cases where LIBDIR is missing an ending slash!
I can do another round to robustify this.
There was a problem hiding this comment.
Ah, touching $LOGDIR was totally unnecessary here, I'm guessing that breaks it.
Support multi-target cmake builds via `CURL_DIRSUFFIX` env. For example:
`export CURL_DIRSUFFIX=Debug/`.
Multi-target generators place their output to `src/<subdir>/`,
`lib/<subdir>/`, `tests/server/<subdir>`, `tests/libtest/<subdir>` and
`tests/unit/<subdir>/` by default. Before this patch, `runtests.pl`
couldn't run on such builds because it expected the binaries under the
their `<subdir>`-less directories. This patch allows to set such subdir
and make `runtests.pl` find the binaries. In CI we use multi-target
builds with tests for MSVC. It also helps Xcode-generator builds, though
in CI we don't have such job running tests.
There may be better solutions to configure this, but passing a custom
value to `runtests.pl` including its subprocesses is somewhat tricky.
The reason the configuration value expects the slash at the end is
because MSYS is automagically expanding the env to a (wrong) absolute
path if the slash is in the front.
Also:
- drop the `-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_*=` workaround from CI.
- replace `resolve` references in tests with a new `%RESOLVE` variable.
It didn't use a filename extension before. After this patch it uses
`exe_ext('TOOL')`. I'm not sure if this is the correct choice vs.
`exe_ext('SRV')`.
- fix `-c` option format in manual.
- fix some whitespace.
Note, in CI we still tweak `CMAKE_RUNTIME_OUTPUT_DIRECTORY_*` in jobs
which share steps between `./configure` and cmake. It's easier that way.
Ref: curl#15000
Cherry-picked from curl#16394
Closes curl#16452
Regression from curl#16452 Closes curl#16495
Follow-up to 3585796 curl#16452 Closes curl#16506
Support multi-target cmake builds via
CURL_DIRSUFFIXenv. For example:export CURL_DIRSUFFIX=Debug/.Multi-target generators place their output to
src/<subdir>/,lib/<subdir>/,tests/server/<subdir>,tests/libtest/<subdir>andtests/unit/<subdir>/by default. Before this patch,runtests.plcouldn't run on such builds because it expected the binaries under the
their
<subdir>-less directories. This patch allows to set such subdirand make
runtests.plfind the binaries. In CI we use multi-targetbuilds with tests for MSVC. It also helps Xcode-generator builds, though
in CI we don't have such job running tests.
There may be better solutions to configure this, but passing a custom
value to
runtests.plincluding its subprocesses is somewhat tricky.The reason the configuration value expects the slash at the end is
because MSYS is automagically expanding the env to a (wrong) absolute
path if the slash is in the front.
Also:
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_*=workaround from CI.resolvereferences in tests with a new%RESOLVEvariable.It didn't use a filename extension before. After this patch it uses
exe_ext('TOOL'). I'm not sure if this is the correct choice vs.exe_ext('SRV').-coption format in manual.Note, in CI we still tweak
CMAKE_RUNTIME_OUTPUT_DIRECTORY_*in jobswhich share steps between
./configureand cmake. It's easier that way.Ref: #15000
Cherry-picked from #16394