palacaze / sigslot

A simple C++14 signal-slots implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better integration with FetchContent/ExternalProject/CPM/...

OlivierLDff opened this issue · comments

Hi, I'm using sigslot with FetchContent.
So:

  • I don't need install
  • tests & examples should be disabled by default
  • tests & examples targets should be namespace to avoid conflict with any other project, if I need to enable examples/tests somehow

I have that in my dev branch : https://github.com/OlivierLDff/sigslot/tree/dev

No original behavior got changed if you are only using this repo to install, except the namespacing of examples/tests targets.
Tell me if you would be interested in such a PR, if it should be divided, etc...

I tried to separate each features into a commit.

Edit : I also added CI with github actions if interested.

Those are some nice changes, I will gladly merge them! Send me a PR when ready.

A few comments beforehand:

  • The test target is currently configured to launch CTest on build, so your "Unit Tests" step is not needed
  • The nproc command is part of coreutils on GNU/Linux, I do not think Windows shell supports it. An alternative may be to use the Ninja generator
  • Yes you are right I see that now, I will remove the unit test step.
  • Is nproc a problem? Build run fine.

Do you want separate PR for ci/cmake, or one is ok?

It builds but this may be a fluke. Somehow powershell does not trip over the $(nproc) expression.
As per cmake's documentation, using cmake --build -j without specifying the number of processes will default to what the underlying make tool uses. I think it would be safer to just remove -j on MS builds.

One PR is fine with me.