Lawrence Crowl <cr...@google.com> writes: > Inside a C++ .exp file, I want to know the compiler command that > would be executed for a given dg-test command. That is, given > > set dg-do-what-default compile > dg-test -keep-output $source "$options -I." "" > > what is a command that I can execute to compile the source file > without dejagnu trying to interpret it as a test? > > It might be sufficient if I just knew the path to the compiler. > > Any ideas?
Welcome to DejaGNU, a horrible program which should be removed from reality and sent to spend a thousand lifetimes as a servant to the elder gods. The cruel ones. That said, you can try something along the lines of global target_triplet set comp_output [g++_target_compile "source.c" "source.o" "object" ""] set comp_output [g++-dg-prune $target_triplet $comp_output] if [string match "" $comp_output] { # Success! } else { # failure.... verbose -log $comp_output } Ian