diff --git a/.travis.yml b/.travis.yml index a09e43e1..ec14a47d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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} diff --git a/cmake/custom/xcfun.cmake b/cmake/custom/xcfun.cmake index 5a2e82a8..4a4d54cc 100644 --- a/cmake/custom/xcfun.cmake +++ b/cmake/custom/xcfun.cmake @@ -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:: # @@ -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 @@ -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) @@ -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() diff --git a/setup b/setup index edf19fff..901b79b3 100755 --- a/setup +++ b/setup @@ -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'] != "''": diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5447d7ae..c89b701c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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 )