2020-10-22 08:42:40 +02:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
|
|
|
find_package(Java REQUIRED)
|
|
|
|
include(UseJava)
|
|
|
|
|
|
|
|
project(Lox NONE)
|
|
|
|
|
2020-10-29 07:03:25 +01:00
|
|
|
add_custom_command(OUTPUT com/craftinginterpreters/lox/Expr.java
|
|
|
|
COMMAND java -jar GenerateAst.jar com/craftinginterpreters/lox
|
|
|
|
DEPENDS GenerateAst)
|
|
|
|
|
2020-10-22 08:42:40 +02:00
|
|
|
add_jar(Lox
|
|
|
|
com/craftinginterpreters/lox/Lox.java
|
|
|
|
com/craftinginterpreters/lox/TokenType.java
|
|
|
|
com/craftinginterpreters/lox/Token.java
|
2020-10-29 06:56:15 +01:00
|
|
|
com/craftinginterpreters/lox/Expr.java
|
|
|
|
com/craftinginterpreters/lox/AstPrinter.java
|
2020-10-22 08:42:40 +02:00
|
|
|
ENTRY_POINT com/craftinginterpreters/lox/Lox)
|
|
|
|
|
2020-10-29 06:56:15 +01:00
|
|
|
add_jar(GenerateAst
|
|
|
|
com/craftinginterpreters/tool/GenerateAst.java
|
|
|
|
ENTRY_POINT com/craftinginterpreters/tool/GenerateAst)
|