-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from frboyer/feature/msvc_compatibility
All tests now pass under latest MSVC
- Loading branch information
Showing
21 changed files
with
209 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Note that some examples currently use boost.optional which we do no not search for in this file. | ||
# You might have to use the "keep going" option to continue building on errors if boost.optional is not in the include path. | ||
# For example, building with MSVC (from an examples/buildMsvc directory): | ||
# set CXX=cl.exe | ||
# cmake .. -G Ninja | ||
# cmake --build . -- -k99 | ||
|
||
cmake_minimum_required(VERSION 3.8) | ||
project(cppitertools_examples CXX) | ||
set (CMAKE_CXX_STANDARD 17) | ||
|
||
include_directories( | ||
.. | ||
) | ||
|
||
file(GLOB _examples_files "*_examples.cpp") | ||
|
||
foreach(_file_cpp ${_examples_files}) | ||
get_filename_component(_name_cpp "${_file_cpp}" NAME) | ||
get_filename_component(_name_without_extension "${_name_cpp}" NAME_WE) | ||
add_executable(${_name_without_extension} ${_file_cpp}) | ||
endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Note that some examples currently use boost.optional which we do no not search for in this file. | ||
# You might have to use the "keep going" option to continue building on errors if boost.optional is not in the include path. | ||
# For example, building with MSVC (from a test/buildMsvc directory): | ||
# set CXX=cl.exe | ||
# cmake .. -G Ninja | ||
# cmake --build . -- -k99 | ||
|
||
cmake_minimum_required(VERSION 3.8) | ||
project(cppitertools_tests CXX) | ||
set (CMAKE_CXX_STANDARD 17) | ||
|
||
include_directories( | ||
.. | ||
) | ||
|
||
include(CheckIncludeFileCXX) | ||
set(CMAKE_REQUIRED_INCLUDES ${PROJECT_SOURCE_DIR}) | ||
CHECK_INCLUDE_FILE_CXX(catch.hpp _has_catch) | ||
if(NOT "${_has_catch}") | ||
message("WARNING: catch.hpp not found, run ./download_catch.sh from test/ directory first") | ||
endif() | ||
|
||
file(GLOB test_sources RELATIVE ${PROJECT_SOURCE_DIR} "test_*.cpp") | ||
list(REMOVE_ITEM test_sources test_main.cpp) | ||
add_library(test_main OBJECT test_main.cpp) | ||
|
||
foreach(_source_cpp ${test_sources}) | ||
get_filename_component(_name_without_extension "${_source_cpp}" NAME_WE) | ||
add_executable(${_name_without_extension} ${_source_cpp} $<TARGET_OBJECTS:test_main>) | ||
endforeach() | ||
|
||
add_executable(test_all ${test_sources} $<TARGET_OBJECTS:test_main>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.