Skip to content

Commit 2043d21

Browse files
committed
Update CMake configuration to support C++20 and C++23 standards, and add RAJA build preset
add support for CMAKE_CXX_STANDARD #6
1 parent ae94419 commit 2043d21

File tree

2 files changed

+68
-1
lines changed

2 files changed

+68
-1
lines changed

CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
cmake_minimum_required( VERSION 3.22.1 )
22

3-
project( proxyapp )
3+
project( proxy-geos VERSION 0.1 LANGUAGES CXX Fortran)
4+
5+
# -----------------------------------------------------
6+
# cmake c++ standard
7+
#-----------------------------------------------------
8+
if (NOT CMAKE_CXX_STANDARD)
9+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
10+
set(CMAKE_CXX_STANDARD 20)
11+
endif()
12+
413

514
#-----------------------------------------------------
615
# Setup Flags for whether considering an external libs

CMakePresets.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
"patch": 0
77
},
88
"configurePresets": [
9+
910
{
1011
"name": "default",
1112
"displayName": "Default Config",
1213
"description": "Default config",
1314
"generator": "Unix Makefiles",
1415
"binaryDir": "${sourceDir}/build/default",
16+
"inherits": "cpp20",
1517
"cacheVariables": {
1618
"CMAKE_CXX_COMPILER": "g++",
1719
"CMAKE_C_COMPILER": "gcc",
@@ -49,6 +51,52 @@
4951
"autoFormat": true
5052
}
5153
}
54+
},
55+
{
56+
"name": "raja",
57+
"displayName": "raja Config",
58+
"description": "raja config",
59+
"generator": "Unix Makefiles",
60+
"binaryDir": "${sourceDir}/build/raja",
61+
"cacheVariables": {
62+
"CMAKE_CXX_COMPILER": "g++",
63+
"CMAKE_C_COMPILER": "gcc",
64+
"CMAKE_INSTALL_PREFIX" : "${sourceDir}/build/raja/install/",
65+
"CMAKE_BUILD_TYPE": "Release",
66+
"USE_OMP": "OFF",
67+
"USE_RAJA": "ON",
68+
"USE_KOKKOS": "OFF",
69+
"ENABLE_TESTS": "ON"
70+
},
71+
"vendor": {
72+
"example.com/ExampleIDE/1.0": {
73+
"autoFormat": true
74+
}
75+
}
76+
},
77+
{
78+
"name": "cpp20",
79+
"displayName": "C++ Standard",
80+
"description": "C++ Standard",
81+
"cacheVariables": {
82+
"CMAKE_CXX_STANDARD": "20"
83+
}
84+
},
85+
{
86+
"name": "cpp23",
87+
"displayName": "C++ Standard",
88+
"description": "C++ Standard",
89+
"cacheVariables": {
90+
"CMAKE_CXX_STANDARD": "23"
91+
}
92+
},
93+
{
94+
"name": "cpp17",
95+
"displayName": "C++ Standard",
96+
"description": "C++ Standard",
97+
"cacheVariables": {
98+
"CMAKE_CXX_STANDARD": "17"
99+
}
52100
}
53101
],
54102
"buildPresets": [
@@ -61,6 +109,11 @@
61109
"name": "kokkos",
62110
"configurePreset": "kokkos",
63111
"jobs": 10
112+
},
113+
{
114+
"name": "raja",
115+
"configurePreset": "raja",
116+
"jobs": 10
64117
}
65118
],
66119
"testPresets": [
@@ -83,6 +136,11 @@
83136
"name": "kokkos",
84137
"inherits": "default",
85138
"configurePreset": "kokkos"
139+
},
140+
{
141+
"name": "raja",
142+
"inherits": "default",
143+
"configurePreset": "raja"
86144
}
87145
],
88146
"vendor": {

0 commit comments

Comments
 (0)