Skip to content

Commit

Permalink
Merge pull request #18 from vincentlaucsb/cxx11
Browse files Browse the repository at this point in the history
C+14 compatibility
  • Loading branch information
vincentlaucsb authored Mar 30, 2019
2 parents 47e3b17 + bbd9dea commit 749e423
Show file tree
Hide file tree
Showing 11 changed files with 1,486 additions and 141 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ project(csv_parser)
set(CMAKE_CXX_STANDARD 17)

if (MSVC)
# Make Visual Studio report accurate C++ version
# See: https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
set(CMAKE_CXX_FLAGS "/Zc:__cplusplus")
else()
set(CMAKE_CXX_FLAGS "-pthread")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
Expand All @@ -15,6 +18,7 @@ set(TEST_DIR ${CMAKE_CURRENT_LIST_DIR}/tests)

# file(GLOB_RECURSE SOURCES include/ *.hpp *.cpp)
set(SOURCES
${CMAKE_CURRENT_LIST_DIR}/include/external/string_view.hpp
${SOURCE_DIR}/csv_reader.cpp
${SOURCE_DIR}/csv_reader_iterator.cpp
${SOURCE_DIR}/csv_row.cpp
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BUILD_DIR = build
TEST_DIR = tests
IDIR = include/
CFLAGS = -pthread -std=c++17
CFLAGS = -pthread -std=c++14
TFLAGS = -I$(IDIR) -Itests/ $(CFLAGS) -Og -g --coverage

# Main Library
Expand Down
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ignore:
- "include/external"
- "tests"
Loading

0 comments on commit 749e423

Please sign in to comment.