mi024

College project master 1 "Projet IAD"
git clone https://esimon.eu/repos/mi024.git
Log | Files | Refs | README

commit d0c4ff8e04e026837188b77d3248b4ff531d4439
parent 35c84f50b54e7a53c79e2d7f8e925fce35e5b4d6
Author: Étienne Simon <etienne.jl.simon@gmail.com>
Date:   Mon, 25 Mar 2013 20:47:45 +0100

Mise à jour des CMakeLists.txt pour le nouveau système.

Diffstat:
MCMakeLists.txt | 7++++---
Mdoc/CMakeLists.txt | 18++++++++++--------
Msrc/CMakeLists.txt | 2+-
3 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -5,17 +5,18 @@ find_package(CUDA REQUIRED) find_package(Boost COMPONENTS unit_test_framework) find_package(Boost COMPONENTS serialization REQUIRED) find_package(Doxygen) +find_package(LATEX) set(WALFU_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../WALFU" CACHE PATH "Path to the WALFU directory") -set(CUBLAS_LIBRARIES "/usr/lib/x86_64-linux-gnu/libcublas.so" CACHE FILEPATH "Path to the cublas shared library.") set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) set(WALFU_INCLUDE_DIRS ${WALFU_DIR} ${WALFU_DIR}/Core ${WALFU_DIR}/nmlp) -set(WALFU_LIBRARY_DIRS ${WALFU_DIR}/bin/Core ${WALFU_DIR}/bin/nmlp) +set(WALFU_LIBRARY_DIRS ${WALFU_DIR}/Core ${WALFU_DIR}/nmlp) set(CUDA_PROPAGATE_HOST_FLAGS OFF) if(CMAKE_COMPILER_IS_GNUCXX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -pedantic-errors -Wno-non-template-friend") + # CUDA is ill-formed in C++98/03 since it uses the `long long' type, `-std=c++0x' has to be used. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -pedantic-errors -Wno-non-template-friend") endif(CMAKE_COMPILER_IS_GNUCXX) add_subdirectory(doc) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt @@ -1,5 +1,3 @@ -include(UseLATEX) - set(LATEX_DOCUMENTS specifications.tex "operational plan.tex" @@ -7,9 +5,13 @@ set(LATEX_DOCUMENTS add_custom_target(doc) -foreach(LATEX_DOCUMENT ${LATEX_DOCUMENTS}) - add_latex_document(${LATEX_DOCUMENT} IMAGE_DIRS images DEFAULT_PDF MANGLE_TARGET_NAMES) - get_filename_component(DOCUMENT ${LATEX_DOCUMENT} NAME_WE) - add_dependencies(doc ${DOCUMENT}_pdf) - add_custom_command(TARGET ${DOCUMENT}_pdf POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${DOCUMENT}.pdf ${CMAKE_BINARY_DIR}/${DOCUMENT}.pdf VERBATIM) -endforeach(LATEX_DOCUMENT) +if(LATEX_FOUND) + include(UseLATEX) + + foreach(LATEX_DOCUMENT ${LATEX_DOCUMENTS}) + add_latex_document(${LATEX_DOCUMENT} IMAGE_DIRS images DEFAULT_PDF MANGLE_TARGET_NAMES) + get_filename_component(DOCUMENT ${LATEX_DOCUMENT} NAME_WE) + add_dependencies(doc ${DOCUMENT}_pdf) + add_custom_command(TARGET ${DOCUMENT}_pdf POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${DOCUMENT}.pdf ${CMAKE_BINARY_DIR}/${DOCUMENT}.pdf VERBATIM) + endforeach(LATEX_DOCUMENT) +endif(LATEX_FOUND) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt @@ -2,4 +2,4 @@ include_directories(${Boost_INCLUDE_DIRS} ${WALFU_INCLUDE_DIRS}) link_directories(${Boost_LIBRARY_DIRS} ${WALFU_LIBRARY_DIRS}) cuda_add_executable(test_serialization ${WALFU_DIR}/nmlp/Kernels_nmlp.cu test/serialization.cpp) -target_link_libraries(test_serialization lib_nmlp lib_core ${CUBLAS_LIBRARIES} ${CUDA_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_SERIALIZATION_LIBRARY}) +target_link_libraries(test_serialization lib_nmlp lib_core ${CUDA_CUBLAS_LIBRARIES} ${CUDA_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_SERIALIZATION_LIBRARY})