Skip to content

Commit 0cd5ed7

Browse files
authored
Merge pull request #1588 from Idclip/vdb_ax_bugfix
Fixed incorrect optimization level default in vdb_ax
2 parents c332f81 + a583c32 commit 0cd5ed7

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed

cmake/FindBlosc.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,12 @@ list(APPEND _BLOSC_LIBRARYDIR_SEARCH_DIRS
191191
# Library suffix handling
192192

193193
set(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
194+
set(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES})
194195

195196
if(MSVC)
196197
if(BLOSC_USE_STATIC_LIBS)
197198
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
199+
set(CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES};lib")
198200
endif()
199201
else()
200202
if(BLOSC_USE_STATIC_LIBS)
@@ -247,7 +249,9 @@ endforeach()
247249
# Reset library suffix
248250

249251
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
252+
set(CMAKE_FIND_LIBRARY_PREFIXES ${_BLOSC_ORIG_CMAKE_FIND_LIBRARY_PREFIXES})
250253
unset(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
254+
unset(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_PREFIXES)
251255

252256
if(Blosc_LIBRARY_DEBUG AND Blosc_LIBRARY_RELEASE)
253257
# if the generator is multi-config or if CMAKE_BUILD_TYPE is set for

openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
usage: vdb_ax [command] [--help|-h] [-v] [<args>]
22

33
CLI utility for processing OpenVDB data using AX.
4-
-h, --help, -help print help and exit
4+
Available [command] modes are: [execute|analyze|functions] (Default: execute).
5+
-h, --help, -help print help and exit (use [command] --help for more information)
56
-v, --verbose verbose (print timing and diagnostics)
67

78
[execute] read/process/write VDB file/streams (default command):

openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_3

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ FATAL: "--invalid-option" is not a valid option
22
usage: vdb_ax [command] [--help|-h] [-v] [<args>]
33

44
CLI utility for processing OpenVDB data using AX.
5-
-h, --help, -help print help and exit
5+
Available [command] modes are: [execute|analyze|functions] (Default: execute).
6+
-h, --help, -help print help and exit (use [command] --help for more information)
67
-v, --verbose verbose (print timing and diagnostics)
78

89
[execute] read/process/write VDB file/streams (default command):

openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_pass_1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
usage: vdb_ax [command] [--help|-h] [-v] [<args>]
22

33
CLI utility for processing OpenVDB data using AX.
4-
-h, --help, -help print help and exit
4+
Available [command] modes are: [execute|analyze|functions] (Default: execute).
5+
-h, --help, -help print help and exit (use [command] --help for more information)
56
-v, --verbose verbose (print timing and diagnostics)
67

78
[execute] read/process/write VDB file/streams (default command):

openvdb_cmd/vdb_ax/main.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ struct ProgOptions
224224
.addOpt("-h")
225225
.addOpt("--help")
226226
.addOpt("-help")
227-
.setDoc("print help and exit. [command] -h prints extra information.")
227+
.setDoc("print help and exit (use [command] --help for more information).")
228228
.get();
229229

230230
// Execute options
@@ -287,6 +287,7 @@ struct ProgOptions
287287
fatal("invalid option given for --opt level");
288288
}
289289
})
290+
.setDefault(openvdb::ax::CompilerOptions::OptLevel::O3)
290291
.get();
291292

292293
openvdb::ax::cli::Param<size_t> mThreads =
@@ -463,7 +464,8 @@ void shortManPage [[noreturn]] (const ProgOptions& opts, int exitStatus = EXIT_F
463464
std::cerr <<
464465
"usage: " << gProgName << " [command] [--help|-h] [-v] [<args>]\n" <<
465466
'\n' <<
466-
"CLI utility for processing OpenVDB data using AX.\n";
467+
"CLI utility for processing OpenVDB data using AX.\n" <<
468+
"Available [command] modes are: [execute|analyze|functions] (Default: execute).\n";
467469
openvdb::ax::cli::usage(std::cerr, opts.mHelp.opts(), opts.mHelp.doc(), false);
468470
openvdb::ax::cli::usage(std::cerr, opts.mVerbose.opts(), opts.mVerbose.doc(), false);
469471
std::cerr << '\n';

pendingchanges/vdb_ax.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
AX:
2+
- Bug Fix:
3+
Fixed an incorrect option in the `vdb_ax` command line tool where the default
4+
optimization level was set to NONE instead of O3 (issue introduced in 10.0.0).

0 commit comments

Comments
 (0)