forked from JaiMaaSheeravali/Roosh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request JaiMaaSheeravali#18 from JaiMaaSheeravali/google
Using Cmake
- Loading branch information
Showing
4 changed files
with
35 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
**To execute the shell:** | ||
cmake . | ||
make | ||
./output/main | ||
|
||
|