-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from rock-core/default_cxx11_castxml
control C++11 and castxml selection
- Loading branch information
Showing
4 changed files
with
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This file defines fake osdep entries to check whether certain features should | ||
# be enabled on certain OSes by default | ||
# | ||
# 'nonexistent' => no | ||
# 'ignore' => yes | ||
|
||
|
||
# Check whether the default C++ loader should be castxml (ignore) or gccxml | ||
# (nonexistent) | ||
default_castxml: | ||
ubuntu: | ||
'12.04,12.10,13.04,13.10,14.04,14.10,15.04': nonexistent | ||
default: ignore | ||
debian: | ||
testing,unstable: ignore | ||
default: nonexistent | ||
default: nonexistent | ||
|
||
# Check whether the default C++ standard should be C++11 (ignore) or C++98 | ||
# (nonexistent) | ||
default_cxx11: | ||
ubuntu: | ||
'12.04,12.10,13.04,13.10,14.04,14.10,15.04,15.10': nonexistent | ||
default: ignore | ||
debian: | ||
testing,unstable: ignore | ||
default: nonexistent | ||
default: nonexistent | ||
|
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 |
---|---|---|
|
@@ -126,3 +126,4 @@ def bundle_package(*args, &block) | |
if Autobuild.macos? | ||
Autobuild::Orogen.transports.delete("mqueue") | ||
end | ||
|
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,26 @@ | ||
module Rock | ||
# Offer the C++11 option only on systems where we either can install castxml | ||
# from the OS packages, or build it. | ||
# | ||
# But then, set it to true on OSes where it should. This is controlled by | ||
# stub osdep entries in defaults.osdeps | ||
def self.setup_cxx11_support(os_package_resolver, config) | ||
if os_package_resolver.has?('libclang-castxml') || os_package_resolver.has?('castxml') | ||
config.declare 'cxx11', 'boolean', | ||
default: 'no', | ||
doc: "whether C++11 should be enabled for Rock packages" | ||
else | ||
config.set 'typelib_cxx_loader', 'gccxml' | ||
config.set 'cxx11', false | ||
end | ||
|
||
if !config.has_value_for?('castxml') && os_package_resolver.has?('default_castxml') | ||
config.set 'typelib_cxx_loader', 'castxml', true | ||
elsif config.get('cxx11') | ||
config.set 'typelib_cxx_loader', 'castxml' | ||
else | ||
config.set 'typelib_cxx_loader', 'gccxml' | ||
end | ||
end | ||
end | ||
|