mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
Some cmake cleanup work (#7720)
* cmake modernization - get rid of some warnings - switch to what I hope is the correct way of doing things - bump min cmake version to 3.16 - bump min boost version to 1.70 This builds on linux * remove some usages of PYTHON_EXECUTABLE * remove old-school python usage from coverage tests * remove unused CI file * bump boost version for windows builds to 1.84 * still trying to get the ci builds working * typo * eventually the CI will work * robustify some tests
This commit is contained in:
@@ -1,74 +0,0 @@
|
||||
steps:
|
||||
- bash: |
|
||||
source ${CONDA}/etc/profile.d/conda.sh
|
||||
sudo chown -R ${USER} ${CONDA}
|
||||
conda config --set always_yes yes --set changeps1 no
|
||||
conda update -q conda
|
||||
conda info -a
|
||||
conda create --name rdkit_build $(compiler) cmake \
|
||||
boost-cpp=$(boost_version) boost=$(boost_version) \
|
||||
py-boost=$(boost_version) libboost=$(boost_version) \
|
||||
numpy matplotlib pillow eigen pandas \
|
||||
sphinx myst-parser jupyter
|
||||
conda activate rdkit_build
|
||||
conda install -c rdkit nox cairo=1.14.6
|
||||
displayName: Setup build environment
|
||||
- bash: |
|
||||
source ${CONDA}/etc/profile.d/conda.sh
|
||||
conda activate rdkit_build
|
||||
mkdir build && cd build && \
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DRDK_INSTALL_INTREE=ON \
|
||||
-DRDK_INSTALL_STATIC_LIBS=OFF \
|
||||
-DRDK_BUILD_CPP_TESTS=ON \
|
||||
-DRDK_BUILD_PYTHON_WRAPPERS=ON \
|
||||
-DRDK_BUILD_COORDGEN_SUPPORT=ON \
|
||||
-DRDK_BUILD_MAEPARSER_SUPPORT=ON \
|
||||
-DRDK_OPTIMIZE_POPCNT=ON \
|
||||
-DRDK_BUILD_TEST_GZIP=ON \
|
||||
-DRDK_BUILD_FREESASA_SUPPORT=ON \
|
||||
-DRDK_BUILD_AVALON_SUPPORT=ON \
|
||||
-DRDK_BUILD_INCHI_SUPPORT=ON \
|
||||
-DRDK_BUILD_CAIRO_SUPPORT=ON \
|
||||
-DRDK_BUILD_SWIG_WRAPPERS=OFF \
|
||||
-DRDK_SWIG_STATIC=OFF \
|
||||
-DRDK_BUILD_THREADSAFE_SSS=ON \
|
||||
-DRDK_TEST_MULTITHREADED=ON \
|
||||
-DBoost_NO_SYSTEM_PATHS=ON \
|
||||
-DRDK_BOOST_PYTHON3_NAME=$(python_name) \
|
||||
-DPYTHON_EXECUTABLE=${CONDA_PREFIX}/bin/python3 \
|
||||
-DCMAKE_INCLUDE_PATH="${CONDA_PREFIX}/include" \
|
||||
-DCMAKE_LIBRARY_PATH="${CONDA_PREFIX}/lib"
|
||||
displayName: Configure build (Run CMake)
|
||||
- bash: |
|
||||
source ${CONDA}/etc/profile.d/conda.sh
|
||||
conda activate rdkit_build
|
||||
cd build
|
||||
make -j $( $(number_of_cores) ) install
|
||||
displayName: Build
|
||||
- bash: |
|
||||
source ${CONDA}/etc/profile.d/conda.sh
|
||||
conda activate rdkit_build
|
||||
export RDBASE=`pwd`
|
||||
export PYTHONPATH=${RDBASE}:${PYTHONPATH}
|
||||
export LD_LIBRARY_PATH=${RDBASE}/lib:${LD_LIBRARY_PATH}
|
||||
export QT_QPA_PLATFORM='offscreen'
|
||||
cd build
|
||||
ctest -j $( $(number_of_cores) ) --output-on-failure -T Test
|
||||
displayName: Run tests
|
||||
- bash: |
|
||||
source ${CONDA}/etc/profile.d/conda.sh
|
||||
conda activate rdkit_build
|
||||
export RDBASE=`pwd`
|
||||
export PYTHONPATH=${RDBASE}:${PYTHONPATH}
|
||||
export LD_LIBRARY_PATH=${RDBASE}/lib:${LD_LIBRARY_PATH}
|
||||
export QT_QPA_PLATFORM='offscreen'
|
||||
cd Docs/Book
|
||||
make doctest
|
||||
displayName: Run documentation tests
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: 'CTest'
|
||||
testResultsFiles: 'build/Testing/*/Test.xml'
|
||||
testRunTitle: $(system.phasedisplayname) CTest Test Run
|
||||
@@ -6,12 +6,14 @@ steps:
|
||||
conda info -a
|
||||
conda install -n base conda-libmamba-solver
|
||||
conda config --set solver libmamba
|
||||
conda create --name rdkit_build ^
|
||||
boost-cpp=$(boost_version) boost=$(boost_version) ^
|
||||
py-boost=$(boost_version) libboost=$(boost_version) ^
|
||||
numpy matplotlib=3.8 cairo pillow eigen pandas=2.1
|
||||
conda create --name rdkit_build -c conda-forge $(python) ^
|
||||
boost=$(boost_version) boost-cpp=$(boost_version) ^
|
||||
libboost-python-devel=(boost_version) ^
|
||||
libboost=$(boost_version) ^
|
||||
libboost-devel=$(boost_version) ^
|
||||
numpy matplotlib cairo pillow eigen pandas=2.1
|
||||
call activate rdkit_build
|
||||
conda install -c conda-forge sphinx myst-parser ipython=8.20 jupyter pytest nbval
|
||||
conda install -c conda-forge sphinx myst-parser ipython jupyter pytest nbval
|
||||
conda install -c conda-forge cmake
|
||||
displayName: Install dependencies
|
||||
- script: |
|
||||
@@ -40,8 +42,6 @@ steps:
|
||||
-DRDK_BUILD_CFFI_LIB=ON ^
|
||||
-DRDK_SWIG_STATIC=OFF ^
|
||||
-DRDK_TEST_MULTITHREADED=ON ^
|
||||
-DRDK_BOOST_PYTHON3_NAME=$(python_name) ^
|
||||
-DBoost_NO_BOOST_CMAKE=TRUE ^
|
||||
-DCMAKE_INCLUDE_PATH=%CONDA_PREFIX%/Library/include ^
|
||||
-DCMAKE_LIBRARY_PATH="%CONDA_PREFIX%/Library/lib
|
||||
displayName: Configure build (Run CMake)
|
||||
|
||||
@@ -6,12 +6,14 @@ steps:
|
||||
conda info -a
|
||||
conda install -n base conda-libmamba-solver
|
||||
conda config --set solver libmamba
|
||||
conda create --name rdkit_build ^
|
||||
boost-cpp=$(boost_version) boost=$(boost_version) ^
|
||||
conda create --name rdkit_build -c conda-forge $(python) ^
|
||||
boost=$(boost_version) boost-cpp=$(boost_version) ^
|
||||
libboost-python-devel=(boost_version) ^
|
||||
libboost=$(boost_version) ^
|
||||
numpy matplotlib=3.8 cairo pillow eigen pandas=2.1
|
||||
libboost-devel=$(boost_version) ^
|
||||
numpy matplotlib cairo pillow eigen pandas=2.1
|
||||
call activate rdkit_build
|
||||
conda install -c conda-forge cmake ipython=8.20 pytest nbval
|
||||
conda install -c conda-forge cmake ipython pytest nbval
|
||||
displayName: Install dependencies
|
||||
- script: |
|
||||
set Boost_ROOT=
|
||||
@@ -39,7 +41,6 @@ steps:
|
||||
-DRDK_BUILD_SWIG_WRAPPERS=OFF ^
|
||||
-DRDK_SWIG_STATIC=OFF ^
|
||||
-DRDK_TEST_MULTITHREADED=ON ^
|
||||
-DBoost_NO_BOOST_CMAKE=TRUE ^
|
||||
-DCMAKE_INCLUDE_PATH=%CONDA_PREFIX%/Library/include ^
|
||||
-DCMAKE_LIBRARY_PATH="%CONDA_PREFIX%/Library/lib
|
||||
displayName: Configure build (Run CMake)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project (RDKit)
|
||||
|
||||
@@ -71,7 +71,7 @@ option(RDK_BUILD_MINIMAL_LIB_RXN "build support for reactions into MinimalLib" O
|
||||
option(RDK_BUILD_MINIMAL_LIB_SUBSTRUCTLIBRARY "build support for SubstructLibrary into MinimalLib" ON )
|
||||
option(RDK_BUILD_MINIMAL_LIB_MCS "build support for MCS into MinimalLib" OFF )
|
||||
|
||||
set(RDK_BOOST_VERSION "1.58.0")
|
||||
set(RDK_BOOST_VERSION "1.70.0")
|
||||
|
||||
if(NOT MSVC)
|
||||
if(RDK_OPTIMIZE_POPCNT)
|
||||
@@ -150,7 +150,7 @@ set(RDKit_ExternalDir "${CMAKE_CURRENT_SOURCE_DIR}/External")
|
||||
set(RDKit_DataDir "${CMAKE_CURRENT_SOURCE_DIR}/Data")
|
||||
|
||||
#include catch
|
||||
find_package(Catch2 3)
|
||||
find_package(Catch2 3 QUIET)
|
||||
if(NOT Catch2_FOUND)
|
||||
Include(FetchContent)
|
||||
|
||||
@@ -290,59 +290,26 @@ if(RDK_BUILD_PYTHON_WRAPPERS)
|
||||
|
||||
#-------
|
||||
# pull in python:
|
||||
find_package(PythonInterp)
|
||||
if (PYTHONINTERP_FOUND AND NOT Python_ADDITIONAL_VERSIONS)
|
||||
set(Python_ADDITIONAL_VERSIONS "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
|
||||
endif (PYTHONINTERP_FOUND AND NOT Python_ADDITIONAL_VERSIONS)
|
||||
|
||||
if(PYTHON_VERSION_MAJOR EQUAL 2)
|
||||
message(FATAL_ERROR "ERROR: The RDKit no longer supports Python 2.\nIf you have Python 3 installed, you can tell cmake where to find it using the -DPYTHON_EXECUTABLE argument.")
|
||||
endif()
|
||||
|
||||
find_package(PythonLibs)
|
||||
target_include_directories(rdkit_base INTERFACE ${PYTHON_INCLUDE_DIR})
|
||||
find_package(Python3 COMPONENTS Interpreter Development NumPy)
|
||||
target_include_directories(rdkit_base INTERFACE ${Python3_INCLUDE_DIRS})
|
||||
target_include_directories(rdkit_base INTERFACE ${Python3_NumPy_INCLUDE_DIRS})
|
||||
|
||||
# determine linkage of python
|
||||
execute_process(
|
||||
COMMAND
|
||||
${PYTHON_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var('Py_ENABLE_SHARED'))"
|
||||
${Python3_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var('Py_ENABLE_SHARED'))"
|
||||
OUTPUT_VARIABLE Py_ENABLE_SHARED
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if(WIN32 OR "${Py_ENABLE_SHARED}" STREQUAL "1")
|
||||
target_link_libraries(rdkit_py_base INTERFACE ${PYTHON_LIBRARIES} )
|
||||
target_link_libraries(rdkit_py_base INTERFACE ${Python3_LIBRARY} )
|
||||
endif()
|
||||
|
||||
find_package(NumPy REQUIRED)
|
||||
target_include_directories(rdkit_base INTERFACE ${PYTHON_NUMPY_INCLUDE_PATH})
|
||||
|
||||
if(PYTHON_VERSION_MAJOR EQUAL 3)
|
||||
# Find boost-python3 using name specified as command line option then fall back to commonly used names
|
||||
set(RDK_BOOST_PYTHON3_NAME "python3" CACHE STRING "Name of the boost python3 library. If installed as libboost_python-xxx.so, use python-xxx.")
|
||||
list(APPEND Boost_Python_Names "${RDK_BOOST_PYTHON3_NAME}" "python-py3${PYTHON_VERSION_MINOR}" "python3")
|
||||
endif(PYTHON_VERSION_MAJOR EQUAL 3)
|
||||
find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}" "numpy${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}" REQUIRED CONFIG)
|
||||
|
||||
# Boost 1.67+ uses a version suffix like "python36" or "python27"
|
||||
list(APPEND Boost_Python_Names "python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
|
||||
|
||||
# Try each potential boost-python name until one works
|
||||
foreach(Boost_Python_LibN ${Boost_Python_Names})
|
||||
find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS "${Boost_Python_LibN}" QUIET)
|
||||
if(Boost_FOUND)
|
||||
set(Boost_Python_Lib ${Boost_Python_LibN})
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
# Finally just try "python" and hope it is a compatible version
|
||||
if(NOT Boost_FOUND)
|
||||
find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS python REQUIRED)
|
||||
set(Boost_Python_Lib "python")
|
||||
endif()
|
||||
|
||||
find_package(Boost COMPONENTS "numpy${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}" REQUIRED)
|
||||
|
||||
target_link_libraries(rdkit_py_base INTERFACE Boost::${Boost_Python_Lib} "Boost::numpy${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
|
||||
target_link_libraries(rdkit_py_base INTERFACE "Boost::python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}" "Boost::numpy${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
|
||||
|
||||
if(RDK_INSTALL_INTREE)
|
||||
set(RDKit_PythonDir "${CMAKE_SOURCE_DIR}/rdkit")
|
||||
@@ -351,7 +318,7 @@ if(RDK_BUILD_PYTHON_WRAPPERS)
|
||||
# Determine correct installation directory for Python bindings
|
||||
execute_process(
|
||||
COMMAND
|
||||
${PYTHON_EXECUTABLE} -c "import sys; import sysconfig; \
|
||||
${Python3_EXECUTABLE} -c "import sys; import sysconfig; \
|
||||
base_key = 'base' if sys.platform == 'win32' else 'platbase'; \
|
||||
schema = 'nt' if sys.platform == 'win32' else 'posix_prefix'; \
|
||||
print(sysconfig.get_path('platlib', schema, vars={base_key: '${CMAKE_INSTALL_PREFIX}'}))"
|
||||
@@ -392,21 +359,20 @@ if(RDK_BUILD_PYTHON_WRAPPERS)
|
||||
# We strip off the first word though (which will be the compiler name).
|
||||
execute_process(
|
||||
COMMAND
|
||||
${PYTHON_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var('LDSHARED').lstrip().split(' ', 1)[1])"
|
||||
${Python3_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var('LDSHARED').lstrip().split(' ', 1)[1])"
|
||||
OUTPUT_VARIABLE PYTHON_LDSHARED
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
message("PYTHON Py_ENABLE_SHARED: ${Py_ENABLE_SHARED}")
|
||||
message("PYTHON USING LINK LINE: ${PYTHON_LDSHARED}")
|
||||
endif()
|
||||
|
||||
|
||||
install(TARGETS rdkit_py_base EXPORT ${RDKit_EXPORTED_TARGETS}
|
||||
COMPONENT dev )
|
||||
|
||||
# check to see if we can find nbval,
|
||||
execute_process(
|
||||
COMMAND
|
||||
${PYTHON_EXECUTABLE} -c "import nbval"
|
||||
${Python3_EXECUTABLE} -c "import nbval"
|
||||
ERROR_VARIABLE nbvalERR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT nbvalERR)
|
||||
@@ -416,7 +382,7 @@ if(RDK_BUILD_PYTHON_WRAPPERS)
|
||||
endif()
|
||||
|
||||
else(RDK_BUILD_PYTHON_WRAPPERS)
|
||||
find_package(Boost ${RDK_BOOST_VERSION} REQUIRED)
|
||||
find_package(Boost ${RDK_BOOST_VERSION} REQUIRED CONFIG)
|
||||
endif(RDK_BUILD_PYTHON_WRAPPERS)
|
||||
|
||||
find_package(Eigen3)
|
||||
@@ -452,7 +418,7 @@ else()
|
||||
endif()
|
||||
|
||||
if(RDK_USE_BOOST_SERIALIZATION)
|
||||
find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS system serialization iostreams REQUIRED)
|
||||
find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS system serialization iostreams REQUIRED CONFIG)
|
||||
target_link_libraries(rdkit_base INTERFACE ${Boost_LIBRARIES})
|
||||
target_compile_definitions(rdkit_base INTERFACE -DRDK_USE_BOOST_SERIALIZATION)
|
||||
if(NOT Boost_USE_STATIC_LIBS)
|
||||
@@ -462,7 +428,7 @@ endif()
|
||||
|
||||
if(RDK_USE_BOOST_IOSTREAMS)
|
||||
target_compile_definitions(rdkit_base INTERFACE -DRDK_USE_BOOST_IOSTREAMS)
|
||||
find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS system iostreams REQUIRED)
|
||||
find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS system iostreams REQUIRED CONFIG)
|
||||
target_link_libraries(rdkit_base INTERFACE ${Boost_LIBRARIES})
|
||||
|
||||
if (NOT Boost_USE_STATIC_LIBS)
|
||||
@@ -471,7 +437,7 @@ if(RDK_USE_BOOST_IOSTREAMS)
|
||||
|
||||
# deal with zlib
|
||||
if (WIN32)
|
||||
find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS zlib)
|
||||
find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS zlib CONFIG)
|
||||
if(Boost_zlib_FOUND)
|
||||
set(zlib_lib Boost::zlib)
|
||||
endif()
|
||||
|
||||
@@ -2,9 +2,8 @@ if(NOT RDK_USE_BOOST_SERIALIZATION)
|
||||
message("== Making FilterCatalog without boost Serialization support")
|
||||
endif()
|
||||
|
||||
find_package(PythonInterp)
|
||||
if (PYTHONINTERP_FOUND)
|
||||
if(DEFINED PYTHON_VERSION_STRING AND ${PYTHON_VERSION_STRING} VERSION_GREATER "2.6" )
|
||||
find_package(Python3 COMPONENTS Interpreter)
|
||||
if (Python3::Interpreter)
|
||||
message("== Updating Filters.cpp from pains file")
|
||||
execute_process(
|
||||
COMMAND
|
||||
@@ -14,7 +13,6 @@ if (PYTHONINTERP_FOUND)
|
||||
if(NOT rc EQUAL 0)
|
||||
message(FATAL_ERROR "Failed updating Filters.cpp from wehi_pains.csv")
|
||||
endif(NOT rc EQUAL 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ rdkit_test(testRGroupDecompInternals testRGroupInternals.cpp
|
||||
rdkit_catch_test(rgroupCatchTests catch_rgd.cpp
|
||||
LINK_LIBRARIES RGroupDecomposition )
|
||||
|
||||
find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS program_options)
|
||||
find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS program_options CONFIG)
|
||||
if(RDK_BUILD_CPP_TESTS AND Boost_FOUND)
|
||||
add_executable(gaExample GaExample.cpp)
|
||||
if(NOT Boost_USE_STATIC_LIBS)
|
||||
|
||||
@@ -86,6 +86,7 @@ IF ( NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "Covera
|
||||
MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" )
|
||||
ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
|
||||
|
||||
find_package(Python3 COMPONENTS Interpreter)
|
||||
|
||||
# Param _targetname The name of new the custom make target
|
||||
# Param _testrunner The name of the target which runs the tests.
|
||||
@@ -118,7 +119,7 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
|
||||
# Capturing lcov counters and generating report
|
||||
COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
|
||||
COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' '*.ll' '*.yy' --output-file ${_outputname}.info.cleaned
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Code/cmake/Modules/fixup_coverage.py ${CMAKE_SOURCE_DIR} ${_outputname}.info.cleaned
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Code/cmake/Modules/fixup_coverage.py ${CMAKE_SOURCE_DIR} ${_outputname}.info.cleaned
|
||||
|
||||
COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned
|
||||
@@ -142,7 +143,7 @@ ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE
|
||||
# Pass them in list form, e.g.: "-j;2" for -j 2
|
||||
FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname)
|
||||
|
||||
IF(NOT PYTHON_EXECUTABLE)
|
||||
IF(NOT Python3_EXECUTABLE)
|
||||
MESSAGE(FATAL_ERROR "Python not found! Aborting...")
|
||||
ENDIF() # NOT PYTHON_EXECUTABLE
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ macro(rdkit_python_extension)
|
||||
CAR(RDKPY_NAME ${RDKPY_DEFAULT_ARGS})
|
||||
CDR(RDKPY_SOURCES ${RDKPY_DEFAULT_ARGS})
|
||||
if(RDK_BUILD_PYTHON_WRAPPERS)
|
||||
PYTHON_ADD_MODULE(${RDKPY_NAME} ${RDKPY_SOURCES})
|
||||
Python3_add_library(${RDKPY_NAME} MODULE ${RDKPY_SOURCES})
|
||||
set_target_properties(${RDKPY_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
if(WIN32)
|
||||
@@ -158,7 +158,7 @@ macro(rdkit_python_extension)
|
||||
${RDK_PYTHON_OUTPUT_DIRECTORY}/${RDKPY_DEST})
|
||||
endif(WIN32)
|
||||
|
||||
target_link_libraries(${RDKPY_NAME} ${RDKPY_LINK_LIBRARIES}
|
||||
target_link_libraries(${RDKPY_NAME} PUBLIC ${RDKPY_LINK_LIBRARIES}
|
||||
RDBoost rdkit_py_base rdkit_base )
|
||||
if("${PYTHON_LDSHARED}" STREQUAL "")
|
||||
else()
|
||||
@@ -206,7 +206,7 @@ macro(add_pytest)
|
||||
CAR(PYTEST_NAME ${PYTEST_DEFAULT_ARGS})
|
||||
CDR(PYTEST_SOURCES ${PYTEST_DEFAULT_ARGS})
|
||||
if(RDK_BUILD_PYTHON_WRAPPERS)
|
||||
add_test(${PYTEST_NAME} ${PYTHON_EXECUTABLE}
|
||||
add_test(${PYTEST_NAME} ${Python3_EXECUTABLE}
|
||||
${PYTEST_SOURCES})
|
||||
SET(RDKIT_PYTEST_CACHE "${PYTEST_NAME};${RDKIT_PYTEST_CACHE}" CACHE INTERNAL "Global list of python tests")
|
||||
endif(RDK_BUILD_PYTHON_WRAPPERS)
|
||||
@@ -214,7 +214,7 @@ endmacro(add_pytest)
|
||||
|
||||
function(add_jupytertest testname workingdir notebook)
|
||||
if(RDK_BUILD_PYTHON_WRAPPERS AND RDK_NBVAL_AVAILABLE)
|
||||
add_test(NAME ${testname} COMMAND ${PYTHON_EXECUTABLE} -m pytest --nbval ${notebook}
|
||||
add_test(NAME ${testname} COMMAND ${Python3_EXECUTABLE} -m pytest --nbval ${notebook}
|
||||
WORKING_DIRECTORY ${workingdir} )
|
||||
SET(RDKIT_JUPYTERTEST_CACHE "${testname};${RDKIT_JUPYTERTEST_CACHE}" CACHE INTERNAL "Global list of jupyter tests")
|
||||
endif()
|
||||
@@ -222,7 +222,7 @@ endfunction(add_jupytertest)
|
||||
|
||||
function(add_pythonpytest testname workingdir)
|
||||
if(RDK_BUILD_PYTHON_WRAPPERS)
|
||||
add_test(NAME ${testname} COMMAND ${PYTHON_EXECUTABLE} -m pytest
|
||||
add_test(NAME ${testname} COMMAND ${Python3_EXECUTABLE} -m pytest
|
||||
WORKING_DIRECTORY ${workingdir} )
|
||||
SET(RDKIT_PYTHONTEST_CACHE "${testname};${RDKIT_PYTHONTEST_CACHE}" CACHE INTERNAL "Global list of pytest tests")
|
||||
endif()
|
||||
|
||||
4
External/CoordGen/CMakeLists.txt
vendored
4
External/CoordGen/CMakeLists.txt
vendored
@@ -6,7 +6,7 @@ if(RDK_BUILD_MAEPARSER_SUPPORT OR RDK_BUILD_COORDGEN_SUPPORT)
|
||||
add_definitions(-DIN_MAEPARSER)
|
||||
endif()
|
||||
|
||||
find_package(maeparser MODULE)
|
||||
find_package(maeparser MODULE QUIET)
|
||||
|
||||
if(MAEPARSER_FORCE_BUILD OR (NOT maeparser_FOUND))
|
||||
if(NOT DEFINED MAEPARSER_DIR)
|
||||
@@ -61,7 +61,7 @@ if(RDK_BUILD_COORDGEN_SUPPORT)
|
||||
add_definitions(-DIN_COORDGEN)
|
||||
endif(MSVC AND (NOT RDK_INSTALL_DLLS_MSVC))
|
||||
|
||||
find_package(coordgen MODULE)
|
||||
find_package(coordgen MODULE QUIET)
|
||||
if(COORDGEN_FORCE_BUILD OR (NOT coordgen_FOUND))
|
||||
if(NOT DEFINED COORDGEN_DIR)
|
||||
set(COORDGEN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/coordgen")
|
||||
|
||||
@@ -363,14 +363,12 @@ class TestCase(unittest.TestCase):
|
||||
os.unlink('testData/bzr/search.out')
|
||||
|
||||
def test4CreateOptions(self):
|
||||
if os.path.exists('testData/bzr/Compounds.sqlt'):
|
||||
os.unlink('testData/bzr/Compounds.sqlt')
|
||||
if os.path.exists('testData/bzr/AtomPairs.sqlt'):
|
||||
os.unlink('testData/bzr/AtomPairs.sqlt')
|
||||
if os.path.exists('testData/bzr/Descriptors.sqlt'):
|
||||
os.unlink('testData/bzr/Descriptors.sqlt')
|
||||
if os.path.exists('testData/bzr/Fingerprints.sqlt'):
|
||||
os.unlink('testData/bzr/Fingerprints.sqlt')
|
||||
for fn in ('Compounds.sqlt', 'AtomPairs.sqlt', 'Descriptors.sqlt', 'Fingerprints.sqlt'):
|
||||
if os.path.exists(f'testData/bzr/{fn}'):
|
||||
try:
|
||||
os.unlink(f'testData/bzr/{fn}')
|
||||
except PermissionError:
|
||||
pass
|
||||
|
||||
p = subprocess.Popen((sys.executable, 'CreateDb.py', '--dbDir=testData/bzr',
|
||||
'--molFormat=smiles', '--noExtras', '--noSmiles', 'testData/bzr.smi'))
|
||||
@@ -394,14 +392,12 @@ class TestCase(unittest.TestCase):
|
||||
conn = None
|
||||
d = None
|
||||
|
||||
if os.path.exists('testData/bzr/Compounds.sqlt'):
|
||||
os.unlink('testData/bzr/Compounds.sqlt')
|
||||
if os.path.exists('testData/bzr/AtomPairs.sqlt'):
|
||||
os.unlink('testData/bzr/AtomPairs.sqlt')
|
||||
if os.path.exists('testData/bzr/Descriptors.sqlt'):
|
||||
os.unlink('testData/bzr/Descriptors.sqlt')
|
||||
if os.path.exists('testData/bzr/Fingerprints.sqlt'):
|
||||
os.unlink('testData/bzr/Fingerprints.sqlt')
|
||||
for fn in ('Compounds.sqlt', 'AtomPairs.sqlt', 'Descriptors.sqlt', 'Fingerprints.sqlt'):
|
||||
if os.path.exists(f'testData/bzr/{fn}'):
|
||||
try:
|
||||
os.unlink(f'testData/bzr/{fn}')
|
||||
except PermissionError:
|
||||
pass
|
||||
|
||||
p = subprocess.Popen((sys.executable, 'CreateDb.py', '--dbDir=testData/bzr',
|
||||
'--molFormat=smiles', '--noSmiles', '--noFingerprints', '--noLayeredFps',
|
||||
@@ -486,14 +482,12 @@ class TestCase(unittest.TestCase):
|
||||
self.assertTrue(os.path.exists('testData/bzr/Fingerprints.sqlt'))
|
||||
|
||||
def test5TestBackwardsCompat(self):
|
||||
if os.path.exists('testData/bzr/Compounds.sqlt'):
|
||||
os.unlink('testData/bzr/Compounds.sqlt')
|
||||
if os.path.exists('testData/bzr/AtomPairs.sqlt'):
|
||||
os.unlink('testData/bzr/AtomPairs.sqlt')
|
||||
if os.path.exists('testData/bzr/Descriptors.sqlt'):
|
||||
os.unlink('testData/bzr/Descriptors.sqlt')
|
||||
if os.path.exists('testData/bzr/Fingerprints.sqlt'):
|
||||
os.unlink('testData/bzr/Fingerprints.sqlt')
|
||||
for fn in ('Compounds.sqlt', 'AtomPairs.sqlt', 'Descriptors.sqlt', 'Fingerprints.sqlt'):
|
||||
if os.path.exists(f'testData/bzr/{fn}'):
|
||||
try:
|
||||
os.unlink(f'testData/bzr/{fn}')
|
||||
except PermissionError:
|
||||
pass
|
||||
|
||||
p = subprocess.Popen((sys.executable, 'CreateDb.py', '--dbDir=testData/bzr', '--noFingerprints',
|
||||
'--noDescriptors', 'testData/bzr.sdf'))
|
||||
|
||||
@@ -50,9 +50,9 @@ jobs:
|
||||
pool:
|
||||
vmImage: windows-2019
|
||||
variables:
|
||||
boost_version: 1.71.0
|
||||
boost_version: 1.84.0
|
||||
number_of_cores: '%NUMBER_OF_PROCESSORS%'
|
||||
python_name: python38
|
||||
python: python=3.12
|
||||
steps:
|
||||
- template: .azure-pipelines/vs_build.yml
|
||||
- job: Windows_VS2022_x64_dll
|
||||
@@ -60,9 +60,9 @@ jobs:
|
||||
pool:
|
||||
vmImage: windows-2019
|
||||
variables:
|
||||
boost_version: 1.71.0
|
||||
boost_version: 1.84.0
|
||||
number_of_cores: '%NUMBER_OF_PROCESSORS%'
|
||||
python_name: python38
|
||||
python: python=3.12
|
||||
steps:
|
||||
- template: .azure-pipelines/vs_build_dll.yml
|
||||
- job: Ubuntu_x64_cartridge
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
pool:
|
||||
vmImage: ubuntu-20.04
|
||||
variables:
|
||||
boost_version: 1.69.0
|
||||
boost_version: 1.71.0
|
||||
number_of_cores: nproc
|
||||
compiler: gxx_linux-64
|
||||
cc: gcc-10
|
||||
|
||||
@@ -20,7 +20,7 @@ string(CONCAT RUN_GEN_RDKIT_STUBS_PY "message("
|
||||
"set (COMMON_FILENAME ${CMAKE_CURRENT_BINARY_DIR_FWDSLASH}/gen_rdkit_stubs)\n"
|
||||
"execute_process("
|
||||
"COMMAND "
|
||||
"${PYTHON_EXECUTABLE} -m Scripts.gen_rdkit_stubs ${CONCURRENCY}"
|
||||
"${Python3_EXECUTABLE} -m Scripts.gen_rdkit_stubs ${CONCURRENCY}"
|
||||
"${CMAKE_SOURCE_DIR_FWDSLASH_QUOTED}${PYTHON_INSTDIR_FWDSLASH_QUOTED}"
|
||||
"WORKING_DIRECTORY \"${CMAKE_SOURCE_DIR_FWDSLASH}\" "
|
||||
"OUTPUT_FILE \"\${COMMON_FILENAME}.out\" "
|
||||
|
||||
Reference in New Issue
Block a user