Skip to content

Commit

Permalink
Fixed issue STEllAR-GROUP#3124
Browse files Browse the repository at this point in the history
  • Loading branch information
NK-Nikunj committed Feb 17, 2018
1 parent 4db707e commit ca921a3
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions examples/hello_world_component/CMakeLists.txt
@@ -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()

0 comments on commit ca921a3

Please sign in to comment.