mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Use filenames as a definitive answer (#2006)
* 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
This commit is contained in:
committed by
Brandon Black
parent
9d8392dab8
commit
9b941a34f0
29
test/fixtures/CMake/CMakeLists.txt
vendored
Normal file
29
test/fixtures/CMake/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
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.")
|
||||
Reference in New Issue
Block a user