diff options
Diffstat (limited to 'bin/cmakehdf5')
-rwxr-xr-x | bin/cmakehdf5 | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5 index e8dc691..db7fd55 100755 --- a/bin/cmakehdf5 +++ b/bin/cmakehdf5 @@ -55,7 +55,10 @@ with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT=ON # enable zlib filter default on with_szlib=-DHDF5_ENABLE_SZIP_SUPPORT=OFF # enables szip filter default off szlib_path="" # szip lib path default off shared_lib=-DBUILD_SHARED_LIBS:BOOL=ON # enables shared lib; default on - +njobs="" # number of jobs (commands) to + # run simultaneously; default is + # value from $MAKE if defined, + # otherwise none (1) #============= # Function definitions @@ -90,13 +93,18 @@ Usage: $progname [<options>] enable or disable building tools. Default is on. --enable-testing | --disable-testing: enable or disable building tests. Default is on. - --with-zlib | --without-zlib: + --with-zlib | --with-zlib=<libpath> | --without-zlib: Use zlib library for external deflate I/O filter. Default is on. --with-szlib | --with-szlib=<libpath> | --without-szlib: Use szlib library for external deflate I/O filter. Default is on. + --njobs=<-j N>: + number of jobs (commands) to run simultaneously; default is value from + $MAKE if defined, otherwise none --enable-verbose | --disable-verbose: enable or disable verbose output. Default is on. --help: shows details help page + + <libpath>: the file path to the library, expect <libpath>/lib and <libpath>/include. EOF } @@ -188,6 +196,12 @@ DUMP_LOGFILE() # Show a start time stamp TIMESTAMP +# Initialize njobs if $AMKE is defined +if [ -n "$MAKE" ]; then + # assume all arguments are for --jobs + njobs=`echo $MAKE | cut -s -d' ' -f2-` +fi + # Parse Cmake configure options # --enable-XXX or --disable-XXX will enable or disable feature XXX. # XXX can be: @@ -243,6 +257,10 @@ while [ $# -gt 0 ]; do --with-zlib) with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON ;; + --with-zlib=*) + xarg=`echo $1 | cut -d= -f2-` + with_zlib="-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON -DZLIB_ROOT=$xarg" + ;; --without-zlib) with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF ;; @@ -259,6 +277,9 @@ while [ $# -gt 0 ]; do with_szlib=-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF szlib_path="" # reset the path ;; + --njobs=*) + njobs=`echo $1 | cut -d= -f2-` + ;; --enable-verbose) vflag=1 ;; @@ -326,10 +347,10 @@ STEP "Configure..." \ cat $config_summary >> $configlog # 5. Build the C library, tools and tests with this command: -STEP "Build the library, tools and tests, ..." "cmake --build . --config Release" $makelog +STEP "Build the library, tools and tests, ..." "cmake --build . --config Release -- $njobs" $makelog # 6. Test the C library and tools with this command: -STEP "Test the library and tools..." "ctest . -C Release" $testlog +STEP "Test the library and tools..." "ctest . -C Release $njobs" $testlog # 7. Create an install image with this command: STEP "Create an install image..." "cpack -C Release CPackConfig.cmake" $packlog |