From 17240f5a51e935de525d9aee144ba697494c93a6 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Wed, 12 Jun 2019 12:39:31 +0200 Subject: [PATCH 1/8] NANA_CMAKE_INSTALL=ON, but now normal users need to set OFF or EXCLUDE_FROM_ALL --- build/cmake/install_nana.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/cmake/install_nana.cmake b/build/cmake/install_nana.cmake index 2b6851d6..4450e4f8 100644 --- a/build/cmake/install_nana.cmake +++ b/build/cmake/install_nana.cmake @@ -1,4 +1,4 @@ -option(NANA_CMAKE_INSTALL "Install nana when compile the library (to be consumed without cmake)" OFF) +option(NANA_CMAKE_INSTALL "Install nana when compile the library (to be consumed without cmake)" ON) # Install the include directories too. if(NANA_CMAKE_INSTALL) From ceb81a087695ecf03d76ddc07876fb72b1ad96db Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Wed, 12 Jun 2019 12:44:01 +0200 Subject: [PATCH 2/8] eliminate debug info in release, size of executable is 1/10 --- build/cmake/compilers.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/cmake/compilers.cmake b/build/cmake/compilers.cmake index 80daf9e9..c8db4976 100644 --- a/build/cmake/compilers.cmake +++ b/build/cmake/compilers.cmake @@ -14,8 +14,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # AND NOT MINGW?? - target_compile_options(nana PRIVATE -Wall - PUBLIC -g ) + target_compile_options(nana PRIVATE -Wall) # todo: set in target property of nana set(CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=native -DNDEBUG") From 76d5138f5529394cc45cc420a97a5526879624ee Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Wed, 12 Jun 2019 12:44:52 +0200 Subject: [PATCH 3/8] nana cmake version 1.7.1 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1814e4fb..69e1de1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ # cmake 3.12 have more better modern c++ support cmake_minimum_required(VERSION 3.12 FATAL_ERROR) -project(nana VERSION 1.6.2 +project(nana VERSION 1.7.1 DESCRIPTION "C++ GUI library" HOMEPAGE_URL http://nanapro.org LANGUAGES CXX ) From 0233af0ba8372dcc6536ca4137b92a7166b7463c Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Wed, 12 Jun 2019 12:45:29 +0200 Subject: [PATCH 4/8] use vc2017 in CI --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 4305ba46..3689bdc6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ version: 1.0.{build} build: - project: build\vc2015\nana.sln + project: build\vc2017\nana.sln verbosity: minimal \ No newline at end of file From cea2f0138848732d6595d278383a70202a8db2f3 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Wed, 12 Jun 2019 13:27:14 +0200 Subject: [PATCH 5/8] Visual Studio 2017 ? --- appveyor.yml | 2 ++ build/cmake/install_nana.cmake | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 3689bdc6..ab87092f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,6 @@ version: 1.0.{build} +image: + - Visual Studio 2017 build: project: build\vc2017\nana.sln verbosity: minimal \ No newline at end of file diff --git a/build/cmake/install_nana.cmake b/build/cmake/install_nana.cmake index 4450e4f8..45636484 100644 --- a/build/cmake/install_nana.cmake +++ b/build/cmake/install_nana.cmake @@ -2,7 +2,7 @@ option(NANA_CMAKE_INSTALL "Install nana when compile the library (to be consumed # Install the include directories too. if(NANA_CMAKE_INSTALL) - # this is the prefered method to consume nana directly with some specific bulid system + # This is a method to consume nana with a bulid system not directly supported by nana. # Is your responsability to ensure all compiler options are compatible with the compilation # of the project linking to the nana lib here generated target_sources(nana PRIVATE ${HEADERS}) From 9a9399130b0409ba76740461a6c42478471014c6 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Wed, 12 Jun 2019 13:37:16 +0200 Subject: [PATCH 6/8] DNANA_CMAKE_INSTALL=OFF --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 20ef6e32..160e9abb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,7 +63,7 @@ before_script : - cd demo-build script: - - cmake -G"Unix Makefiles" ../nana-demo -DCMAKE_INSTALL_PREFIX=.. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON + - cmake -G"Unix Makefiles" ../nana-demo -DCMAKE_INSTALL_PREFIX=.. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON -DNANA_CMAKE_INSTALL=OFF - make install # todo: separate resources from sources (a directory for images) - ls From 4818da59a8a7bdc21ed11edfd9bd8ab831af1eb3 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Wed, 12 Jun 2019 13:37:49 +0200 Subject: [PATCH 7/8] use nana-demo develop --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 160e9abb..82604edf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,7 +44,7 @@ matrix: before_install: - cd .. - - git clone --depth=1 --branch=hotfix https://github.com/qPCR4vir/nana-demo.git nana-demo + - git clone --depth=1 --branch=develop https://github.com/qPCR4vir/nana-demo.git nana-demo - export PATH="$HOME/bin:$PATH" - wget --no-check-certificate --no-clobber -O /tmp/tools/cmake https://cmake.org/files/v3.12/cmake-3.12.0-rc3-Linux-x86_64.sh || true - chmod -R +x /tmp/tools From 6a46ec4f521b6d42fb80df32bc23506b6bfc0de5 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Wed, 12 Jun 2019 16:13:37 +0200 Subject: [PATCH 8/8] -static-libgcc ? --- build/cmake/shared_libs.cmake | 2 +- include/nana/gui/widgets/group.hpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build/cmake/shared_libs.cmake b/build/cmake/shared_libs.cmake index 104e252f..febb3b42 100644 --- a/build/cmake/shared_libs.cmake +++ b/build/cmake/shared_libs.cmake @@ -40,7 +40,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # AN if(BUILD_SHARED_LIBS) target_compile_options(nana PUBLIC -lgcc -lstdc++) else() - target_link_libraries(nana PUBLIC -static -static-libstdc++) + target_link_libraries(nana PUBLIC -static-libgcc -static-libstdc++) endif(BUILD_SHARED_LIBS) endif() \ No newline at end of file diff --git a/include/nana/gui/widgets/group.hpp b/include/nana/gui/widgets/group.hpp index 43dd5e85..139f7f15 100644 --- a/include/nana/gui/widgets/group.hpp +++ b/include/nana/gui/widgets/group.hpp @@ -100,6 +100,10 @@ namespace nana{ group& enable_format_caption(bool format); group& collocate() noexcept; + + /// this will set the `usr_div_str` for an internal field, called the "user field". + /// The "full" `place` of a `group` widget is internally divided into a field for the title, + /// a field for the added "options" and a field for "user" widgets. group& div(const char* div_str) noexcept; field_reference operator[](const char* field);