From d72555f3ccfc983043d7d8984d957a14d2011ba7 Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Tue, 21 Jul 2015 15:10:40 -0500 Subject: [PATCH] Split CP up into components that can be called individually After about 6 unsuccessful builds I decided to run the unit tests before checking in these files. I fixed the integrator unit test that was failing from a previous issue along with problems with the sims. refs #86 --- trick_sims/makefile | 25 ------------------- .../Interface_Code_Gen/PrintAttributes.cpp | 3 ++- .../sim_services/Integrator/test/Makefile | 2 +- 3 files changed, 3 insertions(+), 27 deletions(-) diff --git a/trick_sims/makefile b/trick_sims/makefile index 631bf8ef..3f6a3bdc 100644 --- a/trick_sims/makefile +++ b/trick_sims/makefile @@ -113,28 +113,3 @@ ifneq ($(wildcard $(DR_RESULTS)/Ref_Logs/typesB_${TRICK_HOST_CPU}.trk), ) endif -# the test_simlib has a dependency of SIM_Ball++_L1 being built first -SIM_test_simlib/T_main_${TRICK_HOST_CPU}_test.exe : SIM_Ball++_L1/T_main_${TRICK_HOST_CPU}_test.exe - -# Prevent mutiple sims from compiling the same code -SIM_aero_fast/T_main_${TRICK_HOST_CPU}_test.exe : SIM_aero_curve/T_main_${TRICK_HOST_CPU}_test.exe -SIM_amoeba/T_main_${TRICK_HOST_CPU}_test.exe : SIM_aero_fast/T_main_${TRICK_HOST_CPU}_test.exe -SIM_ball_L2/T_main_${TRICK_HOST_CPU}_test.exe : SIM_ball_L1/T_main_${TRICK_HOST_CPU}_test.exe -SIM_ball_L3/T_main_${TRICK_HOST_CPU}_test.exe : SIM_ball_L2/T_main_${TRICK_HOST_CPU}_test.exe -SIM_ball_default_data/T_main_${TRICK_HOST_CPU}_test.exe : SIM_ball_L3/T_main_${TRICK_HOST_CPU}_test.exe -SIM_test_ip/T_main_${TRICK_HOST_CPU}_test.exe : SIM_Ball++_L1/T_main_${TRICK_HOST_CPU}_test.exe -SIM_rti/T_main_${TRICK_HOST_CPU}_test.exe : SIM_test_ip/T_main_${TRICK_HOST_CPU}_test.exe -SIM_cannon_analytic/T_main_${TRICK_HOST_CPU}_test.exe : SIM_aero_fast/T_main_${TRICK_HOST_CPU}_test.exe -SIM_cannon_contact/T_main_${TRICK_HOST_CPU}_test.exe : SIM_cannon_analytic/T_main_${TRICK_HOST_CPU}_test.exe -SIM_cannon_dt/T_main_${TRICK_HOST_CPU}_test.exe : SIM_cannon_contact/T_main_${TRICK_HOST_CPU}_test.exe -SIM_cannon_eulercromer/T_main_${TRICK_HOST_CPU}_test.exe : SIM_cannon_dt/T_main_${TRICK_HOST_CPU}_test.exe -SIM_cannon_integ/T_main_${TRICK_HOST_CPU}_test.exe : SIM_cannon_eulercromer/T_main_${TRICK_HOST_CPU}_test.exe -SIM_jet_call/T_main_${TRICK_HOST_CPU}_test.exe : SIM_cannon_integ/T_main_${TRICK_HOST_CPU}_test.exe -SIM_jet_event/T_main_${TRICK_HOST_CPU}_test.exe : SIM_jet_call/T_main_${TRICK_HOST_CPU}_test.exe -SIM_jet_read/T_main_${TRICK_HOST_CPU}_test.exe : SIM_jet_event/T_main_${TRICK_HOST_CPU}_test.exe -SIM_monte/T_main_${TRICK_HOST_CPU}_test.exe : SIM_jet_read/T_main_${TRICK_HOST_CPU}_test.exe -SIM_stls2/T_main_${TRICK_HOST_CPU}_test.exe : SIM_stls/T_main_${TRICK_HOST_CPU}_test.exe -SIM_tcltk_java/T_main_${TRICK_HOST_CPU}_test.exe : SIM_monte/T_main_${TRICK_HOST_CPU}_test.exe -SIM_threads_simple/T_main_${TRICK_HOST_CPU}_test.exe : SIM_threads/T_main_${TRICK_HOST_CPU}_test.exe -SIM_trickcomm/T_main_${TRICK_HOST_CPU}_test.exe : SIM_tcltk_java/T_main_${TRICK_HOST_CPU}_test.exe - diff --git a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp index cb1dce23..f185848a 100644 --- a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp +++ b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp @@ -522,8 +522,9 @@ void PrintAttributes::printHeaderLibraryDependencies() { std::string lib_dep_file = std::string("build") + (*sit).substr(0,found) + ".lib_deps" ; char * dir_name ; - dir_name = dirname((char *)lib_dep_file.c_str()) ; + dir_name = dirname(strdup((char *)lib_dep_file.c_str())) ; _mkdir(dir_name) ; + free(dir_name) ; std::vector< std::string > lib_deps = cs.getLibraryDependencies((*sit)) ; std::vector< std::string >::iterator vit ; diff --git a/trick_source/sim_services/Integrator/test/Makefile b/trick_source/sim_services/Integrator/test/Makefile index c31bb550..65606027 100644 --- a/trick_source/sim_services/Integrator/test/Makefile +++ b/trick_source/sim_services/Integrator/test/Makefile @@ -10,7 +10,7 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -I${TRICK_HOME}/trick_source -I${TRICK_HOME}/include/trick/compat -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 -DUSE_ER7_UTILS_INTEGRATORS=1 -TRICK_LIBS = -L${TRICK_LIB_DIR} -ltrick -ltrick_units +TRICK_LIBS = -L${TRICK_LIB_DIR} -ltrick -ltrick_mm -ltrick_units -ltrick -ltrick_mm TRICK_EXEC_LINK_LIBS += ${GTEST_HOME}/lib/libgtest.a ${GTEST_HOME}/lib/libgtest_main.a # All tests produced by this Makefile. Remember to add new tests you