Skip to content

Commit

Permalink
Merge pull request #268 from leapmotion/fix-libcxx
Browse files Browse the repository at this point in the history
Fix libcxx problems
  • Loading branch information
codemercenary committed Dec 17, 2014
2 parents 8872471 + fcbe62f commit abcfd25
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
8 changes: 8 additions & 0 deletions autowiring/AutoPacket.h
Expand Up @@ -452,8 +452,16 @@ class AutoPacket:
}

// Now trigger a rescan to hit any deferred, unsatisfiable entries:
#if autowiring_USE_LIBCXX
for (const std::type_info* ti : {&typeid(auto_id<T>), &typeid(auto_id<Ts>)...})
MarkUnsatisfiable(*ti);
#else
bool dummy[] = {
(MarkUnsatisfiable(typeid(auto_id<T>)), false),
(MarkUnsatisfiable(typeid(auto_id<Ts>)), false)...
};
(void)dummy;
#endif
}),
PulseSatisfaction(pTypeSubs, 1 + sizeof...(Ts));
}
Expand Down
6 changes: 4 additions & 2 deletions src/autowiring/CMakeLists.txt
Expand Up @@ -2,8 +2,10 @@
# Setup testing
#

add_googletest(test)
add_googletest(benchmark)
if(autowiring_USE_LIBCXX)
add_googletest(test)
add_googletest(benchmark)
endif()

#
# Configure source files
Expand Down
9 changes: 0 additions & 9 deletions src/autowiring/test/CMakeLists.txt
Expand Up @@ -87,15 +87,6 @@ endif()
add_pch(AutowiringTest_SRCS "stdafx.h" "stdafx.cpp")
add_executable(AutowiringTest ${AutowiringTest_SRCS})
target_link_libraries(AutowiringTest Autowiring AutowiringFixture AutoTesting)
if(NOT WIN32 AND NOT autowiring_USE_LIBCXX)
find_package(Boost COMPONENTS thread atomic chrono system date_time QUIET)
target_link_libraries(AutowiringTest ${Boost_LIBRARIES})
endif()

# Need boost thread on android, because of our use of std::async
if(BUILD_ANDROID)
target_link_libraries(AutowiringTest ${Boost_LIBRARIES})
endif()

# Need boost thread on android, because of our use of std::async
if(BUILD_ANDROID)
Expand Down

0 comments on commit abcfd25

Please sign in to comment.