Project

General

Profile

Revision 52c5ba00 src/backends/C/c_backend.ml

View differences:

src/backends/C/c_backend.ml
38 38
  close_out header_out;
39 39
  
40 40
  (* Generating Lib C file *)
41
  let source_lib_file = destname ^ ".c" in (* Could be changed *)
41
  let source_lib_file = (if !Options.cpp then destname ^ ".cpp" else destname ^ ".c") in (* Could be changed *)
42 42
  let source_lib_out = open_out source_lib_file in
43 43
  let source_lib_fmt = formatter_of_out_channel source_lib_out in
44 44
  print_lib_c source_lib_fmt basename prog machines dependencies;
......
54 54
      raise (Corelang.Error (Location.dummy_loc, LustreSpec.Main_not_found))
55 55
    end
56 56
    | Some m -> begin
57
      let source_main_file = destname ^ "_main.c" in (* Could be changed *)
57
      let source_main_file = (if !Options.cpp then destname ^ "_main.cpp" else destname ^ "_main.c") in (* Could be changed *)
58 58
      let source_main_out = open_out source_main_file in
59 59
      let source_main_fmt = formatter_of_out_channel source_main_out in
60 60

  

Also available in: Unified diff