Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add zeromq build support to uberenv add conduit cmake setup for zeromq add smoke conduit tpl test for zeromq
- Loading branch information
Showing
7 changed files
with
279 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
############################################################################## | ||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. | ||
# Produced at the Lawrence Livermore National Laboratory. | ||
# | ||
# This file is part of Spack. | ||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. | ||
# LLNL-CODE-647188 | ||
# | ||
# For details, see https://github.com/llnl/spack | ||
# Please also see the LICENSE file for our notice and the LGPL. | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License (as | ||
# published by the Free Software Foundation) version 2.1, February 1999. | ||
# | ||
# This program is distributed in the hope that it will be useful, but | ||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and | ||
# conditions of the GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
############################################################################## | ||
from spack import * | ||
|
||
|
||
class Libsodium(Package): | ||
"""Sodium is a modern, easy-to-use software library for encryption, | ||
decryption, signatures, password hashing and more.""" | ||
homepage = "https://download.libsodium.org/doc/" | ||
url = "https://download.libsodium.org/libsodium/releases/libsodium-1.0.11.tar.gz" | ||
|
||
version('1.0.11', 'b58928d035064b2a46fb564937b83540') | ||
version('1.0.10', 'ea89dcbbda0b2b6ff6a1c476231870dd') | ||
version('1.0.3', 'b3bcc98e34d3250f55ae196822307fab') | ||
version('1.0.2', 'dc40eb23e293448c6fc908757738003f') | ||
version('1.0.1', '9a221b49fba7281ceaaf5e278d0f4430') | ||
version('1.0.0', '3093dabe4e038d09f0d150cef064b2f7') | ||
version('0.7.1', 'c224fe3923d1dcfe418c65c8a7246316') | ||
|
||
def url_for_version(self, version): | ||
url = 'https://download.libsodium.org/libsodium/releases/' | ||
if version < Version('1.0.4'): | ||
url += 'old/' | ||
return url + 'libsodium-{0}.tar.gz'.format(version) | ||
|
||
def install(self, spec, prefix): | ||
configure("--prefix=%s" % prefix) | ||
|
||
make() | ||
make("install") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
############################################################################## | ||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. | ||
# Produced at the Lawrence Livermore National Laboratory. | ||
# | ||
# This file is part of Spack. | ||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. | ||
# LLNL-CODE-647188 | ||
# | ||
# For details, see https://github.com/llnl/spack | ||
# Please also see the LICENSE file for our notice and the LGPL. | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License (as | ||
# published by the Free Software Foundation) version 2.1, February 1999. | ||
# | ||
# This program is distributed in the hope that it will be useful, but | ||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and | ||
# conditions of the GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
############################################################################## | ||
from spack import * | ||
|
||
|
||
class Zeromq(Package): | ||
""" The ZMQ networking/concurrency library and core API """ | ||
homepage = "http://zguide.zeromq.org/" | ||
url = "http://download.zeromq.org/zeromq-4.1.2.tar.gz" | ||
|
||
# versions newer than 4.0.7 fail on osx due to missing pkg cfg | ||
# https://github.com/zeromq/libzmq/issues/1642 | ||
#version('4.1.4', 'a611ecc93fffeb6d058c0e6edf4ad4fb') | ||
#version('4.1.2', '159c0c56a895472f02668e692d122685') | ||
#version('4.1.1', '0a4b44aa085644f25c177f79dc13f253') | ||
|
||
|
||
version('4.0.7', '9b46f7e7b0704b83638ef0d461fd59ab') | ||
version('4.0.6', 'd47dd09ed7ae6e7fd6f9a816d7f5fdf6') | ||
version('4.0.5', '73c39f5eb01b9d7eaf74a5d899f1d03d') | ||
|
||
depends_on("libsodium") | ||
#depends_on("libsodium@:1.0.3", when='@:4.1.2') | ||
|
||
def install(self, spec, prefix): | ||
configure("--with-libsodium", "--prefix=%s" % prefix) | ||
|
||
make() | ||
make("install") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
############################################################################### | ||
# Copyright (c) 2014-2016, Lawrence Livermore National Security, LLC. | ||
# | ||
# Produced at the Lawrence Livermore National Laboratory | ||
# | ||
# LLNL-CODE-666778 | ||
# | ||
# All rights reserved. | ||
# | ||
# This file is part of Conduit. | ||
# | ||
# For details, see: http://software.llnl.gov/conduit/. | ||
# | ||
# Please also read conduit/LICENSE | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# * Redistributions of source code must retain the above copyright notice, | ||
# this list of conditions and the disclaimer below. | ||
# | ||
# * Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the disclaimer (as noted below) in the | ||
# documentation and/or other materials provided with the distribution. | ||
# | ||
# * Neither the name of the LLNS/LLNL nor the names of its contributors may | ||
# be used to endorse or promote products derived from this software without | ||
# specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
# ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, | ||
# LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY | ||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
# | ||
############################################################################### | ||
# | ||
# Setup ZeroMQ | ||
# This file defines: | ||
# ZEROMQ_FOUND - If ZeroMQ was found | ||
# ZEROMQ_INCLUDE_DIRS - The ZeroMQ include directories | ||
# ZEROMQ_LIBRARIES - The libraries needed to use ZeroMQ | ||
|
||
|
||
if(NOT ZEROMQ_DIR) | ||
MESSAGE(FATAL_ERROR "ZeroMQ support needs explicit ZEROMQ_DIR") | ||
endif() | ||
|
||
find_path(ZEROMQ_INCLUDE_DIRS zmq.h | ||
PATHS ${ZEROMQ_DIR}/include | ||
NO_DEFAULT_PATH | ||
NO_CMAKE_ENVIRONMENT_PATH | ||
NO_CMAKE_PATH | ||
NO_SYSTEM_ENVIRONMENT_PATH | ||
NO_CMAKE_SYSTEM_PATH) | ||
|
||
find_library(ZEROMQ_LIBRARIES NAMES zmq | ||
PATHS ${ZEROMQ_DIR}/lib | ||
NO_DEFAULT_PATH | ||
NO_CMAKE_ENVIRONMENT_PATH | ||
NO_CMAKE_PATH | ||
NO_SYSTEM_ENVIRONMENT_PATH | ||
NO_CMAKE_SYSTEM_PATH) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
# handle the QUIETLY and REQUIRED arguments and set SILO_FOUND to TRUE | ||
# if all listed variables are TRUE | ||
find_package_handle_standard_args(ZeroMQ DEFAULT_MSG | ||
ZEROMQ_LIBRARIES ZEROMQ_INCLUDE_DIRS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// | ||
// Copyright (c) 2014-2016, Lawrence Livermore National Security, LLC. | ||
// | ||
// Produced at the Lawrence Livermore National Laboratory | ||
// | ||
// LLNL-CODE-666778 | ||
// | ||
// All rights reserved. | ||
// | ||
// This file is part of Conduit. | ||
// | ||
// For details, see: http://software.llnl.gov/conduit/. | ||
// | ||
// Please also read conduit/LICENSE | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided that the following conditions are met: | ||
// | ||
// * Redistributions of source code must retain the above copyright notice, | ||
// this list of conditions and the disclaimer below. | ||
// | ||
// * Redistributions in binary form must reproduce the above copyright notice, | ||
// this list of conditions and the disclaimer (as noted below) in the | ||
// documentation and/or other materials provided with the distribution. | ||
// | ||
// * Neither the name of the LLNS/LLNL nor the names of its contributors may | ||
// be used to endorse or promote products derived from this software without | ||
// specific prior written permission. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
// ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY, | ||
// LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY | ||
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
// IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
// POSSIBILITY OF SUCH DAMAGE. | ||
// | ||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// | ||
|
||
//----------------------------------------------------------------------------- | ||
/// | ||
/// file: t_zeromq_smoke.cpp | ||
/// | ||
//----------------------------------------------------------------------------- | ||
|
||
#include "gtest/gtest.h" | ||
#include <zmq.h> | ||
|
||
//----------------------------------------------------------------------------- | ||
TEST(zeromq_smoke, create_and_destroy_context) | ||
{ | ||
// test compiling and linking with zeromq | ||
void *context = zmq_ctx_new(); | ||
EXPECT_TRUE(context != NULL); | ||
void *socket = zmq_socket(context, ZMQ_REP); | ||
EXPECT_TRUE(socket != NULL); | ||
EXPECT_EQ(zmq_close(socket),0); | ||
EXPECT_EQ(zmq_ctx_destroy(context),0); | ||
} | ||
|
||
|