Commit Graph

177 Commits

Author SHA1 Message Date
Alex Lin
83338c4957 cmake scripts do not work for CentOS7 #914
Updated minimum cmake version to 3.1
Added checks in findllvm script to handle old 3.4 LLVM version
Added back include directories needed by old LLVM version in ICG.
2019-11-22 08:12:54 -06:00
Alex Lin
60a1a0558f Oops, didn't put the #endif in the right place 2019-11-19 10:59:28 -06:00
Alex Lin
ce0cdc9636
Cmake merge (#901)
* Merging changes from cmake branch to master

* Fixing includes for renamed header files

* still need build rule

* Adding warning for swig code for gcc8+

* Adding CMakeLists.txt for data products

* Cmake merge #901

Making adjustments to get cmake working on the Mac (Mojave)

* Cmake merge #901

Changing string append to list append
2019-11-19 09:01:16 -06:00
Derek Bankieris
1f33406c95 Don't trace TRICK_EXT_LIB_DIRS lib deps in CP
Refs #871
2019-10-07 14:12:06 -05:00
sfennell
8ac5cf7a59 changes to support llvm 9.0 closes #869 2019-09-27 16:04:16 -05:00
sfennell
5004f95fdd changes to support llvm 9.0 closes #869 2019-09-27 14:58:54 -05:00
Scott Fennell
f10e4e8d93 remove deprecated std::ptr_fun and std::not1 closes #864 2019-09-23 14:25:27 -05:00
Scott Fennell
238b376b14 use almostRealPath instead of realpath closes #857 2019-09-10 11:13:57 -05:00
Scott Fennell
e798fde189 move misplaced parentheses to include enum headers closes #856 2019-09-05 14:47:10 -05:00
Derek Bankieris
67decaed24 Add support for -isystem
Closes #407
2019-06-20 10:12:33 -05:00
Alex Lin
497f11f132
Make TRICK_CXX variable to specify c++ compiler #767 (#815)
Changed all references of TRICK_CPPC to TRICK_CXX.  Added a
warning message that TRICK_CPPC has been deprecated.
2019-06-18 11:00:08 -05:00
Alex Lin
187fa37540
Remove suppression of units conversion warnings in 19 #789 (#814)
Removed checks on dead units conversion messenger.  Units conversion
messages cannot be suppressed.  Added deprecated messages to the functions
that modified the message printouts.
2019-06-18 10:59:51 -05:00
Alex Lin
78b5a0c692 Optionally use 'cio' in place of 'trick_chkpnt_io' field #749
Added an alias to use cio for trick_chkpnt_io and io for trick_io.
2019-06-14 07:43:37 -05:00
Derek Bankieris
7b0e84e58e Clean up duplication in makefiles
Normalize behavior of TRICK_VERBOSE_BUILD

Closes #746
2019-05-30 15:47:07 -05:00
Derek Bankieris
4611db2e92 Merge branch 'master' of https://github.com/nasa/trick 2019-04-09 13:20:01 -05:00
Derek Bankieris
f1ef983143 Change unbold ascii escape sequence from 21 to 22
21m as unbold is not well supported and sometimes causes
double-underline instead
2019-04-09 13:18:02 -05:00
Scott Fennell
49e243b54a
Merge branch 'master' into VERBOSE-synonym 2019-04-02 13:34:52 -05:00
Alex Lin
6a84ae548b Merge branch 'master' of https://github.com/nasa/trick 2019-03-26 17:10:16 -05:00
Alex Lin
b29a117902 ICG does not compile with LLVM 8.0 #747
getLocEnd got changed to getEndLoc.  Made a LLVM version based macro
to handle both.
2019-03-26 17:03:11 -05:00
Scott Fennell
644a9a0e00 #741 add VERBOSE synonym everywhere 2019-03-21 09:28:52 -05:00
dbankieris
6eeb4cee80
Merge pull request #736 from nasa/688
Include Trickified classes/enums in S_sie.resource
2019-02-20 14:13:12 -06:00
Derek Bankieris
8658f33f64 Include Trickified classes/enums in S_sie.resource
Fixes #688
2019-02-20 13:21:14 -06:00
Derek Bankieris
294e8c9e40 Correct forward-declaration-detection logic in ICG
Fixes #724
2019-02-14 10:55:55 -06:00
Scott Fennell
21c01a5454 scan-build changes
This reverts commit e86027f825.
2018-11-06 11:23:12 -06:00
Scott Fennell
e86027f825 revert scan-build changes, need further testing before merge 2018-10-22 15:11:29 -05:00
Scott Fennell
bc35e64406
Merge pull request #673 from nasa/#scan-build
#671 fix all non memory manager scan-build bugs.
2018-10-20 13:16:35 -05:00
Pappy Van Winkle
af2575da5b Remove all unused variables (style warning). 2018-10-11 22:05:50 -05:00
Scott Fennell
6619ecb92f move commented prints in FieldDescription to debug_level 4 2018-09-27 08:10:05 -05:00
Scott Fennell
a9f84d1d9f various static analyser bug fixes 2018-09-26 14:27:03 -05:00
Scott Fennell
77e0e73b3f various static analyser bug fixes 2018-09-25 10:41:14 -05:00
Alex Lin
6ce60cb2ec Is Trick ICG missing some uses of TRICK_ICG #608
Some functions changed signatures in 3.5, others in 3.7.
2018-05-18 08:38:28 -05:00
Alex Lin
be6f9dc855 Trick will not compile with llvm 6.0 and Xcode 9.2 on the mac. #579
Found a new language option we need to set in ICG when llvm >= 6.0 to parse
header files correctly.  The option is DoubleSquareBracketAttributes.
2018-05-07 16:26:20 -05:00
Alex Lin
f412125715 Is Trick ICG missing some uses of TRICK_ICG #608
Yes, it is, it's missing all of them.  Any clang/llvm version 3.5 and
above.  So it's been broken for a while.  We inherit from a
clang class that processes preprocessing statements.  If we override
virtual functions of a certain signature, we can inject our code into
the preprocessing process.  In this case we're looking for the use
of TRICK_ICG.  Clang changed the function signature in version 3.5.
From 3.5 on our functions were never called, so we never would find
TRICK_ICG.  I created new signatures for the functions post 3.5 so
they will work again.
2018-04-23 16:40:32 -05:00
Thadeus Fleming
db07582616 Only left-shift FieldDescription::io when io_found == true
The `io` field of `FieldDescription` takes a default value of 15. In
`FieldDescription::parseComment`, it may be updated as specified in the comment
text. There are 4 possible cases:

1) Neither IO attributes nor checkpoint IO attributes are found in the comment
2) IO attributes are found in the comment, but checkpoint IO attributes are not
3) Checkpoint IO attributes are found in the comment, but IO attributes are not
4) Both IO attributes and checkpoint IO attributes are found in the comment

