File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,21 @@ if (GECODE_DISABLE_WARNINGS)
55
55
endif ()
56
56
endif ()
57
57
58
+ if ( (CMAKE_VERSION VERSION_GREATER 3.1.0) OR (CMAKE_VERSION VERSION_EQUAL 3.1.0) )
59
+ set (CMAKE_CXX_STANDARD 11)
60
+ endif ()
61
+ check_cxx_compiler_flag(-std=c++11 HAS_STDCPP11)
62
+ if (HAS_STDCPP11)
63
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
64
+ else ()
65
+ check_cxx_compiler_flag(-std=c++0x HAS_STDCPP0X)
66
+ if (HAS_STDCPP0X)
67
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" )
68
+ else ()
69
+ message ("Warning: Initial check for C++11 unsuccessful. This is fine if HAS_CPP11 test below succeeds." )
70
+ endif ()
71
+ endif ()
72
+
58
73
# The following part of config.h is hard to derive from configure.ac.
59
74
file (READ gecode/support/config.hpp.in CONFIG)
60
75
string (REGEX REPLACE "^/\\ *([^*]|\\ *[^/])*\\ */" "" CONFIG ${CONFIG} )
@@ -387,6 +402,7 @@ if (GECODE_HAS_QT)
387
402
if (Qt5_FOUND)
388
403
qt5_use_modules(gecodegist Widgets Gui PrintSupport)
389
404
qt5_use_modules(gecodeflatzinc Core)
405
+ target_link_libraries (gecodeflatzinc gecodegist)
390
406
else ()
391
407
target_link_libraries (gecodegist ${QT_LIBRARIES} )
392
408
target_link_libraries (gecodeflatzinc gecodegist ${QT_LIBRARIES} )
You can’t perform that action at this time.
0 commit comments