Skip to content
Snippets Groups Projects

WIP: Include lwtnn in Athena

Closed Joshua Wyatt Smith requested to merge jwsmith/atlasexternals:lwtnn into master
3 files
+ 64
0
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 57
0
#
# Package building lwtnn for the offline
# builds.
#
# The name of the package:
atlas_subdir( lwtnn )
# The dependencies of the package:
atlas_depends_on_subdirs( PUBLIC External/Eigen )
atlas_depends_on_subdirs( PUBLIC External/Boost )
# In release recompilation mode stop here:
if( ATLAS_RELEASE_MODE )
return()
endif()
# Temporary directory for the build results:
set( _buildDir ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/lwtnnBuild )
set( _srcDir ${CMAKE_CURRENT_BINARY_DIR}/../../src/lwtnn )
set(_eigenInc
"${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/include/eigen3")
set(_boostInc
"${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/include/boost")
# Build lwtnn for the build area:
ExternalProject_Add( lwtnn
PREFIX ${CMAKE_BINARY_DIR}
INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}
GIT_REPOSITORY https://github.com/lwtnn/lwtnn.git
GIT_TAG v2.2
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo
"Configuring lwtnn"
BUILD_COMMAND make CPLUS_INCLUDE_PATH=${_eigenInc}:${_boostInc}
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo
"Installing lwtnn"
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_srcDir}/lib
${_buildDir}/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_srcDir}/bin
${_buildDir}/bin
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_srcDir}/include
${_buildDir}/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}
${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM} )
ExternalProject_Add_Step( lwtnn buildinstall
COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir} <INSTALL_DIR>
COMMENT "Copying lwtnn into the build area"
DEPENDEES install )
add_dependencies( Package_lwtnn lwtnn )
add_dependencies( lwtnn Boost Eigen )
# Install lwtnn:
install( DIRECTORY ${_buildDir}/
DESTINATION . USE_SOURCE_PERMISSIONS OPTIONAL )
Loading