Skip to content

Commit

Permalink
Merge pull request #302 from ros/fix_devel_cmi
Browse files Browse the repository at this point in the history
Make plain cmake install to devel when --install not present
  • Loading branch information
dirk-thomas committed Jan 12, 2013
2 parents a8afdd4 + ca460a5 commit cc62696
Showing 1 changed file with 22 additions and 68 deletions.
90 changes: 22 additions & 68 deletions python/catkin/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,9 @@ def isolation_print_command(cmd, path=None):


def build_catkin_package(
path,
package,
workspace,
buildspace,
develspace,
installspace,
install,
jobs,
force_cmake,
quiet,
last_env
path, package,
workspace, buildspace, develspace, installspace,
install, jobs, force_cmake, quiet, last_env
):
cprint(
"Processing @{cf}catkin@| package: '@!@{bf}" +
Expand Down Expand Up @@ -257,15 +249,9 @@ def build_catkin_package(


def build_cmake_package(
path,
package,
workspace,
buildspace,
installspace,
jobs,
force_cmake,
quiet,
last_env
path, package,
workspace, buildspace, develspace, installspace,
install, jobs, force_cmake, quiet, last_env
):
# Notify the user that we are processing a plain cmake package
cprint(
Expand All @@ -287,8 +273,8 @@ def build_cmake_package(
# Call cmake
cmake_cmd = [
'cmake',
os.path.dirname(package.filename),
'-DCMAKE_INSTALL_PREFIX=' + installspace + ''
'-DCMAKE_INSTALL_PREFIX=' + (installspace if install else develspace),
os.path.dirname(package.filename)
]
isolation_print_command(' '.join(cmake_cmd))
if last_env is not None:
Expand Down Expand Up @@ -321,19 +307,10 @@ def build_cmake_package(


def build_package(
path,
package,
workspace,
buildspace,
develspace,
installspace,
install,
jobs,
force_cmake,
quiet,
last_env,
number=None,
of=None
path, package,
workspace, buildspace, develspace, installspace,
install, jobs, force_cmake, quiet, last_env,
number=None, of=None
):
export_tags = [e.tagname for e in package.exports]
cprint('@!@{gf}==>@| ', end='')
Expand All @@ -349,17 +326,9 @@ def build_package(
build_type_tag = 'catkin'
if build_type_tag == 'catkin':
build_catkin_package(
path,
package,
workspace,
buildspace,
develspace,
installspace,
install,
jobs,
force_cmake,
quiet,
last_env
path, package,
workspace, buildspace, develspace, installspace,
install, jobs, force_cmake, quiet, last_env
)
if install:
new_last_env = os.path.join(
Expand All @@ -373,15 +342,9 @@ def build_package(
)
elif build_type_tag == 'cmake':
build_cmake_package(
path,
package,
workspace,
buildspace,
installspace,
jobs,
force_cmake,
quiet,
last_env
path, package,
workspace, buildspace, develspace, installspace,
install, jobs, force_cmake, quiet, last_env
)
new_last_env = last_env
else:
Expand Down Expand Up @@ -532,19 +495,10 @@ def build_workspace_isolated(
develspace = os.path.join(original_develspace, package.name)
try:
last_env = build_package(
path,
package,
workspace,
buildspace,
develspace,
installspace,
install,
jobs,
force_cmake,
quiet,
last_env,
number=index + 1,
of=len(packages)
path, package,
workspace, buildspace, develspace, installspace,
install, jobs, force_cmake, quiet, last_env,
number=index + 1, of=len(packages)
)
except subprocess.CalledProcessError as e:
cprint(
Expand Down

0 comments on commit cc62696

Please sign in to comment.