diff options
Diffstat (limited to 'meson/test cases/cmake/18 skip include files/subprojects/cmMod')
8 files changed, 99 insertions, 0 deletions
diff --git a/meson/test cases/cmake/18 skip include files/subprojects/cmMod/CMakeLists.txt b/meson/test cases/cmake/18 skip include files/subprojects/cmMod/CMakeLists.txt new file mode 100644 index 000000000..4db01b32d --- /dev/null +++ b/meson/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/meson/test cases/cmake/18 skip include files/subprojects/cmMod/cmMod.cpp b/meson/test cases/cmake/18 skip include files/subprojects/cmMod/cmMod.cpp new file mode 100644 index 000000000..7551b756b --- /dev/null +++ b/meson/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/meson/test cases/cmake/18 skip include files/subprojects/cmMod/cmMod.hpp b/meson/test cases/cmake/18 skip include files/subprojects/cmMod/cmMod.hpp new file mode 100644 index 000000000..f7b780f11 --- /dev/null +++ b/meson/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/meson/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/CMakeLists.txt b/meson/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/CMakeLists.txt new file mode 100644 index 000000000..39cd08003 --- /dev/null +++ b/meson/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/meson/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc1.cpp b/meson/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc1.cpp new file mode 100644 index 000000000..b637755c3 --- /dev/null +++ b/meson/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/meson/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc2.cpp b/meson/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc2.cpp new file mode 100644 index 000000000..8a53567da --- /dev/null +++ b/meson/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/meson/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc3.cpp b/meson/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc3.cpp new file mode 100644 index 000000000..2c8ad125b --- /dev/null +++ b/meson/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/meson/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc4.cpp b/meson/test cases/cmake/18 skip include files/subprojects/cmMod/fakeInc/cmModInc4.cpp new file mode 100644 index 000000000..78a067342 --- /dev/null +++ b/meson/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; +} |