Redid the test library
It doesn't compile using g++ itself, so it's still using cmake. This isn't too bad though, since it's only an aux library.master
parent
870c6089f4
commit
2e4e5bff3d
|
@ -1,14 +0,0 @@
|
|||
cmake_minimum_required(VERSION 3.7)
|
||||
|
||||
project(ceevlang-test)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
find_library(CEEV NAMES ceev HINTS "/usr/local/include" REQUIRED)
|
||||
include_directories(${CEEV_INCLUDE_DIRS})
|
||||
|
||||
add_executable(${PROJECT_NAME} src/test.cc src/test.h)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} ${CEEV_LIBRARIES})
|
||||
|
||||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
|
|
@ -1,6 +0,0 @@
|
|||
#include "test.h"
|
||||
|
||||
int main() {
|
||||
std::cout << bg_bright_green(red("Hello World")) << std::endl;
|
||||
return 0;
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <ceev/colors.h>
|
||||
#include <iostream>
|
|
@ -15,6 +15,7 @@ int read_file(std::deque<std::string> args) {
|
|||
std::string line;
|
||||
while (std::getline(file, line)) {
|
||||
std::istringstream stream(line);
|
||||
std::cout << line << std::endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
cmake_minimum_required(VERSION 3.7)
|
||||
|
||||
project(test)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
find_package(ceev REQUIRED)
|
||||
add_executable(color_test color_test.cc)
|
||||
add_executable(lang_test lang_test.cc)
|
||||
include_directories(${ceev_INCLUDE_DIRS})
|
||||
target_link_libraries(color_test ${ceev_LIBRARIES})
|
||||
target_link_libraries(lang_test ${ceev_LIBRARIES})
|
|
@ -0,0 +1,7 @@
|
|||
#include <ceev/colors.h>
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
std::cout << bg_red("Hello World") << std::endl;
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
#include <ceev/lang.h>
|
||||
#include <deque>
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
if (argc != 2) {
|
||||
return 1;
|
||||
}
|
||||
std::deque<std::string> args;
|
||||
args.push_back(std::string(argv[1]));
|
||||
return read_file(args);
|
||||
}
|
Loading…
Reference in New Issue