In case 2, the IO attributes are copied into the checkpoint IO attributes by the
statement `io |= (io << 2)`. However, this also erroneously runs in case 1,
causing the default value of 15 to change to 63.

By testing `io_found == true`, this logic occurs only in case 2.

Fixes #568
2018-03-27 09:37:26 -05:00
Derek Bankieris
050e552d7c Update ICG for clang 6
Fixes #578
2018-03-13 09:30:01 -05:00
Alex Lin
54b57bc351 Pointers to STLs cannot be checkpointed. #552
Added code to disable printing of STLs if it is arrayed or has pointer
dimensions.
2018-01-25 09:40:23 -06:00
Alex Lin
c694700148 Add environment variable to ignore types from ICG processing #535
Added a new environment variable TRICK_ICG_IGNORE_TYPES.  Class/struct/enum
types found in this semicolon delimited list will not have attributes written
out.
2017-12-19 10:02:41 -06:00
Alex Lin
9509924b64 Don't create attributes for class members that are of private embedded class types #534
Test the class field type.  If the type is a private embedded class mark the field
as io=0 so we don't create attributes for the field.
2017-12-19 08:26:52 -06:00
Alex Lin
5285f1a72e Symbolic links rise again #530
Found more places where symbolic links cause havoc.  Also added back a #define
that was removed in parameter_types.h and added back the messaging routines to
the list swig processes.
2017-12-12 10:17:24 -06:00
Thadeus Fleming
143d0f2c41 Make object .d files order-only prerequisites
This will ensure objects are rebuilt only due to a missing dependency
file, not a newer one.

