<commit_before>CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
project(universe)

FIND_PACKAGE(OpenCL)
FIND_PACKAGE(OpenGL)
FIND_PACKAGE(GLEW)
FIND_PACKAGE(glm)
FIND_PACKAGE(glfw3)

INCLUDE_DIRECTORIES( 
    ${OPENGL_INCLUDE_DIR}
    ${GLEW_INCLUDE_PATH}
    ${GLFW3_INCLUDE_PATH}
    ${GLM_INCLUDE_PATH}
)

function(add_cxxflag FLAG)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAG}" PARENT_SCOPE)
endfunction(add_cxxflag)

if(CMAKE_BUILD_TYPE STREQUAL Debug)
    #Debug
    message("On Debug Build")
    add_cxxflag("-O0")
    add_cxxflag("-g3")
    add_definitions(-D_DEBUG)
else()
    #Release
    message("On Release Build")
    add_cxxflag("-O3")
    add_definitions(-D_NDEBUG)
endif()

#Set c++1
add_cxxflag("-std=c++14")

ADD_EXECUTABLE(universe
  src/main.cpp
  src/Simulator.cpp
  src/util.cpp)

TARGET_LINK_LIBRARIES (universe
   ${OPENGL_LIBRARIES}
   ${GLEW_LIBRARY}
   ${OpenCL_LIBRARY}
   ${GLFW3_LIBRARY}
)<commit_msg>build: add some warnings<commit_after>CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
project(universe)

FIND_PACKAGE(OpenCL)
FIND_PACKAGE(OpenGL)
FIND_PACKAGE(GLEW)
FIND_PACKAGE(glm)
FIND_PACKAGE(glfw3)

INCLUDE_DIRECTORIES( 
    ${OPENGL_INCLUDE_DIR}
    ${GLEW_INCLUDE_PATH}
    ${GLFW3_INCLUDE_PATH}
    ${GLM_INCLUDE_PATH}
)

function(add_cxxflag FLAG)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAG}" PARENT_SCOPE)
endfunction(add_cxxflag)

if(CMAKE_BUILD_TYPE STREQUAL Debug)
    #Debug
    message("On Debug Build")
    add_cxxflag("-O0")
    add_cxxflag("-g3")
    add_definitions(-D_DEBUG)
else()
    #Release
    message("On Release Build")
    add_cxxflag("-O3")
    add_definitions(-D_NDEBUG)
endif()

#Set c++1
add_cxxflag("-std=c++14")

# add some warnings
add_cxxflag("-Wall")
add_cxxflag("-Wextra")
add_cxxflag("-Wuninitialized")
add_cxxflag("-Wold-style-cast")
add_cxxflag("-Woverloaded-virtual")
add_cxxflag("-Wformat=2")
add_cxxflag("-Wundef")
add_cxxflag("-Wpointer-arith")
add_cxxflag("-Wcast-qual")
add_cxxflag("-Wlogical-op")
add_cxxflag("-Woverflow")
add_cxxflag("-Wmissing-declarations")
add_cxxflag("-Wredundant-decls")

ADD_EXECUTABLE(universe
  src/main.cpp
  src/Simulator.cpp
  src/util.cpp)

TARGET_LINK_LIBRARIES (universe
   ${OPENGL_LIBRARIES}
   ${GLEW_LIBRARY}
   ${OpenCL_LIBRARY}
   ${GLFW3_LIBRARY}
)
{'fraction_non_alphanumeric': 0.13670661340434975, 'fraction_numerical': 0.010208610741233911, 'mean_word_length': 5.768768768768769, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6560628', 'n_tokens_mistral': 1000, 'n_tokens_neox': 962, 'n_words': 121}