Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ before_script:
-DCMAKE_Fortran_COMPILER=${Fortran_COMPILER}
-DCMAKE_BUILD_TYPE=${BUILD_TYPE}
-DENABLE_CODE_COVERAGE=${COVERAGE}
-DENABLE_PYTHON_INTERFACE=ON
-DXCFun_ENABLE_PYTHON_INTERFACE=ON
-DPYTHON_EXECUTABLE=$(which python)
-DCMAKE_INSTALL_PREFIX=$HOME/Software/xcfun
${PYBIND11}
Expand Down
8 changes: 4 additions & 4 deletions cmake/custom/xcfun.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Variables modified::
#
# XCFun_XC_MAX_ORDER -- Maximum order of derivatives of the exchange-correlation kernel
# ENABLE_PYTHON_INTERFACE -- Whether to enable the Python interface
# XCFun_ENABLE_PYTHON_INTERFACE -- Whether to enable the Python interface
#
# autocmake.yml configuration::
#
Expand All @@ -14,7 +14,7 @@
# - "--pybindings Enable Python interface [default: OFF]."
# define:
# - "'-DXCFun_XC_MAX_ORDER=\"{0}\"'.format(arguments['--xcmaxorder'])"
# - "'-DENABLE_PYTHON_INTERFACE={0}'.format(arguments['--pybindings'])"
# - "'-DXCFun_ENABLE_PYTHON_INTERFACE={0}'.format(arguments['--pybindings'])"

option_with_default(XCFun_XC_MAX_ORDER "Maximum order of derivatives of the exchange-correlation kernel" 3)
# Make sure user selected a valuer larger than 2
Expand All @@ -41,7 +41,7 @@ else()
endif()
file(TO_NATIVE_PATH "lib/${PYMOD_INSTALL_LIBDIR}/xcfun" PYMOD_INSTALL_FULLDIR)

option_with_print(ENABLE_PYTHON_INTERFACE "Enable Python interface" OFF)
option_with_print(XCFun_ENABLE_PYTHON_INTERFACE "Enable Python interface" OFF)

if(ENABLE_FC_SUPPORT)
enable_language(Fortran)
Expand All @@ -55,7 +55,7 @@ endif()
add_subdirectory(${PROJECT_SOURCE_DIR}/api)
add_subdirectory(${PROJECT_SOURCE_DIR}/src)

if(ENABLE_PYTHON_INTERFACE)
if(XCFun_ENABLE_PYTHON_INTERFACE)
include(${PROJECT_SOURCE_DIR}/external/upstream/fetch_pybind11.cmake)
add_subdirectory(python)
endif()
2 changes: 1 addition & 1 deletion setup
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def gen_cmake_command(options, arguments):
command.append('-DENABLE_CODE_COVERAGE={0}'.format(arguments['--coverage']))
command.append('-DSTATIC_LIBRARY_ONLY={0}'.format(arguments['--static']))
command.append('-DXCFun_XC_MAX_ORDER="{0}"'.format(arguments['--xcmaxorder']))
command.append('-DENABLE_PYTHON_INTERFACE={0}'.format(arguments['--pybindings']))
command.append('-DXCFun_ENABLE_PYTHON_INTERFACE={0}'.format(arguments['--pybindings']))
command.append('-DCMAKE_BUILD_TYPE={0}'.format(arguments['--type']))
command.append('-G"{0}"'.format(arguments['--generator']))
if arguments['--cmake-options'] != "''":
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if(ENABLE_FC_SUPPORT)
add_test(fortran_example ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/fortran_example)
endif()

if(ENABLE_PYTHON_INTERFACE)
if(XCFun_ENABLE_PYTHON_INTERFACE)
list(APPEND _pytest_files
${CMAKE_CURRENT_SOURCE_DIR}/test_xcfun.py
)
Expand Down