Skip to content

Commit dfca4a6

Browse files
committed
Enable URI spectrum file format for macOS and Linux
1 parent 50ba371 commit dfca4a6

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

bindings/python/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
66

77
set( SpecUtils_ENABLE_D3_CHART ON CACHE BOOL "" )
88
set( SpecUtils_D3_SUPPORT_FILE_STATIC ON CACHE BOOL "" )
9-
set( SpecUtils_ENABLE_URI_SPECTRA OFF CACHE BOOL "" ) #Lets not worry about linking to zlib right now
109
set( SpecUtils_PYTHON_BINDINGS ON CACHE BOOL "Build the python bindings" )
1110
set( SpecUtils_ENABLE_EQUALITY_CHECKS OFF CACHE BOOL "" )
1211
set( PERFORM_DEVELOPER_CHECKS OFF CACHE BOOL "" )
1312
set( SpecUtils_SHARED_LIB OFF CACHE BOOL "" ) #we'll statically link SpecUtils into the lib we create here
1413
set( SpecUtils_FLT_PARSE_METHOD "strtod" CACHE STRING "Float parsing method" )
1514

15+
# Enable URI spectra for macOS and Linux (since we are already linking to zlib), but not Windows
16+
if(WIN32)
17+
set( SpecUtils_ENABLE_URI_SPECTRA OFF CACHE BOOL "" )
18+
else()
19+
set( SpecUtils_ENABLE_URI_SPECTRA ON CACHE BOOL "" )
20+
endif()
21+
1622
add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/../.. ${CMAKE_CURRENT_BINARY_DIR}/LibSpecUtils )
1723

1824
if (NOT SKBUILD)

bindings/python/SpecFile_py.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,6 +1354,9 @@ NB_MODULE(SpecUtils, m) {
13541354
.value("ScanDataXml", SpecUtils::ParserType::ScanDataXml)
13551355
.value("Json", SpecUtils::ParserType::Json)
13561356
.value("CaenHexagonGXml", SpecUtils::ParserType::CaenHexagonGXml)
1357+
#if( SpecUtils_ENABLE_URI_SPECTRA )
1358+
.value("Uri", SpecUtils::ParserType::Uri)
1359+
#endif
13571360
.value("Auto", SpecUtils::ParserType::Auto);
13581361

13591362

bindings/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
44

55
[project]
66
name = "SandiaSpecUtils"
7-
version = "0.0.6"
7+
version = "0.0.7"
88
description = "Python bindings for SpecUtils using nanobind and scikit-build"
99
readme = "README.md"
1010
requires-python = ">=3.9"

0 commit comments

Comments
 (0)