Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7ddd0d2

Browse files
committed
[CI] import c++11 F replacement
1 parent f375b4d commit 7ddd0d2

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

‎extras/test/CMakeLists.txt‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ set(TEST_TARGET_ADVERTISING_DATA_SRCS
9898

9999
##########################################################################
100100

101-
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "--coverage")
102-
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "--coverage")
101+
#set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-fpermissive")
102+
set(CMAKE_C_FLAGS "-fpermissive")
103+
#set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-fpermissive -std=gnu++11")
104+
set(CMAKE_CXX_FLAGS "-fpermissive -std=gnu++11")
103105

104106
##########################################################################
105107

‎extras/test/include/Arduino.h‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@
3838
typedef arduino::String String;
3939
typedef bool boolean;
4040

41+
#if defined(__cplusplus)
42+
43+
#undef F
44+
// C++11 F replacement declaration
45+
template <typename T1>
46+
auto F(T1&& A)
47+
-> const arduino::__FlashStringHelper*
48+
{
49+
return (const arduino::__FlashStringHelper*)A;
50+
}
51+
52+
#endif
53+
4154
/******************************************************************************
4255
FUNCTION PROTOTYPES
4356
******************************************************************************/

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /