Skip to content

Commit c00d5a8

Browse files
committed
Added languages and fixed signed char issue
1 parent 15d6a92 commit c00d5a8

File tree

9 files changed

+79
-633
lines changed

9 files changed

+79
-633
lines changed

CMakeLists.txt

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ project(mapcode_cpp)
2727
# NO_FAST_ENCODE - Drop fast encoding support - only for internal use.
2828

2929
set(MAPCODE_OPTIONS "")
30-
set(MAPCODE_WARNING_OPTIONS "-Wall -Werror -Wextra -Wpedantic")
30+
set(MAPCODE_WARNING_OPTIONS "-Wall -Werror -Wextra")
3131
set(MAPCODE_SANITIZER_COMPILER_OPTIONS "-fsanitize=address -fno-common -fno-optimize-sibling-calls -fno-omit-frame-pointer")
3232
set(MAPCODE_SANITIZER_LINKER_OPTIONS "-fsanitize=address")
3333

@@ -48,12 +48,21 @@ set(SOURCE_FILES_MAPCODELIB
4848
mapcodelib/internal_alphabet_recognizer.h
4949
mapcodelib/internal_iso3166_data.h
5050
mapcodelib/internal_territory_alphabets.h
51+
mapcodelib/internal_territory_names_ar.h
5152
mapcodelib/internal_territory_names_da.h
5253
mapcodelib/internal_territory_names_de.h
5354
mapcodelib/internal_territory_names_en.h
55+
mapcodelib/internal_territory_names_es.h
56+
mapcodelib/internal_territory_names_fi.h
5457
mapcodelib/internal_territory_names_fr.h
58+
mapcodelib/internal_territory_names_he.h
5559
mapcodelib/internal_territory_names_hi.h
60+
mapcodelib/internal_territory_names_hr.h
61+
mapcodelib/internal_territory_names_it.h
5662
mapcodelib/internal_territory_names_nl.h
63+
mapcodelib/internal_territory_names_no.h
64+
mapcodelib/internal_territory_names_pt.h
65+
mapcodelib/internal_territory_names_se.h
5766
mapcodelib/internal_territory_names_local.h
5867
mapcodelib/internal_territory_search.h
5968
mapcodelib/mapcode_alphabets.h
@@ -70,11 +79,23 @@ set(SOURCE_FILES_TEST
7079
set(SOURCE_FILES_UTILITY
7180
utility/mapcode.cpp)
7281

82+
set(THREADS_PREFER_PTHREAD_FLAG ON)
83+
find_package(Threads REQUIRED)
84+
find_library(M_LIB m)
85+
7386
add_library(mapcodelib ${SOURCE_FILES_MAPCODELIB})
7487
target_include_directories(mapcodelib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
88+
target_link_libraries(mapcodelib Threads::Threads)
89+
target_link_libraries(mapcodelib ${M_LIB})
7590

7691
add_executable(unittest ${SOURCE_FILES_TEST})
7792
target_link_libraries(unittest LINK_PUBLIC mapcodelib)
93+
target_link_libraries(unittest LINK_PUBLIC Threads::Threads)
94+
target_link_libraries(unittest LINK_PUBLIC ${M_LIB})
7895

7996
add_executable(mapcode ${SOURCE_FILES_UTILITY})
8097
target_link_libraries(mapcode LINK_PUBLIC mapcodelib)
98+
target_link_libraries(mapcode LINK_PUBLIC Threads::Threads)
99+
target_link_libraries(mapcode LINK_PUBLIC ${M_LIB})
100+
101+
install(TARGETS mapcode DESTINATION /usr/local/bin)

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,6 @@ Check the `README.md` in directory `test` for more information.
4444

4545
Also see http://www.mapcode.com for background and reference materials.
4646

47-
## Compilers: Signed and Unsigned `char`
48-
49-
The library expects the type `char` to be `signed char` by default. If your compiler
50-
uses `unsigned char` by default (such as for ARM or PowerPC), please add the correct
51-
compiler switch to change this behavior to `signed char`.
52-
53-
The unit tests in `test` will test the correct settings of the compiler and will
54-
fail if you've compiled the library with incorrect settings.
5547

5648
## A Real-Life Example, The 'mapcode' Codec Tool: `utility/`
5749

0 commit comments

Comments
 (0)