File tree Expand file tree Collapse file tree 7 files changed +25
-7
lines changed
Expand file tree Collapse file tree 7 files changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
22PROJECT (ARRAYFIRE)
33
44SET_PROPERTY (GLOBAL PROPERTY USE_FOLDERS ON )
5+ if (POLICY CMP0058)
6+ CMAKE_POLICY (SET CMP0058 NEW)
7+ endif (POLICY CMP0058)
58
69SET (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR} /CMakeModules" )
710INCLUDE (UploadCoveralls)
Original file line number Diff line number Diff line change @@ -2,9 +2,19 @@ INCLUDE(ExternalProject)
22
33SET (prefix ${PROJECT_BINARY_DIR} /third_party/cl2hpp)
44
5+ IF (CMAKE_VERSION VERSION_LESS 3.2)
6+ IF (CMAKE_GENERATOR MATCHES "Ninja" )
7+ MESSAGE (WARNING "Building forge with Ninja has known issues with CMake older than 3.2" )
8+ endif ()
9+ SET (byproducts )
10+ ELSE ()
11+ SET (byproducts BUILD_BYPRODUCTS "${prefix} /package/CL/cl2.hpp" )
12+ ENDIF ()
13+
514ExternalProject_Add(
615 cl2hpp-ext
716 GIT_REPOSITORY https://github.com/KhronosGroup/OpenCL-CLHPP.git
17+ ${byproducts}
818 GIT_TAG 75bb7d0d8b2ffc6aac0a3dcaa22f6622cab81f7c
919 PREFIX "${prefix} "
1020 INSTALL_DIR "${prefix} /package"
Original file line number Diff line number Diff line change @@ -8,13 +8,14 @@ IF(CMAKE_VERSION VERSION_LESS 3.2)
88 endif ()
99 SET (byproducts )
1010ELSE ()
11- SET (byproducts BYPRODUCTS ${clBLAS_location} )
11+ SET (byproducts BUILD_BYPRODUCTS ${clBLAS_location} )
1212ENDIF ()
1313
1414ExternalProject_Add(
1515 clBLAS-ext
1616 GIT_REPOSITORY https://github.com/arrayfire/clBLAS.git
1717 GIT_TAG arrayfire-release
18+ ${byproducts}
1819 PREFIX "${prefix} "
1920 INSTALL_DIR "${prefix} "
2021 UPDATE_COMMAND ""
@@ -30,7 +31,6 @@ ExternalProject_Add(
3031 -DBUILD_TEST:BOOL =OFF
3132 -DBUILD_KTEST:BOOL =OFF
3233 -DSUFFIX_LIB:STRING =
33- ${byproducts}
3434 )
3535
3636ExternalProject_Get_Property(clBLAS-ext install_dir)
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ IF(CMAKE_VERSION VERSION_LESS 3.2)
88 endif ()
99 SET (byproducts )
1010ELSE ()
11- SET (byproducts BYPRODUCTS ${clFFT_location} )
11+ SET (byproducts BUILD_BYPRODUCTS ${clFFT_location} )
1212ENDIF ()
1313
1414ExternalProject_Add(
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ ELSE(USE_SYSTEM_GLBINDING)
66 SET (GLBINDING_TARGET glbinding)
77ENDIF (USE_SYSTEM_GLBINDING)
88
9- SET (prefix ${PROJECT_BINARY_DIR } /third_party/forge)
9+ SET (prefix ${CMAKE_BINARY_DIR } /third_party/forge)
1010
1111# FIXME: Cannot use $<CONFIG> generator expression here because add_custom_command
1212# does not yet support it for the OUTPUT argument, see also:
@@ -39,7 +39,11 @@ IF(CMAKE_VERSION VERSION_LESS 3.2)
3939 endif ()
4040 SET (byproducts )
4141ELSE ()
42- SET (byproducts BYPRODUCTS ${forge_location} )
42+ IF (WIN32 )
43+ SET (byproducts BUILD_BYPRODUCTS third_party/forge/lib/forge${CMAKE_STATIC_LIBRARY_SUFFIX} )
44+ ELSE (WIN32 )
45+ SET (byproducts BUILD_BYPRODUCTS ${forge_location} )
46+ ENDIF (WIN32 )
4347ENDIF ()
4448
4549SET (FORGE_VERSION 0.9.2)
@@ -49,6 +53,7 @@ ExternalProject_Add(
4953 forge-ext
5054 GIT_REPOSITORY https://github.com/arrayfire/forge.git
5155 GIT_TAG v${FORGE_VERSION}
56+ ${byproducts}
5257 PREFIX "${prefix} "
5358 INSTALL_DIR "${prefix} "
5459 UPDATE_COMMAND ""
@@ -69,7 +74,6 @@ ExternalProject_Add(
6974 -DFREEIMAGE_STATIC_LIBRARY:PATH =${FREEIMAGE_STATIC_LIBRARY}
7075 -DUSE_FREEIMAGE_STATIC:BOOL =${USE_FREEIMAGE_STATIC}
7176 BUILD_COMMAND ${CMAKE_COMMAND} --build . --config ${forge_lib_config}
72- ${byproducts}
7377 )
7478
7579ExternalProject_Get_Property(forge-ext binary_dir)
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ IF(CMAKE_VERSION VERSION_LESS 3.2)
1515 endif ()
1616 SET (byproducts )
1717ELSE ()
18- SET (byproducts BYPRODUCTS ${glbinding_location} )
18+ SET (byproducts BUILD_BYPRODUCTS ${glbinding_location} )
1919ENDIF ()
2020
2121IF (UNIX )
Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ IF(DEFINED BLAS_SYM_FILE)
191191 TARGET_LINK_LIBRARIES (afcpu PUBLIC $<TARGET_FILE:afcpu_static>)
192192 ELSE (APPLE )
193193 add_custom_command (OUTPUT ${PROJECT_BINARY_DIR} /afcpu_static.renamed
194+ BYPRODUCTS ${PROJECT_BINARY_DIR} /afcpu_static.renamed
194195 COMMAND objcopy --redefine-syms ${BLAS_SYM_FILE} $<TARGET_FILE:afcpu_static> ${PROJECT_BINARY_DIR} /afcpu_static.renamed
195196 DEPENDS $<TARGET_FILE:afcpu_static>)
196197 TARGET_LINK_LIBRARIES (afcpu PUBLIC ${PROJECT_BINARY_DIR} /afcpu_static.renamed)
You can’t perform that action at this time.
0 commit comments