Commit fb8712f2 authored by Lynn Garren's avatar Lynn Garren
Browse files

make sure all modules are named ClhepXXX

parent 700526f3
......@@ -2,7 +2,7 @@
# Top Level CMakeLists.txt for CLHEP
# cmake [-DCMAKE_INSTALL_PREFIX=/install/path]
# [-DCMAKE_BUILD_TYPE=Debug|Release|RelWithDebInfo|MinSizeRel]
# [-Dbuild_docs]
# [-Dbuild_docs:BOOL=ON]
# /path/to/source
# make
# make test
......@@ -21,16 +21,18 @@ set( VERSION 2.1.0.1 )
set(CMAKE_MODULE_PATH "${CMAKE_ROOT}/Modules")
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules ${CMAKE_MODULE_PATH})
message(STATUS "module path is ${CMAKE_MODULE_PATH}" )
# build_docs is OFF (false) by default
if ( build_docs )
message(STATUS "documents WILL be built and installed" )
else()
message(STATUS "documents WILL NOT be installed" )
endif()
# various handy macros
include(EnsureOutOfSourceBuild)
include(CopyHeaders)
include(BuildTest)
include(BuildLibrary)
include(ClhepOutOfSourceBuild)
include(ClhepCopyHeaders)
include(ClhepBuildTest)
include(ClhepBuildLibrary)
include(ClhepVariables)
include(CheckFunctionExists)
......
2011-07-12 Lynn Garren <garren@fnal.gov>
* cmake/Templates/ClhepVersion.h.in: template for ClhepVersion.h
2011-07-11 Lynn Garren <garren@fnal.gov>
* CMakeLists.txt: adding the ability to build with cmake
......
# build GenericFunctions documentation
include(BuildTex)
include(ClhepBuildTex)
clhep_latex( GenericFunctions genericFunctions example.ps
hydrogen.ps
......
# build Units documentation
include(BuildTex)
include(ClhepBuildTex)
clhep_latex( Units Units html.sty )
# build Vector documentation
include(BuildTex)
include(ClhepBuildTex)
clhep_latex( Vector eulerAngleComputation )
clhep_latex( Vector VectorDefs )
......
......@@ -53,16 +53,16 @@ make install
-DCMAKE_INSTALL_PREFIX=/install/path
-DCMAKE_BUILD_TYPE=Debug|Release|RelWithDebInfo|MinSizeRel
-Dbuild_docs
-Dbuild_docs:BOOL=ON
#-------------------------------------------------------------
# building documents
#-------------------------------------------------------------
Documents are not built or installed automatically.
If you wish to build and install the documents, add -Dbuild_docs
to your cmake command. Documents will then be built during the
make step and installed during the install step.
If you wish to build and install the documents,
add -Dbuild_docs:BOOL=ON to your cmake command.
Documents will then be built during the normal build.
You will need to have latex in your path.
#-------------------------------------------------------------
......
# Build package libraries.
# Build the main libCLHEP source code list as we go.
# Build the main CLHEP source code list as we go.
#
# Recommended use:
# clhep_build_library( <package> <source code files> )
#
macro (clhep_build_library package )
set ( libCLHEP_${package}_SOURCES ${ARGN} )
# build up the source list for libCLHEP
set ( CLHEP_${package}_SOURCES ${ARGN} )
# build up the source list for CLHEP
set( CLHEP_${package}_list CACHE INTERNAL "${package} sources" FORCE )
foreach( file ${ARGN} )
set( CLHEP_${package}_list ${CLHEP_${package}_list} ${CMAKE_CURRENT_SOURCE_DIR}/${file}
......@@ -22,8 +22,8 @@ macro (clhep_build_library package )
list(APPEND package_library_list ${dep} )
endforeach()
endif()
ADD_LIBRARY (${package} SHARED ${libCLHEP_${package}_SOURCES})
ADD_LIBRARY (${package}S STATIC ${libCLHEP_${package}_SOURCES})
ADD_LIBRARY (${package} SHARED ${CLHEP_${package}_SOURCES})
ADD_LIBRARY (${package}S STATIC ${CLHEP_${package}_SOURCES})
SET_TARGET_PROPERTIES (${package}
PROPERTIES OUTPUT_NAME CLHEP-${package}-${VERSION}
)
......@@ -45,7 +45,7 @@ endmacro (clhep_build_library)
macro (clhep_build_libclhep )
foreach( pkg ${ARGN} )
##message( STATUS "${pkg} sources are ${CLHEP_${pkg}_list}" )
list(APPEND CLHEP_DEPS ${LIBRARY_OUTPUT_PATH}/libCLHEP-${pkg}-${VERSION}.a )
list(APPEND CLHEP_DEPS ${LIBRARY_OUTPUT_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP-${pkg}-${VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX} )
list(APPEND clhep_sources ${CLHEP_${pkg}_list} )
endforeach()
##message( STATUS "clheplib source list ${clhep_sources}" )
......@@ -65,4 +65,13 @@ macro (clhep_build_libclhep )
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
# create the symbolic links
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_static_symlink
"exec_program(${CMAKE_COMMAND} ARGS -E chdir ${CMAKE_INSTALL_PREFIX}/lib; ${CMAKE_COMMAND} ARGS -E create_symlink ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_STATIC_LIBRARY_PREFIX}CLHEP${CMAKE_STATIC_LIBRARY_SUFFIX} )" )
INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/clhep_static_symlink )
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/clhep_shared_symlink
"exec_program(${CMAKE_COMMAND} ARGS -E chdir ${CMAKE_INSTALL_PREFIX}/lib; ${CMAKE_COMMAND} ARGS -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP-${VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_SHARED_LIBRARY_PREFIX}CLHEP${CMAKE_SHARED_LIBRARY_SUFFIX} )" )
INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/clhep_shared_symlink )
endmacro (clhep_build_libclhep )
......@@ -4,7 +4,7 @@
# Recommended use:
# clhep_copy_headers( <package_list> )
include(ParseVersion)
include(ClhepParseVersion)
macro (clhep_copy_headers )
foreach( package ${ARGN} )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment