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.
This commit is contained in:
James Lyon
2013-04-26 01:27:04 +01:00
parent ae2ece93da
commit 41d76e1fcb
2 changed files with 34 additions and 33 deletions

View File

@ -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})