Skip to content

Commit bc897ca

Browse files
committed
Updated CMakeLists
1 parent dc3dd0b commit bc897ca

17 files changed

+22
-18
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ unittest/*.gcno
66
mapcodelib/*.gcov
77
mapcodelib/*.gcda
88
mapcodelib/*.gcno
9+
CMakeCache.txt
10+
CMakeFiles/**
11+
Makefile
12+
cmake_install.cmake
13+
*.a
914

1015
# -----------------------------------------------------------------------------
1116
# Compiled sources

CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,16 @@ set(SOURCE_FILES_MAPCODELIB
5858
mapcodelib/mapcoder.c
5959
mapcodelib/mapcoder.h)
6060

61-
set(SOURCE_FILES_UNITTEST
62-
unittest/decode_test.h
63-
unittest/unittest.c)
61+
set(SOURCE_FILES_TEST
62+
test/decode_test.h
63+
test/unittest.c)
6464

6565
set(SOURCE_FILES_UTILITY
6666
utility/mapcode.cpp)
6767

6868
add_library(mapcodelib ${SOURCE_FILES_MAPCODELIB})
69-
target_include_directories(mapcodelib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
7069

71-
add_executable(unittest ${SOURCE_FILES_UNITTEST})
70+
add_executable(unittest ${SOURCE_FILES_TEST})
7271
target_link_libraries(unittest LINK_PUBLIC mapcodelib)
7372

7473
add_executable(mapcode ${SOURCE_FILES_UTILITY})

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ Documentation, including example snippets of C source code, can be found in
3232
mapcode_library_c.pdf <-- PDF format.
3333
mapcode_library_c.doc <-- Microsoft Word format.
3434

35-
A unit test can be found in the unittest\ subdirectory.
36-
Compile and run unittest\unittest/c to see if the library performs as expected.
35+
A unit test can be found in the test\ subdirectory.
36+
Compile and run test/unittest.c to see if the library performs as expected.
3737

3838
Also see www.mapcode.com for background and reference materials.
3939

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

unittest/run_compare.sh renamed to test/run_compare.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ cd ../mapcodelib
2828
gcc $OPTS -O3 -c mapcoder.c
2929
cd ../utility
3030
gcc $OPTS -O3 mapcode.cpp -lm -o mapcode ../mapcodelib/mapcoder.o
31-
cd ../unittest
31+
cd ../test
3232

3333
TEST=`which $NEW`
3434
if [ "$TEST" = "" ]

unittest/run_gcov.sh renamed to test/run_gcov.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ then
1010
fi
1111

1212
echo "!! -------------------------------------------------------------"
13-
echo "Run gcov test coverage..."
13+
echo "Run gcov unittest.coverage..."
1414
date
1515
echo "!! -------------------------------------------------------------"
1616

@@ -23,7 +23,7 @@ gcc $OPTS -O0 unittest.c -lm -lpthread -o unittest $LIB
2323
./unittest
2424
cd ../mapcodelib
2525
gcov mapcoder.c
26-
cd ../unittest
26+
cd ../test
2727
gcov unittest.c
2828
echo "!! -------------------------------------------------------------"
2929
echo "!! Coverage reports in: *.gcov files"

0 commit comments

Comments
 (0)