Skip to content

Commit

Permalink
Request std=c++11 dialect again, and add warning (#900)
Browse files Browse the repository at this point in the history
* Put back stdc++11 and add compile-time check

* Soften it and update changelog
  • Loading branch information
Adlai-Holler committed May 2, 2018
1 parent f16e05e commit f3aaa52
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
- `ASDisplayNode, ASLayoutSpec, and ASLayoutElementStyle` now conform to `NSLocking`. They act as recursive locks. Useful locking macros have been added as `ASThread.h`. Subclasses / client code can lock these objects but should be careful as usual when dealing with locks. [Adlai Holler](https://github.com/Adlai-Holler)
- Introduces `ASRecursiveUnfairLock` as an experiment to improve locking performance. [Adlai Holler](https://github.com/Adlai-Holler)
- Adds an experiment to shorten init time. [Adlai Holler](https://github.com/Adlai-Holler)
- Adds a check that Texture is compiled with stdc++11 as specified by the podfile. gnu++11 can cause subtle issues that are currently being investigated. [Adlai Holler](https://github.com/Adlai-Holler)

## 2.6
- [Xcode 9] Updated to require Xcode 9 (to fix warnings) [Garrett Moon](https://github.com/garrettmoon)
Expand Down
3 changes: 3 additions & 0 deletions Source/Base/ASBaseDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
// wrap constants, only C functions. See StackOverflow for more details:
// http://stackoverflow.com/questions/1041866/in-c-source-what-is-the-effect-of-extern-c
#ifdef __cplusplus
# ifndef __STRICT_ANSI__
#warning "Texture must be compiled with std=c++11. gnu++ is not supported and may cause issues."
# endif
# define ASDISPLAYNODE_EXTERN_C_BEGIN extern "C" {
# define ASDISPLAYNODE_EXTERN_C_END }
#else
Expand Down
5 changes: 5 additions & 0 deletions Texture.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,9 @@ Pod::Spec.new do |spec|

spec.social_media_url = 'https://twitter.com/TextureiOS'
spec.library = 'c++'
spec.pod_target_xcconfig = {
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11',
'CLANG_CXX_LIBRARY' => 'libc++'
}

end

0 comments on commit f3aaa52

Please sign in to comment.