Skip to content

Commit e9fb45d

Browse files
committed
Run tests for MS VC++ add Cmake settings etc
1 parent 310dc9d commit e9fb45d

15 files changed

+266
-385
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/deps
55
CBuild/
66
.vs/
7+
vcpkg_installed/
78
CMakeCache.txt
89
cmake_install.cmake
910
CMakeFiles/

CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
22

33
project(Solution_IO CXX)
44

5-
65
# set type of OCCT libraries
76
if (NOT BUILD_LIBRARY_TYPE)
87
set (BUILD_LIBRARY_TYPE "Shared" CACHE STRING "${BUILD_LIBRARY_TYPE_DESCR}" FORCE)

CMakePresets.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"version": 3,
3+
"configurePresets": [
4+
{
5+
"name": "release",
6+
"toolchainFile": "$env{VCPKG_ROOT}\\scripts\\buildsystems\\vcpkg.cmake"
7+
}
8+
]
9+
}

CMakeSettings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"inheritEnvironments": [ "msvc_x64_x64" ],
77
"buildRoot": "${projectDir}\\CBuild\\build\\${name}",
88
"installRoot": "${projectDir}\\CBuild\\install\\${name}",
9-
"cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=./deps/msvc -DCMAKE_BUILD_TYPE=Debug -DBUILD_LIBRARY_TYPE=Static",
9+
"cmakeCommandArgs": "-A x64 -DCMAKE_BUILD_TYPE=Debug -DBUILD_LIBRARY_TYPE=Static -DBUILD_TESTING=ON",
1010
"buildCommandArgs": "",
1111
"ctestCommandArgs": "",
1212
"generator": "Visual Studio 17 2022 Win64",
@@ -17,7 +17,7 @@
1717
"configurationType": "RelWithDebInfo",
1818
"buildRoot": "${projectDir}\\CBuild\\build\\${name}",
1919
"installRoot": "${projectDir}\\CBuild\\install\\${name}",
20-
"cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=./deps/msvc -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRARY_TYPE=Shared",
20+
"cmakeCommandArgs": "-A x64 -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRARY_TYPE=Shared",
2121
"buildCommandArgs": "",
2222
"ctestCommandArgs": "",
2323
"generator": "Visual Studio 17 2022 Win64",

README.md

+37-27
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ This branch in active development and not stabile
99
## Road map by the priority
1010

1111
### Version 1.0.0:
12-
1. Updates for C++ 20 standard, backward compatibility for C++11 for release 1.0
12+
1. Updates for C++ 20 standard, backward compatibility for C++11 for release 1.0
1313
2. Simplify some APIs and implemations i.e. console, network, etc lecal casting for work with text data formats
1414
3. Test over Google Test and cmake/ctest
1515
4. Make files must be obsolite and removed complitelly, Cmake build only
1616
5. Gith hub actions CI instead of Travis
17-
6. Asynchronous IO for network with TLS security support
17+
6. Asynchronous IO for network with TLS security support
1818
7. HTTP client, use (preffered) libnghttp2 or create own libnghttp2 like implementaton, need proff of concept
1919
8. Fix character set detection lib for full fertured, need proff of concept
20-
9 Tutorial over the examples
21-
22-
### Deep backlog i.e. for version 1.0.1 etc:
20+
9 Tutorial over the examples
21+
22+
### Deep backlog i.e. for version 1.0.1 etc:
2323
* YAML data format streaming API
2424
* Named pipes sources
2525
* Support for clang compiller
26-
* Support for FreeBSD, Mac OS X Android and iOS
26+
* Support for FreeBSD, Mac OS X Android and iOS
2727
* JSON data format sreaming like Boost JSON
2828
* ASN 1.0 data format streaming
2929
* BSON data format streaming
3030
* Extend COLLADA demo viewer with glTF add pathes support with geometry/calc shaders
3131
* Support for Intel compiller
32-
32+
3333
IO is modern C++ (std 11 +) library for general propose input/output library read and write binary and textual common data formats
3434

3535
## LIBRARY FEATURES
@@ -118,24 +118,25 @@ Tested implementations:
118118

