Skip to content

Commit 9c0a0b8

Browse files
committed
Merge remote-tracking branch 'jwinarske/cmake' into mingw
2 parents 601e7bf + 9b15e93 commit 9c0a0b8

File tree

15 files changed

+66
-1511
lines changed

15 files changed

+66
-1511
lines changed

.gitignore

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
*.un~
2-
*~
3-
*.obj
4-
*.dll.manifest
5-
*.dll
6-
*.exe.manifest
7-
*.exe
8-
*.lib
9-
*.pdb
10-
*.ilk
11-
*.exp
12-
config.log
13-
config.h.in
14-
config.status
15-
configure
16-
version.res
17-
tests/*.pass
18-
tests/*.bench
19-
tests/pthread.h
20-
tests/sched.h
21-
tests/semaphore.h
22-
tests/benchlib.o
23-
tests/SIZES.*
24-
tests/*.log
25-
/.project
26-
build
27-
cmake-build
28-
autom4te.cache
29-
PTHREADS-BUILT
30-
.vscode
31-
GNUmakefile
32-
tests/GNUmakefile
1+
*.un~
2+
*~
3+
*.obj
4+
*.dll.manifest
5+
*.dll
6+
*.exe.manifest
7+
*.exe
8+
*.lib
9+
*.pdb
10+
*.ilk
11+
*.exp
12+
config.log
13+
config.h.in
14+
config.status
15+
configure
16+
version.res
17+
tests/*.pass
18+
tests/*.bench
19+
tests/pthread.h
20+
tests/sched.h
21+
tests/semaphore.h
22+
tests/benchlib.o
23+
tests/SIZES.*
24+
tests/*.log
25+
/.project
26+
build
27+
cmake-build
28+
autom4te.cache
29+
PTHREADS-BUILT
30+
.vscode
31+
GNUmakefile
32+
tests/GNUmakefile

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
cmake_minimum_required(VERSION 3.14)
22

3+
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
4+
set(CMAKE_BUILD_TYPE "MinSizeRel" CACHE STRING "Choose the type of build, options are: Debug, Release, or MinSizeRel." FORCE)
5+
message(STATUS "No build type specified, defaulting to MinSizeRel.")
6+
endif()
7+
38
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/cmake")
49

510
include (CheckIncludeFile)

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2019-11-03 Ross Johnson <ross dot johnson at homemail dot com dot au>
2+
3+
* NOTICE: Remove third party code acknowledgments because files have been
4+
removed from distro.
5+
16
2018-08-19 Ross Johnson <ross dot johnson at homemail dot com dot au>
27

38
* context.h (__PTW32_PROCPTR): Added missing '__' prefix for v3.

NOTICE

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,4 @@ Copyright 1999-2018, Pthreads4w contributors
44

55
This product includes software developed through the colaborative
66
effort of several individuals, each of whom is listed in the file
7-
CONTRIBUTORS included with this software.
8-
9-
The following files are not covered under the Copyrights
10-
listed above:
11-
12-
[1] tests/rwlock7.c
13-
[1] tests/rwlock7_1.c
14-
[1] tests/rwlock8.c
15-
[1] tests/rwlock8_1.c
16-
[2] tests/threestage.c
17-
18-
[1] The file tests/rwlock7.c and those similarly named are derived from
19-
code written by Dave Butenhof for his book 'Programming With POSIX(R)
20-
Threads'. The original code was obtained by free download from his
21-
website http://home.earthlink.net/~anneart/family/Threads/source.html
22-
23-
[2] The file tests/threestage.c is taken directly from examples in the
24-
book "Windows System Programming, Edition 4" by Johnson (John) Hart
25-
Session 6, Chapter 10. ThreeStage.c
26-
Several required additional header and source files from the
27-
book examples have been included inline to simplify compilation.
28-
The only modification to the code has been to provide default
29-
values when run without arguments.
7+
CONTRIBUTORS included with this software.

_ptw32.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
*/
4444
#define __PTW32_VERSION_MAJOR 3
4545
#define __PTW32_VERSION_MINOR 0
46-
#define __PTW32_VERSION_MICRO 1
46+
#define __PTW32_VERSION_MICRO 2
4747
#define __PTW32_VERION_BUILD 0
48-
#define __PTW32_VERSION 3,0,0,1
49-
#define __PTW32_VERSION_STRING "3, 0, 1, 0\0"
48+
#define __PTW32_VERSION 3,0,2,0
49+
#define __PTW32_VERSION_STRING "3, 0, 2, 0\0"
5050

5151
#if defined(__GNUC__)
5252
# pragma GCC system_header

cmake/target_arch.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11

