From 3d8469eafe59bc3fef3052bad375704614023e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81oskot?= Date: Fri, 22 Feb 2019 22:02:25 +0100 Subject: [PATCH] Require BOOST_GIL_USE_CONCEPT_CHECK when compiling test/*/concepts.cpp Add BOOST_GIL_USE_CONCEPT_CHECK define to CMakeLists.txt files. Rename channel_concepts.cpp to concepts.cpp. --- test/channel/CMakeLists.txt | 1 + test/channel/{channel_concepts.cpp => concepts.cpp} | 0 test/image/CMakeLists.txt | 1 + test/image/concepts.cpp | 3 +++ test/image_view/CMakeLists.txt | 1 + test/image_view/concepts.cpp | 3 +++ test/pixel/CMakeLists.txt | 1 + test/pixel/concepts.cpp | 3 +++ test/point/CMakeLists.txt | 1 + test/point/concepts.cpp | 3 +++ 10 files changed, 17 insertions(+) rename test/channel/{channel_concepts.cpp => concepts.cpp} (100%) diff --git a/test/channel/CMakeLists.txt b/test/channel/CMakeLists.txt index 74b2fcfb1..f31494447 100644 --- a/test/channel/CMakeLists.txt +++ b/test/channel/CMakeLists.txt @@ -24,6 +24,7 @@ foreach(_name gil_compile_options gil_include_directories gil_dependencies) + target_compile_definitions(${_target} PRIVATE BOOST_GIL_USE_CONCEPT_CHECK) add_test(test.core.${_name} ${_target}) unset(_name) diff --git a/test/channel/channel_concepts.cpp b/test/channel/concepts.cpp similarity index 100% rename from test/channel/channel_concepts.cpp rename to test/channel/concepts.cpp diff --git a/test/image/CMakeLists.txt b/test/image/CMakeLists.txt index e660b689c..1d097f0b2 100644 --- a/test/image/CMakeLists.txt +++ b/test/image/CMakeLists.txt @@ -16,6 +16,7 @@ foreach(_name gil_compile_options gil_include_directories gil_dependencies) + target_compile_definitions(${_target} PRIVATE BOOST_GIL_USE_CONCEPT_CHECK) add_test(test.core.${_name} ${_target}) unset(_name) diff --git a/test/image/concepts.cpp b/test/image/concepts.cpp index 1565feb9d..8ce674c8f 100644 --- a/test/image/concepts.cpp +++ b/test/image/concepts.cpp @@ -5,6 +5,9 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // +#ifndef BOOST_GIL_USE_CONCEPT_CHECK +#error Compile with BOOST_GIL_USE_CONCEPT_CHECK defined +#endif #include #include diff --git a/test/image_view/CMakeLists.txt b/test/image_view/CMakeLists.txt index cda185732..419418896 100644 --- a/test/image_view/CMakeLists.txt +++ b/test/image_view/CMakeLists.txt @@ -24,6 +24,7 @@ foreach(_name gil_compile_options gil_include_directories gil_dependencies) + target_compile_definitions(${_target} PRIVATE BOOST_GIL_USE_CONCEPT_CHECK) add_test(test.core.${_name} ${_target}) unset(_name) diff --git a/test/image_view/concepts.cpp b/test/image_view/concepts.cpp index 34ed7e067..09415d974 100644 --- a/test/image_view/concepts.cpp +++ b/test/image_view/concepts.cpp @@ -5,6 +5,9 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // +#ifndef BOOST_GIL_USE_CONCEPT_CHECK +#error Compile with BOOST_GIL_USE_CONCEPT_CHECK defined +#endif // FIXME: There are missing headers internally, leading to incomplete types #if 0 #include diff --git a/test/pixel/CMakeLists.txt b/test/pixel/CMakeLists.txt index 5b00949ba..a5686dfbd 100644 --- a/test/pixel/CMakeLists.txt +++ b/test/pixel/CMakeLists.txt @@ -16,6 +16,7 @@ foreach(_name gil_compile_options gil_include_directories gil_dependencies) + target_compile_definitions(${_target} PRIVATE BOOST_GIL_USE_CONCEPT_CHECK) add_test(test.core.${_name} ${_target}) unset(_name) diff --git a/test/pixel/concepts.cpp b/test/pixel/concepts.cpp index a4df179bf..ede4341f8 100644 --- a/test/pixel/concepts.cpp +++ b/test/pixel/concepts.cpp @@ -5,6 +5,9 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // +#ifndef BOOST_GIL_USE_CONCEPT_CHECK +#error Compile with BOOST_GIL_USE_CONCEPT_CHECK defined +#endif #include #include diff --git a/test/point/CMakeLists.txt b/test/point/CMakeLists.txt index dc410b6ff..0358323a4 100644 --- a/test/point/CMakeLists.txt +++ b/test/point/CMakeLists.txt @@ -17,6 +17,7 @@ foreach(_name gil_compile_options gil_include_directories gil_dependencies) + target_compile_definitions(${_target} PRIVATE BOOST_GIL_USE_CONCEPT_CHECK) add_test(test.core.${_name} ${_target}) unset(_name) diff --git a/test/point/concepts.cpp b/test/point/concepts.cpp index 171fe7729..b6a40a83a 100644 --- a/test/point/concepts.cpp +++ b/test/point/concepts.cpp @@ -5,6 +5,9 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // +#ifndef BOOST_GIL_USE_CONCEPT_CHECK +#error Compile with BOOST_GIL_USE_CONCEPT_CHECK defined +#endif #include #include