Skip to content

Commit b4ab8a2

Browse files
authored
Deterministic ordering of source files in generated CMakeLists.txt (#2322)
Simpler model diffs.
1 parent c4bcb9d commit b4ab8a2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

python/sdist/amici/de_export.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3488,12 +3488,14 @@ def vector_initializer(v):
34883488
def _write_c_make_file(self):
34893489
"""Write CMake ``CMakeLists.txt`` file for this model."""
34903490
sources = "\n".join(
3491-
f + " "
3492-
for f in os.listdir(self.model_path)
3493-
if f.endswith(
3494-
(".cpp", ".h"),
3491+
sorted(
3492+
f + " "
3493+
for f in os.listdir(self.model_path)
3494+
if f.endswith(
3495+
(".cpp", ".h"),
3496+
)
3497+
and f != "main.cpp"
34953498
)
3496-
and f != "main.cpp"
34973499
)
34983500

34993501
template_data = {

0 commit comments

Comments
 (0)