From 41d76e1fcbe498b0d01e245f5a2d368a23760101 Mon Sep 17 00:00:00 2001 From: James Lyon Date: Fri, 26 Apr 2013 01:27:04 +0100 Subject: Fixed silly error in Windows build of tests (abitest-cc not linking to libtcc) I really should do this when less tired; I keep breaking one platform while fixing another. I've also fixed some Windows issues with tcctest since Windows printf() uses different format flags to those on Linux, and removed some conditional compilation tests in tcctest since they now should work. --- tests/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/CMakeLists.txt') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2a09547..bcd37cd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,13 +5,12 @@ if(WIN32) set(TCC_CFLAGS ${TCC_CFLAGS} -I${CMAKE_SOURCE_DIR}/win32/include) else() set(TCC_MATH_LDFLAGS -lm) + set(LIBTCC_EXTRA_LIBS dl) set(LIBTCC_LDFLAGS -ldl -lm -Wl,-rpath=${CMAKE_BINARY_DIR}) endif() add_executable(abitest-cc abitest.c) -if(NOT WIN32) - target_link_libraries(abitest-cc libtcc dl) -endif() +target_link_libraries(abitest-cc libtcc ${LIBTCC_EXTRA_LIBS}) add_test(NAME abitest-cc WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND abitest-cc lib_path=${CMAKE_BINARY_DIR} include=${CMAKE_SOURCE_DIR}/include) set(ABITEST_TCC abitest-tcc${CMAKE_EXECUTABLE_SUFFIX}) -- cgit v1.3.1