Skip to content
Snippets Groups Projects
Commit 5b8232d9 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[CMake] Rename FindCXX*.cmake and FindSharedPtr.cmake.

They do not find a package but check for a feature.
This avoids false warnings about not found packages.
Merged FindCXX11Conditional.cmake and FindCXX11Features.cmake.
parent 2be3467b
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@ set(modules
AddGMPFlags.cmake
AddMETISFlags.cmake
AddParMETISFlags.cmake
CheckCXX11Features.cmake
CheckSharedPtr.cmake
DuneBoost.cmake
DuneCommonMacros.cmake
DuneCxaDemangle.cmake
......@@ -14,14 +16,11 @@ set(modules
DuneTestMacros.cmake
DuneTests.cmake
FindBoostFusion.cmake
FindCXX11Conditional.cmake
FindCXX11Features.cmake
FindGMP.cmake
FindInkscape.cmake
FindMETIS.cmake
FindMProtect.cmake
FindParMETIS.cmake
FindSharedPtr.cmake
Headercheck.cmake
LanguageSupport.cmake
UseInkscape.cmake
......
......@@ -14,6 +14,7 @@
# HAVE_VARIADIC_TEMPLATES True if variadic templates are supprt
# HAVE_VARIADIC_CONSTRUCTOR_SFINAE True if variadic constructor sfinae is supported
# HAVE_RVALUE_REFERENCES True if rvalue references are supported
# HAVE_STD_CONDITIONAL True if std::conditional is supported
include(CMakePushCheckState)
cmake_push_check_state()
......@@ -288,4 +289,15 @@ CHECK_CXX_SOURCE_COMPILES("
}
" HAVE_RVALUE_REFERENCES
)
# std::conditional
check_cxx_source_compiles("
#include <type_traits>
int main(void){
return std::conditional<true,std::integral_constant<int,0>,void>::type::value;
}
" HAVE_STD_CONDITIONAL
)
cmake_pop_check_state()
......@@ -8,7 +8,7 @@
include(DuneStreams)
dune_set_minimal_debug_level()
find_package(SharedPtr)
include(CheckSharedPtr)
if(Fortran_Works)
# search for lapack
find_package(LAPACK)
......
......@@ -423,8 +423,7 @@ macro(dune_project)
endif(DUNE_USE_ONLY_STATIC_LIBS)
# set required compiler flags for C++11 (former C++0x)
find_package(CXX11Features)
find_package(CXX11Conditional)
include(CheckCXX11Features)
include(DuneCxaDemangle)
......
# Module that checks whether the compiler supports
# C++11 std::conditional.
#
# Sets the following variable:
# HAVE_STD_CONDITIONAL
#
# perform tests
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("
#include <type_traits>
int main(void){
return std::conditional<true,std::integral_constant<int,0>,void>::type::value;
}"
HAVE_STD_CONDITIONAL)
MODULES = DuneBoost.cmake \
MODULES = \
CheckCXX11Features.cmake \
CheckSharedPtr.cmake \
DuneBoost.cmake \
DuneCommonMacros.cmake \
DuneCxaDemangle.cmake \
DuneDoc.cmake \
......@@ -10,14 +13,11 @@ MODULES = DuneBoost.cmake \
DuneTestMacros.cmake \
DuneTests.cmake \
FindBoostFusion.cmake \
FindCXX11Conditional.cmake \
FindCXX11Features.cmake \
FindGMP.cmake \
FindInkscape.cmake \
FindMETIS.cmake \
FindMProtect.cmake \
FindParMETIS.cmake \
FindSharedPtr.cmake \
Headercheck.cmake \
LanguageSupport.cmake \
UseLATEX.cmake
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment