Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CLHEP
CLHEP
Commits
fb8712f2
Commit
fb8712f2
authored
Jul 14, 2011
by
Lynn Garren
Browse files
make sure all modules are named ClhepXXX
parent
700526f3
Changes
12
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
fb8712f2
...
...
@@ -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
(
Ensure
OutOfSourceBuild
)
include
(
CopyHeaders
)
include
(
BuildTest
)
include
(
BuildLibrary
)
include
(
Clhep
OutOfSourceBuild
)
include
(
Clhep
CopyHeaders
)
include
(
Clhep
BuildTest
)
include
(
Clhep
BuildLibrary
)
include
(
ClhepVariables
)
include
(
CheckFunctionExists
)
...
...
ChangeLog
View file @
fb8712f2
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
...
...
GenericFunctions/doc/CMakeLists.txt
View file @
fb8712f2
# build GenericFunctions documentation
include
(
BuildTex
)
include
(
Clhep
BuildTex
)
clhep_latex
(
GenericFunctions genericFunctions example.ps
hydrogen.ps
...
...
Units/doc/CMakeLists.txt
View file @
fb8712f2
# build Units documentation
include
(
BuildTex
)
include
(
Clhep
BuildTex
)
clhep_latex
(
Units Units html.sty
)
Vector/doc/CMakeLists.txt
View file @
fb8712f2
# build Vector documentation
include
(
BuildTex
)
include
(
Clhep
BuildTex
)
clhep_latex
(
Vector eulerAngleComputation
)
clhep_latex
(
Vector VectorDefs
)
...
...
cmake/INSTALL
View file @
fb8712f2
...
...
@@ -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.
#-------------------------------------------------------------
...
...
cmake/Modules/BuildLibrary.cmake
→
cmake/Modules/
Clhep
BuildLibrary.cmake
View file @
fb8712f2
# Build package libraries.
# Build the main
lib
CLHEP 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
(
lib
CLHEP_
${
package
}
_SOURCES
${
ARGN
}
)
# build up the source list for
lib
CLHEP
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
${
lib
CLHEP_
${
package
}
_SOURCES
}
)
ADD_LIBRARY
(
${
package
}
S STATIC
${
lib
CLHEP_
${
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
)
cmake/Modules/BuildTest.cmake
→
cmake/Modules/
Clhep
BuildTest.cmake
View file @
fb8712f2
File moved
cmake/Modules/BuildTex.cmake
→
cmake/Modules/
Clhep
BuildTex.cmake
View file @
fb8712f2
File moved
cmake/Modules/CopyHeaders.cmake
→
cmake/Modules/
Clhep
CopyHeaders.cmake
View file @
fb8712f2
...
...
@@ -4,7 +4,7 @@
# Recommended use:
# clhep_copy_headers( <package_list> )
include
(
ParseVersion
)
include
(
Clhep
ParseVersion
)
macro
(
clhep_copy_headers
)
foreach
(
package
${
ARGN
}
)
...
...
cmake/Modules/
Ensure
OutOfSourceBuild.cmake
→
cmake/Modules/
Clhep
OutOfSourceBuild.cmake
View file @
fb8712f2
File moved
cmake/Modules/ParseVersion.cmake
→
cmake/Modules/
Clhep
ParseVersion.cmake
View file @
fb8712f2
File moved
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment