Skip to content

Commit 3cc79e1

Browse files
author
szebos
committed
fix branch error
1 parent 3295fa1 commit 3cc79e1

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

CMakeLists.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,16 @@ endif()
156156

157157
# Include the separate script for module configuration
158158
# include(GBSModuleConfigFunction.cmake)
159-
if(${GBS_USE_MODULES})
159+
if(APPLE)
160160

161-
if(APPLE)
161+
# Apple Clang does not support C++20 modules, so we disable them on macOS
162+
message(WARNING "C++20 modules are not supported on Apple Clang. Disabling GBS_USE_MODULES.")
163+
set(GBS_USE_MODULES OFF)
164+
set(CXX_SCAN_FOR_MODULES OFF)
165+
endif()
166+
167+
if(${GBS_USE_MODULES})
162168

163-
# Apple Clang does not support C++20 modules, so we disable them on macOS
164-
message(WARNING "C++20 modules are not supported on Apple Clang. Disabling GBS_USE_MODULES.")
165-
set(GBS_USE_MODULES OFF)
166-
set(CXX_SCAN_FOR_MODULES OFF)
167169
else()
168170
message(STATUS "C++20 modules enabled for GBS.")
169171
add_definitions(-DGBS_USE_MODULES)
@@ -187,7 +189,6 @@ if(${GBS_USE_MODULES})
187189
foreach(module IN LISTS GBS_MODULES)
188190
message(STATUS " * ${module}")
189191
endforeach()
190-
endif(APPLE)
191192

192193
endif()
193194

0 commit comments

Comments
 (0)