cmake build

This commit is contained in:
2022-11-03 01:13:34 +08:00
parent 3bd8e55ce0
commit f198c184ad
4 changed files with 34 additions and 1 deletions

3
.gitignore vendored
View File

@@ -1 +1,2 @@
.vscode .vscode
build

11
CMakeLists.txt Normal file
View File

@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.0.0)
project(lc VERSION 0.1.0)
include(CTest)
enable_testing()
add_executable(lc main.cpp)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)

21
main.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include <iostream>
#include <vector>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
vector<int> reversePrint(ListNode* head) {
}
};
int main(int, char**) {
std::cout << "Hello, world!\n";
}

0
offer06.cpp Normal file
View File