Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about desired structure after adding Cmake build #7

Open
dirkcgrunwald opened this issue Nov 30, 2022 · 3 comments
Open

Questions about desired structure after adding Cmake build #7

dirkcgrunwald opened this issue Nov 30, 2022 · 3 comments

Comments

@dirkcgrunwald
Copy link

I am working on a "propagation model as a service" that will include the ITM model. As part of that, I need to build the ITM library in the Linux docker container.

To that end, I have forked the repo and added CMakefile support to build the library ( https://github.com/dirkcgrunwald/itm/tree/PR_cmake ). That support builds static and shared libraries for both Linux and MacOS (haven't tried under windows). There were some minor source code changes need (removing the use of windows specific paths such as "..\include\itm.h" and I will need to modify the VS project to add -Iinclude as needed but I need to set up a windows dev environment.

I was also planning on build a linux/macos version of the CLI interface, mainly to allow regression testing. From a cursory look this morning, most of the code in win32/ITMDrvr should be able to be cross platform with some windows-specific stuff (e.g. the DLL lookups).

  1. Would it be preferable to have a single code base with the common code refactored from the Windows-specific code or would it be easier to just have a separate unix/ subdirectory with a different version? My preference is for common source & refactoring.
  2. I'd be submitting a PR for this but I have limited Windows dev experience. Would someone else be willing to double check the Windows build environment to make certain nothing has been broken my changes or should I continue to set up the windows dev environment?
@wkozmaNTIA
Copy link
Member

A single repo would be preferable as long as it avoids very custom/specific items (we generally want the repo to be general use for broader applicability). If you submit the PR, I'm likely going to sit on it for a bit. I'm in the process of updating some of the code in this repo. The model itself is staying the same (with the exception of an expansion of the 'mode of propagation' enum). The main changes will be around MATLAB support, Python support, and cmake for cross-platform building. Some of these are already committed to existing branches, others are still residing on my local machine.

So feel free to submit your PR. My plan will be to finish the work I'm doing locally, then take a look at your PR and diff the two.

I'll leave this issue open for tracking until the above work has been completed.

@dirkcgrunwald
Copy link
Author

I'll send the PR - I've already added cmake support & the software builds for windows, linux & macos through the cmake configuration (although the default build produces static rather than shared libraries). The output of that is at https://github.com/dirkcgrunwald/itm/actions/runs/3606488765.

If you like, I could go ahead and finish out the process to run regression tests for each platform and to produce a "release" through github that would then provide libraries & itmtool binaries as you currently do for Windows at https://github.com/NTIA/itm/releases/tag/v1.4

I haven't done done the 'release' part for a project before but have found examples. Good to know about the python interface, I had contemplated doing that too.

@JAM5107k
Copy link

Do you have any of the build files for the Mac? I am interested in using this model on a Mac but don't quite follow the structure for building in the Mac environment. You indicate above that you have created a branch and added cMake files. I did not find that. Can you point me to them? Or, if you have not committed, do you have a build env for the Mac?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants