-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCMakeLists.txt
59 lines (48 loc) · 1.66 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
PROJECT (SYMDIFF CXX)
cmake_minimum_required(VERSION 3.9)
OPTION(TCLMAIN "Build with TCL Interpreter" ON)
OPTION(PYTHON3 "Build Python 3 Interpreter" ON)
OPTION(STATICONLY "Build static only" OFF)
IF (STATICONLY AND (TCLMAIN OR PYTHON3))
MESSAGE(FATAL_ERROR "STATICONLY not implemented for TCLMAIN and PYTHON3")
ENDIF()
set (CMAKE_CXX_STANDARD 17)
SET (SUBDIRS
src
testing
)
# superlu stuff
SITE_NAME(HOSTNAME)
MESSAGE("Hostname: ${HOSTNAME}")
ADD_DEFINITIONS(-DSYMDIFF_VERSION_STRING=\"1.2.10\")
ADD_DEFINITIONS(-DSYMDIFF_COPYRIGHT_YEAR=\"2010-2024\")
IF (COPY_PROJECT_DIR)
set(PROJECT_BIN_DIR ${COPY_PROJECT_DIR}/bin)
set(PROJECT_SCRIPTS_DIR ${COPY_PROJECT_DIR}/scripts)
set(PROJECT_LIBRARY_DIR ${COPY_PROJECT_DIR}/lib)
set(PROJECT_INCLUDE_DIR ${COPY_PROJECT_DIR}/include)
ELSE ()
set(PROJECT_BIN_DIR ${PROJECT_SOURCE_DIR}/bin)
set(PROJECT_SCRIPTS_DIR ${PROJECT_SOURCE_DIR}/scripts)
set(PROJECT_LIBRARY_DIR ${PROJECT_SOURCE_DIR}/lib)
set(PROJECT_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
ENDIF ()
#TODO: put these in the individual setup scripts
IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
ADD_DEFINITIONS(-Wall -DTCL_THREADS -DUSE_TCL_STUBS -fvisibility=hidden)
#SET(CMAKE_SKIP_BUILD_RPATH TRUE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
ENDIF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
IF (APPLE)
ADD_DEFINITIONS(-Wall -DTCL_THREADS -DUSE_TCL_STUBS -fvisibility=hidden)
#SET (CMAKE_INSTALL_NAME_DIR "@rpath")
SET(CMAKE_SKIP_BUILD_RPATH TRUE)
ENDIF(APPLE)
SET (FLEX flex)
SET (DIFF diff)
SET (BISON bison)
INCLUDE(${PROJECT_SOURCE_DIR}/cmake/${SYMDIFF_CONFIG}.cmake OPTIONAL)
ENABLE_TESTING()
FOREACH (SUB ${SUBDIRS})
ADD_SUBDIRECTORY(${SUB})
ENDFOREACH (SUB ${SUBDIRS})