[Build] Convert build system to raw cmake and remove premake layer
This commit is contained in:
37
src/xenia/cpu/ppc/testing/CMakeLists.txt
Normal file
37
src/xenia/cpu/ppc/testing/CMakeLists.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
if(NOT XENIA_BUILD_TESTS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
add_executable(xenia-cpu-ppc-tests
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ppc_testing_main.cc
|
||||
)
|
||||
|
||||
# Add platform-specific console app main
|
||||
if(WIN32)
|
||||
target_sources(xenia-cpu-ppc-tests PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/console_app_main_win.cc)
|
||||
else()
|
||||
target_sources(xenia-cpu-ppc-tests PRIVATE
|
||||
${PROJECT_SOURCE_DIR}/src/xenia/base/console_app_main_posix.cc)
|
||||
endif()
|
||||
|
||||
# Add .s files but exclude from build (they're test data)
|
||||
file(GLOB _ppc_asm "${CMAKE_CURRENT_SOURCE_DIR}/*.s")
|
||||
target_sources(xenia-cpu-ppc-tests PRIVATE ${_ppc_asm})
|
||||
set_source_files_properties(${_ppc_asm} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
target_link_libraries(xenia-cpu-ppc-tests PRIVATE
|
||||
xenia-apu xenia-apu-nop
|
||||
xenia-base xenia-core xenia-cpu
|
||||
xenia-gpu xenia-gpu-null
|
||||
xenia-hid xenia-hid-nop
|
||||
xenia-kernel xenia-patcher xenia-ui xenia-vfs
|
||||
capstone fmt imgui mspack
|
||||
)
|
||||
|
||||
# x64 backend
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
|
||||
target_link_libraries(xenia-cpu-ppc-tests PRIVATE xenia-cpu-backend-x64)
|
||||
endif()
|
||||
|
||||
xe_target_defaults(xenia-cpu-ppc-tests)
|
||||
@@ -1,85 +0,0 @@
|
||||
project_root = "../../../../.."
|
||||
include(project_root.."/tools/build")
|
||||
|
||||
group("tests")
|
||||
project("xenia-cpu-ppc-tests")
|
||||
uuid("2a57d5ac-4024-4c49-9cd3-aa3a603c2ef8")
|
||||
kind("ConsoleApp")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-apu",
|
||||
"xenia-apu-nop",
|
||||
"xenia-base",
|
||||
"xenia-core",
|
||||
"xenia-cpu",
|
||||
"xenia-gpu",
|
||||
"xenia-gpu-null",
|
||||
"xenia-hid",
|
||||
"xenia-hid-nop",
|
||||
"xenia-kernel",
|
||||
"xenia-patcher",
|
||||
"xenia-ui",
|
||||
"xenia-vfs",
|
||||
})
|
||||
links({
|
||||
"capstone",
|
||||
"fmt",
|
||||
"imgui",
|
||||
"mspack",
|
||||
})
|
||||
files({
|
||||
"ppc_testing_main.cc",
|
||||
"../../../base/console_app_main_"..platform_suffix..".cc",
|
||||
})
|
||||
files({
|
||||
"*.s",
|
||||
})
|
||||
filter("files:*.s")
|
||||
flags({
|
||||
"ExcludeFromBuild",
|
||||
})
|
||||
filter("architecture:x86_64")
|
||||
links({
|
||||
"xenia-cpu-backend-x64",
|
||||
})
|
||||
filter("platforms:Windows")
|
||||
debugdir(project_root)
|
||||
debugargs({
|
||||
"2>&1",
|
||||
"1>scratch/stdout-testing.txt",
|
||||
})
|
||||
|
||||
filter({})
|
||||
|
||||
if ARCH == "ppc64" or ARCH == "powerpc64" then
|
||||
|
||||
project("xenia-cpu-ppc-nativetests")
|
||||
uuid("E381E8EE-65CD-4D5E-9223-D9C03B2CE78C")
|
||||
kind("ConsoleApp")
|
||||
language("C++")
|
||||
links({
|
||||
"fmt",
|
||||
"xenia-base",
|
||||
})
|
||||
files({
|
||||
"ppc_testing_native_main.cc",
|
||||
"../../../base/console_app_main_"..platform_suffix..".cc",
|
||||
})
|
||||
files({
|
||||
"instr_*.s",
|
||||
"seq_*.s",
|
||||
})
|
||||
filter("files:instr_*.s", "files:seq_*.s")
|
||||
flags({
|
||||
"ExcludeFromBuild",
|
||||
})
|
||||
filter({})
|
||||
buildoptions({
|
||||
"-Wa,-mregnames", -- Tell GAS to accept register names.
|
||||
})
|
||||
|
||||
files({
|
||||
"ppc_testing_native_thunks.s",
|
||||
})
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user