Skip to content

Commit

Permalink
Merge pull request JaiMaaSheeravali#18 from JaiMaaSheeravali/google
Browse files Browse the repository at this point in the history
Using Cmake
  • Loading branch information
guptaprakhariitr committed May 6, 2021
2 parents 1f96df5 + 39d242b commit a2df660
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 92 deletions.
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
.vscode/
output/
main
*.o
*.o
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

# only for cmake --version >= 3.5.1
cmake_minimum_required(VERSION 3.5.1)

# project name
project(Roosh)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output)
# creates the variable EXEC and sets it to hello
set(EXEC main)

# set the C++14 standard
set(CMAKE_CXX_STANDARD 14)

# I../includes
include_directories(include)

# puts all .cpp files inside src to the SOURCES variable
file(GLOB SOURCES src/*.cpp)

# compiles the files defined by SOURCES to generante the executable defined by EXEC
add_executable(${EXEC} ${SOURCES})
91 changes: 0 additions & 91 deletions Makefile

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**To execute the shell:**
cmake .
make
./output/main

Expand Down

0 comments on commit a2df660

Please sign in to comment.