Skip to content

Commit ba28aaa

Browse files
committed
trying to fix clang msvc issue
1 parent e1a3e4a commit ba28aaa

3 files changed

Lines changed: 14 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,18 @@ if(PYTHONIC_ENABLE_GRAPH_VIEWER)
144144
target_compile_features(pythonic_graph_viewer PUBLIC cxx_std_20)
145145
target_compile_definitions(pythonic_graph_viewer PUBLIC PYTHONIC_ENABLE_GRAPH_VIEWER)
146146

147+
# Precompiled headers to speed up compilation
148+
target_precompile_headers(pythonic_graph_viewer PRIVATE
149+
<algorithm>
150+
<stdexcept>
151+
<pythonic/pythonicDispatchForwardDecls.hpp>
152+
<pythonic/pythonicError.hpp>
153+
<pythonic/pythonicOverflow.hpp>
154+
<pythonic/pythonicPromotion.hpp>
155+
<pythonic/pythonicVars.hpp>
156+
<pythonic/graph_viewer.hpp>
157+
)
158+
147159
# Use PRIVATE for external paths to avoid installation path issues
148160
target_include_directories(pythonic_graph_viewer
149161
PUBLIC

include/pythonic/pythonicDispatchDeclarations.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#pragma once
12
// Generated declarations for OpTable specializations
23
template<> const std::array<std::array<BinaryOpFunc, TypeTagCount>, TypeTagCount> OpTable<Add>::table;
34
template<> const std::array<std::array<BinaryOpFunc, TypeTagCount>, TypeTagCount> OpTable<Sub>::table;

scripts/gen_dispatch_stubs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
}
4949

5050
if len(sys.argv) > 1 and sys.argv[1] == 'declarations':
51+
print("#pragma once")
5152
print("// Generated declarations for OpTable specializations")
5253
for opname, opstruct_name in op_struct_map.items():
5354
print(f"template<> const std::array<std::array<BinaryOpFunc, TypeTagCount>, TypeTagCount> OpTable<{opstruct_name}>::table;")

0 commit comments

Comments
 (0)