Menu

[8e467a]: / cmake / get_version.cmake  Maximize  Restore  History

Download this file

22 lines (13 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
file(READ ${CMAKE_SOURCE_DIR}/_ptw32.h _PTW32_H_CONTENTS)
string(REGEX MATCH "#define __PTW32_VERSION_MAJOR ([a-zA-Z0-9_]+)" PTW32_VERSION_MAJOR "${_PTW32_H_CONTENTS}")
string(REPLACE "#define __PTW32_VERSION_MAJOR " "" PTW32_VERSION_MAJOR "${PTW32_VERSION_MAJOR}")
string(REGEX MATCH "#define __PTW32_VERSION_MINOR ([a-zA-Z0-9_]+)" PTW32_VERSION_MINOR "${_PTW32_H_CONTENTS}")
string(REPLACE "#define __PTW32_VERSION_MINOR " "" PTW32_VERSION_MINOR "${PTW32_VERSION_MINOR}")
string(REGEX MATCH "#define __PTW32_VERSION_MICRO ([a-zA-Z0-9_]+)" PTW32_VERSION_MICRO "${_PTW32_H_CONTENTS}")
string(REPLACE "#define __PTW32_VERSION_MICRO " "" PTW32_VERSION_MICRO "${PTW32_VERSION_MICRO}")
string(REGEX MATCH "#define __PTW32_VERION_BUILD ([a-zA-Z0-9_]+)" PTW32_VERSION_BUILD "${_PTW32_H_CONTENTS}")
string(REPLACE "#define __PTW32_VERION_BUILD " "" PTW32_VERSION_BUILD "${PTW32_VERSION_BUILD}")
if(BUILD_NUMBER)
set(PTW32_VERSION_BUILD ${BUILD_NUMBER})
endif()
set(PTHREADS4W_VERSION ${PTW32_VERSION_MAJOR}.${PTW32_VERSION_MINOR}.${PTW32_VERSION_MICRO}.${PTW32_VERSION_BUILD})
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.