[Pki-devel] CMake and eclipse

Adam Young ayoung at redhat.com
Wed Aug 17 01:24:20 UTC 2011


On 08/16/2011 05:52 PM, Andreas Schneider wrote:
> ----- Original Message -----
>> CMake generats the Makefile etc in what it refers to as "OutOfSource"
>> mode. This means that, while Make is executed in
>> workspace/build-pki/core, the source remains in
>> workspace/pki/base/core. This is a "best practice" to keep the
>> Generated files separate from the revision controlled files. The PKI
>> CMake setup insists on building the code outside of the source tree.
>> This is enforced by the line pki/CMakeLists.txt line 69
>> include(MacroEnsureOutOfSourceBuild).
>>
>> Changes made in the original source tree are picked up via Makefile
>> rules. This includes changes to the CMake infrastructure, meaning that
>> configuration changes trigger a complete build. This is one of the
>> positive aspects of CMake.
> I think in the Java support of pki if you call 'make' we always rebuild
> the complete java files. The CMake Java support which I pushed upstream
> and which will be released with CMake 2.8.6 is much more clever. It only
> rebuilds the files which have been changed.
You've done a nice job on the Java support.  I know of no other build 
system that works so cleanly for both Java and other native compilers.  
The fact that it works so well with the dependencies from Fedora put it 
a notch above Maven in my book.


You might not find any performance difference. Javac is actually pretty 
good at determining what needs to be rebuilt.  Ant and Maven both 
delegate this to javac.  I built a Makefile long ago that attempted to 
determin the dependncies automatically based on imports.  When I 
stopped, and just let javac do the hard work, it decreased our build 
time by an order of magnatidue.  I don't find that the Java builds are 
that slow in PKI, but I haven't looked in to what CMake actually puts 
into the Makefiles.


add_jar probably should be extended to allow the other Java archive 
names like .war, .ear and .sar.



I notice that the paths to search for Jar files is duplicated through 
the pki CMakeLists.txt

find_file(LDAPJDK_JAR
     NAMES
         ldapjdk.jar
     PATHS
         /usr/lib/java
         /usr/share/java
)

Is this one of the things the find_jar simplifies?


>
> It also provides some nice functions like find_jar() now.



>
>
>    -- andreas
>




More information about the Pki-devel mailing list