Closed SetTrend closed 9 months ago
The project itself is portable. The intermediate and the bin folder are not portable and should be excluded from sharing. The information about the SDK path on the system is known by the Toolchain and the intermediate folder need to be generated on each system individually.
From the logs while building a PLCnext project I noticed a serious issue:
Current Situation
Currently, in a PLCnext project, references to the PLCnext SDK in GCC
.make
files are written as absolute file paths:This impedes PLCnext projects from being compiled in a colaborative environment, such as other local installations, and in particular CI/CD build pipelines. Azure DevOps, GitHub and GitLab will be using file paths different from local installations. Installing SDKs to arbitrary, absolute file locations isn't permitted in these environments.
Using absolute file paths keeps PLCnext programming restricted to minor, one-man projects.
Desired Situation
All PLCnext project files, incl.
.cmake
files should be portable. They should compile anywhere, regardless of particular project or SDK file location.A suggested approach would be to have a single environment variable (e.,g.
PLCNEXT_SDK_ROOT
) point to an PLCnext SDK root file path and have PLCnext SDK installers install all SDKs into sub directories of that root file path:The new, proposed environment variable, along with the corresponding path suffixes should then be used by all CMAKE files.