Skip to content

Commit 0d3d64b

Browse files
committed
refactor(toml_config): add toml++ library to the project
1 parent b6415e1 commit 0d3d64b

5 files changed

Lines changed: 18263 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ install( FILES ${CMAKE_CURRENT_LIST_DIR}/core/thirdparty/kiss_fft/COPYING DESTI
292292
install( FILES ${CMAKE_CURRENT_LIST_DIR}/core/thirdparty/ovf/README.md DESTINATION licenses RENAME ovf.md COMPONENT spirit_licenses )
293293
install( FILES ${CMAKE_CURRENT_LIST_DIR}/core/thirdparty/spectra/LICENSE DESTINATION licenses RENAME spectra.txt COMPONENT spirit_licenses )
294294
install( FILES ${CMAKE_CURRENT_LIST_DIR}/core/thirdparty/tinyxml2/LICENSE DESTINATION licenses RENAME tinyxml2.txt COMPONENT spirit_licenses )
295+
install( FILES ${CMAKE_CURRENT_LIST_DIR}/core/thirdparty/toml++/LICENSE DESTINATION licenses RENAME tomlplusplus.txt COMPONENT spirit_licenses )
295296

296297
install( FILES ${CMAKE_CURRENT_LIST_DIR}/ui-cpp/thirdparty/Lyra/LICENSE.txt DESTINATION licenses RENAME lyra.txt COMPONENT spirit_licenses )
297298

core/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,12 @@ add_library( ${XML_LIB} STATIC
323323
${XML_INCLUDE_DIR}/tinyxml2.cpp )
324324
####################################################################
325325

326+
######### toml++ library ###########################################
327+
set( TOML_LIB tomlplusplus )
328+
set( TOML_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/thirdparty/toml++ )
329+
set( TOML_INCLUDE_DIRS ${XML_INCLUDE_DIRS} )
330+
####################################################################
331+
326332
######### HDF5 library for data export and import ##################
327333
if( SPIRIT_USE_HDF5 )
328334
find_package( HDF5 COMPONENTS CXX HL REQUIRED )
@@ -438,11 +444,12 @@ target_include_directories( ${META_PROJECT_NAME} PRIVATE
438444
${libfmt_INCLUDE_DIRS}
439445
${qhull_INCLUDE_DIRS}
440446
${FFT_INCLUDE_DIRS}
447+
${TOML_INCLUDE_DIRS}
441448
${XML_INCLUDE_DIRS}
442449
${HDF5_INCLUDE_DIRS} )
443450

444451
target_link_libraries( ${META_PROJECT_NAME} INTERFACE
445-
${qhull_LIBS} ${OVF_LIBRARIES_STATIC} ${XML_LIB} ${HDF5_LIB} ${FFT_LIB} ${THREAD_LIBS} ${TBB_LIB} )
452+
${qhull_LIBS} ${OVF_LIBRARIES_STATIC} ${TOML_LIB} ${XML_LIB} ${HDF5_LIB} ${FFT_LIB} ${THREAD_LIBS} ${TBB_LIB} )
446453

447454
### Flag needed to use fmt as header-only
448455
set( SPIRIT_COMPILE_DEFINITIONS ${SPIRIT_COMPILE_DEFINITIONS} -DFMT_HEADER_ONLY )

core/thirdparty/toml++/LICENSE

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
MIT License
2+
3+
Copyright (c) Mark Gillard <mark.gillard@outlook.com.au>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
6+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
7+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
11+
Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
14+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
15+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
16+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)