119119
- [GNU TLS v 3.0+](https://www.gnutls.org/)
120120
#### UNIX
121-
Most Unix distributions have an implementation, use your package manager to install development package
122-
i.e.
123-
Debian based i.e. Debian/Ubuntu/Lint etc.
124-
```bash
125-
sudo apt-get install -y gnutls-dev
126-
```
127-
RPM based Fedora,RHEL,CentOS, Mandriva etc.
128-
```bash
129-
sudo dnf install gnutls-devel
130-
```
131-
Pacman based Arch Linux, Chakra etc.
132-
```bash
133-
pacman -S libgnutls-devel
134-
```
121+
Most Unix distributions have an implementation, use your package manager to install development package
122+
i.e.
123+
Debian based i.e. Debian/Ubuntu/Lint etc.
124+
```bash
125+
sudo apt-get install -y gnutls-dev
126+
```
127+
RPM based Fedora,RHEL,CentOS, Mandriva etc.
128+
```bash
129+
sudo dnf install gnutls-devel
130+
```
131+
Pacman based Arch Linux, Chakra etc.
132+
```bash
133+
pacman -S libgnutls-devel
134+
```
135135

136136
#### Windows
137137
Compiler | instruction
138-
MSYS2 | install developement package i.e. `pacman -S mingw-w64-x86_64-gnutls` or `pacman -S mingw-w64-ucrt-x86_64-gnutls` for universal CRT (preffered)
138+
MSYS2 GCC | install developement package i.e. `pacman -S mingw-w64-x86_64-libiconv mingw-w64-x86_64-gnutls mingw-w64-x86_64-gtest` or `pacman -S mingw-w64-ucrt-x86_64-libiconv mingw-w64-ucrt-x86_64-gnutls mingw-w64-ucrt-x86_64-gtest` for universal CRT (preffered)
139+
MSYS2 Clang | install developement package i.e. `pacman -S mingw-w64-clang-x86_64-libiconv mingw-w64-clang-x86_64-gnutls mingw-w64-clang-x86_64-gtest`
139140
MS Visual C++ | Download release ShiftMediaProject builds [iconv](https://github.com/ShiftMediaProject/libiconv/tags) and [gnutls](https://github.com/ShiftMediaProject/gnutls/tags). Extract arhives to deps/msvc folder source code root subfolder
140141

141142
- [Goole Test](https://github.com/google/googletest)
@@ -150,9 +151,12 @@ OS | Compiler | Version | Arhitecture
150151
--- | --- | --- | ---
151152
**Windows** | | |
152153
Windows 10 | GCC/G++ | 12.1.0 MinGW64 (MSYS2 build) | [x86_64 | UCRT64]
153-
Windows 10 | MS Visual C++ | 22 | x64
154+
Windows 10 | GCC/G++ | 13.0.1 MinGW64 (MSYS2 build) | [x86_64 | UCRT64]
155+
Windows 10 | Clang | 16.0.5-3 | [x64]
156+
Windows 10 | MS Visual C++ | 22 | [x64]
154157
**GNU/Lunux** | | |
155158
Fedora 36 | GCC/G++ | 12.1.0 | x86_64
159+
Ubuntu 22 | GCC/G++ | 13.0.1 | x86_64
156160

157161
## BUILDING
158162

@@ -162,7 +166,7 @@ To build with CMake build tool to can use following command
162166
You can build shared or static library release or debug version, optionally you can on or off exceptions and rtti.
163167

164168
```bash
165-
cmake -S . -B CBuild -DCMAKE_BUILD_TYPE=<Release|Debug> -DBUILD_LIBRARY_TYPE=<Shared|Static> [-DNO_EXCEPTIONS=ON] [-DNO_RTTI=ON] [-DRUN_TESTS=ON]
169+
cmake -S . -B CBuild -DCMAKE_BUILD_TYPE=<Release|Debug> -DBUILD_LIBRARY_TYPE=<Shared|Static> [-DNO_EXCEPTIONS=ON] [-DNO_RTTI=ON] [-DBUILD_TESTING=ON]
166170
cmake --build CBuild
167171
```
168172

@@ -175,13 +179,19 @@ Build result can be found at _CBuild/<arh(x86,x64)>/<Release|Debug>/lib_ sub-fol
175179

176180
When you whant to build with MS VC++ solution as the Cmake output and d'like to build from command line e.g. the CI/CD build
177181
```bash
178-
cmake -S . -B CBuild -G "Visual Studio 17 2022" -A <x86|x64> -DCMAKE_BUILD_TYPE=<Release|Debug> -DBUILD_LIBRARY_TYPE=<Shared|Static> [-DNO_EXCEPTIONS=ON] [-DNO_RTTI=ON] [-DRUN_TESTS=ON]
182+
cmake -S . -B CBuild -G "Visual Studio 17 2022" -A <x86|x64> -DCMAKE_BUILD_TYPE=<Release|Debug> -DBUILD_LIBRARY_TYPE=<Shared|Static> [-DNO_EXCEPTIONS=ON] [-DNO_RTTI=ON] [-DBUILD_TESTING=ON]
179183
```
180-
you can open Power Shell for visual studio or run vcvars64.bat from console, cd to CBuild directory
184+
185+
you can open Power Shell for visual studio or run [vcvars64.bat](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170) from console, cd to CBuild directory
181186
and then use MSBuild instead of `cmake --build .` like:
182187
```bash
183-
MSBuild io.sln /p:Configuration=Release
188+
MSBuild Solution_IO.sln]\io.sln /p:Configuration=Release
189+
```
190+
191+
```PowerShell
192+
cmake -S . -B CBuild -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRARY_TYPE=Shared -DBUILD_TESTING=ON --preset release"
184193
```
194+
185195
Otherwise simply build solution with IDE.
186196

187197
##IDE

examples/chconv/chconv.cbp

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<Linker>
2626
<Add library="io" />
2727
<Add library="iconv.dll" />
28-
<Add directory="../../bin/debug-win-gcc-static-x64" />
28+
<Add directory="../../libio/bin/debug-win-gcc-static-x64" />
2929
</Linker>
3030
</Target>
3131
<Target title="release-win-gcc-x64">

0 commit comments

Comments
 (0)