Skip to content

Commit 16c3bb2

Browse files
committed
Specify different levels of C++ for Linux and Windows
because their compilers need different levels to compile the same file. Signed-off-by: Gregory Shimansky <[email protected]>
1 parent 0398fcb commit 16c3bb2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ endif()
88

99
include(ExternalProject)
1010

11-
set(CMAKE_CXX_STANDARD 20)
12-
1311
set(CMAKE_INCLUDE_CURRENT_DIR ON)
1412

1513
project(triton)
@@ -36,11 +34,13 @@ set(TRITON_CODEGEN_BACKENDS "" CACHE STRING "Enable different codegen backends")
3634

3735
# Customized release build type with assertions: TritonRelBuildWithAsserts
3836
if(NOT MSVC)
37+
set(CMAKE_CXX_STANDARD 17)
3938
set(CMAKE_C_FLAGS_TRITONRELBUILDWITHASSERTS "-O2 -g")
4039
set(CMAKE_CXX_FLAGS_TRITONRELBUILDWITHASSERTS "-O2 -g")
4140
set(CMAKE_C_FLAGS_TRITONBUILDWITHO1 "-O1")
4241
set(CMAKE_CXX_FLAGS_TRITONBUILDWITHO1 "-O1")
4342
else()
43+
set(CMAKE_CXX_STANDARD 20)
4444
set(CMAKE_C_FLAGS_TRITONRELBUILDWITHASSERTS "/Zi /Ob0 /Od /RTC1 /bigobj")
4545
set(CMAKE_CXX_FLAGS_TRITONRELBUILDWITHASSERTS "/Zi /Ob0 /Od /RTC1 /bigobj ")
4646
set(CMAKE_EXE_LINKER_FLAGS_TRITONRELBUILDWITHASSERTS "/debug:fastlink /INCREMENTAL")

0 commit comments

Comments
 (0)