intelxed / mbuild

python-based build system used for building XED
Apache License 2.0
29 stars 29 forks source link

Intalling xed as a project library doesn't work as expected on windows #53

Open DridriLaBastos opened 1 month ago

DridriLaBastos commented 1 month ago

I am building xed as part of a cmake project. I build xed during the configuration time so that the headers are available for the IDE to provide auto-completion. Other libraries are built in my project and all are installed in <build-dir>/third-party/lib with the headers in <build-dir>/third-party/include.

In cmake xed is build using the execute_process command with the given args : execute_process(COMMAND ${Python3_EXECUTABLE} "${PROJECT_SOURCE_DIR}/xed/xed/mfile.py" --jobs=${CPU_COUNT} --build-dir=${PROJECT_BINARY_DIR}/obj --install-dir=${PROJECT_BINARY_DIR}/kits --prefix=${PROJECT_BINARY_DIR} --opt=3 --no-amd --no-via --no-encoder install) where $PROJECT_BINARY_DIR is <build-dir>/third-party.

On my MacOS and Linux machines, the build tree is correct: I have <build-dir>/third-party/include/xed and <build-dir>/third-party/lib/libxed.a with the expected kits and obj folder also inside third-party

On the other hand, this doesn't work on Windows, in my third-party folder I only have the obj and kits folder. I could add a cmake command to move the lib and include folders from kits up into the third-party directory, but it would be expected that the same compilation command gives the same result no matter the OS.

I was primarily using xed version 12.0.1 and mbuild 2022.04.17 but I have the same behaviour with the current latest version: mbuild v2024.05.05 and xed v2024.08.15

marjevan commented 3 weeks ago

This is a feature related to the XED build scripts. The addition of include and lib dirs under a prefix area is controlled by the --prefix knob. It is not supported on Windows machines: https://github.com/intelxed/xed/blob/b86dd5014463d954bc8898d2376b14852d26facd/xed_mbuild.py#L2301-L2306