summaryrefslogtreecommitdiffstats
path: root/test cases/cmake/17 include path order/subprojects/cmMod
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/cmake/17 include path order/subprojects/cmMod
parentInitial commit. (diff)
downloadmeson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz
meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/cmake/17 include path order/subprojects/cmMod')
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/CMakeLists.txt34
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/cmMod.cpp11
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incA/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incB/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incC/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incD/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incE/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incF/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incG/cmMod.hpp14
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incH/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incI/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incJ/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incL/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incM/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incN/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incO/cmMod.hpp4
-rw-r--r--test cases/cmake/17 include path order/subprojects/cmMod/incP/cmMod.hpp4
17 files changed, 115 insertions, 0 deletions
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/CMakeLists.txt b/test cases/cmake/17 include path order/subprojects/cmMod/CMakeLists.txt
new file mode 100644
index 0000000..9a252df
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/CMakeLists.txt
@@ -0,0 +1,34 @@
+cmake_minimum_required(VERSION 3.5)
+
+project(cmMod)
+set (CMAKE_CXX_STANDARD 14)
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+
+ # The one and only correct include dir
+ ${CMAKE_CURRENT_SOURCE_DIR}/incG
+
+ # All of these are traps
+ ${CMAKE_CURRENT_SOURCE_DIR}/incL
+ ${CMAKE_CURRENT_SOURCE_DIR}/incM
+ ${CMAKE_CURRENT_SOURCE_DIR}/incO
+ ${CMAKE_CURRENT_SOURCE_DIR}/incF
+ ${CMAKE_CURRENT_SOURCE_DIR}/incI
+ ${CMAKE_CURRENT_SOURCE_DIR}/incE
+ ${CMAKE_CURRENT_SOURCE_DIR}/incD
+ ${CMAKE_CURRENT_SOURCE_DIR}/incH
+ ${CMAKE_CURRENT_SOURCE_DIR}/incN
+ ${CMAKE_CURRENT_SOURCE_DIR}/incA
+ ${CMAKE_CURRENT_SOURCE_DIR}/incB
+ ${CMAKE_CURRENT_SOURCE_DIR}/incJ
+ ${CMAKE_CURRENT_SOURCE_DIR}/incP
+ ${CMAKE_CURRENT_SOURCE_DIR}/incC
+ ${CMAKE_CURRENT_SOURCE_DIR}/incK
+)
+
+add_definitions("-DDO_NOTHING_JUST_A_FLAG=1")
+
+add_library(cmModLib++ SHARED cmMod.cpp)
+include(GenerateExportHeader)
+generate_export_header(cmModLib++)
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/cmMod.cpp b/test cases/cmake/17 include path order/subprojects/cmMod/cmMod.cpp
new file mode 100644
index 0000000..d3141d5
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/cmMod.cpp
@@ -0,0 +1,11 @@
+#include "cmMod.hpp"
+
+using namespace std;
+
+cmModClass::cmModClass(string foo) {
+ str = foo + " World";
+}
+
+string cmModClass::getStr() const {
+ return str;
+}
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incA/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incA/cmMod.hpp
new file mode 100644
index 0000000..6228a31
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incA/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (A)
+#pragma once
+
+#error "cmMod.hpp in incA must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incB/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incB/cmMod.hpp
new file mode 100644
index 0000000..60bf14c
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incB/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (B)
+#pragma once
+
+#error "cmMod.hpp in incB must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incC/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incC/cmMod.hpp
new file mode 100644
index 0000000..3229e07
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incC/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (C)
+#pragma once
+
+#error "cmMod.hpp in incC must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incD/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incD/cmMod.hpp
new file mode 100644
index 0000000..b958093
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incD/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (D)
+#pragma once
+
+#error "cmMod.hpp in incD must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incE/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incE/cmMod.hpp
new file mode 100644
index 0000000..aea5b6d
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incE/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (E)
+#pragma once
+
+#error "cmMod.hpp in incE must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incF/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incF/cmMod.hpp
new file mode 100644
index 0000000..1e1e2cb
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incF/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (F)
+#pragma once
+
+#error "cmMod.hpp in incF must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incG/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incG/cmMod.hpp
new file mode 100644
index 0000000..0e6dc04
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incG/cmMod.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "cmmodlib++_export.h"
+#include <string>
+
+class CMMODLIB___EXPORT cmModClass {
+private:
+ std::string str;
+
+public:
+ cmModClass(std::string foo);
+
+ std::string getStr() const;
+};
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incH/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incH/cmMod.hpp
new file mode 100644
index 0000000..263e701
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incH/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (H)
+#pragma once
+
+#error "cmMod.hpp in incH must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incI/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incI/cmMod.hpp
new file mode 100644
index 0000000..a44a89a
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incI/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (I)
+#pragma once
+
+#error "cmMod.hpp in incI must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incJ/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incJ/cmMod.hpp
new file mode 100644
index 0000000..118a809
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incJ/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (J)
+#pragma once
+
+#error "cmMod.hpp in incJ must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incL/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incL/cmMod.hpp
new file mode 100644
index 0000000..8294104
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incL/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (L)
+#pragma once
+
+#error "cmMod.hpp in incL must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incM/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incM/cmMod.hpp
new file mode 100644
index 0000000..031c5e9
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incM/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (M)
+#pragma once
+
+#error "cmMod.hpp in incM must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incN/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incN/cmMod.hpp
new file mode 100644
index 0000000..9dba6da
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incN/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (N)
+#pragma once
+
+#error "cmMod.hpp in incN must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incO/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incO/cmMod.hpp
new file mode 100644
index 0000000..233add9
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incO/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (O)
+#pragma once
+
+#error "cmMod.hpp in incO must not be included"
diff --git a/test cases/cmake/17 include path order/subprojects/cmMod/incP/cmMod.hpp b/test cases/cmake/17 include path order/subprojects/cmMod/incP/cmMod.hpp
new file mode 100644
index 0000000..9578745
--- /dev/null
+++ b/test cases/cmake/17 include path order/subprojects/cmMod/incP/cmMod.hpp
@@ -0,0 +1,4 @@
+// cmMod.hpp (P)
+#pragma once
+
+#error "cmMod.hpp in incP must not be included"