-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commands for CMake #3
Conversation
This reverts commit 70c81e4.
I've reopened this because I would like to be able to use these commands now. I don't completely remember why I closed it. I think it was that I didn't like you manually to change directories to and back as show in the example above, where as with anonymous shell you can cd in each command and it will automatically come back. I don't think I can simplify any more though, so I'm fine with how it is now. |
Alternatively I could merge all these actictions: <command name="file_manipulation" options="type=rmmkcd file=build"/>
<command name="cmake" options=".."/>
<command name="cmake" options="--build ."/>
<command name="file_manipulation" options="type=chdir"/> into the cmake command, so it would look something like: <command name="cmake" options="replace=build .."/> |
I like the alternative you've shown here. That seems to fit with the way most of the autobuild commands work. |
The only issue I have with that approach is that I would like to address three different kinds of options: the output directory name/location, the arguments to |
Many autobuild commands use Or how about something like this, a hybrid of the options you discussed before:
|
Another idea is to extend the parser to accept tags inside the command tag like so: <command name="cmake"/>
<opt name="dir">build_dir_name</option>
<opt name="config_args">--an-arg-for-config ..</opt>
<opt name="build_args">--another-arg-for-build</opt>
</command> This would have to resolved with #19, so I'm thinking it could be generalized that values inside the <command name="file_manipulation" options="type=create file=setenv.sh">
<opt name="output">
export ACE_ROOT="${ACE_WORKSPACE}/ATCD/ACE"
export CIAO_ROOT="${ACE_WORKSPACE}/ATCD/CIAO"
export DANCE_ROOT="${ACE_WORKSPACE}/ATCD/DAnCE"
export DDS_ROOT="${WORKSPACE}/OpenDDS"
export LD_LIBRARY_PATH="/usr/sfw/lib:/usr/local/lib:${WORKSPACE}/OpenDDS/lib:${ACE_WORKSPACE}/ATCD/ACE/lib:"
export MPC_ROOT="/home/taoadmin/MPC"
export OPENDDS_RTPS_DEFAULT_D0="146"
export PATH="${WORKSPACE}/OpenDDS/bin:${ACE_WORKSPACE}/ATCD/ACE/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ccs/bin:"
export TAO_ROOT="${ACE_WORKSPACE}/ATCD/TAO"
</opt>
</command> |
That seems like more than you really need. Can it parse XML Attributes?
|
Yes, but they'd be common to all |
So I realized So I'm going to remove |
This also adds new syntax for <arg> tags that go inside <command> tags. This has been made backwards compatible with the syntax from DOCGroup#19 which also uses the contents of <command> tags as file output. Finally this also adds a `cmake_cmd` to directly invoke CMake.
Okay so I took the existing work I had locally and cleaned it up. I also renamed <command name="cmake" dir="the_project">
<arg name="build_dir">build</arg>
<arg name="config_args">..</arg>
<arg name="build_args">--build .</arg>
</command> But if using all the default args like above, it can just be this: <command name="cmake" dir="the_project"/> Also added a separate command to invoke CMake directly: <command name="cmake_cmd" options="-E capabilities"/> Unlike what I previously stated over a year ago, I was able to keep <command name="file_manipulation" options="type=create file=file.txt">
<arg name="output">
if (x > 5)
print("Greater than 5");
</arg>
</command> <command name="file_manipulation" options="type=create file=file.txt">
if (x > 5)
print("Greater than 5");
</command> This allows new args to be added to Finally I added tests and a workflow to run them. They are fairly basic, but at least it's something. I was thinking we could also add simple scoreboard tests since we've been having trouble with that lately. |
print_cmake_version
and cmake
commands
print_cmake_version
and cmake
commands
Added
cmake
,print_cmake_version
, andcmake_cmd
commands, new<arg>
syntax, and tests for the new changes. Simplest use ofcmake
command is:Where
the_project
is the directory with theCMakeLists.txt
file to build. Default parameters can be changed using new<arg>
tags. This is equivalent to the command above:Also added a separate command to invoke CMake directly:
Also changed the
file_manipulation
command to support the new<arg>
tags while keeping it compatible with the previous behavior. These two commands are equivalent: