2020-10-08 00:06:48 -04:00
|
|
|
include("goalc/CMakeLists.txt")
|
|
|
|
|
2020-08-22 22:30:12 -04:00
|
|
|
add_executable(goalc-test
|
|
|
|
test_main.cpp
|
2020-10-08 00:06:48 -04:00
|
|
|
test_test.cpp
|
|
|
|
test_reader.cpp
|
|
|
|
test_goos.cpp
|
|
|
|
test_listener_deci2.cpp
|
|
|
|
test_kernel.cpp
|
|
|
|
all_jak1_symbols.cpp
|
|
|
|
test_type_system.cpp
|
|
|
|
test_CodeTester.cpp
|
|
|
|
test_emitter_slow.cpp
|
|
|
|
test_emitter_loads_and_store.cpp
|
|
|
|
test_emitter_xmm32.cpp
|
|
|
|
test_emitter_integer_math.cpp
|
|
|
|
test_common_util.cpp
|
|
|
|
${GOALC_TEST_FRAMEWORK_SOURCES}
|
|
|
|
${GOALC_TEST_CASES})
|
2020-08-22 22:30:12 -04:00
|
|
|
|
2020-09-08 14:39:16 -04:00
|
|
|
enable_testing()
|
2020-08-22 22:30:12 -04:00
|
|
|
|
2020-08-26 22:23:16 -04:00
|
|
|
IF (WIN32)
|
2020-08-29 00:01:55 -04:00
|
|
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
2020-09-10 17:18:12 -04:00
|
|
|
|
2020-09-07 19:59:44 -04:00
|
|
|
# TODO - split out these declarations for platform specific includes
|
2020-09-10 20:03:31 -04:00
|
|
|
target_link_libraries(goalc-test cross_sockets listener mman goos common_util runtime compiler type_system gtest)
|
2020-08-26 22:23:16 -04:00
|
|
|
ELSE()
|
2020-09-10 20:03:31 -04:00
|
|
|
target_link_libraries(goalc-test cross_sockets goos common_util listener runtime compiler type_system gtest)
|
2020-08-26 22:23:16 -04:00
|
|
|
ENDIF()
|
2020-09-08 14:39:16 -04:00
|
|
|
|
2020-09-08 19:15:38 -04:00
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX AND CODE_COVERAGE)
|
2020-09-08 14:39:16 -04:00
|
|
|
include(CodeCoverage)
|
|
|
|
append_coverage_compiler_flags()
|
|
|
|
setup_target_for_coverage_lcov(NAME goalc-test_coverage
|
|
|
|
EXECUTABLE goalc-test --gtest_color=yes
|
|
|
|
DEPENDENCIES goalc-test
|
2020-09-25 21:11:27 -04:00
|
|
|
EXCLUDE "third-party/*" "/usr/include/*" "decompiler/*")
|
2020-09-08 14:39:16 -04:00
|
|
|
endif()
|