@@ -63,7 +63,7 @@ endif ()
63
63
# ============
64
64
65
65
set (xtl_REQUIRED_VERSION 0.7.0)
66
- set (xeus_REQUIRED_VERSION 3.0.5 )
66
+ set (xeus_REQUIRED_VERSION 3.2.0 )
67
67
68
68
if (NOT TARGET xtl)
69
69
find_package (xtl ${xtl_REQUIRED_VERSION} REQUIRED)
@@ -74,28 +74,6 @@ endif ()
74
74
75
75
find_package (nelson)
76
76
77
- # Flags
78
- # =====
79
- include (CheckCXXCompilerFlag)
80
-
81
- if (MSVC )
82
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251 /wd4141" )
83
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4018 /wd4267 /wd4715 /wd4146 /wd4129" )
84
- endif ()
85
-
86
- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
87
- if (NOT EMSCRIPTEN)
88
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-parameter -Wextra -Wreorder" )
89
- endif ()
90
-
91
- CHECK_CXX_COMPILER_FLAG("-std=c++17" HAS_CPP_17_FLAG)
92
- if (HAS_CPP_17_FLAG)
93
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17" )
94
- else ()
95
- message (FATAL_ERROR "Unsupported compiler -- xeus requires C++17 support!" )
96
- endif ()
97
- endif ()
98
-
99
77
# Source files
100
78
# ============
101
79
@@ -123,6 +101,7 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
123
101
set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX} /lib; ${CMAKE_INSTALL_PREFIX} /${CMAKE_INSTALL_LIBDIR} " )
124
102
125
103
macro (xnelson_set_common_options target_name)
104
+ target_compile_features (${target_name} PRIVATE cxx_std_17)
126
105
if (MSVC )
127
106
target_compile_options (${target_name} PUBLIC /wd4251 /wd4141)
128
107
target_compile_options (${target_name} PUBLIC /wd4018 /wd4267 /wd4715 /wd4146 /wd4129)
@@ -133,14 +112,6 @@ macro(xnelson_set_common_options target_name)
133
112
CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
134
113
135
114
target_compile_options (${target_name} PUBLIC -Wunused-parameter -Wextra -Wreorder)
136
-
137
- # C++17 flag
138
- CHECK_CXX_COMPILER_FLAG("-std=c++17" HAS_CPP_17_FLAG)
139
- if (HAS_CPP_17_FLAG)
140
- target_compile_features (${target_name} PRIVATE cxx_std_17)
141
- else ()
142
- message (FATAL_ERROR "Unsupported compiler -- xeus-nelson requires C++17 support!" )
143
- endif ()
144
115
endif ()
145
116
146
117
if (APPLE )
@@ -264,7 +235,6 @@ endif ()
264
235
if (XEUS_NELSON_BUILD_EXECUTABLE)
265
236
find_package (xeus-zmq 1.0.2 REQUIRED)
266
237
add_executable (xnelson ${XEUS_NELSON_MAIN_SRC} )
267
- target_compile_features (xnelson PRIVATE cxx_std_17)
268
238
xnelson_set_common_options(xnelson)
269
239
xnelson_set_kernel_options(xnelson)
270
240
target_link_libraries (xnelson PRIVATE xeus-zmq)
0 commit comments