-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Final merge of the pcl-1.0.x branch.
git-svn-id: svn+ssh://svn.pointclouds.org/pcl/tags/pcl-1.0.1@1508 a9d63959-f2ad-4865-b262-bf0e56cfafb6
- Loading branch information
Showing
4 changed files
with
39 additions
and
3 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
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,36 @@ | ||
#!/usr/bin/env python | ||
# file: merge_cmake_install.py | ||
|
||
import sys, math | ||
import fnmatch | ||
import os | ||
import shutil | ||
|
||
if len(sys.argv) != 2: | ||
# stop the program and print an error message | ||
sys.exit("Must provide a cmake binary folder") | ||
|
||
base_folder = sys.argv[1] | ||
|
||
string_to_remove_debug = "IF(\"${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Dd][Ee][Bb][Uu][Gg])$\")" | ||
string_to_remove_release = "IF(\"${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$\")" | ||
|
||
matches = [] | ||
for root, dirnames, filenames in os.walk(base_folder): | ||
for filename in fnmatch.filter(filenames, 'cmake_install.cmake'): | ||
matches.append(os.path.join(root, filename)) | ||
|
||
for one_match in matches: | ||
#print one_match, "\n" | ||
shutil.move( one_match, one_match+"~" ) | ||
destination= open( one_match, "w" ) | ||
source= open( one_match+"~", "r" ) | ||
for line in source: | ||
if string_to_remove_debug in line: | ||
destination.write( "\n" ) | ||
elif string_to_remove_release in line: | ||
destination.write( "\n" ) | ||
else: | ||
destination.write( line ) | ||
source.close() | ||
destination.close() |
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
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