mirror of
https://github.com/triqs/dft_tools
synced 2024-12-25 13:53:40 +01:00
Add details for applis compilation/install
- generation of test script - export new variables
This commit is contained in:
parent
798ba1c800
commit
6bf0d0f6b5
@ -43,7 +43,11 @@ macro(triqs_add_test_C_hdf testname h5diff_options)
|
|||||||
)
|
)
|
||||||
endmacro(triqs_add_test_C_hdf)
|
endmacro(triqs_add_test_C_hdf)
|
||||||
|
|
||||||
|
# WRITE THE run_pytriqs_for_test file
|
||||||
|
file (WRITE ${CMAKE_BINARY_DIR}/run_pytriqs_for_test.sh "#!/bin/bash\n export PYTHONPATH=${CMAKE_BINARY_DIR}:$PYTHONPATH\n ${TRIQS_PATH}/bin/pytriqs $@")
|
||||||
|
execute_process(COMMAND chmod a+x ${CMAKE_BINARY_DIR}/run_pytriqs_for_test.sh)
|
||||||
|
|
||||||
|
#SET(RUN_TEST @CMAKE_INSTALL_PREFIX@/bin/pytriqs)
|
||||||
SET(RUN_TEST ${CMAKE_BINARY_DIR}/run_pytriqs_for_test.sh )
|
SET(RUN_TEST ${CMAKE_BINARY_DIR}/run_pytriqs_for_test.sh )
|
||||||
#if (TRIQS_BUILD_STATIC)
|
#if (TRIQS_BUILD_STATIC)
|
||||||
# FILE(WRITE ${RUN_TEST} "PYTHONPATH=${CMAKE_BINARY_DIR}:$PYTHONPATH ${PYTHON_INTERPRETER} $1")
|
# FILE(WRITE ${RUN_TEST} "PYTHONPATH=${CMAKE_BINARY_DIR}:$PYTHONPATH ${PYTHON_INTERPRETER} $1")
|
||||||
|
@ -29,7 +29,9 @@ set(TRIQS_LIBRARY_GMP @TRIQS_LIBRARY_GMP@)
|
|||||||
set(TRIQS_LIBRARY_GSL @GSL_LIBRARIES@)
|
set(TRIQS_LIBRARY_GSL @GSL_LIBRARIES@)
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
|
set(TRIQS_WITH_PYTHON_SUPPORT @TRIQS_WITH_PYTHON_SUPPORT@)
|
||||||
set(TRIQS_HDF5_DIFF_EXECUTABLE @TRIQS_HDF5_DIFF_EXECUTABLE@)
|
set(TRIQS_HDF5_DIFF_EXECUTABLE @TRIQS_HDF5_DIFF_EXECUTABLE@)
|
||||||
|
set(TRIQS_PYTHON_LIB_DEST @TRIQS_PYTHON_LIB_DEST@)
|
||||||
|
|
||||||
# for people who want to quickly add everything TRIQS has detected...
|
# for people who want to quickly add everything TRIQS has detected...
|
||||||
set(TRIQS_LIBRARY_ALL ${TRIQS_LIBRARY} ${TRIQS_LIBRARY_BOOST} ${TRIQS_LIBRARY_PYTHON} ${TRIQS_LIBRARY_MPI} ${TRIQS_LIBRARY_HDF5} ${TRIQS_LIBRARY_LAPACK} ${TRIQS_LIBRARY_FFTW} ${TRIQS_LIBRARY_GMP} ${TRIQS_LIBRARY_GSL} )
|
set(TRIQS_LIBRARY_ALL ${TRIQS_LIBRARY} ${TRIQS_LIBRARY_BOOST} ${TRIQS_LIBRARY_PYTHON} ${TRIQS_LIBRARY_MPI} ${TRIQS_LIBRARY_HDF5} ${TRIQS_LIBRARY_LAPACK} ${TRIQS_LIBRARY_FFTW} ${TRIQS_LIBRARY_GMP} ${TRIQS_LIBRARY_GSL} )
|
||||||
@ -80,7 +82,7 @@ macro (triqs_cython_module NickName ModuleName)
|
|||||||
set_target_properties(${ModuleName} PROPERTIES PREFIX "") #eliminate the lib in front of the module name
|
set_target_properties(${ModuleName} PROPERTIES PREFIX "") #eliminate the lib in front of the module name
|
||||||
target_link_libraries(${ModuleName} ${TRIQS_LINK_LIBS} triqs)
|
target_link_libraries(${ModuleName} ${TRIQS_LINK_LIBS} triqs)
|
||||||
if (${ARGN} MATCHES "")
|
if (${ARGN} MATCHES "")
|
||||||
install (TARGETS ${ModuleName} DESTINATION ${TRIQS_PYTHON_LIB_DEST}/${ARGN} )
|
install (TARGETS ${ModuleName} DESTINATION @TRIQS_PYTHON_LIB_DEST@/${ARGN} )
|
||||||
endif (${ARGN} MATCHES "")
|
endif (${ARGN} MATCHES "")
|
||||||
set_property (GLOBAL APPEND PROPERTY DEPENDANCE_TO_ADD triqs_${NickName} )
|
set_property (GLOBAL APPEND PROPERTY DEPENDANCE_TO_ADD triqs_${NickName} )
|
||||||
|
|
||||||
@ -98,4 +100,15 @@ macro (triqs_add_all_subdirectories_with_cmakelist)
|
|||||||
endforeach ( f ${ALLSUBS})
|
endforeach ( f ${ALLSUBS})
|
||||||
endmacro (triqs_add_all_subdirectories_with_cmakelist)
|
endmacro (triqs_add_all_subdirectories_with_cmakelist)
|
||||||
|
|
||||||
|
# RPATH setting
|
||||||
|
macro (triqs_add_rpath_for_cxx_code)
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
|
set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
||||||
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||||
|
else()
|
||||||
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||||
|
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||||
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||||
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
Loading…
Reference in New Issue
Block a user