Skip to content

Commit

Permalink
Merge pull request #95 from DARMA-tasking/more-cmake-fixes
Browse files Browse the repository at this point in the history
Moved serialization, utility, and tinympl into their own repos
  • Loading branch information
David Hollman committed May 15, 2018
2 parents 23e2f9d + 1a1877e commit e3adaaf
Show file tree
Hide file tree
Showing 259 changed files with 111 additions and 25,172 deletions.
26 changes: 25 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,43 @@ before_install:
- wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz -O /tmp/gtest.tar.gz
- tar -xvf /tmp/gtest.tar.gz
- export GTEST=$PWD/googletest-release-1.8.0
- git clone -b devel --depth 1 https://github.com/DARMA-tasking/darma-serialization.git
- export DSERDIR=$PWD/darma-serialization
- git clone -b devel --depth 1 https://github.com/DARMA-tasking/darma-utility.git
- export DUTILDIR=$PWD/darma-utility
- git clone -b devel --depth 1 https://github.com/DARMA-tasking/tinympl.git
- export TINYMPLDIR=$PWD/tinympl
install:
- cd $GTEST
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=$GTEST/install -DCMAKE_CXX_COMPILER=$CXX ..
- make
- make install
- cd $TINYMPLDIR
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=$TINYMPLDIR/install -DCMAKE_CXX_COMPILER=$CXX ..
- make
- make install
- cd $DUTILDIR
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=$DUTILDIR/install -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_PREFIX_PATH=$TINYMPLDIR/install ..
- make
- make install
- cd $DSERDIR
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=$DSERDIR/install -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_PREFIX_PATH=$DUTILDIR/install ..
- make
- make install
script:
- export COVERALLS_SERVICE_NAME=travis-ci
- cd $TRAVIS_BUILD_DIR
- mkdir build
- cd build
- cmake -DDARMA_FE_ENABLE_TESTS=On -DCMAKE_CXX_COMPILER=$CXX -DGTEST_DIR=$GTEST/install
- cmake -DDARMA_FE_ENABLE_TESTS=On -DCMAKE_CXX_COMPILER=$CXX -DGTEST_DIR=$GTEST/install -DCMAKE_PREFIX_PATH="$DSERDIR/install;$GTEST/install"
${COVERALLS_CMAKE_OPTIONS} ..
- make VERBOSE=1
- make VERBOSE=1 test
Expand Down
88 changes: 51 additions & 37 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required (VERSION 3.4)

# Silence an error about the version option to project
# this will need to be changed if we ever bump the version to 3.0 and put the
Expand All @@ -10,7 +10,7 @@ endif()
project (DarmaFrontend)
# The version number.
set (DarmaFrontend_VERSION_MAJOR 0)
set (DarmaFrontend_VERSION_MINOR 4)
set (DarmaFrontend_VERSION_MINOR 5)

set (DARMA_FE_REPO_ROOT ${CMAKE_CURRENT_SOURCE_DIR})

Expand All @@ -30,40 +30,6 @@ if (DARMA_FE_ENABLE_TESTS OR DARMA_CT_ENABLE_TESTS)
set (DARMA_TESTS True)
endif()

if (DARMA_TESTS)
if (DARMA_FE_ENABLE_TESTS)
message("DARMA frontend tests will be built.")
set(GTEST_ROOT ${GTEST_DIR})
set(GMOCK_ROOT ${GTEST_DIR})
find_package(GTest REQUIRED)
find_package(GMock REQUIRED)
endif()
if (DARMA_CT_ENABLE_TESTS)
message("DARMA compile time tests will be included.")
endif()
include(CTest)
enable_testing()
else()
message("DARMA frontend tests will be skipped.")
endif()

# indicate that CMAKE was used, so config-generated.h can be used
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDARMA_CONFIG_GENERATED_H_AVAILABLE" )


if (DARMA_ENABLE_COVERALLS)
if (!DARMA_FE_ENABLE_TESTS)
message(FATAL_ERROR "Can't run coveralls coverage without tests enabled")
endif()
include(Coveralls)
coveralls_turn_on_coverage()
file(GLOB_RECURSE all_source_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" src/include/darma/*.h)
coveralls_setup(
"${all_source_files}"
${DARMA_COVERALLS_UPLOAD}
"${PROJECT_SOURCE_DIR}/cmake-modules/coveralls/cmake"
)
endif()

include (CheckCXXCompilerFlag)
include (CheckCXXSourceCompiles)
Expand All @@ -75,10 +41,24 @@ endif()
add_subdirectory(src)

add_library(darma_frontend INTERFACE)
add_library(darma_frontend::darma_frontend ALIAS darma_frontend)


target_include_directories(darma_frontend INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:include>
)
find_package(DarmaSerialization REQUIRED)
target_link_libraries(darma_frontend INTERFACE
darma_serialization::darma_serialization
darma_utility::darma_utility
tinympl::tinympl
)
# DarmaSerialization links to TinyMPL transitively, so we don't need it
# find_package(TinyMPL)
# DarmaSerialization links to DarmaUtility transitively, so we don't need it
# find_package(DarmaUtility)

install(TARGETS darma_frontend EXPORT darma_frontend)
install(EXPORT darma_frontend DESTINATION cmake)

Expand All @@ -91,8 +71,42 @@ install(
"${PROJECT_BINARY_DIR}/darma_frontendConfig.cmake"
DESTINATION cmake
)



if (DARMA_TESTS)
if (DARMA_FE_ENABLE_TESTS)
message("DARMA frontend tests will be built.")
set(GTEST_ROOT ${GTEST_DIR})
set(GMOCK_ROOT ${GTEST_DIR})
find_package(GTest REQUIRED)
find_package(GMock REQUIRED)
endif()
if (DARMA_CT_ENABLE_TESTS)
message("DARMA compile time tests will be included.")
endif()
include(CTest)
enable_testing()
else()
message("DARMA frontend tests will be skipped.")
endif()



if (DARMA_ENABLE_COVERALLS)
if (!DARMA_FE_ENABLE_TESTS)
message(FATAL_ERROR "Can't run coveralls coverage without tests enabled")
endif()
include(Coveralls)
coveralls_turn_on_coverage()
file(GLOB_RECURSE all_source_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" src/include/darma/*.h)
coveralls_setup(
"${all_source_files}"
${DARMA_COVERALLS_UPLOAD}
"${PROJECT_SOURCE_DIR}/cmake-modules/coveralls/cmake"
)
endif()


if (DARMA_TESTS)
add_subdirectory(src/tests)
endif()
8 changes: 5 additions & 3 deletions cmake/darma_frontendConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Get compiler and flags
get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(${SELF_DIR}/darma_frontend.cmake)
@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/tinymplTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/darmaUtilityTargets.cmake")
include(${CMAKE_CURRENT_LIST_DIR}/darma_frontend.cmake)

3 changes: 0 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_

add_subdirectory(include)

if (DARMA_TESTS)
add_subdirectory(tests)
endif()
2 changes: 1 addition & 1 deletion src/include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

install (FILES darma.h DESTINATION include)

add_subdirectory(darma)
add_subdirectory(tinympl)

2 changes: 0 additions & 2 deletions src/include/darma/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
add_subdirectory(utility)
add_subdirectory(keyword_arguments)
add_subdirectory(key)
add_subdirectory(interface)
add_subdirectory(serialization)
add_subdirectory(impl)

2 changes: 1 addition & 1 deletion src/include/darma/impl/feature_testing_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

#include <darma_features.h> // should contain feature macro definitions

#include "darma/utility/macros.h"
#include <darma/utility/macros.h>

//==============================================================================
// <editor-fold desc="Feature Dates and Defaults"> {{{1
Expand Down
22 changes: 0 additions & 22 deletions src/include/darma/serialization/CMakeLists.txt

This file was deleted.

80 changes: 0 additions & 80 deletions src/include/darma/serialization/direct_serialization.h

This file was deleted.

67 changes: 0 additions & 67 deletions src/include/darma/serialization/nonintrusive.h

This file was deleted.

Loading

0 comments on commit e3adaaf

Please sign in to comment.