- tabs to spaces
- use Unix line endings everywhere
- newline at end of file
- remove trailing white space
- no space between keywords and opening parenthesis
- use 2 spaces to indent
I’m trying to compile Descent 3 on NixOS, but when I run
“cmake --build <path>”, I get this error:
/home/jayman/Documents/Home/VC/Git/Partially mine/Descent3/repo/Descent3/multi_connect.cpp: In function 'int TryToJoinServer(network_address*)':
/home/jayman/Documents/Home/VC/Git/Partially mine/Descent3/repo/Descent3/multi_connect.cpp:358:16: error: format not a string literal and no format arguments [-Werror=format-security]
358 | sprintf(str, TXT(Join_response_strings[Ok_to_join]));
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Eventually, we should actually fix that sprintf call (and any other
calls that would trigger format security warnings), but it would be nice
if users could just temporarily ignore stuff like that.
This commit makes it so that users can set custom complier flags by
doing this:
$ cmake \
--preset <preset> \
-B build \
-DCMAKE_C_FLAGS=<additional-c-flags> \
-DCMAKE_CXX_FLAGS=<additional-cxx-flags>
$ cmake --build build
Updated compatibility level to 3.19. Set C++17 globally for all platforms. Removed hardcoded compiler and optimisation flags. Adjusted dependencies and libraries linking.
Reworked script building and hog creation.
`LIST(APPEND ..)` adds a `;` to the gcc command line, replaced with string
interpolation.
Only use "-Wno-address-of-temporary" on macOS (=clang),
on Linux/gcc use "-fpermissive" which still shows the compiler warning
so it can be fixed later.