Memory Manager tests trying to write io_src files in sim_services/include

Added 2 flags to trick-ICG. "-o" will specify an output directory.  Added this
option to the calls to trick-ICG for the Memory Manager tests.  Also added
a "-m" option to create the map files ICG creates for sims.  The memory manager
tests do not need these maps so we don't include the option.  Added the -m option
to the sim makefile and the master makefile so we do create the map when compile
Trick core and sims.

refs #72
This commit is contained in:
Alex Lin
2015-06-24 17:49:14 -05:00
parent bfc197f81c
commit cf3738d3fd
6 changed files with 35 additions and 22 deletions

View File

@ -20,12 +20,14 @@
#include "Utilities.hh"
PrintAttributes::PrintAttributes(int in_attr_version , HeaderSearchDirs & in_hsd ,
CommentSaver & in_cs , clang::CompilerInstance & in_ci, bool in_force , bool in_sim_services_flag ) :
CommentSaver & in_cs , clang::CompilerInstance & in_ci, bool in_force , bool in_sim_services_flag ,
std::string in_output_dir ) :
hsd(in_hsd) ,
cs(in_cs) ,
ci(in_ci) ,
force(in_force) ,
sim_services_flag( in_sim_services_flag )
sim_services_flag( in_sim_services_flag ) ,
output_dir( in_output_dir )
{
printer = createFileContents(in_attr_version) ;
}
@ -195,10 +197,14 @@ std::string PrintAttributes::createIOFileName(std::string header_file_name) {
}
// Put all of the sim_services io_files in ${TRICK_HOME}/trick_source/sim_services/include/io_src unless
// it is in er7_utils. The er7_utils io_files have duplicate file names so the overwrite each other
if ( sim_services_flag and (dir_name.find("er7_utils") == std::string::npos) ) {
io_file_name = std::string(getenv("TRICK_HOME")) + "/trick_source/sim_services/include/io_src/" + base_name ;
if ( ! output_dir.empty() ) {
io_file_name = output_dir + "/io_src/" + base_name ;
} else {
io_file_name = dir_name + "/io_src/" + base_name ;
if ( sim_services_flag and (dir_name.find("er7_utils") == std::string::npos) ) {
io_file_name = std::string(getenv("TRICK_HOME")) + "/trick_source/sim_services/include/io_src/" + base_name ;
} else {
io_file_name = dir_name + "/io_src/" + base_name ;
}
}
return io_file_name ;
}