Last active
January 13, 2019 12:13
-
-
Save rodolfoap/1393088b9863682c447b37de606077c9 to your computer and use it in GitHub Desktop.
Creates eclipse project for a C++/Cmake app
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
#!/bin/bash | |
# Creates an eclipse project for a C/C++ Cmake app | |
PROJECTNAME=$(basename $(pwd)) | |
CURRENTDIR=$(pwd) | |
[ -f CMakeLists.txt ] || { echo "This folder does not contain a CMakeLists.txt. Exiting."; exit; } | |
[ -f ~/wsp/$PROJECTNAME ] && { echo "The project ~/wsp/$PROJECTNAME already exists. Exiting. "; exit; } | |
mkdir ~/wsp/$PROJECTNAME | |
cd ~/wsp/$PROJECTNAME | |
cmake $CURRENTDIR -G"Eclipse CDT4 - Unix Makefiles" && { | |
echo Done. Please import the project in ~/wsp/$PROJECTNAME.; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment