zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #08578
[Merge] lp:~zorba-coders/zorba/bug-872386 into lp:zorba
Chris Hillery has proposed merging lp:~zorba-coders/zorba/bug-872386 into lp:zorba.
Requested reviews:
Chris Hillery (ceejatec)
Juan Zacarias (juan457)
Related bugs:
Bug #872386 in Zorba: "doc: re-run CMake after adding module .cpp files"
https://bugs.launchpad.net/zorba/+bug/872386
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-872386/+merge/103411
--
https://code.launchpad.net/~zorba-coders/zorba/bug-872386/+merge/103411
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'doc/zorba/modules_authoring_2.dox'
--- doc/zorba/modules_authoring_2.dox 2012-04-24 12:39:38 +0000
+++ doc/zorba/modules_authoring_2.dox 2012-04-25 06:08:44 +0000
@@ -318,6 +318,21 @@
directory will be set in a CMake variable by the
<tt>FIND_PACKAGE()</tt> command.
+Important note: <tt>DECLARE_ZORBA_MODULE</tt> discovers all
+<tt>.cpp</tt> files in the source directory automatically, using a
+glob pattern (i.e., <tt>*.cpp</tt>). This is convenient, but it does
+have a hidden downside: If you add new <tt>.cpp</tt> files to this
+directory, CMake has no way of knowing that you have done so, and so
+those files will not automatically get built. This can lead to strange
+compilation or runtime errors. Fortunately, there is a simple
+solution: Whenever you add new <tt>.cpp</tt> files for a module,
+always remember to immediately re-run <tt>cmake</tt> in your build
+directory. This will cause the glob pattern to be re-run and will pick
+up any new source code files. Likewise, if you delete any
+<tt>.cpp</tt> files from your source directory, you will need to
+re-run <tt>cmake</tt> for the same reason - although at least in that
+case you will get a clear error message if you forget to do so.
+
\section mod_author_declare_synopsis Zorba Module CMake Macros: Summary
For reference, here is the complete set of options for all macros
Follow ups