Skip to content

Commit 83bc744

Browse files
committed
Remove pimpl example from compilation with MSVC 12 (VS2013) and earlier
1 parent caa0fbf commit 83bc744

File tree

2 files changed

+8
-124
lines changed

2 files changed

+8
-124
lines changed

example/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@ cmake_minimum_required( VERSION 3.0 )
1010
project( examples )
1111

1212
set( TARGETS
13-
01-pimpl
1413
02-tree
1514
)
1615

16+
if( NOT MSVC OR NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.00 )
17+
set( TARGETS
18+
01-pimpl
19+
${TARGETS}
20+
)
21+
endif()
22+
1723
set( HDRDIR ${PROJECT_SOURCE_DIR}/../include/nonstd )
1824

1925
foreach( target ${TARGETS} )
@@ -22,7 +28,7 @@ endforeach()
2228

2329
# set compiler options:
2430

25-
if( CMAKE_CXX_COMPILER_ID MATCHES MSVC )
31+
if( MSVC )
2632
foreach( target ${TARGETS} )
2733
target_compile_options( ${target} PUBLIC -W3 -EHsc )
2834
endforeach()

test/CMakeLists.txt

Lines changed: 0 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -182,125 +182,3 @@ else()
182182
endif()
183183

184184
# end of file
185-
186-
187-
188-
189-
190-
#cmake_minimum_required( VERSION 2.8.12 )
191-
#
192-
#project( test )
193-
#
194-
#option( VALUE_PTR_LITE_COLOURISE_TEST "Colourise test output" OFF )
195-
#
196-
#if ( VALUE_PTR_LITE_COLOURISE_TEST )
197-
# add_compile_options( -Dlest_FEATURE_COLOURISE=1 )
198-
#endif()
199-
#
200-
#set( SOURCES value_ptr-lite.t.cpp value_ptr.t.cpp )
201-
#
202-
#add_executable( value_ptr-lite.t ${SOURCES} )
203-
#
204-
#set( HAS_STD_FLAGS FALSE )
205-
#set( HAS_CPP11_FLAG FALSE )
206-
#set( HAS_CPP14_FLAG FALSE )
207-
#set( HAS_CPP17_FLAG FALSE )
208-
#
209-
#if( MSVC )
210-
# add_compile_options( -W3 -EHsc -D_SCL_SECURE_NO_WARNINGS )
211-
#
212-
#elseif( CMAKE_CXX_COMPILER_ID MATCHES GNU OR
213-
# CMAKE_CXX_COMPILER_ID MATCHES Clang )
214-
#
215-
# set( HAS_STD_FLAGS TRUE )
216-
#
217-
# # GNU: available -std flags depends on version
218-
# if( CMAKE_CXX_COMPILER_ID MATCHES GNU )
219-
# execute_process(
220-
# COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
221-
#
222-
# if( GCC_VERSION )
223-
# if( NOT GCC_VERSION VERSION_LESS 4.8.0 )
224-
# set( HAS_CPP11_FLAG TRUE )
225-
# endif()
226-
# if( NOT GCC_VERSION VERSION_LESS 4.9.2 )
227-
# set( HAS_CPP14_FLAG TRUE )
228-
# endif()
229-
# if( NOT GCC_VERSION VERSION_LESS 5.0.0 )
230-
# set( HAS_CPP17_FLAG TRUE )
231-
# endif()
232-
# endif()
233-
# endif()
234-
#
235-
# # Clang: available -std flags depends on version
236-
# if( CMAKE_CXX_COMPILER_ID MATCHES Clang )
237-
# execute_process(
238-
# COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE CLANG_VERSION)
239-
#
240-
# if( CLANG_VERSION )
241-
# if( NOT CLANG_VERSION VERSION_LESS 3.3.0 )
242-
# set( HAS_CPP11_FLAG TRUE )
243-
# endif()
244-
## clang 3.5.0 -std=c++14: no member named 'gets' in the global namespace: using ::gets;
245-
## if( NOT CLANG_VERSION VERSION_LESS 3.4.0 )
246-
## set( HAS_CPP14_FLAG TRUE )
247-
## endif()
248-
## if( NOT CLANG_VERSION VERSION_LESS 3.5.0 )
249-
## set( HAS_CPP17_FLAG TRUE )
250-
## endif()
251-
# endif()
252-
# endif()
253-
#
254-
# add_compile_options( -Wall -Wno-missing-braces -Wno-unnamed-type-template-args -fno-elide-constructors )
255-
#
256-
# add_executable( value_ptr-lite-cpp98.t ${SOURCES} )
257-
# target_compile_options( value_ptr-lite-cpp98.t PUBLIC -std=c++98 -Wno-unused-local-typedefs )
258-
#
259-
# add_executable( value_ptr-lite-cpp03.t ${SOURCES} )
260-
# target_compile_options( value_ptr-lite-cpp03.t PUBLIC -std=c++03 -Wno-unused-local-typedefs )
261-
#
262-
# if( HAS_CPP11_FLAG )
263-
# add_executable( value_ptr-lite-cpp11.t ${SOURCES} )
264-
# target_compile_options( value_ptr-lite-cpp11.t PUBLIC -std=c++11 )
265-
# endif()
266-
#
267-
# if( HAS_CPP14_FLAG )
268-
# add_executable( value_ptr-lite-cpp14.t ${SOURCES} )
269-
# target_compile_options( value_ptr-lite-cpp14.t PUBLIC -std=c++14 )
270-
# endif()
271-
#
272-
# if( HAS_CPP17_FLAG )
273-
# add_executable( value_ptr-lite-cpp17.t ${SOURCES} )
274-
# target_compile_options( value_ptr-lite-cpp17.t PUBLIC -std=c++17 )
275-
# endif()
276-
#
277-
#elseif( CMAKE_CXX_COMPILER_ID MATCHES Intel )
278-
## as is
279-
#else()
280-
## as is
281-
#endif()
282-
#
283-
## configure unit tests via CTest:
284-
#
285-
#enable_testing()
286-
#
287-
#if( NOT HAS_STD_FLAGS )
288-
# add_test( NAME test COMMAND value_ptr-lite.t --pass )
289-
#else()
290-
# add_test( NAME test-cpp98 COMMAND value_ptr-lite-cpp98.t )
291-
# add_test( NAME test-cpp03 COMMAND value_ptr-lite-cpp03.t )
292-
# if( HAS_CPP11_FLAG )
293-
# add_test( NAME test-cpp11 COMMAND value_ptr-lite-cpp11.t )
294-
# endif()
295-
# if( HAS_CPP14_FLAG )
296-
# add_test( NAME test-cpp14 COMMAND value_ptr-lite-cpp14.t )
297-
# endif()
298-
# if( HAS_CPP17_FLAG )
299-
# add_test( NAME test-cpp17 COMMAND value_ptr-lite-cpp17.t )
300-
# endif()
301-
#endif()
302-
#add_test( NAME list_version COMMAND value_ptr-lite.t --version )
303-
#add_test( NAME list_tags COMMAND value_ptr-lite.t --list-tags )
304-
#add_test( NAME list_tests COMMAND value_ptr-lite.t --list-tests )
305-
#
306-
## end of file

0 commit comments

Comments
 (0)