Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 56337ac

Browse files
authored
Merge branch 'master' into nested_query
2 parents eaf7bfb + b7a035b commit 56337ac

File tree

129 files changed

+7243
-1877
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+7243
-1877
lines changed

CMakeLists.txt

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ else()
5050
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++1Y support. Please use a different C++ compiler.")
5151
endif()
5252

53-
# Create a new pre-processor macro __PELOTONFILE__ that has a truncated
53+
# Create a new pre-processor macro __PELOTONFILE__ that has a truncated
5454
# path to reduce the size of the debug log messages.
5555
# Source: http://stackoverflow.com/a/16658858
5656
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__PELOTONFILE__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
@@ -62,7 +62,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
6262
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
6363
endif()
6464

65-
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND
65+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND
6666
(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.9 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9))
6767
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=auto")
6868
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=auto")
@@ -79,10 +79,38 @@ if(UNIX OR APPLE)
7979
endif()
8080
endif()
8181

82+
# There is a problem with building on g++5.4 on Ubuntu 17.10 where
83+
# the compiler will not support a bunch of stuff in std for some reason.
84+
# For example, it would say that 'to_string' is not part of 'std'.
85+
# These flags fix these problems. I don't know whether g++5.5 has the same
86+
# problem, so I am only making this fix target all variants of 5.4.
87+
#
88+
# More Info: https://stackoverflow.com/a/38034394
89+
# https://github.com/opencv/opencv/issues/10032#issuecomment-342347482
90+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND
91+
(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 5.4 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.4) AND
92+
(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.5))
93+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GLIBCXX_USE_C99=1 -D_GLIBCXX_USE_C99_MATH=1")
94+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_C99=1 -D_GLIBCXX_USE_C99_MATH=1")
95+
endif()
96+
8297
# ---[ Warnings
8398
peloton_warnings_disable(CMAKE_CXX_FLAGS -Wno-strict-aliasing -Wno-implicit-fallthrough)
8499

85-
# Turn on sanitizers if necessary.
100+
# ---[ Check if we should use the GNU Gold linker
101+
set(USE_GOLD true CACHE BOOL "Use the GNU Gold linker if available")
102+
if (USE_GOLD)
103+
execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
104+
if ("${LD_VERSION}" MATCHES "GNU gold")
105+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags")
106+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags")
107+
else ()
108+
message(WARNING "GNU gold linker isn't available, using the default system linker.")
109+
set(USE_LD_GOLD OFF)
110+
endif ()
111+
endif()
112+
113+
# ---[ Turn on sanitizers if necessary.
86114
if(USE_SANITIZER)
87115
if (USE_SANITIZER STREQUAL "Address")
88116
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
@@ -102,9 +130,6 @@ if(USE_SANITIZER)
102130
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize-address-use-after-scope")
103131
endif()
104132
endif()
105-
if (CMAKE_COMPILER_IS_GNUCC)
106-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
107-
endif()
108133
endif()
109134

110135
# -- [ Coverage

Jenkinsfile

Lines changed: 92 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ pipeline {
55
parallel {
66
// begin gcc builds
77
// NOTE: this next stage is special because it copies the test results out of the container
8-
stage('Ubuntu Xenial/gcc-5.4.0/llvm-3.7.1 (Debug/Test)') {
8+
stage('Ubuntu Xenial/gcc-5.4.0/llvm-3.7.1 (Debug)') {
99
agent {
1010
docker {
1111
image 'ubuntu:xenial'
12-
args '-v ${WORKSPACE}/../builds/${BUILD_ID}:/job:rw'
12+
// args '-v ${WORKSPACE}/../builds/${BUILD_ID}:/job:rw'
1313
}
1414
}
1515
steps {
1616
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
1717
sh 'python ./script/validators/source_validator.py'
1818
sh 'mkdir build'
19-
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False -DUSE_SANITIZER=Address .. && make -j4'
19+
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCOVERALLS=False .. && make -j4'
2020
sh 'cd build && make check -j4 || true'
21-
sh 'cd build && cp -pr test /job/'
22-
sh 'cd build && make benchmark -j4'
21+
// sh 'cd build && cp -pr test /job/' // special tests collection step just for this stage
2322
sh 'cd build && make install'
2423
sh 'cd build && bash ../script/testing/psql/psql_test.sh'
24+
sh 'sudo apt-get -qq update && sudo apt-get -qq -y --no-install-recommends install wget default-jdk default-jre' // prerequisites for jdbc_validator
2525
sh 'cd build && python ../script/validators/jdbc_validator.py'
2626
}
2727
}
@@ -33,22 +33,26 @@ pipeline {
3333
sh 'python ./script/validators/source_validator.py'
3434
sh 'mkdir build'
3535
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
36+
sh 'cd build && make check -j4 || true'
37+
sh 'cd build && make install'
38+
sh 'cd build && bash ../script/testing/psql/psql_test.sh'
39+
sh 'sudo apt-get -qq update && sudo apt-get -qq -y --no-install-recommends install wget default-jdk default-jre' // prerequisites for jdbc_validator
40+
sh 'cd build && python ../script/validators/jdbc_validator.py'
3641
}
3742
}
3843

39-
stage('Ubuntu Trusty/gcc-4.8.4/llvm-3.7.1 (Debug/Test/LOG_LEVEL_TRACE)') {
44+
stage('Ubuntu Trusty/gcc-4.8.4/llvm-3.7.1 (Debug)') {
4045
agent { docker { image 'ubuntu:trusty' } }
4146
steps {
4247
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
4348
sh 'python ./script/validators/source_validator.py'
4449
sh 'mkdir build'
45-
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False -DUSE_SANITIZER=Address -DCMAKE_CXX_FLAGS="-DLOG_LEVEL=LOG_LEVEL_TRACE" .. && make -j4'
46-
// redirect output to /dev/null because it is voluminous
47-
// sh 'cd build && make check -j4 > /dev/null || true'
48-
// sh 'cd build && make benchmark -j4'
49-
// sh 'cd build && make install'
50-
// sh 'cd build && bash ../script/testing/psql/psql_test.sh'
51-
// sh 'cd build && python ../script/validators/jdbc_validator.py'
50+
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCOVERALLS=False .. && make -j4'
51+
sh 'cd build && make check -j4 || true'
52+
sh 'cd build && make install'
53+
sh 'cd build && bash ../script/testing/psql/psql_test.sh'
54+
sh 'sudo apt-get -qq update && sudo apt-get -qq -y --no-install-recommends install wget default-jdk default-jre' // prerequisites for jdbc_validator
55+
sh 'cd build && python ../script/validators/jdbc_validator.py'
5256
}
5357
}
5458

@@ -60,25 +64,34 @@ pipeline {
6064
sh 'mkdir build'
6165
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
6266
sh 'cd build && make check -j4 || true'
63-
// sh 'cd build && cp -pr test /job/'
64-
sh 'cd build && make benchmark -j4'
6567
sh 'cd build && make install'
6668
sh 'cd build && bash ../script/testing/psql/psql_test.sh'
69+
sh 'sudo apt-get -qq update && sudo apt-get -qq -y --no-install-recommends install wget default-jdk default-jre' // prerequisites for jdbc_validator
6770
sh 'cd build && python ../script/validators/jdbc_validator.py'
6871
}
6972
}
7073

71-
// stage('Debian Stretch/gcc-6.3.0/llvm-3.8.1 (Debug/Test)') {
74+
stage('Ubuntu Xenial/gcc-5.4.0/llvm-3.7.1 (LOG_LEVEL_TRACE)') {
75+
agent { docker { image 'ubuntu:xenial' } }
76+
steps {
77+
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
78+
sh 'python ./script/validators/source_validator.py'
79+
sh 'mkdir build'
80+
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCMAKE_CXX_FLAGS="-DLOG_LEVEL=LOG_LEVEL_TRACE" -DCOVERALLS=False .. && make -j4'
81+
}
82+
}
83+
84+
// stage('Debian Stretch/gcc-6.3.0/llvm-3.8.1 (Debug)') {
7285
// agent { docker { image 'debian:stretch' } }
7386
// steps {
7487
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
7588
// sh 'python ./script/validators/source_validator.py'
7689
// sh 'mkdir build'
77-
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False -DUSE_SANITIZER=Address .. && make -j4'
90+
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCOVERALLS=False .. && make -j4'
7891
// sh 'cd build && make check -j4 || true'
79-
// sh 'cd build && make benchmark -j4'
8092
// sh 'cd build && make install'
8193
// sh 'cd build && bash ../script/testing/psql/psql_test.sh'
94+
// sh 'sudo apt-get -qq update && sudo apt-get -qq -y --no-install-recommends install wget default-jdk default-jre' // prerequisites for jdbc_validator
8295
// sh 'cd build && python ../script/validators/jdbc_validator.py'
8396
// }
8497
// }
@@ -90,6 +103,11 @@ pipeline {
90103
// sh 'python ./script/validators/source_validator.py'
91104
// sh 'mkdir build'
92105
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
106+
// sh 'cd build && make check -j4 || true'
107+
// sh 'cd build && make install'
108+
// sh 'cd build && bash ../script/testing/psql/psql_test.sh'
109+
// sh 'sudo apt-get -qq update && sudo apt-get -qq -y --no-install-recommends install wget default-jdk default-jre' // prerequisites for jdbc_validator
110+
// sh 'cd build && python ../script/validators/jdbc_validator.py'
93111
// }
94112
// }
95113

@@ -99,7 +117,12 @@ pipeline {
99117
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
100118
// sh 'python ./script/validators/source_validator.py'
101119
// sh 'mkdir build'
102-
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
120+
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCOVERALLS=False .. && make -j4'
121+
// sh 'cd build && make check -j4 || true'
122+
// sh 'cd build && make install'
123+
// sh 'cd build && bash ../script/testing/psql/psql_test.sh'
124+
// sh 'sudo dnf -q install -y wget java-devel' // prerequisites for jdbc_validator
125+
// sh 'cd build && python ../script/validators/jdbc_validator.py'
103126
// }
104127
// }
105128

@@ -110,28 +133,43 @@ pipeline {
110133
// sh 'python ./script/validators/source_validator.py'
111134
// sh 'mkdir build'
112135
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
136+
// sh 'cd build && make check -j4 || true'
137+
// sh 'cd build && make install'
138+
// sh 'cd build && bash ../script/testing/psql/psql_test.sh'
139+
// sh 'sudo dnf -q install -y wget java-devel' // prerequisites for jdbc_validator
140+
// sh 'cd build && python ../script/validators/jdbc_validator.py'
113141
// }
114142
// }
115143

116-
// stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Debug)') {
117-
// agent { docker { image 'fedora:27' } }
118-
// steps {
119-
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
120-
// sh 'python ./script/validators/source_validator.py'
121-
// sh 'mkdir build'
122-
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
123-
// }
124-
// }
144+
stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Debug)') {
145+
agent { docker { image 'fedora:27' } }
146+
steps {
147+
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
148+
sh 'python ./script/validators/source_validator.py'
149+
sh 'mkdir build'
150+
sh 'cd build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCOVERALLS=False .. && make -j4'
151+
sh 'cd build && make check -j4 || true'
152+
sh 'cd build && make install'
153+
sh 'cd build && bash ../script/testing/psql/psql_test.sh'
154+
sh 'sudo dnf -q install -y wget java-devel' // prerequisites for jdbc_validator
155+
sh 'cd build && python ../script/validators/jdbc_validator.py'
156+
}
157+
}
125158

126-
// stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Release)') {
127-
// agent { docker { image 'fedora:27' } }
128-
// steps {
129-
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
130-
// sh 'python ./script/validators/source_validator.py'
131-
// sh 'mkdir build'
132-
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
133-
// }
134-
// }
159+
stage('Fedora 27/gcc-7.2.1/llvm-4.0.1 (Release)') {
160+
agent { docker { image 'fedora:27' } }
161+
steps {
162+
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
163+
sh 'python ./script/validators/source_validator.py'
164+
sh 'mkdir build'
165+
sh 'cd build && PATH=/usr/lib64/llvm4.0/bin:$PATH cmake -DCMAKE_CXX_FLAGS="-isystem /usr/include/llvm4.0" -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
166+
sh 'cd build && make check -j4 || true'
167+
sh 'cd build && make install'
168+
sh 'cd build && bash ../script/testing/psql/psql_test.sh'
169+
sh 'sudo dnf -q install -y wget java-devel' // prerequisites for jdbc_validator
170+
sh 'cd build && python ../script/validators/jdbc_validator.py'
171+
}
172+
}
135173

136174
// stage('CentOS 7/gcc-4.8.5/llvm-3.9.1 (Debug)') {
137175
// agent { docker { image 'centos:7' } }
@@ -140,6 +178,11 @@ pipeline {
140178
// sh 'python ./script/validators/source_validator.py'
141179
// sh 'mkdir build'
142180
// sh 'cd build && cmake3 -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
181+
// sh 'cd build && make check -j4 || true'
182+
// sh 'cd build && make install'
183+
// sh 'cd build && bash ../script/testing/psql/psql_test.sh'
184+
// sh 'sudo yum -q install -y wget java-devel' // prerequisites for jdbc_validator
185+
// sh 'cd build && python ../script/validators/jdbc_validator.py'
143186
// }
144187
// }
145188

@@ -150,6 +193,11 @@ pipeline {
150193
// sh 'python ./script/validators/source_validator.py'
151194
// sh 'mkdir build'
152195
// sh 'cd build && cmake3 -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
196+
// sh 'cd build && make check -j4 || true'
197+
// sh 'cd build && make install'
198+
// sh 'cd build && bash ../script/testing/psql/psql_test.sh'
199+
// sh 'sudo yum -q install -y wget java-devel' // prerequisites for jdbc_validator
200+
// sh 'cd build && python ../script/validators/jdbc_validator.py'
153201
// }
154202
// }
155203
// end gcc builds
@@ -248,11 +296,11 @@ pipeline {
248296
}
249297

250298
// Process test results from the first build stage
251-
post {
252-
always {
253-
dir("${WORKSPACE}/../builds/${BUILD_ID}") {
254-
step([$class: 'XUnitBuilder', testTimeMargin: '3000', thresholdMode: 1, thresholds: [[$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: ''], [$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '']], tools: [[$class: 'GoogleTestType', deleteOutputFiles: true, failIfNotNew: true, pattern: 'test/*_test.xml', skipNoTestFiles: false, stopProcessingIfError: true]]])
255-
}
256-
}
257-
}
299+
// post {
300+
// always {
301+
// dir("${WORKSPACE}/../builds/${BUILD_ID}") {
302+
// step([$class: 'XUnitBuilder', testTimeMargin: '3000', thresholdMode: 1, thresholds: [[$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: ''], [$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '']], tools: [[$class: 'GoogleTestType', deleteOutputFiles: true, failIfNotNew: true, pattern: 'test/*_test.xml', skipNoTestFiles: false, stopProcessingIfError: true]]])
303+
// }
304+
// }
305+
// }
258306
}

cmake/External/capnproto.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ if (NOT __CAPNP_INCLUDED) # guard against multiple includes
2020
set(CAPNP_EXTRA_COMPILER_FLAGS "-fPIC")
2121
endif()
2222

23-
set(CAPNP_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${CAPNP_EXTRA_COMPILER_FLAGS})
24-
set(CAPNP_C_FLAGS ${CMAKE_C_FLAGS} ${CAPNP_EXTRA_COMPILER_FLAGS})
23+
set(CAPNP_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CAPNP_EXTRA_COMPILER_FLAGS}")
24+
set(CAPNP_C_FLAGS "${CMAKE_C_FLAGS} ${CAPNP_EXTRA_COMPILER_FLAGS}")
2525

2626
ExternalProject_Add(capnp
2727
PREFIX ${capnp_PREFIX}

cmake/External/gflags.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ if (NOT __GFLAGS_INCLUDED) # guard against multiple includes
2020
set(GFLAGS_EXTRA_COMPILER_FLAGS "-fPIC")
2121
endif()
2222

23-
set(GFLAGS_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${GFLAGS_EXTRA_COMPILER_FLAGS})
24-
set(GFLAGS_C_FLAGS ${CMAKE_C_FLAGS} ${GFLAGS_EXTRA_COMPILER_FLAGS})
23+
set(GFLAGS_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GFLAGS_EXTRA_COMPILER_FLAGS}")
24+
set(GFLAGS_C_FLAGS "${CMAKE_C_FLAGS} ${GFLAGS_EXTRA_COMPILER_FLAGS}")
2525

2626
ExternalProject_Add(gflags
2727
PREFIX ${gflags_PREFIX}

0 commit comments

Comments
 (0)