Skip to content

Commit

Permalink
Merge branch 'master' into nodelist_support_different_regions
Browse files Browse the repository at this point in the history
  • Loading branch information
rgourdine committed Apr 26, 2024
2 parents 5f0f9cb + 8b35309 commit e5c4e05
Show file tree
Hide file tree
Showing 177 changed files with 3,703 additions and 3,985 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/neuron-ci.yml
Expand Up @@ -108,12 +108,12 @@ jobs:
# Unlink and re-link to prevent errors when GitHub macOS runner images
# install Python outside of brew; See actions/setup-python#577 and BlueBrain/libsonata/pull/317
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
brew install ccache coreutils doxygen flex bison mpich ninja xz autoconf autoconf automake libtool
brew install ccache coreutils doxygen flex bison mpich ninja xz autoconf automake libtool
# We use both for dynamic mpi in nrn
brew unlink mpich
brew install openmpi
brew install --cask xquartz
echo /usr/local/opt/flex/bin:/usr/local/opt/bison/bin >> $GITHUB_PATH
echo "$(brew --prefix)/opt/flex/bin:$(brew --prefix)/opt/bison/bin" >> $GITHUB_PATH
# Core https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
echo CMAKE_BUILD_PARALLEL_LEVEL=3 >> $GITHUB_ENV
echo CTEST_PARALLEL_LEVEL=3 >> $GITHUB_ENV
Expand Down Expand Up @@ -273,7 +273,7 @@ jobs:
else
CC=$(command -v clang-14)
CXX=$(command -v clang++-14)
symbolizer_path=$(realpath $(command -v llvm-symbolizer-14))
symbolizer_path="$(readlink -f "$(command -v llvm-symbolizer-14)")"
cmake_args+=(-DLLVM_SYMBOLIZER_PATH="${symbolizer_path}")
fi
fi
Expand Down
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Expand Up @@ -167,7 +167,7 @@ simulation_stack:
variables:
bb5_ntasks: 2 # so we block 16 cores
bb5_cpus_per_task: 8 # ninja -j {this}
bb5_memory: 120G # ~1.5*16*384/80 (~1.5x more as we have seen OOMs)
bb5_memory: 160G # ~2*16*384/80 (~2x more as we have seen OOMs)

.spack_intel:
variables:
Expand All @@ -192,7 +192,7 @@ simulation_stack:
extends: [.ctest]
variables:
bb5_ntasks: 16
bb5_memory: 120G # ~1.5*16*384/80 (~1.5x more as we have seen OOMs)
bb5_memory: 160G # ~2*16*384/80 (~2x more as we have seen OOMs)

# Build NMODL once with GCC
build:nmodl:
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Expand Up @@ -444,6 +444,10 @@ if(NRN_ENABLE_THREADS)
list(APPEND NRN_COMPILE_DEFS NRN_ENABLE_THREADS)
endif()

# Some files are shared by NEURON and CoreNEURON and use #if CORENRN_BUILD to distinguish between
# which build is occurring.
list(APPEND NRN_COMPILE_DEFS CORENRN_BUILD=0)

# =============================================================================
# Profiler/Instrumentation Options
# =============================================================================
Expand Down Expand Up @@ -729,7 +733,7 @@ add_custom_target(
# =============================================================================
# ~~~
# Update hh.mod for CoreNEURON compatibility
# - Replace GLOBAL variable by RANHE
# - Replace GLOBAL variable by RANGE
# - Comment out TABLE
# ~~~
# =============================================================================
Expand Down Expand Up @@ -826,10 +830,12 @@ if(NRN_ENABLE_TESTS)
set(neurondemo_files
"${neurondemo_prefix}/special"
"${neurondemo_prefix}/${CMAKE_SHARED_LIBRARY_PREFIX}nrnmech${CMAKE_SHARED_LIBRARY_SUFFIX}")

add_custom_command(
OUTPUT ${neurondemo_files}
COMMAND ${CMAKE_COMMAND} -E env ${NRN_RUN_FROM_BUILD_DIR_ENV}
${NRN_SANITIZER_ENABLE_ENVIRONMENT} "${PROJECT_BINARY_DIR}/bin/nrnivmodl"
DEPENDS nrnivmodl_dependency
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/share/nrn/demo/release
VERBATIM)

Expand Down
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -94,6 +94,10 @@ formatted, indented, documented, and commented.

The [Neuron Development Topics](https://neuronsimulator.github.io/nrn/dev/index.html) section of the documentation provides a starting point for understanding NEURON's internals.

### Building NEURON

To build NEURON, please follow the instructions [here](docs/install/install_instructions.md#installing-source-distributions).

### Code Formatting

Currently we have enabled CMake and Clang code formatting using [cmake-format](https://github.com/cheshirekow/cmake_format) and [clang-format](https://clang.llvm.org/docs/ClangFormat.html). Before submitting a PR, make sure to run cmake-format and clang-format as below:
Expand Down Expand Up @@ -142,9 +146,6 @@ Or,

See [cmake-format](https://github.com/cheshirekow/cmake_format) documentation for details.

make && make format-pr
```
## Python Contributions

The Python source code is located under `share/lib/python/neuron`. Python unit tests are
Expand Down
10 changes: 5 additions & 5 deletions bin/CMakeLists.txt
Expand Up @@ -36,7 +36,7 @@ include(CMakeListsNrnMech)
# =============================================================================
# nrnmech_makefile (based on coreneuron Configure templates)
# =============================================================================
nrn_configure_file(nrngui bin)
configure_file("nrngui.in" "nrngui" @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sortspike ${CMAKE_CURRENT_BINARY_DIR}/sortspike COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nrnivmodl_makefile_cmake.in
${PROJECT_BINARY_DIR}/bin/nrnmech_makefile @ONLY)
Expand All @@ -49,10 +49,10 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nrnpyenv.sh.in ${PROJECT_BINARY_DIR}/
# file(CHMOD ...) and v3.20+ support setting permissions directly in configure_file(...).
set(NRN_CONFIG_EXE_FILES "nrnivmodl" "neurondemo")
foreach(NRN_CONFIG_EXE_FILE ${NRN_CONFIG_EXE_FILES})
nrn_configure_dest_src(${NRN_CONFIG_EXE_FILE} bin/tmp ${NRN_CONFIG_EXE_FILE} bin)
configure_file("${NRN_CONFIG_EXE_FILE}.in" "tmp/${NRN_CONFIG_EXE_FILE}" @ONLY)
file(
COPY ${PROJECT_BINARY_DIR}/bin/tmp/${NRN_CONFIG_EXE_FILE}
DESTINATION ${PROJECT_BINARY_DIR}/bin
COPY "${CMAKE_CURRENT_BINARY_DIR}/tmp/${NRN_CONFIG_EXE_FILE}"
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}"
FILE_PERMISSIONS
OWNER_READ
OWNER_WRITE
Expand All @@ -62,7 +62,7 @@ foreach(NRN_CONFIG_EXE_FILE ${NRN_CONFIG_EXE_FILES})
WORLD_READ
WORLD_EXECUTE)
endforeach()
file(REMOVE_RECURSE ${PROJECT_BINARY_DIR}/bin/tmp)
file(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/bin/tmp")

# =============================================================================
# Install targets
Expand Down
2 changes: 1 addition & 1 deletion bin/nrnivmodl-core.in
Expand Up @@ -109,7 +109,7 @@ shopt -s nullglob
if [ -d "$params_MODS_PATH" ]; then
files=( "$params_MODS_PATH"/*.mod )
if [ ${#files} -eq 0 ]; then
echo "WARNING: No mod files found in '$(realpath ${params_MODS_PATH})', compiling default ones only!"
echo "WARNING: No mod files found in '$(readlink -f "${params_MODS_PATH}")', compiling default ones only!"
fi
else
echo "FATAL: Invalid mods directory: '$params_MODS_PATH'"
Expand Down
2 changes: 1 addition & 1 deletion bin/nrnivmodl.in
Expand Up @@ -34,7 +34,7 @@ export prefix
export bindir
export libdir

if command -v xcrun; then
if command -v xcrun >/dev/null 2>&1; then
@NRN_OSX_BUILD_TRUE@export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
@NRN_OSX_BUILD_TRUE@export MACOSX_DEPLOYMENT_TARGET="@CMAKE_OSX_DEPLOYMENT_TARGET@"
if [ -z "${MACOSX_DEPLOYMENT_TARGET}" ]; then
Expand Down
4 changes: 2 additions & 2 deletions bin/nrnivmodl_core_makefile.in
Expand Up @@ -71,7 +71,7 @@ CXX_LINK_EXE_CMD = $(CXX) $(CXXFLAGS) @CMAKE_EXE_LINKER_FLAGS@
CXX_SHARED_LIB_CMD = $(CXX) $(CXXFLAGS) @CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS@ @CMAKE_SHARED_LIBRARY_CXX_FLAGS@ @CMAKE_SHARED_LINKER_FLAGS@

# env variables required for mod2c or nmodl
NMODL_ENV_VAR = @CORENRN_SANITIZER_ENABLE_ENVIRONMENT_STRING@ PYTHONPATH=@CORENRN_NMODL_PYTHONPATH@:${CORENRN_LIB_DIR}/python MODLUNIT=$(CORENRN_SHARE_NMODL_DIR)/nrnunits.lib
NMODL_ENV_VAR = @CORENRN_SANITIZER_ENABLE_ENVIRONMENT_STRING@ PYTHONPATH=${PYTHONPATH}:@CORENRN_NMODL_PYTHONPATH@:${CORENRN_LIB_DIR}/python MODLUNIT=$(CORENRN_SHARE_NMODL_DIR)/nrnunits.lib

ifeq (@CORENRN_ENABLE_GPU@, ON)
nmodl_arguments_c=@NMODL_ACC_BACKEND_ARGS@ @NMODL_COMMON_ARGS@
Expand Down Expand Up @@ -145,7 +145,7 @@ endif


# main target to build binary
$(SPECIAL_EXE): $(corenrnmech_lib_target)
$(SPECIAL_EXE): $(corenrnmech_lib_target) $(CORENRN_SHARE_CORENRN_DIR)/coreneuron.cpp
@printf " => $(C_GREEN)Binary$(C_RESET) creating $(SPECIAL_EXE)\n"
$(CXX_LINK_EXE_CMD) -o $(SPECIAL_EXE) $(CORENRN_SHARE_CORENRN_DIR)/coreneuron.cpp \
-I$(CORENRN_INC_DIR) $(INCFLAGS) \
Expand Down
2 changes: 1 addition & 1 deletion bin/nrnivmodl_makefile_cmake.in
Expand Up @@ -121,7 +121,7 @@ C_GREEN := \033[32m

# Take the main and link with nrnmech.
# RPATH is set for DESTDIR_RPATH and coreneuron lib
special: $(mech_lib)
special: $(mech_lib) $(datadir)/nrnmain.cpp
@printf " => $(C_GREEN)LINKING$(C_RESET) executable \"${PWD}/$(special)\" LDFLAGS are: $(LDFLAGS)\n"
$(CXX_LINK_EXE) -I $(incdir) -I $(incdir)/nrncvode -DAUTO_DLOPEN_NRNMECH=0 $(datadir)/nrnmain.cpp -o $(special) \
-L$(OBJS_DIR) -l$(mech_libname) $(NRNLIB_FLAGS) -l$(mech_libname) $(extra_lib_link) -Wl,-rpath,'$(DESTDIR_RPATH)' -Wl,-rpath,$(libdir) $(LDFLAGS) $(EXTRA_LDFLAGS)
Expand Down
76 changes: 21 additions & 55 deletions cmake/ConfigFileSetting.cmake
@@ -1,10 +1,6 @@
# =============================================================================
# Definitions used in nrnconf.h and nmodlconf.h
# =============================================================================
set(PACKAGE_NAME "${PACKAGE}")
set(PACKAGE_TARNAME "${PACKAGE}")
set(PACKAGE_BUGREPORT "\"\"")
set(PACKAGE_URL "\"\"")
set(UNQUOTED_PACKAGE_VERSION "${PROJECT_VERSION}")

# ~~~
Expand All @@ -13,7 +9,6 @@ set(UNQUOTED_PACKAGE_VERSION "${PROJECT_VERSION}")
# ~~~
nrn_set_string(PACKAGE "nrn")
nrn_set_string(NRNHOST "${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}")
nrn_set_string(PACKAGE_STRING "nrn ${PROJECT_VERSION}")
nrn_set_string(PACKAGE_VERSION "${PROJECT_VERSION}")
nrn_set_string(VERSION "${PROJECT_VERSION}")
nrn_set_string(NRN_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib")
Expand All @@ -24,7 +19,6 @@ nrn_set_string(DLL_DEFAULT_FNAME "${CMAKE_SYSTEM_PROCESSOR}/.libs/libnrnmech.so"
add_definitions(-DHAVE_CONFIG_H)

set(YYTEXT_POINTER 1)
set(TIME_WITH_SYS_TIME 1)
# below two are universal nowadays
set(prefix ${CMAKE_INSTALL_PREFIX})
set(host_cpu ${CMAKE_SYSTEM_PROCESSOR})
Expand Down Expand Up @@ -120,31 +114,20 @@ set(SUNDIALS_USE_GENERIC_MATH 1)
nrn_check_include_files(dlfcn.h HAVE_DLFCN_H)
nrn_check_include_files(execinfo.h HAVE_EXECINFO_H)
nrn_check_include_files(malloc.h HAVE_MALLOC_H)
nrn_check_include_files(strings.h HAVE_STRINGS_H)
nrn_check_include_files(sys/types.h HAVE_SYS_TYPES_H)
nrn_check_include_files(unistd.h HAVE_UNISTD_H)

# =============================================================================
# Check for standard headers
# =============================================================================
check_include_files("dlfcn.h;stdint.h;stddef.h;inttypes.h;stdlib.h;strings.h;string.h;float.h"
STDC_HEADERS)

# =============================================================================
# Check symbol using check_cxx_symbol_exists but use ${NRN_HEADERS_INCLUDE_LIST}
# =============================================================================
# note that this must be called after all *check_include_files because we use
# NRN_HEADERS_INCLUDE_LIST is second argument (headers) is empty.
nrn_check_symbol_exists("bcopy" "strings.h" HAVE_BCOPY)
nrn_check_symbol_exists("bzero" "strings.h" HAVE_BZERO)
nrn_check_symbol_exists("index" "strings.h" HAVE_INDEX)
nrn_check_symbol_exists("isatty" "unistd.h" HAVE_ISATTY)
nrn_check_symbol_exists("iv" "" HAVE_IV)
nrn_check_symbol_exists("mallinfo" "malloc.h" HAVE_MALLINFO)
nrn_check_symbol_exists("mallinfo2" "malloc.h" HAVE_MALLINFO2)
nrn_check_symbol_exists("mkstemp" "stdlib.h" HAVE_MKSTEMP)
nrn_check_symbol_exists("posix_memalign" "stdlib.h" HAVE_POSIX_MEMALIGN)
nrn_check_symbol_exists("realpath" "stdlib.h" HAVE_REALPATH)
nrn_check_symbol_exists("setenv" "stdlib.h" HAVE_SETENV)
nrn_check_symbol_exists("setitimer" "sys/time.h" HAVE_SETITIMER)
nrn_check_symbol_exists("sigaction" "signal.h" HAVE_SIGACTION)
Expand All @@ -161,64 +144,47 @@ nrn_check_type_exists(sys/types.h pid_t int pid_t)
nrn_check_type_exists(sys/types.h size_t "unsigned int" size_t)
nrn_check_type_exists(sys/types.h uid_t int uid_t)

# =============================================================================
# Set return type of signal in RETSIGTYPE
# =============================================================================
nrn_check_signal_return_type(RETSIGTYPE)

# =============================================================================
# Check direcotry manipulation header
# =============================================================================
nrn_check_dir_exists(sys/ndir.h HAVE_SYS_NDIR_H)

# =============================================================================
# Copy cmake specific template files
# =============================================================================
# nrnconf.h.in and nmodlconf.h.in were originally generated from config.h.in generated by
# autoheader. We use repository copy cmake_nrnconf.h.in to create nrnconf.h and nmodlconf.h directly
# in the PROJECT_BINARY_DIR from the nrn_configure_dest_src macro.

# =============================================================================
# Generate file from file.in template
# =============================================================================
set(version_strs ${NRN_PYTHON_VERSIONS})
list(TRANSFORM version_strs APPEND "\"")
list(TRANSFORM version_strs PREPEND "\"")
string(JOIN ", " NRN_DYNAMIC_PYTHON_LIST_OF_VERSION_STRINGS ${version_strs})
nrn_configure_dest_src(nrnconf.h . cmake_nrnconf.h .)
nrn_configure_dest_src(nmodlconf.h . cmake_nrnconf.h .)
nrn_configure_file(nrnmpiuse.h src/oc)
nrn_configure_file(nrnconfigargs.h src/nrnoc)
nrn_configure_file(nrnneosm.h src/nrncvode)
nrn_configure_file(sundials_config.h src/sundials)
nrn_configure_dest_src(nrn.defaults share/nrn/lib nrn.defaults share/lib)
configure_file("${PROJECT_SOURCE_DIR}/cmake_nrnconf.h.in" "${PROJECT_BINARY_DIR}/nrnconf.h" @ONLY)
configure_file("${PROJECT_SOURCE_DIR}/src/oc/nrnmpiuse.h.in"
"${PROJECT_BINARY_DIR}/src/oc/nrnmpiuse.h" @ONLY)
configure_file("${PROJECT_SOURCE_DIR}/src/nrnoc/nrnconfigargs.h.in"
"${PROJECT_BINARY_DIR}/src/nrnoc/nrnconfigargs.h" @ONLY)
configure_file("${PROJECT_SOURCE_DIR}/src/nrncvode/nrnneosm.h.in"
"${PROJECT_BINARY_DIR}/src/nrncvode/nrnneosm.h" @ONLY)
configure_file("${PROJECT_SOURCE_DIR}/src/sundials/sundials_config.h.in"
"${PROJECT_BINARY_DIR}/src/sundials/sundials_config.h" @ONLY)
configure_file("${PROJECT_SOURCE_DIR}/share/lib/nrn.defaults.in"
"${PROJECT_BINARY_DIR}/share/nrn/lib/nrn.defaults" @ONLY)
file(COPY ${PROJECT_SOURCE_DIR}/share/lib/nrnunits.lib
DESTINATION ${PROJECT_BINARY_DIR}/share/nrn/lib)

if(NRN_MACOS_BUILD)
set(abs_top_builddir ${PROJECT_BINARY_DIR})
nrn_configure_file(macdist.pkgproj src/mac)
nrn_configure_file(postinstall.sh src/mac)
configure_file("${PROJECT_SOURCE_DIR}/src/mac/macdist.pkgproj.in"
"${PROJECT_BINARY_DIR}/src/mac/macdist.pkgproj" @ONLY)
configure_file("${PROJECT_SOURCE_DIR}/src/mac/postinstall.sh.in"
"${PROJECT_BINARY_DIR}/src/mac/postinstall.sh" @ONLY)
endif()
if(MINGW)
dospath("${CMAKE_INSTALL_PREFIX}" WIN_MARSHAL_NRN_DIR)
nrn_configure_file(nrnsetupmingw.nsi src/mswin)
nrn_configure_file(pre_setup_exe.sh src/mswin)
configure_file("${PROJECT_SOURCE_DIR}/src/mswin/nrnsetupmingw.nsi.in"
"${PROJECT_BINARY_DIR}/src/mswin/nrnsetupmingw.nsi" @ONLY)
configure_file("${PROJECT_SOURCE_DIR}/src/mswin/pre_setup_exe.sh.in"
"${PROJECT_BINARY_DIR}/src/mswin/pre_setup_exe.sh" @ONLY)
# Just name and not path since setup.exe user chooses location of install.
set(CXX x86_64-w64-mingw32-g++.exe)
set(BUILD_MINGW_TRUE "")
set(BUILD_MINGW_FALSE "#")
set(nrnskip_rebase "#")
nrn_configure_file(mknrndll.mak src/mswin/lib)
endif()

# =============================================================================
# If Interviews is not provided, configure local files
# =============================================================================
if(NOT NRN_ENABLE_INTERVIEWS)
nrn_configure_dest_src(config.h . cmake_nrnconf.h .)
else()
file(REMOVE "${PROJECT_BINARY_DIR}/config.h")
configure_file("${PROJECT_SOURCE_DIR}/src/mswin/lib/mknrndll.mak.in"
"${PROJECT_BINARY_DIR}/src/mswin/lib/mknrndll.mak" @ONLY)
endif()

# Prepare some variables for setup.py extension building (hoc_module, rx3d and music)
Expand Down
62 changes: 0 additions & 62 deletions cmake/MacroHelper.cmake
Expand Up @@ -62,68 +62,6 @@ macro(nrn_check_type_exists HEADER TYPE DEFAULT_TYPE VARIABLE)
file(REMOVE "conftest.cpp")
endmacro()

# =============================================================================
# Check return type of signal
# =============================================================================
macro(nrn_check_signal_return_type VARIABLE)
# code template to check signal support
string(CONCAT CONFTEST_RETSIGTYPE "#include <sys/types.h>\n" "#include <signal.h>\n"
"int main () {\n" " return *(signal (0, 0)) (0) == 1\;\n" "}\n")
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/conftest.cpp ${CONFTEST_RETSIGTYPE})
try_compile(MY_RESULT_VAR ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/conftest.cpp)
if(MY_RESULT_VAR)
set(${VARIABLE} int)
else()
set(${VARIABLE} void)
endif()
file(REMOVE "conftest.cpp")
endmacro()

# =============================================================================
# Transform PROJECT_SOURCE_DIR/sdir/sfile.in to PROJECT_BINARY_DIR/bdir/bfile
# =============================================================================
# ~~~
# This 4 arg macro transformsPROJECT_SOURCE_DIR/sdir/sfile.in into
# PROJECT_BINARY_DIR/bdir/bfile .
# THE shorter two arg form transforms PROJECT_SOURCE_DIR/dir/file.in into
# PROJECT_BINARY_DIR/dir/file
# This first copies with some replacement the sfile.in to _cmake_tmp_bfile.in
# so that the normal cmake configure_file command works to make a proper
# cmake_file. Then that is compared to a possibly existing bfile and,
# if different, copies _cmake_tmp_bfile to bfile. This prevents recompilation of
# .o files that depend on unchanged bfile. The sdir arg is the path relative to
# PROJECT_SOURCE_DIR, the bdir arg is the path relative to PROJECT_BINARY_DIR.
# Note that everytime cmake is run, the bfile is compared to a newly created
# _cmake_tmp_bfile consistent with the current cmake args.
# Note that the sfile arg does NOT contain the .in suffix.
# ~~~
macro(nrn_configure_dest_src bfile bdir sfile sdir)
set(infile ${PROJECT_SOURCE_DIR}/${sdir}/${sfile}.in)
set(bin_dir ${PROJECT_BINARY_DIR}/${bdir})
file(MAKE_DIRECTORY ${bin_dir})
execute_process(
COMMAND sed "s/\#undef *\\(.*\\)/\#cmakedefine \\1 @\\1@/"
INPUT_FILE ${infile}
OUTPUT_FILE ${bin_dir}/_cmake_tmp_${bfile}.in)
configure_file(${bin_dir}/_cmake_tmp_${bfile}.in ${bin_dir}/_cmake_tmp_${bfile} @ONLY)
execute_process(COMMAND cmp -s ${bin_dir}/_cmake_tmp_${bfile} ${bin_dir}/${bfile}
RESULT_VARIABLE result)
if(result EQUAL 0)
file(REMOVE ${bin_dir}/_cmake_tmp_${bfile})
else()
file(RENAME ${bin_dir}/_cmake_tmp_${bfile} ${bin_dir}/${bfile})
endif()
file(REMOVE ${bin_dir}/_cmake_tmp_${bfile}.in)
set_property(
DIRECTORY
APPEND
PROPERTY CMAKE_CONFIGURE_DEPENDS ${infile})
endmacro()

macro(nrn_configure_file file dir)
nrn_configure_dest_src(${file} ${dir} ${file} ${dir})
endmacro()

# =============================================================================
# Perform check_include_files and add it to NRN_HEADERS_INCLUDE_LIST if exist Passing an optional
# CXX will call check_include_files_cxx instead.
Expand Down

0 comments on commit e5c4e05

Please sign in to comment.