Compare commits
2 Commits
63b8c9d465
...
e0655c7f04
Author | SHA1 | Date | |
---|---|---|---|
e0655c7f04 | |||
c18481228a |
2
.gitignore
vendored
2
.gitignore
vendored
@ -32,3 +32,5 @@
|
|||||||
*.out
|
*.out
|
||||||
*.app
|
*.app
|
||||||
|
|
||||||
|
# Building
|
||||||
|
build
|
||||||
|
14
CMakeLists.txt
Normal file
14
CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
|
project(
|
||||||
|
search-algorithms
|
||||||
|
LANGUAGES CXX)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 11 CACHE STRING "The C++ standard to use")
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||||
|
|
||||||
|
include_directories(${search-algorithms_SOURCE_DIR}/src)
|
||||||
|
|
||||||
|
add_subdirectory(src)
|
16
README.md
16
README.md
@ -1,2 +1,18 @@
|
|||||||
# search-algorithms
|
# search-algorithms
|
||||||
|
|
||||||
|
## Compiling the project
|
||||||
|
|
||||||
|
Prerequisites
|
||||||
|
- C++11
|
||||||
|
|
||||||
|
In order to compile the project, simply run these two commands:
|
||||||
|
|
||||||
|
cmake -B build -S .
|
||||||
|
cmake --build build
|
||||||
|
|
||||||
|
## Running the Project
|
||||||
|
The program should now be compiled at ./build/bin/search-algorithms
|
||||||
|
|
||||||
|
Simply run the program using:
|
||||||
|
|
||||||
|
build/bin/search-algorithms
|
||||||
|
5
src/CMakeLists.txt
Normal file
5
src/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
add_executable(search-algorithms
|
||||||
|
./main.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(search-algorithms PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
6
src/main.cpp
Normal file
6
src/main.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
int main () {
|
||||||
|
std::cout << "Hello world" << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user