modify readme and fix(maybe?) the curious thread support problem

This commit is contained in:
qqiangwu 2015-04-12 00:59:49 +08:00
parent 86d675fa85
commit 9c3f53eab8
7 changed files with 48 additions and 10 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@ Thumbs.db
#Ignore files build by Visual Studio
bii/build/*
bii/cmake/*
bii/deps/*
*.obj
*.exe
*.pdb

View File

@ -11,7 +11,7 @@ else()
set(LIB_SRC ${BII_LIB_SRC})
foreach(cpp ${BII_LIB_SRC})
if(${cpp} MATCHES "(include/nana|source)/detail/[A-Za-z0-9_]+/.+$")
if(${cpp} MATCHES "/detail/(win32|linux_X11)/.+$")
list(APPEND trash_files ${cpp})
endif()
endforeach()
@ -100,12 +100,18 @@ if(NOT BIICODE)
endif()
endif()
else()
add_definitions(-DNANA_LIBPNG)
add_definitions(-DNANA_ENABLE_PNG)
endif()
#Copy our new config.hpp (with removed defines)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/nana/)
if(NOT BIICODE)
# I don't know how it works!!!
message("Check config.hpp and copy")
execute_process(COMMAND ${CMAKE_COMMAND}
-E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/nana/)
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")

View File

@ -9,6 +9,21 @@ Nana is licensed under the [Boost Software License].
[Boost Software License]: http://www.boost.org/LICENSE_1_0.txt
## Biicode
Nana is available in biicode, download biicode and try the nana example:
```
> mkdir try-nana
> cd try-nana
> bii init
> bii open qiangwu/nana-example
> bii find
> bii build
> cd bin
```
Run it! All dependencies will be resovled automatically by biicode! Amazing, isn't it?
## Support
The best way to get help with Nana library is by visiting http://nanapro.org/help.htm

View File

@ -1,9 +1,7 @@
# Biicode configuration file
[requirements]
# Blocks and versions this block depends on e.g.
# user/depblock1: 3
# user2/depblock2(track) @tag
glenn/png: 6
[parent]
# The parent version of this block. Must match folder name. E.g.
@ -21,7 +19,8 @@
# Manual adjust file implicit dependencies, add (+), remove (-), or overwrite (=)
# hello.h + hello_imp.cpp hello_imp2.cpp
# *.h + *.cpp
include/nana/config.hpp + build/cmake/config.hpp
include/nana/config.hpp + include/*
include/nana/config.hpp + source/*
[mains]
# Manual adjust of files that define an executable
@ -40,6 +39,7 @@
[includes]
# Mapping of include patterns to external blocks
# hello*.h: user3/depblock # includes will be processed as user3/depblock/hello*.h
png.h: glenn/png
[data]
# Manually define data files dependencies, that will be copied to bin for execution

View File

@ -2,11 +2,17 @@
#define NANA_STD_CONDITION_VARIABLE_HPP
#include <nana/config.hpp>
#if defined(STD_THREAD_NOT_SUPPORTED)
#if defined(STD_THREAD_NOT_SUPPORTED) && !defined(NANA_MINGW) || __GNUC_MINOR__ < 8
#include <boost/thread/condition_variable.hpp>
namespace std
{
typedef boost::condition_variable condition_variable;
}
#else
#include <condition_variable>
#endif
#endif // NANA_STD_CONDITION_VARIABLE_HPP

View File

@ -2,7 +2,8 @@
#define NANA_STD_MUTEX_HPP
#include <nana/config.hpp>
#if defined(STD_THREAD_NOT_SUPPORTED)
#if defined(STD_THREAD_NOT_SUPPORTED) && !defined(NANA_MINGW) || __GNUC_MINOR__ < 8
#include <boost/thread/mutex.hpp>
#include <boost/thread/recursive_mutex.hpp>
#include <boost/thread/locks.hpp>
@ -18,5 +19,10 @@ namespace std
typedef boost::mutex mutex;
typedef boost::recursive_mutex recursive_mutex;
}
#else
#include <mutex>
#endif
#endif // NANA_STD_MUTEX_HPP

View File

@ -2,12 +2,16 @@
#define NANA_STD_THREAD_HPP
#include <nana/config.hpp>
#if defined(STD_THREAD_NOT_SUPPORTED)
#if defined(STD_THREAD_NOT_SUPPORTED) && !defined(NANA_MINGW) || __GNUC_MINOR__ < 8
#include <boost/thread.hpp>
namespace std
{
typedef boost::thread thread;
}
#else
#include <thread>
#endif
#endif // NANA_STD_THREAD_HPP