forked from SNUCSE-CTA/GSSDH
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
48 lines (43 loc) · 2.2 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
cmake_minimum_required(VERSION 3.21)
project(GraphSimilaritySearch)
if(APPLE)
message(STATUS "Configuring for macOS")
set(CMAKE_C_COMPILER /opt/homebrew/bin/gcc-13)
set(CMAKE_CXX_COMPILER /opt/homebrew/bin/g++-13)
set(CMAKE_CXX_STANDARD 23)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++23 -Ofast -Wno-psabi -DAA")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++23 -Ofast -Wno-psabi -DCC")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++23 -Ofast -Wno-psabi -DDD")
elseif(UNIX AND EXISTS "/etc/os-release")
file(READ "/etc/os-release" OS_RELEASE_CONTENT)
if(OS_RELEASE_CONTENT MATCHES "CentOS")
message(STATUS "Configuring for KT CentOS")
set(CMAKE_C_COMPILER /opt/ohpc/pub/compiler/gcc/7.3.0/bin/gcc)
set(CMAKE_CXX_COMPILER /opt/ohpc/pub/compiler/gcc/7.3.0/bin/g++)
message(STATUS "C Compiler: ${CMAKE_C_COMPILER}")
message(STATUS "C++ Compiler: ${CMAKE_CXX_COMPILER}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Ofast -Wno-psabi -lstdc++fs")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lstdc++fs")
add_definitions(-DUSE_EXPERIMENTAL_FILESYSTEM)
else()
message(STATUS "Configuring for Linux")
set(CMAKE_C_COMPILER /usr/bin/gcc)
set(CMAKE_CXX_COMPILER /usr/bin/g++)
message(STATUS "C Compiler: ${CMAKE_C_COMPILER}")
message(STATUS "C++ Compiler: ${CMAKE_CXX_COMPILER}")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++23 -Ofast -Wno-psabi -DCOLORING")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++23 -Ofast -Wno-psabi -DCC -g -fsanitize=address")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++23 -Ofast -Wno-psabi -DCC ")
endif()
else()
message(STATUS "Configuring for an unknown OS")
endif()
FIND_PACKAGE(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
include_directories(lib)
#add_executable(GraphEditDistance driver/graph-edit-distance.cc)
add_executable(GraphSimilaritySearch driver/graph-similarity-search.cc)
# Link the necessary libraries, especially if using GCC 7.x which requires stdc++fs for filesystem support
if(OS_RELEASE_CONTENT MATCHES "CentOS")
target_link_libraries(GraphSimilaritySearch stdc++fs)
endif()