??
sophuwu sophie@skisiel.com
Fri, 19 Apr 2024 19:49:23 +0200
2 files changed,
6 insertions(+),
17 deletions(-)
M
CMakeLists.txt
→
CMakeLists.txt
@@ -1,6 +1,8 @@
-cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.10) project(bashprompt) set(CMAKE_CXX_STANDARD 17) -add_executable(bashprompt main.cpp)+include_directories(src) + +add_executable(bashprompt src/prompt.cpp)
M
Makefile
→
Makefile
@@ -1,19 +1,6 @@
-ifeq ($(shell command -v cmake), ) -COMPCMD = g++ --std=c++17 -o build/bashprompt main.cpp -COMPMSG = g++ -else -ifeq ($(shell command -v ninja), ) -COMPCMD = cmake -S . -B build && cmake --build build -COMPMSG = cmake -else -COMPCMD = cmake -GNinja -S . -B build && cmake --build build -COMPMSG = cmake and ninja -endif -CMAKELISTS = CMakeLists.txt -endif -build: main.cpp $(CMAKELISTS) - @$(COMPCMD) +build: + cmake -B build && cmake --build build || g++ --std=c++17 -o build/bashprompt src/prompt.cpp clean: build/ @echo Cleaning up.