cmake_minimum_required(VERSION 3.0)
project(SIPL)

# Let's use C++14
set(CMAKE_CXX_STANDARD 14)

# Set CXX_FLAGS so ninja output is colorized
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
    add_compile_options(-Wall)
    add_compile_options(-Wpedantic)
    add_compile_options(-Wno-c++98-compat)
    add_compile_options(-fdiagnostics-color=always)
    add_compile_options(-Wno-missing-braces)
    add_compile_options(-Wno-weak-vtables)
    add_compile_options(-Wno-padded)
    add_compile_options(-Wno-sign-conversion)
    add_compile_options(-Werror)
endif()

# Export compile commands for YCM
set(CMAKE_EXPORT_COMPILE_COMMANDS on)

# Set directories of output files
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)

include_directories(include)
add_subdirectory(src)

# List of sources
set(SIPL_SOURCES
    src/io/NetpbmIOBase.cpp
    src/io/PgmIO.cpp
    src/io/PpmIO.cpp
)

add_executable(sipldemo histogram.cpp "${SIPL_SOURCES}")

cmake_minimum_required(VERSION 3.0)
project(SIPL)

# Let's use C++14
set(CMAKE_CXX_STANDARD 14)

# Set CXX_FLAGS so ninja output is colorized
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
    add_compile_options(-Wall)
    add_compile_options(-Wpedantic)
    add_compile_options(-Wno-c++98-compat)
    add_compile_options(-fdiagnostics-color=always)
    add_compile_options(-Wno-missing-braces)
    add_compile_options(-Wno-weak-vtables)
    add_compile_options(-Wno-padded)
    add_compile_options(-Wno-sign-conversion)
    add_compile_options(-Wno-c++11-narrowing)
    add_compile_options(-Werror)
endif()

# Export compile commands for YCM
set(CMAKE_EXPORT_COMPILE_COMMANDS on)

# Set directories of output files
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)

include_directories(include)
add_subdirectory(src)

# List of sources
set(SIPL_SOURCES
    src/io/NetpbmIOBase.cpp
    src/io/PgmIO.cpp
    src/io/PpmIO.cpp
)

add_executable(sipldemo histogram.cpp "${SIPL_SOURCES}")

Remove warning about c++11 narrowing since the default apple compiler flags that as an error for some reason
Remove warning about c++11 narrowing since the default apple compiler flags that as an error for some reason
