Unverified Commit 44f5f568 authored by Kenton Varda's avatar Kenton Varda Committed by GitHub

Merge pull request #619 from capnproto/escape-cmake-config-var

Escape CMake config var in configure.ac
parents b5425465 d610b7ec
......@@ -126,7 +126,7 @@ AC_SUBST([CAPNP_CMAKE_CONFIG_FILES])
# CapnProtoConfig.cmake.in needs these PACKAGE_* output variables.
PACKAGE_INIT="set([CAPNP_PKG_CONFIG_FILES] CAPNP_PKG_CONFIG_FILES)"
PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR="${CMAKE_CURRENT_LIST_DIR}/../../include"
PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR="\${CMAKE_CURRENT_LIST_DIR}/../../../include"
AC_SUBST([PACKAGE_INIT])
AC_SUBST([PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR])
......
......@@ -1058,7 +1058,7 @@ inline String PathPtr::toNativeString(bool absolute) const {
}
#endif // _WIN32, else
inline Own<const FsNode> FsNode::clone() const { return cloneFsNode().downcast<const FsNode>(); }
inline Own<const FsNode> FsNode::clone() const { return cloneFsNode(); }
inline Own<const ReadableFile> ReadableFile::clone() const {
return cloneFsNode().downcast<const ReadableFile>();
}
......
......@@ -7,6 +7,19 @@ doit() {
"$@"
}
function test_samples() {
echo "@@@@ ./addressbook (in various configurations)"
./addressbook write | ./addressbook read
./addressbook dwrite | ./addressbook dread
rm -f /tmp/capnp-calculator-example-$$
./calculator-server unix:/tmp/capnp-calculator-example-$$ &
sleep 0.1
./calculator-client unix:/tmp/capnp-calculator-example-$$
kill %+
wait %+ || true
rm -f /tmp/capnp-calculator-example-$$
}
QUICK=
PARALLEL=$(nproc 2>/dev/null || echo 1)
......@@ -228,15 +241,7 @@ while [ $# -gt 0 ]; do
-DCAPNPC_FLAGS=--no-standard-import -DCAPNPC_IMPORT_DIRS="$WORKSPACE/inst/include"
doit make -j$PARALLEL
echo "@@@@ ./addressbook (in various configurations)"
./addressbook write | ./addressbook read
./addressbook dwrite | ./addressbook dread
rm -f /tmp/capnp-calculator-example-$$
./calculator-server unix:/tmp/capnp-calculator-example-$$ &
sleep 0.1
./calculator-client unix:/tmp/capnp-calculator-example-$$
kill %+
wait %+ || true
test_samples
echo "========================================================================="
echo "Cap'n Proto ($CONFIGURATION) installs a working CMake config package."
......@@ -375,25 +380,28 @@ cd samples
doit capnp compile -oc++ addressbook.capnp -I"$STAGING"/include --no-standard-import
doit ${CXX:-g++} -std=c++11 addressbook.c++ addressbook.capnp.c++ -o addressbook \
$CXXFLAGS $(pkg-config --cflags --libs capnp)
echo "@@@@ ./addressbook (in various configurations)"
./addressbook write | ./addressbook read
./addressbook dwrite | ./addressbook dread
rm addressbook addressbook.capnp.c++ addressbook.capnp.h
doit capnp compile -oc++ calculator.capnp -I"$STAGING"/include --no-standard-import
doit ${CXX:-g++} -std=c++11 calculator-client.c++ calculator.capnp.c++ -o calculator-client \
$CXXFLAGS $(pkg-config --cflags --libs capnp-rpc)
doit ${CXX:-g++} -std=c++11 calculator-server.c++ calculator.capnp.c++ -o calculator-server \
$CXXFLAGS $(pkg-config --cflags --libs capnp-rpc)
rm -f /tmp/capnp-calculator-example-$$
./calculator-server unix:/tmp/capnp-calculator-example-$$ &
sleep 0.1
./calculator-client unix:/tmp/capnp-calculator-example-$$
kill %+
wait %+ || true
rm calculator-client calculator-server calculator.capnp.c++ calculator.capnp.h /tmp/capnp-calculator-example-$$
cd ..
test_samples
rm addressbook addressbook.capnp.c++ addressbook.capnp.h
rm calculator-client calculator-server calculator.capnp.c++ calculator.capnp.h
rm -rf cmake-build
mkdir cmake-build
cd cmake-build
doit cmake .. -G "Unix Makefiles" -DCMAKE_PREFIX_PATH="$STAGING" \
-DCAPNPC_FLAGS=--no-standard-import -DCAPNPC_IMPORT_DIRS="$STAGING/include"
doit make -j$PARALLEL
test_samples
cd ../..
rm -rf samples/cmake-build
if [ "$QUICK" = quick ]; then
doit make maintainer-clean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment