diff --git a/brian2/devices/cpp_standalone/templates/win_makefile b/brian2/devices/cpp_standalone/templates/win_makefile index 33e13299e..7f08ed4c3 100644 --- a/brian2/devices/cpp_standalone/templates/win_makefile +++ b/brian2/devices/cpp_standalone/templates/win_makefile @@ -3,7 +3,6 @@ all: main.exe clean: del *.obj /s del *.exe /s - del sourcefiles.txt {% for fname, base in zip(source_files, source_bases) | sort(attribute='0')%} {{base}}.obj: win_makefile diff --git a/brian2/tests/test_cpp_standalone.py b/brian2/tests/test_cpp_standalone.py index 30d86209a..06caba86b 100644 --- a/brian2/tests/test_cpp_standalone.py +++ b/brian2/tests/test_cpp_standalone.py @@ -424,6 +424,21 @@ def test_run_with_debug(): run(defaultclock.dt) +@pytest.mark.cpp_standalone +@pytest.mark.standalone_only +def test_run_with_clean(): + # We just want to make sure that it works for now (there was a bug on Windows where + # using clean=True deleted sourcefiles.txt) + set_device( + "cpp_standalone", build_on_run=True, debug=True, clean=True, directory=None + ) + group = NeuronGroup(1, "v: 1", threshold="False") + syn = Synapses(group, group, on_pre="v += 1") + syn.connect() + mon = SpikeMonitor(group) + run(defaultclock.dt) + + @pytest.mark.cpp_standalone @pytest.mark.standalone_only def test_run_with_synapses_and_profile():