-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
52 lines (42 loc) · 1.21 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
cmake_minimum_required(VERSION 3.13)
# configure.ac: AC_INIT([cfd-go], [1.0]
set(PACKAGE_VERSION 1.0.0)
####################
# options
####################
include(./cmake/CfdCommonOption.cmake)
include(./cmake/CfdWallyOption.cmake)
option(CFD_SHARED "force shared build (ON or OFF. default:OFF)" OFF)
option(ENABLE_CAPI "enable c-api (ON or OFF. default:ON)" ON)
option(ENABLE_JSONAPI "enable json-api (ON or OFF. default:ON)" ON)
set(GENERATE_WALLY ON CACHE BOOL "" FORCE)
set(EXCLUDE_WALLYCORE_LIB ON CACHE BOOL "" FORCE)
####################
# common setting
####################
include(./cmake/CfdCommonSetting.cmake)
####################
# test
####################
project(cfdgo_all_test CXX)
if(ENABLE_TESTS)
enable_testing()
endif() # ENABLE_TESTS
####################
# subdirectories
####################
if(NOT CFD_SINGLE_BUILD)
add_subdirectory(external)
endif()
####################
# uninstall
####################
if(NOT TARGET uninstall)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/pc/cmake_uninstall.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()