diff --git a/pythonbindings/CMakeLists.txt b/pythonbindings/CMakeLists.txt index cb5608b161d3dbda1ee1c007caed3fec7b78076f..7b8a0cf9c9d95f64509276191dfae68a8fc04e0d 100644 --- a/pythonbindings/CMakeLists.txt +++ b/pythonbindings/CMakeLists.txt @@ -79,10 +79,10 @@ IF(BUILD_VF_CPU) target_include_directories(cpu_bindings PRIVATE ${CMAKE_SOURCE_DIR}/src/) target_include_directories(cpu_bindings PRIVATE ${CMAKE_BINARY_DIR}) - target_compile_definitions(cpu_bindings PUBLIC VF_DOUBLE_ACCURACY) # TODO: remove this and always set it dynamically - target_compile_definitions(basics_bindings PUBLIC VF_DOUBLE_ACCURACY) - target_compile_definitions(logger_bindings PUBLIC VF_DOUBLE_ACCURACY) - target_compile_definitions(lbm_bindings PUBLIC VF_DOUBLE_ACCURACY) + # target_compile_definitions(cpu_bindings PUBLIC VF_DOUBLE_ACCURACY) # TODO: remove this and always set it dynamically + # target_compile_definitions(basics_bindings PUBLIC VF_DOUBLE_ACCURACY) + # target_compile_definitions(logger_bindings PUBLIC VF_DOUBLE_ACCURACY) + # target_compile_definitions(lbm_bindings PUBLIC VF_DOUBLE_ACCURACY) target_compile_definitions(cpu_bindings PRIVATE VF_METIS VF_MPI) add_dependencies(python_bindings cpu_bindings) @@ -100,3 +100,16 @@ IF(BUILD_VF_CPU) target_compile_definitions(pymuparser PRIVATE VF_METIS VF_MPI) target_link_libraries(pymuparser PRIVATE muparser) ENDIF() + +if(BUILD_VF_DOUBLE_ACCURACY) +IF(BUILD_VF_CPU) + target_compile_definitions(cpu_bindings PRIVATE VF_DOUBLE_ACCURACY) +endif() + target_compile_definitions(basics_bindings PRIVATE VF_DOUBLE_ACCURACY) + target_compile_definitions(logger_bindings PRIVATE VF_DOUBLE_ACCURACY) + target_compile_definitions(lbm_bindings PRIVATE VF_DOUBLE_ACCURACY) + IF(BUILD_VF_GPU) + target_compile_definitions(gpu_bindings PRIVATE VF_DOUBLE_ACCURACY) + endif() + target_compile_definitions(communicator_bindings PRIVATE VF_DOUBLE_ACCURACY) +endif() \ No newline at end of file diff --git a/pythonbindings/pyfluids/__init__.py b/pythonbindings/pyfluids/__init__.py index c8b0563b014a9dbe595d9b4525d8890269888d45..5b4197972c0a8738c551e57e635415e3858f53e6 100644 --- a/pythonbindings/pyfluids/__init__.py +++ b/pythonbindings/pyfluids/__init__.py @@ -33,26 +33,26 @@ r""" ======================================================================================= """ try: - from .bindings import basics + from . import basics except ImportError: print("Basics bindings not included") try: - from .bindings import logger + from . import logger except ImportError: print("Logger bindings not included") try: - from .bindings import lbm + from . import lbm except ImportError: print("LBM bindings not included") try: - from .bindings import communicator + from . import communicator except ImportError: print("communicator bindings not included") try: - from .bindings import gpu + from . import gpu except ImportError: print("GPU bindings not included") try: - from .bindings import cpu + from . import cpu except ImportError: print("CPU bindings not included") \ No newline at end of file