22
set(TARGET_ARCH_DETECT_CODE "
3-
43
#if defined(_M_ARM)
54
# error cmake_arch ARM
65
#elif defined(_M_ARM64)

tests/CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ string(REPLACE "-DNDEBUG" "-UNDEBUG" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEA
1414

1515
message(STATUS "Test destination prefix: ${TESTPREFIX}")
1616

17-
function(add_testcase test type def)
18-
17+
macro(add_testcase test type def)
1918
set(lib_test test-${test}${type}${PTW32_VER})
2019
set(dll_test test-dll-${test}${type}${PTW32_VER})
2120

@@ -39,10 +38,10 @@ function(add_testcase test type def)
3938
add_executable(${lib_test} ${test}.c ${c_dep})
4039
target_link_libraries(${lib_test} ${lib_lib} ${XXLIBS})
4140
if(MSVC)
42-
target_compile_options(${lib_test} PRIVATE "/nologo")
41+
target_compile_options(${lib_test} PUBLIC "/nologo")
4342
endif()
44-
target_compile_definitions(${lib_test} PRIVATE _CONSOLE _MBCS ${def})
45-
target_compile_options(${lib_test} PRIVATE ${extra})
43+
target_compile_definitions(${lib_test} PUBLIC _CONSOLE _MBCS ${def})
44+
target_compile_options(${lib_test} PUBLIC ${extra})
4645
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
4746
# GNUmakefile compiles every test as C++:
4847
target_compile_definitions(${lib_test} PRIVATE __PtW32NoCatchWarn)
@@ -59,7 +58,7 @@ function(add_testcase test type def)
5958
add_executable(${dll_test} ${test}.c ${c_dep})
6059
target_link_libraries(${dll_test} ${dll_lib} ${XXLIBS})
6160
if(MSVC)
62-
target_compile_options(${dll_test} PRIVATE "/nologo")
61+
target_compile_options(${dll_test} PUBLIC "/nologo")
6362
endif()
6463
target_compile_definitions(${dll_test} PRIVATE _CONSOLE _MBCS ${def})
6564
target_compile_options(${dll_test} PRIVATE ${extra})
@@ -103,7 +102,7 @@ function(add_testcase test type def)
103102
add_test(NAME ${lib_test} COMMAND ${lib_test})
104103
add_test(NAME ${dll_test} COMMAND ${dll_test})
105104

106-
endfunction()
105+
endmacro()
107106

108107

109108
file(GLOB TESTS *.c)

tests/ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2018-08-19 Ross Johnson <ross dot johnson at homemail dot com dot au>
2+
3+
* threestage.c: Delete.
4+
* rwlock7.c: Delete.
5+
* rwlock8.c: Delete.
6+
* rwlock7_1.c: Delete.
7+
* rwlock8_1.c: Delete.
8+
19
2018-08-10 Ross Johnson <ross dot johnson at homemail dot com dot au>
210

311
* Makefile (clean): remove *.idb files.

tests/common.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ALL_KNOWN_TESTS = \
4040
robust1 robust2 robust3 robust4 robust5 \
4141
rwlock1 rwlock2 rwlock3 rwlock4 \
4242
rwlock2_t rwlock3_t rwlock4_t rwlock5_t rwlock6_t rwlock6_t2 \
43-
rwlock5 rwlock6 rwlock7 rwlock7_1 rwlock8 rwlock8_1 \
43+
rwlock5 rwlock6 \
4444
self1 self2 \
4545
semaphore1 semaphore2 semaphore3 \
4646
semaphore4 semaphore4t semaphore5 \

tests/runorder.mk

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ once3.pass: once2.pass
113113
once4.pass: once3.pass
114114
priority1.pass: join1.pass
115115
priority2.pass: priority1.pass barrier3.pass
116-
reinit1.pass: rwlock7.pass
116+
reinit1.pass: rwlock6.pass
117117
reuse1.pass: create3.pass
118118
reuse2.pass: reuse1.pass
119119
robust1.pass: mutex8r.pass
@@ -127,13 +127,11 @@ rwlock3.pass: rwlock2.pass join2.pass
127127
rwlock4.pass: rwlock3.pass
128128
rwlock5.pass: rwlock4.pass
129129
rwlock6.pass: rwlock5.pass
130-
rwlock7.pass: rwlock6.pass
131-
rwlock8.pass: rwlock7.pass
132130
rwlock2_t.pass: rwlock2.pass
133-
rwlock3_t.pass: rwlock2_t.pass
134-
rwlock4_t.pass: rwlock3_t.pass
135-
rwlock5_t.pass: rwlock4_t.pass
136-
rwlock6_t.pass: rwlock5_t.pass
131+
rwlock3_t.pass: rwlock3.pass rwlock2_t.pass
132+
rwlock4_t.pass: rwlock4.pass rwlock3_t.pass
133+
rwlock5_t.pass: rwlock5.pass rwlock4_t.pass
134+
rwlock6_t.pass: rwlock6.pass rwlock5_t.pass
137135
rwlock6_t2.pass: rwlock6_t.pass
138136
self1.pass: sizes.pass
139137
self2.pass: self1.pass equal1.pass create1.pass

0 commit comments

Comments
 (0)