mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
* Separate find_by_extension and find_by_filename find_by_extension now takes a path as argument and not only the file extension. Currently only find_by_extension is used as a strategy. * Add find_by_filename as first strategy
29 lines
811 B
CMake
29 lines
811 B
CMake
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
|
|
|
project("To do list")
|
|
|
|
enable_testing()
|
|
|
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR
|
|
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
set(warnings "-Wall -Wextra -Werror")
|
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
|
set(warnings "/W4 /WX /EHsc")
|
|
endif()
|
|
|
|
set(optimize "-O2")
|
|
|
|
if (NOT CONFIGURED_ONCE)
|
|
set(CMAKE_CXX_FLAGS "${warnings} ${optimize}"
|
|
CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
|
set(CMAKE_C_FLAGS "${warnings} ${optimize}"
|
|
CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
|
endif()
|
|
|
|
|
|
add_executable(toDo main.cpp ToDo.cpp)
|
|
|
|
add_test(toDoTest toDo)
|
|
|
|
set(CONFIGURED_ONCE TRUE CACHE INTERNAL
|
|
"A flag showing that CMake has configured at least once.") |