diff --git a/.gitignore b/.gitignore index a0e0a72..ae9b79b 100644 --- a/.gitignore +++ b/.gitignore @@ -73,4 +73,6 @@ _deps # End of https://www.toptal.com/developers/gitignore/api/cmake,c++,visualstudiocode -build/ \ No newline at end of file +build/ +.ccls +.ccls-cache/ diff --git a/CMakeLists.txt b/CMakeLists.txt index a29a78c..0eb4332 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,12 @@ execute_process( OUTPUT_VARIABLE GIT_COMMIT_MSG OUTPUT_STRIP_TRAILING_WHITESPACE) +# Hacky way to get environment variables +execute_process( + COMMAND bash -c "echo $VIM" + OUTPUT_VARIABLE ISVIM + OUTPUT_STRIP_TRAILING_WHITESPACE) + set(CMAKE_CXX_STANDARD 17) find_package(SDL2 REQUIRED) include_directories(${SDL2_INCLUDE_DIRS}) @@ -26,4 +32,6 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE string(REPLACE "\n" "\\n" GIT_COMMIT_MSG "${GIT_COMMIT_MSG}") target_compile_definitions(${PROJECT_NAME} PRIVATE - "-DGIT_COMMIT_MSG=\"${GIT_COMMIT_MSG}\"") \ No newline at end of file + "-DGIT_COMMIT_MSG=\"${GIT_COMMIT_MSG}\"") + +target_compile_definitions(${PROJECT_NAME} PRIVATE "-DISVIM=${ISVIM}") diff --git a/src/ceev.cc b/src/ceev.cc index fe35fe7..5e2f29e 100644 --- a/src/ceev.cc +++ b/src/ceev.cc @@ -228,4 +228,4 @@ int main(int argc, char **argv) { } std::cerr << bg_red(bold("ERROR")) << ": Unknown command `" << bright_magenta(a1) << "'\n" << std::endl; return usage(); -} \ No newline at end of file +} diff --git a/src/ceev.h b/src/ceev.h index fdf949f..4da674e 100644 --- a/src/ceev.h +++ b/src/ceev.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include #include @@ -8,8 +9,6 @@ #include #include -#include "colors.h" - #ifndef __ceev_version #define __ceev_version "0.1.1-devel" #endif @@ -53,4 +52,4 @@ int clean_project(std::deque args); int devel(std::deque args); int devel_help(); int devel_commitinfo(); -int main(int argc, char **argv); \ No newline at end of file +int main(int argc, char **argv);