Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.example.cmake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.example.cmake
Commits
12c24766
Commit
12c24766
authored
9 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
Correctly implemented BOB_PREFIX_PATH environment variable
parent
9b96c99e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.travis.yml
+1
-1
1 addition, 1 deletion
.travis.yml
FindBob.cmake
+12
-6
12 additions, 6 deletions
FindBob.cmake
with
13 additions
and
7 deletions
.travis.yml
+
1
−
1
View file @
12c24766
...
...
@@ -23,6 +23,6 @@ install:
-
python bootstrap-buildout.py
-
CPPFLAGS=--coverage LDFLAGS=--coverage ./bin/buildout buildout:debug=false
script
:
-
BOB_PREFIX_PATH=
"
/home/travis/virtualenv/
python*/"
./bin/coverage run --source=bob.example.cmake ./bin/nosetests -sv
-
BOB_PREFIX_PATH=/home/travis/virtualenv/
*
./bin/coverage run --source=bob.example.cmake ./bin/nosetests -sv
after_success
:
-
cpp-coveralls --build-root=`pwd` --exclude=src
This diff is collapsed.
Click to expand it.
FindBob.cmake
+
12
−
6
View file @
12c24766
...
...
@@ -43,9 +43,6 @@ macro(_find_python)
if
(
BOB_PREFIX_PATH
)
list
(
APPEND _possible_paths
${
BOB_PREFIX_PATH
}
/bin
)
endif
()
if
(
ENV{BOB_PREFIX_PATH}
)
list
(
APPEND _possible_paths $ENV{BOB_PREFIX_PATH}/bin
)
endif
()
find_program
(
_python python HINTS
${
_possible_paths
}
)
endif
()
endmacro
()
...
...
@@ -107,9 +104,6 @@ function(find_bob_package package)
if
(
BOB_PREFIX_PATH
)
list
(
APPEND _possible_paths
${
BOB_PREFIX_PATH
}
/lib/*/site-packages
)
endif
()
if
(
ENV{BOB_PREFIX_PATH}
)
list
(
APPEND _possible_paths $ENV{BOB_PREFIX_PATH}/lib/*/site-packages
)
endif
()
# add common path to locations
set
(
_bob_paths
)
...
...
@@ -206,6 +200,18 @@ if (NOT Bob_FIND_COMPONENTS)
message
(
FATAL_ERROR
"Please specify the bob packages that you want to search for as COMPONENTS"
)
endif
()
# set BOB_PREFIX_PATH as CMake variable when given in as environment variable
if
(
NOT
"$ENV{BOB_PREFIX_PATH}"
STREQUAL
""
)
if
(
BOB_PREFIX_PATH
)
if
(
NOT
"
${
BOB_PREFIX_PATH
}
"
STREQUAL
"$ENV{BOB_PREFIX_PATH}"
)
message
(
WARNING
"Ignoring the BOB_PREFIX_PATH environment variable '$ENV{BOB_PREFIX_PATH}' and using '
${
BOB_PREFIX_PATH
}
' instead"
)
endif
()
else
()
set
(
BOB_PREFIX_PATH $ENV{BOB_PREFIX_PATH} CACHE STRING
"Bob installation path"
FORCE
)
endif
()
endif
()
# TODO: Review this setting. It might overwrite some default settings.
set
(
CMAKE_CXX_FLAGS
"-std=c++0x -pthread"
CACHE STRING
"Flags used by the compiler during release builds"
FORCE
)
...
...
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