-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathCMakeLists.txt
31 lines (26 loc) · 1.19 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
cmake_minimum_required(VERSION 3.21)
set(META_PROJECT_NAME "SWE-Solvers")
set(META_PROJECT_DESCRIPTION "Solvers for the Shallow Water Equations")
set(META_AUTHOR_ORGANIZATION "Technische Universitaet Muenchen")
set(META_AUTHOR_DOMAIN "https://github.com/TUM-I5/SWE-Solvers")
set(META_VERSION_REVISION "${GIT_COMMIT_HASH_SHORT}")
set(META_GIT_BRANCH "${GIT_BRANCH}")
set(META_GIT_HASH "${GIT_COMMIT_HASH}")
message(STATUS "On Git Branch: ${GIT_BRANCH} (${GIT_COMMIT_HASH})")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_CXX_VISIBILITY_INLINES_HIDDEN YES)
set(CMAKE_CXX_EXTENSIONS OFF)
set(META_COMPILER_VERSION "${CMAKE_SYSTEM_NAME} ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER_VERSION})")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_POSITION_INDEPENDENT_CODE OFF)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${META_PROJECT_NAME})
project(${META_PROJECT_NAME}
DESCRIPTION ${META_PROJECT_DESCRIPTION}
HOMEPAGE_URL ${META_AUTHOR_DOMAIN}
LANGUAGES C CXX
)
file(WRITE "${PROJECT_BINARY_DIR}/.gitignore" "*")
add_subdirectory(Source)