Clemapfel / jluna

Julia Wrapper for C++ with Focus on Safety, Elegance, and Ease of Use
https://clemens-cords.com/jluna
MIT License
244 stars 12 forks source link

CMake and Windows improvements #13

Closed friendlyanon closed 2 years ago

friendlyanon commented 2 years ago

This PR makes the CMake build scripts better organized and uses a find module to import Julia. The find module and the imported target it produces are not present in the install interface and requires consumers to do the work themselves. This is because Julia doesn't provide a CMake package.

There are some fixes for Windows as well and a workaround for bugs in Julia's headers. They include headers directly that are not intended to be included standalone.

The test and benchmark code are too broken on Windows, so they are disabled there for now.

Clemapfel commented 2 years ago

Thank you for contributing! I will get to this in the coming days.

Could you post the compiler output for the "too broken" test and benchmarking mains? I'd like to get an idea of what the issue may be, I should have a windows environment available to me soon by borrowing a friends laptop, so I can hopefully also do tests.

Thank you for improving the CMake, I admit that it is by far the weakest part of jluna and I'm thankful that people are slowly making it way better. I suck at CMake

friendlyanon commented 2 years ago

Sure, here is the verbose output: out.log

friendlyanon commented 2 years ago

I didn't cover this, but you might have noticed that I have removed some hardcoded flags. To introduce them again, you can use a preset. Here is an example: https://github.com/friendlyanon/cmake-init-shared-static/blob/master/CMakePresets.json

You can also look at the BUILDING and HACKING documents in that repository to get a feel for how to work with developer mode.

Clemapfel commented 2 years ago

Thank you very much for your help! I would like to list you as a co-author in the README, would that be okay with you?

friendlyanon commented 2 years ago

I don't mind. Having some CMake goodness out there is my goal.

Just don't forget about this! https://github.com/Clemapfel/jluna/pull/13#discussion_r828480223