Skip to content

Commit ca81661

Browse files
committed
move archtecture-specific code to separate class
1 parent 9789876 commit ca81661

12 files changed

+1870
-1471
lines changed

CMakeLists.txt

+12-6
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,17 @@ project("tinyinst")
2626
include_directories(${CMAKE_CURRENT_BINARY_DIR}/third_party/obj/wkit/include)
2727

2828
set (arch_specific_files
29-
x86_helpers.h
30-
x86_helpers.cpp
29+
arch/x86/x86_helpers.h
30+
arch/x86/x86_helpers.cpp
31+
arch/x86/x86_assembler.h
32+
arch/x86/x86_assembler.cpp
3133
)
3234

3335
set (cross_platform_files
3436
common.h
3537
common.cpp
38+
assembler.h
39+
instruction.h
3640
tinyinst.h
3741
tinyinst.cpp
3842
coverage.h
@@ -91,7 +95,10 @@ else()
9195
)
9296
add_dependencies(tinyinst xed)
9397
endif()
94-
target_include_directories(tinyinst PUBLIC . )
98+
target_include_directories(tinyinst PUBLIC
99+
${CMAKE_CURRENT_SOURCE_DIR}
100+
${CMAKE_CURRENT_BINARY_DIR}/third_party/obj/wkit/include
101+
)
95102
if (WIN32)
96103
target_link_libraries(tinyinst
97104
${CMAKE_CURRENT_BINARY_DIR}/third_party/obj/wkit/lib/xed.lib
@@ -106,13 +113,12 @@ elseif (APPLE)
106113
endif()
107114
endif()
108115

109-
110-
if(NOT ${ARCHITECTURE} MATCHES arm64)
116+
if(NOT (${ARCHITECTURE} MATCHES arm64))
111117
project("litecov")
112118

113119
add_executable(litecov
114120
tinyinst-coverage.cpp
115121
)
116122

117123
target_link_libraries(litecov tinyinst)
118-
endif()
124+
endif()

0 commit comments

Comments
 (0)