modify readme and fix(maybe?) the curious thread support problem
This commit is contained in:
parent
86d675fa85
commit
9c3f53eab8
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@ Thumbs.db
|
|||||||
#Ignore files build by Visual Studio
|
#Ignore files build by Visual Studio
|
||||||
bii/build/*
|
bii/build/*
|
||||||
bii/cmake/*
|
bii/cmake/*
|
||||||
|
bii/deps/*
|
||||||
*.obj
|
*.obj
|
||||||
*.exe
|
*.exe
|
||||||
*.pdb
|
*.pdb
|
||||||
|
@ -11,7 +11,7 @@ else()
|
|||||||
set(LIB_SRC ${BII_LIB_SRC})
|
set(LIB_SRC ${BII_LIB_SRC})
|
||||||
|
|
||||||
foreach(cpp ${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})
|
list(APPEND trash_files ${cpp})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
@ -100,12 +100,18 @@ if(NOT BIICODE)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
add_definitions(-DNANA_LIBPNG)
|
|
||||||
add_definitions(-DNANA_ENABLE_PNG)
|
add_definitions(-DNANA_ENABLE_PNG)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#Copy our new config.hpp (with removed defines)
|
#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)
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
|
||||||
|
15
README.md
15
README.md
@ -9,6 +9,21 @@ Nana is licensed under the [Boost Software License].
|
|||||||
|
|
||||||
[Boost Software License]: http://www.boost.org/LICENSE_1_0.txt
|
[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
|
## Support
|
||||||
|
|
||||||
The best way to get help with Nana library is by visiting http://nanapro.org/help.htm
|
The best way to get help with Nana library is by visiting http://nanapro.org/help.htm
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
# Biicode configuration file
|
# Biicode configuration file
|
||||||
|
|
||||||
[requirements]
|
[requirements]
|
||||||
# Blocks and versions this block depends on e.g.
|
glenn/png: 6
|
||||||
# user/depblock1: 3
|
|
||||||
# user2/depblock2(track) @tag
|
|
||||||
|
|
||||||
[parent]
|
[parent]
|
||||||
# The parent version of this block. Must match folder name. E.g.
|
# 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 (=)
|
# Manual adjust file implicit dependencies, add (+), remove (-), or overwrite (=)
|
||||||
# hello.h + hello_imp.cpp hello_imp2.cpp
|
# hello.h + hello_imp.cpp hello_imp2.cpp
|
||||||
# *.h + *.cpp
|
# *.h + *.cpp
|
||||||
include/nana/config.hpp + build/cmake/config.hpp
|
include/nana/config.hpp + include/*
|
||||||
|
include/nana/config.hpp + source/*
|
||||||
|
|
||||||
[mains]
|
[mains]
|
||||||
# Manual adjust of files that define an executable
|
# Manual adjust of files that define an executable
|
||||||
@ -40,6 +39,7 @@
|
|||||||
[includes]
|
[includes]
|
||||||
# Mapping of include patterns to external blocks
|
# Mapping of include patterns to external blocks
|
||||||
# hello*.h: user3/depblock # includes will be processed as user3/depblock/hello*.h
|
# hello*.h: user3/depblock # includes will be processed as user3/depblock/hello*.h
|
||||||
|
png.h: glenn/png
|
||||||
|
|
||||||
[data]
|
[data]
|
||||||
# Manually define data files dependencies, that will be copied to bin for execution
|
# Manually define data files dependencies, that will be copied to bin for execution
|
||||||
|
@ -2,11 +2,17 @@
|
|||||||
#define NANA_STD_CONDITION_VARIABLE_HPP
|
#define NANA_STD_CONDITION_VARIABLE_HPP
|
||||||
#include <nana/config.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>
|
#include <boost/thread/condition_variable.hpp>
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
typedef boost::condition_variable condition_variable;
|
typedef boost::condition_variable condition_variable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <condition_variable>
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif // NANA_STD_CONDITION_VARIABLE_HPP
|
#endif // NANA_STD_CONDITION_VARIABLE_HPP
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
#define NANA_STD_MUTEX_HPP
|
#define NANA_STD_MUTEX_HPP
|
||||||
#include <nana/config.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/mutex.hpp>
|
||||||
#include <boost/thread/recursive_mutex.hpp>
|
#include <boost/thread/recursive_mutex.hpp>
|
||||||
#include <boost/thread/locks.hpp>
|
#include <boost/thread/locks.hpp>
|
||||||
@ -18,5 +19,10 @@ namespace std
|
|||||||
typedef boost::mutex mutex;
|
typedef boost::mutex mutex;
|
||||||
typedef boost::recursive_mutex recursive_mutex;
|
typedef boost::recursive_mutex recursive_mutex;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <mutex>
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // NANA_STD_MUTEX_HPP
|
#endif // NANA_STD_MUTEX_HPP
|
||||||
|
@ -2,12 +2,16 @@
|
|||||||
#define NANA_STD_THREAD_HPP
|
#define NANA_STD_THREAD_HPP
|
||||||
#include <nana/config.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>
|
#include <boost/thread.hpp>
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
typedef boost::thread thread;
|
typedef boost::thread thread;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // NANA_STD_THREAD_HPP
|
#endif // NANA_STD_THREAD_HPP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user