diff options
author | San Jacobs | 2022-08-04 12:18:33 +0200 |
---|---|---|
committer | San Jacobs | 2022-08-04 12:18:33 +0200 |
commit | 9a3c815b176598ed463a88f42dc6a5f8c6457d50 (patch) | |
tree | 0c8032a6c7b751631739895c68a43a62d42eada9 | |
parent | a38359917d770156d8a5d5e8123074c54c8a0ab7 (diff) | |
download | satscalc-9a3c815b176598ed463a88f42dc6a5f8c6457d50.tar.gz satscalc-9a3c815b176598ed463a88f42dc6a5f8c6457d50.tar.bz2 satscalc-9a3c815b176598ed463a88f42dc6a5f8c6457d50.zip |
Move to C++17
I don't like this, but I wanted more <algorithm> stuff.
-rw-r--r-- | compile_commands.json | 57 | ||||
-rw-r--r-- | makefile | 9 |
2 files changed, 49 insertions, 17 deletions
diff --git a/compile_commands.json b/compile_commands.json index 45a3f69..7331cbf 100644 --- a/compile_commands.json +++ b/compile_commands.json @@ -1,15 +1,44 @@ [ - { - "arguments": [ - "g++", - "-c", - "-I", - "/usr/include/boost/", - "-o", - "obj/main.o", - "src/main.cpp" - ], - "directory": "/home/talos/Programming/satscalc", - "file": "src/main.cpp" - } -]
\ No newline at end of file + { + "arguments": [ + "/usr/bin/x86_64-linux-gnu-g++-10", + "-g", + "-std=c++17", + "-c", + "src/main.cpp", + "-o", + "obj/main.o" + ], + "directory": "/home/san/programming/satscalc", + "file": "/home/san/programming/satscalc/src/main.cpp", + "output": "/home/san/programming/satscalc/obj/main.o" + }, + { + "arguments": [ + "/usr/bin/x86_64-linux-gnu-g++-10", + "-g", + "-std=c++17", + "-c", + "src/test.cpp", + "-o", + "obj/test.o" + ], + "directory": "/home/san/programming/satscalc", + "file": "/home/san/programming/satscalc/src/test.cpp", + "output": "/home/san/programming/satscalc/obj/test.o" + }, + { + "arguments": [ + "/usr/bin/x86_64-linux-gnu-g++-10", + "-g", + "-std=c++17", + "-c", + "src/time.cpp", + "-o", + "obj/time.o" + ], + "directory": "/home/san/programming/satscalc", + "file": "/home/san/programming/satscalc/src/time.cpp", + "output": "/home/san/programming/satscalc/obj/time.o" + } +] @@ -1,7 +1,10 @@ -# INCLUDE is where you find the headerfiles for the libs you're using. They are used during compilation. +# INCLUDE is where you find the header files for the libs you're using. They are used during compilation. # Example: -I /usr/include/boost/ INCLUDE= +# Enabling C++17 mode so I can have more <algorithm> stuff +CFLAGS=-std=c++17 + # LIBDIR is where you can find the linkable objects or whatever. They are used for the linking stage. LIBDIR=-L /usr/lib/x86_64-linux-gnu/ @@ -16,11 +19,11 @@ OBJECTS=$(patsubst src/%.cpp, $(OBJDIR)%.o, $(SOURCES)) # This last line creates an identical list of objects based on the list of .cpp files. a.out: $(OBJECTS) - g++ $(LIBDIR) $(LIBS) $(OBJECTS) + g++ $(LIBDIR) $(CFLAGS) $(LIBS) $(OBJECTS) $(OBJECTS): obj/%.o : src/%.cpp mkdir -p obj - g++ -g $(INCLUDE) -c $< -o $@ + g++ -g $(INCLUDE) $(CFLAGS) -c $< -o $@ clean: rm obj/*.o |