tests: fix build errors when GMIO_BUILD_SHARED_LIBS=ON on Windows

This commit is contained in:
Hugues Delorme 2015-09-09 12:39:45 +02:00
parent e60938ea84
commit 2cf2751aef
2 changed files with 11 additions and 2 deletions

View File

@ -15,6 +15,10 @@
enable_testing()
set(CMAKE_CTEST_COMMAND ctest -V)
if(WIN32 AND GMIO_BUILD_SHARED_LIBS)
configure_file(win_ctest_cmd.bat.cmake win_ctest_cmd.bat @ONLY)
set(CMAKE_CTEST_COMMAND win_ctest_cmd.bat)
endif()
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
include_directories(${CMAKE_BINARY_DIR}/src/gmio_core) # For generated cmake headers
@ -25,8 +29,9 @@ add_executable(
EXCLUDE_FROM_ALL
stream_buffer.c
utils.c
test_internal.c)
target_link_libraries(test_internal gmio)
test_internal.c
../src/gmio_core/internal/string_parse.c)
#target_link_libraries(test_internal gmio)
# test_platform
add_executable(

View File

@ -0,0 +1,4 @@
@echo off
set PATH=@CMAKE_BINARY_DIR@\src;%PATH%
ctest -V