diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-04-12 15:11:54 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-04-12 15:11:54 +0200 |
commit | 1be660ff64f2cb69cac0376ae57f65908b34238b (patch) | |
tree | a1b9d7a446b2706db34db3ed27ec65e553ff2e55 /test cases | |
parent | 4199cb32a513370b6dd68ea90cdd0e5b852dff23 (diff) | |
download | meson-1be660ff64f2cb69cac0376ae57f65908b34238b.zip meson-1be660ff64f2cb69cac0376ae57f65908b34238b.tar.gz meson-1be660ff64f2cb69cac0376ae57f65908b34238b.tar.bz2 |
cmake: Capture stdout with UNIX pipes
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt | 3 | ||||
-rw-r--r-- | test cases/cmake/8 custom command/subprojects/cmMod/genMain.cpp (renamed from test cases/cmake/8 custom command/subprojects/cmMod/main.cpp) | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt b/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt index 5c75e65..1498c36 100644 --- a/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt +++ b/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt @@ -7,6 +7,9 @@ set (CMAKE_CXX_STANDARD_REQUIRED ON) include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_definitions("-DDO_NOTHING_JUST_A_FLAG=1") +add_executable(genMain genMain.cpp) +add_custom_command(OUTPUT main.cpp COMMAND genMain > main.cpp) + add_executable(gen main.cpp) add_executable(mycpy cp.cpp) diff --git a/test cases/cmake/8 custom command/subprojects/cmMod/main.cpp b/test cases/cmake/8 custom command/subprojects/cmMod/genMain.cpp index 9fade21..33f0201 100644 --- a/test cases/cmake/8 custom command/subprojects/cmMod/main.cpp +++ b/test cases/cmake/8 custom command/subprojects/cmMod/genMain.cpp @@ -1,4 +1,10 @@ #include <iostream> + +using namespace std; + +int main() { + cout << R"asd( +#include <iostream> #include <fstream> using namespace std; @@ -28,3 +34,7 @@ std::string getStr() { return 0; } +)asd"; + + return 0; +} |