diff --git a/CMakeLists.txt b/CMakeLists.txt index e63ef3e..ced64f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,10 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") set(GCC 1) endif() +if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") + set(OSX 1) +endif() + set (default_build_type "Release") if (NOT CMAKE_BUILD_TYPE AND default_build_type) message( STATUS "Setting default buildtype to '${default_build_type}' as none was specified") @@ -202,7 +206,7 @@ if (MSVC) endif (MSVC) # TESTS: -IF (CMOCKA_FOUND AND NOT CLANG) +IF (CMOCKA_FOUND AND NOT OSX AND NOT CLANG) find_package(Threads REQUIRED) enable_testing() add_executable(test_util test/test_util src/util) diff --git a/src/keyboard.h b/src/keyboard.h index 57aa0dc..fd61375 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -19,7 +19,7 @@ #ifndef KEYBOARD_H_ #define KEYBOARD_H_ -#include +#include #include #include "defines.h" diff --git a/src/keyboardinput.h b/src/keyboardinput.h index c4c3147..0619d36 100644 --- a/src/keyboardinput.h +++ b/src/keyboardinput.h @@ -19,7 +19,7 @@ #ifndef KEYBOARDINPUT_H_ #define KEYBOARDINPUT_H_ -#include +#include #include #define KEY_LEFT 1 diff --git a/test/test_keyboardinput.c b/test/test_keyboardinput.c index 5b75087..2341921 100644 --- a/test/test_keyboardinput.c +++ b/test/test_keyboardinput.c @@ -98,8 +98,10 @@ test_keydown(void **state) assert_true(key_is_down(&input, KEY_UP)); } -int main(void) +int main(int argc, char *argv[]) { + (void) argc; + (void) argv; const struct CMUnitTest tests[] = { cmocka_unit_test(test_keypress),