https://bugs.kde.org/show_bug.cgi?id=524877
Bug ID: 524877
Summary: clazy 1.17.1 reports version number 1.17
Classification: Developer tools
Product: clazy
Version First unspecified
Reported In:
Platform: RedHat Enterprise Linux
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
DESCRIPTION
When compiling clazy 1.17.1 with CMake/Ninja from the command line under RHEL10
the resulting binary reports "1.17" as its version number. I would have
expected "1.17.1".
STEPS TO REPRODUCE
1. Download clazy 1.17.1 source from GitHub
2. Compile with CMake/Ninja
3. Run "clazy-standalone --version"
OBSERVED RESULT
clazy version 1.17
LLVM (http://llvm.org/):
LLVM version 23.1.0
Optimized build.
EXPECTED RESULT
"1.17.1" instead of "1.17"
ADDITIONAL INFORMATION
We use the output of clazy to verify that everything is in order. So initially
we were concerned that we have done something wrong because the version number
did not match. After digging into the code it is obvious why clazy writes 1.17
on the console but the question remains if this is the result users expect.
Why it happens:
In CMakeLists.txt CLAZY_VERSION is set to 1.17.1 and CLAZY_PRINT_VERSION to
1.17.
The C++ compiler define CLAZY_VERSION uses the CMake variable
CLAZY_PRINT_VERSION, not CLAZY_VERSION.
Finally the C++ code uses std::cout to print the define CLAZY_VERSION .
CMakeLists.txt:
set(CLAZY_VERSION
"${CLAZY_VERSION_MAJOR}.${CLAZY_VERSION_MINOR}.${CLAZY_VERSION_PATCH}")
set(CLAZY_PRINT_VERSION "${CLAZY_VERSION_MAJOR}.${CLAZY_VERSION_MINOR}")
...
add_definitions(-DCLAZY_VERSION="${CLAZY_PRINT_VERSION}")
src/ClazyStandaloneMain.cpp:
std::cout << "clazy version " << CLAZY_VERSION << "\n";
--
You are receiving this mail because:
You are watching all bug changes.