From c7fd077dae2807060957ccc69463d15a05c17907 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 8 Oct 2021 17:59:50 +0100 Subject: Fix the messy include problem Avoids the inconsitent include rules across the build using an install rule. Fixes the includes in this project to use the same definition as outside. --- slicer/db/Jamfile.jam | 5 ++--- slicer/db/sqlCommon.cpp | 2 +- slicer/db/sqlExceptions.ice | 2 +- slicer/db/sqlInsertSerializer.h | 2 +- slicer/db/sqlSelectDeserializer.h | 4 ++-- slicer/db/sqlTablePatchSerializer.h | 2 +- slicer/db/sqlUpdateSerializer.h | 2 +- slicer/db/testInsert.cpp | 2 +- slicer/ice/Jamfile.jam | 2 -- slicer/ice/serializer.h | 2 +- slicer/ice/testSpecifics.cpp | 2 +- slicer/json/Jamfile.jam | 2 -- slicer/json/serializer.h | 4 ++-- slicer/slicer/Jamfile.jam | 11 +++++++---- slicer/test/conversions.cpp | 4 ++-- slicer/test/serializers.cpp | 6 +++--- slicer/test/slicer.jam | 4 ++-- slicer/test/streams.cpp | 8 ++++---- slicer/tool/icemetadata.cpp | 2 +- slicer/tool/icemetadata.h | 2 +- slicer/xml/Jamfile.jam | 1 - slicer/xml/serializer.h | 2 +- slicer/xml/xmlExceptions.ice | 2 +- 23 files changed, 36 insertions(+), 39 deletions(-) diff --git a/slicer/db/Jamfile.jam b/slicer/db/Jamfile.jam index bc43dcb..2e5c69f 100644 --- a/slicer/db/Jamfile.jam +++ b/slicer/db/Jamfile.jam @@ -10,7 +10,6 @@ lib slicer-db : [ glob *.cpp : test*.cpp ] sqlExceptions : - .. ..//Ice dbppcore ../..//glibmm @@ -141,6 +140,6 @@ alias install : install-lib install-slice ; explicit install ; explicit install-lib ; explicit install-slice ; -package.install install-lib : slicer/db : : slicer-db : [ glob-tree *.h ] ; -package.install-data install-slice : slicer/ice : [ glob *.ice ] ; +package.install install-lib : slicer/db : : slicer-db : [ glob-tree *.h : test*.h ] ; +package.install-data install-slice : slicer/ice : [ glob *.ice : test*.ice ] ; diff --git a/slicer/db/sqlCommon.cpp b/slicer/db/sqlCommon.cpp index f60d33f..40e43f7 100644 --- a/slicer/db/sqlCommon.cpp +++ b/slicer/db/sqlCommon.cpp @@ -1,6 +1,6 @@ #include "sqlCommon.h" #include -#include +#include #include #include diff --git a/slicer/db/sqlExceptions.ice b/slicer/db/sqlExceptions.ice index 3aca6a2..d56c956 100644 --- a/slicer/db/sqlExceptions.ice +++ b/slicer/db/sqlExceptions.ice @@ -1,7 +1,7 @@ #ifndef SLICER_XML #define SLICER_XML -#include +#include module Slicer { ["cpp:ice_print"] diff --git a/slicer/db/sqlInsertSerializer.h b/slicer/db/sqlInsertSerializer.h index 6bcfae3..26989fc 100644 --- a/slicer/db/sqlInsertSerializer.h +++ b/slicer/db/sqlInsertSerializer.h @@ -1,9 +1,9 @@ #ifndef SLICER_DB_SQLINSERTSERIALIZER_H #define SLICER_DB_SQLINSERTSERIALIZER_H -#include "modelParts.h" #include #include +#include #include #include #include diff --git a/slicer/db/sqlSelectDeserializer.h b/slicer/db/sqlSelectDeserializer.h index b681817..bf2b351 100644 --- a/slicer/db/sqlSelectDeserializer.h +++ b/slicer/db/sqlSelectDeserializer.h @@ -1,9 +1,9 @@ #ifndef SLICER_DB_SQLSELECTDESERIALIZER_H #define SLICER_DB_SQLSELECTDESERIALIZER_H -#include "modelParts.h" -#include "slicer/serializer.h" #include +#include +#include #include #include namespace DB { diff --git a/slicer/db/sqlTablePatchSerializer.h b/slicer/db/sqlTablePatchSerializer.h index 8973072..21c8b3d 100644 --- a/slicer/db/sqlTablePatchSerializer.h +++ b/slicer/db/sqlTablePatchSerializer.h @@ -1,7 +1,7 @@ #ifndef SLICER_DB_SQLTABLEPATCHSERIALIZER_H #define SLICER_DB_SQLTABLEPATCHSERIALIZER_H -#include "modelParts.h" +#include #include #include namespace DB { diff --git a/slicer/db/sqlUpdateSerializer.h b/slicer/db/sqlUpdateSerializer.h index 4204b86..8707988 100644 --- a/slicer/db/sqlUpdateSerializer.h +++ b/slicer/db/sqlUpdateSerializer.h @@ -1,8 +1,8 @@ #ifndef SLICER_DB_SQLUPDATESERIALIZER_H #define SLICER_DB_SQLUPDATESERIALIZER_H -#include "modelParts.h" #include +#include #include #include #include diff --git a/slicer/db/testInsert.cpp b/slicer/db/testInsert.cpp index 37196b1..a9e42f1 100644 --- a/slicer/db/testInsert.cpp +++ b/slicer/db/testInsert.cpp @@ -4,7 +4,6 @@ #include "classes.h" #include "collections.h" #include "common.h" -#include "slicer/slicer.h" #include "sqlInsertSerializer.h" #include "sqlSelectDeserializer.h" #include "structs.h" @@ -14,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/slicer/ice/Jamfile.jam b/slicer/ice/Jamfile.jam index ef5c0e8..79cfaba 100644 --- a/slicer/ice/Jamfile.jam +++ b/slicer/ice/Jamfile.jam @@ -5,7 +5,6 @@ lib stdc++fs ; lib slicer-ice : [ glob *.cpp : test*.cpp ] : - .. stdc++fs ..//Ice ..//adhocutil @@ -23,7 +22,6 @@ run testSpecifics.cpp ../test//types ../test//common ../slicer//slicer - .. : testSpecifics ; diff --git a/slicer/ice/serializer.h b/slicer/ice/serializer.h index f507c58..c45ece8 100644 --- a/slicer/ice/serializer.h +++ b/slicer/ice/serializer.h @@ -1,10 +1,10 @@ #ifndef SLICER_ICE_H #define SLICER_ICE_H -#include "modelParts.h" #include #include #include +#include #include #include diff --git a/slicer/ice/testSpecifics.cpp b/slicer/ice/testSpecifics.cpp index 715ccbd..2080993 100644 --- a/slicer/ice/testSpecifics.cpp +++ b/slicer/ice/testSpecifics.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include // IWYU pragma: no_forward_declare Slicer::IceStreamDeserializer diff --git a/slicer/json/Jamfile.jam b/slicer/json/Jamfile.jam index be5f951..8c533bb 100644 --- a/slicer/json/Jamfile.jam +++ b/slicer/json/Jamfile.jam @@ -9,7 +9,6 @@ lib stdc++fs ; lib slicer-json : [ glob *.cpp : test*.cpp ] : - .. stdc++fs jsonpp ../..//glibmm @@ -29,7 +28,6 @@ run testSpecifics.cpp ../test//types ../test//common ../slicer//slicer - .. : testSpecifics ; diff --git a/slicer/json/serializer.h b/slicer/json/serializer.h index ef79b47..32500e8 100644 --- a/slicer/json/serializer.h +++ b/slicer/json/serializer.h @@ -1,11 +1,11 @@ #ifndef SLICER_JSON_H #define SLICER_JSON_H -#include "modelParts.h" -#include "slicer/serializer.h" #include #include #include +#include +#include #include #include diff --git a/slicer/slicer/Jamfile.jam b/slicer/slicer/Jamfile.jam index 8fde048..083ebff 100644 --- a/slicer/slicer/Jamfile.jam +++ b/slicer/slicer/Jamfile.jam @@ -6,11 +6,11 @@ compile enum-test.cpp ; compile hook-test.cpp : ..//adhocutil common ; compile metadata-test.cpp : ..//adhocutil common ; -obj common : common.ice : tidy:none ; +h common : common.ice ; lib slicer : [ glob *.cpp : *-test.cpp ] - common + [ obj c : common : common ] : ..//Ice ..//adhocutil @@ -18,15 +18,18 @@ lib slicer : common : : .. - . common stdc++fs + bin/include + ../slicer//install-headers-local ; alias install : install-lib install-slice ; explicit install ; explicit install-lib ; explicit install-slice ; -package.install install-lib : slicer/slicer : : slicer : [ glob-tree *.h ] ; +package.install install-lib : slicer/slicer : : slicer : [ glob-tree-ex . : *.h : include ] ; package.install-data install-slice : slicer/ice : [ glob *.ice ] ; +explicit install-headers-local ; +install install-headers-local : common : bin/include/slicer ; diff --git a/slicer/test/conversions.cpp b/slicer/test/conversions.cpp index 400daa0..f34c467 100644 --- a/slicer/test/conversions.cpp +++ b/slicer/test/conversions.cpp @@ -1,6 +1,4 @@ #include "conversions.h" -#include "modelParts.h" -#include "modelPartsTypes.h" #include #include #include @@ -9,6 +7,8 @@ #include #include #include +#include +#include #include #include diff --git a/slicer/test/serializers.cpp b/slicer/test/serializers.cpp index 68998e4..9389090 100644 --- a/slicer/test/serializers.cpp +++ b/slicer/test/serializers.cpp @@ -10,7 +10,6 @@ #include "functions.h" #include "helpers.h" #include "inheritance.h" -#include "modelPartsTypes.h" #include "optionals.h" #include "structs.h" #include "xml/serializer.h" @@ -30,8 +29,9 @@ #include #include #include -#include -#include +#include +#include +#include #include #include #include diff --git a/slicer/test/slicer.jam b/slicer/test/slicer.jam index f413628..e86049a 100644 --- a/slicer/test/slicer.jam +++ b/slicer/test/slicer.jam @@ -14,11 +14,11 @@ toolset.flags slicer INCLUDES ; actions slicer bind SLICERBIN { slice2cpp -I"$(INCLUDES)" --checksum --output-dir $(1[1]:D) $(2) --dll-export JAM_DLL_PUBLIC - "$(SLICERBIN)" -I"$(INCLUDES)" $(2) $(1[2]) --headerPrefix="\"\"" + "$(SLICERBIN)" -I"$(INCLUDES)" $(2) $(1[2]) } actions slicer.pure bind SLICERBIN { - "$(SLICERBIN)" -I"$(INCLUDES)" $(2) $(1[1]) --headerPrefix="\"\"" + "$(SLICERBIN)" -I"$(INCLUDES)" $(2) $(1[1]) } diff --git a/slicer/test/streams.cpp b/slicer/test/streams.cpp index d2667b0..ccc0190 100644 --- a/slicer/test/streams.cpp +++ b/slicer/test/streams.cpp @@ -2,16 +2,16 @@ #include #include "helpers.h" -#include "modelPartsTypes.h" #include "streams.h" -#include "xml/serializer.h" -#include "json/serializer.h" #include #include #include -#include +#include +#include +#include #include #include +#include void TestStream::Produce(const Consumer & c) diff --git a/slicer/tool/icemetadata.cpp b/slicer/tool/icemetadata.cpp index 69709a1..fee29ae 100644 --- a/slicer/tool/icemetadata.cpp +++ b/slicer/tool/icemetadata.cpp @@ -1,6 +1,6 @@ #include "icemetadata.h" -#include "metadata.h" #include +#include // IWYU pragma: no_include namespace Slicer { diff --git a/slicer/tool/icemetadata.h b/slicer/tool/icemetadata.h index ad396b5..f9f10fd 100644 --- a/slicer/tool/icemetadata.h +++ b/slicer/tool/icemetadata.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/slicer/xml/Jamfile.jam b/slicer/xml/Jamfile.jam index 408b15a..d227b83 100644 --- a/slicer/xml/Jamfile.jam +++ b/slicer/xml/Jamfile.jam @@ -7,7 +7,6 @@ lib slicer-xml : [ glob *.cpp : test*.cpp ] xmlExceptions : - .. stdc++fs ..//Ice ../..//libxmlpp diff --git a/slicer/xml/serializer.h b/slicer/xml/serializer.h index b2c0b7c..fd8616c 100644 --- a/slicer/xml/serializer.h +++ b/slicer/xml/serializer.h @@ -10,10 +10,10 @@ #endif #include #pragma GCC diagnostic pop -#include "modelParts.h" #include #include #include +#include #include #include #include diff --git a/slicer/xml/xmlExceptions.ice b/slicer/xml/xmlExceptions.ice index 94dee30..390f458 100644 --- a/slicer/xml/xmlExceptions.ice +++ b/slicer/xml/xmlExceptions.ice @@ -1,7 +1,7 @@ #ifndef SLICER_XML #define SLICER_XML -#include +#include module Slicer { ["cpp:ice_print"] -- cgit v1.2.3