Changed names of static libraries, targets and updated README_CMake
authorjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Oct 2010 10:18:13 +0000 (10:18 +0000)
committerjjose <jjose@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Oct 2010 10:18:13 +0000 (10:18 +0000)
CMakeLists.txt
README_CMake
cmake/ALICE_CMake.cmake
cmake/CMakeDA.cmake

index 932c987c014dd7ff68cf4c22531310cdbc2880d8..6972ce85a1a4e92a52b8951d2f03f63f9f97619f 100644 (file)
@@ -186,7 +186,7 @@ foreach(MODULE ${MODDIRS})
   set(${MODULE}ALIBS)
   configure_file(${PROJECT_SOURCE_DIR}/cmake/Module.tmp ${PROJECT_SOURCE_DIR}/${MODULE}/CMakeLists.txt @ONLY)
   add_custom_target(${MODULE}-all ALL)
-  add_custom_target(${MODULE}-static)
+  add_custom_target(${MODULE}-all-static)
   add_dependencies(alilibs-static "${MODULE}-static")
   add_subdirectory(${MODULE})
 endforeach(MODULE)
index 70b098504bc655b0e3b8266b987106cc22064607..ad517e09dbca89a3aacf20ed8c856f160e16b7cb 100644 (file)
@@ -15,13 +15,32 @@ Steps to Build AliRoot with CMake :
 
 3. Execute the following commands to build AliRoot
 
-       cmake ~/trunk
+       cmake <Path to Source>
+
+eg.    cmake ~/trunk
        make
 
 4. In order to build addtional targets like THydjet and SHUTTLE add the following options to the cmake command
 
        cmake -DTHydjet=ON -DSHUTTLE=ON <path_to_source>
 
+5. Static libraries can be built using
+
+       make alilibs-static
+
+6. Individual Modules can be built using
+
+       make <Module>-all
+       make <Module>-all-static 
+
+eg.    make STEER-all STEER-all-static
+
+7. Individual Packages can be built using
+
+       make <Package>
+       make <Package>-static
+
+eg.    make STEERbase STEERbase-static
 
 !IMPORTANT! - Make sure your source folder is clean. If you used the old make system to build aliroot run make clean in the source directory before you run cmake
  
index de3286d0808a4034c66e1e62ee4e04d1288a794f..5cb5c0e920f5f4403d056e90904026609e8b50e0 100644 (file)
@@ -308,8 +308,8 @@ macro(ALICE_BuildPackage)
   if(lib)
     list(APPEND PMLIBS ${PACKAGE})
     list(APPEND ALLLIBS ${PACKAGE})
-    list(APPEND PMALIBS ${PACKAGE}_a)
-    list(APPEND ALLALIBS ${PACKAGE}_a)
+    list(APPEND PMALIBS ${PACKAGE}-static)
+    list(APPEND ALLALIBS ${PACKAGE}-static)
     list(APPEND BINLIBS ${PACKAGE})
   else()
     list(APPEND ALLEXECS ${PACKAGE})
@@ -437,12 +437,13 @@ macro(ALICE_BuildLibrary)
   
   add_dependencies(${MODULE}-all ${PACKAGE})
      
-  add_library(${PACKAGE}_a STATIC EXCLUDE_FROM_ALL ${PCS} ${PFS} ${PS} ${PDS})
+  add_library(${PACKAGE}-static STATIC EXCLUDE_FROM_ALL ${PCS} ${PFS} ${PS} ${PDS})
+  set_target_properties(${PACKAGE}-static PROPERTIES OUTPUT_NAME ${PACKAGE})
   if(PELIBS OR ALLIB)
-    target_link_libraries(${PACKAGE}_a ${PELIBSDIR} ${PELIBS} ${ALLIB})
+    target_link_libraries(${PACKAGE}-static ${PELIBSDIR} ${PELIBS} ${ALLIB})
   endif(PELIBS OR ALLIB)
 
-  add_dependencies(${MODULE}-static ${PACKAGE}_a)
+  add_dependencies(${MODULE}-all-static ${PACKAGE}-static)
   if(ALIPROFILE STREQUAL "YES")
     add_dependencies(${MODULE}-all ${MODULE}-static)
   endif(ALIPROFILE STREQUAL "YES")
index 33b96ba4400ed39b715d43c58f3b159576fdec6d..0612c526cea02aac53bd096e21be39d917fa08cd 100644 (file)
@@ -112,7 +112,7 @@ foreach(detector ${ONLINEDETECTORS} )
 
   set(ALIROOTALIBS)
 
-  list(APPEND ALIROOTALIBS RAWDatabase_a RAWDatarec_a RAWDatasim_a STEERBase_a STEER_a CDB_a ESD_a STAT_a AOD_a )
+  list(APPEND ALIROOTALIBS RAWDatabase-static RAWDatarec-static RAWDatasim-static STEERBase-static STEER-static CDB-static ESD-static STAT-static AOD-static )
 
   expand(ALIROOTALIBS2 "\${${DAMODULE}ALIBS}")
   expand(DAINCDIRS "\${${DAMODULE}INC}")
@@ -189,16 +189,20 @@ foreach(detector ${ONLINEDETECTORS} )
 
          set(ZIP)
          foreach(_lib ${ALIROOTALIBS})
-          string(REGEX REPLACE "-all" "_a" _lib ${_lib})
+          string(REGEX REPLACE "-static" "" _lib ${_lib})
           list(APPEND ZIP && ar x "../lib${_lib}.a")
          endforeach(_lib)
          list (APPEND ZIP && ar r "../lib${DALIB}.a" "*.o")
 
          add_custom_target( ${DALIB} COMMAND rm -rf junk && mkdir -p junk 
-                               COMMAND cd junk ${ZIP}
-                               COMMAND cd ../ && rm -rf junk
+                               COMMAND cd junk${DAEXE} ${ZIP}
+                               COMMAND cd ../ && rm -rf junk${DAEXE}
                                DEPENDS ${ALIROOTALIBS}
                                WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+         add_custom_command( TARGET clean
+                            COMMAND rm -rf junk${DAEXE}
+                            WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+           
 
          add_custom_target(${DATARGETNAME})
          add_executable(${DAEXE} ${DASRC})