-
Notifications
You must be signed in to change notification settings - Fork 0
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 nasa#463 from jphickey/jph-fix-335-omit-deprecated
Fix nasa#355, Add global scope option to omit deprecated items
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 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,25 @@ | ||
# | ||
# Example global_build_options.cmake | ||
# ---------------------------------- | ||
# | ||
# This may set global definitions that apply to ALL targets in ALL scopes, | ||
# including FSW code that is cross-compiled for a target as well as code | ||
# built for the development host itself (native). | ||
# | ||
# As such, it should only invoke basic commands that have wide applicability, | ||
# such as "add_definitions()" for macro definitions that should be set | ||
# globally. It should not include any compiler-specific options that might | ||
# change between compiler vendors or target processor families. | ||
# | ||
|
||
# If the OMIT_DEPRECATED flag is specified, then define the respective macros | ||
# that omit the deprecated features from the build. This is conditional in this | ||
# example for CI purposes, so it can be tested both ways. Most projects would | ||
# likely set this only one way. | ||
set(OMIT_DEPRECATED $ENV{OMIT_DEPRECATED} CACHE STRING "Omit deprecated elements") | ||
if (OMIT_DEPRECATED) | ||
message (STATUS "OMIT_DEPRECATED=true: Not including deprecated elements in build") | ||
add_definitions(-DCFE_OMIT_DEPRECATED_6_6 -DOSAL_OMIT_DEPRECATED) | ||
else() | ||
message (STATUS "OMIT_DEPRECATED=false: Deprecated elements included in build") | ||
endif (OMIT_DEPRECATED) |