<NME> CMakeLists.txt
<BEF> cmake_minimum_required(VERSION 3.0.2)
project("Lily" C)

if(MSVC)
    string(REPLACE "/W3" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
    add_definitions(/wd4201)
    add_definitions(/wd4204)
    add_definitions(/wd4214)
    add_definitions(/MP)
    set(CMAKE_CTEST_COMMAND copy lily.exe ..)
else()
    set(CMAKE_CTEST_COMMAND cp lily ..)
    if(DEBUG)
        set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} -g3")
    else()
        set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} -O2")
    endif(DEBUG)

    set(CMAKE_C_FLAGS          "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-implicit-fallthrough -Wsign-compare -Wshadow")

    if(WITH_COVERAGE)
        set(CMAKE_C_FLAGS      "${CMAKE_C_FLAGS} -O0 -fprofile-arcs -ftest-coverage")
    endif(WITH_COVERAGE)
endif()

set(LIBRARY_OUTPUT_PATH    "${PROJECT_BINARY_DIR}/lib")
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}")

set(LILY_MAJOR             "2")
set(LILY_MINOR             "0")

# BSD libc includes the dl* functions and there's no libdl on them.
# Unfortunately, CMake doesn't seem to distinguish *BSD from the other *nixen.
STRING(REGEX MATCH "BSD" IS_BSD ${CMAKE_SYSTEM_NAME})

if(IS_BSD OR MINGW OR MSVC OR APPLE)
    set(LILY_NEED_DL 0)
else()
    set(LILY_NEED_DL 1)
endif()

# Windows doesn't have a math library to link against.

if(WIN32)
    set(LILY_NEED_M 0)
else()
    add_subdirectory(sandbox)
endif(WITH_SANDBOX)

set(TEST_COMMAND cd .. && python pre-commit-hook.py --verbose)
add_custom_target(check ${CMAKE_CTEST_COMMAND}
  COMMAND ${TEST_COMMAND}
  DEPENDS lily VERBATIM)
set(TEST_COMMAND cd .. && ./pre-commit-tests)
add_custom_target(check ${CMAKE_CTEST_COMMAND}
  COMMAND ${TEST_COMMAND}
  DEPENDS lily VERBATIM)

<MSG> Merge pull request #326 from jonathonf/patch-1

Fix remaining reference to old Python tests
<DFF> @@ -47,7 +47,7 @@ if(WITH_SANDBOX)
     add_subdirectory(sandbox)
 endif(WITH_SANDBOX)
 
-set(TEST_COMMAND cd .. && python pre-commit-hook.py --verbose)
+set(TEST_COMMAND cd .. && ./pre-commit-tests)
 add_custom_target(check ${CMAKE_CTEST_COMMAND}
   COMMAND ${TEST_COMMAND}
   DEPENDS lily VERBATIM)

{'addition_count': 1, 'commit_subject': 'Merge pull request #326 from jonathonf/patch-1', 'deletion_count': 1, 'file_extension': '.txt', 'lang': 'txt', 'license': 'mit', 'repo_name': 'FascinatedBox/lily'}