View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007716CMakeModulespublic2008-09-22 03:532008-09-25 16:53
ReporterPetr Gotthard 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0007716: [New Module] FindRTI module for HLA RTI
DescriptionAs discussed on the list, here is a FindXXX.cmake module that tries to find a Run Time Infrastructure of the Modeling and Simulation High Level Architecture (M&S HLA). It would be great if you add this to CMake.
Additional Informationhttp://www.cmake.org/pipermail/cmake/2008-September/024140.html [^]
TagsNo tags attached.
Attached Files? file icon FindRTI.cmake [^] (3,501 bytes) 2008-09-22 03:53
? file icon FindRTI.cmake(2) [^] (3,260 bytes) 2008-09-24 12:25
? file icon FindRTI.cmake(3) [^] (3,461 bytes) 2008-09-25 05:13

 Relationships

  Notes
(0013563)
Philip Lowman (developer)
2008-09-23 23:15

Petr,

Looks good. I'll point this module out to my coworker for him to try out when he starts messing around with HLA again.

There were a few things I noticed which could use some tweaks before it's checked in.

1. "/usr" and "/usr/local" don't need to be listed in POSSIBLE_DIRS because they will get searched automatically when FIND_LIBRARY gets called (also in the opposite order since the system path on Linux is /usr/local, /usr, /). See the full documentation for FIND_LIBRARY for the gory details on this extremely complex command. =)

2. For the RTI_FOUND, RTI_FIND_REQUIRED stuff, use the FIND_PACKAGE_HANDLE_STANDARD_ARGS helper macro. See any of the CMake modules in 2.6.0 or greater for an example of how to do this.

3. Use RTI_INCLUDE_DIR instead of RTI_INCLUDE (seems to be the going convention)

4. The MARK_AS_ADVANCED() call at the bottom has no effect because you're only marking normal variables as advanced. Only CACHE variables (like RTI_LIBRARY) can be marked as advanced and I would recommend leaving it up to the user of FindRTI if they want to mark RTI_LIBRARY or FEDTIME_LIBRARY as advanced.

5. Is there a reason you're exposing RTI_LIBRARY_DIRS?
(0013564)
Philip Lowman (developer)
2008-09-23 23:35

Sorry, a few other things I noticed

1. Rename POSSIBLE_DIRS to RTI_POSSIBLE_DIRS to lessen the chance of variable collision.

2. In the same light, rename the MESSAGE_QUIETLY macro to RTI_MESSAGE_QUIETLY to avoid macro name collisions. Anywhere you declare a local variable or macro in your Find module you should at the bare minimum preface it with FOO_ where FOO is your module name.

3. What is the reason you need to manipulate CMAKE_FIND_LIBRARY_PREFIXES (just curious)?
(0013569)
Petr Gotthard (reporter)
2008-09-24 12:16
edited on: 2008-09-24 12:17

Thank you, Philip,

1.-4. Fixed.
5. If there was a reason, I don't remember it ;-). Removed.

1.-2. Fixed.
3. Because the prefix under Windows set to "", but the MAK RTI libraries have the "lib" prefix even under Windows.

(0013588)
Bill Hoffman (manager)
2008-09-25 16:53

Please see here:

http://www.itk.org/Wiki/CMake:Module_Maintainers [^]

and here:

http://www.cmake.org/pipermail/cmake/2007-July/015258.html [^]

 Issue History
Date Modified Username Field Change
2008-09-22 03:53 Petr Gotthard New Issue
2008-09-22 03:53 Petr Gotthard File Added: FindRTI.cmake
2008-09-23 23:15 Philip Lowman Note Added: 0013563
2008-09-23 23:35 Philip Lowman Note Added: 0013564
2008-09-24 12:16 Petr Gotthard Note Added: 0013569
2008-09-24 12:17 Petr Gotthard Note Edited: 0013569
2008-09-24 12:25 Petr Gotthard File Added: FindRTI.cmake(2)
2008-09-25 05:13 Petr Gotthard File Added: FindRTI.cmake(3)
2008-09-25 16:53 Bill Hoffman Status new => closed
2008-09-25 16:53 Bill Hoffman Note Added: 0013588
2008-09-25 16:53 Bill Hoffman Resolution open => won't fix


Copyright © 2000 - 2018 MantisBT Team