mirror of
https://github.com/arun11299/cpp-subprocess.git
synced 2025-08-04 20:36:20 -04:00

* Support CMake 4 CMake 4 has removed compatibility with CMake < 3.5 Bumping minimum required version to 3.5 enables CMake 4 to build this code. * Move header into subdir * Improve CMake setup This commit configures and installs CMake metadata files. This also provides the namespaced ALIAS target `cpp-subprocess::subprocess`. * Update README with CMake instructions * Update include paths in tests
19 lines
311 B
C++
19 lines
311 B
C++
#include <iostream>
|
|
#include <cpp-subprocess/subprocess.hpp>
|
|
|
|
using namespace subprocess;
|
|
|
|
void test_redirect()
|
|
{
|
|
auto p = Popen("./write_err.sh", output{"write_err.txt"}, error{STDOUT});
|
|
std::cout << p.poll() << std::endl;
|
|
|
|
}
|
|
|
|
int main() {
|
|
#ifndef __USING_WINDOWS__
|
|
test_redirect();
|
|
#endif
|
|
return 0;
|
|
}
|