View Source mix cmake (mix_cmake v0.1.4)

Generate CMake buiid scripts and then build/install the application.

$ mix cmake [opt] [build_dir] [source_dir]

command-line-options

Command line options

  • --config - generate build script
  • --generator - specify generator
  • --parallel - parallel jobs level
  • --target - build target
  • --clean - clean before build target
  • --strip - remove debug info from executable
  • --verbose - print process detail

configuration

Configuration

Add following configurations at project/1 in your mix.exs if you need.

def project do
  [
    cmake: [...]
  ]
end
  • :build_dir - working directory {:local, :global, any_directory}
  • :source_dir - source directory
  • :generator - specify generator
  • :build_parallel_level - parallel jobs level

Link to this section Summary

Functions

Add an environment variable for child process.

Get application name.

Returns true if the build directory exists.

Invoke cmake command with args.

Return a map of default environment variables.

Get :cmake configuration from Mix.exs.

Get build/source directory.

parse command line arguments. (custom)

Remove cmake build directory. (interpret pseudo-path)

Callback implementation for Mix.Task.run/1.

Link to this section Functions

Add an environment variable for child process.

Get application name.

Link to this function

build_dir_exists?(build_dir)

View Source

Returns true if the build directory exists.

Link to this function

cmake(build_dir, args, env)

View Source

Invoke cmake command with args.

Link to this macro

conj_front(list, val, form)

View Source (macro)

Return a map of default environment variables.

Get :cmake configuration from Mix.exs.

Get build/source directory.

See OptionParser.next/2.

Link to this function

parse_argv(argv, config \\ [])

View Source

parse command line arguments. (custom)

Remove cmake build directory. (interpret pseudo-path)

Callback implementation for Mix.Task.run/1.