2020-03-26 08:36:47 +08:00
|
|
|
set(SRCS
|
2022-02-04 07:54:33 +08:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.cs
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Program.cs
|
2020-03-26 08:36:47 +08:00
|
|
|
Properties/AssemblyInfo.cs)
|
|
|
|
|
|
|
|
set(TEST_HARNESS_REFERENCES
|
2020-07-11 09:13:39 +08:00
|
|
|
"-r:System,System.Core,System.Xml.Linq,System.Data.DataSetExtensions,Microsoft.CSharp,System.Data,System.Xml,System.Runtime.Serialization,${TraceLogHelperDll}")
|
2020-03-26 08:36:47 +08:00
|
|
|
|
|
|
|
set(out_file ${CMAKE_BINARY_DIR}/packages/bin/TestHarness.exe)
|
|
|
|
|
2022-02-04 07:54:33 +08:00
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/VersionInfo.cs.cmake ${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.cs)
|
2020-08-07 22:46:38 +08:00
|
|
|
|
2020-03-26 08:36:47 +08:00
|
|
|
add_custom_command(OUTPUT ${out_file}
|
|
|
|
COMMAND ${MCS_EXECUTABLE} ARGS ${TEST_HARNESS_REFERENCES} ${SRCS} "-target:exe" "-out:${out_file}"
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
2020-04-11 09:16:52 +08:00
|
|
|
DEPENDS ${SRCS} TraceLogHelper
|
2020-03-26 08:36:47 +08:00
|
|
|
COMMENT "Compile TestHarness" VERBATIM)
|
|
|
|
add_custom_target(TestHarness DEPENDS ${out_file})
|