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:
Paul Chaignon
2016-12-12 21:34:33 +01:00
committed by Brandon Black
parent 9d8392dab8
commit 9b941a34f0
10 changed files with 435 additions and 29 deletions

29
test/fixtures/CMake/CMakeLists.txt vendored Normal file
View 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.")