@@ -8,7 +8,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
88
99option (LIBSCRATCHCPP_BUILD_UNIT_TESTS "Build unit tests" ON )
1010option (LIBSCRATCHCPP_NETWORK_SUPPORT "Support for downloading projects" ON )
11- option (LIBSCRATCHCPP_USE_LLVM "Compile scripts to LLVM IR (work in progress)" OFF )
1211option (LIBSCRATCHCPP_PRINT_LLVM_IR "Print LLVM IR of compiled Scratch scripts (for debugging)" OFF )
1312
1413add_library (scratchcpp SHARED)
@@ -57,31 +56,21 @@ target_sources(scratchcpp
5756 include /scratchcpp/comment .h
5857 include /scratchcpp/monitor.h
5958 include /scratchcpp/imonitorhandler.h
59+ include /scratchcpp/dev/compiler.h
60+ include /scratchcpp/dev/compilercontext.h
61+ include /scratchcpp/dev/compilervalue.h
62+ include /scratchcpp/dev/compilerconstant.h
63+ include /scratchcpp/dev/compilerlocalvariable.h
64+ include /scratchcpp/dev/executablecode.h
65+ include /scratchcpp/dev/executioncontext.h
66+ include /scratchcpp/dev/promise.h
67+ include /scratchcpp/dev/test /scriptbuilder.h
6068)
6169
62- if (LIBSCRATCHCPP_USE_LLVM)
63- target_compile_definitions (scratchcpp PUBLIC USE_LLVM)
64- target_sources (scratchcpp
65- PUBLIC
66- include /scratchcpp/dev/compiler.h
67- include /scratchcpp/dev/compilercontext.h
68- include /scratchcpp/dev/compilervalue.h
69- include /scratchcpp/dev/compilerconstant.h
70- include /scratchcpp/dev/compilerlocalvariable.h
71- include /scratchcpp/dev/executablecode.h
72- include /scratchcpp/dev/executioncontext.h
73- include /scratchcpp/dev/promise.h
74- include /scratchcpp/dev/test /scriptbuilder.h
75- )
76-
77- if (LIBSCRATCHCPP_PRINT_LLVM_IR)
78- target_compile_definitions (scratchcpp PRIVATE PRINT_LLVM_IR)
79- endif ()
80- else ()
81- target_sources (scratchcpp
82- PUBLIC
83- include /scratchcpp/compiler.h
84- )
70+ target_compile_definitions (scratchcpp PUBLIC USE_LLVM)
71+
72+ if (LIBSCRATCHCPP_PRINT_LLVM_IR)
73+ target_compile_definitions (scratchcpp PRIVATE PRINT_LLVM_IR)
8574endif ()
8675
8776include (FetchContent)
@@ -113,11 +102,9 @@ if (LIBSCRATCHCPP_NETWORK_SUPPORT)
113102 target_compile_definitions (scratchcpp PRIVATE LIBSCRATCHCPP_NETWORK_SUPPORT)
114103endif ()
115104
116- if (LIBSCRATCHCPP_USE_LLVM)
117- include (build /HunterPackages.cmake)
118- include (build /LLVM.cmake)
119- target_link_libraries (scratchcpp PRIVATE LLVM)
120- endif ()
105+ include (build /HunterPackages.cmake)
106+ include (build /LLVM.cmake)
107+ target_link_libraries (scratchcpp PRIVATE LLVM)
121108
122109target_compile_definitions (scratchcpp PRIVATE LIBSCRATCHCPP_LIBRARY)
123110target_compile_definitions (scratchcpp PRIVATE LIBSCRATCHCPP_VERSION="${PROJECT_VERSION} " )
0 commit comments