-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
63 lines (50 loc) · 2.13 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
# SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.14)
# Subproject of efika
project(efika-apss)
# Include build configurations (compiler standards, options, etc.)
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND EFIKA_BUILDCONFIG_FILE)
include(${EFIKA_BUILDCONFIG_FILE})
endif()
# Include required CMake modules
include(GenerateExportHeader)
include(FetchContent)
#-------------------------------------------------------------------------------
# COMPONENT configuration
#-------------------------------------------------------------------------------
add_library(${PROJECT_NAME} OBJECT)
add_library(${PROJECT_NAME}-sdk INTERFACE)
generate_export_header(${PROJECT_NAME}
EXPORT_FILE_NAME efika/apss/export.h
BASE_NAME apss
PREFIX_NAME EFIKA_)
target_sources(${PROJECT_NAME}
PRIVATE src/allpairs.c src/allpairs_pp.c src/bruteforce.c src/bruteforce_pp.c
src/globals.c src/idxjoin.c src/idxjoin_pp.c src/l2ap.c src/l2ap_pp.c
src/mmjoin.c src/mmjoin_pp.c #[[src/sfr.c]])
target_include_directories(${PROJECT_NAME}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/include
${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(${PROJECT_NAME}-sdk
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/src/include)
add_library(Efika::apss ALIAS ${PROJECT_NAME})
add_library(EfikaSDK::apss ALIAS ${PROJECT_NAME}-sdk)
#-------------------------------------------------------------------------------
# Declare efika dependencies
#-------------------------------------------------------------------------------
foreach(dep core)
FetchContent_Declare(efika-${dep}
GIT_REPOSITORY [email protected]:jiverson002/efika-${dep}.git)
FetchContent_MakeAvailable(efika-${dep})
target_link_libraries(${PROJECT_NAME} PRIVATE Efika::${dep} EfikaSDK::${dep})
endforeach()
#-------------------------------------------------------------------------------
# Unit test configuration
#-------------------------------------------------------------------------------
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include(CTest)
if(BUILD_TESTING)
add_subdirectory(test)
endif()
endif()