Skip to content

Commit

Permalink
Merge pull request #21 from LLNL/task/2016_08_bb64_rename
Browse files Browse the repository at this point in the history
enh: rename b64 and civetweb targets and libs
  • Loading branch information
cyrush committed Aug 10, 2016
2 parents 38610f3 + a67a0bd commit 28d7a01
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/libs/conduit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ add_compiled_library(NAME conduit
# libb64 is a private dep, its not exposed in / required by
# conduit's header files
#
target_link_libraries(conduit PRIVATE libb64)
target_link_libraries(conduit PRIVATE conduit_b64)

################################
# Add python wrappers if python
Expand Down
2 changes: 1 addition & 1 deletion src/libs/relay/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ target_link_libraries(conduit_relay PUBLIC conduit)
# civetweb is a private dep, its not exposed in / required by
# conduit relays' header files
#
target_link_libraries(conduit_relay PRIVATE civetweb)
target_link_libraries(conduit_relay PRIVATE conduit_civetweb)


#
Expand Down
2 changes: 1 addition & 1 deletion src/tests/conduit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ set(BASIC_TESTS t_conduit_smoke
################################
message(STATUS "Adding conduit lib unit tests")
foreach(TEST ${BASIC_TESTS})
add_cpp_test(TEST ${TEST} DEPENDS_ON conduit libb64 )
add_cpp_test(TEST ${TEST} DEPENDS_ON conduit)
endforeach()

################################
Expand Down
2 changes: 1 addition & 1 deletion src/tests/conduit/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ set(BASIC_C_TESTS
################################
message(STATUS "Adding conduit lib c interface unit tests")
foreach(TEST ${BASIC_C_TESTS})
add_cpp_test(TEST ${TEST} DEPENDS_ON conduit libb64 )
add_cpp_test(TEST ${TEST} DEPENDS_ON conduit )
endforeach()


2 changes: 1 addition & 1 deletion src/tests/docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ set(DOCS_TESTS t_conduit_tutorial_examples)
################################
message(STATUS "Adding docs related unit tests")
foreach(TEST ${DOCS_TESTS})
add_cpp_test(TEST ${TEST} DEPENDS_ON conduit libb64 )
add_cpp_test(TEST ${TEST} DEPENDS_ON conduit )
endforeach()


Expand Down
17 changes: 14 additions & 3 deletions src/tests/thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@
# Core (conduit lib) Unit Tests
################################
set(TPL_TESTS t_gtest_smoke
t_rapidjson_smoke
t_libb64_smoke)
t_rapidjson_smoke)

set(B64_TPL_TEST t_libb64_smoke)
set(CIVET_TPL_TEST t_civetweb_smoke)

################################
# Optional Unit Tests
Expand All @@ -70,7 +71,17 @@ set(FORTRAN_TESTS t_fortran_smoke t_fruit_smoke)
################################
message(STATUS "Adding thirdparty lib unit tests")
foreach(TEST ${TPL_TESTS})
add_cpp_test(TEST ${TEST} DEPENDS_ON libb64 )
add_cpp_test(TEST ${TEST} DEPENDS_ON)
endforeach()

message(STATUS "Adding b64 unit test")
foreach(TEST ${B64_TPL_TEST})
add_cpp_test(TEST ${TEST} DEPENDS_ON conduit_b64 )
endforeach()

message(STATUS "Adding civetweb unit test")
foreach(TEST ${CIVET_TPL_TEST})
add_cpp_test(TEST ${TEST} DEPENDS_ON conduit_civetweb )
endforeach()


Expand Down
77 changes: 77 additions & 0 deletions src/tests/thirdparty/t_civetweb_smoke.cpp
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.
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

//-----------------------------------------------------------------------------
///
/// file: t_civetweb_smoke.cpp
///
//-----------------------------------------------------------------------------

#include "gtest/gtest.h"

//-----------------------------------------------------------------------------
// civetweb includes
//-----------------------------------------------------------------------------
#include "civetweb.h"

//-----------------------------------------------------------------------------
//
// Note: This just tests that we can compile and link with civetweb, it
// does not start a web server
//
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
int
dummy_civetweb_handler(struct mg_connection *conn, void *cbdata)
{
mg_printf(conn, "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n");
return 0;
}

TEST(civetweb_smoke, basic_use )
{
EXPECT_TRUE(true);
}

2 changes: 1 addition & 1 deletion src/tests/thirdparty/t_libb64_smoke.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

//-----------------------------------------------------------------------------
///
/// file: libb64_smoke.cpp
/// file: t_libb64_smoke.cpp
///
//-----------------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions src/thirdparty_builtin/civetweb-1.8/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ add_definitions(-DUSE_WEBSOCKET)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)


add_compiled_library(NAME civetweb
add_compiled_library(NAME conduit_civetweb
INTERNAL
EXPORT conduit
HEADERS ${civetweb_headers}
Expand All @@ -79,7 +79,7 @@ add_compiled_library(NAME civetweb
if(UNIX AND NOT APPLE)
# we need these on linux, we may need similar libs on windows
# (OSX appears ok without them)
target_link_libraries(civetweb dl rt)
target_link_libraries(conduit_civetweb dl rt)
endif()


Expand Down
2 changes: 1 addition & 1 deletion src/thirdparty_builtin/libb64-1.2.1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ set(libb64_sources
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)


add_compiled_library(NAME libb64
add_compiled_library(NAME conduit_b64
INTERNAL
EXPORT conduit
SOURCES ${libb64_sources})
Expand Down

0 comments on commit 28d7a01

Please sign in to comment.