From f696d28a0e93c94d0f3ae90e4a8c2bb124aedf1f Mon Sep 17 00:00:00 2001 From: srydell Date: Wed, 9 Mar 2022 15:36:28 +0100 Subject: [PATCH] Change the documentation regarding downloading tolc to be the same as tolc-demo --- CMakeLists.txt | 4 ++-- README.md | 3 +-- docs/packaging/docs/guides/translating_a_cpp_library.md | 6 +++--- docs/packaging/docs/installing.md | 6 +++--- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b4c9bd3..1e1b77b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,11 +31,11 @@ include(${modules}/Sanitizers.cmake) include(${modules}/StaticAnalyzers.cmake) include(${modules}/GetFrontend.cmake) -get_frontend(NAME Frontend.py VERSION v0.4.0) +get_frontend(NAME Frontend.py VERSION latest) copy_frontend_docs(NAME Frontend.py SRC_DIR ${frontend.py_SOURCE_DIR} COPY_TO ${CMAKE_CURRENT_LIST_DIR}/docs/packaging/docs/python) -get_frontend(NAME Frontend.wasm VERSION v0.4.2) +get_frontend(NAME Frontend.wasm VERSION latest) copy_frontend_docs( NAME Frontend.wasm SRC_DIR ${frontend.wasm_SOURCE_DIR} COPY_TO ${CMAKE_CURRENT_LIST_DIR}/docs/packaging/docs/webassembly) diff --git a/README.md b/README.md index 9282043..7676988 100644 --- a/README.md +++ b/README.md @@ -88,11 +88,10 @@ FetchContent_Declare( ) FetchContent_Populate(tolc_entry) +set(tolc_DIR ${tolc_entry_SOURCE_DIR}/lib/cmake/tolc) find_package( tolc CONFIG - PATHS - ${tolc_entry_SOURCE_DIR} REQUIRED ) ``` diff --git a/docs/packaging/docs/guides/translating_a_cpp_library.md b/docs/packaging/docs/guides/translating_a_cpp_library.md index 1dc5fdd..7d0d835 100644 --- a/docs/packaging/docs/guides/translating_a_cpp_library.md +++ b/docs/packaging/docs/guides/translating_a_cpp_library.md @@ -48,12 +48,12 @@ FetchContent_Declare( ) FetchContent_Populate(tolc_entry) +set(tolc_DIR ${tolc_entry_SOURCE_DIR}/lib/cmake/tolc) find_package( tolc CONFIG - PATHS - ${tolc_entry_SOURCE_DIR} - REQUIRED) + REQUIRED +) ``` After the call to `find_package` we are free to use the `CMake` functions available in the `tolc` installation. To create bindings for `Math` we have to call the `tolc_create_bindings` function diff --git a/docs/packaging/docs/installing.md b/docs/packaging/docs/installing.md index 21bca47..1318414 100644 --- a/docs/packaging/docs/installing.md +++ b/docs/packaging/docs/installing.md @@ -12,12 +12,12 @@ FetchContent_Declare( ) FetchContent_Populate(tolc_entry) +set(tolc_DIR ${tolc_entry_SOURCE_DIR}/lib/cmake/tolc) find_package( tolc CONFIG - PATHS - ${tolc_entry_SOURCE_DIR} - REQUIRED) + REQUIRED +) ``` When reconfiguring your project, the `Tolc` `CMake` interface should be available automatically. Note that this requires `CMake 3.15` or later.