Last active
November 30, 2024 20:08
Revisions
-
mortymacs revised this gist
Nov 30, 2024 . 1 changed file with 14 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ if(NOT EXISTS "${VENDOR_DIR}/argparse") file( DOWNLOAD "https://github.com/p-ranav/argparse/archive/refs/tags/v3.0.tar.gz" "${VENDOR_DIR}/argparser.tgz" TIMEOUT 5 TLS_VERIFY ON) execute_process( COMMAND "${CMAKE_COMMAND}" -E tar xzf "${VENDOR_DIR}/argparser.tgz" WORKING_DIRECTORY "${VENDOR_DIR}") execute_process(COMMAND "${CMAKE_COMMAND}" -E rename "${VENDOR_DIR}/argparse-3.0" "${VENDOR_DIR}/argparse") execute_process(COMMAND "${CMAKE_COMMAND}" -E remove "${VENDOR_DIR}/argparser.tgz") endif() -
mortymacs created this gist
Dec 5, 2023 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ cmake_minimum_required(VERSION 3.25.0) project(HelloWorld) # Enable for IDE set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Download thirdparty include(FetchContent) FetchContent_Declare( tomlplusplus GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git GIT_TAG v3.4.0 ) FetchContent_MakeAvailable(tomlplusplus) # Include thirdparty headers include_directories(${tomlplusplus_SOURCE_DIR}) # Compile add_executable(HelloWorld main.cc) This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ cmake . make -j8 This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #include <iostream> #include <toml.hpp> int main() { std::cout << "Hello World!" << std::endl; toml::table tbl; try { tbl = toml::parse_file("a.toml"); std::cout << tbl << std::endl; } catch (const toml::parse_error &err) { std::cout << err << std::endl; return 1; } return 0; }