From 823d77290dd0b0a6710ebc70002b4f9ec411b464 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Thu, 19 Aug 2021 13:03:49 -0400 Subject: [PATCH] Fix #1847, enable strict resource id w/OMIT_DEPRECATED When the user specifies the OMIT_DEPRECATED build option, also enable the strictly-typed resource IDs to catch common coding errors. --- cmake/sample_defs/global_build_options.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/sample_defs/global_build_options.cmake b/cmake/sample_defs/global_build_options.cmake index d2d93cca8..d908b9606 100644 --- a/cmake/sample_defs/global_build_options.cmake +++ b/cmake/sample_defs/global_build_options.cmake @@ -20,6 +20,8 @@ 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_8 -DCFE_OMIT_DEPRECATED_6_7 -DCFE_OMIT_DEPRECATED_6_6 -DOSAL_OMIT_DEPRECATED) + set(MISSION_RESOURCEID_MODE "STRICT") # more type safe, but less backward compatible else() message (STATUS "OMIT_DEPRECATED=false: Deprecated elements included in build") + set(MISSION_RESOURCEID_MODE "SIMPLE") # less type safe, but more backward compatible endif (OMIT_DEPRECATED)