diff --git a/docs/CMock_Summary.md b/docs/CMock_Summary.md index 4e700e0..9a89634 100644 --- a/docs/CMock_Summary.md +++ b/docs/CMock_Summary.md @@ -477,11 +477,11 @@ from the defaults. We've tried to specify what the defaults are below. * default: `['(?:__attribute__\s*\(+.*?\)+)']` -* `:has_setjmp_h`: - Some embedded systems don't have available. Setting this to false +* `:exclude_setjmp_h`: + Some embedded systems don't have available. Setting this to true removes references to this header file and the ability to use cexception. - * default: true + * default: false * `:subdir`: diff --git a/lib/cmock_config.rb b/lib/cmock_config.rb index 2a3e5f8..716a0c5 100644 --- a/lib/cmock_config.rb +++ b/lib/cmock_config.rb @@ -41,7 +41,7 @@ class CMockConfig :array_size_type => [], :array_size_name => 'size|len', :skeleton => false, - :has_setjmp_h => true, + :exclude_setjmp_h => false, # Format to look for inline functions. # This is a combination of "static" and "inline" keywords ("static inline", "inline static", "inline", "static") diff --git a/lib/cmock_generator.rb b/lib/cmock_generator.rb index f0372a3..ec06ab4 100644 --- a/lib/cmock_generator.rb +++ b/lib/cmock_generator.rb @@ -170,7 +170,7 @@ class CMockGenerator file << "/* AUTOGENERATED FILE. DO NOT EDIT. */\n" unless functions.empty? file << "#include \n" file << "#include \n" - if @has_setjmp_h + unless @exclude_setjmp_h file << "#include \n" end file << "#include \"cmock.h\"\n" @@ -208,7 +208,7 @@ class CMockGenerator end def create_extern_declarations(file) - if @has_setjmp_h + unless @exclude_setjmp_h file << "extern jmp_buf AbortFrame;\n" end if @ordered