|Re: [hatari-devel] Cmake warning|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Cmake warning
- From: Chang Chong <codemonkey2x@xxxxxxxxx>
- Date: Wed, 31 Mar 2021 11:59:16 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=lBygLItrnd47aXn6QGKrQkHF0ZNVUjySIxrsu+rJt0s=; b=WBT5KUjzsSpT5XmtvRpco8N8eBiASyD7K6Zr5idYxG9JHw+ouVEc+ye7GvdW6U1TGF gNBA54PQhsWB2/CXu8H1zX0EACLmlu6Eurg/LdfqjXDK46K0/C8obsi9PdBwYo9RwuzX TlladPmNIDl0HbKoZXr7TpHoRrLjGoF8gPyRNquzKG+SYKJrP9kCbzjThGZBwMBwLK00 mV0/lCI1ELHl87IMx/0Xgl4gWm6ral5BhElzTl+I6mrQaL19dwzuE6H2sonZtBLo8YQt VUaMz7TPiRWBmwTU8yFpgwyD573L6R7Jjoml8IoYkbybA7z1JjeYC15NdXZrM5qQtQlr I3qw==
I would recommend you create a build directory like Bob C. One of the nice features of cmake is that it helps with performing out of source builds. It could be a matter of personal preference, but this keeps the source tree clean and puts all the artifacts co-located in their own directory rather than intermixed with your source.
sample workflow based on Bob C’s post would be ..
# cmake -G <generator> -S <path/to/src> -B <path/to/build>
# cmake --build <path/to/build>
> On Mar 31, 2021, at 1:29 AM, Thomas Huth <th.huth@xxxxxxxxx> wrote:
> Am Sun, 21 Mar 2021 18:31:33 +0100
> schrieb Andreas Grabher <andreas_g86@xxxxxxxxxx>:
>> Thank you for the explanation. Is there no other way to do this? e.g.
>> hardcode them in cmakelists.txt?
> I think it should be enough to provide the path to either the source or
> the build directory:
> cmake -G Xcode .
> So that's just one additional dot at the end - not too much to type, I
> hope ;-)
>>> Am 21.03.2021 um 17:41 schrieb Bob Carpenter <hatari@xxxxxxxxxx>:
>>> That is a change to Cmake. I had to update my Hatari compiling to
>>> instructions to say this: cmake -G Xcode -S <path-to-source> -B
>>> When you do this and provide the directory paths, Cmake will no
>>> longer give you this warning. I think the most recent version of
>>> Cmake will give you an error if you do not provide the -S and -B
>>> Bob C
>>>> On Sun, Mar 21, 2021 at 8:01 AM Andreas Grabher
>>>> <andreas_g86@xxxxxxxxxx> wrote: When generating an Xcode project
>>>> from the latest Hatari sources using Cmake (cmake -G Xcode) I get
>>>> this warning:
>>>> CMake Warning:
>>>> No source or binary directory provided. Both will be assumed to
>>>> be the same as the current working directory, but note that this
>>>> warning will become a fatal error in future CMake releases.
>>>> Does anyone have an idea how to fix this?
>>>> Best wishes,