mirror of https://github.com/ARMmbed/mbed-os.git
unittests: fix windows build
- set equeue platform to posix for MINGW - enable PRIx formatting globally - remove redundant Semaphore implementationpull/12287/head
parent
e8eed6ecd5
commit
a2e5a34df6
|
@ -19,6 +19,13 @@ endmacro()
|
|||
|
||||
use_cxx14()
|
||||
|
||||
|
||||
if (MINGW)
|
||||
# enable PRIx formatting globally
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__STDC_FORMAT_MACROS")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_FORMAT_MACROS")
|
||||
endif (MINGW)
|
||||
|
||||
####################
|
||||
# GTEST
|
||||
####################
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
namespace rtos {
|
||||
class Semaphore {
|
||||
public:
|
||||
Semaphore(int32_t count = 0) {};
|
||||
Semaphore(int32_t count, uint16_t max_count) {};
|
||||
void acquire() {};
|
||||
bool try_acquire() { return false; };
|
||||
bool try_acquire_for(uint32_t millisec) { return false; };
|
||||
bool try_acquire_until(uint64_t millisec) { return false; };
|
||||
osStatus release(void) {return 0;};
|
||||
Semaphore(int32_t count = 0);
|
||||
Semaphore(int32_t count, uint16_t max_count);
|
||||
void acquire();
|
||||
bool try_acquire();
|
||||
bool try_acquire_for(uint32_t millisec);
|
||||
bool try_acquire_until(uint64_t millisec);
|
||||
osStatus release(void);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ extern "C" {
|
|||
// Try to infer a platform if none was manually selected
|
||||
#if !defined(EQUEUE_PLATFORM_POSIX) \
|
||||
&& !defined(EQUEUE_PLATFORM_MBED)
|
||||
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
|
||||
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__MINGW32__) || defined(__MINGW64__)
|
||||
#define EQUEUE_PLATFORM_POSIX
|
||||
#elif defined(__MBED__)
|
||||
#define EQUEUE_PLATFORM_MBED
|
||||
|
|
Loading…
Reference in New Issue