Skip to content

Commit 5379a3d

Browse files
mwsissynesissoftware
authored andcommitted
Merged 'dev' into 'master'
Squashed commit of the following: commit a7f0cf2 Author: Matt Wilson <[email protected]> Date: Thu Oct 17 18:00:09 2024 +1100 Alpha6 (synesissoftware#35) * ~ settings * Significant enhancement and refactoring around use of CMake: ~ Compatibility with legacy versions of Visual C++; ~ Significant refactoring of ./CMakeLists.txt; + added **cmake/LanguageFullVersion.cmake** file, which defines CMake variable `X_CMAKE_CXX_FULLSTANDARD`; + added **cmake/TargetMacros.cmake** file, which defines CMake functions `define_automated_test_program()` and `define_example_program()`, and applied them throughout examples and test programs; * + added `XTESTS_TEST_MULTIBYTE_STRING_DOES_NOT_MATCH()` ; + added **test.component.shwild_patterns** * Merged 'more-clr' into 'alpha6' Squashed commit of the following: commit c9b05f6 Author: Matt Wilson <[email protected]> Date: Thu Oct 17 17:39:42 2024 +1100 Merged 'cmake-refac' into 'more-clr' Squashed commit of the following: commit eca2f76 Author: Matt Wilson <[email protected]> Date: Thu Oct 17 17:36:11 2024 +1100 + added `XTESTS_TEST_MULTIBYTE_STRING_DOES_NOT_MATCH()` ; + added **test.component.shwild_patterns** commit 04c2293 Author: Matt Wilson <[email protected]> Date: Thu Oct 17 15:59:21 2024 +1100 Significant enhancement and refactoring around use of CMake: ~ Compatibility with legacy versions of Visual C++; ~ Significant refactoring of ./CMakeLists.txt; + added **cmake/LanguageFullVersion.cmake** file, which defines CMake variable `X_CMAKE_CXX_FULLSTANDARD`; + added **cmake/TargetMacros.cmake** file, which defines CMake functions `define_automated_test_program()` and `define_example_program()`, and applied them throughout examples and test programs; commit 5d52e13 Author: Matt Wilson <[email protected]> Date: Thu Oct 17 14:53:49 2024 +1100 ~ settings . . . commit 22af4ca Author: Matt Wilson <[email protected]> Date: Thu Oct 17 17:26:37 2024 +1100 Merged 'cmake-refac' into 'more-clr' Squashed commit of the following: commit 04c2293 Author: Matt Wilson <[email protected]> Date: Thu Oct 17 15:59:21 2024 +1100 Significant enhancement and refactoring around use of CMake: ~ Compatibility with legacy versions of Visual C++; ~ Significant refactoring of ./CMakeLists.txt; + added **cmake/LanguageFullVersion.cmake** file, which defines CMake variable `X_CMAKE_CXX_FULLSTANDARD`; + added **cmake/TargetMacros.cmake** file, which defines CMake functions `define_automated_test_program()` and `define_example_program()`, and applied them throughout examples and test programs; commit 5d52e13 Author: Matt Wilson <[email protected]> Date: Thu Oct 17 14:53:49 2024 +1100 ~ settings . . . commit 3d371df Author: Matt Wilson <[email protected]> Date: Thu Oct 17 17:13:36 2024 +1100 Merged 'master' into 'more-clr' Squashed commit of the following: . . .
1 parent 1257e10 commit 5379a3d

22 files changed

+666
-121
lines changed

.gitignore

+55-10
Original file line numberDiff line numberDiff line change
@@ -8,57 +8,91 @@
88
/_internal/
99

1010
/bin/
11+
/lib/
12+
1113
/doc/
1214
/dox/
1315
/ideas/
1416
/releases/
17+
/scratch/
1518
/temp/
1619

20+
/include/b64/
21+
/include/shwild/
22+
/include/xcontract/
23+
/include/xcover/
24+
/include/xtests/
25+
26+
/src/b64/
27+
/src/shwild/
28+
/src/xcontract/
29+
/src/xcover/
30+
/src/xtests/
31+
32+
Debug Multithreaded DLL/
33+
Debug Multithreaded Dll/
34+
Debug Multithreaded/
1735
Debug/
36+
DebugDll/
37+
DebugMTDLL/
1838
DebugMt/
19-
Debug Multithreaded/
20-
Debug Multithreaded Dll/
2139
DebugNox/
40+
DebugUNIX/
2241
DebugUnix/
42+
Release Multithreaded DLL/
43+
Release Multithreaded Dll/
44+
Release Multithreaded/
2345
Release/
46+
ReleaseDll/
47+
ReleaseMTDLL/
2448
ReleaseMt/
25-
Release Multithreaded/
26-
Release Multithreaded Dll/
2749
ReleaseNox/
2850
ReleaseUnix/
29-
30-
/include/shwild/
31-
32-
/src/shwild/
51+
UDebug/
52+
UDebugMt/
53+
URelease/
54+
UReleaseMt/
55+
Unicode Debug Multithreaded Dll/
56+
Unicode Debug Multithreaded/
57+
Unicode Release Multithreaded Dll/
58+
Unicode Release Multithreaded/
3359

3460
Win32/
3561
ipch/
3662
x64/
3763

64+
3865
# directories (by pattern)
3966

4067
/include-*/
4168

69+
4270
# files (by name)
4371

4472
.DS_Store
4573
.ruby-version
4674
.update_deps
4775

4876
list_changes.cmd
77+
logging-bailout.txt
4978
prepare.cmd
5079
sh.exe.stackdump
80+
update_deps.cmd
5181

5282
build/makefile.tmpl
5383
build/makefile.tools.xml
84+
build/shwild.tmplgen
85+
include/stlsoft/dos2unix.has.been.performed
86+
include/stlsoft/internal/dos2unix.has.been.performed
87+
test/testpatterns.orj
5488

55-
# files (by pattern)
5689

57-
xtests-0.*-doc.chm
90+
# files (by pattern)
5891

5992
*~
6093
*.a
6194
*.app
95+
*.aps
6296
*.b64
6397
*.bak
6498
*.dll
@@ -67,6 +101,7 @@ xtests-0.*-doc.chm
67101
*.gch
68102
*.idb
69103
*.ilk
104+
*.ipch
70105
*.lib
71106
*.log
72107
*.ncb
@@ -90,5 +125,15 @@ xtests-0.*-doc.chm
90125
*.unsuccessfulbuild
91126
*.vcproj*.user
92127
*.vcxproj*.user
128+
*.xcuserstate
93129
*.zip
94130

131+
xtests-0.*-doc.chm
132+
133+
RCa0*
134+
RCb0*
135+
136+
build/*.tmplgen
137+
build/*.tmpl
138+
build/*.tools.xml
139+

CHANGES.txt

+35-1
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,45 @@ Updated: 14th July 2024
1616
************************************
1717

1818

19+
17th October 2024 - 0.24.0-alpha6
20+
=================================
21+
22+
Summary:
23+
--------
24+
25+
* Expanded shwild integration (including CMake detection);
26+
* Significant enhancement and refactoring around use of CMake;
27+
* Added coloured output for test-case / runner names;
28+
* General tidying;
29+
* Compatibility with legacy versions of Visual C++;
30+
31+
Changes:
32+
--------
33+
34+
Expanded shwild integration (including CMake detection):
35+
* detects **shwild** in CMakeLists.txt;
36+
* added `XTESTS_TEST_MULTIBYTE_STRING_DOES_NOT_MATCH()`;
37+
* added **test.component.shwild_patterns**;
38+
39+
Significant enhancement and refactoring around use of CMake:
40+
* added **cmake/LanguageFullVersion.cmake** file, which defines CMake variable `X_CMAKE_CXX_FULLSTANDARD`;
41+
* added **cmake/TargetMacros.cmake** file, which defines CMake functions `define_automated_test_program()` and `define_example_program()`, and applied them throughout examples and test programs;
42+
* Significant refactoring of ./CMakeLists.txt;
43+
* enhanced CMake build scripts in line with recent STLSoft-1.11 release;
44+
45+
General tidying:
46+
* portable suppression of fall-through warnings;
47+
* scratch-tests better header block descriptions;
48+
* enhancing test-case names;
49+
* code canonicalisation;
50+
51+
1952
15th October 2024 - 0.24.0-alpha5
2053
=================================
2154

22-
General:
55+
Summary:
2356
--------
57+
2458
* Refactored common aspects of example and test `main()` functions;
2559
* Language/compiler compatibility fixes, including **MinGW-W64** compatibility;
2660
* CMake build scripts enhancements;

CMakeLists.txt

+86-28
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Purpose: Top-level CMake lists file for xTests
66
#
77
# Created: 9th October 2019
8-
# Updated: 3rd August 2024
8+
# Updated: 17th October 2024
99
#
1010
# ######################################################################## #
1111

@@ -55,24 +55,56 @@ set(PROJECT_VERSION_MINOR ${_VERSION_MINOR})
5555
set(PROJECT_VERSION_PATCH ${_VERSION_PATCH})
5656
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
5757

58-
message(NOTICE "Generating CMake build scripts for ${PROJECT_NAME} ${PROJECT_VERSION}")
59-
6058

6159
# adhere strictly to C and C++ standards plus extensions. These are actually
6260
# useless since we do not compile anything; they merely state our intention.
63-
set(CMAKE_C_STANDARD 11)
61+
set(CMAKE_C_STANDARD 17)
6462
set(CMAKE_C_STANDARD_REQUIRED ON)
6563
set(CMAKE_C_EXTENSIONS ON) # GNU extensions and POSIX standard
66-
set(CMAKE_CXX_STANDARD 14)
64+
set(CMAKE_CXX_STANDARD 20)
6765
set(CMAKE_CXX_STANDARD_REQUIRED ON)
6866
set(CMAKE_CXX_EXTENSIONS ON)
6967

68+
if(MSVC)
69+
70+
if(MSVC_VERSION LESS 1930)
71+
72+
set(CMAKE_C_STANDARD 90)
73+
set(CMAKE_CXX_STANDARD 98)
74+
endif()
75+
endif(MSVC)
76+
7077

7178
# ##########################################################
72-
# dependencies
79+
# dependencies, includes, options
80+
81+
# ################################################
82+
# includes - 1
83+
84+
include(BuildType)
85+
include(LanguageFullVersion)
86+
include(TargetMacros)
87+
7388

7489
# ################################################
75-
# STLSoft
90+
# dependencies and options
91+
92+
option(BUILD_EXAMPLES "Build examples" ON)
93+
94+
option(BUILD_TESTING "Build tests" ON)
95+
96+
97+
# ######################################
98+
# dependencies
99+
#
100+
# required:
101+
# - STLSoft - required, both for implementation and interface;
102+
#
103+
# optional:
104+
# - shwild - for enhanced match constructs
105+
106+
# ############################
107+
# STLSoft (required)
76108
#
77109
# We provide flexibility here, as in:
78110
# 1. if a CMake variable STLSOFT is provided then it is used; otherwise
@@ -104,46 +136,68 @@ else()
104136
include_directories(${STLSOFT_INCLUDE_DIR})
105137
endif()
106138

139+
# ############################
140+
# shwild (optional)
107141

108-
# ##########################################################
109-
# install
142+
if(BUILD_TESTING)
110143

111-
# provides install directory variables as defined by the GNU Coding Standards.
112-
include(GNUInstallDirs)
144+
find_package(shwild QUIET)
113145

146+
if(shwild_FOUND)
114147

115-
# ##########################################################
116-
# build
148+
message("-- CMake package shwild found (version ${shwild_VERSION})")
117149

118-
# load/default `CMAKE_BUILD_TYPE`
119-
include(BuildType)
150+
add_compile_definitions(XTESTS_HAS_SHWILD)
151+
endif(shwild_FOUND)
152+
endif(BUILD_TESTING)
120153

121-
add_subdirectory(src)
122154

155+
# ################################################
156+
# includes - 2
123157

124-
# ##########################################################
125-
# test
158+
include(CMakePackageConfigHelpers)
159+
if(BUILD_TESTING)
126160

127-
include(CTest)
161+
include(CTest)
162+
endif(BUILD_TESTING)
163+
include(GNUInstallDirs)
128164

129-
if(BUILD_TESTING)
130165

131-
message("-- enabled building of tests ...")
166+
# ##########################################################
167+
# targets
132168

133-
add_subdirectory(test)
134-
endif()
169+
# ################################################
170+
# main library
135171

172+
add_subdirectory(src)
136173

137-
# ##########################################################
174+
175+
# ################################################
138176
# examples
139177

140-
option(BUILD_EXAMPLES "Build examples" ON)
141178
if(BUILD_EXAMPLES)
142179

143180
message("-- enabled building of examples ...")
144181

145182
add_subdirectory(examples)
146-
endif()
183+
else(BUILD_EXAMPLES)
184+
185+
message("-- disabled building of examples - define BUILD_EXAMPLES to enable")
186+
endif(BUILD_EXAMPLES)
187+
188+
189+
# ################################################
190+
# tests
191+
192+
if(BUILD_TESTING)
193+
194+
message("-- enabled building of tests ...")
195+
196+
add_subdirectory(test)
197+
else(BUILD_TESTING)
198+
199+
message("-- disabled building of tests - define BUILD_TESTING to enable")
200+
endif(BUILD_TESTING)
147201

148202

149203
# ##########################################################
@@ -153,8 +207,6 @@ endif()
153207
# ##########################################################
154208
# export
155209

156-
include(CMakePackageConfigHelpers)
157-
158210
set(EXPORT_NAME ${PROJECT_NAME_LOWER})
159211

160212
configure_package_config_file(
@@ -187,5 +239,11 @@ install( FILES
187239
)
188240

189241

242+
# ##########################################################
243+
# completion
244+
245+
message(NOTICE "Generating CMake build scripts for ${PROJECT_NAME} ${PROJECT_VERSION}, for C${CMAKE_C_STANDARD} C++${CMAKE_CXX_STANDARD}")
246+
247+
190248
# ############################## end of file ############################# #
191249

HISTORY.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
# xTests - History
22

33

4+
17th October 2024 - 0.24.0-alpha6
5+
---------------------------------
6+
7+
* Expanded shwild integration (including CMake detection);
8+
* Significant enhancement and refactoring around use of CMake;
9+
* Added coloured output for test-case / runner names;
10+
* General tidying;
11+
* Compatibility with legacy versions of Visual C++;
12+
13+
414
15th October 2024 - 0.24.0-alpha5
515
---------------------------------
616

7-
T.B.C.
17+
* Refactored common aspects of example and test `main()` functions;
18+
* Language/compiler compatibility fixes, including **MinGW-W64** compatibility;
19+
* CMake build scripts enhancements;
820

921

1022
5th August 2024 - 0.24.0-alpha4

NEWS.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
| Date | News Item |
44
| --------------------- | ------------------------------- |
5+
| 17th October 2024 | xTests 0.24.0-alpha6 released |
56
| 15th October 2024 | xTests 0.24.0-alpha5 released |
67
| 5th August 2024 | xTests 0.24.0-alpha4 released |
78
| 4th August 2024 | xTests 0.24.0-alpha3 released |

cmake/BuildType.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Purpose: CMake module file (for BuildType)
66
#
77
# Created: 16th October 2019
8-
# Updated: 5th May 2024
8+
# Updated: 17th October 2024
99
#
1010
# ######################################################################## #
1111

0 commit comments

Comments
 (0)