@@ -47,9 +47,13 @@ function(generate_dir_headers source_dir binary_dir)
4747 list (FILTER children_hpp EXCLUDE REGEX "swaptionvolcube1.hpp" )
4848 list (FILTER children_hpp EXCLUDE REGEX "swaptionvolcube2.hpp" )
4949 list (FILTER children_hpp EXCLUDE REGEX "swaptionvolcube1a.hpp" )
50- list (FILTER children_hpp EXCLUDE REGEX "amortizingfixedratebond.hpp" )
51- list (FILTER children_hpp EXCLUDE REGEX "amortizingfloatingratebond.hpp" )
52- list (FILTER children_hpp EXCLUDE REGEX "amortizingcmsratebond.hpp" )
50+ # The ql/experimental/amortizingbonds have been moved to ql/instruments/bonds
51+ # Therefore, we can ignore them as they only contain a warning and the new includes.
52+ if (${source_dir} MATCHES "experimental" AND ${source_dir} MATCHES "amortizingbonds" )
53+ list (FILTER children_hpp EXCLUDE REGEX "amortizingfixedratebond.hpp" )
54+ list (FILTER children_hpp EXCLUDE REGEX "amortizingfloatingratebond.hpp" )
55+ list (FILTER children_hpp EXCLUDE REGEX "amortizingcmsratebond.hpp" )
56+ endif ()
5357 list (FILTER children_hpp EXCLUDE REGEX "riskybond.hpp" )
5458 file (GLOB children_dir RELATIVE ${source_dir} "${source_dir} /*" )
5559 list (FILTER children_dir EXCLUDE REGEX "CMakeFiles" )
@@ -64,15 +68,13 @@ function(generate_dir_headers source_dir binary_dir)
6468 generate_dir_headers ("${source_dir} /${child} " "${binary_dir} /${child} " )
6569 endif ()
6670 endforeach ()
67- if (children_all)
68- file (WRITE "${binary_dir} /all.hpp"
69- "/* This file is automatically generated; do not edit. */\n\n " )
70- foreach (child ${children_all} )
71- file (RELATIVE_PATH all_path ${SOURCE_DIR} ${child} )
72- file (APPEND "${binary_dir} /all.hpp" "#include <${all_path} >\n " )
73- endforeach ()
74- endif ()
75- endfunction ()
71+ file (WRITE "${binary_dir} /all.hpp"
72+ "/* This file is automatically generated; do not edit. */\n\n " )
73+ foreach (child ${children_all} )
74+ file (RELATIVE_PATH all_path ${SOURCE_DIR} ${child} )
75+ file (APPEND "${binary_dir} /all.hpp" "#include <${all_path} >\n " )
76+ endforeach ()
77+ endfunction ()
7678
7779# Call generate_dir_headers for each directory at this top level (ql/)
7880function (generate_all_headers source_dir binary_dir )
0 commit comments