Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2018-06-20 11:47:07 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2018-06-20 11:47:07 +0300
commitad941bdb9efdae75a872129fd5c834e8554d5412 (patch)
tree5423f1347e4e36129f60edc6989ed5309705b557 /CMakeLists.txt
parentf141a3a53fe44c343d8599112f38830016e45044 (diff)
Fix example targets not existing if doxygen not installed in cmake.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt22
1 files changed, 12 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd9a94d6..66405cc6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -168,17 +168,19 @@ foreach(lib afio_sl afio_dl)
target_compile_definitions(${lib} INTERFACE AFIO_HEADERS_ONLY=0)
target_compile_definitions(${lib} PRIVATE AFIO_SOURCE=1)
endforeach()
-set(compiler_has_cxx_17 0)
-foreach(feature ${CMAKE_CXX_COMPILE_FEATURES})
- if(feature STREQUAL "cxx_std_17")
- set(compiler_has_cxx_17 1)
+if(TARGET afio-example_single-header)
+ set(compiler_has_cxx_17 0)
+ foreach(feature ${CMAKE_CXX_COMPILE_FEATURES})
+ if(feature STREQUAL "cxx_std_17")
+ set(compiler_has_cxx_17 1)
+ endif()
+ endforeach()
+ # The single header test requires C++ 17
+ if(compiler_has_cxx_17)
+ target_compile_features(afio-example_single-header PRIVATE cxx_std_17)
+ else()
+ set_target_properties(afio-example_single-header PROPERTIES EXCLUDE_FROM_ALL ON EXCLUDE_FROM_DEFAULT_BUILD ON)
endif()
-endforeach()
-# The single header test requires C++ 17
-if(compiler_has_cxx_17)
- target_compile_features(afio-example_single-header PRIVATE cxx_std_17)
-else()
- set_target_properties(afio-example_single-header PROPERTIES EXCLUDE_FROM_ALL ON EXCLUDE_FROM_DEFAULT_BUILD ON)
endif()
# For all possible configurations of this library, add each test