Skip to content

Commit

Permalink
Merge remote-tracking branch 'joakimsoderberg/win32_fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
nmathewson committed Jan 22, 2014
2 parents 99cd818 + e212c54 commit ee0185e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
21 changes: 19 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -925,8 +925,25 @@ if (NOT EVENT__DISABLE_TESTS)
# (Important! This will unset all EVENT_NO* environment variables.
# If they are set in the shell the tests are running using simply "ctest" or "make test" will fail)
if (WIN32)
# Windows doesn't have "unset", and the above does not happen anyway.
add_custom_target(verify COMMAND ${CMAKE_CTEST_COMMAND}
# Windows doesn't have "unset". But you can use "set VAR=" instead.
# We need to guard against the possibility taht EVENT_NOWIN32 is set, and all test failing
# since no event backend being available.
file(TO_NATIVE_PATH ${CMAKE_CTEST_COMMAND} WINDOWS_CTEST_COMMAND)

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp/verify_tests.bat
"
set EVENT_NOWIN32=
\"${WINDOWS_CTEST_COMMAND}\"
")

message("${WINDOWS_CTEST_COMMAND}")
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/tmp/verify_tests.bat
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/verify_tests.bat" VERIFY_PATH)

add_custom_target(verify COMMAND "${VERIFY_PATH}"
DEPENDS event ${ALL_TESTPROGS})
else()
# On some platforms doing exec(unset) as CMake does won't work, so make sure
Expand Down
2 changes: 1 addition & 1 deletion bufferevent_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

// Get rid of OSX 10.7 and greater deprecation warnings.
#ifdef __clang__
#if defined(__APPLE__) && defined(__clang__)
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif

Expand Down
4 changes: 2 additions & 2 deletions sample/https-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

// Get rid of OSX 10.7 and greater deprecation warnings.
#ifdef __clang__
#if defined(__APPLE__) && defined(__clang__)
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif

Expand Down Expand Up @@ -390,7 +390,7 @@ main(int argc, char **argv)
* avoid needless copying. */
FILE * f = fopen(data_file, "rb");
char buf[1024];
ssize_t s;
size_t s;
size_t bytes = 0;

if (!f) {
Expand Down
2 changes: 1 addition & 1 deletion sample/openssl_hostname_validation.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ SOFTWARE.
*/

// Get rid of OSX 10.7 and greater deprecation warnings.
#ifdef __clang__
#if defined(__APPLE__) && defined(__clang__)
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif

Expand Down
2 changes: 1 addition & 1 deletion test/regress_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

// Get rid of OSX 10.7 and greater deprecation warnings.
#ifdef __clang__
#if defined(__APPLE__) && defined(__clang__)
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif

Expand Down

0 comments on commit ee0185e

Please sign in to comment.