[forge] 02/14: Fix build of examples with the system cl2hpp.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Dec 21 19:36:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository forge.

commit 623f75eea36c34d4092f8f34242cc1431e09536c
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Tue Dec 6 18:47:56 2016 +0000

    Fix build of examples with the system cl2hpp.
---
 examples/CMakeLists.txt | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index fc94a13..51cad0d 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -7,7 +7,9 @@ OPTION(BUILD_EXAMPLES_CUDA "Turn off/on building cuda examples" ON)
 OPTION(BUILD_EXAMPLES_OPENCL "Turn off/on building opencl examples" ON)
 OPTION(USE_SYSTEM_CL2HPP "Use cl2.hpp header installed on the system" OFF)
 
-INCLUDE(build_cl2hpp)
+IF(NOT USE_SYSTEM_CL2HPP)
+    INCLUDE(build_cl2hpp)
+ENDIF()
 
 MACRO(BUILD_EXAMPLE EX_NAME EX_SRC COMPUTE_NAME FG_LIBS COMPUTE_LIBS)
     IF(${COMPUTE_NAME} STREQUAL "cuda")
@@ -22,7 +24,9 @@ MACRO(BUILD_EXAMPLE EX_NAME EX_SRC COMPUTE_NAME FG_LIBS COMPUTE_LIBS)
         RUNTIME_OUTPUT_DIRECTORY ${DIR_NAME}
         FOLDER "Examples/${COMPUTE_NAME}")
     IF(${COMPUTE_NAME} STREQUAL "opencl")
-        ADD_DEPENDENCIES(example_${EX_NAME}_${COMPUTE_NAME} cl2hpp)
+        IF(NOT USE_SYSTEM_CL2HPP)
+            ADD_DEPENDENCIES(example_${EX_NAME}_${COMPUTE_NAME} cl2hpp)
+        ENDIF()
     ENDIF()
 ENDMACRO()
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/forge.git



More information about the debian-science-commits mailing list