cxx: print which c++fs libraries are being attempted

This commit is contained in:
Danny Robson 2019-02-02 15:01:27 +11:00
parent b4db7136eb
commit 23b5facb81

View File

@ -43,6 +43,7 @@ append_compile_flag ("-stdlib=libc++")
if (NOT DEFINED __nc_cxx_stdcxxfs) if (NOT DEFINED __nc_cxx_stdcxxfs)
foreach(lib "" "c++fs" "c++experimental" "stdc++fs") foreach(lib "" "c++fs" "c++experimental" "stdc++fs")
if (NOT __nc_cxx_stdcxxfs) if (NOT __nc_cxx_stdcxxfs)
message (STATUS "Trying c++fs library '${lib}'")
try_compile( try_compile(
__nc_cxx_stdcxxfs ${CMAKE_CURRENT_BINARY_DIR} __nc_cxx_stdcxxfs ${CMAKE_CURRENT_BINARY_DIR}
SOURCES SOURCES
@ -57,8 +58,10 @@ if (NOT DEFINED __nc_cxx_stdcxxfs)
endforeach() endforeach()
if (NOT __nc_cxx_stdcxxfs) if (NOT __nc_cxx_stdcxxfs)
set (__nc_cxx_stdcxxfs "") message (FATAL_ERROR "Could not locate the required c++fs library")
endif () endif ()
message (STATUS "Using c++fs library ${__nc_cxx_stdcxxfs}")
endif () endif ()
set(NC_CXX_STDCXXFS ${__nc_cxx_stdcxxfs}) set(NC_CXX_STDCXXFS ${__nc_cxx_stdcxxfs})