From d43b155b3ef34592b620b084f7394fb6fe227004 Mon Sep 17 00:00:00 2001 From: Talv Date: Fri, 26 Jul 2019 07:23:54 +0200 Subject: [PATCH] Windows related fixes --- CMakeLists.txt | 10 ++++++++++ include/common.hpp | 2 +- src/stormex.cc | 6 +++--- src/util.cc | 2 ++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e6ff5e5..7f2a71a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,16 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${STORMEXTRACT_BINARY_DIR}/bin") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${STORMEXTRACT_BINARY_DIR}/lib") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${STORMEXTRACT_BINARY_DIR}/bin") +set(default_build_type "RelWithDebInfo") +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to '${default_build_type}' as none was specified.") + set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE + STRING "Choose the type of build." FORCE) + # Set the possible values of build type for cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif() + set(CMAKE_CXX_FLAGS "-std=c++11") if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") diff --git a/include/common.hpp b/include/common.hpp index 4607c03..6bcf0a0 100644 --- a/include/common.hpp +++ b/include/common.hpp @@ -6,7 +6,7 @@ #include "mplog/ColorConsoleAppenderStderr.h" // #include "plog/Formatters/FuncMessageFormatter.h" -static const std::string stormexVersion = "2.0.0"; +static const std::string stormexVersion = "2.0.1"; static plog::ColorConsoleAppenderStdErr consoleAppender; // static plog::ColorConsoleAppender consoleAppender; diff --git a/src/stormex.cc b/src/stormex.cc index 596889d..ac87cb9 100644 --- a/src/stormex.cc +++ b/src/stormex.cc @@ -124,7 +124,7 @@ void parseArguments(int argc, char* argv[]) ("X,extract-file", "Extract file(s) matching exactly.", cxxopts::value>(appCtx.m_extract.xFilenames), "[FILE...]") - ("o,outdir", "Output directory for extracted files.", cxxopts::value(appCtx.m_extract.outDir)->default_value("./"), "[PATH]") + ("o,outdir", "Output directory for extracted files.", cxxopts::value(appCtx.m_extract.outDir)->default_value("."), "[PATH]") ("p,stdout", "Pipe content of a file(s) to stdout instead writing it to the filesystem.", cxxopts::value(appCtx.m_extract.stdOut)) ("P,progress", "Notify about progress during extraction.", cxxopts::value(appCtx.m_extract.progress)) ("n,dry-run", "Simulate extraction process without writing any data to the filesystem.", cxxopts::value(appCtx.m_extract.dryRun)); @@ -194,7 +194,7 @@ void extractFilenames(StorageExplorer& stExplorer, const std::vector #include +#include #include #include #include #include #include +#include #include "util.hpp" struct stat info;