added cmake again :|
This commit is contained in:
parent
19b8a1921e
commit
e53fd06a68
1
.gitignore
vendored
1
.gitignore
vendored
@ -34,3 +34,4 @@
|
||||
|
||||
# Build files
|
||||
build/
|
||||
.vscode/
|
6
CMakeLists.txt
Normal file
6
CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
find_program(CMAKE_C_COMPILER NAMES $ENV{CC} gcc PATHS ENV PATH NO_DEFAULT_PATH)
|
||||
find_program(CMAKE_CXX_COMPILER NAMES $ENV{CXX} g++ PATHS ENV PATH NO_DEFAULT_PATH)
|
||||
project(owo)
|
||||
add_executable(owo src/main.cpp)
|
||||
target_link_libraries(owo)
|
@ -28,12 +28,11 @@ $ ./owo -o output.txt "Hello, world!"
|
||||
```
|
||||
|
||||
## Building
|
||||
to build the program, you will need a c++ compiler. I have no idea what im doing with cmake so this uses a very basic make file that is made to build the linux and windows binaries.
|
||||
If you are on windows, good luck. I have no clue how to setup g++ on windows. I would recommend using WSL or a VM. If you are on linux, you can build the program with the following commands
|
||||
(assuming you have g++ installed):
|
||||
```bash
|
||||
$ cmake . -B build
|
||||
$ cd build && make
|
||||
$ make
|
||||
$ build/owo "Hello, world!"
|
||||
$ ./owo "Hello, world!"
|
||||
hewwo, wowld!
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user