################################################################################ ## ## Copyright (c) 2007-2009 Illumina, Inc. ## ## This software is covered by the "Illumina Genome Analyzer Software ## License Agreement" and the "Illumina Source Code License Agreement", ## and certain third party copyright/licenses, and any user of this ## source file is bound by the terms therein (see accompanying files ## Illumina_Genome_Analyzer_Software_License_Agreement.pdf and ## Illumina_Source_Code_License_Agreement.pdf and third party ## copyright/license notices). ## ## This file is part of the Consensus Assessment of Sequence And VAriation ## (CASAVA) software package. ## ## file verifyBoost.cmake ## ## Tests dynamically-linked boost ## ## author Roman Petrovski ## ################################################################################ message (STATUS "Testing binaries dynamic linkage in: ${CASAVA_VERIFY_BOOST_DIR}") message (STATUS "Assumed boost libraries path: ${Boost_LIBRARY_DIRS}") execute_process(COMMAND "${CASAVA_VERIFY_BOOST_DIR}/verifyBoost" RESULT_VARIABLE TMP_RESULT ) if (TMP_RESULT) foreach (Boost_LIBRARY_DIR ${Boost_LIBRARY_DIRS}) set(ld_library_path "${Boost_LIBRARY_DIR}:${ld_library_path}") endforeach (Boost_LIBRARY_DIR ${Boost_LIBRARY_DIRS}) set(ENV{LD_LIBRARY_PATH} "${ld_library_path}$ENV{LD_LIBRARY_PATH}") message (STATUS "Testing if LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH} would fix the problem...") execute_process(COMMAND "${CASAVA_VERIFY_BOOST_DIR}/verifyBoost" RESULT_VARIABLE TMP_RESULT ) if (TMP_RESULT) message (SEND_ERROR "Failed to launch CASAVA dynamic link test binary. Improper LD_LIBRARY_PATH is the most likely cause.") else (TMP_RESULT) message (STATUS "Launching CASAVA with modified LD_LIBRARY_PATH successful!") message (STATUS "!===================================================================================") message (STATUS "! Boost shared libraries exist but are unreachable to CASAVA.") message (STATUS "! Make sure the LD_LIBRARY_PATH contains path to boost shared libraries when running CASAVA") message (STATUS "! For example add the following line to your ~/.bashrc file: ") message (STATUS "! export LD_LIBRARY_PATH=${ld_library_path}\${LD_LIBRARY_PATH} ") message (STATUS "!===================================================================================") endif (TMP_RESULT) endif (TMP_RESULT) message (STATUS "Testing binaries done.")