Skip to content

Commit

Permalink
Content for v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
IshaanDesai committed Nov 26, 2024
1 parent e9c914c commit 346e1ac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
18 changes: 9 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
cmake_minimum_required(VERSION "3.12")

project("spackexample" VERSION 0.2.0)
project("spackexample" VERSION 0.3.0)

find_package(Boost
1.65.1
REQUIRED
filesystem
)

#find_package(yaml-cpp
# 0.7.0
# REQUIRED
# )
find_package(yaml-cpp
0.7.0
REQUIRED
)

add_library(spackexamplelib filesystem/filesystem.cpp flatset/flatset.cpp)
#add_library(spackexamplelib filesystem/filesystem.cpp flatset/flatset.cpp yamlParser/yamlParser.cpp)
add_library(spackexamplelib filesystem/filesystem.cpp flatset/flatset.cpp yamlParser/yamlParser.cpp)

set_target_properties(spackexamplelib
PROPERTIES
Expand All @@ -23,10 +22,11 @@ set_target_properties(spackexamplelib
PUBLIC_HEADER yamlParser/yamlParser.hpp
)

include_directories(${YAML_CPP_INCLUDE_DIR})

add_executable(spackexample main.cpp)
target_link_libraries(spackexample spackexamplelib)
target_link_libraries(spackexamplelib Boost::filesystem)
#target_link_libraries(spackexamplelib Boost::filesystem ${YAML_CPP_LIBRARIES})
target_link_libraries(spackexamplelib Boost::filesystem yaml-cpp)

target_include_directories(spackexamplelib
PRIVATE
Expand Down
16 changes: 8 additions & 8 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "flatset/flatset.hpp"
#include "filesystem/filesystem.hpp"
//#include "yamlParser/yamlParser.hpp"
#include "yamlParser/yamlParser.hpp"
#include <iostream>

int main(int argc, char *argv[])
Expand All @@ -15,13 +15,13 @@ int main(int argc, char *argv[])
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;
}
Expand Down

0 comments on commit 346e1ac

Please sign in to comment.