diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1ea595bec..289d44fcc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -279,7 +279,7 @@ file(GLOB_RECURSE tests *_unittest.cpp) foreach(testsourcefile ${tests}) get_filename_component(testname ${testsourcefile} NAME_WE) - add_executable(${testname} WIN32 ${testsourcefile}) + add_executable(${testname} ${testsourcefile}) target_link_libraries(${testname} gtest ${all_libs}) diff --git a/src/tests/test.h b/src/tests/test.h index 1bd24e6a0..683dcddb3 100644 --- a/src/tests/test.h +++ b/src/tests/test.h @@ -28,7 +28,10 @@ #include "gui/jinete.h" #endif -// Allegro-friendly main() routine +#ifdef main + #undef main +#endif + int main(int argc, char* argv[]) { int exitcode; @@ -58,6 +61,4 @@ int main(int argc, char* argv[]) return exitcode; } -END_OF_MAIN(); - #endif