From 0101b76a15840aad56d94e9206ad38eb4dddb370 Mon Sep 17 00:00:00 2001 From: Robert Underwood Date: Wed, 9 Mar 2022 10:31:31 -0500 Subject: [PATCH] various fixes for cmake based find_package + modified #include directives so that they work outside of installed as a subtree of the project + modified how jluna.jl is found so that they can be found if they are installed or just simply built, by default, it prefers the local version from the installed versions. I would have loved to use c++ std::format here rather than snprintf, but since the supported compilers don't support it I can't use it here. + modified how libjluna_c_adapter.so is found to use the dynamic linker instead of explicit path passing which improves relocatablity + rather than always forcing a Release build, allow the user to set it to each of the CMake defaults + include CTest to make compiling the unit tests optional in the standard way + include GNUInstallDirs which was not provided before + use find_library() to locate libjulia.so to make it more robust to different OS layouts + use find_path() to locate julia.h to make it more robust to different OS layouts + set the target_include_directories and target_link_libraries correctly so that downstream consumers can simply ```cmake find_package(jluna) target_link_libraries(foo PRIVATE jluna::jluna) ``` and everything works + simplified the logic to set the library name. Note that using `global` in the module is safe because `global`s in julia are local to the [module they are defined in](https://docs.julialang.org/en/v1/manual/modules/) --- .src/box.inl | 6 +- .src/c_adapter.cpp | 2 +- .src/cppcall.inl | 6 +- .src/exceptions.cpp | 4 +- .src/expression.cpp | 2 +- .src/function.cpp | 4 +- .src/generator_expression.cpp | 4 +- .src/include_julia.inl.in | 11 +--- .src/module.cpp | 4 +- .src/proxy.cpp | 8 +-- .src/state.cpp | 48 +++++++++++--- .src/state.inl | 10 +-- .src/symbol.cpp | 2 +- .src/type.cpp | 4 +- .src/usertype.inl | 4 +- CMakeLists.txt | 107 ++++++++++++++++--------------- include/array.hpp | 10 +-- include/box.hpp | 6 +- include/concepts.hpp | 4 +- include/cppcall.hpp | 6 +- include/exceptions.hpp | 4 +- include/function.hpp | 6 +- include/generator_expression.hpp | 4 +- include/jluna.hpp | 24 +++++++ include/jluna.jl | 6 +- include/julia_extension.hpp | 4 +- include/module.hpp | 6 +- include/proxy.hpp | 8 +-- include/state.hpp | 8 +-- include/symbol.hpp | 4 +- include/type.hpp | 8 +-- include/typedefs.hpp | 4 +- include/unbox.hpp | 8 +-- include/usertype.hpp | 6 +- jluna.hpp | 24 ------- 35 files changed, 204 insertions(+), 172 deletions(-) create mode 100644 include/jluna.hpp delete mode 100644 jluna.hpp diff --git a/.src/box.inl b/.src/box.inl index 5b0f5f3..01964d6 100644 --- a/.src/box.inl +++ b/.src/box.inl @@ -3,8 +3,8 @@ // Created on 31.01.22 by clem (mail@clemens-cords.com) // -#include -#include +#include "julia_extension.hpp" +#include "cppcall.hpp" #include @@ -274,4 +274,4 @@ namespace jluna { return register_unnamed_function(lambda); } -} \ No newline at end of file +} diff --git a/.src/c_adapter.cpp b/.src/c_adapter.cpp index ea421de..e253196 100644 --- a/.src/c_adapter.cpp +++ b/.src/c_adapter.cpp @@ -4,7 +4,7 @@ #include -#include <.src/c_adapter.hpp> +#include "c_adapter.hpp" extern "C" { diff --git a/.src/cppcall.inl b/.src/cppcall.inl index d623a6c..7f8a780 100644 --- a/.src/cppcall.inl +++ b/.src/cppcall.inl @@ -3,9 +3,9 @@ // Created on 31.01.22 by clem (mail@clemens-cords.com) // -#include -#include -#include <.src/c_adapter.hpp> +#include "julia_extension.hpp" +#include "exceptions.hpp" +#include "c_adapter.hpp" namespace jluna { diff --git a/.src/exceptions.cpp b/.src/exceptions.cpp index e0c3f85..3e5d119 100644 --- a/.src/exceptions.cpp +++ b/.src/exceptions.cpp @@ -3,8 +3,8 @@ // Created on 30.01.22 by clem (mail@clemens-cords.com) // -#include -#include +#include "exceptions.hpp" +#include "julia_extension.hpp" #include #include diff --git a/.src/expression.cpp b/.src/expression.cpp index e8cd0ff..cd45f0f 100644 --- a/.src/expression.cpp +++ b/.src/expression.cpp @@ -3,7 +3,7 @@ // Created on 01.02.22 by clem (mail@clemens-cords.com) // -#include +#include "expression.hpp" namespace jluna { diff --git a/.src/function.cpp b/.src/function.cpp index 5164b25..3fcaeff 100644 --- a/.src/function.cpp +++ b/.src/function.cpp @@ -3,7 +3,7 @@ // Created on 10.02.22 by clem (mail@clemens-cords.com) // -#include +#include "function.hpp" namespace jluna -{} \ No newline at end of file +{} diff --git a/.src/generator_expression.cpp b/.src/generator_expression.cpp index 280372f..a2da453 100644 --- a/.src/generator_expression.cpp +++ b/.src/generator_expression.cpp @@ -3,8 +3,8 @@ // Created on 16.02.22 by clem (mail@clemens-cords.com) // -#include -#include +#include "generator_expression.hpp" +#include "state.hpp" namespace jluna { diff --git a/.src/include_julia.inl.in b/.src/include_julia.inl.in index 65d5fa2..b522cdd 100644 --- a/.src/include_julia.inl.in +++ b/.src/include_julia.inl.in @@ -5,12 +5,5 @@ #pragma once -#cmakedefine RESOURCE_PATH "@RESOURCE_PATH@" - -namespace jluna::detail -{ - ///@brief allow julia to load jluna by using C++ #import statement - static inline const char* include = R"( - include("@RESOURCE_PATH@/include/jluna.jl") - )"; -} \ No newline at end of file +#define RUN_RESOURCE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" +#define BUILD_RESOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@" diff --git a/.src/module.cpp b/.src/module.cpp index e362fcc..63c31eb 100644 --- a/.src/module.cpp +++ b/.src/module.cpp @@ -3,8 +3,8 @@ // Created on 07.02.22 by clem (mail@clemens-cords.com) // -#include -#include +#include "module.hpp" +#include "state.hpp" namespace jluna { diff --git a/.src/proxy.cpp b/.src/proxy.cpp index c235ffc..42ffee9 100644 --- a/.src/proxy.cpp +++ b/.src/proxy.cpp @@ -8,9 +8,9 @@ #include #include -#include -#include -#include +#include "state.hpp" +#include "proxy.hpp" +#include "type.hpp" namespace jluna { @@ -215,4 +215,4 @@ namespace jluna static jl_function_t* isa = jl_get_function(jl_base_module, "isa"); return unbox(jluna::safe_call(isa, this->operator const _jl_value_t *(), type.operator const _jl_value_t *())); } -} \ No newline at end of file +} diff --git a/.src/state.cpp b/.src/state.cpp index 0e6ea30..a628807 100644 --- a/.src/state.cpp +++ b/.src/state.cpp @@ -5,18 +5,18 @@ #include +#include #include #include #include -#include -#include -#include -#include -#include <.src/include_julia.inl> -#include -#include - +#include "state.hpp" +#include "exceptions.hpp" +#include "julia_extension.hpp" +#include "proxy.hpp" +#include "include_julia.inl" +#include "module.hpp" +#include "type.hpp" namespace jluna::detail { @@ -42,7 +42,28 @@ namespace jluna::State else jl_init_with_image(path.c_str(), NULL); - jl_eval_string(jluna::detail::include); + const char* julia_lib_load_template = R"julia( + begin + local dev_path = "%s/include/jluna.jl" + local prod_path = "%s/jluna/jluna.jl" + if isfile(dev_path) + include(dev_path) + else isfile(prod_path) + include(prod_path) + end + end + )julia"; + std::vector buf ( + /* no need to account for null since %s takes 4 bytes accounted for + * which is double counted by BUILD_RESOURCE_DIR and RUN_RESOURCE_DIR */ + strlen(julia_lib_load_template) + + strlen(BUILD_RESOURCE_DIR) + + strlen(RUN_RESOURCE_DIR), + /*c strings are null terminated*/ + '\0' + ); + snprintf(buf.data(), buf.size(), julia_lib_load_template, BUILD_RESOURCE_DIR, RUN_RESOURCE_DIR); + jl_eval_string(buf.data()); forward_last_exception(); @@ -57,7 +78,14 @@ namespace jluna::State )"); forward_last_exception(); - jl_eval_string(("jluna._cppcall.eval(:(_library_name = \"" + std::string(RESOURCE_PATH) + "/libjluna_c_adapter.so\"))").c_str()); + jl_eval_string( + R"julia( + begin + import Libdl + local lib_path = Libdl.dlpath("libjluna_c_adapter") + jluna._cppcall._set_library_name(lib_path) + end + )julia"); forward_last_exception(); jl_eval_string(R"( diff --git a/.src/state.inl b/.src/state.inl index 2e5b7f8..8cc7951 100644 --- a/.src/state.inl +++ b/.src/state.inl @@ -3,10 +3,10 @@ // Created on 02.02.22 by clem (mail@clemens-cords.com) // -#include -#include -#include -#include +#include "julia_extension.hpp" +#include "proxy.hpp" +#include "array.hpp" +#include "module.hpp" namespace jluna::State { @@ -292,4 +292,4 @@ namespace jluna::State return Proxy(res); } -} \ No newline at end of file +} diff --git a/.src/symbol.cpp b/.src/symbol.cpp index 35fb952..510eb62 100644 --- a/.src/symbol.cpp +++ b/.src/symbol.cpp @@ -3,7 +3,7 @@ // Created on 07.02.22 by clem (mail@clemens-cords.com) // -#include +#include "symbol.hpp" namespace jluna { diff --git a/.src/type.cpp b/.src/type.cpp index 7e25990..365810d 100644 --- a/.src/type.cpp +++ b/.src/type.cpp @@ -3,8 +3,8 @@ // Created on 07.02.22 by clem (mail@clemens-cords.com) // -#include -#include +#include "type.hpp" +#include "symbol.hpp" namespace jluna { diff --git a/.src/usertype.inl b/.src/usertype.inl index 505b374..2ac1393 100644 --- a/.src/usertype.inl +++ b/.src/usertype.inl @@ -3,7 +3,7 @@ // Created on 25.02.22 by clem (mail@clemens-cords.com) // -#include +#include "exceptions.hpp" namespace jluna { @@ -134,4 +134,4 @@ namespace jluna { return Usertype::box(in); } -} \ No newline at end of file +} diff --git a/CMakeLists.txt b/CMakeLists.txt index 675325b..6e606d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,19 @@ cmake_minimum_required(VERSION 3.16) project(jluna) -set(CMAKE_CXX_STANDARD 20) -set(CMAKE_BUILD_TYPE Release) +#correct was to set a default build type +# https://blog.kitware.com/cmake-and-the-default-build-type/ +set(default_build_type "Release") +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "No build type was set. Setting build type to ${default_build_type}.") + set(CMAKE_BUILD_TYPE ${default_build_type} CACHE + STRING "Choose the type to build" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" + "MinSizeRel" "RelWithDebInfo") +endif() + +option(BUILD_SHARED_LIBS "prefer to build shared libraries" ON) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # compiler support if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION STRGREATER_EQUAL "12.0.0") @@ -13,6 +24,9 @@ else() message(FATAL_ERROR "Currently, the only supported compilers are G++10, G++11 (recommended) and Clang-12") endif() +include(CTest) +include(GNUInstallDirs) + ### JULIA ### # access julia through JULIA_PATH environment variable @@ -21,7 +35,7 @@ if (NOT DEFINED ENV{JULIA_PATH}) COMMAND julia -e "println(joinpath(Sys.BINDIR, \"..\"))" OUTPUT_VARIABLE JULIA_PATH_LOCAL) - if ("${JULIA_PATH}" STREQUAL "") + if ("${JULIA_PATH_LOCAL}" STREQUAL "") message(FATAL_ERROR "Cannot determine location of julia image. Before running cmake, please manually set the environment variable JULIA_PATH using\n export JULIA_PATH=/path/to/your/.../julia\nIf you are unsure of the location of your julia image, you can access the path from within the julia REPL using\n println(joinpath(Sys.BINDIR, \"..\")) For more information, visit https://github.com/Clemapfel/jluna/blob/master/README.md#troubleshooting") endif() @@ -29,39 +43,17 @@ For more information, visit https://github.com/Clemapfel/jluna/blob/master/READM set(ENV{JULIA_PATH} ${JULIA_PATH_LOCAL}) endif() -set(JULIA_LIB "$ENV{JULIA_PATH}/lib/libjulia.so") -set(JULIA_INCLUDE "$ENV{JULIA_PATH}/include/julia") -set(JULIA_FOUND TRUE) - -# verify shared library -if (NOT EXISTS ${JULIA_LIB}) - message(WARNING "Cannot find shared library libjulia.so in $ENV{JULIA_PATH}/lib/") - set(JULIA_FOUND FALSE) -endif() +find_library(JULIA_LIB julia HINTS ENV JULIA_PATH REQUIRED) +find_path(JULIA_INCLUDE julia.h HINTS ENV JULIA_PATH PATH_SUFFIXES julia REQUIRED) -# verify header -if (NOT EXISTS ${JULIA_INCLUDE}/julia.h) - message(WARNING "Cannot find library header julia.h in $ENV{JULIA_PATH}/include/julia/") - set(JULIA_FOUND FALSE) -endif() - -if (${JULIA_FOUND}) - message("[LOG] Successfully detected julia image at $ENV{JULIA_PATH}") -else() - message(FATAL_ERROR "Failed to detect julia image. Make sure JULIA_PATH is set correctly and that the julia image is uncompressed and not corrupted.\nFor more information, visit https://github.com/Clemapfel/jluna/blob/master/README.md#troubleshooting") -endif() - -include_directories(${JULIA_INCLUDE}) ### JLUNA ### -include_directories(${CMAKE_SOURCE_DIR}) -set(RESOURCE_PATH ${CMAKE_SOURCE_DIR}) -configure_file(${CMAKE_SOURCE_DIR}/.src/include_julia.inl.in ${CMAKE_SOURCE_DIR}/.src/include_julia.inl @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/.src/include_julia.inl.in ${CMAKE_CURRENT_SOURCE_DIR}/.src/include_julia.inl @ONLY) -add_library(jluna SHARED - jluna.hpp +add_library(jluna + include/jluna.hpp include/exceptions.hpp .src/exceptions.cpp @@ -121,10 +113,12 @@ add_library(jluna SHARED include/gc_sentinel.hpp ) -set_target_properties(jluna PROPERTIES - LINKER_LANGUAGE C - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR} -) +target_include_directories(jluna PUBLIC + ${JULIA_INCLUDE} + $ + $ + $ + ) add_library(jluna_c_adapter SHARED .src/c_adapter.hpp @@ -138,22 +132,19 @@ target_include_directories(jluna_c_adapter ) target_compile_features(jluna_c_adapter PUBLIC cxx_std_20) -target_link_libraries(jluna_c_adapter PUBLIC $) - -set_target_properties(jluna_c_adapter PROPERTIES - LINKER_LANGUAGE C - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR} -) - +target_link_libraries(jluna_c_adapter PUBLIC ${JULIA_LIB}) target_link_libraries(jluna PUBLIC jluna_c_adapter) ### EXECUTABLES ### -add_executable(JLUNA_TEST - .test/main.cpp - .test/test.hpp -) -target_link_libraries(JLUNA_TEST jluna ${JULIA_LIB}) +if(BUILD_TESTING) + add_executable(JLUNA_TEST + .test/main.cpp + .test/test.hpp + ) + target_link_libraries(JLUNA_TEST PRIVATE jluna) + add_test(jluna_test JLUNA_TEST) +endif() #add_executable(JLUNA_BENCHMARK # .benchmark/main.cpp @@ -184,7 +175,23 @@ install(EXPORT jluna_targets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/jluna ) -install(FILES jluna.hpp ${headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/jluna) -install(DIRECTORY include .src DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/jluna) - -target_include_directories(jluna INTERFACE $) \ No newline at end of file +install(FILES + ./.src/array.inl + ./.src/array_iterator.inl + ./.src/box.inl + ./.src/cppcall.inl + ./.src/exceptions.inl + ./.src/include_julia.inl + ./.src/module.inl + ./.src/proxy.inl + ./.src/state.inl + ./.src/symbol.inl + ./.src/typedefs.inl + ./.src/type.inl + ./.src/unbox.inl + ./.src/usertype.inl + ./.src/c_adapter.hpp + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/jluna) +install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/jluna) + +target_include_directories(jluna INTERFACE $) diff --git a/include/array.hpp b/include/array.hpp index d6a89b4..f7dfa31 100644 --- a/include/array.hpp +++ b/include/array.hpp @@ -5,9 +5,9 @@ #pragma once -#include -#include -#include +#include "concepts.hpp" +#include "proxy.hpp" +#include "generator_expression.hpp" namespace jluna { @@ -318,5 +318,5 @@ namespace jluna } } -#include ".src/array.inl" -#include ".src/array_iterator.inl" \ No newline at end of file +#include "array.inl" +#include "array_iterator.inl" diff --git a/include/box.hpp b/include/box.hpp index be4ee3d..b768042 100644 --- a/include/box.hpp +++ b/include/box.hpp @@ -13,8 +13,8 @@ #include -#include -#include +#include "concepts.hpp" +#include "typedefs.hpp" namespace jluna { @@ -197,4 +197,4 @@ namespace jluna }; } -#include ".src/box.inl" \ No newline at end of file +#include "box.inl" diff --git a/include/concepts.hpp b/include/concepts.hpp index 78f3514..ba66089 100644 --- a/include/concepts.hpp +++ b/include/concepts.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include "typedefs.hpp" namespace jluna { @@ -141,4 +141,4 @@ namespace jluna template concept IsUsertype = usertype_enabled::value; -} \ No newline at end of file +} diff --git a/include/cppcall.hpp b/include/cppcall.hpp index 8bac2e1..59d2a92 100644 --- a/include/cppcall.hpp +++ b/include/cppcall.hpp @@ -9,8 +9,8 @@ #include -#include -#include +#include "typedefs.hpp" +#include "concepts.hpp" namespace jluna { @@ -104,4 +104,4 @@ namespace jluna } } -#include ".src/cppcall.inl" \ No newline at end of file +#include "cppcall.inl" diff --git a/include/exceptions.hpp b/include/exceptions.hpp index 610197a..b8da5a6 100644 --- a/include/exceptions.hpp +++ b/include/exceptions.hpp @@ -6,7 +6,7 @@ #pragma once #include -#include +#include "typedefs.hpp" #include #include @@ -82,4 +82,4 @@ namespace jluna Any* operator""_eval(const char*, size_t); } -#include ".src/exceptions.inl" \ No newline at end of file +#include "exceptions.inl" diff --git a/include/function.hpp b/include/function.hpp index aa5d01d..9e4c911 100644 --- a/include/function.hpp +++ b/include/function.hpp @@ -5,8 +5,8 @@ #pragma once -#include -#include +#include "proxy.hpp" +#include "type.hpp" namespace jluna { @@ -31,4 +31,4 @@ namespace jluna /// @brief object describing one method of a function, returned by Type::get_methods and Function::get_methods class Method : public Proxy {}; -} \ No newline at end of file +} diff --git a/include/generator_expression.hpp b/include/generator_expression.hpp index c57658e..2d20401 100644 --- a/include/generator_expression.hpp +++ b/include/generator_expression.hpp @@ -5,7 +5,7 @@ #pragma once -#include +#include "proxy.hpp" namespace jluna { @@ -92,4 +92,4 @@ namespace jluna Int64 _state; bool _is_end = false; }; -} \ No newline at end of file +} diff --git a/include/jluna.hpp b/include/jluna.hpp new file mode 100644 index 0000000..4d5b7dc --- /dev/null +++ b/include/jluna.hpp @@ -0,0 +1,24 @@ +// +// Copyright 2022 Clemens Cords +// Created on 30.01.22 by clem (mail@clemens-cords.com) +// + +#pragma once + +// collects all end-user relevant headers from jluna/include + +#include "exceptions.hpp" +#include "concepts.hpp" +#include "box.hpp" +#include "unbox.hpp" +#include "state.hpp" +#include "proxy.hpp" +#include "array.hpp" +#include "cppcall.hpp" +#include "type.hpp" +#include "symbol.hpp" +#include "module.hpp" +#include "function.hpp" +#include "generator_expression.hpp" +#include "usertype.hpp" +#include "gc_sentinel.hpp" diff --git a/include/jluna.jl b/include/jluna.jl index 0410899..8264a4b 100644 --- a/include/jluna.jl +++ b/include/jluna.jl @@ -939,6 +939,10 @@ module jluna return _cppcall._state[]._arguments end + function _set_library_name(new_library_name) + global _library_name + _library_name = new_library_name + end """ `verify_library() -> Bool` @@ -1056,4 +1060,4 @@ function cppcall(function_name::Symbol, xs...) ::Any return jluna._cppcall.get_result() end -export cppcall \ No newline at end of file +export cppcall diff --git a/include/julia_extension.hpp b/include/julia_extension.hpp index d994196..e473e9b 100644 --- a/include/julia_extension.hpp +++ b/include/julia_extension.hpp @@ -9,7 +9,7 @@ #include -#include +#include "exceptions.hpp" extern "C" { @@ -160,4 +160,4 @@ extern "C" /// @brief restore previously saved state #define jl_gc_unpause jl_gc_enable(_b_e_f_o_r_e_); -} \ No newline at end of file +} diff --git a/include/module.hpp b/include/module.hpp index e6045b2..86ccbc2 100644 --- a/include/module.hpp +++ b/include/module.hpp @@ -6,8 +6,8 @@ #pragma once #include -#include -#include +#include "proxy.hpp" +#include "symbol.hpp" namespace jluna { @@ -133,4 +133,4 @@ namespace jluna }; } -#include ".src/module.inl" \ No newline at end of file +#include "module.inl" diff --git a/include/proxy.hpp b/include/proxy.hpp index d37e938..31f32aa 100644 --- a/include/proxy.hpp +++ b/include/proxy.hpp @@ -11,9 +11,9 @@ #include #include -#include -#include -#include +#include "typedefs.hpp" +#include "box.hpp" +#include "unbox.hpp" namespace jluna { @@ -207,4 +207,4 @@ namespace jluna }; } -#include ".src/proxy.inl" \ No newline at end of file +#include "proxy.inl" diff --git a/include/state.hpp b/include/state.hpp index 6281e1e..89afe1e 100644 --- a/include/state.hpp +++ b/include/state.hpp @@ -12,9 +12,9 @@ #include #include -#include -#include -#include +#include "concepts.hpp" +#include "typedefs.hpp" +#include "box.hpp" namespace jluna { @@ -406,4 +406,4 @@ namespace jluna::State [[deprecated("use State::safe_eval instead")]] Proxy safe_script(const std::string&); } -#include ".src/state.inl" \ No newline at end of file +#include "state.inl" diff --git a/include/symbol.hpp b/include/symbol.hpp index a394ef1..477947a 100644 --- a/include/symbol.hpp +++ b/include/symbol.hpp @@ -6,7 +6,7 @@ #pragma once #include -#include +#include "proxy.hpp" namespace jluna { @@ -68,4 +68,4 @@ namespace jluna }; } -#include ".src/symbol.inl" \ No newline at end of file +#include "symbol.inl" diff --git a/include/type.hpp b/include/type.hpp index 628209b..eb5db1e 100644 --- a/include/type.hpp +++ b/include/type.hpp @@ -6,9 +6,9 @@ #pragma once #include -#include -#include -#include +#include "typedefs.hpp" +#include "proxy.hpp" +#include "symbol.hpp" namespace jluna { @@ -206,4 +206,4 @@ namespace jluna inline Type WeakRef_t; } -#include ".src/type.inl" \ No newline at end of file +#include "type.inl" diff --git a/include/typedefs.hpp b/include/typedefs.hpp index 2b1382c..e6321e3 100644 --- a/include/typedefs.hpp +++ b/include/typedefs.hpp @@ -6,7 +6,7 @@ #pragma once #include -#include ".src/typedefs.inl" +#include "typedefs.inl" namespace jluna { @@ -66,4 +66,4 @@ namespace jluna /// @brief address of julia-side function using Function = jl_function_t; -} \ No newline at end of file +} diff --git a/include/unbox.hpp b/include/unbox.hpp index beccc84..6ab20ff 100644 --- a/include/unbox.hpp +++ b/include/unbox.hpp @@ -7,9 +7,9 @@ #include -#include -#include -#include +#include "concepts.hpp" +#include "typedefs.hpp" +#include "exceptions.hpp" namespace jluna { @@ -154,4 +154,4 @@ namespace jluna }; } -#include ".src/unbox.inl" \ No newline at end of file +#include "unbox.inl" diff --git a/include/usertype.hpp b/include/usertype.hpp index 9d34edd..d9cb54a 100644 --- a/include/usertype.hpp +++ b/include/usertype.hpp @@ -7,8 +7,8 @@ #include -#include -#include +#include "type.hpp" +#include "proxy.hpp" namespace jluna { @@ -86,4 +86,4 @@ namespace jluna }; } -#include ".src/usertype.inl" \ No newline at end of file +#include "usertype.inl" diff --git a/jluna.hpp b/jluna.hpp deleted file mode 100644 index dbf7d48..0000000 --- a/jluna.hpp +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2022 Clemens Cords -// Created on 30.01.22 by clem (mail@clemens-cords.com) -// - -#pragma once - -// collects all end-user relevant headers from jluna/include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include \ No newline at end of file