forked from BoldingBruggeman/stim
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
42 lines (34 loc) · 1.46 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
cmake_minimum_required(VERSION 3.1.3)
# Create main project.
project(stim VERSION 0.1.0 LANGUAGES Fortran)
# Use solution folders in IDEs
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Create placeholder file with version information
# used when STIM_EMBED_VERSION is off.
set(GIT_COMMIT_ID ${VERSION})
set(GIT_BRANCH_NAME unknown)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/stim_version.F90.in" ${CMAKE_CURRENT_BINARY_DIR}/src/stim_version.F90)
# Use use position-independent code (-fPIC) everywhere if building shared libraries
if(BUILD_SHARED_LIBS)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
#[[---
option(STIM_EMBED_VERSION "Include Git version info" "ON")
if(STIM_EMBED_VERSION)
add_custom_target(stim_version ALL
${CMAKE_COMMAND} -DINFILE=${PROJECT_SOURCE_DIR}/src/stim_version.F90.in -DOUTFILE=${CMAKE_CURRENT_BINARY_DIR}/src/stim_version.F90 -P "${PROJECT_SOURCE_DIR}/cmake/Modules/GetGitInfo.cmake"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Retrieving description of last ICE commit..."
SOURCES ${PROJECT_SOURCE_DIR}/src/stim_version.F90.in "${PROJECT_SOURCE_DIR}/cmake/Modules/GetGitInfo.cmake"
VERBATIM
)
endif(STIM_EMBED_VERSION)
---]]
option(STIM_LEBEDEV "Lebedev ICE model" ON)
option(STIM_MYLAKE "MyLake ICE model" ON)
option(STIM_WINTON "Winton ICE model" ON)
include(src/CMakeLists.txt)
include(tests/CMakeLists.txt)
#add_subdirectory(src)
#add_subdirectory(tests)
install(EXPORT stimConfig DESTINATION cmake)