Build fix for Windows

fixes #10824
This commit is contained in:
Gunnar Beutner 2016-01-11 14:28:58 +01:00
parent 1bf27011df
commit 82961d8977
1 changed files with 9 additions and 7 deletions

View File

@ -229,15 +229,17 @@ if(UNIX)
endif()
endif()
set(CXX_FEATURE_OVERRIDE OFF)
if(NOT MSVC)
set(CXX_FEATURE_OVERRIDE OFF)
if(_ICINGA2_CXX11)
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("class Base { public: virtual void test(void) { } }; class Derived : public Base { virtual void test(void) override { } }; int main(){}" CXX_FEATURE_OVERRIDE)
endif()
if(_ICINGA2_CXX11)
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("class Base { public: virtual void test(void) { } }; class Derived : public Base { virtual void test(void) override { } }; int main(){}" CXX_FEATURE_OVERRIDE)
endif()
if(NOT CXX_FEATURE_OVERRIDE)
add_definitions("-Doverride=")
if(NOT CXX_FEATURE_OVERRIDE)
add_definitions("-Doverride=")
endif()
endif()
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ESCAPE_QUOTES)