On Tue, Jul 7, 2020 at 8:14 AM Richard Shaw <hobbes1...@gmail.com> wrote:
>
> On Sun, Jul 5, 2020 at 8:20 AM Neal Gompa <ngomp...@gmail.com> wrote:
>>
>> On Sun, Jul 5, 2020 at 9:16 AM Richard Shaw <hobbes1...@gmail.com> wrote:
>> >
>> > I saw the change notification but didn't know it went in to "production". 
>> > I was trying to build OpenImageIO in rawhide and it failed, because I was 
>> > already doing an out of source build which it appended 
>> > "%{_arch}-redhat-linux-gnu" or something like that to.
>> >
>> > So I looked up the guidelines for CMake which state:
>> >
>> > %build
>> > %cmake .
>> > %make_build
>> >
>> >
>> > Oookay... Now OIIO CMake config is giving me:
>> >
>> > CMake Error at CMakeLists.txt:50 (message):
>> >   Not allowed to run in-source build!
>> >
>> > And low and behold I see new options being passed to CMake...
>> >
>> > + /usr/bin/cmake -S . -B .
>> >
>> > Which point the source and binary locations to the same directory.
>> >
>> > So I was all for the change other than the fact I was already doing 
>> > out-of-source builds for all of the CMake packages I maintain, which this 
>> > breaks, and right now the "automagic" seems to be broken as well.
>> >
>>
>> Temporarily, we have %__cmake_in_source_build set, which forces back
>> the legacy behavior. You can switch to the upcoming out of source
>> default by adding the following to the top of your spec:
>>
>> # Force out of source build
>> %undefine __cmake_in_source_build
>>
>> With that, you can use %cmake with no arguments and everything should work 
>> fine.
>
>
> Well, both ways seem to be broken now. If I use the out-of-source build, 
> cmake works fine but apparently %make_build doesn't auto-change to the 
> generated directory. Am I expected to know the direcotory pattern and handle 
> it myself? If so this seems like a major step backwards.
>

%cmake_build and %cmake_install are recommended here, as those will do
the right thing.

If you want to use %make_build and %make_install, you'll need to add
"-C %{_vpath_builddir}"



-- 
真実はいつも一つ!/ Always, there's only one truth!
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to