Skip to content

Commit

Permalink
Add commandline_hello examples
Browse files Browse the repository at this point in the history
  • Loading branch information
NHDaly committed Jul 21, 2018
1 parent 78c42fa commit 6e54c80
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/commandline_hello.jl
@@ -0,0 +1,8 @@
# A super-simple command line program that just prints hello.
# Build this with the `commandline_app=true` flag in `BuildApp.build_app_bundle`.

Base.@ccallable function julia_main(ARGS::Vector{String})::Cint
println("Oh hi, World!")
println("Current working directory: $(pwd())")
return 0
end
7 changes: 7 additions & 0 deletions test/build_examples/commandline_hello.jl
@@ -0,0 +1,7 @@
using ApplicationBuilder; using BuildApp

# Allow this file to be called either as a standalone file to build the above
# example, or from runtests.jl using a provided builddir.
isdefined(:builddir) || (builddir=nothing) # nothing == default builddir.

build_app_bundle(examples_hello, commandline_app=true, builddir=builddir)

0 comments on commit 6e54c80

Please sign in to comment.