-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (43 loc) · 1.6 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
# CMake version cmake@v3.10.x
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
# Project name and a few useful settings. Other commands can pick up the results
project(hpc
VERSION 0.1.0)
# Must use GNUInstallDirs to install libraries into correct locations on all platforms.
include(GNUInstallDirs)
# Include CMAKE
include(${CMAKE_ROOT}/Modules/FindPkgConfig.cmake)
# Build settings
# set(CMAKE_C_STANDARD 11)
# set(CMAKE_C_STANDARD_REQUIRED ON)
# set(CMAKE_CXX_STANDARD 11)
# set(CMAKE_CXX_STANDARD_REQUIRED ON)
# set(CMAKE_CXX_EXTENSIONS OFF) # Let's ensure -std=c++xx instead of -std=g++xx
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin/)
# Find packages
# Docs only available if this is the main app
# find_package(Doxygen)
# if(Doxygen_FOUND)
# add_subdirectory(./docs)
# else()
# message(STATUS "Doxygen not found, not building docs")
# endif()
# find_package(MPI REQUIRED) # Find OPENMPI package
# find_package(cpprestsdk REQUIRED)
# Internal includes
# include_directories(./include/)
# External includes
# include_directories(${MPI_CXX_INCLUDE_PATH})
# Add subdirectories - executable
add_subdirectory(./apps/)
# Add subdirectories - libraries
add_subdirectory(./libs/helloworld/)
add_subdirectory(./libs/computepi/)
add_subdirectory(./libs/random/)
# Messages
message("CMAKE source directory = " ${CMAKE_SOURCE_DIR})
message("CMAKE binary directory = " ${CMAKE_BINARY_DIR})
message("Project source directory = " ${PROJECT_SOURCE_DIR})
message("Project binary directory = " ${PROJECT_BINARY_DIR})
message("CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}")
message("MPI_INCLUDE_PATH = " ${MPI_INCLUDE_PATH})