Re: [CMake] Check whether C++ headers are self-sufficient

2015-03-25 Thread Roger Leigh
On Sat, Mar 14, 2015 at 01:19:21PM +0100, Christoph Grüninger wrote: > Dear CMakers, > I want to have all my C++ headers self-sufficient (self-contained), > i.e., a header can be included without additional includes. This is not > only handy but also part of Google's C++ styleguide [2]. > > It wou

Re: [CMake] Check whether C++ headers are self-sufficient

2015-03-16 Thread Scott Aron Bloom
argcv*/ ) { return 0; } Scott -Original Message- From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Christoph Grüninger Sent: Monday, March 16, 2015 0:07 AM To: cmake@cmake.org Subject: Re: [CMake] Check whether C++ headers are self-sufficient Hi Andreas, > Why do yo

Re: [CMake] Check whether C++ headers are self-sufficient

2015-03-16 Thread Christoph Grüninger
Hi Andreas, > Why do you want to use one library per header? I think, it would be > sufficient to have one cc-file per header and one library per folder. Then I can test also for single headers. > Why do you worry about large build directories? Because for slow file systems like Windows it take

Re: [CMake] Check whether C++ headers are self-sufficient

2015-03-14 Thread Ryan Pavlik
I also have this implemented - in my case, the headers are fine to include in a .cpp with just a do-nothing main function and build into an executable, testing linking too. https://github.com/rpavlik/util-headers/blob/master/tests/cleanbuild/CMakeLists.txt Ryan On Sat, Mar 14, 2015 at 8:56 AM Ro

Re: [CMake] Check whether C++ headers are self-sufficient

2015-03-14 Thread Robert Maynard
I have worked on projects where we do something fairly similar. The significant difference is that we create only a single executable per directory. All told is it a fairly simple and looks something like: # Builds a source file and an executable that does nothing other than # compile the given he

Re: [CMake] Check whether C++ headers are self-sufficient

2015-03-14 Thread Andreas Naumann
Why do you want to use one library per header? I think, it would be sufficient to have one cc-file per header and one library per folder. The library would simply contain all files. Why do you worry about large build directories? Regards, Andreas Am 14.03.2015 um 13:19 schrieb Christoph Grünin

[CMake] Check whether C++ headers are self-sufficient

2015-03-14 Thread Christoph Grüninger
Dear CMakers, I want to have all my C++ headers self-sufficient (self-contained), i.e., a header can be included without additional includes. This is not only handy but also part of Google's C++ styleguide [2]. It would be great to have a make target (let's call it headercheck), that can check for