JurassicParkTrespasser icon indicating copy to clipboard operation
JurassicParkTrespasser copied to clipboard

CMakeLists and include case-sensitivity

Open AmrikSadhra opened this issue 4 years ago • 4 comments

A subset of specified source files within each projects "CMakeLists.txt" have incorrect casing, preventing project load under Linux. Similarly, during a build on Linux, many '#include "paths"' utilise backslashes and mismatched case.

These issues should be tackled following a unification of all source files under some proposed folder and naming convention, as the first step towards Linux compilation.

AmrikSadhra avatar Nov 11 '20 23:11 AmrikSadhra

This seems like an issue that could be addressed separate from any potential project-wide restructuring/unification/whatever, and something that would be very straightforward to fix at that.

Dinoguy1000 avatar Nov 12 '20 00:11 Dinoguy1000

Understood. Placed that proviso in to prevent anyone wasting effort on it now, but think it's worth an issue so that we can gradually get the includes unified with forward slashes and correct casing, there are so many! 😭 CMake side is for sure a quick one .

AmrikSadhra avatar Nov 12 '20 00:11 AmrikSadhra

Backslashes in #include directives can easily be found with a grep search, and be fixed with a bit of scripting, for example with sed. Clang-Tidy can detect case-sensitivity mismatches in #include directives. Scanning the code and applying the fix can be automated with Resharper C++ and probably with CLion as well. As for CMake itself, the easiest way to case-sensitivity correctness would be to attempt CMake generation on Linux and fix the scripts until it works.

meekee7 avatar Nov 14 '20 12:11 meekee7

I just saw that Resharper can fix the backslashes in #include directives as well. I presume that CLion is capable of the same.

meekee7 avatar Nov 14 '20 17:11 meekee7