sophuwu.site > bashprompt
??
sophuwu sophie@skisiel.com
Fri, 19 Apr 2024 19:49:23 +0200
commit

e2fb9d8318ffe4eb241a04826dab3940a3336300

parent

8d2601cd5d564c13d378a7130a54b8712c4a9d6d

2 files changed, 6 insertions(+), 17 deletions(-)

jump to
M CMakeLists.txtCMakeLists.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 MakefileMakefile

@@ -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.