diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-12 22:40:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-12 22:40:36 +0300 |
commit | 92f29a5926d52efea128ffabcf9b45b58039fc63 (patch) | |
tree | e2cc19f9552c39940d115a9f1e8a7bcab6629f40 /tools | |
parent | 1f4538fdab078b642e4f20c49822eb818a27852f (diff) | |
download | deheader-92f29a5926d52efea128ffabcf9b45b58039fc63.tar.gz deheader-92f29a5926d52efea128ffabcf9b45b58039fc63.tar.bz2 deheader-92f29a5926d52efea128ffabcf9b45b58039fc63.tar.xz deheader-92f29a5926d52efea128ffabcf9b45b58039fc63.zip |
Check compilation with and without -std flag.
This allow fix issue with C++11 flags where one std include, including other std files.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/ci/jobs/deheader.sh | 3 | ||||
-rw-r--r-- | tools/ci/samples/test11.cpp | 18 | ||||
-rw-r--r-- | tools/ci/samples/test11.h | 6 | ||||
-rw-r--r-- | tools/ci/samples/test12.h | 16 |
4 files changed, 42 insertions, 1 deletions
diff --git a/tools/ci/jobs/deheader.sh b/tools/ci/jobs/deheader.sh index 314506f..25cd26c 100755 --- a/tools/ci/jobs/deheader.sh +++ b/tools/ci/jobs/deheader.sh @@ -18,5 +18,6 @@ echo $3 ${dir}/deheader -q \ -c "$1" \ -d "$2" \ --m "-c -std=gnu++1z -Werror -Wall -Wextra -Wundef -Wmissing-declarations -I/usr/include -I${dir}/tools/ci/samples" ${dir}/tools/ci/samples/$3 \ +-s "-std=gnu++1z" \ +-m "-c -Werror -Wall -Wextra -Wundef -Wmissing-declarations -I/usr/include -I${dir}/tools/ci/samples" ${dir}/tools/ci/samples/$3 \ | grep -v "portability requires" | tee -a ${LOGFILE} diff --git a/tools/ci/samples/test11.cpp b/tools/ci/samples/test11.cpp new file mode 100644 index 0000000..89430b5 --- /dev/null +++ b/tools/ci/samples/test11.cpp @@ -0,0 +1,18 @@ +#include "test11.h" + +#include <map> +#include <string> + +class Class1 +{ + Class1(const std::string &str) : + mStr(str) + { + } + const std::string mStr; +}; + +int function1() +{ + return 0; +} diff --git a/tools/ci/samples/test11.h b/tools/ci/samples/test11.h new file mode 100644 index 0000000..53ef57d --- /dev/null +++ b/tools/ci/samples/test11.h @@ -0,0 +1,6 @@ +#ifndef TEST11 +#define TEST11 + +int function1(); + +#endif // TEST11 diff --git a/tools/ci/samples/test12.h b/tools/ci/samples/test12.h new file mode 100644 index 0000000..3dac36c --- /dev/null +++ b/tools/ci/samples/test12.h @@ -0,0 +1,16 @@ +#ifndef TEST12 +#define TEST12 + +#include <map> +#include <string> + +class Class1 +{ + Class1(const std::string &str) : + mStr(str) + { + } + const std::string mStr; +}; + +#endif // TEST12 |