diff options
Diffstat (limited to 'meson/test cases/cmake/13 system includes/subprojects/cmMod')
4 files changed, 54 insertions, 0 deletions
diff --git a/meson/test cases/cmake/13 system includes/subprojects/cmMod/CMakeLists.txt b/meson/test cases/cmake/13 system includes/subprojects/cmMod/CMakeLists.txt new file mode 100644 index 000000000..a6b0ba40c --- /dev/null +++ b/meson/test cases/cmake/13 system includes/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") + +add_library(cmModLib SHARED cmMod.cpp) +include(GenerateExportHeader) +generate_export_header(cmModLib) + +target_compile_options(cmModLib PRIVATE "-Wall" "-Werror") +target_include_directories(cmModLib SYSTEM PRIVATE "sysInc") diff --git a/meson/test cases/cmake/13 system includes/subprojects/cmMod/cmMod.cpp b/meson/test cases/cmake/13 system includes/subprojects/cmMod/cmMod.cpp new file mode 100644 index 000000000..1eaf0cf31 --- /dev/null +++ b/meson/test cases/cmake/13 system includes/subprojects/cmMod/cmMod.cpp @@ -0,0 +1,12 @@ +#include "cmMod.hpp" +#include "triggerWarn.hpp" + +using namespace std; + +cmModClass::cmModClass(string foo) { + str = foo + " World " + to_string(bar(World)); +} + +string cmModClass::getStr() const { + return str; +} diff --git a/meson/test cases/cmake/13 system includes/subprojects/cmMod/cmMod.hpp b/meson/test cases/cmake/13 system includes/subprojects/cmMod/cmMod.hpp new file mode 100644 index 000000000..52f576bf3 --- /dev/null +++ b/meson/test cases/cmake/13 system includes/subprojects/cmMod/cmMod.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include <string> +#include "cmmodlib_export.h" + +class CMMODLIB_EXPORT cmModClass { + private: + std::string str; + public: + cmModClass(std::string foo); + + std::string getStr() const; +}; diff --git a/meson/test cases/cmake/13 system includes/subprojects/cmMod/sysInc/triggerWarn.hpp b/meson/test cases/cmake/13 system includes/subprojects/cmMod/sysInc/triggerWarn.hpp new file mode 100644 index 000000000..3b00f2db4 --- /dev/null +++ b/meson/test cases/cmake/13 system includes/subprojects/cmMod/sysInc/triggerWarn.hpp @@ -0,0 +1,14 @@ +#pragma once + +enum Foo { + Hello, + World +}; + +inline int bar( Foo foo ) { + switch(foo) { + case Hello: return 0; + // Warn because of missung case for World + } + return 1; +} |