We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We use:
file( GLOB NMODL_PYTHON_FILES RELATIVE "${NMODL_PROJECT_SOURCE_DIR}/python/nmodl/" CONFIGURE_DEPENDS "${NMODL_PROJECT_SOURCE_DIR}/python/nmodl/*.py") foreach(file IN LISTS NMODL_PYTHON_FILES) cpp_cc_build_time_copy(INPUT ${NMODL_PROJECT_SOURCE_DIR}/python/nmodl/${file} OUTPUT ${CMAKE_BINARY_DIR}/lib/nmodl/${file}) list(APPEND nmodl_python_binary_dir_files "${CMAKE_BINARY_DIR}/lib/nmodl/${file}") endforeach()
with
function(cpp_cc_build_time_copy) cmake_parse_arguments(opt "NO_TARGET" "INPUT;OUTPUT" "" ${ARGN}) add_custom_command( OUTPUT "${opt_OUTPUT}" DEPENDS "${opt_INPUT}" COMMAND ${CMAKE_COMMAND} -E copy "${opt_INPUT}" "${opt_OUTPUT}") if(NOT opt_NO_TARGET) string(SHA256 target_name "${opt_INPUT};${opt_OUTPUT}") set(target_name "build-time-copy-${target_name}") if(NOT TARGET "${target_name}") add_custom_target(${target_name} ALL DEPENDS "${opt_OUTPUT}") endif() endif()
to copy the Python files into a subdirectory of lib. Unfortunately, it now occasionally happens that the copying fails when building in parallel:
lib
[ 1%] Generating ../../lib/nmodl/ode.py ... [ 2%] Generating ../../lib/nmodl/ode.py ... Error copying file "/home/lucg/git/bbp/nmodl/python/nmodl/ode.py" to "/home/lucg/git/bbp/nmodl/build-debug/lib/nmodl/ode.py".
Note that lib/nmodl/ode.py is generated twice.
lib/nmodl/ode.py
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We use:
with
to copy the Python files into a subdirectory of
lib
. Unfortunately, it now occasionally happens that the copying fails when building in parallel:Note that
lib/nmodl/ode.py
is generated twice.The text was updated successfully, but these errors were encountered: