]> https://gitweb.dealii.org/ - dealii.git/commitdiff
teach expand_instantiations to deal with preprocessor defines 10660/head
authorTimo Heister <timo.heister@gmail.com>
Tue, 7 Jul 2020 12:12:09 +0000 (08:12 -0400)
committerTimo Heister <timo.heister@gmail.com>
Tue, 7 Jul 2020 15:07:59 +0000 (11:07 -0400)
cmake/scripts/expand_instantiations.cc

index 246ff2502e1cbff99b22ebb56acf594a1bf9f391..0b91fc2e9121d1750d0320c8e34dd1c04d1cee37 100644 (file)
@@ -439,7 +439,17 @@ process_instantiations()
   //   for (X:Y; A:B) { INST }
   while (whole_file.size() != 0)
     {
+      // skip space, tabs, comments:
       skip_space(whole_file);
+
+      // output preprocessor defines as is:
+      if (has_prefix(whole_file, "#"))
+      {
+        std::cout << get_substring_with_delim(whole_file, "\n") << '\n';
+        skip_space(whole_file);
+        continue;
+      }
+
       if (!has_prefix(whole_file, "for"))
         {
           std::cerr << "Invalid instantiation list: missing 'for'" << std::endl;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.