summaryrefslogtreecommitdiffstats
path: root/test cases/cmake/18 skip include files/subprojects/cmMod
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/cmake/18 skip include files/subprojects/cmMod')
-rw-r--r--test cases/cmake/18 skip include files/subprojects/cmMod/CMakeLists.txt15
-rw-r--r--test cases/cmake/18 skip include files/subprojects/cmMod/cmMod.cpp10
-rw-r--r--test cases/cmake/18 skip include files/subprojects/cmMod/cmMod.hpp16
-rw-r--r--test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/CMakeLists.txt30
-rw-r--r--test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc1.cpp7
-rw-r--r--test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc2.cpp7
-rw-r--r--test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc3.cpp7
-rw-r--r--test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc4.cpp7
8 files changed, 99 insertions, 0 deletions
diff --git a/test cases/cmake/18 skip include files/subprojects/cmMod/CMakeLists.txt b/test cases/cmake/18 skip include files/subprojects/cmMod/CMakeLists.txt
new file mode 100644
index 0000000..4db01b3
--- /dev/null
+++ b/test cases/cmake/18 skip include files/subprojects/cmMod/CMakeLists.txt
@@ -0,0 +1,15 @@
+cmake_minimum_required(VERSION 3.5)
+
+project(cmMod)
+set (CMAKE_CXX_STANDARD 14)
+
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+add_definitions("-DDO_NOTHING_JUST_A_FLAG=1")
+
+set(SRCS
+ ${CMAKE_CURRENT_LIST_DIR}/cmMod.hpp
+ ${CMAKE_CURRENT_LIST_DIR}/cmMod.cpp
+)
+
+add_subdirectory(fakeInc)
diff --git a/test cases/cmake/18 skip include files/subprojects/cmMod/cmMod.cpp b/test cases/cmake/18 skip include files/subprojects/cmMod/cmMod.cpp
new file mode 100644
index 0000000..7551b75
--- /dev/null
+++ b/test cases/cmake/18 skip include files/subprojects/cmMod/cmMod.cpp
@@ -0,0 +1,10 @@
+#include "cmMod.hpp"
+
+using namespace std;
+
+#define MESON_INCLUDE_IMPL
+#include "fakeInc/cmModInc1.cpp"
+#include "fakeInc/cmModInc2.cpp"
+#include "fakeInc/cmModInc3.cpp"
+#include "fakeInc/cmModInc4.cpp"
+#undef MESON_INCLUDE_IMPL
diff --git a/test cases/cmake/18 skip include files/subprojects/cmMod/cmMod.hpp b/test cases/cmake/18 skip include files/subprojects/cmMod/cmMod.hpp
new file mode 100644
index 0000000..f7b780f
--- /dev/null
+++ b/test cases/cmake/18 skip include files/subprojects/cmMod/cmMod.hpp
@@ -0,0 +1,16 @@
+#pragma once
+
+#include "cmmodlib++_export.h"
+#include <string>
+
+class CMMODLIB___EXPORT cmModClass {
+private:
+ std::string str;
+
+ std::string getStr1() const;
+ std::string getStr2() const;
+public:
+ cmModClass(std::string foo);
+
+ std::string getStr() const;
+};
diff --git a/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/CMakeLists.txt b/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/CMakeLists.txt
new file mode 100644
index 0000000..39cd080
--- /dev/null
+++ b/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/CMakeLists.txt
@@ -0,0 +1,30 @@
+list(APPEND SRCS
+ cmModInc1.cpp
+ cmModInc2.cpp
+ cmModInc3.cpp
+ cmModInc4.cpp
+)
+
+set(SRC_A
+ cmModInc1.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/cmModInc2.cpp
+)
+
+set_property(
+ SOURCE ${SRC_A}
+ PROPERTY
+ HEADER_FILE_ONLY ON
+)
+
+set_source_files_properties(
+ cmModInc3.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/cmModInc4.cpp
+ PROPERTIES
+ LABELS "CMake;Lists;are;fun"
+ HEADER_FILE_ONLY ON
+)
+
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+add_library(cmModLib++ SHARED ${SRCS})
+include(GenerateExportHeader)
+generate_export_header(cmModLib++)
diff --git a/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc1.cpp b/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc1.cpp
new file mode 100644
index 0000000..b637755
--- /dev/null
+++ b/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc1.cpp
@@ -0,0 +1,7 @@
+#ifndef MESON_INCLUDE_IMPL
+#error "MESON_INCLUDE_IMPL is not defined"
+#endif // !MESON_INCLUDE_IMPL
+
+cmModClass::cmModClass(string foo) {
+ str = foo + " World";
+}
diff --git a/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc2.cpp b/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc2.cpp
new file mode 100644
index 0000000..8a53567
--- /dev/null
+++ b/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc2.cpp
@@ -0,0 +1,7 @@
+#ifndef MESON_INCLUDE_IMPL
+#error "MESON_INCLUDE_IMPL is not defined"
+#endif // !MESON_INCLUDE_IMPL
+
+string cmModClass::getStr() const {
+ return getStr2();
+}
diff --git a/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc3.cpp b/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc3.cpp
new file mode 100644
index 0000000..2c8ad12
--- /dev/null
+++ b/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc3.cpp
@@ -0,0 +1,7 @@
+#ifndef MESON_INCLUDE_IMPL
+#error "MESON_INCLUDE_IMPL is not defined"
+#endif // !MESON_INCLUDE_IMPL
+
+string cmModClass::getStr1() const {
+ return getStr2();
+}
diff --git a/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc4.cpp b/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc4.cpp
new file mode 100644
index 0000000..78a0673
--- /dev/null
+++ b/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc4.cpp
@@ -0,0 +1,7 @@
+#ifndef MESON_INCLUDE_IMPL
+#error "MESON_INCLUDE_IMPL is not defined"
+#endif // !MESON_INCLUDE_IMPL
+
+string cmModClass::getStr2() const {
+ return str;
+}