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 1
1
cmake_minimum_required (VERSION "3.12" )
2
2
3
- project ("spackexample" VERSION 0.2 .0 )
3
+ project ("spackexample" VERSION 0.3 .0 )
4
4
5
5
find_package (Boost
6
6
1.65.1
7
7
REQUIRED
8
8
filesystem
9
9
)
10
10
11
- # find_package(yaml-cpp
12
- # 0.7.0
13
- # REQUIRED
14
- # )
11
+ find_package (yaml-cpp
12
+ 0.7.0
13
+ REQUIRED
14
+ )
15
15
16
- add_library (spackexamplelib filesystem/filesystem.cpp flatset/flatset.cpp )
17
- #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 )
18
17
19
18
set_target_properties (spackexamplelib
20
19
PROPERTIES
@@ -23,10 +22,11 @@ set_target_properties(spackexamplelib
23
22
PUBLIC_HEADER yamlParser/yamlParser.hpp
24
23
)
25
24
25
+ include_directories (${YAML_CPP_INCLUDE_DIR} )
26
+
26
27
add_executable (spackexample main.cpp )
27
28
target_link_libraries (spackexample spackexamplelib )
28
- target_link_libraries (spackexamplelib Boost::filesystem )
29
- #target_link_libraries(spackexamplelib Boost::filesystem ${YAML_CPP_LIBRARIES})
29
+ target_link_libraries (spackexamplelib Boost::filesystem yaml-cpp )
30
30
31
31
target_include_directories (spackexamplelib
32
32
PRIVATE
Original file line number Diff line number Diff line change 1
1
#include " flatset/flatset.hpp"
2
2
#include " filesystem/filesystem.hpp"
3
- // #include "yamlParser/yamlParser.hpp"
3
+ #include " yamlParser/yamlParser.hpp"
4
4
#include < iostream>
5
5
6
6
int main (int argc, char *argv[])
@@ -15,13 +15,13 @@ int main(int argc, char *argv[])
15
15
inspectDirectory ();
16
16
std::cout << std::endl;
17
17
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
+ }
25
25
26
26
return 0 ;
27
27
}
You can’t perform that action at this time.
0 commit comments