Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
partons
core
numa
Commits
b3040cac
Commit
b3040cac
authored
Jul 20, 2021
by
Pawel Sznajder
Browse files
update version and improve CMake.file
parent
bd27f8c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
b3040cac
...
...
@@ -22,14 +22,21 @@ file(READ ${CMAKE_SOURCE_DIR}/data/version.txt VERSION_STR)
# strip spaces
string
(
STRIP
${
VERSION_STR
}
VERSION_STR
)
# get major and minor versions
string
(
REGEX REPLACE
"
\\
.[0-9]*"
""
NUMA_VERSION_MAJOR
${
VERSION_STR
}
)
string
(
REGEX REPLACE
"[0-9]*
\\
."
""
NUMA_VERSION_MINOR
${
VERSION_STR
}
)
# get major, minor and patch versions
string
(
REGEX MATCH
"^[0-9]*
\\
."
TMP_STR
${
VERSION_STR
}
)
string
(
REGEX REPLACE
"
\\
."
""
NUMA_VERSION_MAJOR
${
TMP_STR
}
)
string
(
REGEX MATCH
"
\\
.[0-9]*
\\
."
TMP_STR
${
VERSION_STR
}
)
string
(
REGEX REPLACE
"
\\
."
""
NUMA_VERSION_MINOR
${
TMP_STR
}
)
string
(
REGEX MATCH
"
\\
.[0-9]*$"
TMP_STR
${
VERSION_STR
}
)
string
(
REGEX REPLACE
"
\\
."
""
NUMA_VERSION_PATCH
${
TMP_STR
}
)
message
(
"-- NumA++ version is: "
${
NUMA_VERSION_MAJOR
}
"."
${
NUMA_VERSION_MINOR
}
"."
${
NUMA_VERSION_PATCH
}
)
# configure
configure_file
(
${
CMAKE_SOURCE_DIR
}
/cmake/Version/NumAVersion.h_in
${
CMAKE_SOURCE_DIR
}
/include/NumA/NumAVersion.h
)
# AUTOMOC ==================================================================================
# tell cmake to run Qt moc when necessary
...
...
@@ -40,9 +47,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
# FIND LIBRARIES ===========================================================================
# find libraries: Qt
find_package
(
Qt5 COMPONENTS Core
)
# find libraries: additional modules
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
"
${
CMAKE_SOURCE_DIR
}
/cmake/Modules/"
)
...
...
data/version.txt
View file @
b3040cac
2.0
\ No newline at end of file
3.0.0
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment