Use git submodule for gsl-lite

This commit is contained in:
Paul Romano 2020-01-12 16:35:27 -06:00
parent 9e5da3dc4a
commit 5ec4ecac6d
5 changed files with 8 additions and 2896 deletions

3
.gitmodules vendored
View file

@ -1,3 +1,6 @@
[submodule "vendor/pugixml"]
path = vendor/pugixml
url = https://github.com/zeux/pugixml.git
[submodule "vendor/gsl-lite"]
path = vendor/gsl-lite
url = https://github.com/martinmoene/gsl-lite.git

View file

@ -133,15 +133,10 @@ target_link_libraries(xtensor INTERFACE xtl)
# GSL header-only library
#===============================================================================
add_library(gsl INTERFACE)
target_include_directories(gsl
INTERFACE
$<INSTALL_INTERFACE:include/gsl/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/vendor/gsl/include>
)
add_subdirectory(vendor/gsl-lite)
# Make sure contract violations throw exceptions
target_compile_definitions(gsl INTERFACE GSL_THROW_ON_CONTRACT_VIOLATION)
target_compile_definitions(gsl-lite INTERFACE GSL_THROW_ON_CONTRACT_VIOLATION)
#===============================================================================
# RPATH information
@ -321,7 +316,7 @@ endif()
# target_link_libraries treats any arguments starting with - but not -l as
# linker flags. Thus, we can pass both linker flags and libraries together.
target_link_libraries(libopenmc ${ldflags} ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES}
pugixml faddeeva xtensor gsl)
pugixml faddeeva xtensor gsl-lite)
if(dagmc)
target_compile_definitions(libopenmc PRIVATE DAGMC)
@ -357,7 +352,7 @@ add_custom_command(TARGET libopenmc POST_BUILD
#===============================================================================
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/OpenMC)
install(TARGETS openmc libopenmc pugixml faddeeva gsl
install(TARGETS openmc libopenmc pugixml faddeeva gsl-lite
EXPORT openmc-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
@ -376,7 +371,4 @@ install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
# Copy headers for vendored dependencies (note that xtensor/xtl are handled
# separately since they are managed by CMake)
install(DIRECTORY vendor/pugixml DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.hpp")
install(DIRECTORY vendor/gsl DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(DIRECTORY vendor/faddeeva DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

1
vendor/gsl-lite vendored Submodule

@ -0,0 +1 @@
Subproject commit 93607223a48621dae3cedd6b3335431b38067fae

View file

@ -1,27 +0,0 @@
//
// gsl-lite is based on GSL: Guidelines Support Library.
// For more information see https://github.com/martinmoene/gsl-lite
//
// Copyright (c) 2015 Martin Moene
// Copyright (c) 2015 Microsoft Corporation. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// mimic MS include hierarchy
#pragma once
#ifndef GSL_GSL_H_INCLUDED
#define GSL_GSL_H_INCLUDED
#include "gsl-lite.hpp"
#endif // GSL_GSL_H_INCLUDED

File diff suppressed because it is too large Load diff