Merge branch 'qPCR4vir-tests' into develop

This commit is contained in:
Jinhao 2016-06-26 19:04:56 +08:00
commit c65247b413
3 changed files with 89 additions and 71 deletions

View File

@ -75,6 +75,22 @@ before_script :
- mkdir bin
- cd bin
script:
- cmake -G"Unix Makefiles" .. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON
- make
@ -86,51 +102,56 @@ script:
- ./animate-bmp
- ./audio_player
- ./background-effects
#- ./calculator
#- ./calculator # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1159
- ./categ
- ./clicked
- ./decore
- ./dock
- ./drag-button
- ./draw
#- ./file_explorer
#- ./example_menu
- ./file_explorer
#- ./example_menu # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1348
- ./example_listbox
#- ./example_combox
#- ./example_combox # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1378
- ./example.button
#- ./folder_tree_nana
#- ./folder_tree_std
#- ./filebox-txt # https://travis-ci.org/qPCR4vir/nana/jobs/140250744#L1393
- ./folder_tree
#- ./folder_tree_nana # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1408
#- ./folder_tree_std # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1421
- ./framework_design_1
- ./framework_design_2
- ./framework_design_3
- ./group
- ./HelloWord
#- ./helloword_quit
#- ./inputbox
#- ./helloword_quit # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1572
#- ./inputbox # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1585
- ./label_listener
#- ./lambda_event.cpp11
- ./lambda_event.Cpp11
- ./listbox_inline_widget
- ./listbox_Resolver
- ./loader_1
#- ./loader_2
#- ./loader_2 # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1732
- ./mbox
- ./main
- ./menu_debug
#- ./MontiHall
#- ./helloworld_demo
#- ./notepad
#- ./modal_form # https://travis-ci.org/qPCR4vir/nana/jobs/140250744#L1736
#- ./MontiHall # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1775
#- ./helloworld_demo # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1786
#- ./notepad # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1799
- ./menu_debug
- ./menu_popuper
#- ./modal_form
#- ./widget_show2
#- ./widget_show
#- ./modal_form # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1846
#- ./widget_show2 # https://travis-ci.org/qPCR4vir/nana/jobs/140245437#L1730
#- ./widget_show # https://travis-ci.org/qPCR4vir/nana/jobs/140245437#L1740
- ./place_login
- ./png
#- ./screen
#- ./screen # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1909
- ./stretch_image
- ./threading
#- ./thread-pool
#- ./threading # https://travis-ci.org/qPCR4vir/nana/jobs/140245437#L1826 ?
#- ./thread-pool # https://travis-ci.org/qPCR4vir/nana/jobs/140247564#L1782
- ./various_events
#- ./window-dragger
#- ./window-dragger # https://travis-ci.org/qPCR4vir/nana/jobs/140245438#L1820
- ./windows-subclassing
- ./textbox_line_number

View File

