forked from STEllAR-GROUP/hpxla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
83 lines (65 loc) · 3.17 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Copyright (c) 2012 Bryce Adelstein-Lelbach
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
# TODO: Add versioning.
# TODO: Add install code.
# TODO: ATLAS/MKL/GSL selection.
cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
project(hpxla CXX)
################################################################################
include_directories(${hpxla_SOURCE_DIR})
# TODO: Move this into a CMake macro.
if(MSVC)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/Release/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/Release/lib/hpx)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/Release/lib/hpx)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/Debug/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/Debug/lib/hpx)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/Debug/lib/hpx)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BINARY_DIR}/MinSizeRel/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BINARY_DIR}/MinSizeRel/lib/hpx)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BINARY_DIR}/MinSizeRel/lib/hpx)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/RelWithDebInfo/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/RelWithDebInfo/lib/hpx)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/RelWithDebInfo/lib/hpx)
else()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/hpx)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/hpx)
endif()
################################################################################
# TODO: Move this into FindHPX.cmake.in.
if(NOT HPX_ROOT)
if(NOT $ENV{HPX_LOCATION} STREQUAL "")
set(HPX_ROOT $ENV{HPX_LOCATION})
elseif(NOT $ENV{HPX_ROOT} STREQUAL "")
set(HPX_ROOT $ENV{HPX_ROOT})
endif()
endif()
set(HPX_ROOT "${HPX_ROOT}" CACHE PATH "The HPX installation to use." FORCE)
set(CMAKE_MODULE_PATH ${HPX_ROOT}/share/cmake-2.8/Modules)
find_package(HPX)
foreach(dir ${HPX_INCLUDE_DIR})
include_directories(${dir})
endforeach()
foreach(dir ${HPX_LIBRARY_DIR})
link_directories(${dir})
endforeach()
set(CMAKE_BUILD_TYPE ${HPX_BUILD_TYPE} CACHE STRING "Build type." FORCE)
################################################################################
find_package(HPX_BLAS)
include_directories(${BLAS_INCLUDE_DIR})
link_directories(${BLAS_LIBRARY_DIR})
################################################################################
hpx_check_for_cxx11_std_initializer_list(HPX_CXX11_STD_INITIALIZER_LIST
DEFINITIONS HPX_HAVE_CXX11_STD_INITIALIZER_LIST
ROOT ${HPX_ROOT})
################################################################################
add_hpx_pseudo_target(tests)
add_subdirectory(tests)
################################################################################
add_hpx_pseudo_target(applications)
add_subdirectory(applications)
################################################################################
add_subdirectory(src)