InsightSoftwareConsortium / InsightSoftwareConsortium/ITKSphinxExamples

Sort CMake install files consistently in `CMakeLists.txt` files

Open
#264 0 comments 1 reaction 0 assignees View on GitHub
Good first issue type:Enhancement
Dominant language
Jupyter Notebook
Stars
59
Forks
70
Avg merge
1d 15h
Merged PRs (30d)
12

Description

The file list saved to the `FILES` variable to be provided to the CMake `install ` command should follow the same sorting convention to improve the consistency and readability of the `CMakeLists.txxt` files.

Currently we find both instances:
```
install(FILES Code.cxx CMakeLists.txt Code.py
```
and
```
install(FILES Code.cxx Code.py CMakeLists.txt
```

It probably makes sense to group together or list consecutively all source code files (second instance) and have `CMakeLists.txt` either at the beginning (`install(FILES CMakeLists.txt Code.cxx Code.py`) or at the end (second instance). Although the former is not used, since `CMakeLists.txt` will always be present, it is "easier" to append a filename rather than inserting it.

This is an easy change to do (although it requires manual work unless some clever script to automate the process is developed) provided that we reach consensus or establish a criterion.

Contributor guide

No contributing guide indexed for this repository

Research direction

Search the repository's CMakeLists.txt files for install(FILES ...) lists and compare the existing ordering conventions. First establish whether CMakeLists.txt belongs at the beginning or end, then reorder the lists consistently and review the changes for accidental file omissions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.