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

Cmake - proposal / WIP #172

Closed
wants to merge 6 commits into from
Closed

Cmake - proposal / WIP #172

wants to merge 6 commits into from

Conversation

ahkok
Copy link

@ahkok ahkok commented Oct 23, 2019

This is a shot across the bow to make this project easier to consume for everyone. With CMake, you can continue to use MSVC, build on Linux/Unix etc. And it will be much easier for consumers to actually use this software:

$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install

This makes packaging for all distributions trivial.

This is NOT finished. This is just an initial step showing how simple this can look if done right.

  • Linux works. The other OSs I'll need to convert the specific compilation flags still (I can't test or use windows)
  • daemon/client compile as well
  • make install also works
  • all the binaries compile/link OK
  • added proper version numbering (1.0.0)
  • create static internal library works

I've also reorganized the code to make sure there's no duplicate Cpp/H files around. Windows build may require a few more files to be moved to src and included in the build sequence, or otherwise fixed up.

There's a ton more here that can and needs to be done, but I'd like @opcm folks to sniff at this and get warmed up for doing this change, since it will make the project trivial to consume for all customers (not just clearlinux users).

Note: this was ~ 3 hours of work. Please don't let this go to waste.

#include "../../cpucounters.h"
#include "../../utils.h"
#include "../cpucounters.h"
#include "../utils.h"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can drop ../ if the directory is already in the includes fro include_directories()

@opcm
Copy link
Contributor

opcm commented Oct 24, 2019

@ahkok this is great! Thank you for making this proposal. cmake will really pay off if we can join two current Makefile (Linux/*BSD/OSX) and MSVC project files processes. BTW you can check your PR builds on OSX here: https://travis-ci.org/opcm/pcm/pull_requests
I am not sure why github dropped travis from pcm CI checks (need to look into it)

@ogbrugge
Copy link
Contributor

I welcome changes in this direction, please continue with this, it is very much appreciated!

@ahkok
Copy link
Author

ahkok commented Oct 24, 2019

Next I'll need to work on MSVC/Windows builds and Mac/BSD - Windows will be a little bit more complex.

This won't yet fix MacOS builds just yet. CI isn't testing those
either.
@ahkok
Copy link
Author

ahkok commented Oct 24, 2019

Not much progress today. Twiddled on MacOS builds yet but I think we may need to replace the xcodebuild section - I'm looking to see if there's examples where people have done similar things, but nothing came up yet.

FWIW I think this will take a few weeks at least to iron out for MacOS and Windows. Given that I'm a Linux dev only I'll need to find some cross platform folks that can help with this.

@rdementi
Copy link
Contributor

thanks. Now we have moved to cmake in the master branch.

@rdementi rdementi closed this Jan 24, 2022
rdementi added a commit that referenced this pull request Feb 28, 2022
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

Successfully merging this pull request may close these issues.

5 participants