Merge branch 'master' into gui
authorMilian Wolff <mail@milianw.de>
Mon, 18 May 2015 15:59:22 +0000 (17:59 +0200)
committerMilian Wolff <mail@milianw.de>
Mon, 18 May 2015 15:59:22 +0000 (17:59 +0200)
1  2 
CMakeLists.txt
heaptrack_print.cpp

diff --cc CMakeLists.txt
@@@ -1,14 -1,12 +1,16 @@@
  cmake_minimum_required(VERSION 2.8.9)
  project(heaptrack)
  
+ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wpedantic")
  
- find_package(Boost 1.45.0 REQUIRED COMPONENTS iostreams program_options)
+ find_package(Boost 1.41.0 REQUIRED COMPONENTS iostreams program_options)
  find_package(Threads REQUIRED)
 +find_package(Qt5 NO_MODULE QUIET OPTIONAL_COMPONENTS Widgets)
 +if(Qt5_FOUND)
 +    add_subdirectory(gui)
 +endif()
  
  add_subdirectory(3rdparty)
  
@@@ -366,7 -891,15 +366,15 @@@ int main(int argc, char** argv
          return 1;
      }
  
 -    AccumulatedTraceData data;
+     if (!vm.count("file")) {
+         // NOTE: stay backwards compatible to old boost 1.41 available in RHEL 6
+         //       otherwise, we could simplify this by setting the file option
+         //       as ->required() using the new 1.42 boost API
+         cerr << "ERROR: the option '--file' is required but missing\n\n" << desc << endl;
+         return 1;
+     }
 +    Printer data;
  
      const auto inputFile = vm["file"].as<string>();
      data.shortenTemplates = vm["shorten-templates"].as<bool>();