cmake command line parsing broken
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 618 from 2004/4/15
    Hi,

    when I try to set some definitions with a space in cmake, cmake interprets it wrong.
    Example which works:

    Code:

    cmake -DCMAKE_C_FLAGS="-noixemul" ../


    But when I want to put some more definitions into the command line it breaks:

    Code:

    cmake -DCMAKE_C_FLAGS="-noixemul -mcpu=G4 -maltivec -mabi=altivec" ../


    Everything after -noixemul is interpreted as path.
    Maybe on MorphOS I have to escape the string value with spaces in a different way,
    but I don't know how.
    What I tried so far:

    "-noixemul -mcpu=G4 -maltivec -mabi=altivec"
    '-noixemul -mcpu=G4 -maltivec -mabi=altivec'
    -noixemul\ -mcpu=G4\ -maltivec\ -mabi=altivec

    Is that a cmake error on MorphOS or I am doing it wrong?
    regards
    eliot
  • »02.02.25 - 07:06
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Posts: 106 from 2020/12/24
    Quote:

    Everything after -noixemul is interpreted as path.


    Yep, it can happens even for other platforms. Maybe try "setenv" the C_FLAGS with all the parameters inside quotes as you tried.

    I have some projects that fail the same way with ".configure", and "setenv" before calling it works for me.
  • »02.02.25 - 08:15
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 618 from 2004/4/15
    Hm, no, on all other platforms (Linux, Mac, Windows)
    it works like expected.

    But setenv might be a workaround

    [ Edited by eliot 02.02.2025 - 10:26 ]
    regards
    eliot
  • »02.02.25 - 10:24
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 618 from 2004/4/15
    Is the cmake source of Mos sdk public?
    Maybe I can fix this and also update it to newer release?
    regards
    eliot
  • »02.02.25 - 10:30
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    beworld
    Posts: 633 from 2010/2/10
    From: FRANCE
    You can find cmake 3.16.2 here: https://github.com/jacadcaps/webkitty/tree/morphos_2.46.5

    @Jaca possible to release it (or maybe new SDK) or it's specific to wayfarer ?
    PowerMac G5 Quad 2.5, IMac G5 2.1, PowerBook G4 1.5, MacMini 1.5
    My MOS ports
  • »02.02.25 - 11:09
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 618 from 2004/4/15
    Quote:

    beworld wrote:
    You can find cmake 3.16.2 here: https://github.com/jacadcaps/webkitty/tree/morphos_2.46.5



    That's WebKit, not cmake.
    regards
    eliot
  • »02.02.25 - 12:01
    Profile