cmake_minimum_required(VERSION 3.7.0)
project(cppchallenger)

if (UNIX)
  message(status "** Setting GCC flags")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1z -fexceptions -g -Wall")
elseif(WIN32)
  message(status "** Setting MSVC flags")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /std:c++latest")
  
  add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
message(status "** CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")

set(INCLUDE_PATH "${CMAKE_SOURCE_DIR}/include")
set(LIBS_PATH "${CMAKE_SOURCE_DIR}/libs")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin")

set_property(GLOBAL PROPERTY USE_FOLDERS ON)

add_subdirectory(libs/ZipLib)
add_subdirectory(libs/PDF-Writer)
add_subdirectory(libs/PngWriter)
add_subdirectory(libs/cryptopp)
add_subdirectory(libs/curl)
add_subdirectory(libs/curlcpp)

add_subdirectory(chapter01/problem_01)
add_subdirectory(chapter01/problem_02)
add_subdirectory(chapter01/problem_03)
add_subdirectory(chapter01/problem_04)
add_subdirectory(chapter01/problem_05)
add_subdirectory(chapter01/problem_06)
add_subdirectory(chapter01/problem_07)
add_subdirectory(chapter01/problem_08)
add_subdirectory(chapter01/problem_09)
add_subdirectory(chapter01/problem_10)
add_subdirectory(chapter01/problem_11)
add_subdirectory(chapter01/problem_12)
add_subdirectory(chapter01/problem_13)
add_subdirectory(chapter01/problem_14)

add_subdirectory(chapter02/problem_15)
add_subdirectory(chapter02/problem_16)
add_subdirectory(chapter02/problem_17)
add_subdirectory(chapter02/problem_18)
add_subdirectory(chapter02/problem_19)
add_subdirectory(chapter02/problem_20)
add_subdirectory(chapter02/problem_21)
add_subdirectory(chapter02/problem_22)

add_subdirectory(chapter03/problem_23)
add_subdirectory(chapter03/problem_24)
add_subdirectory(chapter03/problem_25)
add_subdirectory(chapter03/problem_26)
add_subdirectory(chapter03/problem_27)
add_subdirectory(chapter03/problem_28)
add_subdirectory(chapter03/problem_29)
add_subdirectory(chapter03/problem_30)
add_subdirectory(chapter03/problem_31)

add_subdirectory(chapter04/problem_32)
add_subdirectory(chapter04/problem_33)
add_subdirectory(chapter04/problem_34)
add_subdirectory(chapter04/problem_35)
add_subdirectory(chapter04/problem_36)
add_subdirectory(chapter04/problem_37)
add_subdirectory(chapter04/problem_38)

add_subdirectory(chapter05/problem_39)
add_subdirectory(chapter05/problem_40)
add_subdirectory(chapter05/problem_41)
add_subdirectory(chapter05/problem_42)
add_subdirectory(chapter05/problem_43)
add_subdirectory(chapter05/problem_44)

add_subdirectory(chapter06/problem_45)
add_subdirectory(chapter06/problem_46)
add_subdirectory(chapter06/problem_47)
add_subdirectory(chapter06/problem_48)
add_subdirectory(chapter06/problem_49)
add_subdirectory(chapter06/problem_50)
add_subdirectory(chapter06/problem_51)
add_subdirectory(chapter06/problem_52)
add_subdirectory(chapter06/problem_53)
add_subdirectory(chapter06/problem_54)
add_subdirectory(chapter06/problem_55)
add_subdirectory(chapter06/problem_56)
add_subdirectory(chapter06/problem_57)
add_subdirectory(chapter06/problem_58)
add_subdirectory(chapter06/problem_59)
add_subdirectory(chapter06/problem_60)

add_subdirectory(chapter07/problem_61)
add_subdirectory(chapter07/problem_62)
add_subdirectory(chapter07/problem_63)
add_subdirectory(chapter07/problem_64)
add_subdirectory(chapter07/problem_65)
add_subdirectory(chapter07/problem_66)

add_subdirectory(chapter08/problem_67)
add_subdirectory(chapter08/problem_68)
add_subdirectory(chapter08/problem_69)
add_subdirectory(chapter08/problem_70)
add_subdirectory(chapter08/problem_71)
add_subdirectory(chapter08/problem_72)

add_subdirectory(chapter09/problem_73)
add_subdirectory(chapter09/problem_74)
add_subdirectory(chapter09/problem_75)
add_subdirectory(chapter09/problem_76)
add_subdirectory(chapter09/problem_77)
add_subdirectory(chapter09/problem_78)

add_subdirectory(chapter10/problem_79)
add_subdirectory(chapter10/problem_80)
add_subdirectory(chapter10/problem_81)
add_subdirectory(chapter10/problem_82)
add_subdirectory(chapter10/problem_83)
add_subdirectory(chapter10/problem_84)
add_subdirectory(chapter10/problem_85)
add_subdirectory(chapter10/problem_86)
add_subdirectory(chapter10/problem_87)

add_subdirectory(chapter11/problem_88)
add_subdirectory(chapter11/problem_89)
add_subdirectory(chapter11/problem_90)
add_subdirectory(chapter11/problem_91)
add_subdirectory(chapter11/problem_92)
add_subdirectory(chapter11/problem_93)
add_subdirectory(chapter11/problem_94)

add_subdirectory(chapter12/problem_95)
add_subdirectory(chapter12/problem_96c)
add_subdirectory(chapter12/problem_96s)
add_subdirectory(chapter12/problem_97)
add_subdirectory(chapter12/problem_98)
add_subdirectory(chapter12/problem_99)
add_subdirectory(chapter12/problem_9a)
