File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed
Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION "3.12" )
22
3- project ("spackexample" VERSION 0.2 .0)
3+ project ("spackexample" VERSION 0.3 .0)
44
55find_package (Boost
66 1.65.1
77 REQUIRED
88 filesystem
99 )
1010
11- # find_package(yaml-cpp
12- # 0.7.0
13- # REQUIRED
14- # )
11+ find_package (yaml-cpp
12+ 0.7.0
13+ REQUIRED
14+ )
1515
16- add_library (spackexamplelib filesystem/filesystem.cpp flatset/flatset.cpp) # yamlParser/yamlParser.cpp)
16+ add_library (spackexamplelib filesystem/filesystem.cpp flatset/flatset.cpp yamlParser/yamlParser.cpp)
1717
1818set_target_properties (spackexamplelib
1919 PROPERTIES
2020 PUBLIC_HEADER filesystem/filesystem.hpp
2121 PUBLIC_HEADER flatset/flatset.hpp
22- # PUBLIC_HEADER yamlParser/yamlParser.hpp
22+ PUBLIC_HEADER yamlParser/yamlParser.hpp
2323 )
2424
25- # include_directories(${YAML_CPP_INCLUDE_DIR})
25+ include_directories (${YAML_CPP_INCLUDE_DIR} )
2626
2727add_executable (spackexample main.cpp)
2828
2929target_link_libraries (spackexample spackexamplelib)
30- target_link_libraries (spackexamplelib Boost::filesystem) # ${YAML_CPP_LIBRARIES} )
30+ target_link_libraries (spackexamplelib Boost::filesystem yaml-cpp )
3131
3232target_include_directories (spackexamplelib
3333 PRIVATE
Original file line number Diff line number Diff line change 11#include " flatset/flatset.hpp"
22#include " filesystem/filesystem.hpp"
3- // #include "yamlParser/yamlParser.hpp"
3+ #include " yamlParser/yamlParser.hpp"
44#include < iostream>
55
66int main (int argc, char *argv[])
@@ -15,13 +15,13 @@ int main(int argc, char *argv[])
1515 inspectDirectory ();
1616 std::cout << std::endl;
1717
18- // if ( argc == 2 )
19- // {
20- // const std::string yamlFile( argv[1] );
21- // std::cout << "Parse some yaml file with yaml-cpp" << std::endl;
22- // std::cout << " " << yamlFile << std::endl;
23- // parseConfig( yamlFile );
24- // }
18+ if ( argc == 2 )
19+ {
20+ const std::string yamlFile ( argv[1 ] );
21+ std::cout << " Parse some yaml file with yaml-cpp" << std::endl;
22+ std::cout << " " << yamlFile << std::endl;
23+ parseConfig ( yamlFile );
24+ }
2525
2626 return 0 ;
2727}
You can’t perform that action at this time.
0 commit comments