diff options
63 files changed, 1056 insertions, 756 deletions
diff --git a/Help/release/3.14.rst b/Help/release/3.14.rst index 5038a75..f2a91c6 100644 --- a/Help/release/3.14.rst +++ b/Help/release/3.14.rst @@ -377,3 +377,17 @@ Other Changes * CMake no longer issues a warning if a target listed in an :command:`install(TARGETS)` command has its :prop_tgt:`EXCLUDE_FROM_ALL` property set to true. + +Updates +======= + +Changes made since CMake 3.14.0 include the following. + +3.14.1 +------ + +* The :module:`FindFontconfig` module added by 3.14.0 accidentally + used uppercase ``FONTCONFIG_*`` variable names that do not match + our conventions. 3.14.1 revises the module to use ``Fontconfig_*`` + variable names. This is incompatible with 3.14.0 but since the + module is new in the 3.14 series usage should not yet be widespread. diff --git a/Help/release/dev/allow-aliasing-unkown-import-targets.rst b/Help/release/dev/allow-aliasing-unkown-import-targets.rst new file mode 100644 index 0000000..aa5da0c --- /dev/null +++ b/Help/release/dev/allow-aliasing-unkown-import-targets.rst @@ -0,0 +1,5 @@ +allow-aliasing-unkown-import-targets +------------------------------------ + +* :command:`add_library` command ``ALIAS`` option learned to support + import libraries of the ``UNKNOWN`` type. diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index 113b520..490d659 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -111,10 +111,15 @@ elseif(CMAKE_CUDA_COMPILER_ID STREQUAL NVIDIA) if(_nvcc_libraries) # Remove variable assignments. string(REGEX REPLACE "#\\\$ *[^= ]+=[^\n]*\n" "" _nvcc_output "${_nvcc_output_orig}") + # Encode [] characters that break list expansion. + string(REPLACE "[" "{==={" _nvcc_output "${_nvcc_output}") + string(REPLACE "]" "}===}" _nvcc_output "${_nvcc_output}") # Split lines. string(REGEX REPLACE "\n+(#\\\$ )?" ";" _nvcc_output "${_nvcc_output}") foreach(line IN LISTS _nvcc_output) set(_nvcc_output_line "${line}") + string(REPLACE "{==={" "[" _nvcc_output_line "${_nvcc_output_line}") + string(REPLACE "}===}" "]" _nvcc_output_line "${_nvcc_output_line}") string(APPEND _nvcc_log " considering line: [${_nvcc_output_line}]\n") if("${_nvcc_output_line}" MATCHES "^ *nvlink") string(APPEND _nvcc_log " ignoring nvlink line\n") diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake index de1a332..ab22701 100644 --- a/Modules/CMakeFindDependencyMacro.cmake +++ b/Modules/CMakeFindDependencyMacro.cmake @@ -61,6 +61,5 @@ macro(find_dependency dep) endif() set(cmake_fd_required_arg) set(cmake_fd_quiet_arg) - set(cmake_fd_exact_arg) endif() endmacro() diff --git a/Modules/CMakeParseImplicitIncludeInfo.cmake b/Modules/CMakeParseImplicitIncludeInfo.cmake index 6d7732d..977debb 100644 --- a/Modules/CMakeParseImplicitIncludeInfo.cmake +++ b/Modules/CMakeParseImplicitIncludeInfo.cmake @@ -212,15 +212,27 @@ function(cmake_parse_implicit_include_info text lang dir_var log_var state_var) endif() endforeach() + set(implicit_dirs "") + foreach(d IN LISTS implicit_dirs_tmp) + if(IS_ABSOLUTE "${d}") + get_filename_component(dir "${d}" ABSOLUTE) + list(APPEND implicit_dirs "${dir}") + string(APPEND log " collapse include dir [${d}] ==> [${dir}]\n") + else() + string(APPEND log " skipping relative include dir [${d}]\n") + endif() + endforeach() + list(REMOVE_DUPLICATES implicit_dirs) + # Log results. if(state STREQUAL done) - string(APPEND log " implicit include dirs: [${implicit_dirs_tmp}]\n") + string(APPEND log " implicit include dirs: [${implicit_dirs}]\n") else() string(APPEND log " warn: unable to parse implicit include dirs!\n") endif() # Return results. - set(${dir_var} "${implicit_dirs_tmp}" PARENT_SCOPE) + set(${dir_var} "${implicit_dirs}" PARENT_SCOPE) set(${log_var} "${log}" PARENT_SCOPE) set(${state_var} "${state}" PARENT_SCOPE) diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index 8380977..42ef8c7 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -616,6 +616,12 @@ macro(cpack_ifw_configure_component_group grpname) set(_CPACK_IFWGRP_STR "\n# Configuration for IFW component group \"${grpname}\"\n") + foreach(_IFW_ARG_NAME ${_IFW_OPT}) + cpack_append_option_set_command( + CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_${_IFW_ARG_NAME} + _CPACK_IFWGRP_STR) + endforeach() + foreach(_IFW_ARG_NAME ${_IFW_ARGS}) cpack_append_string_variable_set_command( CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_${_IFW_ARG_NAME} diff --git a/Modules/Compiler/AppleClang-C.cmake b/Modules/Compiler/AppleClang-C.cmake index a48adec..2794f52 100644 --- a/Modules/Compiler/AppleClang-C.cmake +++ b/Modules/Compiler/AppleClang-C.cmake @@ -4,12 +4,15 @@ __compiler_clang(C) if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0) set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90") + set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") + set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") + set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON) endif() __compiler_check_default_language_standard(C 4.0 99) diff --git a/Modules/Compiler/CMakeCommonCompilerMacros.cmake b/Modules/Compiler/CMakeCommonCompilerMacros.cmake index ad464c7..9c62e10 100644 --- a/Modules/Compiler/CMakeCommonCompilerMacros.cmake +++ b/Modules/Compiler/CMakeCommonCompilerMacros.cmake @@ -65,13 +65,28 @@ endmacro() macro(cmake_record_c_compile_features) set(_result 0) if(_result EQUAL 0 AND DEFINED CMAKE_C11_STANDARD_COMPILE_OPTION) - _record_compiler_features_c(11) + if(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT) + _has_compiler_features_c(11) + else() + _record_compiler_features_c(11) + endif() + unset(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT) endif() if(_result EQUAL 0 AND DEFINED CMAKE_C99_STANDARD_COMPILE_OPTION) - _record_compiler_features_c(99) + if(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT) + _has_compiler_features_c(99) + else() + _record_compiler_features_c(99) + endif() + unset(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT) endif() if(_result EQUAL 0 AND DEFINED CMAKE_C90_STANDARD_COMPILE_OPTION) - _record_compiler_features_c(90) + if(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT) + _has_compiler_features_c(90) + else() + _record_compiler_features_c(90) + endif() + unset(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT) endif() endmacro() diff --git a/Modules/Compiler/Clang-C.cmake b/Modules/Compiler/Clang-C.cmake index a07ae40..ff51d30 100644 --- a/Modules/Compiler/Clang-C.cmake +++ b/Modules/Compiler/Clang-C.cmake @@ -10,12 +10,15 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) if(NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90") + set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") + set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") + set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON) else() # clang-cl doesn't have any of these set(CMAKE_C90_STANDARD_COMPILE_OPTION "") diff --git a/Modules/Compiler/Cray-C.cmake b/Modules/Compiler/Cray-C.cmake index d34154c..9340948 100644 --- a/Modules/Compiler/Cray-C.cmake +++ b/Modules/Compiler/Cray-C.cmake @@ -10,11 +10,14 @@ string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.1) set(CMAKE_C90_STANDARD_COMPILE_OPTION -h noc99,conform) set(CMAKE_C90_EXTENSION_COMPILE_OPTION -h noc99,gnu) + set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C99_STANDARD_COMPILE_OPTION -h c99,conform) set(CMAKE_C99_EXTENSION_COMPILE_OPTION -h c99,gnu) + set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON) if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.5) set(CMAKE_C11_STANDARD_COMPILE_OPTION -h std=c11,conform) set(CMAKE_C11_EXTENSION_COMPILE_OPTION -h std=c11,gnu) + set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON) endif () endif () diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake index f072c54..ca286b3 100644 --- a/Modules/Compiler/GNU-C.cmake +++ b/Modules/Compiler/GNU-C.cmake @@ -10,13 +10,16 @@ elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) endif() if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) + set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") + set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON) endif() if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7) set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") + set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON) elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6) set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c1x") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu1x") diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake index 4e4af29..e9e59a2 100644 --- a/Modules/Compiler/Intel-C.cmake +++ b/Modules/Compiler/Intel-C.cmake @@ -12,13 +12,16 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 16.0.0) set(CMAKE_C11_STANDARD_COMPILE_OPTION "-Qstd=c11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-Qstd=c11") + set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON) endif() if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0) set(CMAKE_C90_STANDARD_COMPILE_OPTION "-Qstd=c89") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-Qstd=c89") + set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C99_STANDARD_COMPILE_OPTION "-Qstd=c99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-Qstd=c99") + set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON) endif() else() @@ -26,13 +29,16 @@ else() if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0) set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") + set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON) endif() if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0) set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu89") + set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") + set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON) endif() endif() diff --git a/Modules/Compiler/PGI-C.cmake b/Modules/Compiler/PGI-C.cmake index 3b3848a..c39dbe5 100644 --- a/Modules/Compiler/PGI-C.cmake +++ b/Modules/Compiler/PGI-C.cmake @@ -6,11 +6,14 @@ string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG") if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.10) set(CMAKE_C90_STANDARD_COMPILE_OPTION -c89) set(CMAKE_C90_EXTENSION_COMPILE_OPTION -c89) + set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C99_STANDARD_COMPILE_OPTION -c99) set(CMAKE_C99_EXTENSION_COMPILE_OPTION -c99) + set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON) if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 15.3) set(CMAKE_C11_STANDARD_COMPILE_OPTION -c11) set(CMAKE_C11_EXTENSION_COMPILE_OPTION -c11) + set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON) endif () endif () diff --git a/Modules/Compiler/SunPro-C.cmake b/Modules/Compiler/SunPro-C.cmake index c4aba8e..7e962b8 100644 --- a/Modules/Compiler/SunPro-C.cmake +++ b/Modules/Compiler/SunPro-C.cmake @@ -39,10 +39,13 @@ set(CMAKE_C_LINKER_WRAPPER_FLAG_SEP ",") if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.13) set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=c89") + set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=c99") + set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=c11") + set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON) elseif (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.11) set(CMAKE_C90_STANDARD_COMPILE_OPTION "") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "") diff --git a/Modules/Compiler/XL-C.cmake b/Modules/Compiler/XL-C.cmake index 6fc9728..2077bda 100644 --- a/Modules/Compiler/XL-C.cmake +++ b/Modules/Compiler/XL-C.cmake @@ -9,11 +9,14 @@ string(APPEND CMAKE_C_FLAGS_INIT " -qthreaded") if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10.1) set(CMAKE_C90_STANDARD_COMPILE_OPTION "-qlanglvl=stdc89") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-qlanglvl=extc89") + set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C99_STANDARD_COMPILE_OPTION "-qlanglvl=stdc99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-qlanglvl=extc99") + set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON) if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.1) set(CMAKE_C11_STANDARD_COMPILE_OPTION "-qlanglvl=extc1x") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-qlanglvl=extc1x") + set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON) endif () endif() diff --git a/Modules/Compiler/XLClang-C.cmake b/Modules/Compiler/XLClang-C.cmake index 8e8fcf2..54c18a6 100644 --- a/Modules/Compiler/XLClang-C.cmake +++ b/Modules/Compiler/XLClang-C.cmake @@ -4,13 +4,16 @@ __compiler_xlclang(C) if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.1) set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89") set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu89") + set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") + set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_C11_STANDARD_COMPILE_OPTION "-qlanglvl=extc1x") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-qlanglvl=extc1x") if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.2) set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") + set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON) endif () endif() diff --git a/Modules/FindFontconfig.cmake b/Modules/FindFontconfig.cmake index 96e1e76..a6f0180 100644 --- a/Modules/FindFontconfig.cmake +++ b/Modules/FindFontconfig.cmake @@ -18,15 +18,15 @@ Result Variables This will define the following variables in your project: -``FONTCONFIG_FOUND`` +``Fontconfig_FOUND`` true if (the requested version of) Fontconfig is available. -``FONTCONFIG_VERSION`` +``Fontconfig_VERSION`` the version of Fontconfig. -``FONTCONFIG_LIBRARIES`` +``Fontconfig_LIBRARIES`` the libraries to link against to use Fontconfig. -``FONTCONFIG_INCLUDE_DIRS`` +``Fontconfig_INCLUDE_DIRS`` where to find the Fontconfig headers. -``FONTCONFIG_COMPILE_OPTIONS`` +``Fontconfig_COMPILE_OPTIONS`` this should be passed to target_compile_options(), if the target is not used for linking @@ -37,10 +37,10 @@ This will define the following variables in your project: # in the FIND_PATH() and FIND_LIBRARY() calls find_package(PkgConfig QUIET) pkg_check_modules(PKG_FONTCONFIG QUIET fontconfig) -set(FONTCONFIG_COMPILE_OPTIONS ${PKG_FONTCONFIG_CFLAGS_OTHER}) -set(FONTCONFIG_VERSION ${PKG_FONTCONFIG_VERSION}) +set(Fontconfig_COMPILE_OPTIONS ${PKG_FONTCONFIG_CFLAGS_OTHER}) +set(Fontconfig_VERSION ${PKG_FONTCONFIG_VERSION}) -find_path( FONTCONFIG_INCLUDE_DIR +find_path( Fontconfig_INCLUDE_DIR NAMES fontconfig/fontconfig.h HINTS @@ -48,24 +48,24 @@ find_path( FONTCONFIG_INCLUDE_DIR /usr/X11/include ) -find_library( FONTCONFIG_LIBRARY +find_library( Fontconfig_LIBRARY NAMES fontconfig PATHS ${PKG_FONTCONFIG_LIBRARY_DIRS} ) -if (FONTCONFIG_INCLUDE_DIR AND NOT FONTCONFIG_VERSION) - file(STRINGS ${FONTCONFIG_INCLUDE_DIR}/fontconfig/fontconfig.h _contents REGEX "^#define[ \t]+FC_[A-Z]+[ \t]+[0-9]+$") - unset(FONTCONFIG_VERSION) +if (Fontconfig_INCLUDE_DIR AND NOT Fontconfig_VERSION) + file(STRINGS ${Fontconfig_INCLUDE_DIR}/fontconfig/fontconfig.h _contents REGEX "^#define[ \t]+FC_[A-Z]+[ \t]+[0-9]+$") + unset(Fontconfig_VERSION) foreach(VPART MAJOR MINOR REVISION) foreach(VLINE ${_contents}) if(VLINE MATCHES "^#define[\t ]+FC_${VPART}[\t ]+([0-9]+)$") - set(FONTCONFIG_VERSION_PART "${CMAKE_MATCH_1}") - if(FONTCONFIG_VERSION) - string(APPEND FONTCONFIG_VERSION ".${FONTCONFIG_VERSION_PART}") + set(Fontconfig_VERSION_PART "${CMAKE_MATCH_1}") + if(Fontconfig_VERSION) + string(APPEND Fontconfig_VERSION ".${Fontconfig_VERSION_PART}") else() - set(FONTCONFIG_VERSION "${FONTCONFIG_VERSION_PART}") + set(Fontconfig_VERSION "${Fontconfig_VERSION_PART}") endif() endif() endforeach() @@ -75,27 +75,27 @@ endif () include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Fontconfig FOUND_VAR - FONTCONFIG_FOUND + Fontconfig_FOUND REQUIRED_VARS - FONTCONFIG_LIBRARY - FONTCONFIG_INCLUDE_DIR + Fontconfig_LIBRARY + Fontconfig_INCLUDE_DIR VERSION_VAR - FONTCONFIG_VERSION + Fontconfig_VERSION ) -if(FONTCONFIG_FOUND AND NOT TARGET Fontconfig::Fontconfig) +if(Fontconfig_FOUND AND NOT TARGET Fontconfig::Fontconfig) add_library(Fontconfig::Fontconfig UNKNOWN IMPORTED) set_target_properties(Fontconfig::Fontconfig PROPERTIES - IMPORTED_LOCATION "${FONTCONFIG_LIBRARY}" - INTERFACE_COMPILE_OPTIONS "${FONTCONFIG_COMPILE_OPTIONS}" - INTERFACE_INCLUDE_DIRECTORIES "${FONTCONFIG_INCLUDE_DIR}" + IMPORTED_LOCATION "${Fontconfig_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${Fontconfig_COMPILE_OPTIONS}" + INTERFACE_INCLUDE_DIRECTORIES "${Fontconfig_INCLUDE_DIR}" ) endif() -mark_as_advanced(FONTCONFIG_LIBRARY FONTCONFIG_INCLUDE_DIR) +mark_as_advanced(Fontconfig_LIBRARY Fontconfig_INCLUDE_DIR) -if(FONTCONFIG_FOUND) - set(FONTCONFIG_LIBRARIES ${FONTCONFIG_LIBRARY}) - set(FONTCONFIG_INCLUDE_DIRS ${FONTCONFIG_INCLUDE_DIR}) +if(Fontconfig_FOUND) + set(Fontconfig_LIBRARIES ${Fontconfig_LIBRARY}) + set(Fontconfig_INCLUDE_DIRS ${Fontconfig_INCLUDE_DIR}) endif() diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake index 46a7449..b28dd12 100644 --- a/Modules/FindX11.cmake +++ b/Modules/FindX11.cmake @@ -206,7 +206,7 @@ if (UNIX) if(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH) find_package(Freetype QUIET) find_package(Fontconfig QUIET) - if (FREETYPE_FOUND AND FONTCONFIG_FOUND) + if (FREETYPE_FOUND AND Fontconfig_FOUND) set(X11_Xft_FOUND TRUE) endif () list(APPEND X11_INCLUDE_DIR ${X11_Xft_INCLUDE_PATH}) diff --git a/Modules/Internal/FeatureTesting.cmake b/Modules/Internal/FeatureTesting.cmake index b9c20ec..f7b3e96 100644 --- a/Modules/Internal/FeatureTesting.cmake +++ b/Modules/Internal/FeatureTesting.cmake @@ -88,3 +88,14 @@ macro(_record_compiler_features_cxx std) endif() unset(lang_level_has_features) endmacro() + +macro(_has_compiler_features lang level compile_flags feature_list) + # presume all known features are supported + get_property(known_features GLOBAL PROPERTY CMAKE_${lang}${level}_KNOWN_FEATURES) + list(APPEND ${feature_list} ${known_features}) +endmacro() + +macro(_has_compiler_features_c std) + list(APPEND CMAKE_C${std}_COMPILE_FEATURES c_std_${std}) + _has_compiler_features(C ${std} "${CMAKE_C${std}_STANDARD_COMPILE_OPTION}" CMAKE_C${std}_COMPILE_FEATURES) +endmacro() diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1500f07..7906a0b 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 14) -set(CMake_VERSION_PATCH 20190327) +set(CMake_VERSION_PATCH 20190401) #set(CMake_VERSION_RC 1) diff --git a/Source/CTest/cmParseJacocoCoverage.cxx b/Source/CTest/cmParseJacocoCoverage.cxx index 61c5dcb..b78142a 100644 --- a/Source/CTest/cmParseJacocoCoverage.cxx +++ b/Source/CTest/cmParseJacocoCoverage.cxx @@ -29,6 +29,7 @@ protected: this->PackageName = atts[1]; this->PackagePath.clear(); } else if (name == "sourcefile") { + this->FilePath.clear(); std::string fileName = atts[1]; if (this->PackagePath.empty()) { diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 5149333..adf4464 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -222,7 +222,9 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args, aliasedType != cmStateEnums::STATIC_LIBRARY && aliasedType != cmStateEnums::MODULE_LIBRARY && aliasedType != cmStateEnums::OBJECT_LIBRARY && - aliasedType != cmStateEnums::INTERFACE_LIBRARY) { + aliasedType != cmStateEnums::INTERFACE_LIBRARY && + !(aliasedType == cmStateEnums::UNKNOWN_LIBRARY && + aliasedTarget->IsImported())) { std::ostringstream e; e << "cannot create ALIAS target \"" << libName << "\" because target \"" << aliasedName << "\" is not a library."; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 5916fcc..23b5bcb 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -262,7 +262,7 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg) this->DLLPlatform = !this->Makefile->GetSafeDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX").empty(); - this->PolicyMap = t->PolicyMap; + this->PolicyMap = t->GetPolicyMap(); } cmGeneratorTarget::~cmGeneratorTarget() diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index bc40a5c..280c986 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -12,6 +12,7 @@ #include "cmAlgorithms.h" #include "cmCallVisualStudioMacro.h" +#include "cmCustomCommand.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmLocalVisualStudioGenerator.h" diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 4025073..ad1a636 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -12,6 +12,7 @@ #include "cmAlgorithms.h" #include "cmComputeLinkInformation.h" +#include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" #include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx index d721ca0..7e67d4e 100644 --- a/Source/cmInstallTargetsCommand.cxx +++ b/Source/cmInstallTargetsCommand.cxx @@ -40,8 +40,8 @@ bool cmInstallTargetsCommand::InitialPass(std::vector<std::string> const& args, } else { cmTargets::iterator ti = tgts.find(*s); if (ti != tgts.end()) { - ti->second.SetInstallPath(args[0].c_str()); - ti->second.SetRuntimeInstallPath(runtime_dir.c_str()); + ti->second.SetInstallPath(args[0]); + ti->second.SetRuntimeInstallPath(runtime_dir); ti->second.SetHaveInstallRule(true); } else { std::string str = "Cannot find target: \"" + *s + "\" to install."; diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index a14fd7d..2c145e0 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -934,10 +934,8 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit( // Implicit include directories std::vector<std::string> implicitDirs; std::set<std::string> implicitSet; - // Checks if this is not an implicit include directory - auto notImplicit = [&implicitSet](std::string const& dir) { - return (implicitSet.find(dir) == implicitSet.end()); - }; + // Include directories to be excluded as if they were implicit. + std::set<std::string> implicitExclude; { // Raw list of implicit include directories // Start with "standard" directories that we unconditionally add below. @@ -975,7 +973,8 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit( [](std::string const& d) { return cmHasLiteralSuffix(d, "/usr/include"); }) != impDirVec.end()) { - impDirVec.emplace_back("/usr/include"); + // Only exclude this hard coded path for backwards compatibility. + implicitExclude.emplace("/usr/include"); } for (std::string const& i : impDirVec) { @@ -985,6 +984,12 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit( } } + // Checks if this is not an excluded (implicit) include directory. + auto notExcluded = [&implicitSet, &implicitExclude](std::string const& dir) { + return ((implicitSet.find(dir) == implicitSet.end()) && + (implicitExclude.find(dir) == implicitExclude.end())); + }; + // Get the target-specific include directories. std::vector<BT<std::string>> userDirs = target->GetIncludeDirectories(config, lang); @@ -1001,7 +1006,7 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit( cmSystemTools::ComparePath(udr.Value, topBinaryDir) || cmSystemTools::IsSubDirectory(udr.Value, topSourceDir) || cmSystemTools::IsSubDirectory(udr.Value, topBinaryDir)) { - if (notImplicit(udr.Value)) { + if (notExcluded(udr.Value)) { emitBT(udr); } } @@ -1010,7 +1015,7 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit( // Emit remaining non implicit user direcories. for (BT<std::string> const& udr : userDirs) { - if (notImplicit(udr.Value)) { + if (notExcluded(udr.Value)) { emitBT(udr); } } @@ -1029,7 +1034,7 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit( if (!stripImplicitDirs) { // Append implicit directories that were requested by the user only for (BT<std::string> const& udr : userDirs) { - if (!notImplicit(udr.Value)) { + if (implicitSet.find(udr.Value) != implicitSet.end()) { emitBT(udr); } } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 2857d39..bece12e 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -11,6 +11,7 @@ #include <utility> #include "cmAlgorithms.h" +#include "cmCustomCommand.h" // IWYU pragma: keep #include "cmCustomCommandGenerator.h" #include "cmFileTimeCache.h" #include "cmGeneratedFileStream.h" diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index a497308..e519d78 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLocalVisualStudio7Generator.h" +#include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" #include "cmGeneratorTarget.h" #include "cmGlobalVisualStudio7Generator.h" diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index 660729c..f3f2042 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmLocalVisualStudioGenerator.h" +#include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index b38d410..3300fef 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -12,6 +12,7 @@ #include <utility> #include "cmAlgorithms.h" +#include "cmCustomCommand.h" // IWYU pragma: keep #include "cmCustomCommandGenerator.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" @@ -32,8 +33,6 @@ #include "cmStateTypes.h" #include "cmSystemTools.h" -class cmCustomCommand; - cmNinjaNormalTargetGenerator::cmNinjaNormalTargetGenerator( cmGeneratorTarget* target) : cmNinjaTargetGenerator(target) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c6a69be..38bff1b 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -13,6 +13,7 @@ #include <unordered_set> #include "cmAlgorithms.h" +#include "cmCustomCommand.h" #include "cmGeneratorExpression.h" #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" @@ -21,6 +22,7 @@ #include "cmMessageType.h" #include "cmMessenger.h" #include "cmProperty.h" +#include "cmPropertyMap.h" #include "cmRange.h" #include "cmSourceFile.h" #include "cmSourceFileLocation.h" @@ -164,6 +166,26 @@ const char* cmTargetPropertyComputer::GetSources<cmTarget>( class cmTargetInternals { public: + cmStateEnums::TargetType TargetType; + cmMakefile* Makefile; + cmPolicies::PolicyMap PolicyMap; + std::string Name; + std::string InstallPath; + std::string RuntimeInstallPath; + cmPropertyMap Properties; + bool IsGeneratorProvided; + bool HaveInstallRule; + bool DLLPlatform; + bool IsAndroid; + bool IsImportedTarget; + bool ImportedGloballyVisible; + bool BuildInterfaceIncludesAppended; + std::set<BT<std::string>> Utilities; + std::vector<cmCustomCommand> PreBuildCommands; + std::vector<cmCustomCommand> PreLinkCommands; + std::vector<cmCustomCommand> PostBuildCommands; + std::set<std::string> SystemIncludeDirectories; + cmTarget::LinkLibraryVectorType OriginalLinkLibraries; std::vector<std::string> IncludeDirectoriesEntries; std::vector<cmListFileBacktrace> IncludeDirectoriesBacktraces; std::vector<std::string> CompileOptionsEntries; @@ -180,138 +202,156 @@ public: std::vector<cmListFileBacktrace> LinkDirectoriesBacktraces; std::vector<std::string> LinkImplementationPropertyEntries; std::vector<cmListFileBacktrace> LinkImplementationPropertyBacktraces; + std::vector<std::pair<cmTarget::TLLSignature, cmListFileContext>> + TLLCommands; + cmListFileBacktrace Backtrace; + +public: + bool CheckImportedLibName(std::string const& prop, + std::string const& value) const; + + std::string ProcessSourceItemCMP0049(const std::string& s); }; cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, Visibility vis, cmMakefile* mf) + : impl(cm::make_unique<cmTargetInternals>()) { assert(mf); - this->IsGeneratorProvided = false; - this->Name = name; - this->TargetTypeValue = type; - this->Makefile = mf; - this->HaveInstallRule = false; - this->DLLPlatform = false; - this->IsAndroid = false; - this->IsImportedTarget = + impl->TargetType = type; + impl->Makefile = mf; + impl->Name = name; + impl->IsGeneratorProvided = false; + impl->HaveInstallRule = false; + impl->DLLPlatform = false; + impl->IsAndroid = false; + impl->IsImportedTarget = (vis == VisibilityImported || vis == VisibilityImportedGlobally); - this->ImportedGloballyVisible = vis == VisibilityImportedGlobally; - this->BuildInterfaceIncludesAppended = false; + impl->ImportedGloballyVisible = vis == VisibilityImportedGlobally; + impl->BuildInterfaceIncludesAppended = false; // Check whether this is a DLL platform. - this->DLLPlatform = - !this->Makefile->GetSafeDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX").empty(); + impl->DLLPlatform = + !impl->Makefile->GetSafeDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX").empty(); // Check whether we are targeting an Android platform. - this->IsAndroid = - (this->Makefile->GetSafeDefinition("CMAKE_SYSTEM_NAME") == "Android"); + impl->IsAndroid = + (impl->Makefile->GetSafeDefinition("CMAKE_SYSTEM_NAME") == "Android"); + + std::string gKey; + gKey.reserve(128); + gKey += "CMAKE_"; + auto InitProperty = [this, mf, &gKey](const std::string& property, + const char* default_value) { + // Replace everything after "CMAKE_" + gKey.replace(gKey.begin() + 6, gKey.end(), property); + if (const char* value = mf->GetDefinition(gKey)) { + this->SetProperty(property, value); + } else if (default_value) { + this->SetProperty(property, default_value); + } + }; // Setup default property values. if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && this->GetType() != cmStateEnums::UTILITY) { - this->SetPropertyDefault("ANDROID_API", nullptr); - this->SetPropertyDefault("ANDROID_API_MIN", nullptr); - this->SetPropertyDefault("ANDROID_ARCH", nullptr); - this->SetPropertyDefault("ANDROID_STL_TYPE", nullptr); - this->SetPropertyDefault("ANDROID_SKIP_ANT_STEP", nullptr); - this->SetPropertyDefault("ANDROID_PROCESS_MAX", nullptr); - this->SetPropertyDefault("ANDROID_PROGUARD", nullptr); - this->SetPropertyDefault("ANDROID_PROGUARD_CONFIG_PATH", nullptr); - this->SetPropertyDefault("ANDROID_SECURE_PROPS_PATH", nullptr); - this->SetPropertyDefault("ANDROID_NATIVE_LIB_DIRECTORIES", nullptr); - this->SetPropertyDefault("ANDROID_NATIVE_LIB_DEPENDENCIES", nullptr); - this->SetPropertyDefault("ANDROID_JAVA_SOURCE_DIR", nullptr); - this->SetPropertyDefault("ANDROID_JAR_DIRECTORIES", nullptr); - this->SetPropertyDefault("ANDROID_JAR_DEPENDENCIES", nullptr); - this->SetPropertyDefault("ANDROID_ASSETS_DIRECTORIES", nullptr); - this->SetPropertyDefault("ANDROID_ANT_ADDITIONAL_OPTIONS", nullptr); - this->SetPropertyDefault("BUILD_RPATH", nullptr); - this->SetPropertyDefault("BUILD_RPATH_USE_ORIGIN", nullptr); - this->SetPropertyDefault("INSTALL_NAME_DIR", nullptr); - this->SetPropertyDefault("INSTALL_RPATH", ""); - this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF"); - this->SetPropertyDefault("INTERPROCEDURAL_OPTIMIZATION", nullptr); - this->SetPropertyDefault("SKIP_BUILD_RPATH", "OFF"); - this->SetPropertyDefault("BUILD_WITH_INSTALL_RPATH", "OFF"); - this->SetPropertyDefault("ARCHIVE_OUTPUT_DIRECTORY", nullptr); - this->SetPropertyDefault("LIBRARY_OUTPUT_DIRECTORY", nullptr); - this->SetPropertyDefault("RUNTIME_OUTPUT_DIRECTORY", nullptr); - this->SetPropertyDefault("PDB_OUTPUT_DIRECTORY", nullptr); - this->SetPropertyDefault("COMPILE_PDB_OUTPUT_DIRECTORY", nullptr); - this->SetPropertyDefault("Fortran_FORMAT", nullptr); - this->SetPropertyDefault("Fortran_MODULE_DIRECTORY", nullptr); - this->SetPropertyDefault("Fortran_COMPILER_LAUNCHER", nullptr); - this->SetPropertyDefault("GNUtoMS", nullptr); - this->SetPropertyDefault("OSX_ARCHITECTURES", nullptr); - this->SetPropertyDefault("IOS_INSTALL_COMBINED", nullptr); - this->SetPropertyDefault("AUTOMOC", nullptr); - this->SetPropertyDefault("AUTOUIC", nullptr); - this->SetPropertyDefault("AUTORCC", nullptr); - this->SetPropertyDefault("AUTOGEN_ORIGIN_DEPENDS", nullptr); - this->SetPropertyDefault("AUTOGEN_PARALLEL", nullptr); - this->SetPropertyDefault("AUTOMOC_COMPILER_PREDEFINES", nullptr); - this->SetPropertyDefault("AUTOMOC_DEPEND_FILTERS", nullptr); - this->SetPropertyDefault("AUTOMOC_MACRO_NAMES", nullptr); - this->SetPropertyDefault("AUTOMOC_MOC_OPTIONS", nullptr); - this->SetPropertyDefault("AUTOUIC_OPTIONS", nullptr); - this->SetPropertyDefault("AUTOUIC_SEARCH_PATHS", nullptr); - this->SetPropertyDefault("AUTORCC_OPTIONS", nullptr); - this->SetPropertyDefault("LINK_DEPENDS_NO_SHARED", nullptr); - this->SetPropertyDefault("LINK_INTERFACE_LIBRARIES", nullptr); - this->SetPropertyDefault("WIN32_EXECUTABLE", nullptr); - this->SetPropertyDefault("MACOSX_BUNDLE", nullptr); - this->SetPropertyDefault("MACOSX_RPATH", nullptr); - this->SetPropertyDefault("NO_SYSTEM_FROM_IMPORTED", nullptr); - this->SetPropertyDefault("BUILD_WITH_INSTALL_NAME_DIR", nullptr); - this->SetPropertyDefault("C_CLANG_TIDY", nullptr); - this->SetPropertyDefault("C_COMPILER_LAUNCHER", nullptr); - this->SetPropertyDefault("C_CPPLINT", nullptr); - this->SetPropertyDefault("C_CPPCHECK", nullptr); - this->SetPropertyDefault("C_INCLUDE_WHAT_YOU_USE", nullptr); - this->SetPropertyDefault("LINK_WHAT_YOU_USE", nullptr); - this->SetPropertyDefault("C_STANDARD", nullptr); - this->SetPropertyDefault("C_STANDARD_REQUIRED", nullptr); - this->SetPropertyDefault("C_EXTENSIONS", nullptr); - this->SetPropertyDefault("CXX_CLANG_TIDY", nullptr); - this->SetPropertyDefault("CXX_COMPILER_LAUNCHER", nullptr); - this->SetPropertyDefault("CXX_CPPLINT", nullptr); - this->SetPropertyDefault("CXX_CPPCHECK", nullptr); - this->SetPropertyDefault("CXX_INCLUDE_WHAT_YOU_USE", nullptr); - this->SetPropertyDefault("CXX_STANDARD", nullptr); - this->SetPropertyDefault("CXX_STANDARD_REQUIRED", nullptr); - this->SetPropertyDefault("CXX_EXTENSIONS", nullptr); - this->SetPropertyDefault("CUDA_STANDARD", nullptr); - this->SetPropertyDefault("CUDA_STANDARD_REQUIRED", nullptr); - this->SetPropertyDefault("CUDA_EXTENSIONS", nullptr); - this->SetPropertyDefault("CUDA_COMPILER_LAUNCHER", nullptr); - this->SetPropertyDefault("CUDA_SEPARABLE_COMPILATION", nullptr); - this->SetPropertyDefault("LINK_SEARCH_START_STATIC", nullptr); - this->SetPropertyDefault("LINK_SEARCH_END_STATIC", nullptr); - this->SetPropertyDefault("FOLDER", nullptr); + InitProperty("ANDROID_API", nullptr); + InitProperty("ANDROID_API_MIN", nullptr); + InitProperty("ANDROID_ARCH", nullptr); + InitProperty("ANDROID_STL_TYPE", nullptr); + InitProperty("ANDROID_SKIP_ANT_STEP", nullptr); + InitProperty("ANDROID_PROCESS_MAX", nullptr); + InitProperty("ANDROID_PROGUARD", nullptr); + InitProperty("ANDROID_PROGUARD_CONFIG_PATH", nullptr); + InitProperty("ANDROID_SECURE_PROPS_PATH", nullptr); + InitProperty("ANDROID_NATIVE_LIB_DIRECTORIES", nullptr); + InitProperty("ANDROID_NATIVE_LIB_DEPENDENCIES", nullptr); + InitProperty("ANDROID_JAVA_SOURCE_DIR", nullptr); + InitProperty("ANDROID_JAR_DIRECTORIES", nullptr); + InitProperty("ANDROID_JAR_DEPENDENCIES", nullptr); + InitProperty("ANDROID_ASSETS_DIRECTORIES", nullptr); + InitProperty("ANDROID_ANT_ADDITIONAL_OPTIONS", nullptr); + InitProperty("BUILD_RPATH", nullptr); + InitProperty("BUILD_RPATH_USE_ORIGIN", nullptr); + InitProperty("INSTALL_NAME_DIR", nullptr); + InitProperty("INSTALL_RPATH", ""); + InitProperty("INSTALL_RPATH_USE_LINK_PATH", "OFF"); + InitProperty("INTERPROCEDURAL_OPTIMIZATION", nullptr); + InitProperty("SKIP_BUILD_RPATH", "OFF"); + InitProperty("BUILD_WITH_INSTALL_RPATH", "OFF"); + InitProperty("ARCHIVE_OUTPUT_DIRECTORY", nullptr); + InitProperty("LIBRARY_OUTPUT_DIRECTORY", nullptr); + InitProperty("RUNTIME_OUTPUT_DIRECTORY", nullptr); + InitProperty("PDB_OUTPUT_DIRECTORY", nullptr); + InitProperty("COMPILE_PDB_OUTPUT_DIRECTORY", nullptr); + InitProperty("Fortran_FORMAT", nullptr); + InitProperty("Fortran_MODULE_DIRECTORY", nullptr); + InitProperty("Fortran_COMPILER_LAUNCHER", nullptr); + InitProperty("GNUtoMS", nullptr); + InitProperty("OSX_ARCHITECTURES", nullptr); + InitProperty("IOS_INSTALL_COMBINED", nullptr); + InitProperty("AUTOMOC", nullptr); + InitProperty("AUTOUIC", nullptr); + InitProperty("AUTORCC", nullptr); + InitProperty("AUTOGEN_ORIGIN_DEPENDS", nullptr); + InitProperty("AUTOGEN_PARALLEL", nullptr); + InitProperty("AUTOMOC_COMPILER_PREDEFINES", nullptr); + InitProperty("AUTOMOC_DEPEND_FILTERS", nullptr); + InitProperty("AUTOMOC_MACRO_NAMES", nullptr); + InitProperty("AUTOMOC_MOC_OPTIONS", nullptr); + InitProperty("AUTOUIC_OPTIONS", nullptr); + InitProperty("AUTOUIC_SEARCH_PATHS", nullptr); + InitProperty("AUTORCC_OPTIONS", nullptr); + InitProperty("LINK_DEPENDS_NO_SHARED", nullptr); + InitProperty("LINK_INTERFACE_LIBRARIES", nullptr); + InitProperty("WIN32_EXECUTABLE", nullptr); + InitProperty("MACOSX_BUNDLE", nullptr); + InitProperty("MACOSX_RPATH", nullptr); + InitProperty("NO_SYSTEM_FROM_IMPORTED", nullptr); + InitProperty("BUILD_WITH_INSTALL_NAME_DIR", nullptr); + InitProperty("C_CLANG_TIDY", nullptr); + InitProperty("C_COMPILER_LAUNCHER", nullptr); + InitProperty("C_CPPLINT", nullptr); + InitProperty("C_CPPCHECK", nullptr); + InitProperty("C_INCLUDE_WHAT_YOU_USE", nullptr); + InitProperty("LINK_WHAT_YOU_USE", nullptr); + InitProperty("C_STANDARD", nullptr); + InitProperty("C_STANDARD_REQUIRED", nullptr); + InitProperty("C_EXTENSIONS", nullptr); + InitProperty("CXX_CLANG_TIDY", nullptr); + InitProperty("CXX_COMPILER_LAUNCHER", nullptr); + InitProperty("CXX_CPPLINT", nullptr); + InitProperty("CXX_CPPCHECK", nullptr); + InitProperty("CXX_INCLUDE_WHAT_YOU_USE", nullptr); + InitProperty("CXX_STANDARD", nullptr); + InitProperty("CXX_STANDARD_REQUIRED", nullptr); + InitProperty("CXX_EXTENSIONS", nullptr); + InitProperty("CUDA_STANDARD", nullptr); + InitProperty("CUDA_STANDARD_REQUIRED", nullptr); + InitProperty("CUDA_EXTENSIONS", nullptr); + InitProperty("CUDA_COMPILER_LAUNCHER", nullptr); + InitProperty("CUDA_SEPARABLE_COMPILATION", nullptr); + InitProperty("LINK_SEARCH_START_STATIC", nullptr); + InitProperty("LINK_SEARCH_END_STATIC", nullptr); + InitProperty("FOLDER", nullptr); #ifdef __APPLE__ if (this->GetGlobalGenerator()->IsXcode()) { - this->SetPropertyDefault("XCODE_GENERATE_SCHEME", nullptr); - this->SetPropertyDefault("XCODE_SCHEME_ADDRESS_SANITIZER", nullptr); - this->SetPropertyDefault( - "XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN", nullptr); - this->SetPropertyDefault("XCODE_SCHEME_THREAD_SANITIZER", nullptr); - this->SetPropertyDefault("XCODE_SCHEME_THREAD_SANITIZER_STOP", nullptr); - this->SetPropertyDefault("XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER", - nullptr); - this->SetPropertyDefault( - "XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP", nullptr); - this->SetPropertyDefault("XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER", - nullptr); - this->SetPropertyDefault("XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP", - nullptr); - this->SetPropertyDefault("XCODE_SCHEME_MALLOC_SCRIBBLE", nullptr); - this->SetPropertyDefault("XCODE_SCHEME_MALLOC_GUARD_EDGES", nullptr); - this->SetPropertyDefault("XCODE_SCHEME_GUARD_MALLOC", nullptr); - this->SetPropertyDefault("XCODE_SCHEME_ZOMBIE_OBJECTS", nullptr); - this->SetPropertyDefault("XCODE_SCHEME_MALLOC_STACK", nullptr); - this->SetPropertyDefault("XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE", - nullptr); - this->SetPropertyDefault("XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS", nullptr); + InitProperty("XCODE_GENERATE_SCHEME", nullptr); + InitProperty("XCODE_SCHEME_ADDRESS_SANITIZER", nullptr); + InitProperty("XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN", nullptr); + InitProperty("XCODE_SCHEME_THREAD_SANITIZER", nullptr); + InitProperty("XCODE_SCHEME_THREAD_SANITIZER_STOP", nullptr); + InitProperty("XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER", nullptr); + InitProperty("XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP", nullptr); + InitProperty("XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER", nullptr); + InitProperty("XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP", nullptr); + InitProperty("XCODE_SCHEME_MALLOC_SCRIBBLE", nullptr); + InitProperty("XCODE_SCHEME_MALLOC_GUARD_EDGES", nullptr); + InitProperty("XCODE_SCHEME_GUARD_MALLOC", nullptr); + InitProperty("XCODE_SCHEME_ZOMBIE_OBJECTS", nullptr); + InitProperty("XCODE_SCHEME_MALLOC_STACK", nullptr); + InitProperty("XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE", nullptr); + InitProperty("XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS", nullptr); } #endif } @@ -333,13 +373,13 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, for (auto const& prop : configProps) { // Interface libraries have no output locations, so honor only // the configuration map. - if (this->TargetTypeValue == cmStateEnums::INTERFACE_LIBRARY && + if (impl->TargetType == cmStateEnums::INTERFACE_LIBRARY && strcmp(prop, "MAP_IMPORTED_CONFIG_") != 0) { continue; } std::string property = prop; property += configUpper; - this->SetPropertyDefault(property, nullptr); + InitProperty(property, nullptr); } // Initialize per-configuration name postfix property from the @@ -347,93 +387,92 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, // compatibility with previous CMake versions in which executables // did not support this variable. Projects may still specify the // property directly. - if (this->TargetTypeValue != cmStateEnums::EXECUTABLE && - this->TargetTypeValue != cmStateEnums::INTERFACE_LIBRARY) { + if (impl->TargetType != cmStateEnums::EXECUTABLE && + impl->TargetType != cmStateEnums::INTERFACE_LIBRARY) { std::string property = cmSystemTools::UpperCase(configName); property += "_POSTFIX"; - this->SetPropertyDefault(property, nullptr); + InitProperty(property, nullptr); } } } // Save the backtrace of target construction. - this->Backtrace = this->Makefile->GetBacktrace(); + impl->Backtrace = impl->Makefile->GetBacktrace(); if (!this->IsImported()) { // Initialize the INCLUDE_DIRECTORIES property based on the current value // of the same directory property: - CApp(this->Internal->IncludeDirectoriesEntries, - this->Makefile->GetIncludeDirectoriesEntries()); - CApp(this->Internal->IncludeDirectoriesBacktraces, - this->Makefile->GetIncludeDirectoriesBacktraces()); + CApp(impl->IncludeDirectoriesEntries, + impl->Makefile->GetIncludeDirectoriesEntries()); + CApp(impl->IncludeDirectoriesBacktraces, + impl->Makefile->GetIncludeDirectoriesBacktraces()); { - auto const& sysInc = this->Makefile->GetSystemIncludeDirectories(); - this->SystemIncludeDirectories.insert(sysInc.begin(), sysInc.end()); + auto const& sysInc = impl->Makefile->GetSystemIncludeDirectories(); + impl->SystemIncludeDirectories.insert(sysInc.begin(), sysInc.end()); } - CApp(this->Internal->CompileOptionsEntries, - this->Makefile->GetCompileOptionsEntries()); - CApp(this->Internal->CompileOptionsBacktraces, - this->Makefile->GetCompileOptionsBacktraces()); + CApp(impl->CompileOptionsEntries, + impl->Makefile->GetCompileOptionsEntries()); + CApp(impl->CompileOptionsBacktraces, + impl->Makefile->GetCompileOptionsBacktraces()); - CApp(this->Internal->LinkOptionsEntries, - this->Makefile->GetLinkOptionsEntries()); - CApp(this->Internal->LinkOptionsBacktraces, - this->Makefile->GetLinkOptionsBacktraces()); + CApp(impl->LinkOptionsEntries, impl->Makefile->GetLinkOptionsEntries()); + CApp(impl->LinkOptionsBacktraces, + impl->Makefile->GetLinkOptionsBacktraces()); - CApp(this->Internal->LinkDirectoriesEntries, - this->Makefile->GetLinkDirectoriesEntries()); - CApp(this->Internal->LinkDirectoriesBacktraces, - this->Makefile->GetLinkDirectoriesBacktraces()); + CApp(impl->LinkDirectoriesEntries, + impl->Makefile->GetLinkDirectoriesEntries()); + CApp(impl->LinkDirectoriesBacktraces, + impl->Makefile->GetLinkDirectoriesBacktraces()); } if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && this->GetType() != cmStateEnums::UTILITY) { - this->SetPropertyDefault("C_VISIBILITY_PRESET", nullptr); - this->SetPropertyDefault("CXX_VISIBILITY_PRESET", nullptr); - this->SetPropertyDefault("CUDA_VISIBILITY_PRESET", nullptr); - this->SetPropertyDefault("VISIBILITY_INLINES_HIDDEN", nullptr); + InitProperty("C_VISIBILITY_PRESET", nullptr); + InitProperty("CXX_VISIBILITY_PRESET", nullptr); + InitProperty("CUDA_VISIBILITY_PRESET", nullptr); + InitProperty("VISIBILITY_INLINES_HIDDEN", nullptr); } - if (this->TargetTypeValue == cmStateEnums::EXECUTABLE) { - this->SetPropertyDefault("ANDROID_GUI", nullptr); - this->SetPropertyDefault("CROSSCOMPILING_EMULATOR", nullptr); - this->SetPropertyDefault("ENABLE_EXPORTS", nullptr); + if (impl->TargetType == cmStateEnums::EXECUTABLE) { + InitProperty("ANDROID_GUI", nullptr); + InitProperty("CROSSCOMPILING_EMULATOR", nullptr); + InitProperty("ENABLE_EXPORTS", nullptr); } - if (this->TargetTypeValue == cmStateEnums::SHARED_LIBRARY || - this->TargetTypeValue == cmStateEnums::MODULE_LIBRARY) { + if (impl->TargetType == cmStateEnums::SHARED_LIBRARY || + impl->TargetType == cmStateEnums::MODULE_LIBRARY) { this->SetProperty("POSITION_INDEPENDENT_CODE", "True"); } - if (this->TargetTypeValue == cmStateEnums::SHARED_LIBRARY || - this->TargetTypeValue == cmStateEnums::EXECUTABLE) { - this->SetPropertyDefault("WINDOWS_EXPORT_ALL_SYMBOLS", nullptr); + if (impl->TargetType == cmStateEnums::SHARED_LIBRARY || + impl->TargetType == cmStateEnums::EXECUTABLE) { + InitProperty("WINDOWS_EXPORT_ALL_SYMBOLS", nullptr); } if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && this->GetType() != cmStateEnums::UTILITY) { - this->SetPropertyDefault("POSITION_INDEPENDENT_CODE", nullptr); + InitProperty("POSITION_INDEPENDENT_CODE", nullptr); } // Record current policies for later use. - this->Makefile->RecordPolicies(this->PolicyMap); + impl->Makefile->RecordPolicies(impl->PolicyMap); - if (this->TargetTypeValue == cmStateEnums::INTERFACE_LIBRARY) { + if (impl->TargetType == cmStateEnums::INTERFACE_LIBRARY) { // This policy is checked in a few conditions. The properties relevant // to the policy are always ignored for cmStateEnums::INTERFACE_LIBRARY // targets, // so ensure that the conditions don't lead to nonsense. - this->PolicyMap.Set(cmPolicies::CMP0022, cmPolicies::NEW); + impl->PolicyMap.Set(cmPolicies::CMP0022, cmPolicies::NEW); } if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && this->GetType() != cmStateEnums::UTILITY) { - this->SetPropertyDefault("JOB_POOL_COMPILE", nullptr); - this->SetPropertyDefault("JOB_POOL_LINK", nullptr); + InitProperty("JOB_POOL_COMPILE", nullptr); + InitProperty("JOB_POOL_LINK", nullptr); } - if (this->TargetTypeValue <= cmStateEnums::UTILITY) { - this->SetPropertyDefault("DOTNET_TARGET_FRAMEWORK_VERSION", nullptr); + if (impl->TargetType <= cmStateEnums::UTILITY) { + InitProperty("DOTNET_TARGET_FRAMEWORK_VERSION", nullptr); } if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && @@ -454,7 +493,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, if (assignment != std::string::npos) { const std::string propName = vsGlobal + i.substr(0, assignment); const std::string propValue = i.substr(assignment + 1); - this->SetPropertyDefault(propName, propValue.c_str()); + InitProperty(propName, propValue.c_str()); } } } @@ -462,20 +501,56 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, } } +cmTarget::cmTarget(cmTarget&&) noexcept = default; +cmTarget::~cmTarget() = default; + +cmTarget& cmTarget::operator=(cmTarget&&) noexcept = default; + +cmStateEnums::TargetType cmTarget::GetType() const +{ + return impl->TargetType; +} + +cmMakefile* cmTarget::GetMakefile() const +{ + return impl->Makefile; +} + +cmPolicies::PolicyMap const& cmTarget::GetPolicyMap() const +{ + return impl->PolicyMap; +} + +const std::string& cmTarget::GetName() const +{ + return impl->Name; +} + +cmPolicies::PolicyStatus cmTarget::GetPolicyStatus( + cmPolicies::PolicyID policy) const +{ + return impl->PolicyMap.Get(policy); +} + cmGlobalGenerator* cmTarget::GetGlobalGenerator() const { - return this->GetMakefile()->GetGlobalGenerator(); + return impl->Makefile->GetGlobalGenerator(); +} + +void cmTarget::AddUtility(std::string const& name, cmMakefile* mf) +{ + impl->Utilities.insert( + BT<std::string>(name, mf ? mf->GetBacktrace() : cmListFileBacktrace())); } -void cmTarget::AddUtility(std::string const& u, cmMakefile* mf) +std::set<BT<std::string>> const& cmTarget::GetUtilities() const { - BT<std::string> util(u, mf ? mf->GetBacktrace() : cmListFileBacktrace()); - this->Utilities.insert(util); + return impl->Utilities; } cmListFileBacktrace const& cmTarget::GetBacktrace() const { - return this->Backtrace; + return impl->Backtrace; } bool cmTarget::IsExecutableWithExports() const @@ -484,34 +559,57 @@ bool cmTarget::IsExecutableWithExports() const this->GetPropertyAsBool("ENABLE_EXPORTS")); } -bool cmTarget::HasImportLibrary() const -{ - return (this->DLLPlatform && - (this->GetType() == cmStateEnums::SHARED_LIBRARY || - this->IsExecutableWithExports())); -} - bool cmTarget::IsFrameworkOnApple() const { return ((this->GetType() == cmStateEnums::SHARED_LIBRARY || this->GetType() == cmStateEnums::STATIC_LIBRARY) && - this->Makefile->IsOn("APPLE") && + impl->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("FRAMEWORK")); } bool cmTarget::IsAppBundleOnApple() const { return (this->GetType() == cmStateEnums::EXECUTABLE && - this->Makefile->IsOn("APPLE") && + impl->Makefile->IsOn("APPLE") && this->GetPropertyAsBool("MACOSX_BUNDLE")); } +std::vector<cmCustomCommand> const& cmTarget::GetPreBuildCommands() const +{ + return impl->PreBuildCommands; +} + +void cmTarget::AddPreBuildCommand(cmCustomCommand const& cmd) +{ + impl->PreBuildCommands.push_back(cmd); +} + +std::vector<cmCustomCommand> const& cmTarget::GetPreLinkCommands() const +{ + return impl->PreLinkCommands; +} + +void cmTarget::AddPreLinkCommand(cmCustomCommand const& cmd) +{ + impl->PreLinkCommands.push_back(cmd); +} + +std::vector<cmCustomCommand> const& cmTarget::GetPostBuildCommands() const +{ + return impl->PostBuildCommands; +} + +void cmTarget::AddPostBuildCommand(cmCustomCommand const& cmd) +{ + impl->PostBuildCommands.push_back(cmd); +} + void cmTarget::AddTracedSources(std::vector<std::string> const& srcs) { if (!srcs.empty()) { - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->SourceEntries.push_back(cmJoin(srcs, ";")); - this->Internal->SourceBacktraces.push_back(lfbt); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->SourceEntries.push_back(cmJoin(srcs, ";")); + impl->SourceBacktraces.push_back(lfbt); } } @@ -522,25 +620,25 @@ void cmTarget::AddSources(std::vector<std::string> const& srcs) for (auto filename : srcs) { if (!cmGeneratorExpression::StartsWithGeneratorExpression(filename)) { if (!filename.empty()) { - filename = this->ProcessSourceItemCMP0049(filename); + filename = impl->ProcessSourceItemCMP0049(filename); if (filename.empty()) { return; } } - this->Makefile->GetOrCreateSource(filename); + impl->Makefile->GetOrCreateSource(filename); } srcFiles += sep; srcFiles += filename; sep = ";"; } if (!srcFiles.empty()) { - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->SourceEntries.push_back(std::move(srcFiles)); - this->Internal->SourceBacktraces.push_back(lfbt); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->SourceEntries.push_back(std::move(srcFiles)); + impl->SourceBacktraces.push_back(lfbt); } } -std::string cmTarget::ProcessSourceItemCMP0049(const std::string& s) +std::string cmTargetInternals::ProcessSourceItemCMP0049(const std::string& s) { std::string src = s; @@ -565,7 +663,7 @@ std::string cmTarget::ProcessSourceItemCMP0049(const std::string& s) } if (!noMessage) { e << "Legacy variable expansion in source file \"" << s - << "\" expanded to \"" << src << "\" in target \"" << this->GetName() + << "\" expanded to \"" << src << "\" in target \"" << this->Name << "\". This behavior will be removed in a " "future version of CMake."; this->Makefile->IssueMessage(messageType, e.str()); @@ -579,7 +677,7 @@ std::string cmTarget::ProcessSourceItemCMP0049(const std::string& s) cmSourceFile* cmTarget::AddSourceCMP0049(const std::string& s) { - std::string src = this->ProcessSourceItemCMP0049(s); + std::string src = impl->ProcessSourceItemCMP0049(s); if (!s.empty() && src.empty()) { return nullptr; } @@ -643,26 +741,22 @@ public: cmSourceFile* cmTarget::AddSource(const std::string& src, bool before) { - cmSourceFileLocation sfl(this->Makefile, src, + cmSourceFileLocation sfl(impl->Makefile, src, cmSourceFileLocationKind::Known); - if (std::find_if(this->Internal->SourceEntries.begin(), - this->Internal->SourceEntries.end(), + if (std::find_if(impl->SourceEntries.begin(), impl->SourceEntries.end(), TargetPropertyEntryFinder(sfl)) == - this->Internal->SourceEntries.end()) { - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->SourceEntries.insert( - before ? this->Internal->SourceEntries.begin() - : this->Internal->SourceEntries.end(), - src); - this->Internal->SourceBacktraces.insert( - before ? this->Internal->SourceBacktraces.begin() - : this->Internal->SourceBacktraces.end(), - lfbt); + impl->SourceEntries.end()) { + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->SourceEntries.insert( + before ? impl->SourceEntries.begin() : impl->SourceEntries.end(), src); + impl->SourceBacktraces.insert(before ? impl->SourceBacktraces.begin() + : impl->SourceBacktraces.end(), + lfbt); } if (cmGeneratorExpression::Find(src) != std::string::npos) { return nullptr; } - return this->Makefile->GetOrCreateSource(src, false, + return impl->Makefile->GetOrCreateSource(src, false, cmSourceFileLocationKind::Known); } @@ -682,7 +776,7 @@ std::string cmTarget::GetDebugGeneratorExpressions( // Get the list of configurations considered to be DEBUG. std::vector<std::string> debugConfigs = - this->Makefile->GetCMakeInstance()->GetDebugConfigs(); + impl->Makefile->GetCMakeInstance()->GetDebugConfigs(); std::string configString = "$<CONFIG:" + debugConfigs[0] + ">"; @@ -708,13 +802,13 @@ bool cmTarget::PushTLLCommandTrace(TLLSignature signature, cmListFileContext const& lfc) { bool ret = true; - if (!this->TLLCommands.empty()) { - if (this->TLLCommands.back().first != signature) { + if (!impl->TLLCommands.empty()) { + if (impl->TLLCommands.back().first != signature) { ret = false; } } - if (this->TLLCommands.empty() || this->TLLCommands.back().second != lfc) { - this->TLLCommands.emplace_back(signature, lfc); + if (impl->TLLCommands.empty() || impl->TLLCommands.back().second != lfc) { + impl->TLLCommands.emplace_back(signature, lfc); } return ret; } @@ -724,18 +818,63 @@ void cmTarget::GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const const char* sigString = (sig == cmTarget::KeywordTLLSignature ? "keyword" : "plain"); s << "The uses of the " << sigString << " signature are here:\n"; - cmStateDirectory cmDir = - this->GetMakefile()->GetStateSnapshot().GetDirectory(); - for (auto const& cmd : this->TLLCommands) { + cmStateDirectory cmDir = impl->Makefile->GetStateSnapshot().GetDirectory(); + for (auto const& cmd : impl->TLLCommands) { if (cmd.first == sig) { cmListFileContext lfc = cmd.second; lfc.FilePath = cmDir.ConvertToRelPathIfNotContained( - this->Makefile->GetState()->GetSourceDirectory(), lfc.FilePath); + impl->Makefile->GetState()->GetSourceDirectory(), lfc.FilePath); s << " * " << lfc << std::endl; } } } +std::string const& cmTarget::GetInstallPath() const +{ + return impl->InstallPath; +} + +void cmTarget::SetInstallPath(std::string const& name) +{ + impl->InstallPath = name; +} + +std::string const& cmTarget::GetRuntimeInstallPath() const +{ + return impl->RuntimeInstallPath; +} + +void cmTarget::SetRuntimeInstallPath(std::string const& name) +{ + impl->RuntimeInstallPath = name; +} + +bool cmTarget::GetHaveInstallRule() const +{ + return impl->HaveInstallRule; +} + +void cmTarget::SetHaveInstallRule(bool hir) +{ + impl->HaveInstallRule = hir; +} + +bool cmTarget::GetIsGeneratorProvided() const +{ + return impl->IsGeneratorProvided; +} + +void cmTarget::SetIsGeneratorProvided(bool igp) +{ + impl->IsGeneratorProvided = igp; +} + +cmTarget::LinkLibraryVectorType const& cmTarget::GetOriginalLinkLibraries() + const +{ + return impl->OriginalLinkLibraries; +} + void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib, cmTargetLinkLibraryType llt) { @@ -763,11 +902,11 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, std::string const& lib, (tgt && (tgt->GetType() == cmStateEnums::INTERFACE_LIBRARY || tgt->GetType() == cmStateEnums::OBJECT_LIBRARY)) || - (this->Name == lib)) { + (impl->Name == lib)) { return; } - this->OriginalLinkLibraries.emplace_back(lib, llt); + impl->OriginalLinkLibraries.emplace_back(lib, llt); // Add the explicit dependency information for libraries. This is // simply a set of libraries separated by ";". There should always @@ -777,11 +916,11 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, std::string const& lib, // may be purposefully duplicated to handle recursive dependencies, // and we removing one instance will break the link line. Duplicates // will be appropriately eliminated at emit time. - if (this->TargetTypeValue >= cmStateEnums::STATIC_LIBRARY && - this->TargetTypeValue <= cmStateEnums::MODULE_LIBRARY && + if (impl->TargetType >= cmStateEnums::STATIC_LIBRARY && + impl->TargetType <= cmStateEnums::MODULE_LIBRARY && (this->GetPolicyStatusCMP0073() == cmPolicies::OLD || this->GetPolicyStatusCMP0073() == cmPolicies::WARN)) { - std::string targetEntry = this->Name; + std::string targetEntry = impl->Name; targetEntry += "_LIB_DEPENDS"; std::string dependencies; const char* old_val = mf.GetDefinition(targetEntry); @@ -809,94 +948,99 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, std::string const& lib, void cmTarget::AddSystemIncludeDirectories(const std::set<std::string>& incs) { - this->SystemIncludeDirectories.insert(incs.begin(), incs.end()); + impl->SystemIncludeDirectories.insert(incs.begin(), incs.end()); +} + +std::set<std::string> const& cmTarget::GetSystemIncludeDirectories() const +{ + return impl->SystemIncludeDirectories; } cmStringRange cmTarget::GetIncludeDirectoriesEntries() const { - return cmMakeRange(this->Internal->IncludeDirectoriesEntries); + return cmMakeRange(impl->IncludeDirectoriesEntries); } cmBacktraceRange cmTarget::GetIncludeDirectoriesBacktraces() const { - return cmMakeRange(this->Internal->IncludeDirectoriesBacktraces); + return cmMakeRange(impl->IncludeDirectoriesBacktraces); } cmStringRange cmTarget::GetCompileOptionsEntries() const { - return cmMakeRange(this->Internal->CompileOptionsEntries); + return cmMakeRange(impl->CompileOptionsEntries); } cmBacktraceRange cmTarget::GetCompileOptionsBacktraces() const { - return cmMakeRange(this->Internal->CompileOptionsBacktraces); + return cmMakeRange(impl->CompileOptionsBacktraces); } cmStringRange cmTarget::GetCompileFeaturesEntries() const { - return cmMakeRange(this->Internal->CompileFeaturesEntries); + return cmMakeRange(impl->CompileFeaturesEntries); } cmBacktraceRange cmTarget::GetCompileFeaturesBacktraces() const { - return cmMakeRange(this->Internal->CompileFeaturesBacktraces); + return cmMakeRange(impl->CompileFeaturesBacktraces); } cmStringRange cmTarget::GetCompileDefinitionsEntries() const { - return cmMakeRange(this->Internal->CompileDefinitionsEntries); + return cmMakeRange(impl->CompileDefinitionsEntries); } cmBacktraceRange cmTarget::GetCompileDefinitionsBacktraces() const { - return cmMakeRange(this->Internal->CompileDefinitionsBacktraces); + return cmMakeRange(impl->CompileDefinitionsBacktraces); } cmStringRange cmTarget::GetSourceEntries() const { - return cmMakeRange(this->Internal->SourceEntries); + return cmMakeRange(impl->SourceEntries); } cmBacktraceRange cmTarget::GetSourceBacktraces() const { - return cmMakeRange(this->Internal->SourceBacktraces); + return cmMakeRange(impl->SourceBacktraces); } cmStringRange cmTarget::GetLinkOptionsEntries() const { - return cmMakeRange(this->Internal->LinkOptionsEntries); + return cmMakeRange(impl->LinkOptionsEntries); } cmBacktraceRange cmTarget::GetLinkOptionsBacktraces() const { - return cmMakeRange(this->Internal->LinkOptionsBacktraces); + return cmMakeRange(impl->LinkOptionsBacktraces); } cmStringRange cmTarget::GetLinkDirectoriesEntries() const { - return cmMakeRange(this->Internal->LinkDirectoriesEntries); + return cmMakeRange(impl->LinkDirectoriesEntries); } cmBacktraceRange cmTarget::GetLinkDirectoriesBacktraces() const { - return cmMakeRange(this->Internal->LinkDirectoriesBacktraces); + return cmMakeRange(impl->LinkDirectoriesBacktraces); } cmStringRange cmTarget::GetLinkImplementationEntries() const { - return cmMakeRange(this->Internal->LinkImplementationPropertyEntries); + return cmMakeRange(impl->LinkImplementationPropertyEntries); } cmBacktraceRange cmTarget::GetLinkImplementationBacktraces() const { - return cmMakeRange(this->Internal->LinkImplementationPropertyBacktraces); + return cmMakeRange(impl->LinkImplementationPropertyBacktraces); } void cmTarget::SetProperty(const std::string& prop, const char* value) { if (!cmTargetPropertyComputer::PassesWhitelist( - this->GetType(), prop, this->Makefile->GetMessenger(), - this->Makefile->GetBacktrace())) { + this->GetType(), prop, impl->Makefile->GetMessenger(), + impl->Makefile->GetBacktrace())) { return; } #define MAKE_STATIC_PROP(PROP) static const std::string prop##PROP = #PROP @@ -918,133 +1062,133 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) if (prop == propMANUALLY_ADDED_DEPENDENCIES) { std::ostringstream e; e << "MANUALLY_ADDED_DEPENDENCIES property is read-only\n"; - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); + impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } if (prop == propNAME) { std::ostringstream e; e << "NAME property is read-only\n"; - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); + impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } if (prop == propTYPE) { std::ostringstream e; e << "TYPE property is read-only\n"; - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); + impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } if (prop == propEXPORT_NAME && this->IsImported()) { std::ostringstream e; e << "EXPORT_NAME property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); + << impl->Name << "\")\n"; + impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } if (prop == propSOURCES && this->IsImported()) { std::ostringstream e; - e << "SOURCES property can't be set on imported targets (\"" << this->Name + e << "SOURCES property can't be set on imported targets (\"" << impl->Name << "\")\n"; - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); + impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } if (prop == propIMPORTED_GLOBAL && !this->IsImported()) { std::ostringstream e; e << "IMPORTED_GLOBAL property can't be set on non-imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); + << impl->Name << "\")\n"; + impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } if (prop == propINCLUDE_DIRECTORIES) { - this->Internal->IncludeDirectoriesEntries.clear(); - this->Internal->IncludeDirectoriesBacktraces.clear(); + impl->IncludeDirectoriesEntries.clear(); + impl->IncludeDirectoriesBacktraces.clear(); if (value) { - this->Internal->IncludeDirectoriesEntries.emplace_back(value); - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->IncludeDirectoriesBacktraces.push_back(lfbt); + impl->IncludeDirectoriesEntries.emplace_back(value); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->IncludeDirectoriesBacktraces.push_back(lfbt); } } else if (prop == propCOMPILE_OPTIONS) { - this->Internal->CompileOptionsEntries.clear(); - this->Internal->CompileOptionsBacktraces.clear(); + impl->CompileOptionsEntries.clear(); + impl->CompileOptionsBacktraces.clear(); if (value) { - this->Internal->CompileOptionsEntries.emplace_back(value); - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->CompileOptionsBacktraces.push_back(lfbt); + impl->CompileOptionsEntries.emplace_back(value); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->CompileOptionsBacktraces.push_back(lfbt); } } else if (prop == propCOMPILE_FEATURES) { - this->Internal->CompileFeaturesEntries.clear(); - this->Internal->CompileFeaturesBacktraces.clear(); + impl->CompileFeaturesEntries.clear(); + impl->CompileFeaturesBacktraces.clear(); if (value) { - this->Internal->CompileFeaturesEntries.emplace_back(value); - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->CompileFeaturesBacktraces.push_back(lfbt); + impl->CompileFeaturesEntries.emplace_back(value); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->CompileFeaturesBacktraces.push_back(lfbt); } } else if (prop == propCOMPILE_DEFINITIONS) { - this->Internal->CompileDefinitionsEntries.clear(); - this->Internal->CompileDefinitionsBacktraces.clear(); + impl->CompileDefinitionsEntries.clear(); + impl->CompileDefinitionsBacktraces.clear(); if (value) { - this->Internal->CompileDefinitionsEntries.emplace_back(value); - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->CompileDefinitionsBacktraces.push_back(lfbt); + impl->CompileDefinitionsEntries.emplace_back(value); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->CompileDefinitionsBacktraces.push_back(lfbt); } } else if (prop == propLINK_OPTIONS) { - this->Internal->LinkOptionsEntries.clear(); - this->Internal->LinkOptionsBacktraces.clear(); + impl->LinkOptionsEntries.clear(); + impl->LinkOptionsBacktraces.clear(); if (value) { - this->Internal->LinkOptionsEntries.emplace_back(value); - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->LinkOptionsBacktraces.push_back(lfbt); + impl->LinkOptionsEntries.emplace_back(value); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->LinkOptionsBacktraces.push_back(lfbt); } } else if (prop == propLINK_DIRECTORIES) { - this->Internal->LinkDirectoriesEntries.clear(); - this->Internal->LinkDirectoriesBacktraces.clear(); + impl->LinkDirectoriesEntries.clear(); + impl->LinkDirectoriesBacktraces.clear(); if (value) { - this->Internal->LinkDirectoriesEntries.emplace_back(value); - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->LinkDirectoriesBacktraces.push_back(lfbt); + impl->LinkDirectoriesEntries.emplace_back(value); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->LinkDirectoriesBacktraces.push_back(lfbt); } } else if (prop == propLINK_LIBRARIES) { - this->Internal->LinkImplementationPropertyEntries.clear(); - this->Internal->LinkImplementationPropertyBacktraces.clear(); + impl->LinkImplementationPropertyEntries.clear(); + impl->LinkImplementationPropertyBacktraces.clear(); if (value) { - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->LinkImplementationPropertyEntries.emplace_back(value); - this->Internal->LinkImplementationPropertyBacktraces.push_back(lfbt); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->LinkImplementationPropertyEntries.emplace_back(value); + impl->LinkImplementationPropertyBacktraces.push_back(lfbt); } } else if (prop == propSOURCES) { - this->Internal->SourceEntries.clear(); - this->Internal->SourceBacktraces.clear(); + impl->SourceEntries.clear(); + impl->SourceBacktraces.clear(); if (value) { - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->SourceEntries.emplace_back(value); - this->Internal->SourceBacktraces.push_back(lfbt); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->SourceEntries.emplace_back(value); + impl->SourceBacktraces.push_back(lfbt); } } else if (prop == propIMPORTED_GLOBAL) { if (!cmSystemTools::IsOn(value)) { std::ostringstream e; e << "IMPORTED_GLOBAL property can't be set to FALSE on targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); + << impl->Name << "\")\n"; + impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } /* no need to change anything if value does not change */ - if (!this->ImportedGloballyVisible) { - this->ImportedGloballyVisible = true; + if (!impl->ImportedGloballyVisible) { + impl->ImportedGloballyVisible = true; this->GetGlobalGenerator()->IndexTarget(this); } } else if (cmHasLiteralPrefix(prop, "IMPORTED_LIBNAME") && - !this->CheckImportedLibName(prop, value ? value : "")) { + !impl->CheckImportedLibName(prop, value ? value : "")) { /* error was reported by check method */ } else if (prop == propCUDA_PTX_COMPILATION && this->GetType() != cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "CUDA_PTX_COMPILATION property can only be applied to OBJECT " "targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); + << impl->Name << "\")\n"; + impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } else { - this->Properties.SetProperty(prop, value); + impl->Properties.SetProperty(prop, value); } } @@ -1052,89 +1196,89 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, bool asString) { if (!cmTargetPropertyComputer::PassesWhitelist( - this->GetType(), prop, this->Makefile->GetMessenger(), - this->Makefile->GetBacktrace())) { + this->GetType(), prop, impl->Makefile->GetMessenger(), + impl->Makefile->GetBacktrace())) { return; } if (prop == "NAME") { std::ostringstream e; e << "NAME property is read-only\n"; - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); + impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } if (prop == "EXPORT_NAME" && this->IsImported()) { std::ostringstream e; e << "EXPORT_NAME property can't be set on imported targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); + << impl->Name << "\")\n"; + impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } if (prop == "SOURCES" && this->IsImported()) { std::ostringstream e; - e << "SOURCES property can't be set on imported targets (\"" << this->Name + e << "SOURCES property can't be set on imported targets (\"" << impl->Name << "\")\n"; - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); + impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } if (prop == "IMPORTED_GLOBAL") { std::ostringstream e; e << "IMPORTED_GLOBAL property can't be appended, only set on imported " "targets (\"" - << this->Name << "\")\n"; - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); + << impl->Name << "\")\n"; + impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } if (prop == "INCLUDE_DIRECTORIES") { if (value && *value) { - this->Internal->IncludeDirectoriesEntries.emplace_back(value); - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->IncludeDirectoriesBacktraces.push_back(lfbt); + impl->IncludeDirectoriesEntries.emplace_back(value); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->IncludeDirectoriesBacktraces.push_back(lfbt); } } else if (prop == "COMPILE_OPTIONS") { if (value && *value) { - this->Internal->CompileOptionsEntries.emplace_back(value); - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->CompileOptionsBacktraces.push_back(lfbt); + impl->CompileOptionsEntries.emplace_back(value); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->CompileOptionsBacktraces.push_back(lfbt); } } else if (prop == "COMPILE_FEATURES") { if (value && *value) { - this->Internal->CompileFeaturesEntries.emplace_back(value); - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->CompileFeaturesBacktraces.push_back(lfbt); + impl->CompileFeaturesEntries.emplace_back(value); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->CompileFeaturesBacktraces.push_back(lfbt); } } else if (prop == "COMPILE_DEFINITIONS") { if (value && *value) { - this->Internal->CompileDefinitionsEntries.emplace_back(value); - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->CompileDefinitionsBacktraces.push_back(lfbt); + impl->CompileDefinitionsEntries.emplace_back(value); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->CompileDefinitionsBacktraces.push_back(lfbt); } } else if (prop == "LINK_OPTIONS") { if (value && *value) { - this->Internal->LinkOptionsEntries.emplace_back(value); - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->LinkOptionsBacktraces.push_back(lfbt); + impl->LinkOptionsEntries.emplace_back(value); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->LinkOptionsBacktraces.push_back(lfbt); } } else if (prop == "LINK_DIRECTORIES") { if (value && *value) { - this->Internal->LinkDirectoriesEntries.emplace_back(value); - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->LinkDirectoriesBacktraces.push_back(lfbt); + impl->LinkDirectoriesEntries.emplace_back(value); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->LinkDirectoriesBacktraces.push_back(lfbt); } } else if (prop == "LINK_LIBRARIES") { if (value && *value) { - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->LinkImplementationPropertyEntries.emplace_back(value); - this->Internal->LinkImplementationPropertyBacktraces.push_back(lfbt); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->LinkImplementationPropertyEntries.emplace_back(value); + impl->LinkImplementationPropertyBacktraces.push_back(lfbt); } } else if (prop == "SOURCES") { - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - this->Internal->SourceEntries.emplace_back(value); - this->Internal->SourceBacktraces.push_back(lfbt); + cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); + impl->SourceEntries.emplace_back(value); + impl->SourceBacktraces.push_back(lfbt); } else if (cmHasLiteralPrefix(prop, "IMPORTED_LIBNAME")) { - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, + impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, prop + " property may not be APPENDed."); } else { - this->Properties.AppendProperty(prop, value, asString); + impl->Properties.AppendProperty(prop, value, asString); } } @@ -1147,17 +1291,17 @@ void cmTarget::AppendBuildInterfaceIncludes() !this->IsExecutableWithExports()) { return; } - if (this->BuildInterfaceIncludesAppended) { + if (impl->BuildInterfaceIncludesAppended) { return; } - this->BuildInterfaceIncludesAppended = true; + impl->BuildInterfaceIncludesAppended = true; - if (this->Makefile->IsOn("CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE")) { - std::string dirs = this->Makefile->GetCurrentBinaryDirectory(); + if (impl->Makefile->IsOn("CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE")) { + std::string dirs = impl->Makefile->GetCurrentBinaryDirectory(); if (!dirs.empty()) { dirs += ';'; } - dirs += this->Makefile->GetCurrentSourceDirectory(); + dirs += impl->Makefile->GetCurrentSourceDirectory(); if (!dirs.empty()) { this->AppendProperty("INTERFACE_INCLUDE_DIRECTORIES", ("$<BUILD_INTERFACE:" + dirs + ">").c_str()); @@ -1169,67 +1313,66 @@ void cmTarget::InsertInclude(std::string const& entry, cmListFileBacktrace const& bt, bool before) { std::vector<std::string>::iterator position = before - ? this->Internal->IncludeDirectoriesEntries.begin() - : this->Internal->IncludeDirectoriesEntries.end(); + ? impl->IncludeDirectoriesEntries.begin() + : impl->IncludeDirectoriesEntries.end(); std::vector<cmListFileBacktrace>::iterator btPosition = before - ? this->Internal->IncludeDirectoriesBacktraces.begin() - : this->Internal->IncludeDirectoriesBacktraces.end(); + ? impl->IncludeDirectoriesBacktraces.begin() + : impl->IncludeDirectoriesBacktraces.end(); - this->Internal->IncludeDirectoriesEntries.insert(position, entry); - this->Internal->IncludeDirectoriesBacktraces.insert(btPosition, bt); + impl->IncludeDirectoriesEntries.insert(position, entry); + impl->IncludeDirectoriesBacktraces.insert(btPosition, bt); } void cmTarget::InsertCompileOption(std::string const& entry, cmListFileBacktrace const& bt, bool before) { std::vector<std::string>::iterator position = before - ? this->Internal->CompileOptionsEntries.begin() - : this->Internal->CompileOptionsEntries.end(); + ? impl->CompileOptionsEntries.begin() + : impl->CompileOptionsEntries.end(); std::vector<cmListFileBacktrace>::iterator btPosition = before - ? this->Internal->CompileOptionsBacktraces.begin() - : this->Internal->CompileOptionsBacktraces.end(); + ? impl->CompileOptionsBacktraces.begin() + : impl->CompileOptionsBacktraces.end(); - this->Internal->CompileOptionsEntries.insert(position, entry); - this->Internal->CompileOptionsBacktraces.insert(btPosition, bt); + impl->CompileOptionsEntries.insert(position, entry); + impl->CompileOptionsBacktraces.insert(btPosition, bt); } void cmTarget::InsertCompileDefinition(std::string const& entry, cmListFileBacktrace const& bt) { - this->Internal->CompileDefinitionsEntries.push_back(entry); - this->Internal->CompileDefinitionsBacktraces.push_back(bt); + impl->CompileDefinitionsEntries.push_back(entry); + impl->CompileDefinitionsBacktraces.push_back(bt); } void cmTarget::InsertLinkOption(std::string const& entry, cmListFileBacktrace const& bt, bool before) { - std::vector<std::string>::iterator position = before - ? this->Internal->LinkOptionsEntries.begin() - : this->Internal->LinkOptionsEntries.end(); + std::vector<std::string>::iterator position = + before ? impl->LinkOptionsEntries.begin() : impl->LinkOptionsEntries.end(); std::vector<cmListFileBacktrace>::iterator btPosition = before - ? this->Internal->LinkOptionsBacktraces.begin() - : this->Internal->LinkOptionsBacktraces.end(); + ? impl->LinkOptionsBacktraces.begin() + : impl->LinkOptionsBacktraces.end(); - this->Internal->LinkOptionsEntries.insert(position, entry); - this->Internal->LinkOptionsBacktraces.insert(btPosition, bt); + impl->LinkOptionsEntries.insert(position, entry); + impl->LinkOptionsBacktraces.insert(btPosition, bt); } void cmTarget::InsertLinkDirectory(std::string const& entry, cmListFileBacktrace const& bt, bool before) { std::vector<std::string>::iterator position = before - ? this->Internal->LinkDirectoriesEntries.begin() - : this->Internal->LinkDirectoriesEntries.end(); + ? impl->LinkDirectoriesEntries.begin() + : impl->LinkDirectoriesEntries.end(); std::vector<cmListFileBacktrace>::iterator btPosition = before - ? this->Internal->LinkDirectoriesBacktraces.begin() - : this->Internal->LinkDirectoriesBacktraces.end(); + ? impl->LinkDirectoriesBacktraces.begin() + : impl->LinkDirectoriesBacktraces.end(); - this->Internal->LinkDirectoriesEntries.insert(position, entry); - this->Internal->LinkDirectoriesBacktraces.insert(btPosition, bt); + impl->LinkDirectoriesEntries.insert(position, entry); + impl->LinkDirectoriesBacktraces.insert(btPosition, bt); } static void cmTargetCheckLINK_INTERFACE_LIBRARIES(const std::string& prop, @@ -1380,12 +1523,12 @@ const char* cmTarget::GetProperty(const std::string& prop) const } if (specialProps.count(prop)) { if (prop == propLINK_LIBRARIES) { - if (this->Internal->LinkImplementationPropertyEntries.empty()) { + if (impl->LinkImplementationPropertyEntries.empty()) { return nullptr; } static std::string output; - output = cmJoin(this->Internal->LinkImplementationPropertyEntries, ";"); + output = cmJoin(impl->LinkImplementationPropertyEntries, ";"); return output.c_str(); } // the type property returns what type the target is @@ -1393,67 +1536,67 @@ const char* cmTarget::GetProperty(const std::string& prop) const return cmState::GetTargetTypeName(this->GetType()); } if (prop == propINCLUDE_DIRECTORIES) { - if (this->Internal->IncludeDirectoriesEntries.empty()) { + if (impl->IncludeDirectoriesEntries.empty()) { return nullptr; } static std::string output; - output = cmJoin(this->Internal->IncludeDirectoriesEntries, ";"); + output = cmJoin(impl->IncludeDirectoriesEntries, ";"); return output.c_str(); } if (prop == propCOMPILE_FEATURES) { - if (this->Internal->CompileFeaturesEntries.empty()) { + if (impl->CompileFeaturesEntries.empty()) { return nullptr; } static std::string output; - output = cmJoin(this->Internal->CompileFeaturesEntries, ";"); + output = cmJoin(impl->CompileFeaturesEntries, ";"); return output.c_str(); } if (prop == propCOMPILE_OPTIONS) { - if (this->Internal->CompileOptionsEntries.empty()) { + if (impl->CompileOptionsEntries.empty()) { return nullptr; } static std::string output; - output = cmJoin(this->Internal->CompileOptionsEntries, ";"); + output = cmJoin(impl->CompileOptionsEntries, ";"); return output.c_str(); } if (prop == propCOMPILE_DEFINITIONS) { - if (this->Internal->CompileDefinitionsEntries.empty()) { + if (impl->CompileDefinitionsEntries.empty()) { return nullptr; } static std::string output; - output = cmJoin(this->Internal->CompileDefinitionsEntries, ";"); + output = cmJoin(impl->CompileDefinitionsEntries, ";"); return output.c_str(); } if (prop == propLINK_OPTIONS) { - if (this->Internal->LinkOptionsEntries.empty()) { + if (impl->LinkOptionsEntries.empty()) { return nullptr; } static std::string output; - output = cmJoin(this->Internal->LinkOptionsEntries, ";"); + output = cmJoin(impl->LinkOptionsEntries, ";"); return output.c_str(); } if (prop == propLINK_DIRECTORIES) { - if (this->Internal->LinkDirectoriesEntries.empty()) { + if (impl->LinkDirectoriesEntries.empty()) { return nullptr; } static std::string output; - output = cmJoin(this->Internal->LinkDirectoriesEntries, ";"); + output = cmJoin(impl->LinkDirectoriesEntries, ";"); return output.c_str(); } if (prop == propMANUALLY_ADDED_DEPENDENCIES) { - if (this->Utilities.empty()) { + if (impl->Utilities.empty()) { return nullptr; } static std::string output; - output = cmJoin(this->Utilities, ";"); + output = cmJoin(impl->Utilities, ";"); return output.c_str(); } if (prop == propIMPORTED) { @@ -1466,27 +1609,25 @@ const char* cmTarget::GetProperty(const std::string& prop) const return this->GetName().c_str(); } if (prop == propBINARY_DIR) { - return this->GetMakefile() - ->GetStateSnapshot() + return impl->Makefile->GetStateSnapshot() .GetDirectory() .GetCurrentBinary() .c_str(); } if (prop == propSOURCE_DIR) { - return this->GetMakefile() - ->GetStateSnapshot() + return impl->Makefile->GetStateSnapshot() .GetDirectory() .GetCurrentSource() .c_str(); } } - const char* retVal = this->Properties.GetPropertyValue(prop); + const char* retVal = impl->Properties.GetPropertyValue(prop); if (!retVal) { - const bool chain = this->GetMakefile()->GetState()->IsPropertyChained( - prop, cmProperty::TARGET); + const bool chain = + impl->Makefile->GetState()->IsPropertyChained(prop, cmProperty::TARGET); if (chain) { - return this->Makefile->GetStateSnapshot().GetDirectory().GetProperty( + return impl->Makefile->GetStateSnapshot().GetDirectory().GetProperty( prop, chain); } } @@ -1507,6 +1648,21 @@ bool cmTarget::GetPropertyAsBool(const std::string& prop) const return cmSystemTools::IsOn(this->GetProperty(prop)); } +cmPropertyMap const& cmTarget::GetProperties() const +{ + return impl->Properties; +} + +bool cmTarget::IsImported() const +{ + return impl->IsImportedTarget; +} + +bool cmTarget::IsImportedGloballyVisible() const +{ + return impl->ImportedGloballyVisible; +} + const char* cmTarget::GetSuffixVariableInternal( cmStateEnums::ArtifactType artifact) const { @@ -1534,7 +1690,7 @@ const char* cmTarget::GetSuffixVariableInternal( case cmStateEnums::RuntimeBinaryArtifact: // Android GUI application packages store the native // binary as a shared library. - return (this->IsAndroid && this->GetPropertyAsBool("ANDROID_GUI") + return (impl->IsAndroid && this->GetPropertyAsBool("ANDROID_GUI") ? "CMAKE_SHARED_LIBRARY_SUFFIX" : "CMAKE_EXECUTABLE_SUFFIX"); case cmStateEnums::ImportLibraryArtifact: @@ -1574,7 +1730,7 @@ const char* cmTarget::GetPrefixVariableInternal( case cmStateEnums::RuntimeBinaryArtifact: // Android GUI application packages store the native // binary as a shared library. - return (this->IsAndroid && this->GetPropertyAsBool("ANDROID_GUI") + return (impl->IsAndroid && this->GetPropertyAsBool("ANDROID_GUI") ? "CMAKE_SHARED_LIBRARY_PREFIX" : ""); case cmStateEnums::ImportLibraryArtifact: @@ -1648,25 +1804,11 @@ std::string cmTarget::ImportedGetFullPath( return result; } -void cmTarget::SetPropertyDefault(const std::string& property, - const char* default_value) -{ - // Compute the name of the variable holding the default value. - std::string var = "CMAKE_"; - var += property; - - if (const char* value = this->Makefile->GetDefinition(var)) { - this->SetProperty(property, value); - } else if (default_value) { - this->SetProperty(property, default_value); - } -} - -bool cmTarget::CheckImportedLibName(std::string const& prop, - std::string const& value) const +bool cmTargetInternals::CheckImportedLibName(std::string const& prop, + std::string const& value) const { - if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY || - !this->IsImported()) { + if (this->TargetType != cmStateEnums::INTERFACE_LIBRARY || + !this->IsImportedTarget) { this->Makefile->IssueMessage( MessageType::FATAL_ERROR, prop + @@ -1726,7 +1868,9 @@ bool cmTarget::GetMappedConfig(std::string const& desired_config, // If we needed to find one of the mapped configurations but did not // On a DLL platform there may be only IMPORTED_IMPLIB for a shared // library or an executable with exports. - bool allowImp = this->HasImportLibrary(); + bool allowImp = (impl->DLLPlatform && + (this->GetType() == cmStateEnums::SHARED_LIBRARY || + this->IsExecutableWithExports())); // If a mapping was found, check its configurations. for (std::vector<std::string>::const_iterator mci = mappedConfigs.begin(); @@ -1829,37 +1973,3 @@ bool cmTarget::GetMappedConfig(std::string const& desired_config, return true; } - -cmTargetInternalPointer::cmTargetInternalPointer() -{ - this->Pointer = new cmTargetInternals; -} - -cmTargetInternalPointer::cmTargetInternalPointer( - cmTargetInternalPointer const& r) -{ - // Ideally cmTarget instances should never be copied. However until - // we can make a sweep to remove that, this copy constructor avoids - // allowing the resources (Internals) to be copied. - this->Pointer = new cmTargetInternals(*r.Pointer); -} - -cmTargetInternalPointer::~cmTargetInternalPointer() -{ - delete this->Pointer; -} - -cmTargetInternalPointer& cmTargetInternalPointer::operator=( - cmTargetInternalPointer const& r) -{ - if (this == &r) { - return *this; - } // avoid warning on HP about self check - // Ideally cmTarget instances should never be copied. However until - // we can make a sweep to remove that, this copy constructor avoids - // allowing the resources (Internals) to be copied. - cmTargetInternals* oldPointer = this->Pointer; - this->Pointer = new cmTargetInternals(*r.Pointer); - delete oldPointer; - return *this; -} diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 24b3742..5d90ba7 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -6,6 +6,7 @@ #include "cmConfigure.h" // IWYU pragma: keep #include <iosfwd> +#include <memory> // IWYU pragma: keep #include <set> #include <string> #include <unordered_map> @@ -13,38 +14,23 @@ #include <vector> #include "cmAlgorithms.h" -#include "cmCustomCommand.h" #include "cmListFileCache.h" #include "cmPolicies.h" -#include "cmPropertyMap.h" #include "cmStateTypes.h" #include "cmTargetLinkLibraryType.h" +class cmCustomCommand; class cmGlobalGenerator; class cmMakefile; class cmMessenger; +class cmPropertyMap; class cmSourceFile; class cmTargetInternals; -class cmTargetInternalPointer -{ -public: - cmTargetInternalPointer(); - cmTargetInternalPointer(cmTargetInternalPointer const& r); - ~cmTargetInternalPointer(); - cmTargetInternalPointer& operator=(cmTargetInternalPointer const& r); - cmTargetInternals* operator->() const { return this->Pointer; } - cmTargetInternals* Get() const { return this->Pointer; } - -private: - cmTargetInternals* Pointer; -}; - /** \class cmTarget * \brief Represent a library or executable target loaded from a makefile. * - * cmTarget represents a target loaded from - * a makefile. + * cmTarget represents a target loaded from a makefile. */ class cmTarget { @@ -56,9 +42,6 @@ public: VisibilityImportedGlobally }; - cmTarget(std::string const& name, cmStateEnums::TargetType type, - Visibility vis, cmMakefile* mf); - enum CustomCommandType { PRE_BUILD, @@ -66,77 +49,68 @@ public: POST_BUILD }; - /** - * Return the type of target. - */ - cmStateEnums::TargetType GetType() const { return this->TargetTypeValue; } + cmTarget(std::string const& name, cmStateEnums::TargetType type, + Visibility vis, cmMakefile* mf); + + cmTarget(cmTarget const&) = delete; + cmTarget(cmTarget&&) noexcept; + ~cmTarget(); + + cmTarget& operator=(cmTarget const&) = delete; + cmTarget& operator=(cmTarget&&) noexcept; + + ///! Return the type of target. + cmStateEnums::TargetType GetType() const; + + ///! Get the cmMakefile that owns this target. + cmMakefile* GetMakefile() const; + ///! Return the global generator. cmGlobalGenerator* GetGlobalGenerator() const; ///! Set/Get the name of the target - const std::string& GetName() const { return this->Name; } + const std::string& GetName() const; - /** Get the cmMakefile that owns this target. */ - cmMakefile* GetMakefile() const { return this->Makefile; } + ///! Get the policy map + cmPolicies::PolicyMap const& GetPolicyMap() const; + + ///! Get policy status + cmPolicies::PolicyStatus GetPolicyStatus(cmPolicies::PolicyID policy) const; #define DECLARE_TARGET_POLICY(POLICY) \ cmPolicies::PolicyStatus GetPolicyStatus##POLICY() const \ { \ - return this->PolicyMap.Get(cmPolicies::POLICY); \ + return this->GetPolicyStatus(cmPolicies::POLICY); \ } CM_FOR_EACH_TARGET_POLICY(DECLARE_TARGET_POLICY) #undef DECLARE_TARGET_POLICY - /** - * Get the list of the custom commands for this target - */ - std::vector<cmCustomCommand> const& GetPreBuildCommands() const - { - return this->PreBuildCommands; - } - std::vector<cmCustomCommand> const& GetPreLinkCommands() const - { - return this->PreLinkCommands; - } - std::vector<cmCustomCommand> const& GetPostBuildCommands() const - { - return this->PostBuildCommands; - } - void AddPreBuildCommand(cmCustomCommand const& cmd) - { - this->PreBuildCommands.push_back(cmd); - } - void AddPreLinkCommand(cmCustomCommand const& cmd) - { - this->PreLinkCommands.push_back(cmd); - } - void AddPostBuildCommand(cmCustomCommand const& cmd) - { - this->PostBuildCommands.push_back(cmd); - } + ///! Get the list of the PRE_BUILD custom commands for this target + std::vector<cmCustomCommand> const& GetPreBuildCommands() const; + void AddPreBuildCommand(cmCustomCommand const& cmd); - /** - * Add sources to the target. - */ + ///! Get the list of the PRE_LINK custom commands for this target + std::vector<cmCustomCommand> const& GetPreLinkCommands() const; + void AddPreLinkCommand(cmCustomCommand const& cmd); + + ///! Get the list of the POST_BUILD custom commands for this target + std::vector<cmCustomCommand> const& GetPostBuildCommands() const; + void AddPostBuildCommand(cmCustomCommand const& cmd); + + ///! Add sources to the target. void AddSources(std::vector<std::string> const& srcs); void AddTracedSources(std::vector<std::string> const& srcs); cmSourceFile* AddSourceCMP0049(const std::string& src); cmSourceFile* AddSource(const std::string& src, bool before = false); - //* how we identify a library, by name and type + ///! how we identify a library, by name and type typedef std::pair<std::string, cmTargetLinkLibraryType> LibraryID; - typedef std::vector<LibraryID> LinkLibraryVectorType; - const LinkLibraryVectorType& GetOriginalLinkLibraries() const - { - return this->OriginalLinkLibraries; - } + LinkLibraryVectorType const& GetOriginalLinkLibraries() const; - /** - * Clear the dependency information recorded for this target, if any. - */ + ///! Clear the dependency information recorded for this target, if any. void ClearDependencyInformation(cmMakefile& mf); void AddLinkLibrary(cmMakefile& mf, const std::string& lib, @@ -157,44 +131,36 @@ public: * Set the path where this target should be installed. This is relative to * INSTALL_PREFIX */ - std::string GetInstallPath() const { return this->InstallPath; } - void SetInstallPath(const char* name) { this->InstallPath = name; } + std::string const& GetInstallPath() const; + void SetInstallPath(std::string const& name); /** * Set the path where this target (if it has a runtime part) should be * installed. This is relative to INSTALL_PREFIX */ - std::string GetRuntimeInstallPath() const - { - return this->RuntimeInstallPath; - } - void SetRuntimeInstallPath(const char* name) - { - this->RuntimeInstallPath = name; - } + std::string const& GetRuntimeInstallPath() const; + void SetRuntimeInstallPath(std::string const& name); /** * Get/Set whether there is an install rule for this target. */ - bool GetHaveInstallRule() const { return this->HaveInstallRule; } - void SetHaveInstallRule(bool h) { this->HaveInstallRule = h; } + bool GetHaveInstallRule() const; + void SetHaveInstallRule(bool hir); /** * Get/Set whether this target was auto-created by a generator. */ - bool GetIsGeneratorProvided() const { return this->IsGeneratorProvided; } - void SetIsGeneratorProvided(bool igp) { this->IsGeneratorProvided = igp; } + bool GetIsGeneratorProvided() const; + void SetIsGeneratorProvided(bool igp); - /** Add a utility on which this project depends. A utility is an executable + /** + * Add a utility on which this project depends. A utility is an executable * name as would be specified to the ADD_EXECUTABLE or UTILITY_SOURCE * commands. It is not a full path nor does it have an extension. */ - void AddUtility(std::string const& u, cmMakefile* mf = nullptr); + void AddUtility(std::string const& name, cmMakefile* mf = nullptr); ///! Get the utilities used by this target - std::set<BT<std::string>> const& GetUtilities() const - { - return this->Utilities; - } + std::set<BT<std::string>> const& GetUtilities() const; ///! Set/Get a property of this target file void SetProperty(const std::string& prop, const char* value); @@ -209,31 +175,25 @@ public: const char* GetComputedProperty(const std::string& prop, cmMessenger* messenger, cmListFileBacktrace const& context) const; + ///! Get all properties + cmPropertyMap const& GetProperties() const; - bool IsImported() const { return this->IsImportedTarget; } - bool IsImportedGloballyVisible() const - { - return this->ImportedGloballyVisible; - } - - // Get the properties - cmPropertyMap const& GetProperties() const { return this->Properties; } + bool IsImported() const; + bool IsImportedGloballyVisible() const; bool GetMappedConfig(std::string const& desired_config, const char** loc, const char** imp, std::string& suffix) const; - /** Return whether this target is an executable with symbol exports - enabled. */ + ///! Return whether this target is an executable with symbol exports enabled. bool IsExecutableWithExports() const; - /** Return whether this target is a shared library Framework on - Apple. */ + ///! Return whether this target is a shared library Framework on Apple. bool IsFrameworkOnApple() const; - /** Return whether this target is an executable Bundle on Apple. */ + ///! Return whether this target is an executable Bundle on Apple. bool IsAppBundleOnApple() const; - /** Get a backtrace from the creation of the target. */ + ///! Get a backtrace from the creation of the target. cmListFileBacktrace const& GetBacktrace() const; void InsertInclude(std::string const& entry, cmListFileBacktrace const& bt, @@ -252,11 +212,8 @@ public: std::string GetDebugGeneratorExpressions(const std::string& value, cmTargetLinkLibraryType llt) const; - void AddSystemIncludeDirectories(const std::set<std::string>& incs); - std::set<std::string> const& GetSystemIncludeDirectories() const - { - return this->SystemIncludeDirectories; - } + void AddSystemIncludeDirectories(std::set<std::string> const& incs); + std::set<std::string> const& GetSystemIncludeDirectories() const; cmStringRange GetIncludeDirectoriesEntries() const; cmBacktraceRange GetIncludeDirectoriesBacktraces() const; @@ -282,63 +239,25 @@ public: cmStringRange GetLinkImplementationEntries() const; cmBacktraceRange GetLinkImplementationBacktraces() const; + std::string ImportedGetFullPath(const std::string& config, + cmStateEnums::ArtifactType artifact) const; + struct StrictTargetComparison { bool operator()(cmTarget const* t1, cmTarget const* t2) const; }; - std::string ImportedGetFullPath(const std::string& config, - cmStateEnums::ArtifactType artifact) const; - private: + // Internal representation details. + friend class cmGeneratorTarget; + const char* GetSuffixVariableInternal( cmStateEnums::ArtifactType artifact) const; const char* GetPrefixVariableInternal( cmStateEnums::ArtifactType artifact) const; - // Use a makefile variable to set a default for the given property. - // If the variable is not defined use the given default instead. - void SetPropertyDefault(const std::string& property, - const char* default_value); - - bool CheckImportedLibName(std::string const& prop, - std::string const& value) const; - private: - bool IsGeneratorProvided; - cmPropertyMap Properties; - std::set<std::string> SystemIncludeDirectories; - std::set<BT<std::string>> Utilities; - cmPolicies::PolicyMap PolicyMap; - std::string Name; - std::string InstallPath; - std::string RuntimeInstallPath; - std::vector<cmCustomCommand> PreBuildCommands; - std::vector<cmCustomCommand> PreLinkCommands; - std::vector<cmCustomCommand> PostBuildCommands; - std::vector<std::pair<TLLSignature, cmListFileContext>> TLLCommands; - LinkLibraryVectorType OriginalLinkLibraries; - cmMakefile* Makefile; - cmTargetInternalPointer Internal; - cmStateEnums::TargetType TargetTypeValue; - bool HaveInstallRule; - bool DLLPlatform; - bool IsAndroid; - bool IsImportedTarget; - bool ImportedGloballyVisible; - bool BuildInterfaceIncludesAppended; - - std::string ProcessSourceItemCMP0049(const std::string& s); - - /** Return whether or not the target has a DLL import library. */ - bool HasImportLibrary() const; - - // Internal representation details. - friend class cmTargetInternals; - friend class cmGeneratorTarget; - friend class cmTargetTraceDependencies; - - cmListFileBacktrace Backtrace; + std::unique_ptr<cmTargetInternals> impl; }; typedef std::unordered_map<std::string, cmTarget> cmTargets; diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 5c9f25e..8804e6c 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -4,6 +4,7 @@ #include "cmAlgorithms.h" #include "cmComputeLinkInformation.h" +#include "cmCustomCommand.h" #include "cmCustomCommandGenerator.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorExpression.h" diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 8c1a359..fc24ac0 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -710,6 +710,7 @@ void cmake::SetArgs(const std::vector<std::string>& args) this->GraphVizFile = path; if (this->GraphVizFile.empty()) { cmSystemTools::Error("No file specified for --graphviz"); + return; } } else if (arg.find("--debug-trycompile", 0) == 0) { std::cout << "debug trycompile on\n"; @@ -797,9 +798,9 @@ void cmake::SetArgs(const std::vector<std::string>& args) cmSystemTools::Error("Could not create named generator " + value + kdevError); this->PrintGeneratorList(); - } else { - this->SetGlobalGenerator(gen); + return; } + this->SetGlobalGenerator(gen); } // no option assume it is the path to the source or an existing build else { diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index 8577506..db4ef90 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -172,6 +172,9 @@ ENDIF() IF(KWSYS_USE_Directory) SET(KWSYS_USE_Encoding 1) ENDIF() +IF(KWSYS_USE_DynamicLoader) + SET(KWSYS_USE_Encoding 1) +ENDIF() IF(KWSYS_USE_FStream) SET(KWSYS_USE_Encoding 1) ENDIF() @@ -1096,6 +1099,20 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) ADD_LIBRARY(${KWSYS_NAMESPACE}TestDynload MODULE testDynload.c) SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestDynload PROPERTY LABELS ${KWSYS_LABELS_LIB}) ADD_DEPENDENCIES(${KWSYS_NAMESPACE}TestDynload ${KWSYS_TARGET_INTERFACE}) + + if (WIN32) + # Windows tests supported flags. + add_library(${KWSYS_NAMESPACE}TestDynloadImpl SHARED testDynloadImpl.c) + set_property(TARGET ${KWSYS_NAMESPACE}TestDynloadImpl PROPERTY LABELS ${KWSYS_LABELS_LIB}) + set_property(TARGET ${KWSYS_NAMESPACE}TestDynloadImpl PROPERTY DEFINE_SYMBOL BUILDING_TestDynloadImpl) + set_property(TARGET ${KWSYS_NAMESPACE}TestDynloadImpl PROPERTY RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/dynloaddir") + add_dependencies(${KWSYS_NAMESPACE}TestDynloadImpl ${KWSYS_TARGET_INTERFACE}) + add_library(${KWSYS_NAMESPACE}TestDynloadUse MODULE testDynloadUse.c) + set_property(TARGET ${KWSYS_NAMESPACE}TestDynloadUse PROPERTY LABELS ${KWSYS_LABELS_LIB}) + set_property(TARGET ${KWSYS_NAMESPACE}TestDynloadUse PROPERTY LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/dynloaddir") + add_dependencies(${KWSYS_NAMESPACE}TestDynloadUse ${KWSYS_TARGET_INTERFACE}) + target_link_libraries(${KWSYS_NAMESPACE}TestDynloadUse PRIVATE ${KWSYS_NAMESPACE}TestDynloadImpl) + endif () ENDIF() CREATE_TEST_SOURCELIST( KWSYS_CXX_TEST_SRCS ${KWSYS_NAMESPACE}TestsCxx.cxx diff --git a/Source/kwsys/DynamicLoader.cxx b/Source/kwsys/DynamicLoader.cxx index a85690f..b93a215 100644 --- a/Source/kwsys/DynamicLoader.cxx +++ b/Source/kwsys/DynamicLoader.cxx @@ -1,9 +1,14 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing#kwsys for details. */ +#if defined(_WIN32) +# define NOMINMAX // hide min,max to not conflict with <limits> +#endif + #include "kwsysPrivate.h" #include KWSYS_HEADER(DynamicLoader.hxx) #include KWSYS_HEADER(Configure.hxx) +#include KWSYS_HEADER(Encoding.hxx) // Work-around CMake dependency scanning limitation. This must // duplicate the above list of headers. @@ -25,6 +30,28 @@ // Each part of the ifdef contains a complete implementation for // the static methods of DynamicLoader. +#define CHECK_OPEN_FLAGS(var, supported, ret) \ + do { \ + /* Check for unknown flags. */ \ + if ((var & AllOpenFlags) != var) { \ + return ret; \ + } \ + \ + /* Check for unsupported flags. */ \ + if ((var & (supported)) != var) { \ + return ret; \ + } \ + } while (0) + +namespace KWSYS_NAMESPACE { + +DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary( + const std::string& libname) +{ + return DynamicLoader::OpenLibrary(libname, 0); +} +} + #if !KWSYS_SUPPORTS_SHARED_LIBS // Implementation for environments without dynamic libs # include <string.h> // for strerror() @@ -32,7 +59,7 @@ namespace KWSYS_NAMESPACE { DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary( - const std::string& libname) + const std::string& libname, int flags) { return 0; } @@ -67,8 +94,10 @@ const char* DynamicLoader::LastError() namespace KWSYS_NAMESPACE { DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary( - const std::string& libname) + const std::string& libname, int flags) { + CHECK_OPEN_FLAGS(flags, 0, 0); + return shl_load(libname.c_str(), BIND_DEFERRED | DYNAMIC_PATH, 0L); } @@ -130,8 +159,10 @@ const char* DynamicLoader::LastError() namespace KWSYS_NAMESPACE { DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary( - const std::string& libname) + const std::string& libname, int flags) { + CHECK_OPEN_FLAGS(flags, 0, 0); + NSObjectFileImageReturnCode rc; NSObjectFileImage image = 0; @@ -185,19 +216,22 @@ const char* DynamicLoader::LastError() // Implementation for Windows win32 code but not cygwin # include <windows.h> +# include <stdio.h> + namespace KWSYS_NAMESPACE { DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary( - const std::string& libname) + const std::string& libname, int flags) { - DynamicLoader::LibraryHandle lh; - int length = MultiByteToWideChar(CP_UTF8, 0, libname.c_str(), -1, NULL, 0); - wchar_t* wchars = new wchar_t[length + 1]; - wchars[0] = '\0'; - MultiByteToWideChar(CP_UTF8, 0, libname.c_str(), -1, wchars, length); - lh = LoadLibraryW(wchars); - delete[] wchars; - return lh; + CHECK_OPEN_FLAGS(flags, SearchBesideLibrary, NULL); + + DWORD llFlags = 0; + if (flags & SearchBesideLibrary) { + llFlags |= LOAD_WITH_ALTERED_SEARCH_PATH; + } + + return LoadLibraryExW(Encoding::ToWindowsExtendedPath(libname).c_str(), NULL, + llFlags); } int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib) @@ -247,24 +281,38 @@ DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress( # endif } +# define DYNLOAD_ERROR_BUFFER_SIZE 1024 + const char* DynamicLoader::LastError() { - LPVOID lpMsgBuf = NULL; - - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - (LPTSTR)&lpMsgBuf, 0, NULL); + wchar_t lpMsgBuf[DYNLOAD_ERROR_BUFFER_SIZE + 1]; + + DWORD error = GetLastError(); + DWORD length = FormatMessageW( + FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language + lpMsgBuf, DYNLOAD_ERROR_BUFFER_SIZE, NULL); + + static char str[DYNLOAD_ERROR_BUFFER_SIZE + 1]; + + if (length < 1) { + /* FormatMessage failed. Use a default message. */ + _snprintf(str, DYNLOAD_ERROR_BUFFER_SIZE, + "DynamicLoader encountered error 0x%X. " + "FormatMessage failed with error 0x%X", + error, GetLastError()); + return str; + } - if (!lpMsgBuf) { - return NULL; + if (!WideCharToMultiByte(CP_UTF8, 0, lpMsgBuf, -1, str, + DYNLOAD_ERROR_BUFFER_SIZE, NULL, NULL)) { + /* WideCharToMultiByte failed. Use a default message. */ + _snprintf(str, DYNLOAD_ERROR_BUFFER_SIZE, + "DynamicLoader encountered error 0x%X. " + "WideCharToMultiByte failed with error 0x%X", + error, GetLastError()); } - static char* str = 0; - delete[] str; - str = strcpy(new char[strlen((char*)lpMsgBuf) + 1], (char*)lpMsgBuf); - // Free the buffer. - LocalFree(lpMsgBuf); return str; } @@ -282,8 +330,10 @@ namespace KWSYS_NAMESPACE { static image_id last_dynamic_err = B_OK; DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary( - const std::string& libname) + const std::string& libname, int flags) { + CHECK_OPEN_FLAGS(flags, 0, 0); + // image_id's are integers, errors are negative. Add one just in case we // get a valid image_id of zero (is that even possible?). image_id rc = load_add_on(libname.c_str()); @@ -360,8 +410,10 @@ const char* DynamicLoader::LastError() namespace KWSYS_NAMESPACE { DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary( - const std::string& libname) + const std::string& libname, int flags) { + CHECK_OPEN_FLAGS(flags, 0, NULL); + char* name = (char*)calloc(1, libname.size() + 1); dld_init(program_invocation_name); strncpy(name, libname.c_str(), libname.size()); @@ -404,8 +456,10 @@ const char* DynamicLoader::LastError() namespace KWSYS_NAMESPACE { DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary( - const std::string& libname) + const std::string& libname, int flags) { + CHECK_OPEN_FLAGS(flags, 0, NULL); + return dlopen(libname.c_str(), RTLD_LAZY); } diff --git a/Source/kwsys/DynamicLoader.hxx.in b/Source/kwsys/DynamicLoader.hxx.in index 08f2790..539c742 100644 --- a/Source/kwsys/DynamicLoader.hxx.in +++ b/Source/kwsys/DynamicLoader.hxx.in @@ -66,10 +66,23 @@ public: // Return type from DynamicLoader::GetSymbolAddress. typedef void (*SymbolPointer)(); + enum OpenFlags + { + // Search for dependent libraries beside the library being loaded. + // + // This is currently only supported on Windows. + SearchBesideLibrary = 0x00000001, + + AllOpenFlags = SearchBesideLibrary + }; + /** Load a dynamic library into the current process. * The returned LibraryHandle can be used to access the symbols in the - * library. */ + * library. The optional second argument is a set of flags to use when + * opening the library. If unrecognized or unsupported flags are specified, + * the library is not opened. */ static LibraryHandle OpenLibrary(const std::string&); + static LibraryHandle OpenLibrary(const std::string&, int); /** Attempt to detach a dynamic library from the * process. A value of true is returned if it is successful. */ diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index b736ed4..87da80e 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -2436,10 +2436,6 @@ static bool CloneFileContent(const std::string& source, bool SystemTools::CopyFileAlways(const std::string& source, const std::string& destination) { - // If files are the same do not copy - if (SystemTools::SameFile(source, destination)) { - return true; - } mode_t perm = 0; bool perms = SystemTools::GetPermissions(source, perm); std::string real_destination = destination; @@ -2460,6 +2456,10 @@ bool SystemTools::CopyFileAlways(const std::string& source, } else { destination_dir = SystemTools::GetFilenamePath(destination); } + // If files are the same do not copy + if (SystemTools::SameFile(source, real_destination)) { + return true; + } // Create destination directory diff --git a/Source/kwsys/testDynamicLoader.cxx b/Source/kwsys/testDynamicLoader.cxx index ce87117..eff2ed7 100644 --- a/Source/kwsys/testDynamicLoader.cxx +++ b/Source/kwsys/testDynamicLoader.cxx @@ -21,11 +21,15 @@ // left on disk. #include <testSystemTools.h> -static std::string GetLibName(const char* lname) +static std::string GetLibName(const char* lname, const char* subdir = NULL) { // Construct proper name of lib std::string slname; slname = EXECUTABLE_OUTPUT_PATH; + if (subdir) { + slname += "/"; + slname += subdir; + } #ifdef CMAKE_INTDIR slname += "/"; slname += CMAKE_INTDIR; @@ -45,26 +49,29 @@ static std::string GetLibName(const char* lname) * r3: should CloseLibrary succeed ? */ static int TestDynamicLoader(const char* libname, const char* symbol, int r1, - int r2, int r3) + int r2, int r3, int flags = 0) { std::cerr << "Testing: " << libname << std::endl; kwsys::DynamicLoader::LibraryHandle l = - kwsys::DynamicLoader::OpenLibrary(libname); + kwsys::DynamicLoader::OpenLibrary(libname, flags); // If result is incompatible with expectation just fails (xor): if ((r1 && !l) || (!r1 && l)) { - std::cerr << kwsys::DynamicLoader::LastError() << std::endl; + std::cerr << "OpenLibrary: " << kwsys::DynamicLoader::LastError() + << std::endl; return 1; } kwsys::DynamicLoader::SymbolPointer f = kwsys::DynamicLoader::GetSymbolAddress(l, symbol); if ((r2 && !f) || (!r2 && f)) { - std::cerr << kwsys::DynamicLoader::LastError() << std::endl; + std::cerr << "GetSymbolAddress: " << kwsys::DynamicLoader::LastError() + << std::endl; return 1; } #ifndef __APPLE__ int s = kwsys::DynamicLoader::CloseLibrary(l); if ((r3 && !s) || (!r3 && s)) { - std::cerr << kwsys::DynamicLoader::LastError() << std::endl; + std::cerr << "CloseLibrary: " << kwsys::DynamicLoader::LastError() + << std::endl; return 1; } #else @@ -113,5 +120,14 @@ int testDynamicLoader(int argc, char* argv[]) res += TestDynamicLoader(libname.c_str(), "TestDynamicLoaderData", 1, 1, 1); res += TestDynamicLoader(libname.c_str(), "_TestDynamicLoaderData", 1, 0, 1); +#ifdef _WIN32 + libname = GetLibName(KWSYS_NAMESPACE_STRING "TestDynloadUse", "dynloaddir"); + res += TestDynamicLoader(libname.c_str(), "dummy", 0, 0, 0); + res += TestDynamicLoader(libname.c_str(), "TestLoad", 1, 1, 1, + kwsys::DynamicLoader::SearchBesideLibrary); + res += TestDynamicLoader(libname.c_str(), "_TestLoad", 1, 0, 1, + kwsys::DynamicLoader::SearchBesideLibrary); +#endif + return res; } diff --git a/Source/kwsys/testDynloadImpl.c b/Source/kwsys/testDynloadImpl.c new file mode 100644 index 0000000..2b9069b --- /dev/null +++ b/Source/kwsys/testDynloadImpl.c @@ -0,0 +1,10 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing#kwsys for details. */ + +#include "testDynloadImpl.h" + +int TestDynamicLoaderImplData = 0; + +void TestDynamicLoaderImplSymbolPointer() +{ +} diff --git a/Source/kwsys/testDynloadImpl.h b/Source/kwsys/testDynloadImpl.h new file mode 100644 index 0000000..d0c9dfb --- /dev/null +++ b/Source/kwsys/testDynloadImpl.h @@ -0,0 +1,15 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing#kwsys for details. */ +#ifdef _WIN32 +# ifdef BUILDING_TestDynloadImpl +# define DLIMPL_EXPORT __declspec(dllexport) +# else +# define DLIMPL_EXPORT __declspec(dllimport) +# endif +#else +# define DLIMPL_EXPORT +#endif + +DLIMPL_EXPORT int TestDynamicLoaderImplData; + +DLIMPL_EXPORT void TestDynamicLoaderImplSymbolPointer(); diff --git a/Source/kwsys/testDynloadUse.c b/Source/kwsys/testDynloadUse.c new file mode 100644 index 0000000..5402add --- /dev/null +++ b/Source/kwsys/testDynloadUse.c @@ -0,0 +1,15 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing#kwsys for details. */ +#include "testDynloadImpl.h" + +#ifdef _WIN32 +# define DL_EXPORT __declspec(dllexport) +#else +# define DL_EXPORT +#endif + +DL_EXPORT int TestLoad() +{ + TestDynamicLoaderImplSymbolPointer(); + return TestDynamicLoaderImplData; +} diff --git a/Tests/FindFontconfig/Test/CMakeLists.txt b/Tests/FindFontconfig/Test/CMakeLists.txt index 81db3ba..36c76b1 100644 --- a/Tests/FindFontconfig/Test/CMakeLists.txt +++ b/Tests/FindFontconfig/Test/CMakeLists.txt @@ -4,13 +4,13 @@ include(CTest) find_package(Fontconfig REQUIRED) -add_definitions(-DCMAKE_EXPECTED_FONTCONFIG_VERSION="${FONTCONFIG_VERSION}") +add_definitions(-DCMAKE_EXPECTED_FONTCONFIG_VERSION="${Fontconfig_VERSION}") add_executable(test_tgt main.c) target_link_libraries(test_tgt Fontconfig::Fontconfig) add_test(NAME test_tgt COMMAND test_tgt) add_executable(test_var main.c) -target_include_directories(test_var PRIVATE ${FONTCONFIG_INCLUDE_DIRS}) -target_link_libraries(test_var PRIVATE ${FONTCONFIG_LIBRARIES}) +target_include_directories(test_var PRIVATE ${Fontconfig_INCLUDE_DIRS}) +target_link_libraries(test_var PRIVATE ${Fontconfig_LIBRARIES}) add_test(NAME test_var COMMAND test_var) diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt index 5b99ea7..a9edf9a 100644 --- a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt @@ -17,7 +17,8 @@ create_header(bing) create_header(bung) create_header(arguments) create_header(list) -create_header(target) +create_header(target1) +create_header(target2) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -69,14 +70,23 @@ set_property(TARGET lib4 APPEND PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BI set_property(TARGET lib4 APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/foh;$<TARGET_PROPERTY:lib3,INTERFACE_INCLUDE_DIRECTORIES>") add_library(somelib::withcolons UNKNOWN IMPORTED) -set_property(TARGET somelib::withcolons PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/target") -set_property(TARGET somelib::withcolons PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/target") +set_property(TARGET somelib::withcolons PROPERTY IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/target1") +set_property(TARGET somelib::withcolons PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/target1") set_property(TARGET TargetIncludeDirectories APPEND PROPERTY INCLUDE_DIRECTORIES "$<TARGET_PROPERTY:somelib::withcolons,INTERFACE_INCLUDE_DIRECTORIES>" ) +add_library(somelib_aliased UNKNOWN IMPORTED GLOBAL) +set_property(TARGET somelib_aliased PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/target2") +add_library(somelib::withcolons2 ALIAS somelib_aliased) + +set_property(TARGET TargetIncludeDirectories + APPEND PROPERTY INCLUDE_DIRECTORIES + "$<TARGET_PROPERTY:somelib::withcolons2,INTERFACE_INCLUDE_DIRECTORIES>" +) + add_custom_target(test_custom_target "some_bogus_custom_tool" $<TARGET_PROPERTY:TargetIncludeDirectories,COMPILE_DEFINITIONS> diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/main.cpp b/Tests/IncludeDirectories/TargetIncludeDirectories/main.cpp index 2ee05e2..541ef92 100644 --- a/Tests/IncludeDirectories/TargetIncludeDirectories/main.cpp +++ b/Tests/IncludeDirectories/TargetIncludeDirectories/main.cpp @@ -10,7 +10,8 @@ #include "foo.h" #include "list.h" #include "prefix_foo_bar_bat.h" -#include "target.h" +#include "target1.h" +#include "target2.h" #include "ting.h" int main(int, char**) diff --git a/Tests/Plugin/CMakeLists.txt b/Tests/Plugin/CMakeLists.txt index 227d990..8e8fa07 100644 --- a/Tests/Plugin/CMakeLists.txt +++ b/Tests/Plugin/CMakeLists.txt @@ -15,6 +15,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/lib/static) set(KWSYS_NAMESPACE kwsys) set(KWSYS_HEADER_ROOT ${Plugin_BINARY_DIR}/include) set(KWSYS_USE_DynamicLoader 1) +set(KWSYS_ENCODING_DEFAULT_CODEPAGE CP_UTF8) add_subdirectory(${Plugin_SOURCE_DIR}/../../Source/kwsys src/kwsys) # Configure the location of plugins. diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake index 869fe3d..9e2e50d 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.14) project(Minimal NONE) # @@ -38,6 +38,14 @@ set(targets sunos-C-SunPro-5.13.0 sunos-CXX-SunPro-5.13.0 sunos-Fortran-SunPro-8.8.0 ) +if(CMAKE_HOST_WIN32) + # The KWSys actual-case cache breaks case sensitivity on Windows. + list(FILTER targets EXCLUDE REGEX "-XL|-SunPro") +else() + # Windows drive letters are not recognized as absolute on other platforms. + list(FILTER targets EXCLUDE REGEX "mingw") +endif() + include(${CMAKE_ROOT}/Modules/CMakeParseImplicitIncludeInfo.cmake) # diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Intel-18.0.2.20180210.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Intel-18.0.2.20180210.output index f0989ca..a26a007 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Intel-18.0.2.20180210.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Intel-18.0.2.20180210.output @@ -1 +1 @@ -/opt/intel/2018.2.199/compilers_and_libraries_2018/linux/mkl/include;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include/intel64;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include/icc;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include;/usr/local/include;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0/include;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0/include-fixed;/opt/gcc/6.3.0/snos/include/;/usr/include +/opt/intel/2018.2.199/compilers_and_libraries_2018/linux/mkl/include;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include/intel64;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include/icc;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include;/usr/local/include;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0/include;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0/include-fixed;/opt/gcc/6.3.0/snos/include;/usr/include diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Intel-18.0.2.20180210.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Intel-18.0.2.20180210.output index 73d779b..31f8a11 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Intel-18.0.2.20180210.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Intel-18.0.2.20180210.output @@ -1 +1 @@ -/opt/intel/2018.2.199/compilers_and_libraries_2018/linux/mkl/include;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include/intel64;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include/icc;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include;/opt/gcc/6.3.0/snos/include/g++;/opt/gcc/6.3.0/snos/include/g++/x86_64-suse-linux;/opt/gcc/6.3.0/snos/include/g++/backward;/usr/local/include;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0/include;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0/include-fixed;/opt/gcc/6.3.0/snos/include/;/usr/include +/opt/intel/2018.2.199/compilers_and_libraries_2018/linux/mkl/include;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include/intel64;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include/icc;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include;/opt/gcc/6.3.0/snos/include/g++;/opt/gcc/6.3.0/snos/include/g++/x86_64-suse-linux;/opt/gcc/6.3.0/snos/include/g++/backward;/usr/local/include;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0/include;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0/include-fixed;/opt/gcc/6.3.0/snos/include;/usr/include diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Cray-8.7.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Cray-8.7.output index d57439c..daa34e2 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Cray-8.7.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Cray-8.7.output @@ -1 +1 @@ -/opt/cray/pe/cce/8.7.4/cce/x86_64/include/craylibs;/usr/include;/usr/include;/opt/cray/pe/libsci/18.07.1/CRAY/8.6/x86_64/include;/opt/cray/pe/mpt/7.7.3/gni/mpich-cray/8.6/include;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/include;/opt/cray/alps/6.5.28-6.0.5.0_18.6__g13a91b6.ari/include;/opt/cray/xpmem/2.2.4-6.0.5.1_8.26__g35d5e73.ari/include;/opt/cray/gni-headers/5.0.12-6.0.5.0_2.15__g2ef1ebc.ari/include;/opt/cray/dmapp/7.1.1-6.0.5.0_49.8__g1125556.ari/include;/opt/cray/pe/pmi/5.0.14/include;/opt/cray/ugni/6.0.14-6.0.5.0_16.9__g19583bb.ari/include;/opt/cray/udreg/2.3.2-6.0.5.0_13.12__ga14955a.ari/include;/opt/cray/wlm_detect/1.3.2-6.0.5.0_3.1__g388ccd5.ari/include;/opt/cray/krca/2.2.2-6.0.5.1_13.47__g4614cf3.ari/include;/opt/cray-hss-devel/8.0.0/include +/opt/cray/pe/cce/8.7.4/cce/x86_64/include/craylibs;/usr/include;/opt/cray/pe/libsci/18.07.1/CRAY/8.6/x86_64/include;/opt/cray/pe/mpt/7.7.3/gni/mpich-cray/8.6/include;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/include;/opt/cray/alps/6.5.28-6.0.5.0_18.6__g13a91b6.ari/include;/opt/cray/xpmem/2.2.4-6.0.5.1_8.26__g35d5e73.ari/include;/opt/cray/gni-headers/5.0.12-6.0.5.0_2.15__g2ef1ebc.ari/include;/opt/cray/dmapp/7.1.1-6.0.5.0_49.8__g1125556.ari/include;/opt/cray/pe/pmi/5.0.14/include;/opt/cray/ugni/6.0.14-6.0.5.0_16.9__g19583bb.ari/include;/opt/cray/udreg/2.3.2-6.0.5.0_13.12__ga14955a.ari/include;/opt/cray/wlm_detect/1.3.2-6.0.5.0_3.1__g388ccd5.ari/include;/opt/cray/krca/2.2.2-6.0.5.1_13.47__g4614cf3.ari/include;/opt/cray-hss-devel/8.0.0/include diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Intel-18.0.2.20180210.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Intel-18.0.2.20180210.output index c3915b6..8e484bc 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Intel-18.0.2.20180210.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Intel-18.0.2.20180210.output @@ -1 +1 @@ -.;/opt/cray/pe/libsci/18.07.1/INTEL/16.0/x86_64/include;/opt/cray/pe/mpt/7.7.3/gni/mpich-intel/16.0/include;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/include;/opt/cray/alps/6.5.28-6.0.5.0_18.6__g13a91b6.ari/include;/opt/cray/xpmem/2.2.4-6.0.5.1_8.26__g35d5e73.ari/include;/opt/cray/gni-headers/5.0.12-6.0.5.0_2.15__g2ef1ebc.ari/include;/opt/cray/pe/pmi/5.0.14/include;/opt/cray/ugni/6.0.14-6.0.5.0_16.9__g19583bb.ari/include;/opt/cray/udreg/2.3.2-6.0.5.0_13.12__ga14955a.ari/include;/opt/cray/wlm_detect/1.3.2-6.0.5.0_3.1__g388ccd5.ari/include;/opt/cray/krca/2.2.2-6.0.5.1_13.47__g4614cf3.ari/include;/opt/cray-hss-devel/8.0.0/include;/opt/intel/2018.2.199/compilers_and_libraries_2018/linux/mkl/include;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include/intel64;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include/icc;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include;/usr/local/include;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0/include;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0/include-fixed;/opt/gcc/6.3.0/snos/include/;/usr/include +/opt/cray/pe/libsci/18.07.1/INTEL/16.0/x86_64/include;/opt/cray/pe/mpt/7.7.3/gni/mpich-intel/16.0/include;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/include;/opt/cray/alps/6.5.28-6.0.5.0_18.6__g13a91b6.ari/include;/opt/cray/xpmem/2.2.4-6.0.5.1_8.26__g35d5e73.ari/include;/opt/cray/gni-headers/5.0.12-6.0.5.0_2.15__g2ef1ebc.ari/include;/opt/cray/pe/pmi/5.0.14/include;/opt/cray/ugni/6.0.14-6.0.5.0_16.9__g19583bb.ari/include;/opt/cray/udreg/2.3.2-6.0.5.0_13.12__ga14955a.ari/include;/opt/cray/wlm_detect/1.3.2-6.0.5.0_3.1__g388ccd5.ari/include;/opt/cray/krca/2.2.2-6.0.5.1_13.47__g4614cf3.ari/include;/opt/cray-hss-devel/8.0.0/include;/opt/intel/2018.2.199/compilers_and_libraries_2018/linux/mkl/include;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include/intel64;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include/icc;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/include;/usr/local/include;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0/include;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0/include-fixed;/opt/gcc/6.3.0/snos/include;/usr/include diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-C-AppleClang-8.0.0.8000042.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-C-AppleClang-8.0.0.8000042.output index c857928..20f9b0e 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-C-AppleClang-8.0.0.8000042.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-C-AppleClang-8.0.0.8000042.output @@ -1 +1 @@ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include;/usr/include +/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/8.0.0/include;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include;/usr/include diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-CXX-AppleClang-8.0.0.8000042.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-CXX-AppleClang-8.0.0.8000042.output index 6df208c..b10b2af 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-CXX-AppleClang-8.0.0.8000042.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-CXX-AppleClang-8.0.0.8000042.output @@ -1 +1 @@ -/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include;/usr/include +/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/8.0.0/include;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include;/usr/include diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-Intel-18.0.0.20170811.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-Intel-18.0.0.20170811.output index ba0269b..714131c 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-Intel-18.0.0.20170811.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-Intel-18.0.0.20170811.output @@ -1 +1 @@ -/opt/intel/compilers_and_libraries_2018.0.128/linux/ipp/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/pstl/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/tbb/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/tbb/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/include/intel64;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/include/icc;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/include;/usr/local/include;/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include;/usr/include/;/usr/include +/opt/intel/compilers_and_libraries_2018.0.128/linux/ipp/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/pstl/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/tbb/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/include/intel64;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/include/icc;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/include;/usr/local/include;/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include;/usr/include diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-XL-16.1.0.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-XL-16.1.0.0.output index 2a89b17..6dac25f 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-XL-16.1.0.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-XL-16.1.0.0.output @@ -1 +1 @@ -/opt/ibm/xlsmp/5.1.0/include;/opt/ibm/xlsmp/5.1.0/include;/opt/ibm/xlmass/9.1.0/include;/opt/ibm/xlC/16.1.0/include;/opt/ibm/xlC/16.1.0/include;/usr/local/include;/opt/ibm/xlC/16.1.0/include;/usr/include +/opt/ibm/xlsmp/5.1.0/include;/opt/ibm/xlmass/9.1.0/include;/opt/ibm/xlC/16.1.0/include;/usr/local/include;/usr/include diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-Intel-18.0.0.20170811.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-Intel-18.0.0.20170811.output index 56d2b9f..1bf5711 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-Intel-18.0.0.20170811.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-Intel-18.0.0.20170811.output @@ -1 +1 @@ -/opt/intel/compilers_and_libraries_2018.0.128/linux/ipp/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/pstl/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/tbb/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/tbb/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/include/intel64;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/include/icc;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/include;/usr/include/c++/4.8.5;/usr/include/c++/4.8.5/x86_64-redhat-linux;/usr/include/c++/4.8.5/backward;/usr/local/include;/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include;/usr/include/;/usr/include +/opt/intel/compilers_and_libraries_2018.0.128/linux/ipp/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/pstl/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/tbb/include;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/include/intel64;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/include/icc;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/include;/usr/include/c++/4.8.5;/usr/include/c++/4.8.5/x86_64-redhat-linux;/usr/include/c++/4.8.5/backward;/usr/local/include;/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include;/usr/include diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-12.1.0.output index 1c545e0..a2d8c26 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-12.1.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-12.1.0.output @@ -1 +1 @@ -/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/include;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/include;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/include;/usr/lib/gcc/ppc64-redhat-linux/4.4.7/../../../../include/c++/4.4.7;/usr/lib/gcc/ppc64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/ppc64-redhat-linux;/usr/lib/gcc/ppc64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/backward;/usr/local/include;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/crt/include;/usr/include +/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/include;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/include;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/include;/usr/include/c++/4.4.7;/usr/include/c++/4.4.7/ppc64-redhat-linux;/usr/include/c++/4.4.7/backward;/usr/local/include;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/crt/include;/usr/include diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-16.1.0.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-16.1.0.0.output index a34973c..6994f3c 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-16.1.0.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-16.1.0.0.output @@ -1 +1 @@ -/opt/ibm/xlsmp/5.1.0/include;/opt/ibm/xlmass/9.1.0/include;/opt/ibm/xlC/16.1.0/include;/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../include/c++/4.8.5;/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../include/c++/4.8.5/ppc64le-redhat-linux;/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../include/c++/4.8.5/backward;/opt/ibm/xlC/16.1.0/include;/usr/local/include;/opt/ibm/xlC/16.1.0/include;/usr/include +/opt/ibm/xlsmp/5.1.0/include;/opt/ibm/xlmass/9.1.0/include;/opt/ibm/xlC/16.1.0/include;/usr/include/c++/4.8.5;/usr/include/c++/4.8.5/ppc64le-redhat-linux;/usr/include/c++/4.8.5/backward;/usr/local/include;/usr/include diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-C-GNU-4.9.3.input b/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-C-GNU-4.9.3.input index df96c59..81e9ee0 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-C-GNU-4.9.3.input +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-C-GNU-4.9.3.input @@ -1,70 +1,70 @@ CMAKE_LANG=C CMAKE_C_COMPILER_ABI= -CMAKE_C_COMPILER_AR=C:/MinGW/bin/gcc-ar.exe +CMAKE_C_COMPILER_AR=C:/DoesNotExist/MinGW/bin/gcc-ar.exe CMAKE_C_COMPILER_ARCHITECTURE_ID= CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN= CMAKE_C_COMPILER_ID=GNU CMAKE_C_COMPILER_LAUNCHER= CMAKE_C_COMPILER_LOADED=1 -CMAKE_C_COMPILER_RANLIB=C:/MinGW/bin/gcc-ranlib.exe +CMAKE_C_COMPILER_RANLIB=C:/DoesNotExist/MinGW/bin/gcc-ranlib.exe CMAKE_C_COMPILER_TARGET= CMAKE_C_COMPILER_VERSION=4.9.3 CMAKE_C_COMPILER_VERSION_INTERAL= Change Dir: C:/tmp/ii/CMakeFiles/CMakeTmp -Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_ab097/fast" -C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_ab097.dir\build.make CMakeFiles/cmTC_ab097.dir/build +Run Build Command:"C:/DoesNotExist/MinGW/bin/mingw32-make.exe" "cmTC_ab097/fast" +C:/DoesNotExist/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_ab097.dir\build.make CMakeFiles/cmTC_ab097.dir/build mingw32-make.exe[1]: Entering directory 'C:/tmp/ii/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_ab097.dir/CMakeCCompilerABI.c.obj -C:\MinGW\bin\gcc.exe -v -o CMakeFiles\cmTC_ab097.dir\CMakeCCompilerABI.c.obj -c "C:\CMake\Modules\CMakeCCompilerABI.c" +C:\DoesNotExist\MinGW\bin\gcc.exe -v -o CMakeFiles\cmTC_ab097.dir\CMakeCCompilerABI.c.obj -c "C:\CMake\Modules\CMakeCCompilerABI.c" Using built-in specs. -COLLECT_GCC=C:\MinGW\bin\gcc.exe +COLLECT_GCC=C:\DoesNotExist\MinGW\bin\gcc.exe Target: mingw32 Configured with: ../src/gcc-4.9.3/configure --build=x86_64-pc-linux-gnu --host=mingw32 --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-libstdcxx-debug --with-tune=generic --enable-nls Thread model: win32 gcc version 4.9.3 (GCC) COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles\cmTC_ab097.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=i586' - c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/cc1.exe -quiet -v -iprefix c:\mingw\bin\../lib/gcc/mingw32/4.9.3/ C:\CMake\Modules\CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=i586 -auxbase-strip CMakeFiles\cmTC_ab097.dir\CMakeCCompilerABI.c.obj -version -o C:\Users\DASHBO~1\AppData\Local\Temp\ccKRBU4I.s + c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/cc1.exe -quiet -v -iprefix c:\DoesNotExist\mingw\bin\../lib/gcc/mingw32/4.9.3/ C:\CMake\Modules\CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=i586 -auxbase-strip CMakeFiles\cmTC_ab097.dir\CMakeCCompilerABI.c.obj -version -o C:\Users\DASHBO~1\AppData\Local\Temp\ccKRBU4I.s GNU C (GCC) version 4.9.3 (mingw32) compiled by GNU C version 4.9.3, GMP version 5.1.2, MPFR version 3.1.2, MPC version 1.0.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 -ignoring nonexistent directory "c:\mingw\bin\../lib/gcc/mingw32/4.9.3/../../../../mingw32/include" -ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include" +ignoring nonexistent directory "c:\DoesNotExist\mingw\bin\../lib/gcc/mingw32/4.9.3/../../../../mingw32/include" +ignoring duplicate directory "c:/DoesNotExist/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include" ignoring duplicate directory "/mingw/lib/gcc/mingw32/4.9.3/../../../../include" -ignoring duplicate directory "c:/mingw/lib/gcc/../../include" -ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include-fixed" -ignoring nonexistent directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/../../../../mingw32/include" +ignoring duplicate directory "c:/DoesNotExist/mingw/lib/gcc/../../include" +ignoring duplicate directory "c:/DoesNotExist/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include-fixed" +ignoring nonexistent directory "c:/DoesNotExist/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/../../../../mingw32/include" ignoring duplicate directory "/mingw/include" #include "..." search starts here: #include <...> search starts here: - c:\mingw\bin\../lib/gcc/mingw32/4.9.3/include - c:\mingw\bin\../lib/gcc/mingw32/4.9.3/../../../../include - c:\mingw\bin\../lib/gcc/mingw32/4.9.3/include-fixed + c:\DoesNotExist\mingw\bin\../lib/gcc/mingw32/4.9.3/include + c:\DoesNotExist\mingw\bin\../lib/gcc/mingw32/4.9.3/../../../../include + c:\DoesNotExist\mingw\bin\../lib/gcc/mingw32/4.9.3/include-fixed End of search list. GNU C (GCC) version 4.9.3 (mingw32) compiled by GNU C version 4.9.3, GMP version 5.1.2, MPFR version 3.1.2, MPC version 1.0.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 32bccaa1a45d39107471fe656e1c3cd5 COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles\cmTC_ab097.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=i586' - c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/as.exe -v -o CMakeFiles\cmTC_ab097.dir\CMakeCCompilerABI.c.obj C:\Users\DASHBO~1\AppData\Local\Temp\ccKRBU4I.s + c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/as.exe -v -o CMakeFiles\cmTC_ab097.dir\CMakeCCompilerABI.c.obj C:\Users\DASHBO~1\AppData\Local\Temp\ccKRBU4I.s GNU assembler version 2.25.1 (mingw32) using BFD version (GNU Binutils) 2.25.1 -COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/ -LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.9.3/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../ +COMPILER_PATH=c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/;c:/DoesNotExist/mingw/bin/../libexec/gcc/;c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/ +LIBRARY_PATH=c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/;c:/DoesNotExist/mingw/bin/../lib/gcc/;c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/lib/;c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../ COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles\cmTC_ab097.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=i586' Linking C executable cmTC_ab097.exe "C:\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_ab097.dir\link.txt --verbose=1 "C:\CMake\bin\cmake.exe" -E remove -f CMakeFiles\cmTC_ab097.dir/objects.a -C:\MinGW\bin\ar.exe cr CMakeFiles\cmTC_ab097.dir/objects.a @CMakeFiles\cmTC_ab097.dir\objects1.rsp -C:\MinGW\bin\gcc.exe -v -Wl,--whole-archive CMakeFiles\cmTC_ab097.dir/objects.a -Wl,--no-whole-archive -o cmTC_ab097.exe -Wl,--out-implib,libcmTC_ab097.dll.a -Wl,--major-image-version,0,--minor-image-version,0 +C:\DoesNotExist\MinGW\bin\ar.exe cr CMakeFiles\cmTC_ab097.dir/objects.a @CMakeFiles\cmTC_ab097.dir\objects1.rsp +C:\DoesNotExist\MinGW\bin\gcc.exe -v -Wl,--whole-archive CMakeFiles\cmTC_ab097.dir/objects.a -Wl,--no-whole-archive -o cmTC_ab097.exe -Wl,--out-implib,libcmTC_ab097.dll.a -Wl,--major-image-version,0,--minor-image-version,0 Using built-in specs. -COLLECT_GCC=C:\MinGW\bin\gcc.exe -COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/lto-wrapper.exe +COLLECT_GCC=C:\DoesNotExist\MinGW\bin\gcc.exe +COLLECT_LTO_WRAPPER=c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/lto-wrapper.exe Target: mingw32 Configured with: ../src/gcc-4.9.3/configure --build=x86_64-pc-linux-gnu --host=mingw32 --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-libstdcxx-debug --with-tune=generic --enable-nls Thread model: win32 gcc version 4.9.3 (GCC) -COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/ -LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.9.3/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../ +COMPILER_PATH=c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/;c:/DoesNotExist/mingw/bin/../libexec/gcc/;c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/ +LIBRARY_PATH=c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/;c:/DoesNotExist/mingw/bin/../lib/gcc/;c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/lib/;c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../ COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_ab097.exe' '-mtune=generic' '-march=i586' - c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/collect2.exe -plugin c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/liblto_plugin-0.dll -plugin-opt=c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\DASHBO~1\AppData\Local\Temp\ccEGcsW8.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -Bdynamic -o cmTC_ab097.exe c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../crt2.o c:/mingw/bin/../lib/gcc/mingw32/4.9.3/crtbegin.o -Lc:/mingw/bin/../lib/gcc/mingw32/4.9.3 -Lc:/mingw/bin/../lib/gcc -Lc:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/lib -Lc:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../.. --whole-archive CMakeFiles\cmTC_ab097.dir/objects.a --no-whole-archive --out-implib libcmTC_ab097.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt c:/mingw/bin/../lib/gcc/mingw32/4.9.3/crtend.o + c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/collect2.exe -plugin c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/liblto_plugin-0.dll -plugin-opt=c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\DASHBO~1\AppData\Local\Temp\ccEGcsW8.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -Bdynamic -o cmTC_ab097.exe c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../crt2.o c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/crtbegin.o -Lc:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3 -Lc:/DoesNotExist/mingw/bin/../lib/gcc -Lc:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/lib -Lc:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../.. --whole-archive CMakeFiles\cmTC_ab097.dir/objects.a --no-whole-archive --out-implib libcmTC_ab097.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/crtend.o mingw32-make.exe[1]: Leaving directory 'C:/tmp/ii/CMakeFiles/CMakeTmp' diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-C-GNU-4.9.3.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-C-GNU-4.9.3.output index cdfb8b2..d23e7fe 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-C-GNU-4.9.3.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-C-GNU-4.9.3.output @@ -1 +1 @@ -c:/mingw/bin/../lib/gcc/mingw32/4.9.3/include;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../include;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/include-fixed +C:/DoesNotExist/mingw/lib/gcc/mingw32/4.9.3/include;C:/DoesNotExist/mingw/include;C:/DoesNotExist/mingw/lib/gcc/mingw32/4.9.3/include-fixed diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-CXX-GNU-4.9.3.input b/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-CXX-GNU-4.9.3.input index ba44889..cd77340 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-CXX-GNU-4.9.3.input +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-CXX-GNU-4.9.3.input @@ -1,76 +1,76 @@ CMAKE_LANG=CXX CMAKE_CXX_COMPILER_ABI=ELF -CMAKE_CXX_COMPILER_AR=C:/MinGW/bin/gcc-ar.exe +CMAKE_CXX_COMPILER_AR=C:/DoesNotExist/MinGW/bin/gcc-ar.exe CMAKE_CXX_COMPILER_ARCHITECTURE_ID= CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN= CMAKE_CXX_COMPILER_ID=GNU CMAKE_CXX_COMPILER_LAUNCHER= CMAKE_CXX_COMPILER_LOADED=1 -CMAKE_CXX_COMPILER_RANLIB=C:/MinGW/bin/gcc-ranlib.exe +CMAKE_CXX_COMPILER_RANLIB=C:/DoesNotExist/MinGW/bin/gcc-ranlib.exe CMAKE_CXX_COMPILER_TARGET= CMAKE_CXX_COMPILER_VERSION=4.9.3 CMAKE_CXX_COMPILER_VERSION_INTERAL= Change Dir: C:/tmp/ii/CMakeFiles/CMakeTmp -Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_2b790/fast" -C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_2b790.dir\build.make CMakeFiles/cmTC_2b790.dir/build +Run Build Command:"C:/DoesNotExist/MinGW/bin/mingw32-make.exe" "cmTC_2b790/fast" +C:/DoesNotExist/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_2b790.dir\build.make CMakeFiles/cmTC_2b790.dir/build mingw32-make.exe[1]: Entering directory 'C:/tmp/ii/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_2b790.dir/CMakeCXXCompilerABI.cpp.obj -C:\MinGW\bin\g++.exe -v -o CMakeFiles\cmTC_2b790.dir\CMakeCXXCompilerABI.cpp.obj -c "C:\CMake\Modules\CMakeCXXCompilerABI.cpp" +C:\DoesNotExist\MinGW\bin\g++.exe -v -o CMakeFiles\cmTC_2b790.dir\CMakeCXXCompilerABI.cpp.obj -c "C:\CMake\Modules\CMakeCXXCompilerABI.cpp" Using built-in specs. -COLLECT_GCC=C:\MinGW\bin\g++.exe +COLLECT_GCC=C:\DoesNotExist\MinGW\bin\g++.exe Target: mingw32 Configured with: ../src/gcc-4.9.3/configure --build=x86_64-pc-linux-gnu --host=mingw32 --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-libstdcxx-debug --with-tune=generic --enable-nls Thread model: win32 gcc version 4.9.3 (GCC) COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles\cmTC_2b790.dir\CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=generic' '-march=i586' - c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/cc1plus.exe -quiet -v -iprefix c:\mingw\bin\../lib/gcc/mingw32/4.9.3/ C:\CMake\Modules\CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=i586 -auxbase-strip CMakeFiles\cmTC_2b790.dir\CMakeCXXCompilerABI.cpp.obj -version -o C:\Users\DASHBO~1\AppData\Local\Temp\cceEHFvQ.s + c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/cc1plus.exe -quiet -v -iprefix c:\DoesNotExist\mingw\bin\../lib/gcc/mingw32/4.9.3/ C:\CMake\Modules\CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=i586 -auxbase-strip CMakeFiles\cmTC_2b790.dir\CMakeCXXCompilerABI.cpp.obj -version -o C:\Users\DASHBO~1\AppData\Local\Temp\cceEHFvQ.s GNU C++ (GCC) version 4.9.3 (mingw32) compiled by GNU C version 4.9.3, GMP version 5.1.2, MPFR version 3.1.2, MPC version 1.0.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 -ignoring nonexistent directory "c:\mingw\bin\../lib/gcc/mingw32/4.9.3/../../../../mingw32/include" -ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include/c++" -ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include/c++/mingw32" -ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include/c++/backward" -ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include" +ignoring nonexistent directory "c:\DoesNotExist\mingw\bin\../lib/gcc/mingw32/4.9.3/../../../../mingw32/include" +ignoring duplicate directory "c:/DoesNotExist/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include/c++" +ignoring duplicate directory "c:/DoesNotExist/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include/c++/mingw32" +ignoring duplicate directory "c:/DoesNotExist/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include/c++/backward" +ignoring duplicate directory "c:/DoesNotExist/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include" ignoring duplicate directory "/mingw/lib/gcc/mingw32/4.9.3/../../../../include" -ignoring duplicate directory "c:/mingw/lib/gcc/../../include" -ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include-fixed" -ignoring nonexistent directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/../../../../mingw32/include" +ignoring duplicate directory "c:/DoesNotExist/mingw/lib/gcc/../../include" +ignoring duplicate directory "c:/DoesNotExist/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/include-fixed" +ignoring nonexistent directory "c:/DoesNotExist/mingw/lib/gcc/../../lib/gcc/mingw32/4.9.3/../../../../mingw32/include" ignoring duplicate directory "/mingw/include" #include "..." search starts here: #include <...> search starts here: - c:\mingw\bin\../lib/gcc/mingw32/4.9.3/include/c++ - c:\mingw\bin\../lib/gcc/mingw32/4.9.3/include/c++/mingw32 - c:\mingw\bin\../lib/gcc/mingw32/4.9.3/include/c++/backward - c:\mingw\bin\../lib/gcc/mingw32/4.9.3/include - c:\mingw\bin\../lib/gcc/mingw32/4.9.3/../../../../include - c:\mingw\bin\../lib/gcc/mingw32/4.9.3/include-fixed + c:\DoesNotExist\mingw\bin\../lib/gcc/mingw32/4.9.3/include/c++ + c:\DoesNotExist\mingw\bin\../lib/gcc/mingw32/4.9.3/include/c++/mingw32 + c:\DoesNotExist\mingw\bin\../lib/gcc/mingw32/4.9.3/include/c++/backward + c:\DoesNotExist\mingw\bin\../lib/gcc/mingw32/4.9.3/include + c:\DoesNotExist\mingw\bin\../lib/gcc/mingw32/4.9.3/../../../../include + c:\DoesNotExist\mingw\bin\../lib/gcc/mingw32/4.9.3/include-fixed End of search list. GNU C++ (GCC) version 4.9.3 (mingw32) compiled by GNU C version 4.9.3, GMP version 5.1.2, MPFR version 3.1.2, MPC version 1.0.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 5086496b116ea21cdc0e479568243b88 COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles\cmTC_2b790.dir\CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=generic' '-march=i586' - c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/as.exe -v -o CMakeFiles\cmTC_2b790.dir\CMakeCXXCompilerABI.cpp.obj C:\Users\DASHBO~1\AppData\Local\Temp\cceEHFvQ.s + c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/as.exe -v -o CMakeFiles\cmTC_2b790.dir\CMakeCXXCompilerABI.cpp.obj C:\Users\DASHBO~1\AppData\Local\Temp\cceEHFvQ.s GNU assembler version 2.25.1 (mingw32) using BFD version (GNU Binutils) 2.25.1 -COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/ -LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.9.3/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../ +COMPILER_PATH=c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/;c:/DoesNotExist/mingw/bin/../libexec/gcc/;c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/ +LIBRARY_PATH=c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/;c:/DoesNotExist/mingw/bin/../lib/gcc/;c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/lib/;c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../ COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles\cmTC_2b790.dir\CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=generic' '-march=i586' Linking CXX executable cmTC_2b790.exe "C:\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_2b790.dir\link.txt --verbose=1 "C:\CMake\bin\cmake.exe" -E remove -f CMakeFiles\cmTC_2b790.dir/objects.a -C:\MinGW\bin\ar.exe cr CMakeFiles\cmTC_2b790.dir/objects.a @CMakeFiles\cmTC_2b790.dir\objects1.rsp -C:\MinGW\bin\g++.exe -v -Wl,--whole-archive CMakeFiles\cmTC_2b790.dir/objects.a -Wl,--no-whole-archive -o cmTC_2b790.exe -Wl,--out-implib,libcmTC_2b790.dll.a -Wl,--major-image-version,0,--minor-image-version,0 +C:\DoesNotExist\MinGW\bin\ar.exe cr CMakeFiles\cmTC_2b790.dir/objects.a @CMakeFiles\cmTC_2b790.dir\objects1.rsp +C:\DoesNotExist\MinGW\bin\g++.exe -v -Wl,--whole-archive CMakeFiles\cmTC_2b790.dir/objects.a -Wl,--no-whole-archive -o cmTC_2b790.exe -Wl,--out-implib,libcmTC_2b790.dll.a -Wl,--major-image-version,0,--minor-image-version,0 Using built-in specs. -COLLECT_GCC=C:\MinGW\bin\g++.exe -COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/lto-wrapper.exe +COLLECT_GCC=C:\DoesNotExist\MinGW\bin\g++.exe +COLLECT_LTO_WRAPPER=c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/lto-wrapper.exe Target: mingw32 Configured with: ../src/gcc-4.9.3/configure --build=x86_64-pc-linux-gnu --host=mingw32 --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-libstdcxx-debug --with-tune=generic --enable-nls Thread model: win32 gcc version 4.9.3 (GCC) -COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/ -LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.9.3/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../ +COMPILER_PATH=c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/;c:/DoesNotExist/mingw/bin/../libexec/gcc/;c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/bin/ +LIBRARY_PATH=c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/;c:/DoesNotExist/mingw/bin/../lib/gcc/;c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/lib/;c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../ COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_2b790.exe' '-shared-libgcc' '-mtune=generic' '-march=i586' - c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/collect2.exe -plugin c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/liblto_plugin-0.dll -plugin-opt=c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\DASHBO~1\AppData\Local\Temp\ccYpt7zh.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -Bdynamic -u ___register_frame_info -u ___deregister_frame_info -o cmTC_2b790.exe c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../crt2.o c:/mingw/bin/../lib/gcc/mingw32/4.9.3/crtbegin.o -Lc:/mingw/bin/../lib/gcc/mingw32/4.9.3 -Lc:/mingw/bin/../lib/gcc -Lc:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/lib -Lc:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../.. --whole-archive CMakeFiles\cmTC_2b790.dir/objects.a --no-whole-archive --out-implib libcmTC_2b790.dll.a --major-image-version 0 --minor-image-version 0 -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt c:/mingw/bin/../lib/gcc/mingw32/4.9.3/crtend.o + c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/collect2.exe -plugin c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/liblto_plugin-0.dll -plugin-opt=c:/DoesNotExist/mingw/bin/../libexec/gcc/mingw32/4.9.3/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\DASHBO~1\AppData\Local\Temp\ccYpt7zh.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -Bdynamic -u ___register_frame_info -u ___deregister_frame_info -o cmTC_2b790.exe c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../crt2.o c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/crtbegin.o -Lc:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3 -Lc:/DoesNotExist/mingw/bin/../lib/gcc -Lc:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../mingw32/lib -Lc:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/../../.. --whole-archive CMakeFiles\cmTC_2b790.dir/objects.a --no-whole-archive --out-implib libcmTC_2b790.dll.a --major-image-version 0 --minor-image-version 0 -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt c:/DoesNotExist/mingw/bin/../lib/gcc/mingw32/4.9.3/crtend.o mingw32-make.exe[1]: Leaving directory 'C:/tmp/ii/CMakeFiles/CMakeTmp' diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-CXX-GNU-4.9.3.output b/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-CXX-GNU-4.9.3.output index 881a1a1..7a5e447 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-CXX-GNU-4.9.3.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-CXX-GNU-4.9.3.output @@ -1 +1 @@ -c:/mingw/bin/../lib/gcc/mingw32/4.9.3/include/c++;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/include/c++/mingw32;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/include/c++/backward;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/include;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/../../../../include;c:/mingw/bin/../lib/gcc/mingw32/4.9.3/include-fixed +C:/DoesNotExist/mingw/lib/gcc/mingw32/4.9.3/include/c++;C:/DoesNotExist/mingw/lib/gcc/mingw32/4.9.3/include/c++/mingw32;C:/DoesNotExist/mingw/lib/gcc/mingw32/4.9.3/include/c++/backward;C:/DoesNotExist/mingw/lib/gcc/mingw32/4.9.3/include;C:/DoesNotExist/mingw/include;C:/DoesNotExist/mingw/lib/gcc/mingw32/4.9.3/include-fixed |