Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- create a new ninja file
- file = ninja.new('build.ninja')
- --[[
- command line parsing e.g.
- shogun --cxx=clang++
- would make this cxx variable return
- clang++ and if it doesn't exist then
- g++ will be returned
- --]]
- cxx = shogun.get('cxx', 'g++')
- -- same thing, except --debug would lead to true if passed,
- -- false otherwise.
- debug = shogun.get('debug', false)
- lto = shogun.get('lto', false)
- -- write the two variables to the ninja file
- file.variable('ninja_required_version', '1.3')
- file.variable('builddir', 'obj')
- -- shogun.includes(compiler, directories)
- -- creates a generic way of handling include files
- -- from MSVC, Clang, or GCC.
- include_directories = shogun.includes(cxx, { 'gears', '.' })
- -- etc..
- -- many more functions in shogun that are compiler
- -- agnostic/generic to abstract away compiler choice
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement