File tree 4 files changed +16
-13
lines changed 4 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,15 @@ include(${CMAKE_SOURCE_DIR}/scripts/cmake/project_add_all_folders.cmake)
14
14
include (${CMAKE_SOURCE_DIR} /scripts/cmake/conan_custom_setup.cmake)
15
15
include (${CMAKE_SOURCE_DIR} /scripts/cmake/hackerrank_challenge.cmake)
16
16
17
-
18
17
compiler_check()
19
18
20
19
if (USE_CONAN_LIBS)
21
- include (${CMAKE_BINARY_DIR} /conanbuildinfo.cmake)
22
- conan_custom_setup()
20
+ include (${CMAKE_BINARY_DIR} /conanbuildinfo.cmake)
21
+ conan_custom_setup()
22
+ else ()
23
+ find_package (PkgConfig REQUIRED)
24
+ pkg_check_modules(JsonCpp REQUIRED jsoncpp>=1.9.4)
25
+ find_package (Boost 1.68.0)
23
26
endif (USE_CONAN_LIBS)
24
27
25
28
include (CTest)
Original file line number Diff line number Diff line change 1
1
[requires]
2
2
gtest/1.10.0
3
3
boost/1.69.0
4
+ jsoncpp/1.9.4
4
5
5
6
[generators]
6
7
cmake
Original file line number Diff line number Diff line change @@ -13,12 +13,11 @@ macro(hackerrank_setup_project)
13
13
set_target_properties (${ProjectId} PROPERTIES FOLDER "${ProjectFolder} " )
14
14
15
15
if (USE_CONAN_LIBS)
16
- target_link_libraries (${ProjectId} ${CONAN_LIBS} )
16
+ target_link_libraries (${ProjectId} ${CONAN_LIBS} m)
17
17
else ()
18
- find_package (Boost 1.68.0)
19
- include_directories (${Boost_INCLUDE_DIRS} )
20
- target_link_libraries (${ProjectId} ${Boost_LIBRARIES} )
21
- endif (USE_CONAN_LIBS)
18
+ include_directories (${Boost_INCLUDE_DIRS} ${JsonCpp_INCLUDE_DIRS} )
19
+ target_link_libraries (${ProjectId} ${Boost_LIBRARIES} ${JsonCpp_LIBRARIES} m)
20
+ endif (USE_CONAN_LIBS)
22
21
endmacro ()
23
22
24
23
macro (hackerrank_challenge_solution)
@@ -42,11 +41,11 @@ macro(hackerrank_challenge_test)
42
41
target_link_libraries (${ProjectTest} ${ProjectId} ${TestBaseProject} ${CONAN_LIBS} )
43
42
else ()
44
43
# GTest
45
- find_package (GTest REQUIRED)
46
- include_directories (${GTEST_INCLUDE_DIRS} )
44
+ find_package (GTest REQUIRED)
45
+ include_directories (${GTEST_INCLUDE_DIRS} )
47
46
48
- target_link_libraries (${ProjectTest} ${ProjectId} ${TestBaseProject} ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} pthread)
49
- endif (USE_CONAN_LIBS)
47
+ target_link_libraries (${ProjectTest} ${ProjectId} ${TestBaseProject} ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} pthread)
48
+ endif (USE_CONAN_LIBS)
50
49
51
50
set_property (TARGET ${ProjectTest} PROPERTY CXX_STANDARD 14)
52
51
set_property (TARGET ${ProjectTest} PROPERTY CXX_STANDARD_REQUIRED ON )
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ function write_header_file {
66
66
done
67
67
68
68
echo -ne " #ifndef ${problem_name^^} _H
69
- #define ${problem_name^^} _H
69
+ #define ${problem_name^^} _H
70
70
71
71
namespace hackerrank {
72
72
namespace bmgandre {${ns_begin}
You can’t perform that action at this time.
0 commit comments