From e9c914c08e28d5f06bb697c75b0cba8abf45c656 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Tue, 26 Nov 2024 13:56:04 +0100 Subject: [PATCH] Changes for v0.2.0 --- CMakeLists.txt | 50 +++++++++++++++++++++++++------------------------- main.cpp | 30 +++++++++++++++--------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f2d980c..f50d40d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,44 +1,44 @@ cmake_minimum_required(VERSION "3.12") -project("spackexample" VERSION 0.1.0) +project("spackexample" VERSION 0.2.0) + +find_package(Boost + 1.65.1 + REQUIRED + filesystem + ) -#find_package(Boost -# 1.65.1 -# REQUIRED -# filesystem -# ) -# #find_package(yaml-cpp # 0.7.0 # REQUIRED # ) -#add_library(spackexamplelib filesystem/filesystem.cpp fem/fem.cpp flatset/flatset.cpp yamlParser/yamlParser.cpp) +add_library(spackexamplelib filesystem/filesystem.cpp flatset/flatset.cpp) +#add_library(spackexamplelib filesystem/filesystem.cpp flatset/flatset.cpp yamlParser/yamlParser.cpp) -#set_target_properties(spackexamplelib -# PROPERTIES -# PUBLIC_HEADER filesystem/filesystem.hpp -# PUBLIC_HEADER fem/fem.hpp -# PUBLIC_HEADER flatset/flatset.hpp -# PUBLIC_HEADER yamlParser/yamlParser.hpp -# ) +set_target_properties(spackexamplelib + PROPERTIES + PUBLIC_HEADER filesystem/filesystem.hpp + PUBLIC_HEADER flatset/flatset.hpp + PUBLIC_HEADER yamlParser/yamlParser.hpp + ) add_executable(spackexample main.cpp) -#target_link_libraries(spackexample spackexamplelib) +target_link_libraries(spackexample spackexamplelib) +target_link_libraries(spackexamplelib Boost::filesystem) #target_link_libraries(spackexamplelib Boost::filesystem ${YAML_CPP_LIBRARIES}) -#target_include_directories(spackexamplelib -# PRIVATE -# ${CMAKE_CURRENT_SOURCE_DIR}/spackexamplelib -# PUBLIC -# $ -# $ -# ) +target_include_directories(spackexamplelib + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/spackexamplelib + PUBLIC + $ + $ + ) # Create install targets include(GNUInstallDirs) -install(TARGETS spackexample -#install(TARGETS spackexample spackexamplelib +install(TARGETS spackexample spackexamplelib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} diff --git a/main.cpp b/main.cpp index eb46e8a..55a4f7d 100644 --- a/main.cpp +++ b/main.cpp @@ -1,5 +1,5 @@ -//#include "flatset/flatset.hpp" -//#include "filesystem/filesystem.hpp" +#include "flatset/flatset.hpp" +#include "filesystem/filesystem.hpp" //#include "yamlParser/yamlParser.hpp" #include @@ -7,21 +7,21 @@ int main(int argc, char *argv[]) { std::cout << "Let's fight with CMake, Docker, and some dependencies!" << std::endl << std::endl; - // std::cout << "Modify a flat set using boost container" << std::endl; - // modifyAndPrintSets(); - // std::cout << std::endl; + std::cout << "Modify a flat set using boost container" << std::endl; + modifyAndPrintSets(); + std::cout << std::endl; - // std::cout << "Inspect the current directory using boost filesystem" << std::endl; - // inspectDirectory(); - // std::cout << std::endl; + std::cout << "Inspect the current directory using boost filesystem" << std::endl; + inspectDirectory(); + std::cout << std::endl; - // if ( argc == 2 ) - // { - // const std::string yamlFile( argv[1] ); - // std::cout << "Parse some yaml file with yaml-cpp" << std::endl; - // std::cout << " " << yamlFile << std::endl; - // parseConfig( yamlFile ); - // } + //if ( argc == 2 ) + //{ + // const std::string yamlFile( argv[1] ); + // std::cout << "Parse some yaml file with yaml-cpp" << std::endl; + // std::cout << " " << yamlFile << std::endl; + // parseConfig( yamlFile ); + //} return 0; }