Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ced7863

Browse files
committed
fix coroutines in MINGW
1 parent aa05482 commit ced7863

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

3rdparty/coroutine/coroutine.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
using ::std::string;
3939
using ::std::wstring;
4040

41-
#ifdef _MSC_VER
41+
#ifdef _WIN32
4242
#include <Windows.h>
4343
#else
4444
#if defined(__APPLE__) && defined(__MACH__)
@@ -60,7 +60,7 @@ enum class ResumeResult
6060
YIELD = 0
6161
};
6262

63-
#ifdef _MSC_VER
63+
#ifdef _WIN32
6464

6565
struct Routine
6666
{

CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ if(MSVC)
1212
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
1313
endif()
1414

15-
if( MINGW )
16-
add_definitions(-DBT_NO_COROUTINES)
17-
endif()
15+
16+
#add_definitions(-DBT_NO_COROUTINES)
1817

1918
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
2019

examples/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@ target_link_libraries(t07_wrap_legacy ${BEHAVIOR_TREE_LIBRARY} )
3535
add_executable(t08_additional_node_args t08_additional_node_args.cpp )
3636
target_link_libraries(t08_additional_node_args ${BEHAVIOR_TREE_LIBRARY} )
3737

38-
if (NOT MINGW)
39-
add_executable(t09_async_actions_coroutines t09_async_actions_coroutines.cpp )
40-
target_link_libraries(t09_async_actions_coroutines ${BEHAVIOR_TREE_LIBRARY} )
41-
endif()
38+
add_executable(t09_async_actions_coroutines t09_async_actions_coroutines.cpp )
39+
target_link_libraries(t09_async_actions_coroutines ${BEHAVIOR_TREE_LIBRARY} )
4240

4341
add_executable(t10_include_trees t10_include_trees.cpp )
4442
target_link_libraries(t10_include_trees ${BEHAVIOR_TREE_LIBRARY} dummy_nodes )

0 commit comments

Comments
 (0)