Fixes #501.
2017-11-02 12:34:48 -05:00
Alex Lin
de012dde71 Feature request: Support checkpointing and logging of std::array #480
Added std::array as an STL type Trick recognizes.  We can now create io code
that can save and restore std::arrays like std::vectors and other similar
types. Like other STL types, an std::array cannot be logged or viewed in
trick-tv.
2017-09-27 16:01:52 -05:00
Alex Lin
c6ecd76be5 ICG does not compile with llvm 5.0 #476
Added a preprocessor check for llvm version >= 5.  If true use
clang::InputKind::CXX instead of clang::IK_CXX
2017-09-13 14:07:23 -05:00
Alex Lin
70a81acc6c ICG handling of \brief in comments differs on Linux and Mac #453
Adjusted regular expression so it will work on the mac.  Changed "\w" to
"[a-zA-Z0-9]".
2017-08-21 14:03:49 -05:00
Alex Lin
9207bd0ab1 io_src makefile applying TRICK_SYSTEM_CXXFLAGS to all compilation units. #470
Changed TRICK_SYSTEM_CXXFLAGS in Makefile_io_src to TRICK_IO_CXXFLAGS.
2017-08-21 13:28:28 -05:00
Alex Lin
e2693de992 Many Trick sims SEGFAULT when built in 32-bit mode #440
Added a switch to trick-ICG to handle the -m32 flag.  When the
flag is present we tell clang to use a 32bit layout when calculating
member offsets.
2017-06-19 14:18:37 -05:00
Derek Bankieris
1dbeb3e2d4 Fix io code for classes with excluded parents
Check the return value of CXXRecordVisitor::TraverseCXXRecordDecl and
don't add information from excluded parents.
Add a parameter to PrintAttributes::isHeaderExcluded to toggle exlusion
of TRICK_EXT_LIB_DIRS paths. When traversing a CXX record, we don't
actually want to skip these paths since their io code should exist in
the Trickified library.
Fix memory leak.

Refs #435
2017-05-24 10:51:27 -05:00
Derek Bankieris
05b4d09b2b Sanitize field names when generating STL functions
A sanitizing function was already present in FieldVisitor.cpp. I
refactored and moved it to Utilities.
Refs #429
2017-05-22 10:37:20 -05:00
Derek Bankieris
fe79aa81a5 Improve printable field detection
Renamed determinePrintAttr to isPrintable.
Different callers need to filter on different IO specs, so I added an
ioMask parameter.
Additional refactoring.
Refs #427
2017-05-17 09:37:22 -05:00
Derek Bankieris
353905c1ed Generate STL functions only when requested
Remove STL prototypes. They don't appear to be necessary anymore.
Refs #427
2017-05-16 15:31:08 -05:00
Alex Lin
a11e51cce7 Sim build doesn't stop on error #421
When I added the "tee" commands to split off command outputs to
a file and the screen, I forgot that the exit status of the make commands
takes the exit status of "tee" which does not ususally have an error and
masks any error in the actual compilation.  I added an exit ${PIPESTATUS[0]}
which returns the exit status of the compilation.
2017-05-15 13:36:06 -05:00