Skip to content

Commit 67a338f

Browse files
committed
Fix compiler program name for apple-clang
Try to fix CI build with CXX_MODULES
1 parent 02cde1d commit 67a338f

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

CMakeLists.txt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,10 @@ option(
4242
${PROJECT_IS_TOP_LEVEL}
4343
)
4444

45-
add_library(beman.scope INTERFACE)
46-
add_library(beman::scope ALIAS beman.scope)
47-
4845
# gersemi: off
4946

50-
set_target_properties(
51-
beman.scope
52-
PROPERTIES
53-
VERIFY_INTERFACE_HEADER_SETS ON
54-
EXPORT_NAME scope
55-
)
56-
5747
if(CMAKE_CXX_SCAN_FOR_MODULES)
48+
add_library(beman.scope)
5849
target_compile_features(beman.scope PRIVATE cxx_std_23)
5950
target_sources(
6051
beman.scope
@@ -68,6 +59,7 @@ if(CMAKE_CXX_SCAN_FOR_MODULES)
6859
FILES include/beman/scope/beman.scope.cppm
6960
)
7061
else()
62+
add_library(beman.scope INTERFACE)
7163
target_compile_features(beman.scope INTERFACE cxx_std_20)
7264
target_sources(
7365
beman.scope
@@ -78,6 +70,15 @@ else()
7870
)
7971
endif()
8072

73+
add_library(beman::scope ALIAS beman.scope)
74+
75+
set_target_properties(
76+
beman.scope
77+
PROPERTIES
78+
VERIFY_INTERFACE_HEADER_SETS ON
79+
EXPORT_NAME scope
80+
)
81+
8182
include(GNUInstallDirs)
8283

8384
install(
@@ -111,7 +112,8 @@ if(BEMAN_SCOPE_INSTALL_CONFIG_FILE_PACKAGE)
111112
EXPORT beman.scope-targets
112113
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/beman.scope
113114
NAMESPACE beman::
114-
CXX_MODULES_DIRECTORY cxx-modules
115+
CXX_MODULES_DIRECTORY
116+
cxx-modules
115117
COMPONENT beman.scope
116118
)
117119
endif()

cmake/appleclang-toolchain.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
include_guard(GLOBAL)
1818

19-
set(CMAKE_C_COMPILER clang)
20-
set(CMAKE_CXX_COMPILER clang++)
19+
set(CMAKE_C_COMPILER gcc)
20+
set(CMAKE_CXX_COMPILER g++)
2121

2222
if(BEMAN_BUILDSYS_SANITIZER STREQUAL "MaxSan")
2323
set(SANITIZER_FLAGS

0 commit comments

Comments
 (0)