forked from STEllAR-GROUP/hpx
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Require a recent version of cmake | ||
cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR) | ||
|
||
if(NOT UNIX) | ||
message(FATAL_ERROR "This cmake can only be built on linux systems.") | ||
return() | ||
endif() | ||
|
||
project(hello_world_component CXX) | ||
|
||
if(EXISTS "${HPX_DIR}") | ||
|
||
# Instruct cmake to find the HPX settings | ||
find_package(HPX REQUIRED) | ||
|
||
if(NOT HPX_FOUND) | ||
message(FATAL_ERROR "HPX could not be found") | ||
endif() | ||
|
||
include_directories(${HPX_INCLUDE_DIR}) | ||
link_directories(${HPX_LIBRARY_DIR}) | ||
|
||
# Including essential hpx components | ||
add_hpx_component(hello_world_component | ||
SOURCES hello_world_component.cpp | ||
HEADERS hello_world_component.hpp | ||
COMPONENT_DEPENDENCIES iostreams) | ||
|
||
# Build the application | ||
add_hpx_executable(hello_world_client | ||
SOURCES hello_world_client.cpp | ||
COMPONENT_DEPENDENCIES hello_world_component) | ||
|
||
else() | ||
message(SEND_ERROR "HPX_DIR=${HPX_DIR} does not exist. Did you forget to run the install rule?") | ||
endif() |