mirror of
https://github.com/zyantific/zasm
synced 2026-06-08 18:40:54 +00:00
203 lines
4.7 KiB
TOML
203 lines
4.7 KiB
TOML
# Reference: https://build-cpp.github.io/cmkr/cmake-toml
|
|
[cmake]
|
|
version = "3.25"
|
|
|
|
[project]
|
|
name = "zasm"
|
|
languages = ["CXX"]
|
|
|
|
[options]
|
|
ZASM_BUILD_TESTS = "root"
|
|
ZASM_BUILD_BENCHMARKS = "root"
|
|
ZASM_BUILD_EXAMPLES = "root"
|
|
|
|
[subdir.thirdparty]
|
|
|
|
[target.zasm_common]
|
|
type = "interface"
|
|
msvc.compile-options = ["/bigobj", "/MP", "/W3", "/permissive-"]
|
|
compile-features = ["cxx_std_17"]
|
|
alias = "zasm::common"
|
|
|
|
[target.zasm]
|
|
type = "static"
|
|
alias = "zasm::zasm"
|
|
sources = [
|
|
"zasm/src/**.cpp",
|
|
]
|
|
headers = [
|
|
"zasm/src/**.hpp",
|
|
"zasm/include/**.hpp",
|
|
]
|
|
include-directories = ["zasm/include"]
|
|
link-libraries = [
|
|
"zasm::common",
|
|
"Zydis",
|
|
]
|
|
|
|
[target.zasm_testdata]
|
|
condition = "build-tests"
|
|
type = "interface"
|
|
alias = "zasm::testdata"
|
|
include-directories = ["testdata/include"]
|
|
|
|
[target.zasm_tests]
|
|
condition = "build-tests"
|
|
type = "executable"
|
|
sources = [
|
|
"tests/src/**.cpp",
|
|
]
|
|
headers = [
|
|
"tests/src/**.hpp",
|
|
]
|
|
link-libraries = [
|
|
"zasm::common",
|
|
"zasm::zasm",
|
|
"zasm::testdata",
|
|
"GTest::gtest",
|
|
]
|
|
[target.zasm_tests.properties]
|
|
PROJECT_LABEL = "tests"
|
|
|
|
[target.zasm_benchmarks]
|
|
condition = "build-benchmarks"
|
|
type = "executable"
|
|
sources = [
|
|
"benchmark/src/**.cpp",
|
|
]
|
|
headers = [
|
|
"benchmark/src/**.hpp",
|
|
]
|
|
link-libraries = [
|
|
"zasm::common",
|
|
"zasm::zasm",
|
|
"zasm::testdata",
|
|
"benchmark::benchmark",
|
|
]
|
|
[target.zasm_benchmarks.properties]
|
|
PROJECT_LABEL = "benchmarks"
|
|
|
|
[target.zasm_example_common]
|
|
condition = "build-examples"
|
|
type = "interface"
|
|
alias = "zasm::examples::common"
|
|
include-directories = ["examples/common"]
|
|
link-libraries = [
|
|
"zasm::common",
|
|
"zasm::zasm"
|
|
]
|
|
|
|
## Examples
|
|
[target.zasm_example_assembler_basic]
|
|
condition = "build-examples"
|
|
type = "executable"
|
|
sources = ["examples/assembler_basic/main.cpp"]
|
|
link-libraries = [
|
|
"zasm::examples::common",
|
|
]
|
|
[target.zasm_example_assembler_basic.properties]
|
|
FOLDER = "examples"
|
|
PROJECT_LABEL = "assembler_basic"
|
|
RUNTIME_OUTPUT_NAME = "example.assembler_basic"
|
|
|
|
[target.zasm_example_assembler_sections]
|
|
condition = "build-examples"
|
|
type = "executable"
|
|
sources = ["examples/assembler_sections/main.cpp"]
|
|
link-libraries = [
|
|
"zasm::examples::common",
|
|
]
|
|
[target.zasm_example_assembler_sections.properties]
|
|
FOLDER = "examples"
|
|
PROJECT_LABEL = "assembler_sections"
|
|
RUNTIME_OUTPUT_NAME = "example.assembler_sections"
|
|
|
|
[target.zasm_example_decode_to_assembler]
|
|
condition = "build-examples"
|
|
type = "executable"
|
|
sources = ["examples/decode_to_assembler/main.cpp"]
|
|
link-libraries = [
|
|
"zasm::examples::common",
|
|
]
|
|
[target.zasm_example_decode_to_assembler.properties]
|
|
FOLDER = "examples"
|
|
PROJECT_LABEL = "decode_to_assembler"
|
|
RUNTIME_OUTPUT_NAME = "example.decode_to_assembler"
|
|
|
|
[target.zasm_example_program_observer]
|
|
condition = "build-examples"
|
|
type = "executable"
|
|
sources = ["examples/program_observer/main.cpp"]
|
|
link-libraries = [
|
|
"zasm::examples::common",
|
|
]
|
|
[target.zasm_example_program_observer.properties]
|
|
FOLDER = "examples"
|
|
PROJECT_LABEL = "program_observer"
|
|
RUNTIME_OUTPUT_NAME = "example.program_observer"
|
|
|
|
[target.zasm_example_instruction_info]
|
|
condition = "build-examples"
|
|
type = "executable"
|
|
sources = ["examples/instruction_info/main.cpp"]
|
|
link-libraries = [
|
|
"zasm::examples::common",
|
|
]
|
|
[target.zasm_example_instruction_info.properties]
|
|
FOLDER = "examples"
|
|
PROJECT_LABEL = "instruction_info"
|
|
RUNTIME_OUTPUT_NAME = "example.instruction_info"
|
|
|
|
[target.zasm_example_modify_program]
|
|
condition = "build-examples"
|
|
type = "executable"
|
|
sources = ["examples/modify_program/main.cpp"]
|
|
link-libraries = [
|
|
"zasm::examples::common",
|
|
]
|
|
[target.zasm_example_modify_program.properties]
|
|
FOLDER = "examples"
|
|
PROJECT_LABEL = "modify_program"
|
|
RUNTIME_OUTPUT_NAME = "example.modify_program"
|
|
|
|
[target.zasm_example_basic_jit]
|
|
condition = "build-examples"
|
|
type = "executable"
|
|
sources = ["examples/basic_jit/main.cpp"]
|
|
link-libraries = [
|
|
"zasm::examples::common",
|
|
]
|
|
[target.zasm_example_basic_jit.properties]
|
|
FOLDER = "examples"
|
|
PROJECT_LABEL = "basic_jit"
|
|
RUNTIME_OUTPUT_NAME = "example.basic_jit"
|
|
|
|
[target.zasm_example_modify_instruction]
|
|
condition = "build-examples"
|
|
type = "executable"
|
|
sources = ["examples/modify_instruction/main.cpp"]
|
|
link-libraries = [
|
|
"zasm::examples::common",
|
|
]
|
|
[target.zasm_example_modify_instruction.properties]
|
|
FOLDER = "examples"
|
|
PROJECT_LABEL = "modify_instruction"
|
|
RUNTIME_OUTPUT_NAME = "example.modify_instruction"
|
|
|
|
[target.zasm_example_memory_operands]
|
|
condition = "build-examples"
|
|
type = "executable"
|
|
sources = ["examples/memory_operands/main.cpp"]
|
|
link-libraries = [
|
|
"zasm::examples::common",
|
|
]
|
|
[target.zasm_example_memory_operands.properties]
|
|
FOLDER = "examples"
|
|
PROJECT_LABEL = "memory_operands"
|
|
RUNTIME_OUTPUT_NAME = "example.memory_operands"
|
|
|
|
[[test]]
|
|
condition = "build-tests"
|
|
name = "tests"
|
|
command = "$<TARGET_FILE:zasm_tests>"
|