src/Pure/Admin/component_csdp.scala
author wenzelm
Sat, 04 Nov 2023 16:31:02 +0100
changeset 78896 3523df57df51
parent 77566 2a99fcb283ee
child 80004 31ebb6be32b0
permissions -rw-r--r--
tuned output;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
77566
2a99fcb283ee renamed administrative tools to build Isabelle components (unrelated to "isabelle build");
wenzelm
parents: 77510
diff changeset
     1
/*  Title:      Pure/Admin/component_csdp.scala
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
     2
    Author:     Makarius
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
     3
72437
efc5ae4b4ac8 tuned messages;
wenzelm
parents: 72431
diff changeset
     4
Build Isabelle CSDP component from official download.
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
     5
*/
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
     6
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
     7
package isabelle
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
     8
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
     9
77566
2a99fcb283ee renamed administrative tools to build Isabelle components (unrelated to "isabelle build");
wenzelm
parents: 77510
diff changeset
    10
object Component_CSDP {
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    11
  // Note: version 6.2.0 does not quite work for the "sos" proof method
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    12
  val default_download_url = "https://github.com/coin-or/Csdp/archive/releases/6.1.1.tar.gz"
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    13
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    14
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    15
  /* flags */
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    16
75393
87ebf5a50283 clarified formatting, for the sake of scala3;
wenzelm
parents: 75205
diff changeset
    17
  sealed case class Flags(platform: String, CFLAGS: String = "", LIBS: String = "") {
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    18
    val changed: List[(String, String)] =
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    19
      List("CFLAGS" -> CFLAGS, "LIBS" -> LIBS).filter(p => p._2.nonEmpty)
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    20
72438
wenzelm
parents: 72437
diff changeset
    21
    def print: Option[String] =
wenzelm
parents: 72437
diff changeset
    22
      if (changed.isEmpty) None
wenzelm
parents: 72437
diff changeset
    23
      else
73712
3eba8d4b624b clarified signature;
wenzelm
parents: 73566
diff changeset
    24
        Some("  * " + platform + ":\n" + changed.map(p => "    " + Properties.Eq(p))
72438
wenzelm
parents: 72437
diff changeset
    25
          .mkString("\n"))
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    26
75393
87ebf5a50283 clarified formatting, for the sake of scala3;
wenzelm
parents: 75205
diff changeset
    27
    def change(path: Path): Unit = {
73714
wenzelm
parents: 73712
diff changeset
    28
      def change_line(line: String, p: (String, String)): String =
wenzelm
parents: 73712
diff changeset
    29
        line.replaceAll(p._1 + "=.*", Properties.Eq(p))
75205
wenzelm
parents: 75202
diff changeset
    30
      File.change_lines(path) { _.map(line => changed.foldLeft(line)(change_line)) }
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    31
    }
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    32
  }
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    33
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    34
  val build_flags: List[Flags] =
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    35
    List(
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    36
      Flags("arm64-linux",
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    37
        CFLAGS = "-O3 -ansi -Wall -DNOSHORTS -DBIT64 -DUSESIGTERM -DUSEGETTIME -I../include",
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    38
        LIBS = "-static -L../lib -lsdp -llapack -lblas -lgfortran -lm"),
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    39
      Flags("x86_64-linux",
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    40
        CFLAGS = "-O3 -ansi -Wall -DNOSHORTS -DBIT64 -DUSESIGTERM -DUSEGETTIME -I../include",
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    41
        LIBS = "-static -L../lib -lsdp -llapack -lblas -lgfortran -lquadmath -lm"),
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    42
      Flags("x86_64-darwin",
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    43
        CFLAGS = "-O3 -Wall -DNOSHORTS -DBIT64 -DUSESIGTERM -DUSEGETTIME -I../include",
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    44
        LIBS = "-L../lib -lsdp -llapack -lblas -lm"),
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    45
      Flags("x86_64-windows"))
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    46
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    47
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    48
  /* build CSDP */
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    49
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    50
  def build_csdp(
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    51
    download_url: String = default_download_url,
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    52
    progress: Progress = new Progress,
72418
4ed247fadbc4 proper support for x86_64-windows via msys/mingw64;
wenzelm
parents: 72417
diff changeset
    53
    target_dir: Path = Path.current,
75393
87ebf5a50283 clarified formatting, for the sake of scala3;
wenzelm
parents: 75205
diff changeset
    54
    mingw: MinGW = MinGW.none
87ebf5a50283 clarified formatting, for the sake of scala3;
wenzelm
parents: 75205
diff changeset
    55
  ): Unit = {
72424
10c07d224035 tuned signature;
wenzelm
parents: 72423
diff changeset
    56
    mingw.check
72423
f8aa2efce869 more explicit MinGW context;
wenzelm
parents: 72418
diff changeset
    57
75394
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
    58
    Isabelle_System.with_tmp_dir("build") { tmp_dir =>
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    59
      /* component */
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    60
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    61
      val Archive_Name = """^.*?([^/]+)$""".r
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    62
      val Version = """^[^0-9]*([0-9].*)\.tar.gz$""".r
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    63
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    64
      val archive_name =
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    65
        download_url match {
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    66
          case Archive_Name(name) => name
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    67
          case _ => error("Failed to determine source archive name from " + quote(download_url))
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    68
        }
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    69
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    70
      val version =
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    71
        archive_name match {
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    72
          case Version(version) => version
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    73
          case _ => error("Failed to determine component version from " + quote(archive_name))
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    74
        }
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    75
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    76
      val component_name = "csdp-" + version
76518
b30b8e23383c clarified signature: more explicit types;
wenzelm
parents: 75394
diff changeset
    77
      val component_dir =
76547
9fe5d8c70352 tuned signature;
wenzelm
parents: 76541
diff changeset
    78
        Components.Directory(target_dir + Path.basic(component_name)).create(progress = progress)
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    79
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    80
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    81
      /* platform */
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    82
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    83
      val platform_name =
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    84
        proper_string(Isabelle_System.getenv("ISABELLE_WINDOWS_PLATFORM64")) orElse
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    85
        proper_string(Isabelle_System.getenv("ISABELLE_PLATFORM64")) getOrElse
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    86
        error("No 64bit platform")
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    87
76518
b30b8e23383c clarified signature: more explicit types;
wenzelm
parents: 75394
diff changeset
    88
      val platform_dir =
b30b8e23383c clarified signature: more explicit types;
wenzelm
parents: 75394
diff changeset
    89
        Isabelle_System.make_directory(component_dir.path + Path.basic(platform_name))
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    90
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    91
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    92
      /* download source */
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    93
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    94
      val archive_path = tmp_dir + Path.basic(archive_name)
73566
4e6b31ed7197 clarified signature: avoid tmp file;
wenzelm
parents: 73359
diff changeset
    95
      Isabelle_System.download_file(download_url, archive_path, progress = progress)
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
    96
76540
83de6e9ae983 clarified signature: prefer Scala functions instead of shell scripts;
wenzelm
parents: 76529
diff changeset
    97
      Isabelle_System.extract(archive_path, tmp_dir)
83de6e9ae983 clarified signature: prefer Scala functions instead of shell scripts;
wenzelm
parents: 76529
diff changeset
    98
      val source_dir = File.get_dir(tmp_dir, title = download_url)
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
    99
76541
3706b88035d2 more direct target directory;
wenzelm
parents: 76540
diff changeset
   100
      Isabelle_System.extract(archive_path, component_dir.src, strip = true)
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   101
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   102
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   103
      /* build */
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   104
72440
d0ba71b3297e tuned messages;
wenzelm
parents: 72438
diff changeset
   105
      progress.echo("Building CSDP for " + platform_name + " ...")
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   106
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
   107
      build_flags.find(flags => flags.platform == platform_name) match {
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
   108
        case None => error("No build flags for platform " + quote(platform_name))
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
   109
        case Some(flags) =>
76529
ded37aade88e clarified signature;
wenzelm
parents: 76518
diff changeset
   110
          File.find_files(source_dir.file, pred = file => file.getName == "Makefile").
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
   111
            foreach(file => flags.change(File.path(file)))
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   112
      }
72418
4ed247fadbc4 proper support for x86_64-windows via msys/mingw64;
wenzelm
parents: 72417
diff changeset
   113
77510
f5d6cd98b16a clarified signature: manage "verbose" flag via "progress";
wenzelm
parents: 76548
diff changeset
   114
      progress.bash(mingw.bash_script("make"),
f5d6cd98b16a clarified signature: manage "verbose" flag via "progress";
wenzelm
parents: 76548
diff changeset
   115
        cwd = source_dir.file,
f5d6cd98b16a clarified signature: manage "verbose" flag via "progress";
wenzelm
parents: 76548
diff changeset
   116
        echo = progress.verbose).check
72418
4ed247fadbc4 proper support for x86_64-windows via msys/mingw64;
wenzelm
parents: 72417
diff changeset
   117
4ed247fadbc4 proper support for x86_64-windows via msys/mingw64;
wenzelm
parents: 72417
diff changeset
   118
4ed247fadbc4 proper support for x86_64-windows via msys/mingw64;
wenzelm
parents: 72417
diff changeset
   119
      /* install */
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   120
76529
ded37aade88e clarified signature;
wenzelm
parents: 76518
diff changeset
   121
      Isabelle_System.copy_file(source_dir + Path.explode("LICENSE"), component_dir.path)
ded37aade88e clarified signature;
wenzelm
parents: 76518
diff changeset
   122
      Isabelle_System.copy_file(source_dir + Path.explode("solver/csdp").platform_exe, platform_dir)
72418
4ed247fadbc4 proper support for x86_64-windows via msys/mingw64;
wenzelm
parents: 72417
diff changeset
   123
72463
wenzelm
parents: 72444
diff changeset
   124
      if (Platform.is_windows) {
wenzelm
parents: 72444
diff changeset
   125
        Executable.libraries_closure(platform_dir + Path.explode("csdp.exe"), mingw = mingw,
wenzelm
parents: 72444
diff changeset
   126
          filter =
72468
60471f4bafd2 proper library names on Windows;
wenzelm
parents: 72463
diff changeset
   127
            Set("libblas", "liblapack", "libgfortran", "libgcc_s_seh",
60471f4bafd2 proper library names on Windows;
wenzelm
parents: 72463
diff changeset
   128
              "libquadmath", "libwinpthread"))
72418
4ed247fadbc4 proper support for x86_64-windows via msys/mingw64;
wenzelm
parents: 72417
diff changeset
   129
      }
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   130
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   131
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   132
      /* settings */
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   133
76548
0af64cc2eee9 tuned signature;
wenzelm
parents: 76547
diff changeset
   134
      component_dir.write_settings("""
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   135
ISABELLE_CSDP="$COMPONENT/${ISABELLE_WINDOWS_PLATFORM64:-$ISABELLE_PLATFORM64}/csdp"
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   136
""")
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   137
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   138
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   139
      /* README */
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   140
76518
b30b8e23383c clarified signature: more explicit types;
wenzelm
parents: 75394
diff changeset
   141
      File.write(component_dir.README,
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
   142
"""This is CSDP """ + version + """ from
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
   143
""" + download_url + """
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   144
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
   145
Makefile flags have been changed for various platforms as follows:
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   146
72438
wenzelm
parents: 72437
diff changeset
   147
""" + build_flags.flatMap(_.print).mkString("\n\n") + """
wenzelm
parents: 72437
diff changeset
   148
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
   149
The distribution has been built like this:
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   150
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
   151
    cd src && make
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   152
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
   153
Only the bare "solver/csdp" program is used for Isabelle.
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   154
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   155
72444
2d9a70b85009 tuned whitespace;
wenzelm
parents: 72442
diff changeset
   156
        Makarius
2d9a70b85009 tuned whitespace;
wenzelm
parents: 72442
diff changeset
   157
        """ + Date.Format.date(Date.now()) + "\n")
75394
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   158
    }
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   159
}
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   160
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   161
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   162
  /* Isabelle tool wrapper */
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   163
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   164
  val isabelle_tool =
77566
2a99fcb283ee renamed administrative tools to build Isabelle components (unrelated to "isabelle build");
wenzelm
parents: 77510
diff changeset
   165
    Isabelle_Tool("component_csdp", "build prover component from official download", Scala_Project.here,
75394
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   166
      { args =>
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   167
        var target_dir = Path.current
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   168
        var mingw = MinGW.none
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   169
        var download_url = default_download_url
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   170
        var verbose = false
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   171
75394
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   172
        val getopts = Getopts("""
77566
2a99fcb283ee renamed administrative tools to build Isabelle components (unrelated to "isabelle build");
wenzelm
parents: 77510
diff changeset
   173
Usage: isabelle component_csdp [OPTIONS]
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   174
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   175
  Options are:
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   176
    -D DIR       target directory (default ".")
72425
d0937d55eb90 clarified errors;
wenzelm
parents: 72424
diff changeset
   177
    -M DIR       msys/mingw root specification for Windows
72417
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
   178
    -U URL       download URL
992822a11039 more standard build from sources;
wenzelm
parents: 72414
diff changeset
   179
                 (default: """" + default_download_url + """")
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   180
    -v           verbose
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   181
72437
efc5ae4b4ac8 tuned messages;
wenzelm
parents: 72431
diff changeset
   182
  Build prover component from official download.
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   183
""",
75394
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   184
          "D:" -> (arg => target_dir = Path.explode(arg)),
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   185
          "M:" -> (arg => mingw = MinGW(Path.explode(arg))),
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   186
          "U:" -> (arg => download_url = arg),
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   187
          "v" -> (_ => verbose = true))
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   188
75394
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   189
        val more_args = getopts(args)
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   190
        if (more_args.nonEmpty) getopts.usage()
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   191
77510
f5d6cd98b16a clarified signature: manage "verbose" flag via "progress";
wenzelm
parents: 76548
diff changeset
   192
        val progress = new Console_Progress(verbose = verbose)
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   193
77510
f5d6cd98b16a clarified signature: manage "verbose" flag via "progress";
wenzelm
parents: 76548
diff changeset
   194
        build_csdp(download_url = download_url, progress = progress,
75394
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   195
          target_dir = target_dir, mingw = mingw)
42267c650205 tuned formatting;
wenzelm
parents: 75393
diff changeset
   196
      })
72414
af24c0dd6975 build Isabelle CSDP component from official downloads;
wenzelm
parents:
diff changeset
   197
}