-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
26 lines (22 loc) · 959 Bytes
/
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
cmake_minimum_required(VERSION 3.14)
project(SDFC VERSION 14.4.2 LANGUAGES C)
if(PARALLEL)
find_package(MPI REQUIRED)
include_directories(${MPI_C_INCLUDE_PATH})
add_definitions(-DPARALLEL)
include(CMake/CheckMPIVersion.cmake)
endif()
set(TOPLEVEL "${CMAKE_CURRENT_SOURCE_DIR}")
#file(GLOB SOURCE_ALL include/*inc CMakeLists.txt Makefile*)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -g")
if(${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -gdwarf-2")
endif()
set(SDFC_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" CACHE PATH
"Path to include files for SDF C library")
set(SDFC_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/src" CACHE PATH
"Path to build directory for SDF C library")
include_directories(include)
add_subdirectory(src)
install(DIRECTORY include DESTINATION . COMPONENT develop PATTERN uthash.h EXCLUDE)
install(FILES src/uthash/include/uthash.h DESTINATION include COMPONENT develop)