Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
project_cpp_template
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labrobotica
project_cpp_template
Commits
ae04fb14
Commit
ae04fb14
authored
7 years ago
by
Sergi Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Added an include folder for the header files.
parent
d38837b4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doxygen_template.conf
+1
-0
1 addition, 0 deletions
doxygen_template.conf
new_project.sh
+14
-5
14 additions, 5 deletions
new_project.sh
with
15 additions
and
5 deletions
doxygen_template.conf
+
1
−
0
View file @
ae04fb14
...
@@ -83,6 +83,7 @@ WARN_LOGFILE =
...
@@ -83,6 +83,7 @@ WARN_LOGFILE =
# configuration options related to the input files
# configuration options related to the input files
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
INPUT
= ../
src
\
INPUT
= ../
src
\
../
include
\
../
ReadMe
.
md
../
ReadMe
.
md
INPUT_ENCODING
=
UTF
-
8
INPUT_ENCODING
=
UTF
-
8
FILE_PATTERNS
= *.
c
\
FILE_PATTERNS
= *.
c
\
...
...
This diff is collapsed.
Click to expand it.
new_project.sh
+
14
−
5
View file @
ae04fb14
...
@@ -81,6 +81,15 @@ else
...
@@ -81,6 +81,15 @@ else
echo
"Creating
$SRC_DIR
directory"
echo
"Creating
$SRC_DIR
directory"
mkdir
$SRC_DIR
mkdir
$SRC_DIR
fi
fi
# create the include directory
INCLUDE_DIR
=
"./include"
if
[
-e
"
$INCLUDE_DIR
"
]
then
echo
"
$INCLUDE_DIR
directory already exists, skipping ..."
else
echo
"Creating
$INCLUDE_DIR
directory"
mkdir
$INCLUDE_DIR
fi
#create the src/examples directory
#create the src/examples directory
if
[
$TYPE
=
library
]
if
[
$TYPE
=
library
]
then
then
...
@@ -163,7 +172,7 @@ then
...
@@ -163,7 +172,7 @@ then
echo
"FIND_PACKAGE(
$x
REQUIRED)"
>>
CMakeLists.tmp
echo
"FIND_PACKAGE(
$x
REQUIRED)"
>>
CMakeLists.tmp
done
done
echo
"# add the necessary include directories"
>>
CMakeLists.tmp
echo
"# add the necessary include directories"
>>
CMakeLists.tmp
echo
"INCLUDE_DIRECTORIES(.)"
>>
CMakeLists.tmp
echo
"INCLUDE_DIRECTORIES(.
./include
)"
>>
CMakeLists.tmp
for
x
in
$arr
for
x
in
$arr
do
do
echo
"INCLUDE_DIRECTORIES("
'${'
"
${
x
}
_INCLUDE_DIR"
'}'
")"
>>
CMakeLists.tmp
echo
"INCLUDE_DIRECTORIES("
'${'
"
${
x
}
_INCLUDE_DIR"
'}'
")"
>>
CMakeLists.tmp
...
@@ -171,7 +180,7 @@ then
...
@@ -171,7 +180,7 @@ then
echo
"# application source files"
>>
CMakeLists.tmp
echo
"# application source files"
>>
CMakeLists.tmp
echo
"SET(sources
${
NAME
}
.cpp)"
>>
CMakeLists.tmp
echo
"SET(sources
${
NAME
}
.cpp)"
>>
CMakeLists.tmp
echo
"# application header files"
>>
CMakeLists.tmp
echo
"# application header files"
>>
CMakeLists.tmp
echo
"SET(headers
${
NAME
}
.h)"
>>
CMakeLists.tmp
echo
"SET(headers
../include/
${
NAME
}
.h)"
>>
CMakeLists.tmp
echo
"# create the executable file"
>>
CMakeLists.tmp
echo
"# create the executable file"
>>
CMakeLists.tmp
echo
"ADD_EXECUTABLE(
${
NAME
}
"
'${'
"sources"
'}'
")"
>>
CMakeLists.tmp
echo
"ADD_EXECUTABLE(
${
NAME
}
"
'${'
"sources"
'}'
")"
>>
CMakeLists.tmp
echo
"# link necessary libraries"
>>
CMakeLists.tmp
echo
"# link necessary libraries"
>>
CMakeLists.tmp
...
@@ -185,14 +194,14 @@ else
...
@@ -185,14 +194,14 @@ else
echo
"# driver source files"
>>
CMakeLists.tmp
echo
"# driver source files"
>>
CMakeLists.tmp
echo
"SET(sources
${
NAME
}
.cpp)"
>>
CMakeLists.tmp
echo
"SET(sources
${
NAME
}
.cpp)"
>>
CMakeLists.tmp
echo
"# application header files"
>>
CMakeLists.tmp
echo
"# application header files"
>>
CMakeLists.tmp
echo
"SET(headers
${
NAME
}
.h)"
>>
CMakeLists.tmp
echo
"SET(headers
../include/
${
NAME
}
.h)"
>>
CMakeLists.tmp
echo
"# locate the necessary dependencies"
>>
CMakeLists.tmp
echo
"# locate the necessary dependencies"
>>
CMakeLists.tmp
for
x
in
$arr
for
x
in
$arr
do
do
echo
"FIND_PACKAGE(
$x
REQUIRED)"
>>
CMakeLists.tmp
echo
"FIND_PACKAGE(
$x
REQUIRED)"
>>
CMakeLists.tmp
done
done
echo
"# add the necessary include directories"
>>
CMakeLists.tmp
echo
"# add the necessary include directories"
>>
CMakeLists.tmp
echo
"INCLUDE_DIRECTORIES(.)"
>>
CMakeLists.tmp
echo
"INCLUDE_DIRECTORIES(.
./include
)"
>>
CMakeLists.tmp
for
x
in
$arr
for
x
in
$arr
do
do
echo
"INCLUDE_DIRECTORIES("
'${'
"
${
x
}
_INCLUDE_DIR"
'}'
")"
>>
CMakeLists.tmp
echo
"INCLUDE_DIRECTORIES("
'${'
"
${
x
}
_INCLUDE_DIR"
'}'
")"
>>
CMakeLists.tmp
...
@@ -230,7 +239,7 @@ else
...
@@ -230,7 +239,7 @@ else
LIBRARY_NAME
=
$(
echo
$NAME
|
tr
'[:lower:]'
'[:upper:]'
)
LIBRARY_NAME
=
$(
echo
$NAME
|
tr
'[:lower:]'
'[:upper:]'
)
Library_name
=
$(
echo
$NAME
|
sed
's/\([a-zA-Z]\)\([a-zA-Z0-9]*\)/\u\1\2/g'
)
Library_name
=
$(
echo
$NAME
|
sed
's/\([a-zA-Z]\)\([a-zA-Z0-9]*\)/\u\1\2/g'
)
sed
's/Library_name/'
$Library_name
'/g'
<driver_header_template.h
>
tmp.h
sed
's/Library_name/'
$Library_name
'/g'
<driver_header_template.h
>
tmp.h
sed
's/LIBRARY_NAME/'
$LIBRARY_NAME
'/g'
<tmp.h
>
./
src
/
$NAME
.h
sed
's/LIBRARY_NAME/'
$LIBRARY_NAME
'/g'
<tmp.h
>
./
include
/
$NAME
.h
rm
tmp.h
rm
tmp.h
sed
's/library_name/'
$NAME
'/g'
<driver_src_template.cpp
>
tmp.cpp
sed
's/library_name/'
$NAME
'/g'
<driver_src_template.cpp
>
tmp.cpp
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment