forked from llvm-mirror/openmp
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathCMakeLists.txt
60 lines (49 loc) · 1.4 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
project (odb)
set (cppfiles
InputOutputManager.cpp
ChildProcess.cpp
# ProcessSpawn.cpp
StringParser.cpp
CudaGdb.cpp
Debug.cpp
GdbProcess.cpp
Callbacks.cpp
OMPDCommand.cpp
OMPDContext.cpp
OutputString.cpp)
# Let's find GDB first.
find_package(GDB REQUIRED)
if (GDB_FOUND)
MESSAGE( STATUS "GDB_PATH: " ${GDB_COMMAND} )
add_definitions (-DGDB_PATH="${GDB_COMMAND}")
endif (GDB_FOUND)
find_package(CudaGDB QUIET)
if (CUDA_GDB_FOUND)
MESSAGE( STATUS "CUDA_GDB_PATH: " ${CUDA_GDB_COMMAND} )
add_definitions (-DCUDA_GDB_PATH="${CUDA_GDB_COMMAND}")
endif (CUDA_GDB_FOUND)
add_executable (odb-bin ${cppfiles} odb.cpp)
set_target_properties (odb-bin PROPERTIES OUTPUT_NAME odb)
add_library (odb ${cppfiles})
if (ODB_LINUX)
target_link_libraries (odb-bin dl)
target_link_libraries (odb dl)
endif (ODB_LINUX)
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
# ${CMAKE_CURRENT_SOURCE_DIR}/../src/
${CMAKE_BINARY_DIR}/include
)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions (-DDEBUG)
endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
# Find readline library
find_package(Readline REQUIRED)
include_directories(${Readline_INCLUDE_DIRS})
set(LIBS ${LIBS} ${Readline_LIBRARY})
target_link_libraries(odb-bin ${LIBS})
install(TARGETS odb odb-bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static
RUNTIME DESTINATION bin )