<commit_before>cmake_minimum_required(VERSION 3.5)

project(coordinate-transformation-library VERSION 1.0)

# Enable CTest
enable_testing()

set(LIBRARY_NAME coordinate-transformation)

# Target source files
set(LIBRARY_SOURCES
  src/gausskreuger.cpp
  src/position.cpp
  src/rt90position.cpp
  src/sweref99position.cpp
  src/wgs84position.cpp
)

# Target headerfiles
SET(LIBRARY_HEADERS
  include/gausskreuger.h
  include/position.h
  include/rt90position.h
  include/sweref99position.h
  include/wgs84position.h
)

###############################################################################
# Compiler Options
################################################################################

list(APPEND MSVC_OPTIONS /W4) # Warning level 4
list(APPEND MSVC_OPTIONS /WX) # Warnings as errors

list(APPEND GCC_OPTIONS -Wall)     # All warnings
list(APPEND GCC_OPTIONS -ansi)     # All warnings
list(APPEND GCC_OPTIONS -pedantic) # All warnings
list(APPEND GCC_OPTIONS -Wextra)   # Add extra warings

list(APPEND CLANG_OPTIONS -Wall)     # All warnings
list(APPEND CLANG_OPTIONS -Wextra)   # Add extra warings

add_library(${LIBRARY_NAME} ${LIBRARY_SOURCES} ${LIBRARY_HEADERS})

target_compile_options(${LIBRARY_NAME} PRIVATE 
  $<$<CXX_COMPILER_ID:MSVC>:${MSVC_OPTIONS}>
  $<$<CXX_COMPILER_ID:GNU>:${GCC_OPTIONS}>
  $<$<CXX_COMPILER_ID:Clang>:${CLANG_OPTIONS}>
)

target_compile_features(${LIBRARY_NAME} PUBLIC cxx_auto_type cxx_strong_enums)

target_include_directories(${LIBRARY_NAME} PUBLIC 
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>
  $<INSTALL_INTERFACE:include> 
)


#####################################################################<commit_msg>Disabled a warning when compiling with Clang<commit_after>cmake_minimum_required(VERSION 3.5)

project(coordinate-transformation-library VERSION 1.0)

# Enable CTest
enable_testing()

set(LIBRARY_NAME coordinate-transformation)

# Target source files
set(LIBRARY_SOURCES
  src/gausskreuger.cpp
  src/position.cpp
  src/rt90position.cpp
  src/sweref99position.cpp
  src/wgs84position.cpp
)

# Target headerfiles
SET(LIBRARY_HEADERS
  include/gausskreuger.h
  include/position.h
  include/rt90position.h
  include/sweref99position.h
  include/wgs84position.h
)

###############################################################################
# Compiler Options
################################################################################

list(APPEND MSVC_OPTIONS /W4) # Warning level 4
list(APPEND MSVC_OPTIONS /WX) # Warnings as errors

list(APPEND GCC_OPTIONS -Wall)     # All warnings
list(APPEND GCC_OPTIONS -ansi)     # All warnings
list(APPEND GCC_OPTIONS -pedantic) # All warnings
list(APPEND GCC_OPTIONS -Wextra)   # Add extra warings

list(APPEND CLANG_OPTIONS -Wall)     # All warnings
list(APPEND CLANG_OPTIONS -Wextra)   # Add extra warings
list(APPEND CLANG_OPTIONS -Wno-invalid-source-encoding) # Disable the warning cause by using ANSI encoded degree sign

add_library(${LIBRARY_NAME} ${LIBRARY_SOURCES} ${LIBRARY_HEADERS})

target_compile_options(${LIBRARY_NAME} PRIVATE 
  $<$<CXX_COMPILER_ID:MSVC>:${MSVC_OPTIONS}>
  $<$<CXX_COMPILER_ID:GNU>:${GCC_OPTIONS}>
  $<$<CXX_COMPILER_ID:Clang>:${CLANG_OPTIONS}>
)

target_compile_features(${LIBRARY_NAME} PUBLIC cxx_auto_type cxx_strong_enums)

target_include_directories(${LIBRARY_NAME} PUBLIC 
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>
  $<INSTALL_INTERFACE:include> 
)


#####################################################################
{'fraction_non_alphanumeric': 0.21704317986845867, 'fraction_numerical': 0.010294538175579068, 'mean_word_length': 7.004576659038902, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4388789', 'n_tokens_mistral': 1246, 'n_tokens_neox': 1142, 'n_words': 197}