autc04 / Retro68

a gcc-based cross-compiler for classic 68K and PPC Macintoshes
GNU General Public License v3.0
548 stars 54 forks source link

No error when segmap is not found #194

Open ryandesign opened 1 year ago

ryandesign commented 1 year ago

If I specify a custom segment map, but the file is not found, no error is issued. Instead, the app is built with just two segments, Runtime and Main, rather than the normal default set of segments. Perhaps an error should be issued when the specified segment map can't be found so the user knows they made a mistake.

One possible source of confusion is that the given path apparently must be absolute. For example, this does not work:

set_target_properties(app PROPERTIES
    LINK_FLAGS "-Wl,--mac-segments,my.segmap"
)

whereas this does work:

set_target_properties(app PROPERTIES
    LINK_FLAGS "-Wl,--mac-segments,${CMAKE_CURRENT_SOURCE_DIR}/my.segmap"
)
ryandesign commented 1 year ago

the given path apparently must be absolute

at least when using an out-of-source build, which I was.