CMakeLists.txt 1.87 KB
Newer Older
1
cmake_minimum_required(VERSION 3.10)
2 3 4 5 6 7 8 9
project(predictable_parallel_patterns
        VERSION 0.0.1
        DESCRIPTION "predictable parallel patterns for scalable smart systems using work stealing")

set(CMAKE_CXX_STANDARD 11)

# seperate library and test/example executable output paths.
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
10
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
11 12 13 14

# specific setup code is located in individual files.
include(cmake/DisabelInSource.cmake)
include(cmake/SetupOptimizationLevel.cmake)
15
include(cmake/SetupAssemblyOutput.cmake)
16
include(cmake/SetupThreadingSupport.cmake)
17
include(cmake/SetupThreadSanitizer.cmake)
18
include(cmake/SetupAddressSanitizer.cmake)
19
include(cmake/SetupEasyProfiler.cmake)
20
include(cmake/SetupDebugSymbols.cmake)
21 22 23 24 25 26 27 28

# make our internal cmake script collection avaliable in the build process.
list(APPEND CMAKE_PREFIX_PATH "${PROJECT_SOURCE_DIR}/cmake")

# Include external libraries within the project structure (prefered, as no instalation is reqired).
# Each library has an own CMakeLists.txt that should make it avaliabale as a library target,
# thus allowing one to include it as any cmake dependency later on.
add_subdirectory(extern/catch2)
29 30 31
add_subdirectory(extern/picosha2)
add_subdirectory(extern/benchmark_base)
add_subdirectory(extern/benchmark_runner)
32 33 34 35

# Include all internal subprojects (library, examples, testing).
add_subdirectory(lib/pls)

36 37
# Include examples
add_subdirectory(app/playground)
38
add_subdirectory(app/test_for_new)
39
add_subdirectory(app/invoke_parallel)
40
add_subdirectory(app/benchmark_fft)
41
add_subdirectory(app/benchmark_unbalanced)
42
add_subdirectory(app/benchmark_matrix)
43
add_subdirectory(app/benchmark_prefix)
44
add_subdirectory(app/benchmark_pipeline)
45 46 47

# Add optional tests
option(PACKAGE_TESTS "Build the tests" ON)
48
if (PACKAGE_TESTS)
49 50 51
    enable_testing()
    add_subdirectory(test)
    add_test(NAME AllTests COMMAND tests)
52
endif ()