AmigaPorts / AmigaCMakeCrossToolchains

Mozilla Public License 2.0
11 stars 3 forks source link

read "tools" var from env or parameter #1

Closed tehKaiN closed 6 years ago

tehKaiN commented 6 years ago

As one can guess on windows platform I don't have compiler on /opt/m68k-amigaos path. Of course I can change this line locally:

set(tools /opt/m68k-amigaos)

but it would prevent me from easily pulling from repo as there will be unstaged changes. Since it's need to be invoked using -DCMAKE_TOOLCHAIN_FILE parameter, perhaps there could be additional one (totally optional) for specifying path?

MBeijer commented 6 years ago

-DCMAKE_TOOLCHAIN_PATH=C:\path\to\toolchain

set(tools CMAKE_TOOLCHAIN_PATH)

-D = Define

MBeijer commented 6 years ago

The best would be to have a default variable, and check if CMAKE_TOOLCHAIN_PATH is defined.

These toolchain files are examples to base your own from. How often do you change your toolchain path? :) I was thinking of adding something that checks where m68k-amigaos-gcc is and base the path of that eventually, so you don't have to do it manually each time.

tehKaiN commented 6 years ago

I was rather thinking that this repo's toolchain could be as generic as possible, so that all modern Amiga projects may directly use it without any changes - it will unify build environment.

Also, how about moving CPU/FPU settings to args, so that there could be only one toolchain file?

MBeijer commented 6 years ago

You mean one for ALL platforms? Or just more generic for each platform? Each platform has its own specifics.

We could move cpu/fpu to args, doesn't bother me. I've just put these up as is for now so people have something to start with, and we can then later finetune these to be even better.