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 - mkdir bin
- cd bin - cd bin
script: 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 - 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 - make
@ -86,51 +102,56 @@ script:
- ./animate-bmp - ./animate-bmp
- ./audio_player - ./audio_player
- ./background-effects - ./background-effects
#- ./calculator #- ./calculator # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1159
- ./categ - ./categ
- ./clicked - ./clicked
- ./decore - ./decore
- ./dock - ./dock
- ./drag-button - ./drag-button
- ./draw - ./draw
#- ./file_explorer - ./file_explorer
#- ./example_menu #- ./example_menu # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1348
- ./example_listbox - ./example_listbox
#- ./example_combox #- ./example_combox # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1378
- ./example.button - ./example.button
#- ./folder_tree_nana #- ./filebox-txt # https://travis-ci.org/qPCR4vir/nana/jobs/140250744#L1393
#- ./folder_tree_std - ./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_1
- ./framework_design_2 - ./framework_design_2
- ./framework_design_3 - ./framework_design_3
- ./group - ./group
- ./HelloWord - ./HelloWord
#- ./helloword_quit #- ./helloword_quit # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1572
#- ./inputbox #- ./inputbox # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1585
- ./label_listener - ./label_listener
#- ./lambda_event.cpp11 - ./lambda_event.Cpp11
- ./listbox_inline_widget - ./listbox_inline_widget
- ./listbox_Resolver - ./listbox_Resolver
- ./loader_1 - ./loader_1
#- ./loader_2 #- ./loader_2 # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1732
- ./mbox - ./mbox
- ./main
- ./menu_debug - ./menu_debug
#- ./MontiHall #- ./modal_form # https://travis-ci.org/qPCR4vir/nana/jobs/140250744#L1736
#- ./helloworld_demo #- ./MontiHall # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1775
#- ./notepad #- ./helloworld_demo # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1786
#- ./notepad # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1799
- ./menu_debug - ./menu_debug
- ./menu_popuper - ./menu_popuper
#- ./modal_form #- ./modal_form # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1846
#- ./widget_show2 #- ./widget_show2 # https://travis-ci.org/qPCR4vir/nana/jobs/140245437#L1730
#- ./widget_show #- ./widget_show # https://travis-ci.org/qPCR4vir/nana/jobs/140245437#L1740
- ./place_login - ./place_login
- ./png - ./png
#- ./screen #- ./screen # https://travis-ci.org/qPCR4vir/nana/jobs/140238537#L1909
- ./stretch_image - ./stretch_image
- ./threading #- ./threading # https://travis-ci.org/qPCR4vir/nana/jobs/140245437#L1826 ?
#- ./thread-pool #- ./thread-pool # https://travis-ci.org/qPCR4vir/nana/jobs/140247564#L1782
- ./various_events - ./various_events
#- ./window-dragger #- ./window-dragger # https://travis-ci.org/qPCR4vir/nana/jobs/140245438#L1820
- ./windows-subclassing - ./windows-subclassing
- ./textbox_line_number

View File

@ -130,7 +130,7 @@ endif(UNIX)
########### Compliers ########### 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 # 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. # 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 # 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 ) 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 # TODO: move this nana-demo section to the nana demo repository, and here only include that cmake file
if (NANA_CMAKE_BUILD_DEMOS) if (NANA_CMAKE_BUILD_DEMOS)
@ -320,58 +322,52 @@ if (NANA_CMAKE_BUILD_DEMOS)
enable_testing () enable_testing ()
endif(NANA_CMAKE_AUTOMATIC_GUI_TESTING) endif(NANA_CMAKE_AUTOMATIC_GUI_TESTING)
set (demos calculator file_explorer helloworld_demo notepad )
foreach ( demo ${demos}) set (demos_dir ../nana-demo/)
add_executable(${demo} "../nana-demo/${demo}.cpp") set (demos calculator file_explorer helloworld_demo notepad widget_show widget_show2 )
set_property( TARGET ${demo} PROPERTY CXX_STANDARD 14 ) # Pending:
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 ) set (examples_dir ../nana-demo/Examples/)
set (examples a_group_impl animate-bmp audio_player audio_player_simple
#if (NANA_CMAKE_BUILD_FreeMe) background-effects categ clicked windows-subclassing
# add_definitions(-DBUILD_FreeMe) dock drag-button draw example.button
#endif (NANA_CMAKE_BUILD_FreeMe) example_combox example_listbox example_menu lambda_event.Cpp11
filebox-txt folder_tree folder_tree_nana folder_tree_std
# if (NANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS) framework_design_1 framework_design_2 framework_design_3 label_listener
# list(APPEND demos ) # ?? FreeMe group HelloWord helloword_quit listbox_inline_widget
# endif (NANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS) inputbox listbox_Resolver loader_1 loader_2
# Pending: FreeMe (added but really completelly compiled if defined BUILD_FreeMe ) main mbox menu_debug menu_popuper modal_form
MontiHall place_login png textbox_line_number
foreach ( demo ${demos}) stretch_image threading thread-pool various_events
add_executable(${demo} "../nana-demo/${demo}.cpp") window-dragger screen decore
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
) )
# Pending: # Pending:
foreach ( demo ${demos}) if (NANA_CMAKE_BUILD_FreeMe)
add_executable(${demo} "../nana-demo/Examples/${demo}.cpp") add_definitions(-DBUILD_FreeMe)
set_property( TARGET ${demo} PROPERTY CXX_STANDARD 14 ) endif (NANA_CMAKE_BUILD_FreeMe)
target_link_libraries(${demo} ${PROJECT_NAME}) # ${NANA_LINKS} or ${CMAKE_EXE_LINKER_FLAGS} if (NANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS)
install(TARGETS ${demo} RUNTIME DESTINATION "../nana-demo/Examples/") list(APPEND demos ) # ?? FreeMe
message("... to build: ../nana-demo/Examples/${demo}.cpp" ) endif (NANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS)
endforeach( demo ${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) endif (NANA_CMAKE_BUILD_DEMOS)

View File

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