@ -130,7 +130,7 @@ endif(UNIX)
########### Compliers
#
# Using gcc: gcc 4.8 don't sopourt C++14 and make_unique. You may want to update at least to 4.9.
# Using gcc: gcc 4.8 don't support C++14 and make_unique. You may want to update at least to 4.9.
# In Windows, the gcc which come with CLion was 4.8 from MinGW. You may want to install MinGW-w64 from the
# TDM-GCC Compiler Suite for Windows which will update you to gcc 5.1.
# gcc 5.3 and 5.4 include filesytem, but you need to add the link flag: -lstdc++fs
@ -311,6 +311,8 @@ endif(NANA_CMAKE_INSTALL_INCLUDES)
set_property( TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14 )
# TODO: move this nana-demo section to the nana demo repository, and here only include that cmake file
if (NANA_CMAKE_BUILD_DEMOS)
@ -320,58 +322,52 @@ if (NANA_CMAKE_BUILD_DEMOS)
enable_testing ()
endif(NANA_CMAKE_AUTOMATIC_GUI_TESTING)
set (demos calculator file_explorer helloworld_demo notepad )
foreach ( demo ${demos})
add_executable(${demo} "../nana-demo/${demo}.cpp")
set_property( TARGET ${demo} PROPERTY CXX_STANDARD 14 )
target_link_libraries(${demo} ${PROJECT_NAME}) # ${NANA_LINKS} or ${CMAKE_EXE_LINKER_FLAGS}
#if(NANA_CMAKE_AUTOMATIC_GUI_TESTING)
#add_custom_command( TARGET ${demo} POST_BUILD COMMAND ${demo} )
#add_custom_target(do_always_${demo} ALL COMMAND ${demo})
#add_test(${demo} COMMAND ${demo})
#endif(NANA_CMAKE_AUTOMATIC_GUI_TESTING)
install(TARGETS ${demo} RUNTIME DESTINATION "../nana-demo/")
message("... to build: ../nana-demo/${demo}.cpp" )
endforeach( demo ${demos})
set (demos widget_show widget_show2 )
#if (NANA_CMAKE_BUILD_FreeMe)
# add_definitions(-DBUILD_FreeMe)
#endif (NANA_CMAKE_BUILD_FreeMe)
# if (NANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS)
# list(APPEND demos ) # ?? FreeMe
# endif (NANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS)
# Pending: FreeMe (added but really completelly compiled if defined BUILD_FreeMe )
foreach ( demo ${demos})
add_executable(${demo} "../nana-demo/${demo}.cpp")
set_property( TARGET ${demo} PROPERTY CXX_STANDARD 14 )
target_link_libraries(${demo} ${PROJECT_NAME}) # ${NANA_LINKS} or ${CMAKE_EXE_LINKER_FLAGS}
install(TARGETS ${demo} RUNTIME DESTINATION "../nana-demo/")
message("... to build: ../nana-demo/${demo}.cpp" )
endforeach( demo ${demos})
set (demos a_group_impl animate-bmp audio_player audio_player_simple background-effects categ clicked
decore dock drag-button draw example.button example_combox example_listbox example_menu
filebox-txt folder_tree folder_tree_nana folder_tree_std framework_design_1 framework_design_2 framework_design_3
group HelloWord helloword_quit inputbox label_listener lambda_event.Cpp11 listbox_inline_widget listbox_Resolver loader_1 loader_2
main mbox menu_debug menu_popuper modal_form MontiHall place_login png screen stretch_image
threading thread-pool various_events window-dragger windows-subclassing
set (demos_dir ../nana-demo/)
set (demos calculator file_explorer helloworld_demo notepad widget_show widget_show2 )
# Pending:
set (examples_dir ../nana-demo/Examples/)
set (examples a_group_impl animate-bmp audio_player audio_player_simple
background-effects categ clicked windows-subclassing
dock drag-button draw example.button
example_combox example_listbox example_menu lambda_event.Cpp11
filebox-txt folder_tree folder_tree_nana folder_tree_std
framework_design_1 framework_design_2 framework_design_3 label_listener
group HelloWord helloword_quit listbox_inline_widget
inputbox listbox_Resolver loader_1 loader_2
main mbox menu_debug menu_popuper modal_form
MontiHall place_login png textbox_line_number
stretch_image threading thread-pool various_events
window-dragger screen decore
)
# Pending:
foreach ( demo ${demos})
add_executable(${demo} "../nana-demo/Examples/${demo}.cpp")
set_property( TARGET ${demo} PROPERTY CXX_STANDARD 14 )
target_link_libraries(${demo} ${PROJECT_NAME}) # ${NANA_LINKS} or ${CMAKE_EXE_LINKER_FLAGS}
install(TARGETS ${demo} RUNTIME DESTINATION "../nana-demo/Examples/")
message("... to build: ../nana-demo/Examples/${demo}.cpp" )
endforeach( demo ${demos})
if (NANA_CMAKE_BUILD_FreeMe)
add_definitions(-DBUILD_FreeMe)
endif (NANA_CMAKE_BUILD_FreeMe)
if (NANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS)
list(APPEND demos ) # ?? FreeMe
endif (NANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS)
# Pending: FreeMe (added but really completely compiled if defined BUILD_FreeMe )
function(set_nana_test dir files)
foreach ( test ${${files}})
add_executable(${test} "${${dir}}${test}.cpp")
set_property( TARGET ${test} PROPERTY CXX_STANDARD 14 )
target_link_libraries(${test} ${PROJECT_NAME})
#if(NANA_CMAKE_AUTOMATIC_GUI_TESTING)
#add_custom_command( TARGET ${test} POST_BUILD COMMAND ${test} )
#add_custom_target(do_always_${test} ALL COMMAND ${test})
#add_test(${test} COMMAND ${test})
#endif(NANA_CMAKE_AUTOMATIC_GUI_TESTING)
install(TARGETS ${test} RUNTIME DESTINATION "../nana-demo/")
message("... to build: ${${dir}}${test}.cpp" )
endforeach( test ${${files}})
endfunction(set_nana_test)
set_nana_test(demos_dir demos)
set_nana_test(examples_dir examples)
endif (NANA_CMAKE_BUILD_DEMOS)

View File

@ -58,8 +58,9 @@
# define noexcept //no support of noexcept until Visual C++ 2015
# define constexpr const //no support of constexpr until Visual C++ 2015 ? const ??
# endif
# else
# undef STD_FILESYSTEM_NOT_SUPPORTED
# endif
#elif defined(__GNUC__)
# if (__GNUC__ == 4 && __GNUC_MINOR__ < 6)
# define noexcept //no support of noexcept until GCC 4.6