sheredom / subprocess.h

🐜 single header process launching solution for C and C++
The Unlicense
1.1k stars 97 forks source link

Add CPack and CTest support #56

Closed SamuelMarks closed 2 years ago

SamuelMarks commented 2 years ago

WiP, trying to simplify your compiler flags also

sheredom commented 2 years ago

Thanks for your interest in my library. So I won't be accepting a PR that adds CMakeLists.txt to the root of the repository, because I know from developers that that is a red flag for 'This library has some complex crap in it'. That's why I put it in the test folder only, so that its super clear from the root of the repo that the library is super dumb and easy to use.

SamuelMarks commented 2 years ago

@sheredom Yeah that's fine, but I can easily put it in a subdirectory (maybe not 'cmake' as that could be a red flag). No need to close this PR

sheredom commented 2 years ago

Should have waited for your response before closing this - my bad. I don't really want the hassle of having to maintain the CPack/CTest support (I don't even rightly understand what it is or what it does) - that's my biggest concern with accepting it even in a subfolder.

SamuelMarks commented 2 years ago

CPack—and related config code—is useful for packaging, including to .deb, .msi, and even to the find_package or find_path code for including this in CMake projects… which although all your projects seem to be header-only, sometimes you may want to link to system libraries, and having a CMake target that you add target_link_libraries to the INTERFACE of would be useful (I'm working on my own header-only library here that is starting to do that).

CTest is useful for automating [cross-platform] testing, along with CDash you can run all your projects and put their tests into the one dashboard. Just alone CTest will replace your custom test building and test running (I see you use msbuild explicitly… that shouldn't be).