These are chat archives for HdrHistogram/HdrHistogram

12th
Aug 2015
Alec
@ahothan
Aug 12 2015 00:10

@mikeb01: I am running into issues building HdrHistogram_c on Ubuntu 14_04 when I use the distro CMake which is version 2.8:
localadmin@GG27-16:~/HdrHistogram_c$ cmake .
CMake Error at CMakeLists.txt:2 (cmake_policy):
Policy "CMP0042" is not known to this version of CMake.

-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Configuring incomplete, errors occurred!
See also "/home/localadmin/HdrHistogram_c/CMakeFiles/CMakeOutput.log".
localadmin@GG27-16:~/HdrHistogram_c$

This is caused by the second line in CMakeLists.txt:
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0042 NEW)
If I remove it the cmake build passes. Looks like this option is only available starting CMake 3.0

Alec
@ahothan
Aug 12 2015 00:24
WIth CMake 3.X it builds fine without changes
Michael Barker
@mikeb01
Aug 12 2015 01:01
Okay, thanks. Feel free to raise an issue on Github. I'll be doing some hacking on it later tonight.
Alec
@ahothan
Aug 12 2015 04:38

@mikeb01 was about to log a bug but saw your commit, looks like the version check should be against 3 and not 2.6?
I tried with the latest commit and it fails the same (my cmake is 2.8)
Changing the version to 3 works:
localadmin@GG27-16:~/HdrHistogram_c$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8f41cc2..9929f95 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 2.8)
+if("${CMAKE_VERSION}" VERSION_GREATER 3)
cmake_policy(SET CMP0042 NEW)
+endif()

project("hdr_histogram")

Alec
@ahothan
Aug 12 2015 04:58
@giltene would you like me to transfer the python repository under HdrHistogram? I'd rather do it now than later as I will start to have other build artifacts point to the git repo URL and they might as well point to the final location. For the transfer to work I think you need to provide me some permission on your end (maybe create a new team with no repos in it and add me in). I have never done a transfer so any instructions would be helpful.
Michael Barker
@mikeb01
Aug 12 2015 05:41
Just updated, should be set to 3.0.0 now.
Alec
@ahothan
Aug 12 2015 14:46
@mikeb01 just verified that it is working. Thanks!