Hi Hendrik, Thank you for the suggestions!
On Tue, Jun 7, 2011 at 17:02, Hendrik Sattler <p...@hendrik-sattler.de> wrote: > Zitat von Raymond Wan <r....@aist.go.jp>: >> I think/hope so far things are ok... I can compile Y and run it with >> no problems. The problem is that X needs access to this generated >> configuration file, too. At the very least, it needs to know the size >> of an instance of Y in order to allocate memory for it. > > Did you consider alternatives like giving Y a static function that returns a > new instance of Y? That makes your problem void. > If this is all within a project that is not going to be separated later, > just put the common configuration into the parent directory of both Hmmmmm, I never thought of the first option! So if I am understanding your suggestion correctly, this basically means that in X's class definition, it has an entry like: Y* instance_y; i.e., just a pointer to it. And then X doesn't need to worry about the size of Y. I might consider that... As for your second option, yes, they are all within the same project -- it's just one isn't a subdirectory of the other (they're siblings). I honestly thought that it was "bad practice" to have generated configuration files outside of the build directory. But if it is ok, I might give this second option a try if the first one doesn't work out. Actually, my many configuration files is becoming a mess so that first option is sounding more and more appealing. :-) Thank you! Ray _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake