-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename build target name to format-json
- Loading branch information
Showing
7 changed files
with
106 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
cmake_minimum_required(VERSION 3.0.2) | ||
project(format-json) | ||
set(CMAKE_BUILD_TYPE Debug) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
set(PATH "../../../../src/json/") | ||
set(SOURCES | ||
${PATH}json_value.cpp | ||
${PATH}json_undefined.cpp | ||
${PATH}json_string.cpp | ||
${PATH}json_object.cpp | ||
${PATH}json_number.cpp | ||
${PATH}json_json.cpp | ||
${PATH}json_array.cpp | ||
${PATH}json_exception.cpp | ||
# headers | ||
${PATH}json_value.h | ||
${PATH}json_undefined.h | ||
${PATH}json_string.h | ||
${PATH}json_object.h | ||
${PATH}json_number.h | ||
${PATH}json_null.h | ||
${PATH}json_json.h | ||
${PATH}json_boolean.h | ||
${PATH}json_array.h | ||
${PATH}json_leaf.h | ||
${PATH}json_exception.h) | ||
|
||
add_library(format-json SHARED ${SOURCES}) | ||
install(TARGETS format-json DESTINATION lib) | ||
install(DIRECTORY ${PATH} DESTINATION include/format FILES_MATCHING PATTERN "*.h") | ||
|
||
# If “make install” is invoked or INSTALL is built, this directory is prepended onto all install directories. | ||
# This variable defaults to /usr/local on UNIX and c:/Program Files on Windows | ||
# cmake .. -DCMAKE_INSTALL_PREFIX=../_install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
cmake_minimum_required(VERSION 3.0.2) | ||
project(test_release) | ||
set(CMAKE_BUILD_TYPE Release) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
set(PATH "../../../../src/test/") | ||
set(SOURCES | ||
${PATH}main.cpp | ||
${PATH}json_array_iterator_test.h | ||
${PATH}json_exception_test.h | ||
${PATH}json_mock_value.h | ||
${PATH}json_object_iterator_test.h | ||
${PATH}json_test.h | ||
${PATH}json_value_test_interface.h | ||
${PATH}unit_test.h | ||
${PATH}json_array_test.h | ||
${PATH}json_leaf_iterator_test.h | ||
${PATH}json_null_test.h | ||
${PATH}json_object_test.h | ||
${PATH}json_undefined_test.h | ||
${PATH}test_selector.h | ||
${PATH}json_boolean_test.h | ||
${PATH}json_leaf_test.h | ||
${PATH}json_number_test.h | ||
${PATH}json_string_test.h | ||
${PATH}json_value_test.h | ||
${PATH}test_selector_test.h) | ||
|
||
find_library (CPPUNIT_LIB cppunit) | ||
find_library (JSON_LIB format-json) | ||
|
||
message(${CPPUNIT_LIB}) | ||
message(${JSON_LIB}) | ||
|
||
add_executable (test_release ${SOURCES}) | ||
target_include_directories (test_release PUBLIC "/usr/local/include") | ||
target_link_libraries (test_release ${CPPUNIT_LIB} ${JSON_LIB}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Start container: | ||
cd to repository root | ||
run: docker run -tiv $PWD:/valgrind karek/valgrind:latest | ||
|
||
Build libjson: | ||
cd to build/linux/json/debug | ||
run: cmake . | ||
run: make && sudo make install | ||
|
||
Build tests: | ||
cd to to build/linux/test/debug | ||
run: cmake . | ||
run: make && sudo make install | ||
|
||
run: valgrind ./test_debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters