code: def test_glob_in_indirect_conditional():
      """
        Regression test: project-rules.glob rule run from inside an indirect
      conditional should report an error as it depends on the 'currently loaded
      project' concept and indirect conditional rules get called only after all
      the project modules have already finished loading.
  
      """
      t = BoostBuild.Tester(use_test_config=False)
  
      t.write(
          "jamroot.jam",
          """\
  use-project /library-example/foo : util/foo ;
  build-project app ;
  """,
      )
      t.write("app/app.cpp", "int main() {}\n")
      t.write(
          "app/jamfile.jam",
          "exe app : app.cpp /library-example/foo//bar ;",
      )
      t.write(
          "util/foo/bar.cpp",
          """\
  #ifdef _WIN32
  __declspec(dllexport)
  #endif
  void foo() {}
  """,
      )
      t.write(
          "util/foo/jamfile.jam",
          """\
  rule print-my-sources ( properties * )
  {
      ECHO My sources: ;
      ECHO [ glob *.cpp ] ;
  }
  lib bar : bar.cpp : <conditional>@print-my-sources ;
  """,
      )
  
      t.run_build_system(status=1)
      t.expect_output_lines(["My sources:", "bar.cpp"], False)
      t.expect_output_lines(
          "error: Reference to the project currently being "
          "loaded requested when there was no project module being loaded."
      )
  
      t.cleanup()
  
label_desc: Use image node_id 2 for calling a global function with example usage: test_glob_in_indirect_conditional() without return types