Wireshark-dev: Re: [Wireshark-dev] RPM generation
From: Anders Broman <anders.broman@xxxxxxxxxxxx>
Date: Mon, 16 Apr 2018 08:57:02 +0000
Hi,
Building the RPMs works for me now - Thanks Dario!!!
Regards
Anders

-----Original Message-----
From: Wireshark-dev [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Peter Wu
Sent: den 16 april 2018 10:22
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] RPM generation

On Mon, Apr 16, 2018 at 09:02:18AM +0200, Dario Lombardo wrote:
> On Mon, Apr 16, 2018 at 5:32 AM, Anders Broman <a.broman58@xxxxxxxxx> wrote:
> 
> >
> > I followed the way I do it on Windows, which I think is the 
> > recommended way there :-)
> >
> >
> The cmake instructions I found always suggest to have the build dir 
> under the source. For instance the openSUSE %cmake macro is an alias 
> for "cmake .. (plus options)"

Which instructions? I looked for "cmake -" in the source tree, and all documentation in docbook/ suggest a build dir next to the source dir.
The only example that creates a build dir in the source tree is the Gitlab CI configuration.

The general recommendation is to do an out-of-tree build (where the build directory is not equal to the source tree). This could either be in-tree (mkdir build && cd build) or in a different location (mkdir /tmp/build && cd /tmp/build).

Personally I use both approaches: my main development has a source tree symlinked at /tmp/wireshark and a build directory at /tmp/wsbuild. When building from a temporary git worktree, I usually create a build directory within this tree for convenience:

    # Run from source directory, create a new source directory which
    # shares the same git repository:
    git worktree add /tmp/wireshark-2.4 master-2.4
    cd /tmp/wireshark-2.4
    # update master-2.4 branch
    git pull
    mkdir build && cd build && cmake -GNinja .. (other options here)
    # when done, go back to original source tree and wipe temp dir
    cd /tmp/wireshark
    rm -r /tmp/wireshark-2.4
    git worktree prune -v
--
Kind regards,
Peter Wu
https://lekensteyn.nl
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe