From 2b635a500e8844e5788d8178d13887c2b5ace640 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Thu, 14 Apr 2016 16:58:56 +0200 Subject: Fix c++11 flag when required on non-debian-based systems (bzr r14844) --- CMakeScripts/Modules/FindSigC++.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'CMakeScripts/Modules') diff --git a/CMakeScripts/Modules/FindSigC++.cmake b/CMakeScripts/Modules/FindSigC++.cmake index 8046410b5..14cbf47f7 100644 --- a/CMakeScripts/Modules/FindSigC++.cmake +++ b/CMakeScripts/Modules/FindSigC++.cmake @@ -106,10 +106,12 @@ endif (SIGC++_LIBRARIES AND SIGC++_INCLUDE_DIRS) # https://bugs.launchpad.net/inkscape/+bug/1488079 macro (sigcpp_compile extra_cppflags) + set(sigcpp_compile_output "") try_compile(SIGCPP_COMPILES_FINE "${CMAKE_BINARY_DIR}/sigcpp-bindir" SOURCES "${CMAKE_SOURCE_DIR}/CMakeScripts/Modules/sigcpp_test.cpp" COMPILE_DEFINITIONS ${_SIGC++_CFLAGS} ${extra_cppflags} - LINK_LIBRARIES ${SIGC++_LIBRARIES}) + LINK_LIBRARIES ${SIGC++_LIBRARIES} + OUTPUT_VARIABLE sigcpp_compile_output) endmacro() @@ -120,7 +122,7 @@ if (NOT "${SIGCPP_COMPILES_FINE}") if ("${SIGCPP_COMPILES_FINE}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${cppflag}") else() - message(FATAL_ERROR "Could not compile against SIGC++") + message(FATAL_ERROR "Could not compile against SIGC++ - output is <<${sigcpp_compile_output}>>") endif() endif() -- cgit v1.2.3