summaryrefslogtreecommitdiff
path: root/test cases/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/cmake')
-rw-r--r--test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt4
-rw-r--r--test cases/cmake/8 custom command/subprojects/cmMod/cpyTest.cpp3
-rw-r--r--test cases/cmake/8 custom command/subprojects/cmMod/cpyTest/CMakeLists.txt7
-rw-r--r--test cases/cmake/8 custom command/subprojects/cmMod/cpyTest/cpyTest4.hpp3
4 files changed, 15 insertions, 2 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 70ac236d5..c7797db66 100644
--- a/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt
+++ b/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt
@@ -109,6 +109,8 @@ add_custom_command(
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cpyTest"
)
+add_subdirectory(cpyTest ccppyyTTeesstt)
+
add_library(cmModLib SHARED cmMod.cpp genTest.cpp cpyBase.cpp cpyBase.hpp cpyNext.cpp cpyNext.hpp cpyTest.cpp cpyTest.hpp cpyTest2.hpp cpyTest3.hpp)
include(GenerateExportHeader)
generate_export_header(cmModLib)
@@ -123,5 +125,5 @@ add_custom_target(args_test_cmd
)
add_custom_target(macro_name_cmd COMMAND macro_name)
-add_dependencies(cmModLib args_test_cmd)
+add_dependencies(cmModLib args_test_cmd tgtCpyTest4)
add_dependencies(args_test_cmd macro_name_cmd;gen;mycpy)
diff --git a/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest.cpp b/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest.cpp
index a9d05c744..f76225152 100644
--- a/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest.cpp
+++ b/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest.cpp
@@ -1,7 +1,8 @@
#include "cpyTest.hpp"
#include "cpyTest2.hpp"
#include "cpyTest3.hpp"
+#include "ccppyyTTeesstt/cpyTest4.hpp"
std::string getStrCpyTest() {
- return CPY_TEST_STR_2 CPY_TEST_STR_3;
+ return CPY_TEST_STR_2 CPY_TEST_STR_3 CPY_TEST_STR_4;
}
diff --git a/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest/CMakeLists.txt b/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest/CMakeLists.txt
new file mode 100644
index 000000000..f577dcf2a
--- /dev/null
+++ b/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest/CMakeLists.txt
@@ -0,0 +1,7 @@
+add_custom_command(
+ OUTPUT cpyTest4.hpp
+ COMMAND mycpy "${CMAKE_CURRENT_SOURCE_DIR}/cpyTest4.hpp" cpyTest4.hpp
+ DEPENDS cpyTest4.hpp
+)
+
+add_custom_target(tgtCpyTest4 DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/cpyTest4.hpp")
diff --git a/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest/cpyTest4.hpp b/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest/cpyTest4.hpp
new file mode 100644
index 000000000..4124c430b
--- /dev/null
+++ b/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest/cpyTest4.hpp
@@ -0,0 +1,3 @@
+#pragma once
+
+#define CPY_TEST_STR_4 " test"