grasph / wrapit

Automatization of C++--Julia wrapper generation
MIT License
98 stars 12 forks source link

add git hash in generated source file #25

Closed t-bltg closed 1 year ago

t-bltg commented 1 year ago

Add the wrapit tool git hash in the generated source files, for reproducibility.

grasph commented 1 year ago

@t-bltg please review the changes I made to your PR.

t-bltg commented 1 year ago

Hum, the file version.cmake seems to be missing in https://github.com/grasph/wrapit/pull/25/commits/e8e9ca9ef8c8eb4d65cd0ebf9528b908616a03fe, so it fails to build.

t-bltg commented 1 year ago

I've used target_sources instead, since you cannot use a missing source in add_executable (version.cpp), which would be created by the version target (fails to build).

grasph commented 1 year ago

The error was still there with your fix. I don't how I missed it before. It works for me with the trick of 6785d2d commit.

t-bltg commented 1 year ago

Odd, this worked on my laptop, and I extra checked by removing CMAKE_BINARY_DIR before invoking cmake.

Anyway, I can confirm that it now builds as expected.

t-bltg commented 1 year ago

Thanks !