@@ -19,22 +19,13 @@ option( SpecUtils_BUILD_UNIT_TESTS "Builds unit tests" OFF )
1919option ( SpecUtils_BUILD_FUZZING_TESTS "Builds fuzzing tests, requires clang" OFF )
2020option ( SpecUtils_BUILD_REGRESSION_TEST "Creates executable to perform interactive regression test" OFF )
2121option ( SpecUtils_BUILD_EXAMPLE "Builds example SpecUtil applications" OFF )
22- option ( SpecUtils_PYTHON_BINDINGS "Creates python bindings to the c++ code" OFF )
2322option ( SpecUtils_JAVA_SWIG "Creates swig/java bindings to the c++ code" OFF )
2423option ( SpecUtils_C_BINDINGS "Creates C bindings to the c++ code" OFF )
2524option ( SpecUtils_INJA_TEMPLATES "Creates inja template interface" OFF )
2625option ( SpecUtils_USE_SIMD "Use SIMD operations; i386/x64 only right now, and very alpha, and extremely minimally used" OFF )
2726option ( SpecUtils_ENABLE_EQUALITY_CHECKS "Enables the equal_enough(...) functions for comparing two spectrum files." OFF ) #code size is only reason to default to off, I think
2827option ( PERFORM_DEVELOPER_CHECKS "Performs additional computationally expensive tests during execution (requires linking to boost)" OFF )
29-
30-
31- if ( SpecUtils_PYTHON_BINDINGS )
32- option ( SpecUtils_SHARED_LIB "Whether to compile a shared, or static library" ON )
33- list ( APPEND sources bindings/python/SpecFile_py.cpp )
34- else ()
35- #default to building a static lib
36- option ( SpecUtils_SHARED_LIB "Whether to compile a shared, or static library" OFF )
37- endif ()
28+ option ( SpecUtils_SHARED_LIB "Whether to compile a shared, or static library" OFF )
3829
3930
4031set ( SpecUtils_FLT_PARSE_METHOD "default_value" CACHE STRING [[How to parse lists of numbers.
@@ -82,7 +73,7 @@ endif()
8273
8374
8475# If we are building this on Windows, not as a sub-project, lets enable selecting C++ runtime
85- if ( MSVC AND (SpecUtils_PYTHON_BINDINGS OR SpecUtils_BUILD_UNIT_TESTS) )
76+ if ( MSVC AND SpecUtils_BUILD_UNIT_TESTS )
8677 get_directory_property (hasParent PARENT_DIRECTORY )
8778 if (NOT hasParent)
8879 option (${PROJECT_NAME} _USE_MSVC_MultiThreadDLL "Use dynamically-link runtime library." OFF )
@@ -96,7 +87,7 @@ if( MSVC AND (SpecUtils_PYTHON_BINDINGS OR SpecUtils_BUILD_UNIT_TESTS) )
9687 endif ()
9788 message (STATUS "Using CMAKE_MSVC_RUNTIME_LIBRARY ${CMAKE_MSVC_RUNTIME_LIBRARY} " )
9889 endif (NOT hasParent)
99- endif ( MSVC AND (SpecUtils_PYTHON_BINDINGS OR SpecUtils_BUILD_UNIT_TESTS) )
90+ endif ( MSVC AND SpecUtils_BUILD_UNIT_TESTS )
10091
10192
10293if ( SpecUtils_BUILD_EXAMPLE )
@@ -121,14 +112,6 @@ endif( SpecUtils_JAVA_SWIG )
121112
122113set ( THIRD_PARTY_DIR "${CMAKE_CURRENT_SOURCE_DIR} /3rdparty" )
123114
124- if ( SpecUtils_PYTHON_BINDINGS )
125- FIND_PACKAGE (Python3 COMPONENTS Development )
126- IF (NOT Python3_FOUND)
127- MESSAGE (FATAL_ERROR "Unable to find PythonLibs." )
128- ENDIF ()
129- message ( "Python include dirs: ${Python3_INCLUDE_DIRS} " )
130- endif ()
131-
132115set ( sources
133116 src/SpecFile.cpp
134117 src/SpecFile_pcf.cpp
@@ -255,10 +238,6 @@ if( SpecUtils_ENABLE_URI_SPECTRA )
255238 find_package ( ZLIB REQUIRED )
256239endif ( SpecUtils_ENABLE_URI_SPECTRA )
257240
258- if ( SpecUtils_PYTHON_BINDINGS )
259- list ( APPEND sources bindings/python/SpecFile_py.cpp )
260- endif ( SpecUtils_PYTHON_BINDINGS )
261-
262241if ( SpecUtils_JAVA_SWIG )
263242 list ( APPEND sources bindings/swig/SpecUtils.i )
264243endif ( SpecUtils_JAVA_SWIG )
@@ -277,7 +256,6 @@ endif( SpecUtils_SHARED_LIB )
277256add_library ( SpecUtils ${SpecUtils_LIB_TYPE} ${sources} ${headers} ${OTHER_SUPPORT_FILES} )
278257set_target_properties ( SpecUtils PROPERTIES PREFIX "lib" OUTPUT_NAME "SpecUtils" )
279258
280-
281259set ( SpecUtils_USE_FAST_FLOAT OFF ) # Uses https://github.com/fastfloat/fast_float . If fast_float.h isnt found, will be fetched
282260set ( SpecUtils_USE_FROM_CHARS OFF ) # Supported by MSVC >= 2019, and gcc >= 12. Not supported by Apple clang. In MSVC, about 50% slower than boost::spirit
283261set ( SpecUtils_USE_BOOST_SPIRIT OFF ) # Uses boost::spirit, and fasted method (maybe a hair faster than fastfloat)
@@ -335,28 +313,22 @@ if( SpecUtils_USE_FAST_FLOAT )
335313 endif ( NOT FAST_FLOAT_FILE_PATH )
336314endif ( SpecUtils_USE_FAST_FLOAT )
337315
338- # We only need boost libraries if we are using boost to parse floats, if we are performing developer
339- # checks, or we are creating Python bindings
340- if ( SpecUtils_USE_BOOST_SPIRIT OR PERFORM_DEVELOPER_CHECKS OR SpecUtils_PYTHON_BINDINGS )
316+ # We only need boost libraries if we are using boost to parse floats, if we are performing developer checks
317+ if ( SpecUtils_USE_BOOST_SPIRIT OR PERFORM_DEVELOPER_CHECKS )
341318
342319 if ( DEFINED boost_SOURCE_DIR )
343320 # We used CMake Fetch to get boost (e.g., in InterSpec)
344321 target_link_libraries ( SpecUtils PUBLIC Boost::system Boost::spirit Boost::fusion Boost::algorithm Boost::functional Boost::crc )
345322
346323 else ( DEFINED boost_SOURCE_DIR )
347-
348- if ( SpecUtils_PYTHON_BINDINGS )
349- list ( APPEND boost_libs_required python )
350- endif ( SpecUtils_PYTHON_BINDINGS )
351-
352324 find_package ( Boost REQUIRED COMPONENTS system ${boost_libs_required} )
353325 if ( NOT Boost_FOUND )
354326 message (FATAL_ERROR "Couldnt Find Boost" )
355327 endif ( NOT Boost_FOUND )
356328
357329 target_link_libraries ( SpecUtils PUBLIC Boost::system )
358330 endif ( DEFINED boost_SOURCE_DIR )
359- endif ( SpecUtils_USE_BOOST_SPIRIT OR PERFORM_DEVELOPER_CHECKS OR SpecUtils_PYTHON_BINDINGS )
331+ endif ( SpecUtils_USE_BOOST_SPIRIT OR PERFORM_DEVELOPER_CHECKS )
360332
361333if ( SpecUtils_USE_FROM_CHARS )
362334 if ( NOT (MSVC AND (MSVC_VERSION GREATER_EQUAL 1920)) )
@@ -402,17 +374,11 @@ elseif( NOT SpecUtils_USING_NO_THREADING )
402374endif ( SpecUtils_USE_WT_THREADPOOL )
403375
404376
405-
406377if ( SpecUtils_ENABLE_URI_SPECTRA )
407378 target_link_libraries ( SpecUtils PUBLIC ZLIB::ZLIB )
408379endif ( SpecUtils_ENABLE_URI_SPECTRA )
409380
410381
411- if ( SpecUtils_PYTHON_BINDINGS )
412- target_link_libraries ( SpecUtils PUBLIC Boost::python ${Boost_PYTHON_LIBRARY} ${Python3_LIBRARIES} )
413- endif ( SpecUtils_PYTHON_BINDINGS )
414-
415-
416382if ( SpecUtils_JAVA_SWIG )
417383 target_link_libraries ( SpecUtils PUBLIC ${JAVA_LIBRARIES} )
418384endif ( SpecUtils_JAVA_SWIG )
@@ -428,7 +394,7 @@ elseif( WIN32 )
428394endif ( MINGW )
429395
430396target_include_directories ( SpecUtils PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
431- PRIVATE ${THIRD_PARTY_DIR} ${Python3_INCLUDE_DIRS} )
397+ PRIVATE ${THIRD_PARTY_DIR} )
432398
433399if ( SpecUtils_BUILD_REGRESSION_TEST )
434400 if ( NOT SpecUtils_ENABLE_EQUALITY_CHECKS )
0 commit comments