From kwrobot at kitware.com Tue Dec 1 00:01:11 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 1 Dec 2015 00:01:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.0-625-ga6f5281 Message-ID: <20151201050111.75B0BD71FD@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via a6f5281419c59b433f248b41972530242172a124 (commit) from 2218962dbdc7f552a076978a0393433091aa35c4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6f5281419c59b433f248b41972530242172a124 commit a6f5281419c59b433f248b41972530242172a124 Author: Kitware Robot AuthorDate: Tue Dec 1 00:01:08 2015 -0500 Commit: Kitware Robot CommitDate: Tue Dec 1 00:01:08 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0f9b810..993d72c 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 4) -set(CMake_VERSION_PATCH 20151130) +set(CMake_VERSION_PATCH 20151201) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 1 08:49:58 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 1 Dec 2015 08:49:58 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1553-g343a2a6 Message-ID: <20151201134958.546C6D6ED4@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 343a2a6fe2bf4ddd7b661fee1f6b1315247ae01d (commit) via fe05ad975292a2ff57a66746f1aa3870217f1ddd (commit) via e25f294a0e0aa03da4516d0baa488ad02cece089 (commit) from 523ccb5cf99486b8951bec2505c677310eee710a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=343a2a6fe2bf4ddd7b661fee1f6b1315247ae01d commit 343a2a6fe2bf4ddd7b661fee1f6b1315247ae01d Merge: 523ccb5 fe05ad9 Author: Brad King AuthorDate: Tue Dec 1 08:49:57 2015 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 1 08:49:57 2015 -0500 Merge topic 'update-kwsys' into next fe05ad97 Merge branch 'upstream-kwsys' into update-kwsys e25f294a KWSys 2015-12-01 (9596e98d) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe05ad975292a2ff57a66746f1aa3870217f1ddd commit fe05ad975292a2ff57a66746f1aa3870217f1ddd Merge: 2218962 e25f294 Author: Brad King AuthorDate: Tue Dec 1 08:46:55 2015 -0500 Commit: Brad King CommitDate: Tue Dec 1 08:46:55 2015 -0500 Merge branch 'upstream-kwsys' into update-kwsys https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e25f294a0e0aa03da4516d0baa488ad02cece089 commit e25f294a0e0aa03da4516d0baa488ad02cece089 Author: KWSys Robot AuthorDate: Tue Dec 1 08:44:34 2015 -0500 Commit: Brad King CommitDate: Tue Dec 1 08:46:40 2015 -0500 KWSys 2015-12-01 (9596e98d) Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ 9596e98d | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' a7e5360f..9596e98d Dmitry Marakasov (1): b86a2a3e Process: Fix off-by-one when adding two times Marek Vasut (1): ddfa8019 CPU: Add NIOS2 support Rolf Eike Beer (2): 0adafb51 SystemTools: use FindProgram() overload that checks for directory 9596e98d SystemTools: move some code around that is used only on Windows-like platforms diff --git a/CPU.h.in b/CPU.h.in index 884d71a..66ffbb1 100644 --- a/CPU.h.in +++ b/CPU.h.in @@ -88,6 +88,10 @@ #elif defined(__mips) || defined(__mips__) || defined(__MIPS__) # define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG +/* NIOS2 */ +#elif defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__) +# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE + /* OpenRISC 1000 */ #elif defined(__or1k__) # define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG diff --git a/ProcessUNIX.c b/ProcessUNIX.c index 6d9b109..b0ddf5a 100644 --- a/ProcessUNIX.c +++ b/ProcessUNIX.c @@ -2241,7 +2241,7 @@ static kwsysProcessTime kwsysProcessTimeAdd(kwsysProcessTime in1, kwsysProcessTi kwsysProcessTime out; out.tv_sec = in1.tv_sec + in2.tv_sec; out.tv_usec = in1.tv_usec + in2.tv_usec; - if(out.tv_usec > 1000000) + if(out.tv_usec >= 1000000) { out.tv_usec -= 1000000; out.tv_sec += 1; diff --git a/SystemTools.cxx b/SystemTools.cxx index da34eb9..37fe421 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -2970,6 +2970,8 @@ std::string SystemTools::FindProgram( bool no_system_path) { std::vector extensions; + std::string tryPath; + #if defined (_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) bool hasExtension = false; // check to see if the name already has a .xxx at @@ -2983,22 +2985,22 @@ std::string SystemTools::FindProgram( { extensions.push_back(".com"); extensions.push_back(".exe"); - } -#endif - std::string tryPath; - // first try with extensions if the os supports them - for(std::vector::iterator i = - extensions.begin(); i != extensions.end(); ++i) - { - tryPath = name; - tryPath += *i; - if(SystemTools::FileExists(tryPath) && - !SystemTools::FileIsDirectory(tryPath)) + // first try with extensions if the os supports them + for(std::vector::iterator i = + extensions.begin(); i != extensions.end(); ++i) { - return SystemTools::CollapseFullPath(tryPath); + tryPath = name; + tryPath += *i; + if(SystemTools::FileExists(tryPath) && + !SystemTools::FileIsDirectory(tryPath)) + { + return SystemTools::CollapseFullPath(tryPath); + } } } +#endif + // now try just the name tryPath = name; if(SystemTools::FileExists(tryPath) && @@ -3048,8 +3050,7 @@ std::string SystemTools::FindProgram( tryPath = *p; tryPath += name; tryPath += *ext; - if(SystemTools::FileExists(tryPath) && - !SystemTools::FileIsDirectory(tryPath)) + if(SystemTools::FileExists(tryPath, true)) { return SystemTools::CollapseFullPath(tryPath); } @@ -3057,8 +3058,7 @@ std::string SystemTools::FindProgram( // now try it without them tryPath = *p; tryPath += name; - if(SystemTools::FileExists(tryPath) && - !SystemTools::FileIsDirectory(tryPath)) + if(SystemTools::FileExists(tryPath, true)) { return SystemTools::CollapseFullPath(tryPath); } @@ -3097,8 +3097,7 @@ std::string SystemTools const std::vector& userPaths) { // See if the executable exists as written. - if(SystemTools::FileExists(name) && - !SystemTools::FileIsDirectory(name)) + if(SystemTools::FileExists(name, true)) { return SystemTools::CollapseFullPath(name); } @@ -3144,8 +3143,7 @@ std::string SystemTools tryPath = *p; tryPath += name; tryPath += ".lib"; - if(SystemTools::FileExists(tryPath) - && !SystemTools::FileIsDirectory(tryPath)) + if(SystemTools::FileExists(tryPath, true)) { return SystemTools::CollapseFullPath(tryPath); } @@ -3154,8 +3152,7 @@ std::string SystemTools tryPath += "lib"; tryPath += name; tryPath += ".so"; - if(SystemTools::FileExists(tryPath) - && !SystemTools::FileIsDirectory(tryPath)) + if(SystemTools::FileExists(tryPath, true)) { return SystemTools::CollapseFullPath(tryPath); } @@ -3163,8 +3160,7 @@ std::string SystemTools tryPath += "lib"; tryPath += name; tryPath += ".a"; - if(SystemTools::FileExists(tryPath) - && !SystemTools::FileIsDirectory(tryPath)) + if(SystemTools::FileExists(tryPath, true)) { return SystemTools::CollapseFullPath(tryPath); } @@ -3172,8 +3168,7 @@ std::string SystemTools tryPath += "lib"; tryPath += name; tryPath += ".sl"; - if(SystemTools::FileExists(tryPath) - && !SystemTools::FileIsDirectory(tryPath)) + if(SystemTools::FileExists(tryPath, true)) { return SystemTools::CollapseFullPath(tryPath); } @@ -3181,8 +3176,7 @@ std::string SystemTools tryPath += "lib"; tryPath += name; tryPath += ".dylib"; - if(SystemTools::FileExists(tryPath) - && !SystemTools::FileIsDirectory(tryPath)) + if(SystemTools::FileExists(tryPath, true)) { return SystemTools::CollapseFullPath(tryPath); } @@ -3190,8 +3184,7 @@ std::string SystemTools tryPath += "lib"; tryPath += name; tryPath += ".dll"; - if(SystemTools::FileExists(tryPath) - && !SystemTools::FileIsDirectory(tryPath)) + if(SystemTools::FileExists(tryPath, true)) { return SystemTools::CollapseFullPath(tryPath); } ----------------------------------------------------------------------- Summary of changes: Source/kwsys/CPU.h.in | 4 ++++ Source/kwsys/ProcessUNIX.c | 2 +- Source/kwsys/SystemTools.cxx | 53 ++++++++++++++++++------------------------ 3 files changed, 28 insertions(+), 31 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 1 09:00:50 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 1 Dec 2015 09:00:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1556-g67dbde4 Message-ID: <20151201140050.3F3CDD7A2F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 67dbde412032c40fec53387ac32e7361b208166b (commit) via 16f5d1843b3720729f50376f522550fcfa787a3c (commit) via a6f5281419c59b433f248b41972530242172a124 (commit) from 343a2a6fe2bf4ddd7b661fee1f6b1315247ae01d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67dbde412032c40fec53387ac32e7361b208166b commit 67dbde412032c40fec53387ac32e7361b208166b Merge: 343a2a6 16f5d18 Author: Brad King AuthorDate: Tue Dec 1 09:00:49 2015 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 1 09:00:49 2015 -0500 Merge topic 'include-for-mode_t' into next 16f5d184 Include `sys/types.h` header to get `mode_t` a6f52814 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=16f5d1843b3720729f50376f522550fcfa787a3c commit 16f5d1843b3720729f50376f522550fcfa787a3c Author: Kylie McClain AuthorDate: Wed Nov 25 18:12:06 2015 -0500 Commit: Brad King CommitDate: Tue Dec 1 08:58:45 2015 -0500 Include `sys/types.h` header to get `mode_t` Do not depend on it being included by other system headers. It is not included by others on musl-libc, for example. diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index dd8fa9c..aed2e74 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -54,6 +54,8 @@ #if defined( _MSC_VER ) typedef unsigned short mode_t; +#else +# include #endif // use this class to shrink the size of symbols in .o files ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Source/cmStandardIncludes.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 1 09:07:47 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 1 Dec 2015 09:07:47 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1558-g3a00e36 Message-ID: <20151201140747.E3B4CD7CD2@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 3a00e367994cde14d1a23a753b5e281e6342554a (commit) via e10bfb77472f0a1706337e03d53f9c14c2347448 (commit) from 67dbde412032c40fec53387ac32e7361b208166b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a00e367994cde14d1a23a753b5e281e6342554a commit 3a00e367994cde14d1a23a753b5e281e6342554a Merge: 67dbde4 e10bfb7 Author: Brad King AuthorDate: Tue Dec 1 09:07:47 2015 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 1 09:07:47 2015 -0500 Merge topic 'intel-compiler-features' into next e10bfb77 Revert "Features: Record standards and features for Intel C++ on UNIX" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e10bfb77472f0a1706337e03d53f9c14c2347448 commit e10bfb77472f0a1706337e03d53f9c14c2347448 Author: Brad King AuthorDate: Tue Dec 1 09:07:30 2015 -0500 Commit: Brad King CommitDate: Tue Dec 1 09:07:30 2015 -0500 Revert "Features: Record standards and features for Intel C++ on UNIX" This reverts commit 117d49b8b7671b7ad2901de444da725eda8ea8cc. It will be revised. diff --git a/Help/release/dev/intel-compiler-features.rst b/Help/release/dev/intel-compiler-features.rst deleted file mode 100644 index f154dc9..0000000 --- a/Help/release/dev/intel-compiler-features.rst +++ /dev/null @@ -1,6 +0,0 @@ -intel-compiler-features ------------------------ - -* The :manual:`Compile Features ` functionality - is now aware of features supported by Intel C++ compilers versions 12.1 - through 16.0 on UNIX platforms. diff --git a/Modules/Compiler/Intel-CXX-FeatureTests.cmake b/Modules/Compiler/Intel-CXX-FeatureTests.cmake deleted file mode 100644 index 95792b0..0000000 --- a/Modules/Compiler/Intel-CXX-FeatureTests.cmake +++ /dev/null @@ -1,90 +0,0 @@ -# References: -# - https://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler -# - https://software.intel.com/en-us/articles/c14-features-supported-by-intel-c-compiler - -# these are not implemented in any version at time of writing -#set(_cmake_feature_test_cxx_variable_templates "${Intel15_CXX14}") -#set(_cmake_feature_test_cxx_relaxed_constexpr "${Intel15_CXX14}") - -# unknown if this is implemented -#set(_cmake_feature_test_cxx_aggregate_default_initializers "${Intel15_CXX14}") - -set(DETECT_CXX11 "((__cplusplus >= 201103L) || defined(__INTEL_CXX11_MODE__) || defined(__GXX_EXPERIMENTAL_CXX0X__))") -set(DETECT_CXX14 "((__cplusplus >= 201103L) && !defined(__INTEL_CXX11_MODE__))") - -set(Intel16_CXX14 "__ICC >= 1600 && ${DETECT_CXX14}") -set(_cmake_feature_test_cxx_contextual_conversions "${Intel16_CXX14}") -set(_cmake_feature_test_cxx_generic_lambdas "${Intel16_CXX14}") -set(_cmake_feature_test_cxx_digit_separators "${Intel16_CXX14}") -# This test is supposed to work in Intel 14 but the compiler has a bug -# in versions 14 and 15:: -# https://software.intel.com/en-us/forums/intel-c-compiler/topic/600514 -set(_cmake_feature_test_cxx_generalized_initializers "${Intel16_CXX14}") - -set(Intel15_CXX14 "__ICC >= 1500 && ${DETECT_CXX14}") -set(_cmake_feature_test_cxx_decltype_auto "${Intel15_CXX14}") -set(_cmake_feature_test_cxx_lambda_init_captures "${Intel15_CXX14}") -set(_cmake_feature_test_cxx_attribute_deprecated "${Intel15_CXX14}") -set(_cmake_feature_test_cxx_return_type_deduction "${Intel15_CXX14}") - -set(Intel15_CXX11 "__ICC >= 1500 && ${DETECT_CXX11}") -set(_cmake_feature_test_cxx_alignas "${Intel15_CXX11}") -set(_cmake_feature_test_cxx_alignof "${Intel15_CXX11}") -set(_cmake_feature_test_cxx_inheriting_constructors "${Intel15_CXX11}") -set(_cmake_feature_test_cxx_user_literals "${Intel15_CXX11}") -set(_cmake_feature_test_cxx_thread_local "${Intel15_CXX11}") - -set(Intel14_CXX11 "${DETECT_CXX11} && (__ICC > 1400 || (__ICC == 1400 && __INTEL_COMPILER_UPDATE >= 2))") -# Documented as 12.0+ but in testing it only works on 14.0.2+ -set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${Intel14_CXX11}") - -set(Intel14_CXX11 "__ICC >= 1400 && ${DETECT_CXX11}") -set(_cmake_feature_test_cxx_delegating_constructors "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_constexpr "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_sizeof_member "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_strong_enums "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_reference_qualified_functions "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_raw_string_literals "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_unicode_literals "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_inline_namespaces "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_unrestricted_unions "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_nonstatic_member_init "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_enum_forward_declarations "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_override "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_final "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_noexcept "${Intel14_CXX11}") -set(_cmake_feature_test_cxx_defaulted_move_initializers "${Intel14_CXX11}") - -set(Intel13_CXX11 "__ICC >= 1300 && ${DETECT_CXX11}") -set(_cmake_feature_test_cxx_explicit_conversions "${Intel13_CXX11}") -set(_cmake_feature_test_cxx_range_for "${Intel13_CXX11}") -# Cannot find Intel documentation for N2640: cxx_uniform_initialization -set(_cmake_feature_test_cxx_uniform_initialization "${Intel13_CXX11}") - -set(Intel121_CXX11 "__ICC >= 1210 && ${DETECT_CXX11}") -set(_cmake_feature_test_cxx_variadic_templates "${Intel121_CXX11}") -set(_cmake_feature_test_cxx_alias_templates "${Intel121_CXX11}") -set(_cmake_feature_test_cxx_nullptr "${Intel121_CXX11}") -set(_cmake_feature_test_cxx_trailing_return_types "${Intel121_CXX11}") -set(_cmake_feature_test_cxx_attributes "${Intel121_CXX11}") -set(_cmake_feature_test_cxx_default_function_template_args "${Intel121_CXX11}") - -set(Intel12_CXX11 "__ICC >= 1200 && ${DETECT_CXX11}") -set(_cmake_feature_test_cxx_extended_friend_declarations "${Intel12_CXX11}") -set(_cmake_feature_test_cxx_rvalue_references "${Intel12_CXX11}") -set(_cmake_feature_test_cxx_decltype "${Intel12_CXX11}") -set(_cmake_feature_test_cxx_defaulted_functions "${Intel12_CXX11}") -set(_cmake_feature_test_cxx_deleted_functions "${Intel12_CXX11}") -set(_cmake_feature_test_cxx_local_type_template_args "${Intel12_CXX11}") -set(_cmake_feature_test_cxx_lambdas "${Intel12_CXX11}") - -set(_cmake_oldestSupported "__ICC >= 1110 && ${DETECT_CXX11}") -set(_cmake_feature_test_cxx_binary_literals "${_cmake_oldestSupported}") -set(_cmake_feature_test_cxx_static_assert "${_cmake_oldestSupported}") -set(_cmake_feature_test_cxx_right_angle_brackets "${_cmake_oldestSupported}") -set(_cmake_feature_test_cxx_auto_type "${_cmake_oldestSupported}") -set(_cmake_feature_test_cxx_extern_templates "${_cmake_oldestSupported}") -set(_cmake_feature_test_cxx_variadic_macros "${_cmake_oldestSupported}") -set(_cmake_feature_test_cxx_long_long_type "${_cmake_oldestSupported}") -set(_cmake_feature_test_cxx_func_identifier "${_cmake_oldestSupported}") -set(_cmake_feature_test_cxx_template_template_parameters "${_cmake_oldestSupported}") diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index 65f3134..7947695 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -8,58 +8,5 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") set(CMAKE_DEPFILE_FLAGS_CXX "-MMD -MT -MF ") -if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.2) - set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14") - # todo: there is no gnu++14 value supported; figure out what to do - set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=c++14") -elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0.0) - set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y") - # todo: there is no gnu++14 value supported; figure out what to do - set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=c++1y") -endif() - -if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0) - set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") - set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11") -elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) - set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++0x") - set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++0x") -endif() - -if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) - set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98") - set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98") - - if (NOT CMAKE_CXX_COMPILER_FORCED) - if (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT) - message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}") - else() - set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT}) - endif() - elseif (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT) - # Compiler id was forced so just guess the default standard level. - set(CMAKE_CXX_STANDARD_DEFAULT 98) - endif() -endif() - -macro(cmake_record_cxx_compile_features) - macro(_get_intel_features std_version list) - record_compiler_features(CXX "${std_version}" ${list}) - endmacro() - - set(_result 0) - if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0) - _get_intel_features(${CMAKE_CXX14_STANDARD_COMPILE_OPTION} CMAKE_CXX14_COMPILE_FEATURES) - endif() - if (_result EQUAL 0) - _get_intel_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES) - endif() - if (_result EQUAL 0) - _get_intel_features(${CMAKE_CXX98_STANDARD_COMPILE_OPTION} CMAKE_CXX98_COMPILE_FEATURES) - endif() - endif() -endmacro() - set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -S -o ") diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index e6acee8..a32138d 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -119,55 +119,6 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") endif() endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") - if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0) - if (CMAKE_CXX_COMIPLER_VERSION VERSION_EQUAL 15.0) - list(REMOVE_ITEM CXX_non_features - # The cxx_contextual_conversions feature happens to work - # (for *this* testcase) with Intel 13/14/15, but they do not - # document support until 16. - cxx_contextual_conversions - ) - - elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0) - list(REMOVE_ITEM CXX_non_features - cxx_alignof - - # not supposed to work until 15 - cxx_attribute_deprecated - - # The cxx_contextual_conversions feature happens to work - # (for *this* testcase) with Intel 13/14/15, but they do not - # document support until 16. - cxx_contextual_conversions - ) - - elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) - list(REMOVE_ITEM CXX_non_features - # These features happen to work but aren't documented to - # do so until 14.0 - cxx_constexpr - cxx_enum_forward_declarations - cxx_sizeof_member - cxx_strong_enums - cxx_unicode_literals - - # not supposed to work until 15 - cxx_attribute_deprecated - cxx_nonstatic_member_init - - # The cxx_contextual_conversions feature happens to work - # (for *this* testcase) with Intel 13/14/15, but they do not - # document support until 16. - cxx_contextual_conversions - - # This is an undocumented feature; it does not work in future versions - cxx_aggregate_default_initializers - ) - endif() - endif() -endif() - set(C_ext c) set(C_standard_flag 11) set(CXX_ext cpp) @@ -350,29 +301,6 @@ if (CMAKE_CXX_COMPILE_FEATURES) -DEXPECT_FINAL=1 -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=1 ) - elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15) - add_definitions( - -DEXPECT_OVERRIDE_CONTROL=1 - -DEXPECT_INHERITING_CONSTRUCTORS=1 - -DEXPECT_FINAL=1 - -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=1 - ) - elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14) - add_definitions( - -DEXPECT_OVERRIDE_CONTROL=1 - -DEXPECT_INHERITING_CONSTRUCTORS=0 - -DEXPECT_FINAL=1 - -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0 - ) - else() - add_definitions( - -DEXPECT_OVERRIDE_CONTROL=0 - -DEXPECT_INHERITING_CONSTRUCTORS=0 - -DEXPECT_FINAL=0 - -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0 - ) - endif() endif() add_executable(CompileFeaturesGenex genex_test.cpp) ----------------------------------------------------------------------- Summary of changes: Help/release/dev/intel-compiler-features.rst | 6 -- Modules/Compiler/Intel-CXX-FeatureTests.cmake | 90 ------------------------- Modules/Compiler/Intel-CXX.cmake | 53 --------------- Tests/CompileFeatures/CMakeLists.txt | 72 -------------------- 4 files changed, 221 deletions(-) delete mode 100644 Help/release/dev/intel-compiler-features.rst delete mode 100644 Modules/Compiler/Intel-CXX-FeatureTests.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 1 10:27:08 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 1 Dec 2015 10:27:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1567-gcfcc9d5 Message-ID: <20151201152708.BCFF9D81F4@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via cfcc9d523d53ca01cdebe0e6c01e7e03b8fa8780 (commit) via aac633d5e5765bb6b51e31364325ae7d916f021c (commit) via e8974b62d7883adf100d4c6ad90a0fbf682aaa91 (commit) via b146747ed7f3cee8d8ef9c3ea6899ec3135aa527 (commit) via da688bcb3b7edc1da19fc8b89e2425f40d3fa7f1 (commit) via 07388f83b69739116c8364e9443f10158fcdc912 (commit) via 246b0bfbfda9a8f3091fc34fc92816aebaf60ae9 (commit) via deec3a3f06d341cfe0bef4e856b263eff347cc72 (commit) via aa427a4239eb691d4129ebc383ab7b0d61b5b94e (commit) from 3a00e367994cde14d1a23a753b5e281e6342554a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cfcc9d523d53ca01cdebe0e6c01e7e03b8fa8780 commit cfcc9d523d53ca01cdebe0e6c01e7e03b8fa8780 Merge: 3a00e36 aac633d Author: Brad King AuthorDate: Tue Dec 1 10:27:06 2015 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 1 10:27:06 2015 -0500 Merge topic 'cmake-W-options' into next aac633d5 Explicitly enable deprecated warnings by default. e8974b62 Modify dev warning options to affect deprecated warnings. b146747e Consistent documentation for deprecation message variables. da688bcb Add -W options to control deprecated warning messages. 07388f83 Refactor the -W options parser to be generic. 246b0bfb Explicitly enable author (dev) warnings by default. deec3a3f Make message suppression more consistent. aa427a42 Tests: Revise message in RunCMake.CommandLine -Wdev case https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aac633d5e5765bb6b51e31364325ae7d916f021c commit aac633d5e5765bb6b51e31364325ae7d916f021c Author: Michael Scott AuthorDate: Sun Nov 29 13:34:07 2015 +0000 Commit: Brad King CommitDate: Tue Dec 1 10:22:51 2015 -0500 Explicitly enable deprecated warnings by default. Explicitly enable deprecated warnings by default, via the cmake::GetSuppressDeprecatedWarnings method, which signals suppression is turned off unless the CMake variables are set as required. Add tests and update the documentation for the new functionality. diff --git a/Help/release/dev/cmake-W-options.rst b/Help/release/dev/cmake-W-options.rst index 4784718..57d375f 100644 --- a/Help/release/dev/cmake-W-options.rst +++ b/Help/release/dev/cmake-W-options.rst @@ -6,3 +6,7 @@ cmake-W-options * The ``-Wdev`` and ``-Wno-dev`` :manual:`cmake(1)` options now also enable and suppress the deprecated warnings output by default. + +* Warnings about deprecated functionality are now enabled by default. + They may be suppressed with ``-Wno-deprecated`` or by setting the + :variable:`CMAKE_WARN_DEPRECATED` variable to false. diff --git a/Help/variable/CMAKE_WARN_DEPRECATED.rst b/Help/variable/CMAKE_WARN_DEPRECATED.rst index 5f87c34..4a224fa 100644 --- a/Help/variable/CMAKE_WARN_DEPRECATED.rst +++ b/Help/variable/CMAKE_WARN_DEPRECATED.rst @@ -3,8 +3,8 @@ CMAKE_WARN_DEPRECATED Whether to issue warnings for deprecated functionality. -If ``TRUE``, use of deprecated functionality will issue warnings. -If this variable is not set, CMake behaves as if it were set to ``FALSE``. +If not ``FALSE``, use of deprecated functionality will issue warnings. +If this variable is not set, CMake behaves as if it were set to ``TRUE``. When running :manual:`cmake(1)`, this option can be enabled with the ``-Wdeprecated`` option, or disabled with the ``-Wno-deprecated`` option. diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx index fd0345d..8272eb0 100644 --- a/Source/cmMessageCommand.cxx +++ b/Source/cmMessageCommand.cxx @@ -66,13 +66,17 @@ bool cmMessageCommand fatal = true; type = cmake::DEPRECATION_ERROR; } - else if (this->Makefile->IsOn("CMAKE_WARN_DEPRECATED")) - { - type = cmake::DEPRECATION_WARNING; - } else { - return true; + if (this->Makefile->GetCMakeInstance()->GetSuppressDeprecatedWarnings( + this->Makefile)) + { + return true; + } + else + { + type = cmake::DEPRECATION_WARNING; + } } ++i; } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 6481c78..c0a1196 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2581,10 +2581,7 @@ bool cmake::IsMessageTypeVisible(cmake::MessageType t) } else if (t == cmake::DEPRECATION_WARNING) { - // if CMAKE_WARN_DEPRECATED is on, show the message, otherwise suppress it - const char* warnDeprecated = this->State->GetInitializedCacheValue( - "CMAKE_WARN_DEPRECATED"); - if(cmSystemTools::IsOff(warnDeprecated)) + if (this->GetSuppressDeprecatedWarnings()) { isVisible = false; } @@ -2916,3 +2913,22 @@ bool cmake::GetSuppressDevWarnings(cmMakefile const* mf) return cmSystemTools::IsOn(cacheEntryValue); } } + +bool cmake::GetSuppressDeprecatedWarnings(cmMakefile const* mf) +{ + /* + * The suppression CMake variable may be set in the CMake configuration file + * itself, so we have to check what its set to in the makefile if we can. + */ + if (mf) + { + return (mf->IsSet("CMAKE_WARN_DEPRECATED") && + !mf->IsOn("CMAKE_WARN_DEPRECATED")); + } + else + { + const char* cacheEntryValue = this->State->GetCacheEntryValue( + "CMAKE_WARN_DEPRECATED"); + return cacheEntryValue && cmSystemTools::IsOff(cacheEntryValue); + } +} diff --git a/Source/cmake.h b/Source/cmake.h index 8739b87..4c5515b 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -316,6 +316,13 @@ class cmake */ bool GetSuppressDevWarnings(cmMakefile const* mf = NULL); + /* + * Get the state of the suppression of deprecated warnings. + * Returns false, by default, if deprecated warnings should be shown, true + * otherwise. + */ + bool GetSuppressDeprecatedWarnings(cmMakefile const* mf = NULL); + /** Display a message to the user. */ void IssueMessage(cmake::MessageType t, std::string const& text, cmListFileBacktrace const& backtrace = cmListFileBacktrace(), diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index efe143e..6b4b384 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -157,6 +157,9 @@ unset(RunCMake_TEST_OPTIONS) # Dev warnings should be on by default run_cmake(Wdev) +# Deprecated warnings should be on by default +run_cmake(Wdeprecated) + # Conflicting -W options should honor the last value set(RunCMake_TEST_OPTIONS -Wno-dev -Wdev) run_cmake(Wdev) diff --git a/Tests/RunCMake/message/defaultmessage-stderr.txt b/Tests/RunCMake/message/defaultmessage-stderr.txt index 95656ec..dd1b28f 100644 --- a/Tests/RunCMake/message/defaultmessage-stderr.txt +++ b/Tests/RunCMake/message/defaultmessage-stderr.txt @@ -1,4 +1,10 @@ -^CMake Warning \(dev\) at defaultmessage.cmake:4 \(message\): +^CMake Deprecation Warning at defaultmessage.cmake:2 \(message\): + This is a deprecation warning +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) + + +CMake Warning \(dev\) at defaultmessage.cmake:4 \(message\): This is a author warning Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/message/nomessage.cmake b/Tests/RunCMake/message/nomessage.cmake index 582ab4d..78f4769 100644 --- a/Tests/RunCMake/message/nomessage.cmake +++ b/Tests/RunCMake/message/nomessage.cmake @@ -1,4 +1,6 @@ +set(CMAKE_WARN_DEPRECATED OFF) + message(DEPRECATION "This is not issued") set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS ON) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8974b62d7883adf100d4c6ad90a0fbf682aaa91 commit e8974b62d7883adf100d4c6ad90a0fbf682aaa91 Author: Michael Scott AuthorDate: Sun Nov 8 23:34:59 2015 +0000 Commit: Brad King CommitDate: Tue Dec 1 10:22:45 2015 -0500 Modify dev warning options to affect deprecated warnings. Change the '-Wdev' and '-Wno-dev' options to also enable and suppress the deprecated warnings output, via the 'CMAKE_WARN_DEPRECATED' CMake variable, by default. This action does not happen if the user specifies a deprecated warning message option. Add tests and update the documentation for the new functionality. diff --git a/Help/manual/OPTIONS_BUILD.txt b/Help/manual/OPTIONS_BUILD.txt index eec138c..977264c 100644 --- a/Help/manual/OPTIONS_BUILD.txt +++ b/Help/manual/OPTIONS_BUILD.txt @@ -77,13 +77,14 @@ Suppress developer warnings. Suppress warnings that are meant for the author of the - CMakeLists.txt files. + CMakeLists.txt files. By default this will also turn off + deprecation warnings. ``-Wdev`` Enable developer warnings. Enable warnings that are meant for the author of the CMakeLists.txt - files. + files. By default this will also turn on deprecation warnings. ``-Wdeprecated`` Enable deprecated functionality warnings. diff --git a/Help/release/dev/cmake-W-options.rst b/Help/release/dev/cmake-W-options.rst index e64d618..4784718 100644 --- a/Help/release/dev/cmake-W-options.rst +++ b/Help/release/dev/cmake-W-options.rst @@ -3,3 +3,6 @@ cmake-W-options * The :variable:`CMAKE_WARN_DEPRECATED` variable can now be set using the ``-Wdeprecated`` and ``-Wno-deprecated`` :manual:`cmake(1)` options. + +* The ``-Wdev`` and ``-Wno-dev`` :manual:`cmake(1)` options now also enable + and suppress the deprecated warnings output by default. diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 37d7e0a..6481c78 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1285,6 +1285,16 @@ int cmake::Configure() if (this->DiagLevels.count("dev") == 1) { + bool setDeprecatedVariables = false; + + const char* cachedWarnDeprecated = + this->State->GetCacheEntryValue("CMAKE_WARN_DEPRECATED"); + + // don't overwrite deprecated warning setting from a previous invocation + if (!cachedWarnDeprecated) + { + setDeprecatedVariables = true; + } diagLevel = this->DiagLevels["dev"]; if (diagLevel == DIAG_IGNORE) @@ -1293,6 +1303,14 @@ int cmake::Configure() "Suppress Warnings that are meant for" " the author of the CMakeLists.txt files.", cmState::INTERNAL); + + if (setDeprecatedVariables) + { + this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "FALSE", + "Whether to issue warnings for deprecated " + "functionality.", + cmState::INTERNAL); + } } else if (diagLevel == DIAG_WARN) { @@ -1300,6 +1318,14 @@ int cmake::Configure() "Suppress Warnings that are meant for" " the author of the CMakeLists.txt files.", cmState::INTERNAL); + + if (setDeprecatedVariables) + { + this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "TRUE", + "Whether to issue warnings for deprecated " + "functionality.", + cmState::INTERNAL); + } } } diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index f726ae2..efe143e 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -133,6 +133,19 @@ set(RunCMake_TEST_OPTIONS -Wdev) run_cmake(Wdev) unset(RunCMake_TEST_OPTIONS) +# -Wdev should not override deprecated options if specified +set(RunCMake_TEST_OPTIONS -Wdev -Wno-deprecated) +run_cmake(Wno-deprecated) +unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_OPTIONS -Wno-deprecated -Wdev) +run_cmake(Wno-deprecated) +unset(RunCMake_TEST_OPTIONS) + +# -Wdev should enable deprecated warnings as well +set(RunCMake_TEST_OPTIONS -Wdev) +run_cmake(Wdeprecated) +unset(RunCMake_TEST_OPTIONS) + set(RunCMake_TEST_OPTIONS -Wdeprecated) run_cmake(Wdeprecated) unset(RunCMake_TEST_OPTIONS) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b146747ed7f3cee8d8ef9c3ea6899ec3135aa527 commit b146747ed7f3cee8d8ef9c3ea6899ec3135aa527 Author: Michael Scott AuthorDate: Sun Nov 8 23:16:58 2015 +0000 Commit: Brad King CommitDate: Tue Dec 1 10:22:19 2015 -0500 Consistent documentation for deprecation message variables. Make the documentation for the 'CMAKE_ERROR_DEPRECATED' CMake variable consistent with the documentation for the 'CMAKE_WARN_DEPRECATED' CMake variable, in terms of wording. diff --git a/Help/variable/CMAKE_ERROR_DEPRECATED.rst b/Help/variable/CMAKE_ERROR_DEPRECATED.rst index 277a4cc..f3a6738 100644 --- a/Help/variable/CMAKE_ERROR_DEPRECATED.rst +++ b/Help/variable/CMAKE_ERROR_DEPRECATED.rst @@ -1,8 +1,7 @@ CMAKE_ERROR_DEPRECATED ---------------------- -Whether to issue deprecation errors for macros and functions. +Whether to issue errors for deprecated functionality. -If ``TRUE``, this can be used by macros and functions to issue fatal -errors when deprecated macros or functions are used. This variable is -``FALSE`` by default. +If ``TRUE``, use of deprecated functionality will issue fatal errors. +If this variable is not set, CMake behaves as if it were set to ``FALSE``. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da688bcb3b7edc1da19fc8b89e2425f40d3fa7f1 commit da688bcb3b7edc1da19fc8b89e2425f40d3fa7f1 Author: Michael Scott AuthorDate: Sun Nov 8 23:06:33 2015 +0000 Commit: Brad King CommitDate: Tue Dec 1 10:21:57 2015 -0500 Add -W options to control deprecated warning messages. Add 'deprecated' warning options type, to allow setting CMAKE_WARN_DEPRECATED via the -W '-Wdeprecated' and '-Wno-deprecated' options. Add tests for new options and updated documentation. diff --git a/Help/manual/OPTIONS_BUILD.txt b/Help/manual/OPTIONS_BUILD.txt index 4207db4..eec138c 100644 --- a/Help/manual/OPTIONS_BUILD.txt +++ b/Help/manual/OPTIONS_BUILD.txt @@ -84,3 +84,15 @@ Enable warnings that are meant for the author of the CMakeLists.txt files. + +``-Wdeprecated`` + Enable deprecated functionality warnings. + + Enable warnings for usage of deprecated functionality, that are meant + for the author of the CMakeLists.txt files. + +``-Wno-deprecated`` + Suppress deprecated functionality warnings. + + Suppress warnings for usage of deprecated functionality, that are meant + for the author of the CMakeLists.txt files. diff --git a/Help/release/dev/cmake-W-options.rst b/Help/release/dev/cmake-W-options.rst new file mode 100644 index 0000000..e64d618 --- /dev/null +++ b/Help/release/dev/cmake-W-options.rst @@ -0,0 +1,5 @@ +cmake-W-options +--------------- + +* The :variable:`CMAKE_WARN_DEPRECATED` variable can now be set using the + ``-Wdeprecated`` and ``-Wno-deprecated`` :manual:`cmake(1)` options. diff --git a/Help/variable/CMAKE_WARN_DEPRECATED.rst b/Help/variable/CMAKE_WARN_DEPRECATED.rst index 662cbd8..5f87c34 100644 --- a/Help/variable/CMAKE_WARN_DEPRECATED.rst +++ b/Help/variable/CMAKE_WARN_DEPRECATED.rst @@ -1,7 +1,10 @@ CMAKE_WARN_DEPRECATED --------------------- -Whether to issue deprecation warnings for macros and functions. +Whether to issue warnings for deprecated functionality. -If ``TRUE``, this can be used by macros and functions to issue deprecation -warnings. This variable is ``FALSE`` by default. +If ``TRUE``, use of deprecated functionality will issue warnings. +If this variable is not set, CMake behaves as if it were set to ``FALSE``. + +When running :manual:`cmake(1)`, this option can be enabled with the +``-Wdeprecated`` option, or disabled with the ``-Wno-deprecated`` option. diff --git a/Source/cmake.cxx b/Source/cmake.cxx index e6433bd..37d7e0a 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1263,6 +1263,26 @@ int cmake::Configure() { DiagLevel diagLevel; + if (this->DiagLevels.count("deprecated") == 1) + { + + diagLevel = this->DiagLevels["deprecated"]; + if (diagLevel == DIAG_IGNORE) + { + this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "FALSE", + "Whether to issue warnings for deprecated " + "functionality.", + cmState::INTERNAL); + } + else if (diagLevel == DIAG_WARN) + { + this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "TRUE", + "Whether to issue warnings for deprecated " + "functionality.", + cmState::INTERNAL); + } + } + if (this->DiagLevels.count("dev") == 1) { diff --git a/Source/cmake.h b/Source/cmake.h index 1bd6d4d..8739b87 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -444,7 +444,9 @@ private: {"-T ", "Specify toolset name if supported by generator."}, \ {"-A ", "Specify platform name if supported by generator."}, \ {"-Wno-dev", "Suppress developer warnings."},\ - {"-Wdev", "Enable developer warnings."} + {"-Wdev", "Enable developer warnings."},\ + {"-Wdeprecated", "Enable deprecation warnings."},\ + {"-Wno-deprecated", "Suppress deprecation warnings."} #define FOR_EACH_C_FEATURE(F) \ F(c_function_prototypes) \ diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index d4f399c..f726ae2 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -133,6 +133,14 @@ set(RunCMake_TEST_OPTIONS -Wdev) run_cmake(Wdev) unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_OPTIONS -Wdeprecated) +run_cmake(Wdeprecated) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS -Wno-deprecated) +run_cmake(Wno-deprecated) +unset(RunCMake_TEST_OPTIONS) + # Dev warnings should be on by default run_cmake(Wdev) diff --git a/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt b/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt new file mode 100644 index 0000000..e9be1dc --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt @@ -0,0 +1,4 @@ +^CMake Deprecation Warning at Wdeprecated.cmake:1 \(message\): + Some deprecated warning +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/CommandLine/Wdeprecated.cmake b/Tests/RunCMake/CommandLine/Wdeprecated.cmake new file mode 100644 index 0000000..3142b42 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wdeprecated.cmake @@ -0,0 +1 @@ +message(DEPRECATION "Some deprecated warning") diff --git a/Tests/RunCMake/CommandLine/Wno-deprecated.cmake b/Tests/RunCMake/CommandLine/Wno-deprecated.cmake new file mode 100644 index 0000000..3142b42 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Wno-deprecated.cmake @@ -0,0 +1 @@ +message(DEPRECATION "Some deprecated warning") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07388f83b69739116c8364e9443f10158fcdc912 commit 07388f83b69739116c8364e9443f10158fcdc912 Author: Michael Scott AuthorDate: Sun Nov 29 12:39:03 2015 +0000 Commit: Brad King CommitDate: Tue Dec 1 09:40:43 2015 -0500 Refactor the -W options parser to be generic. Refactor the -Wdev and -Wno-dev options parser to use a generic -W parser that follows the GCC pattern, excluding support for -Werror=TYPE and -Wno-error=TYPE formats for now. diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 5213130..e6433bd 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -127,8 +127,6 @@ cmake::cmake() this->WarnUnused = false; this->WarnUnusedCli = true; this->CheckSystemVars = false; - this->SuppressDevWarnings = false; - this->DoSuppressDevWarnings = false; this->DebugOutput = false; this->DebugTryCompile = false; this->ClearBuildSystem = false; @@ -274,15 +272,51 @@ bool cmake::SetCacheArgs(const std::vector& args) return false; } } - else if(arg.find("-Wno-dev",0) == 0) + else if(cmHasLiteralPrefix(arg, "-W")) { - this->SuppressDevWarnings = true; - this->DoSuppressDevWarnings = true; - } - else if(arg.find("-Wdev",0) == 0) - { - this->SuppressDevWarnings = false; - this->DoSuppressDevWarnings = true; + std::string entry = arg.substr(2); + if (entry.empty()) + { + ++i; + if (i < args.size()) + { + entry = args[i]; + } + else + { + cmSystemTools::Error("-W must be followed with [no-]."); + return false; + } + } + + std::string name; + bool foundNo = false; + unsigned int nameStartPosition = 0; + + if (entry.find("no-", nameStartPosition) == 0) + { + foundNo = true; + nameStartPosition += 3; + } + + name = entry.substr(nameStartPosition); + if (name.empty()) + { + cmSystemTools::Error("No warning name provided."); + return false; + } + + if (!foundNo) + { + // -W + this->DiagLevels[name] = std::max(this->DiagLevels[name], + DIAG_WARN); + } + else + { + // -Wno + this->DiagLevels[name] = DIAG_IGNORE; + } } else if(arg.find("-U",0) == 0) { @@ -618,11 +652,7 @@ void cmake::SetArgs(const std::vector& args, // skip for now i++; } - else if(arg.find("-Wno-dev",0) == 0) - { - // skip for now - } - else if(arg.find("-Wdev",0) == 0) + else if(arg.find("-W",0) == 0) { // skip for now } @@ -1231,25 +1261,28 @@ int cmake::HandleDeleteCacheVariables(const std::string& var) int cmake::Configure() { - if(this->DoSuppressDevWarnings) + DiagLevel diagLevel; + + if (this->DiagLevels.count("dev") == 1) { - if(this->SuppressDevWarnings) + + diagLevel = this->DiagLevels["dev"]; + if (diagLevel == DIAG_IGNORE) { - this-> - AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE", - "Suppress Warnings that are meant for" - " the author of the CMakeLists.txt files.", - cmState::INTERNAL); + this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE", + "Suppress Warnings that are meant for" + " the author of the CMakeLists.txt files.", + cmState::INTERNAL); } - else + else if (diagLevel == DIAG_WARN) { - this-> - AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE", - "Suppress Warnings that are meant for" - " the author of the CMakeLists.txt files.", - cmState::INTERNAL); + this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE", + "Suppress Warnings that are meant for" + " the author of the CMakeLists.txt files.", + cmState::INTERNAL); } } + int ret = this->ActualConfigure(); const char* delCacheVars = this->State ->GetGlobalProperty("__CMAKE_DELETE_CACHE_CHANGE_VARS_"); @@ -2805,6 +2838,21 @@ void cmake::RunCheckForUnusedVariables() #endif } +void cmake::SetSuppressDevWarnings(bool b) +{ + // equivalent to -Wno-dev + if (b) + { + this->DiagLevels["dev"] = DIAG_IGNORE; + } + // equivalent to -Wdev + else + { + this->DiagLevels["dev"] = std::max(this->DiagLevels["dev"], + DIAG_WARN); + } +} + bool cmake::GetSuppressDevWarnings(cmMakefile const* mf) { /* diff --git a/Source/cmake.h b/Source/cmake.h index 45ac28e..1bd6d4d 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -68,6 +68,11 @@ class cmake DEPRECATION_WARNING }; + enum DiagLevel + { + DIAG_IGNORE, + DIAG_WARN + }; /** \brief Describes the working modes of cmake */ enum WorkingMode @@ -303,11 +308,7 @@ class cmake std::string const& GetCMakeEditCommand() const { return this->CMakeEditCommand; } - void SetSuppressDevWarnings(bool v) - { - this->SuppressDevWarnings = v; - this->DoSuppressDevWarnings = true; - } + void SetSuppressDevWarnings(bool v); /* * Get the state of the suppression of developer (author) warnings. * Returns false, by default, if developer warnings should be shown, true @@ -359,8 +360,7 @@ protected: cmGlobalGenerator *GlobalGenerator; cmCacheManager *CacheManager; - bool SuppressDevWarnings; - bool DoSuppressDevWarnings; + std::map DiagLevels; std::string GeneratorPlatform; std::string GeneratorToolset; diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 8eaaa08..d4f399c 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -129,13 +129,24 @@ set(RunCMake_TEST_OPTIONS -Wno-dev) run_cmake(Wno-dev) unset(RunCMake_TEST_OPTIONS) -set(RunCMake_TEST_OPTIONS -Wno-dev -Wdev) +set(RunCMake_TEST_OPTIONS -Wdev) run_cmake(Wdev) unset(RunCMake_TEST_OPTIONS) # Dev warnings should be on by default run_cmake(Wdev) +# Conflicting -W options should honor the last value +set(RunCMake_TEST_OPTIONS -Wno-dev -Wdev) +run_cmake(Wdev) +unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_OPTIONS -Wdev -Wno-dev) +run_cmake(Wno-dev) +unset(RunCMake_TEST_OPTIONS) + +run_cmake_command(W_bad-arg1 ${CMAKE_COMMAND} -W) +run_cmake_command(W_bad-arg2 ${CMAKE_COMMAND} -Wno-) + set(RunCMake_TEST_OPTIONS --debug-output) run_cmake(debug-output) unset(RunCMake_TEST_OPTIONS) diff --git a/Tests/RunCMake/CommandLine/W_bad-arg1-result.txt b/Tests/RunCMake/CommandLine/W_bad-arg1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt b/Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt new file mode 100644 index 0000000..0c0f613 --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt @@ -0,0 +1,2 @@ +CMake Error: -W must be followed with \[no-\]. +CMake Error: Problem processing arguments. Aborting. diff --git a/Tests/RunCMake/CommandLine/W_bad-arg2-result.txt b/Tests/RunCMake/CommandLine/W_bad-arg2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt b/Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt new file mode 100644 index 0000000..cc643df --- /dev/null +++ b/Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt @@ -0,0 +1,2 @@ +CMake Error: No warning name provided. +CMake Error: Problem processing arguments. Aborting. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=246b0bfbfda9a8f3091fc34fc92816aebaf60ae9 commit 246b0bfbfda9a8f3091fc34fc92816aebaf60ae9 Author: Michael Scott AuthorDate: Sun Nov 8 12:59:27 2015 +0000 Commit: Brad King CommitDate: Tue Dec 1 09:35:53 2015 -0500 Explicitly enable author (dev) warnings by default. Explicitly enable author warnings by default, via the cmake::GetSuppressDevWarnings method, which signals suppression is turned off unless the CMake variables are set as required. Add test cases for author and deprecated messages displayed by default. diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx index 1c65ef7..fd0345d 100644 --- a/Source/cmMessageCommand.cxx +++ b/Source/cmMessageCommand.cxx @@ -43,7 +43,8 @@ bool cmMessageCommand } else if (*i == "AUTHOR_WARNING") { - if (this->Makefile->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS")) + if (this->Makefile->GetCMakeInstance()->GetSuppressDevWarnings( + this->Makefile)) { return true; } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 62476a1..5213130 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1580,6 +1580,7 @@ int cmake::Run(const std::vector& args, bool noconfigure) { this->AddCMakePaths(); } + // Add any cache args if ( !this->SetCacheArgs(args) ) { @@ -2511,11 +2512,7 @@ bool cmake::IsMessageTypeVisible(cmake::MessageType t) } else if (t == cmake::AUTHOR_WARNING) { - // if CMAKE_SUPPRESS_DEVELOPER_WARNINGS is on, suppress the message, - // otherwise show it - const char* suppressDevWarnings = this->State->GetCacheEntryValue( - "CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); - if(cmSystemTools::IsOn(suppressDevWarnings)) + if (this->GetSuppressDevWarnings()) { isVisible = false; } @@ -2807,3 +2804,21 @@ void cmake::RunCheckForUnusedVariables() } #endif } + +bool cmake::GetSuppressDevWarnings(cmMakefile const* mf) +{ + /* + * The suppression CMake variable may be set in the CMake configuration file + * itself, so we have to check what its set to in the makefile if we can. + */ + if (mf) + { + return mf->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); + } + else + { + const char* cacheEntryValue = this->State->GetCacheEntryValue( + "CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); + return cmSystemTools::IsOn(cacheEntryValue); + } +} diff --git a/Source/cmake.h b/Source/cmake.h index 0630daa..45ac28e 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -308,6 +308,12 @@ class cmake this->SuppressDevWarnings = v; this->DoSuppressDevWarnings = true; } + /* + * Get the state of the suppression of developer (author) warnings. + * Returns false, by default, if developer warnings should be shown, true + * otherwise. + */ + bool GetSuppressDevWarnings(cmMakefile const* mf = NULL); /** Display a message to the user. */ void IssueMessage(cmake::MessageType t, std::string const& text, diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 2d94e29..8eaaa08 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -133,6 +133,9 @@ set(RunCMake_TEST_OPTIONS -Wno-dev -Wdev) run_cmake(Wdev) unset(RunCMake_TEST_OPTIONS) +# Dev warnings should be on by default +run_cmake(Wdev) + set(RunCMake_TEST_OPTIONS --debug-output) run_cmake(debug-output) unset(RunCMake_TEST_OPTIONS) diff --git a/Tests/RunCMake/message/RunCMakeTest.cmake b/Tests/RunCMake/message/RunCMakeTest.cmake index d2bc0c3..294dfbb 100644 --- a/Tests/RunCMake/message/RunCMakeTest.cmake +++ b/Tests/RunCMake/message/RunCMakeTest.cmake @@ -1,5 +1,6 @@ include(RunCMake) +run_cmake(defaultmessage) run_cmake(nomessage) run_cmake(warnmessage) run_cmake(errormessage) diff --git a/Tests/RunCMake/message/defaultmessage-result.txt b/Tests/RunCMake/message/defaultmessage-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/message/defaultmessage-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/message/defaultmessage-stderr.txt b/Tests/RunCMake/message/defaultmessage-stderr.txt new file mode 100644 index 0000000..95656ec --- /dev/null +++ b/Tests/RunCMake/message/defaultmessage-stderr.txt @@ -0,0 +1,5 @@ +^CMake Warning \(dev\) at defaultmessage.cmake:4 \(message\): + This is a author warning +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/message/defaultmessage.cmake b/Tests/RunCMake/message/defaultmessage.cmake new file mode 100644 index 0000000..427014d --- /dev/null +++ b/Tests/RunCMake/message/defaultmessage.cmake @@ -0,0 +1,4 @@ + +message(DEPRECATION "This is a deprecation warning") + +message(AUTHOR_WARNING "This is a author warning") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=deec3a3f06d341cfe0bef4e856b263eff347cc72 commit deec3a3f06d341cfe0bef4e856b263eff347cc72 Author: Michael Scott AuthorDate: Sun Nov 8 12:20:47 2015 +0000 Commit: Brad King CommitDate: Mon Nov 30 15:00:08 2015 -0500 Make message suppression more consistent. Make the message suppression more consistent, by adding a check for the message related CMake variables in cmake::IssueMessage, which allows callers of IssueMessage other than the message command to behave as expected. Also added a check for CMAKE_SUPPRESS_DEVELOPER_WARNINGS in the message command to mirror the deprecated message type behaviour. Added a 'force' flag to the cmake::IssueMessage method, to make the message suppression consistent, when setting the message related CMake variables directly in a CMake file. Expand message command tests to cover the AUTHOR_WARNING message type as well. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 47e1731..1b0a99a 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -105,7 +105,8 @@ cmMakefile::~cmMakefile() //---------------------------------------------------------------------------- void cmMakefile::IssueMessage(cmake::MessageType t, - std::string const& text) const + std::string const& text, + bool force) const { // Collect context information. if(!this->ExecutionStatusStack.empty()) @@ -114,7 +115,8 @@ void cmMakefile::IssueMessage(cmake::MessageType t, { this->ExecutionStatusStack.back()->SetNestedError(true); } - this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace()); + this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace(), + force); } else { @@ -129,7 +131,7 @@ void cmMakefile::IssueMessage(cmake::MessageType t, lfc.FilePath = converter.Convert(lfc.FilePath, cmOutputConverter::HOME); } lfc.Line = 0; - this->GetCMakeInstance()->IssueMessage(t, text, lfc); + this->GetCMakeInstance()->IssueMessage(t, text, lfc, force); } } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index fa1534d..362ea75 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -709,7 +709,8 @@ public: }; void IssueMessage(cmake::MessageType t, - std::string const& text) const; + std::string const& text, + bool force = false) const; /** Set whether or not to report a CMP0000 violation. */ void SetCheckCMP0000(bool b) { this->CheckCMP0000 = b; } diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx index 2854a82..1c65ef7 100644 --- a/Source/cmMessageCommand.cxx +++ b/Source/cmMessageCommand.cxx @@ -43,7 +43,14 @@ bool cmMessageCommand } else if (*i == "AUTHOR_WARNING") { - type = cmake::AUTHOR_WARNING; + if (this->Makefile->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS")) + { + return true; + } + else + { + type = cmake::AUTHOR_WARNING; + } ++i; } else if (*i == "STATUS") @@ -73,7 +80,8 @@ bool cmMessageCommand if (type != cmake::MESSAGE) { - this->Makefile->IssueMessage(type, message); + // we've overriden the message type, above, so force IssueMessage to use it + this->Makefile->IssueMessage(type, message, true); } else { diff --git a/Source/cmake.cxx b/Source/cmake.cxx index ee1e878..62476a1 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2485,6 +2485,45 @@ static bool cmakeCheckStampList(const char* stampList) return true; } +bool cmake::IsMessageTypeVisible(cmake::MessageType t) +{ + bool isVisible = true; + + if(t == cmake::DEPRECATION_ERROR) + { + // if CMAKE_ERROR_DEPRECATED is on, show the message, otherwise suppress it + const char* errorDeprecated = this->State->GetCacheEntryValue( + "CMAKE_ERROR_DEPRECATED"); + if(cmSystemTools::IsOff(errorDeprecated)) + { + isVisible = false; + } + } + else if (t == cmake::DEPRECATION_WARNING) + { + // if CMAKE_WARN_DEPRECATED is on, show the message, otherwise suppress it + const char* warnDeprecated = this->State->GetInitializedCacheValue( + "CMAKE_WARN_DEPRECATED"); + if(cmSystemTools::IsOff(warnDeprecated)) + { + isVisible = false; + } + } + else if (t == cmake::AUTHOR_WARNING) + { + // if CMAKE_SUPPRESS_DEVELOPER_WARNINGS is on, suppress the message, + // otherwise show it + const char* suppressDevWarnings = this->State->GetCacheEntryValue( + "CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); + if(cmSystemTools::IsOn(suppressDevWarnings)) + { + isVisible = false; + } + } + + return isVisible; +} + bool cmake::PrintMessagePreamble(cmake::MessageType t, std::ostream& msg) { // Construct the message header. @@ -2508,20 +2547,13 @@ bool cmake::PrintMessagePreamble(cmake::MessageType t, std::ostream& msg) { msg << "CMake Deprecation Warning"; } + else if (t == cmake::AUTHOR_WARNING) + { + msg << "CMake Warning (dev)"; + } else { msg << "CMake Warning"; - if(t == cmake::AUTHOR_WARNING) - { - // Allow suppression of these warnings. - const char* suppress = this->State->GetCacheEntryValue( - "CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); - if(suppress && cmSystemTools::IsOn(suppress)) - { - return false; - } - msg << " (dev)"; - } } return true; } @@ -2579,10 +2611,16 @@ void displayMessage(cmake::MessageType t, std::ostringstream& msg) //---------------------------------------------------------------------------- void cmake::IssueMessage(cmake::MessageType t, std::string const& text, - cmListFileBacktrace const& bt) + cmListFileBacktrace const& bt, + bool force) { cmListFileBacktrace backtrace = bt; + if (!force && !this->IsMessageTypeVisible(t)) + { + return; + } + std::ostringstream msg; if (!this->PrintMessagePreamble(t, msg)) { @@ -2602,8 +2640,14 @@ void cmake::IssueMessage(cmake::MessageType t, std::string const& text, //---------------------------------------------------------------------------- void cmake::IssueMessage(cmake::MessageType t, std::string const& text, - cmListFileContext const& lfc) + cmListFileContext const& lfc, + bool force) { + if (!force && !this->IsMessageTypeVisible(t)) + { + return; + } + std::ostringstream msg; if (!this->PrintMessagePreamble(t, msg)) { diff --git a/Source/cmake.h b/Source/cmake.h index c584ad9..0630daa 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -311,9 +311,11 @@ class cmake /** Display a message to the user. */ void IssueMessage(cmake::MessageType t, std::string const& text, - cmListFileBacktrace const& backtrace = cmListFileBacktrace()); + cmListFileBacktrace const& backtrace = cmListFileBacktrace(), + bool force = false); void IssueMessage(cmake::MessageType t, std::string const& text, - cmListFileContext const& lfc); + cmListFileContext const& lfc, + bool force = false); ///! run the --build option int Build(const std::string& dir, @@ -419,6 +421,12 @@ private: // Print a list of valid generators to stderr. void PrintGeneratorList(); + /* + * Check if messages of this type should be output, based on the state of the + * warning and error output CMake variables, in the cache. + */ + bool IsMessageTypeVisible(cmake::MessageType t); + bool PrintMessagePreamble(cmake::MessageType t, std::ostream& msg); }; diff --git a/Tests/RunCMake/message/nomessage.cmake b/Tests/RunCMake/message/nomessage.cmake index bcc97be..582ab4d 100644 --- a/Tests/RunCMake/message/nomessage.cmake +++ b/Tests/RunCMake/message/nomessage.cmake @@ -1,2 +1,6 @@ message(DEPRECATION "This is not issued") + +set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS ON) + +message(AUTHOR_WARNING "This is not issued") diff --git a/Tests/RunCMake/message/warnmessage-stderr.txt b/Tests/RunCMake/message/warnmessage-stderr.txt index 5c44566..e60af6e 100644 --- a/Tests/RunCMake/message/warnmessage-stderr.txt +++ b/Tests/RunCMake/message/warnmessage-stderr.txt @@ -1,4 +1,11 @@ -CMake Deprecation Warning at warnmessage.cmake:4 \(message\): - This is a warning +^CMake Deprecation Warning at warnmessage.cmake:4 \(message\): + This is a deprecation warning Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) + + +CMake Warning \(dev\) at warnmessage.cmake:8 \(message\): + This is a author warning +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/message/warnmessage.cmake b/Tests/RunCMake/message/warnmessage.cmake index 4c421a1..53f2a43 100644 --- a/Tests/RunCMake/message/warnmessage.cmake +++ b/Tests/RunCMake/message/warnmessage.cmake @@ -1,4 +1,8 @@ set(CMAKE_WARN_DEPRECATED ON) -message(DEPRECATION "This is a warning") +message(DEPRECATION "This is a deprecation warning") + +set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS OFF) + +message(AUTHOR_WARNING "This is a author warning") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa427a4239eb691d4129ebc383ab7b0d61b5b94e commit aa427a4239eb691d4129ebc383ab7b0d61b5b94e Author: Michael Scott AuthorDate: Sun Nov 1 16:05:15 2015 +0000 Commit: Brad King CommitDate: Mon Nov 30 15:00:08 2015 -0500 Tests: Revise message in RunCMake.CommandLine -Wdev case Use more prose-like capitalization. diff --git a/Tests/RunCMake/CommandLine/Wdev-stderr.txt b/Tests/RunCMake/CommandLine/Wdev-stderr.txt index 92c1d23..88cfb3a 100644 --- a/Tests/RunCMake/CommandLine/Wdev-stderr.txt +++ b/Tests/RunCMake/CommandLine/Wdev-stderr.txt @@ -1,5 +1,5 @@ ^CMake Warning \(dev\) at Wdev.cmake:1 \(message\): - Some Author Warning + Some author warning Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CommandLine/Wdev.cmake b/Tests/RunCMake/CommandLine/Wdev.cmake index e5026ef..756f31e 100644 --- a/Tests/RunCMake/CommandLine/Wdev.cmake +++ b/Tests/RunCMake/CommandLine/Wdev.cmake @@ -1,4 +1,4 @@ -message(AUTHOR_WARNING "Some Author Warning") +message(AUTHOR_WARNING "Some author warning") # with -Wdev this will also cause an AUTHOR_WARNING message, checks that # messages issued outside of the message command, by other CMake commands, also diff --git a/Tests/RunCMake/CommandLine/Wno-dev.cmake b/Tests/RunCMake/CommandLine/Wno-dev.cmake index d81b858..802b435 100644 --- a/Tests/RunCMake/CommandLine/Wno-dev.cmake +++ b/Tests/RunCMake/CommandLine/Wno-dev.cmake @@ -1,4 +1,4 @@ -message(AUTHOR_WARNING "Some Author Warning") +message(AUTHOR_WARNING "Some author warning") # without -Wno-dev this will also cause an AUTHOR_WARNING message, checks that # messages issued outside of the message command, by other CMake commands, also ----------------------------------------------------------------------- Summary of changes: Help/manual/OPTIONS_BUILD.txt | 17 +- Help/release/dev/cmake-W-options.rst | 12 + Help/variable/CMAKE_ERROR_DEPRECATED.rst | 7 +- Help/variable/CMAKE_WARN_DEPRECATED.rst | 9 +- Source/cmMakefile.cxx | 8 +- Source/cmMakefile.h | 3 +- Source/cmMessageCommand.cxx | 27 ++- Source/cmake.cxx | 251 ++++++++++++++++---- Source/cmake.h | 43 +++- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 38 +++ .../W_bad-arg1-result.txt} | 0 Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt | 2 + .../W_bad-arg2-result.txt} | 0 Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt | 2 + Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Wdeprecated.cmake | 1 + Tests/RunCMake/CommandLine/Wdev-stderr.txt | 2 +- Tests/RunCMake/CommandLine/Wdev.cmake | 2 +- Tests/RunCMake/CommandLine/Wno-deprecated.cmake | 1 + Tests/RunCMake/CommandLine/Wno-dev.cmake | 2 +- Tests/RunCMake/message/RunCMakeTest.cmake | 1 + .../defaultmessage-result.txt} | 0 Tests/RunCMake/message/defaultmessage-stderr.txt | 11 + Tests/RunCMake/message/defaultmessage.cmake | 4 + Tests/RunCMake/message/nomessage.cmake | 6 + Tests/RunCMake/message/warnmessage-stderr.txt | 11 +- Tests/RunCMake/message/warnmessage.cmake | 6 +- 27 files changed, 393 insertions(+), 77 deletions(-) create mode 100644 Help/release/dev/cmake-W-options.rst copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/W_bad-arg1-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/W_bad-arg2-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-deprecated.cmake copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => message/defaultmessage-result.txt} (100%) create mode 100644 Tests/RunCMake/message/defaultmessage-stderr.txt create mode 100644 Tests/RunCMake/message/defaultmessage.cmake hooks/post-receive -- CMake From brad.king at kitware.com Tue Dec 1 11:04:57 2015 From: brad.king at kitware.com (Brad King) Date: Tue, 1 Dec 2015 11:04:57 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1570-gc95156f Message-ID: <20151201160457.E62FBD93E6@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via c95156f85d7fa9a1cf1737d801a31b1bb74bae5b (commit) via 4e3cf8b012404e4d9602c16d473480cc3d0c7928 (commit) via 6b1852874325520a418eb05ec3c2149c2eb194a2 (commit) from cfcc9d523d53ca01cdebe0e6c01e7e03b8fa8780 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c95156f85d7fa9a1cf1737d801a31b1bb74bae5b commit c95156f85d7fa9a1cf1737d801a31b1bb74bae5b Merge: cfcc9d5 4e3cf8b Author: Brad King AuthorDate: Tue Dec 1 11:04:56 2015 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 1 11:04:56 2015 -0500 Merge topic 'reduce-realpath-calls' into next 4e3cf8b0 cmOrderDirectories: Reduce repeat realpath() calls 6b185287 cmOrderDirectories: Factor out directory comparison diff --cc Source/cmOrderDirectories.cxx index e3eedc7,e3406a8..61efd01 --- a/Source/cmOrderDirectories.cxx +++ b/Source/cmOrderDirectories.cxx @@@ -637,5 -635,25 +635,25 @@@ void cmOrderDirectories::DiagnoseCycle( e << "Some of these libraries may not be found correctly."; this->GlobalGenerator->GetCMakeInstance() ->IssueMessage(cmake::WARNING, e.str(), - this->Target->Target->GetBacktrace()); + this->Target->GetBacktrace()); } + + bool cmOrderDirectories::IsSameDirectory(std::string const& l, + std::string const& r) + { + return this->GetRealPath(l) == this->GetRealPath(r); + } + + std::string const& cmOrderDirectories::GetRealPath(std::string const& dir) + { + std::map::iterator i = + this->RealPaths.lower_bound(dir); + if (i == this->RealPaths.end() || + this->RealPaths.key_comp()(dir, i->first)) + { + typedef std::map::value_type value_type; + i = this->RealPaths.insert( + i, value_type(dir, cmSystemTools::GetRealPath(dir))); + } + return i->second; + } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4e3cf8b012404e4d9602c16d473480cc3d0c7928 commit 4e3cf8b012404e4d9602c16d473480cc3d0c7928 Author: Brad King AuthorDate: Tue Dec 1 10:57:33 2015 -0500 Commit: Brad King CommitDate: Tue Dec 1 11:00:32 2015 -0500 cmOrderDirectories: Reduce repeat realpath() calls Since commit v3.1.0-rc1~110^2 (Tolerate symlinks during RPATH ordering, 2014-09-09) we call realpath() for every directory ordering constraint check. On some platforms/filesystems this is slow, so memoize the result of the call for each directory. diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx index 9491204..e3406a8 100644 --- a/Source/cmOrderDirectories.cxx +++ b/Source/cmOrderDirectories.cxx @@ -641,6 +641,19 @@ void cmOrderDirectories::DiagnoseCycle() bool cmOrderDirectories::IsSameDirectory(std::string const& l, std::string const& r) { - return (l == r || - cmSystemTools::GetRealPath(l) == cmSystemTools::GetRealPath(r)); + return this->GetRealPath(l) == this->GetRealPath(r); +} + +std::string const& cmOrderDirectories::GetRealPath(std::string const& dir) +{ + std::map::iterator i = + this->RealPaths.lower_bound(dir); + if (i == this->RealPaths.end() || + this->RealPaths.key_comp()(dir, i->first)) + { + typedef std::map::value_type value_type; + i = this->RealPaths.insert( + i, value_type(dir, cmSystemTools::GetRealPath(dir))); + } + return i->second; } diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h index 0657e92..477216b 100644 --- a/Source/cmOrderDirectories.h +++ b/Source/cmOrderDirectories.h @@ -83,6 +83,9 @@ private: // Compare directories after resolving symlinks. bool IsSameDirectory(std::string const& l, std::string const& r); + std::string const& GetRealPath(std::string const& dir); + std::map RealPaths; + friend class cmOrderDirectoriesConstraint; friend class cmOrderDirectoriesConstraintLibrary; }; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6b1852874325520a418eb05ec3c2149c2eb194a2 commit 6b1852874325520a418eb05ec3c2149c2eb194a2 Author: Brad King AuthorDate: Tue Dec 1 10:44:48 2015 -0500 Commit: Brad King CommitDate: Tue Dec 1 11:00:32 2015 -0500 cmOrderDirectories: Factor out directory comparison Create an `IsSameDirectory` helper method. diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx index 35ee127..9491204 100644 --- a/Source/cmOrderDirectories.cxx +++ b/Source/cmOrderDirectories.cxx @@ -73,10 +73,8 @@ public: { // Check if this directory conflicts with the entry. std::string const& dir = this->OD->OriginalDirectories[i]; - if(dir != this->Directory && - cmSystemTools::GetRealPath(dir) != - cmSystemTools::GetRealPath(this->Directory) && - this->FindConflict(dir)) + if (!this->OD->IsSameDirectory(dir, this->Directory) && + this->FindConflict(dir)) { // The library will be found in this directory but this is not // the directory named for it. Add an entry to make sure the @@ -639,3 +637,10 @@ void cmOrderDirectories::DiagnoseCycle() ->IssueMessage(cmake::WARNING, e.str(), this->Target->Target->GetBacktrace()); } + +bool cmOrderDirectories::IsSameDirectory(std::string const& l, + std::string const& r) +{ + return (l == r || + cmSystemTools::GetRealPath(l) == cmSystemTools::GetRealPath(r)); +} diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h index 211c786..0657e92 100644 --- a/Source/cmOrderDirectories.h +++ b/Source/cmOrderDirectories.h @@ -80,6 +80,9 @@ private: struct ConflictList: public std::vector {}; std::vector ConflictGraph; + // Compare directories after resolving symlinks. + bool IsSameDirectory(std::string const& l, std::string const& r); + friend class cmOrderDirectoriesConstraint; friend class cmOrderDirectoriesConstraintLibrary; }; ----------------------------------------------------------------------- Summary of changes: Source/cmOrderDirectories.cxx | 26 ++++++++++++++++++++++---- Source/cmOrderDirectories.h | 6 ++++++ 2 files changed, 28 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 2 00:01:16 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 2 Dec 2015 00:01:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.0-626-gbb5fccd Message-ID: <20151202050116.AC5C9D640B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via bb5fccd0a77956b02f9f2c6f1c4c7acdea472178 (commit) from a6f5281419c59b433f248b41972530242172a124 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bb5fccd0a77956b02f9f2c6f1c4c7acdea472178 commit bb5fccd0a77956b02f9f2c6f1c4c7acdea472178 Author: Kitware Robot AuthorDate: Wed Dec 2 00:01:08 2015 -0500 Commit: Kitware Robot CommitDate: Wed Dec 2 00:01:08 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 993d72c..15782b6 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 4) -set(CMake_VERSION_PATCH 20151201) +set(CMake_VERSION_PATCH 20151202) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:26:29 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:26:29 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1572-ge76cbcc Message-ID: <20151202132629.6E6F1DB8D5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via e76cbccd6e645a7b098d602d6f2f460d0688f009 (commit) via ae434ee2dd1a91cd8ec53a631d8db9949d5f46b0 (commit) from c95156f85d7fa9a1cf1737d801a31b1bb74bae5b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e76cbccd6e645a7b098d602d6f2f460d0688f009 commit e76cbccd6e645a7b098d602d6f2f460d0688f009 Merge: c95156f ae434ee Author: Brad King AuthorDate: Wed Dec 2 08:26:28 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 08:26:28 2015 -0500 Merge topic 'cpack-dmg-multilanguage-sla' into next ae434ee2 CPack/DragNDrop: Allow single license for multiple languages https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae434ee2dd1a91cd8ec53a631d8db9949d5f46b0 commit ae434ee2dd1a91cd8ec53a631d8db9949d5f46b0 Author: Simon Levermann AuthorDate: Tue Nov 24 16:17:53 2015 +0100 Commit: Brad King CommitDate: Wed Dec 2 08:26:01 2015 -0500 CPack/DragNDrop: Allow single license for multiple languages When both CPACK_DMG_SLA_DIR and CPACK_RESOURCE_FILE_LICENSE are defined, use the license file for all languages instead of looking for a license file for each language. Also expand the documentation on the SLA variables. diff --git a/Modules/CPackDMG.cmake b/Modules/CPackDMG.cmake index 6b5af7e..e34f8cd 100644 --- a/Modules/CPackDMG.cmake +++ b/Modules/CPackDMG.cmake @@ -49,11 +49,29 @@ # .. variable:: CPACK_DMG_SLA_DIR # # Directory where license and menu files for different languages are stored. +# Setting this causes CPack to look for a ``.menu.txt`` and +# ``.license.txt`` file for every language defined in +# ``CPACK_DMG_SLA_LANGUAGES``. If both this variable and +# ``CPACK_RESOURCE_FILE_LICENSE`` are set, CPack will only look for the menu +# files and use the same license file for all languages. # # .. variable:: CPACK_DMG_SLA_LANGUAGES # # Languages for which a license agreement is provided when mounting the -# generated DMG. +# generated DMG. A menu file consists of 9 lines of text. The first line is +# is the name of the language itself, uppercase, in English (e.g. German). +# The other lines are translations of the following strings: +# +# - Agree +# - Disagree +# - Print +# - Save... +# - You agree to the terms of the License Agreement when you click the +# "Agree" button. +# - Software License Agreement +# - This text cannot be saved. The disk may be full or locked, or the file +# may be locked. +# - Unable to print. Make sure you have selected a printer. # # For every language in this list, CPack will try to find files # ``.menu.txt`` and ``.license.txt`` in the directory diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index b5df2d0..1a694ea 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -69,6 +69,7 @@ static const char* SLASTREnglish = //---------------------------------------------------------------------- cmCPackDragNDropGenerator::cmCPackDragNDropGenerator() + : singleLicense(false) { // default to one package file for components this->componentPackageMethod = ONE_PACKAGE; @@ -131,10 +132,11 @@ int cmCPackDragNDropGenerator::InitializeInternal() if(!license_file.empty() && (license_file.find("CPack.GenericLicense.txt") == std::string::npos)) { - cmCPackLogger(cmCPackLog::LOG_WARNING, + cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Both CPACK_DMG_SLA_DIR and CPACK_RESOURCE_FILE_LICENSE specified, " - "defaulting to CPACK_DMG_SLA_DIR" + "using CPACK_RESOURCE_FILE_LICENSE as a license for all languages." << std::endl); + singleLicense = true; } } if(!this->IsSet("CPACK_DMG_SLA_LANGUAGES")) @@ -166,7 +168,7 @@ int cmCPackDragNDropGenerator::InitializeInternal() for(size_t i = 0; i < languages.size(); ++i) { std::string license = slaDirectory + "/" + languages[i] + ".license.txt"; - if (!cmSystemTools::FileExists(license)) + if (!singleLicense && !cmSystemTools::FileExists(license)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Missing license file " << languages[i] << ".license.txt" @@ -366,7 +368,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, // use sla_dir if both sla_dir and license_file are set if(!cpack_license_file.empty() && - !slaDirectory.empty()) + !slaDirectory.empty() && !singleLicense) { cpack_license_file = ""; } @@ -699,7 +701,14 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, { for(size_t i = 0; i < languages.size(); ++i) { - WriteLicense(ofs, i + 5000, languages[i]); + if(singleLicense) + { + WriteLicense(ofs, i + 5000, languages[i], cpack_license_file); + } + else + { + WriteLicense(ofs, i + 5000, languages[i]); + } } } @@ -850,7 +859,7 @@ void cmCPackDragNDropGenerator::WriteLicense(cmGeneratedFileStream& outputStream, int licenseNumber, std::string licenseLanguage, std::string licenseFile) { - if(!licenseFile.empty()) + if(!licenseFile.empty() && !singleLicense) { licenseNumber = 5002; licenseLanguage = "English"; @@ -887,7 +896,7 @@ cmCPackDragNDropGenerator::WriteLicense(cmGeneratedFileStream& outputStream, // End of License outputStream << "};\n\n"; - if(!licenseFile.empty()) + if(!licenseFile.empty() && !singleLicense) { outputStream << SLASTREnglish; } diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h index 53d38c4..b5e5ffe 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.h +++ b/Source/CPack/cmCPackDragNDropGenerator.h @@ -48,6 +48,7 @@ protected: private: std::string slaDirectory; + bool singleLicense; void WriteLicense(cmGeneratedFileStream& outputStream, int licenseNumber, std::string licenseLanguage, std::string licenseFile = ""); ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:31:45 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:31:45 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1574-g4f5acd5 Message-ID: <20151202133145.70274DBB25@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 4f5acd54c99b0b0ada5b7180cd1cf865d9b7a2ca (commit) via 001043ac3078c49651f6af0f1ff1b31ef71a7665 (commit) from e76cbccd6e645a7b098d602d6f2f460d0688f009 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4f5acd54c99b0b0ada5b7180cd1cf865d9b7a2ca commit 4f5acd54c99b0b0ada5b7180cd1cf865d9b7a2ca Merge: e76cbcc 001043a Author: Brad King AuthorDate: Wed Dec 2 08:31:44 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 08:31:44 2015 -0500 Merge topic 'include-for-mode_t' into next 001043ac Include `sys/types.h` header to get `mode_t` https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=001043ac3078c49651f6af0f1ff1b31ef71a7665 commit 001043ac3078c49651f6af0f1ff1b31ef71a7665 Author: Kylie McClain AuthorDate: Wed Nov 25 18:12:06 2015 -0500 Commit: Brad King CommitDate: Wed Dec 2 08:31:08 2015 -0500 Include `sys/types.h` header to get `mode_t` Do not depend on it being included by other system headers. It is not included by others on musl-libc, for example. diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index 468a589..e212616 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -54,6 +54,8 @@ #if defined( _MSC_VER ) typedef unsigned short mode_t; +#else +# include #endif // use this class to shrink the size of symbols in .o files ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:35:35 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:35:35 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.0-629-g88c2d4b Message-ID: <20151202133538.2539CD6C9A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 88c2d4b446c8b23b9694c6f00e76e02cf5e3d8f8 (commit) via 58c1840a193d8cc5e0fca3e8300b6f9d93c3aeb1 (commit) via eec87ec8a77550af5b39b95bead1d4be6a802637 (commit) from bb5fccd0a77956b02f9f2c6f1c4c7acdea472178 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=88c2d4b446c8b23b9694c6f00e76e02cf5e3d8f8 commit 88c2d4b446c8b23b9694c6f00e76e02cf5e3d8f8 Merge: bb5fccd 58c1840 Author: Brad King AuthorDate: Wed Dec 2 08:35:31 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 08:35:31 2015 -0500 Merge topic 'update-kwiml' 58c1840a Merge branch 'upstream-kwiml' into update-kwiml eec87ec8 KWIML: Teach ABI.h that NIOS2 CPU is little-endian ----------------------------------------------------------------------- Summary of changes: Utilities/KWIML/ABI.h.in | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:35:42 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:35:42 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.0-632-g36e6ee9 Message-ID: <20151202133542.BECC8D9C50@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 36e6ee913d7ea22060cc45b6a6a7b7e573402b28 (commit) via fe05ad975292a2ff57a66746f1aa3870217f1ddd (commit) via e25f294a0e0aa03da4516d0baa488ad02cece089 (commit) from 88c2d4b446c8b23b9694c6f00e76e02cf5e3d8f8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=36e6ee913d7ea22060cc45b6a6a7b7e573402b28 commit 36e6ee913d7ea22060cc45b6a6a7b7e573402b28 Merge: 88c2d4b fe05ad9 Author: Brad King AuthorDate: Wed Dec 2 08:35:40 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 08:35:40 2015 -0500 Merge topic 'update-kwsys' fe05ad97 Merge branch 'upstream-kwsys' into update-kwsys e25f294a KWSys 2015-12-01 (9596e98d) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/CPU.h.in | 4 ++++ Source/kwsys/ProcessUNIX.c | 2 +- Source/kwsys/SystemTools.cxx | 53 ++++++++++++++++++------------------------ 3 files changed, 28 insertions(+), 31 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:35:46 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:35:46 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.0-635-g5257a3b Message-ID: <20151202133546.082B5DBBBC@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 5257a3b931e3a2edc3fbe262c8215af6e7f5bfd7 (commit) via 4e3cf8b012404e4d9602c16d473480cc3d0c7928 (commit) via 6b1852874325520a418eb05ec3c2149c2eb194a2 (commit) from 36e6ee913d7ea22060cc45b6a6a7b7e573402b28 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5257a3b931e3a2edc3fbe262c8215af6e7f5bfd7 commit 5257a3b931e3a2edc3fbe262c8215af6e7f5bfd7 Merge: 36e6ee9 4e3cf8b Author: Brad King AuthorDate: Wed Dec 2 08:35:44 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 08:35:44 2015 -0500 Merge topic 'reduce-realpath-calls' 4e3cf8b0 cmOrderDirectories: Reduce repeat realpath() calls 6b185287 cmOrderDirectories: Factor out directory comparison diff --cc Source/cmOrderDirectories.cxx index e3eedc7,e3406a8..61efd01 --- a/Source/cmOrderDirectories.cxx +++ b/Source/cmOrderDirectories.cxx @@@ -637,5 -635,25 +635,25 @@@ void cmOrderDirectories::DiagnoseCycle( e << "Some of these libraries may not be found correctly."; this->GlobalGenerator->GetCMakeInstance() ->IssueMessage(cmake::WARNING, e.str(), - this->Target->Target->GetBacktrace()); + this->Target->GetBacktrace()); } + + bool cmOrderDirectories::IsSameDirectory(std::string const& l, + std::string const& r) + { + return this->GetRealPath(l) == this->GetRealPath(r); + } + + std::string const& cmOrderDirectories::GetRealPath(std::string const& dir) + { + std::map::iterator i = + this->RealPaths.lower_bound(dir); + if (i == this->RealPaths.end() || + this->RealPaths.key_comp()(dir, i->first)) + { + typedef std::map::value_type value_type; + i = this->RealPaths.insert( + i, value_type(dir, cmSystemTools::GetRealPath(dir))); + } + return i->second; + } ----------------------------------------------------------------------- Summary of changes: Source/cmOrderDirectories.cxx | 26 ++++++++++++++++++++++---- Source/cmOrderDirectories.h | 6 ++++++ 2 files changed, 28 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:35:49 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:35:49 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.0-637-gd956816 Message-ID: <20151202133549.36C9EDBBC9@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via d956816d70e7400b1d70f46f4f6adb87cee8c1ce (commit) via 001043ac3078c49651f6af0f1ff1b31ef71a7665 (commit) from 5257a3b931e3a2edc3fbe262c8215af6e7f5bfd7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d956816d70e7400b1d70f46f4f6adb87cee8c1ce commit d956816d70e7400b1d70f46f4f6adb87cee8c1ce Merge: 5257a3b 001043a Author: Brad King AuthorDate: Wed Dec 2 08:35:47 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 08:35:47 2015 -0500 Merge topic 'include-for-mode_t' 001043ac Include `sys/types.h` header to get `mode_t` ----------------------------------------------------------------------- Summary of changes: Source/cmStandardIncludes.h | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:35:52 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:35:52 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.0-639-gdec15fc Message-ID: <20151202133552.10CD7DBBCA@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via dec15fc32cdcd2604dc58eb7275f444b01002117 (commit) via ae434ee2dd1a91cd8ec53a631d8db9949d5f46b0 (commit) from d956816d70e7400b1d70f46f4f6adb87cee8c1ce (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dec15fc32cdcd2604dc58eb7275f444b01002117 commit dec15fc32cdcd2604dc58eb7275f444b01002117 Merge: d956816 ae434ee Author: Brad King AuthorDate: Wed Dec 2 08:35:50 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 08:35:50 2015 -0500 Merge topic 'cpack-dmg-multilanguage-sla' ae434ee2 CPack/DragNDrop: Allow single license for multiple languages ----------------------------------------------------------------------- Summary of changes: Modules/CPackDMG.cmake | 20 +++++++++++++++++++- Source/CPack/cmCPackDragNDropGenerator.cxx | 23 ++++++++++++++++------- Source/CPack/cmCPackDragNDropGenerator.h | 1 + 3 files changed, 36 insertions(+), 8 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:36:09 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:36:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1581-g723ae59 Message-ID: <20151202133609.8D3E2DBC64@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 723ae591165ac8f1124f5015b6e76ddba8003887 (commit) via dec15fc32cdcd2604dc58eb7275f444b01002117 (commit) via d956816d70e7400b1d70f46f4f6adb87cee8c1ce (commit) via 5257a3b931e3a2edc3fbe262c8215af6e7f5bfd7 (commit) via 36e6ee913d7ea22060cc45b6a6a7b7e573402b28 (commit) via 88c2d4b446c8b23b9694c6f00e76e02cf5e3d8f8 (commit) via bb5fccd0a77956b02f9f2c6f1c4c7acdea472178 (commit) from 4f5acd54c99b0b0ada5b7180cd1cf865d9b7a2ca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=723ae591165ac8f1124f5015b6e76ddba8003887 commit 723ae591165ac8f1124f5015b6e76ddba8003887 Merge: 4f5acd5 dec15fc Author: Brad King AuthorDate: Wed Dec 2 08:36:00 2015 -0500 Commit: Brad King CommitDate: Wed Dec 2 08:36:00 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:41:39 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:41:39 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1583-g7fe51ef Message-ID: <20151202134139.1BF19D7E64@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 7fe51ef21ecd8c7d1ef18dde26ebe3aef688c55e (commit) via f2ca704cbb0722da8f43b1f99b07e6fac32dc0f6 (commit) from 723ae591165ac8f1124f5015b6e76ddba8003887 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7fe51ef21ecd8c7d1ef18dde26ebe3aef688c55e commit 7fe51ef21ecd8c7d1ef18dde26ebe3aef688c55e Merge: 723ae59 f2ca704 Author: Brad King AuthorDate: Wed Dec 2 08:41:38 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 08:41:38 2015 -0500 Merge topic 'backport-NIOS2-CPU' into next f2ca704c Add NIOS2 CPU support https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2ca704cbb0722da8f43b1f99b07e6fac32dc0f6 commit f2ca704cbb0722da8f43b1f99b07e6fac32dc0f6 Author: Marek Vasut AuthorDate: Thu Nov 26 21:48:00 2015 +0100 Commit: Brad King CommitDate: Wed Dec 2 08:40:36 2015 -0500 Add NIOS2 CPU support Add necessary bits to support the NIOS2 little-endian CPU. Signed-off-by: Marek Vasut Cc: Ley Foon Tan Cc: Thomas Chou Cc: Walter Goossens diff --git a/Source/kwsys/CPU.h.in b/Source/kwsys/CPU.h.in index 884d71a..66ffbb1 100644 --- a/Source/kwsys/CPU.h.in +++ b/Source/kwsys/CPU.h.in @@ -88,6 +88,10 @@ #elif defined(__mips) || defined(__mips__) || defined(__MIPS__) # define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG +/* NIOS2 */ +#elif defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__) +# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE + /* OpenRISC 1000 */ #elif defined(__or1k__) # define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG diff --git a/Utilities/KWIML/ABI.h.in b/Utilities/KWIML/ABI.h.in index 6300ada..87b6e96 100644 --- a/Utilities/KWIML/ABI.h.in +++ b/Utilities/KWIML/ABI.h.in @@ -398,6 +398,10 @@ suppression macro @KWIML at _ABI_NO_VERIFY was defined. #elif defined(__mips) || defined(__mips__) || defined(__MIPS__) # define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG +/* NIOS2 */ +#elif defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__) +# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE + /* OpenRISC 1000 */ #elif defined(__or1k__) # define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:41:44 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:41:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.0-641-gda78a16 Message-ID: <20151202134144.BFEA5D8161@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via da78a1648fd5d4452a98c46eb9af486d16c43c9a (commit) via f2ca704cbb0722da8f43b1f99b07e6fac32dc0f6 (commit) from dec15fc32cdcd2604dc58eb7275f444b01002117 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da78a1648fd5d4452a98c46eb9af486d16c43c9a commit da78a1648fd5d4452a98c46eb9af486d16c43c9a Merge: dec15fc f2ca704 Author: Brad King AuthorDate: Wed Dec 2 08:41:43 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 08:41:43 2015 -0500 Merge topic 'backport-NIOS2-CPU' f2ca704c Add NIOS2 CPU support ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:42:08 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:42:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.0-650-g3fa2fc7 Message-ID: <20151202134208.74216D81A8@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 3fa2fc71b119751bc915f0068d2046667fdefd32 (commit) via aac633d5e5765bb6b51e31364325ae7d916f021c (commit) via e8974b62d7883adf100d4c6ad90a0fbf682aaa91 (commit) via b146747ed7f3cee8d8ef9c3ea6899ec3135aa527 (commit) via da688bcb3b7edc1da19fc8b89e2425f40d3fa7f1 (commit) via 07388f83b69739116c8364e9443f10158fcdc912 (commit) via 246b0bfbfda9a8f3091fc34fc92816aebaf60ae9 (commit) via deec3a3f06d341cfe0bef4e856b263eff347cc72 (commit) via aa427a4239eb691d4129ebc383ab7b0d61b5b94e (commit) from da78a1648fd5d4452a98c46eb9af486d16c43c9a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3fa2fc71b119751bc915f0068d2046667fdefd32 commit 3fa2fc71b119751bc915f0068d2046667fdefd32 Merge: da78a16 aac633d Author: Brad King AuthorDate: Wed Dec 2 08:42:06 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 08:42:06 2015 -0500 Merge topic 'cmake-W-options' aac633d5 Explicitly enable deprecated warnings by default. e8974b62 Modify dev warning options to affect deprecated warnings. b146747e Consistent documentation for deprecation message variables. da688bcb Add -W options to control deprecated warning messages. 07388f83 Refactor the -W options parser to be generic. 246b0bfb Explicitly enable author (dev) warnings by default. deec3a3f Make message suppression more consistent. aa427a42 Tests: Revise message in RunCMake.CommandLine -Wdev case ----------------------------------------------------------------------- Summary of changes: Help/manual/OPTIONS_BUILD.txt | 17 +- Help/release/dev/cmake-W-options.rst | 12 + Help/variable/CMAKE_ERROR_DEPRECATED.rst | 7 +- Help/variable/CMAKE_WARN_DEPRECATED.rst | 9 +- Source/cmMakefile.cxx | 8 +- Source/cmMakefile.h | 3 +- Source/cmMessageCommand.cxx | 27 ++- Source/cmake.cxx | 251 ++++++++++++++++---- Source/cmake.h | 43 +++- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 38 +++ .../W_bad-arg1-result.txt} | 0 Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt | 2 + .../W_bad-arg2-result.txt} | 0 Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt | 2 + Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt | 4 + Tests/RunCMake/CommandLine/Wdeprecated.cmake | 1 + Tests/RunCMake/CommandLine/Wdev-stderr.txt | 2 +- Tests/RunCMake/CommandLine/Wdev.cmake | 2 +- Tests/RunCMake/CommandLine/Wno-deprecated.cmake | 1 + Tests/RunCMake/CommandLine/Wno-dev.cmake | 2 +- Tests/RunCMake/message/RunCMakeTest.cmake | 1 + .../defaultmessage-result.txt} | 0 Tests/RunCMake/message/defaultmessage-stderr.txt | 11 + Tests/RunCMake/message/defaultmessage.cmake | 4 + Tests/RunCMake/message/nomessage.cmake | 6 + Tests/RunCMake/message/warnmessage-stderr.txt | 11 +- Tests/RunCMake/message/warnmessage.cmake | 6 +- 27 files changed, 393 insertions(+), 77 deletions(-) create mode 100644 Help/release/dev/cmake-W-options.rst copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/W_bad-arg1-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/W_bad-arg2-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt create mode 100644 Tests/RunCMake/CommandLine/Wdeprecated.cmake create mode 100644 Tests/RunCMake/CommandLine/Wno-deprecated.cmake copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => message/defaultmessage-result.txt} (100%) create mode 100644 Tests/RunCMake/message/defaultmessage-stderr.txt create mode 100644 Tests/RunCMake/message/defaultmessage.cmake hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:42:22 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:42:22 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1586-gf0acaa7 Message-ID: <20151202134222.5AAD1D8339@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via f0acaa7671009517d1947cabec18668054c42164 (commit) via 3fa2fc71b119751bc915f0068d2046667fdefd32 (commit) via da78a1648fd5d4452a98c46eb9af486d16c43c9a (commit) from 7fe51ef21ecd8c7d1ef18dde26ebe3aef688c55e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0acaa7671009517d1947cabec18668054c42164 commit f0acaa7671009517d1947cabec18668054c42164 Merge: 7fe51ef 3fa2fc7 Author: Brad King AuthorDate: Wed Dec 2 08:42:14 2015 -0500 Commit: Brad King CommitDate: Wed Dec 2 08:42:14 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:45:23 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:45:23 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.0-654-g4e29a51 Message-ID: <20151202134523.DA211D9D25@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 4e29a514ad83c5711e7ee894b825203e8c302269 (commit) via 7cb630809db87dcce4e4d10596a5bb3d878662e2 (commit) via 535760ccb954dda78cc5c23c9e75245e7529c481 (commit) via 7b13759d5f030064fb9715f7a94194fd27aa55b0 (commit) from 3fa2fc71b119751bc915f0068d2046667fdefd32 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:45:24 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:45:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1591-g8114424 Message-ID: <20151202134524.10618D9DAB@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 811442428dbf577b2fbc8400330904f13339aad9 (commit) via 4e29a514ad83c5711e7ee894b825203e8c302269 (commit) via 7cb630809db87dcce4e4d10596a5bb3d878662e2 (commit) via 535760ccb954dda78cc5c23c9e75245e7529c481 (commit) via 7b13759d5f030064fb9715f7a94194fd27aa55b0 (commit) from f0acaa7671009517d1947cabec18668054c42164 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=811442428dbf577b2fbc8400330904f13339aad9 commit 811442428dbf577b2fbc8400330904f13339aad9 Merge: f0acaa7 4e29a51 Author: Brad King AuthorDate: Wed Dec 2 08:45:12 2015 -0500 Commit: Brad King CommitDate: Wed Dec 2 08:45:12 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:45:24 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:45:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.4.0-42-g7cb6308 Message-ID: <20151202134524.28A29D9DF0@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via 7cb630809db87dcce4e4d10596a5bb3d878662e2 (commit) via f2ca704cbb0722da8f43b1f99b07e6fac32dc0f6 (commit) via 535760ccb954dda78cc5c23c9e75245e7529c481 (commit) via 001043ac3078c49651f6af0f1ff1b31ef71a7665 (commit) via 7b13759d5f030064fb9715f7a94194fd27aa55b0 (commit) via 4e3cf8b012404e4d9602c16d473480cc3d0c7928 (commit) via 6b1852874325520a418eb05ec3c2149c2eb194a2 (commit) from f8deadc16d03233ecb92b4d05a9e9f0d6c9f56aa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/cmOrderDirectories.cxx | 26 ++++++++++++++++++++++---- Source/cmOrderDirectories.h | 6 ++++++ Source/cmStandardIncludes.h | 2 ++ Source/kwsys/CPU.h.in | 4 ++++ Utilities/KWIML/ABI.h.in | 4 ++++ 5 files changed, 38 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 08:53:36 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 08:53:36 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1594-g5fe8cb9 Message-ID: <20151202135341.42ACCDB21F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 5fe8cb993882d62d9f54475e2b0bab798d64bd7e (commit) via 9b3f50a7a2be85f86900590d7df9d3b3c89b3cd9 (commit) via fd7180f0c0c2554c31afda235469df986a109fe4 (commit) from 811442428dbf577b2fbc8400330904f13339aad9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5fe8cb993882d62d9f54475e2b0bab798d64bd7e commit 5fe8cb993882d62d9f54475e2b0bab798d64bd7e Merge: 8114424 9b3f50a Author: Brad King AuthorDate: Wed Dec 2 08:53:36 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 08:53:36 2015 -0500 Merge topic 'test-release' into next 9b3f50a7 Merge branch 'release' into test-release fd7180f0 CMake 3.4.1 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9b3f50a7a2be85f86900590d7df9d3b3c89b3cd9 commit 9b3f50a7a2be85f86900590d7df9d3b3c89b3cd9 Merge: 4e29a51 fd7180f Author: Brad King AuthorDate: Wed Dec 2 08:53:18 2015 -0500 Commit: Brad King CommitDate: Wed Dec 2 08:53:18 2015 -0500 Merge branch 'release' into test-release https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd7180f0c0c2554c31afda235469df986a109fe4 commit fd7180f0c0c2554c31afda235469df986a109fe4 Author: Brad King AuthorDate: Wed Dec 2 08:46:12 2015 -0500 Commit: Brad King CommitDate: Wed Dec 2 08:46:12 2015 -0500 CMake 3.4.1 diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0ce1696..5717d37 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 4) -set(CMake_VERSION_PATCH 0) +set(CMake_VERSION_PATCH 1) #set(CMake_VERSION_RC 0) ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 09:46:02 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 09:46:02 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1601-ge5ecb12 Message-ID: <20151202144603.65058DABD0@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via e5ecb1269f6f27aec1af3127bcecdfafc66a63b0 (commit) via d60cef773659d69ed2fce9b963d788ab422679b9 (commit) via 9fd987507622c585f4e0131678654e0643fd9a50 (commit) via 3f9b081f6ee85e0691c36496d989edbe8382589d (commit) via 01c80acdbdadf3811bc0a6cab0c28469a4e9f5b7 (commit) via 5183c6e5dd6ff2bbb5cce33a6f8b6b1d74dfe217 (commit) via 8a60e6961e84fc3177d2439fe6b2b5f972104cd9 (commit) from 5fe8cb993882d62d9f54475e2b0bab798d64bd7e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5ecb1269f6f27aec1af3127bcecdfafc66a63b0 commit e5ecb1269f6f27aec1af3127bcecdfafc66a63b0 Merge: 5fe8cb9 d60cef7 Author: Brad King AuthorDate: Wed Dec 2 09:46:00 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 09:46:00 2015 -0500 Merge topic 'FindBoost-imported-targets' into next d60cef77 Help: Add notes for topic 'FindBoost-imported-targets.rst' 9fd98750 Tests: Add FindBoost testcase for imported targets 3f9b081f FindBoost: Add imported targets 01c80acd FindBoost: Automatically add missing component dependencies 5183c6e5 FindBoost: Embed component dependency table 8a60e696 Utilities: Add BoostScanDeps script https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d60cef773659d69ed2fce9b963d788ab422679b9 commit d60cef773659d69ed2fce9b963d788ab422679b9 Author: Brad King AuthorDate: Wed Dec 2 09:42:34 2015 -0500 Commit: Brad King CommitDate: Wed Dec 2 09:42:34 2015 -0500 Help: Add notes for topic 'FindBoost-imported-targets.rst' diff --git a/Help/release/dev/FindBoost-imported-targets.rst b/Help/release/dev/FindBoost-imported-targets.rst new file mode 100644 index 0000000..1129ded --- /dev/null +++ b/Help/release/dev/FindBoost-imported-targets.rst @@ -0,0 +1,5 @@ +FindBoost-imported-targets +-------------------------- + +* The :module:`FindBoost` module now provides imported targets + such as ``Boost::boost`` and ``Boost::filesystem``. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9fd987507622c585f4e0131678654e0643fd9a50 commit 9fd987507622c585f4e0131678654e0643fd9a50 Author: Roger Leigh AuthorDate: Tue Dec 1 22:05:35 2015 +0000 Commit: Brad King CommitDate: Wed Dec 2 09:40:17 2015 -0500 Tests: Add FindBoost testcase for imported targets Enable by setting CMake_TEST_FindBoost to TRUE. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 5fd7159..6c4567d 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1356,6 +1356,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif() endif() + if(CMake_TEST_FindBoost) + add_subdirectory(FindBoost) + endif() + if(CMake_TEST_FindGSL) add_subdirectory(FindGSL) endif() diff --git a/Tests/FindBoost/CMakeLists.txt b/Tests/FindBoost/CMakeLists.txt new file mode 100644 index 0000000..259ee26 --- /dev/null +++ b/Tests/FindBoost/CMakeLists.txt @@ -0,0 +1,10 @@ +add_test(NAME FindBoost.Test COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindBoost/Test" + "${CMake_BINARY_DIR}/Tests/FindBoost/Test" + ${build_generator_args} + --build-project TestFindBoost + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) diff --git a/Tests/FindBoost/Test/CMakeLists.txt b/Tests/FindBoost/Test/CMakeLists.txt new file mode 100644 index 0000000..ce50fc7 --- /dev/null +++ b/Tests/FindBoost/Test/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.1) +project(TestFindBoost CXX) +include(CTest) + +find_package(Boost REQUIRED COMPONENTS filesystem thread) + +add_executable(test_boost_tgt main.cxx) +target_link_libraries(test_boost_tgt + Boost::dynamic_linking + Boost::disable_autolinking + Boost::filesystem + Boost::thread) +add_test(NAME test_boost_tgt COMMAND test_boost_tgt) + +add_executable(test_boost_var main.cxx) +target_include_directories(test_boost_var PRIVATE ${Boost_INCLUDE_DIRS}) +target_link_libraries(test_boost_var PRIVATE ${Boost_FILESYSTEM_LIBRARIES} ${Boost_SYSTEM_LIBRARIES} ${Boost_THREAD_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) +add_test(NAME test_boost_var COMMAND test_boost_var) diff --git a/Tests/FindBoost/Test/main.cxx b/Tests/FindBoost/Test/main.cxx new file mode 100644 index 0000000..0f44f30 --- /dev/null +++ b/Tests/FindBoost/Test/main.cxx @@ -0,0 +1,26 @@ +#include +#include + +namespace +{ + + boost::mutex m1; + boost::recursive_mutex m2; + + void + threadmain() + { + boost::lock_guard lock1(m1); + boost::lock_guard lock2(m2); + + boost::filesystem::path p(boost::filesystem::current_path()); + } + +} + +int main() { + boost::thread foo(threadmain); + foo.join(); + + return 0; +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f9b081f6ee85e0691c36496d989edbe8382589d commit 3f9b081f6ee85e0691c36496d989edbe8382589d Author: Roger Leigh AuthorDate: Tue Dec 1 22:01:50 2015 +0000 Commit: Brad King CommitDate: Wed Dec 2 09:40:17 2015 -0500 FindBoost: Add imported targets Targets include: - Boost::boost: Target for header-only dependencies - Boost::: Target for specific component dependency - Boost::diagnostic_definitions: adds BOOST_LIB_DIAGNOSTIC - Boost::disable_autolinking: adds BOOST_ALL_NO_LIB - Boost::dynamic_linking: adds BOOST_ALL_DYN_LINK diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 19387ce..e517a6a 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -54,6 +54,33 @@ # Boost__LIBRARY_DEBUG - Component library debug variant # Boost__LIBRARY_RELEASE - Component library release variant # +# The following :prop_tgt:`IMPORTED` targets are also defined:: +# +# Boost::boost - Target for header-only dependencies +# (Boost include directory) +# Boost:: - Target for specific component dependency +# (shared or static library); is lower- +# case +# Boost::diagnostic_definitions - interface target to enable diagnostic +# information about Boost's automatic linking +# during compilation (adds BOOST_LIB_DIAGNOSTIC) +# Boost::disable_autolinking - interface target to disable automatic +# linking with MSVC (adds BOOST_ALL_NO_LIB) +# Boost::dynamic_linking - interface target to enable dynamic linking +# linking with MSVC (adds BOOST_ALL_DYN_LINK) +# +# Implicit dependencies such as Boost::filesystem requiring +# Boost::system will be automatically detected and satisfied, even +# if system is not specified when using find_package and if +# Boost::system is not added to target_link_libraries. If using +# Boost::thread, then Thread::Thread will also be added automatically. +# +# It is important to note that the imported targets behave differently +# than variables created by this module: multiple calls to +# find_package(Boost) in the same directory or sub-directories with +# different options (e.g. static or shared) will not override the +# values of the targets created by the first call. +# # Users may set these hints or results as cache entries. Projects # should not read these entries directly but instead use the above # result variables. Note that some hint names start in upper-case @@ -142,6 +169,14 @@ # add_executable(foo foo.cc) # endif() # +# Example to find Boost libraries and use imported targets:: +# +# find_package(Boost 1.56 REQUIRED COMPONENTS +# date_time filesystem iostreams) +# add_executable(foo foo.cc) +# target_link_libraries(foo Boost::date_time Boost::filesystem +# Boost::iostreams) +# # Example to find Boost headers and some *static* libraries:: # # set(Boost_USE_STATIC_LIBS ON) # only find static libs @@ -822,6 +857,16 @@ if(Boost_DEBUG) "Boost_NO_SYSTEM_PATHS = ${Boost_NO_SYSTEM_PATHS}") endif() +# Supply Boost_LIB_DIAGNOSTIC_DEFINITIONS as a convenience target. It +# will only contain any interface definitions on WIN32, but is created +# on all platforms to keep end user code free from platform dependent +# code. Also provide convenience targets to disable autolinking and +# enable dynamic linking. +if(NOT TARGET Boost::diagnostic_definitions) + add_library(Boost::diagnostic_definitions INTERFACE IMPORTED) + add_library(Boost::disable_autolinking INTERFACE IMPORTED) + add_library(Boost::dynamic_linking INTERFACE IMPORTED) +endif() if(WIN32) # In windows, automatic linking is performed, so you do not have # to specify the libraries. If you are linking to a dynamic @@ -841,6 +886,12 @@ if(WIN32) # code to emit a #pragma message each time a library is selected # for linking. set(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC") + set_target_properties(Boost::diagnostic_definitions PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "BOOST_LIB_DIAGNOSTIC") + set_target_properties(Boost::disable_autolinking PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB") + set_target_properties(Boost::dynamic_linking PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_DYN_LINK") endif() _Boost_CHECK_SPELLING(Boost_ROOT) @@ -1243,6 +1294,13 @@ endif() # Add any missing components to the list. _Boost_MISSING_DEPENDENCIES(Boost_FIND_COMPONENTS) +# If thread is required, get the thread libs as a dependency +list(FIND Boost_FIND_COMPONENTS thread _Boost_THREAD_DEPENDENCY_LIBS) +if(NOT _Boost_THREAD_DEPENDENCY_LIBS EQUAL -1) + include(CMakeFindDependencyMacro) + find_dependency(Threads) +endif() + # If the user changed any of our control inputs flush previous results. if(_Boost_CHANGE_LIBDIR OR _Boost_CHANGE_LIBNAME) foreach(COMPONENT ${_Boost_COMPONENTS_SEARCHED}) @@ -1486,6 +1544,70 @@ else() endif() # ------------------------------------------------------------------------ +# Add imported targets +# ------------------------------------------------------------------------ + +if(Boost_FOUND AND _Boost_IMPORTED_TARGETS) + # For header-only libraries + if(NOT TARGET Boost::boost) + add_library(Boost::boost INTERFACE IMPORTED) + if(Boost_INCLUDE_DIRS) + set_target_properties(Boost::boost PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}") + endif() + endif() + + foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + if(NOT TARGET Boost::${COMPONENT}) + string(TOUPPER ${COMPONENT} UPPERCOMPONENT) + if(Boost_${UPPERCOMPONENT}_FOUND) + if(Boost_USE_STATIC_LIBS) + add_library(Boost::${COMPONENT} STATIC IMPORTED) + else() + # Even if Boost_USE_STATIC_LIBS is OFF, we might have static + # libraries as a result. + add_library(Boost::${COMPONENT} UNKNOWN IMPORTED) + endif() + if(Boost_INCLUDE_DIRS) + set_target_properties(Boost::${COMPONENT} PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}") + endif() + if(EXISTS "${Boost_${UPPERCOMPONENT}_LIBRARY}") + set_target_properties(Boost::${COMPONENT} PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" + IMPORTED_LOCATION "${Boost_${UPPERCOMPONENT}_LIBRARY}") + endif() + if(EXISTS "${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG}") + set_property(TARGET Boost::${COMPONENT} APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(Boost::${COMPONENT} PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" + IMPORTED_LOCATION_DEBUG "${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG}") + endif() + if(EXISTS "${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE}") + set_property(TARGET Boost::${COMPONENT} APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(Boost::${COMPONENT} PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" + IMPORTED_LOCATION_RELEASE "${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE}") + endif() + if(_Boost_${UPPERCOMPONENT}_DEPENDENCIES) + unset(_Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES) + foreach(dep ${_Boost_${UPPERCOMPONENT}_DEPENDENCIES}) + list(APPEND _Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES Boost::${dep}) + endforeach() + if(COMPONENT STREQUAL "thread") + list(APPEND _Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES Threads::Threads) + endif() + set_target_properties(Boost::${COMPONENT} PROPERTIES + INTERFACE_LINK_LIBRARIES "${_Boost_${UPPERCOMPONENT}_TARGET_DEPENDENCIES}") + endif() + endif() + endif() + endforeach() +endif() + +# ------------------------------------------------------------------------ # Notification to end user about what was found # ------------------------------------------------------------------------ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=01c80acdbdadf3811bc0a6cab0c28469a4e9f5b7 commit 01c80acdbdadf3811bc0a6cab0c28469a4e9f5b7 Author: Roger Leigh AuthorDate: Tue Dec 1 21:59:00 2015 +0000 Commit: Brad King CommitDate: Wed Dec 2 09:40:17 2015 -0500 FindBoost: Automatically add missing component dependencies The function _Boost_MISSING_DEPENDENCIES will look at the user-supplied component list, check the dependency information for each component using _Boost_COMPONENT_DEPENDENCIES, and will add any missing dependencies to the component list. This ensures that all required components will be searched for. diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 41b728d..19387ce 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -689,6 +689,45 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret) endfunction() # +# Determine if any missing dependencies require adding to the component list. +# +# Sets _Boost_${COMPONENT}_DEPENDENCIES for each required component, +# plus _Boost_IMPORTED_TARGETS (TRUE if imported targets should be +# defined; FALSE if dependency information is unavailable). +# +# componentvar - the component list variable name +# +# +function(_Boost_MISSING_DEPENDENCIES componentvar) + # _boost_unprocessed_components - list of components requiring processing + # _boost_processed_components - components already processed (or currently being processed) + # _boost_new_components - new components discovered for future processing + # + list(APPEND _boost_unprocessed_components ${${componentvar}}) + + while(_boost_unprocessed_components) + list(APPEND _boost_processed_components ${_boost_unprocessed_components}) + foreach(component ${_boost_unprocessed_components}) + string(TOUPPER ${component} uppercomponent) + set(${_ret} ${_Boost_${uppercomponent}_DEPENDENCIES} PARENT_SCOPE) + _Boost_COMPONENT_DEPENDENCIES("${component}" _Boost_${uppercomponent}_DEPENDENCIES) + set(_Boost_${uppercomponent}_DEPENDENCIES ${_Boost_${uppercomponent}_DEPENDENCIES} PARENT_SCOPE) + set(_Boost_IMPORTED_TARGETS ${_Boost_IMPORTED_TARGETS} PARENT_SCOPE) + foreach(componentdep ${_Boost_${uppercomponent}_DEPENDENCIES}) + list(FIND _boost_processed_components "${componentdep}" _boost_component_found) + list(FIND _boost_new_components "${componentdep}" _boost_component_new) + if (_boost_component_found EQUAL -1 AND _boost_component_new EQUAL -1) + list(APPEND _boost_new_components ${componentdep}) + endif() + endforeach() + endforeach() + set(_boost_unprocessed_components ${_boost_new_components}) + unset(_boost_new_components) + endwhile() + set(${componentvar} ${_boost_processed_components} PARENT_SCOPE) +endfunction() + +# # End functions/macros # #------------------------------------------------------------------------------- @@ -1200,6 +1239,10 @@ if(Boost_VERSION AND Boost_FIND_COMPONENTS) endif() endif() +# Additional components may be required via component dependencies. +# Add any missing components to the list. +_Boost_MISSING_DEPENDENCIES(Boost_FIND_COMPONENTS) + # If the user changed any of our control inputs flush previous results. if(_Boost_CHANGE_LIBDIR OR _Boost_CHANGE_LIBNAME) foreach(COMPONENT ${_Boost_COMPONENTS_SEARCHED}) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5183c6e5dd6ff2bbb5cce33a6f8b6b1d74dfe217 commit 5183c6e5dd6ff2bbb5cce33a6f8b6b1d74dfe217 Author: Roger Leigh AuthorDate: Tue Dec 1 21:53:50 2015 +0000 Commit: Brad King CommitDate: Wed Dec 2 09:40:17 2015 -0500 FindBoost: Embed component dependency table The function _Boost_COMPONENT_DEPENDENCIES is used to query the library dependencies for a given component for a given version of Boost. This covers Boost releases from 1.33 to 1.59, using the information generated by Utilities/Scripts/BoostScanDeps.cmake. diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 33e6a49..41b728d 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -472,6 +472,223 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret) endfunction() # +# Get component dependencies. Requires the dependencies to have been +# defined for the Boost release version. +# +# component - the component to check +# _ret - list of library dependencies +# +function(_Boost_COMPONENT_DEPENDENCIES component _ret) + # Note: to add a new Boost release, run + # + # % cmake -DBOOST_DIR=/path/to/boost/source -P Utilities/Scripts/BoostScanDeps.cmake + # + # The output may be added in a new block below. If it's the same as + # the previous release, simply update the version range of the block + # for the previous release. + # + # This information was originally generated by running + # BoostScanDeps.cmake against every boost release to date supported + # by FindBoost: + # + # % for version in /path/to/boost/sources/* + # do + # cmake -DBOOST_DIR=$version -P Utilities/Scripts/BoostScanDeps.cmake + # done + # + # The output was then updated by search and replace with these regexes: + # + # - Strip message(STATUS) prefix dashes + # s;^-- ;; + # - Indent + # s;^set(; set(;; + # - Add conditionals + # s;Scanning /path/to/boost/sources/boost_\(.*\)_\(.*\)_\(.*); elseif(NOT Boost_VERSION VERSION_LESS \10\20\3 AND Boost_VERSION VERSION_LESS xxxx); + # + # This results in the logic seen below, but will require the xxxx + # replacing with the following Boost release version (or the next + # minor version to be released, e.g. 1.59 was the latest at the time + # of writing, making 1.60 the next, so 106000 is the needed version + # number). Identical consecutive releases were then merged together + # by updating the end range of the first block and removing the + # following redundant blocks. + # + # Running the script against all historical releases should be + # required only if the BoostScanDeps.cmake script logic is changed. + # The addition of a new release should only require it to be run + # against the new release. + set(_Boost_IMPORTED_TARGETS TRUE) + if(NOT Boost_VERSION VERSION_LESS 103300 AND Boost_VERSION VERSION_LESS 103500) + set(_Boost_IOSTREAMS_DEPENDENCIES regex thread) + set(_Boost_REGEX_DEPENDENCIES thread) + set(_Boost_WAVE_DEPENDENCIES filesystem thread) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 103500 AND Boost_VERSION VERSION_LESS 103600) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_WAVE_DEPENDENCIES filesystem system thread) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 103600 AND Boost_VERSION VERSION_LESS 103800) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_WAVE_DEPENDENCIES filesystem system thread) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 103800 AND Boost_VERSION VERSION_LESS 104300) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_THREAD_DEPENDENCIES date_time) + set(_Boost_WAVE_DEPENDENCIES filesystem system thread date_time) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 104300 AND Boost_VERSION VERSION_LESS 104400) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_THREAD_DEPENDENCIES date_time) + set(_Boost_WAVE_DEPENDENCIES filesystem system thread date_time) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 104400 AND Boost_VERSION VERSION_LESS 104500) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random serialization) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_THREAD_DEPENDENCIES date_time) + set(_Boost_WAVE_DEPENDENCIES serialization filesystem system thread date_time) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 104500 AND Boost_VERSION VERSION_LESS 104700) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_THREAD_DEPENDENCIES date_time) + set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 104700 AND Boost_VERSION VERSION_LESS 104800) + set(_Boost_CHRONO_DEPENDENCIES system) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_THREAD_DEPENDENCIES date_time) + set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 104800 AND Boost_VERSION VERSION_LESS 105000) + set(_Boost_CHRONO_DEPENDENCIES system) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_THREAD_DEPENDENCIES date_time) + set(_Boost_TIMER_DEPENDENCIES chrono system) + set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 105000 AND Boost_VERSION VERSION_LESS 105300) + set(_Boost_CHRONO_DEPENDENCIES system) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_THREAD_DEPENDENCIES chrono system date_time) + set(_Boost_TIMER_DEPENDENCIES chrono system) + set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 105300 AND Boost_VERSION VERSION_LESS 105400) + set(_Boost_ATOMIC_DEPENDENCIES thread chrono system date_time) + set(_Boost_CHRONO_DEPENDENCIES system) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic) + set(_Boost_TIMER_DEPENDENCIES chrono system) + set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 105400 AND Boost_VERSION VERSION_LESS 105500) + set(_Boost_ATOMIC_DEPENDENCIES thread chrono system date_time) + set(_Boost_CHRONO_DEPENDENCIES system) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic) + set(_Boost_TIMER_DEPENDENCIES chrono system) + set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 105500 AND Boost_VERSION VERSION_LESS 105600) + set(_Boost_CHRONO_DEPENDENCIES system) + set(_Boost_COROUTINE_DEPENDENCIES context system) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic) + set(_Boost_TIMER_DEPENDENCIES chrono system) + set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 105600 AND Boost_VERSION VERSION_LESS 105900) + set(_Boost_CHRONO_DEPENDENCIES system) + set(_Boost_COROUTINE_DEPENDENCIES context system) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_RANDOM_DEPENDENCIES system) + set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic) + set(_Boost_TIMER_DEPENDENCIES chrono system) + set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 105900 AND Boost_VERSION VERSION_LESS 106000) + set(_Boost_CHRONO_DEPENDENCIES system) + set(_Boost_COROUTINE_DEPENDENCIES context system) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono atomic) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_RANDOM_DEPENDENCIES system) + set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic) + set(_Boost_TIMER_DEPENDENCIES chrono system) + set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + else() + message(WARNING "Imported targets not available for Boost version ${Boost_VERSION}") + set(_Boost_IMPORTED_TARGETS FALSE) + endif() + + string(TOUPPER ${component} uppercomponent) + set(${_ret} ${_Boost_${uppercomponent}_DEPENDENCIES} PARENT_SCOPE) + set(_Boost_IMPORTED_TARGETS ${_Boost_IMPORTED_TARGETS} PARENT_SCOPE) + + string(REGEX REPLACE ";" " " _boost_DEPS_STRING "${_Boost_${uppercomponent}_DEPENDENCIES}") + if (NOT _boost_DEPS_STRING) + set(_boost_DEPS_STRING "(none)") + endif() + # message(STATUS "Dependencies for Boost::${component}: ${_boost_DEPS_STRING}") +endfunction() + +# # End functions/macros # #------------------------------------------------------------------------------- @@ -511,6 +728,10 @@ if(Boost_FIND_VERSION_EXACT) else() # The user has not requested an exact version. Among known # versions, find those that are acceptable to the user request. + # + # Note: When adding a new Boost release, also update the dependency + # information in _Boost_COMPONENT_DEPENDENCIES. See the + # instructions at the top of _Boost_COMPONENT_DEPENDENCIES. set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8a60e6961e84fc3177d2439fe6b2b5f972104cd9 commit 8a60e6961e84fc3177d2439fe6b2b5f972104cd9 Author: Roger Leigh AuthorDate: Tue Dec 1 21:50:03 2015 +0000 Commit: Brad King CommitDate: Wed Dec 2 09:40:17 2015 -0500 Utilities: Add BoostScanDeps script This script scans Boost headers in order to determine inter-library dependencies, using the "autolink" information embedded in the headers for automatic linking on Windows. This information is then output in a form suitable for use in FindBoost.cmake. diff --git a/Utilities/Scripts/BoostScanDeps.cmake b/Utilities/Scripts/BoostScanDeps.cmake new file mode 100644 index 0000000..1fbea4b --- /dev/null +++ b/Utilities/Scripts/BoostScanDeps.cmake @@ -0,0 +1,217 @@ +# Scan the Boost headers and determine the library dependencies. Note +# that this script only scans one Boost version at once; invoke once +# for each Boost release. Note that this does require the headers for +# a given component to match the library name, since this computes +# inter-library dependencies. Library components for which this +# assumption does not hold true and which have dependencies on other +# Boost libraries will require special-casing. It also doesn't handle +# private dependencies not described in the headers, for static +# library dependencies--this is also a limitation of auto-linking, and +# I'm unaware of any specific instances where this would be +# problematic. +# +# Invoke in script mode, defining these variables: +# BOOST_DIR - the root of the boost includes +# +# The script will process each directory under the root as a +# "component". For each component, all the headers will be scanned to +# determine the components it depends upon by following all the +# possible includes from this component. This is to match the +# behaviour of autolinking. + +# Written by Roger Leigh + +#============================================================================= +# Copyright 2014-2015 University of Dundee +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# Determine header dependencies on libraries using the embedded dependency information. +# +# component - the component to check (uses all headers from boost/${component}) +# includedir - the path to the Boost headers +# _ret_libs - list of library dependencies +# +function(_Boost_FIND_COMPONENT_DEPENDENCIES component includedir _ret_libs) + # _boost_unprocessed_headers - list of headers requiring parsing + # _boost_processed_headers - headers already parsed (or currently being parsed) + # _boost_new_headers - new headers discovered for future processing + + set(library_component FALSE) + + # Start by finding all headers for the component; header + # dependencies via #include will be solved by future passes + + # Special-case since it is part of mpi; look only in boost/mpi/python* + if(component STREQUAL "mpi_python") + set(_boost_DEPS "python") + set(library_component TRUE) + file(GLOB_RECURSE _boost_unprocessed_headers + RELATIVE "${includedir}" + "${includedir}/boost/mpi/python/*") + list(INSERT _boost_unprocessed_headers 0 "${includedir}/boost/mpi/python.hpp") + # Special-case since it is a serialization variant; look in boost/serialization + elseif(component STREQUAL "wserialization") + set(library_component TRUE) + file(GLOB_RECURSE _boost_unprocessed_headers + RELATIVE "${includedir}" + "${includedir}/boost/serialization/*") + list(INSERT _boost_unprocessed_headers 0 "${includedir}/boost/serialization.hpp") + # Not really a library in its own right, but treat it as one + elseif(component STREQUAL "math") + set(library_component TRUE) + file(GLOB_RECURSE _boost_unprocessed_headers + RELATIVE "${includedir}" + "${includedir}/boost/math/*") + list(INSERT _boost_unprocessed_headers 0 "${includedir}/boost/math.hpp") + # Single test header + elseif(component STREQUAL "unit_test_framework") + set(library_component TRUE) + set(_boost_unprocessed_headers "${BOOST_DIR}/test/unit_test.hpp") + # Single test header + elseif(component STREQUAL "prg_exec_monitor") + set(library_component TRUE) + set(_boost_unprocessed_headers "${BOOST_DIR}/test/prg_exec_monitor.hpp") + # Single test header + elseif(component STREQUAL "test_exec_monitor") + set(library_component TRUE) + set(_boost_unprocessed_headers "${BOOST_DIR}/test/test_exec_monitor.hpp") + else() + # Default behaviour where header directory is the same as the library name. + file(GLOB_RECURSE _boost_unprocessed_headers + RELATIVE "${includedir}" + "${includedir}/boost/${component}/*") + list(INSERT _boost_unprocessed_headers 0 "${includedir}/boost/${component}.hpp") + endif() + + while(_boost_unprocessed_headers) + list(APPEND _boost_processed_headers ${_boost_unprocessed_headers}) + foreach(header ${_boost_unprocessed_headers}) + if(EXISTS "${includedir}/${header}") + file(STRINGS "${includedir}/${header}" _boost_header_includes REGEX "^#[ \t]*include[ \t]*][^>]*>") + # The optional whitespace before "#" is intentional + # (boost/serialization/config.hpp bug). + file(STRINGS "${includedir}/${header}" _boost_header_deps REGEX "^[ \t]*#[ \t]*define[ \t][ \t]*BOOST_LIB_NAME[ \t][ \t]*boost_") + + foreach(line ${_boost_header_includes}) + string(REGEX REPLACE "^#[ \t]*include[ \t]*<(boost/[^>][^>]*)>.*" "\\1" _boost_header_match "${line}") + list(FIND _boost_processed_headers "${_boost_header_match}" _boost_header_processed) + list(FIND _boost_new_headers "${_boost_header_match}" _boost_header_new) + if (_boost_header_processed EQUAL -1 AND _boost_header_new EQUAL -1) + list(APPEND _boost_new_headers ${_boost_header_match}) + endif() + endforeach() + + foreach(line ${_boost_header_deps}) + string(REGEX REPLACE "^[ \t]*#[ \t]*define[ \t][ \t]*BOOST_LIB_NAME[ \t][ \t]*boost_([^ \t][^ \t]*).*" "\\1" _boost_component_match "${line}") + list(FIND _boost_DEPS "${_boost_component_match}" _boost_dep_found) + if(_boost_component_match STREQUAL "bzip2" OR + _boost_component_match STREQUAL "zlib") + # These components may or may not be required; not + # possible to tell without knowing where and when + # BOOST_BZIP2_BINARY and BOOST_ZLIB_BINARY are defined. + # If building against an external zlib or bzip2, this is + # undesirable. + continue() + endif() + if(component STREQUAL "mpi" AND + (_boost_component_match STREQUAL "mpi_python" OR + _boost_component_match STREQUAL "python")) + # Optional python dependency; skip to avoid making it a + # hard dependency (handle as special-case for mpi_python). + continue() + endif() + if (_boost_dep_found EQUAL -1 AND + NOT "${_boost_component_match}" STREQUAL "${component}") + list(APPEND _boost_DEPS "${_boost_component_match}") + endif() + if("${_boost_component_match}" STREQUAL "${component}") + set(library_component TRUE) + endif() + endforeach() + endif() + endforeach() + set(_boost_unprocessed_headers ${_boost_new_headers}) + unset(_boost_new_headers) + endwhile() + + # message(STATUS "Unfiltered dependencies for Boost::${component}: ${_boost_DEPS}") + + if(NOT library_component) + unset(_boost_DEPS) + endif() + set(${_ret_libs} ${_boost_DEPS} PARENT_SCOPE) + + #string(REGEX REPLACE ";" " " _boost_DEPS_STRING "${_boost_DEPS}") + #if (NOT _boost_DEPS_STRING) + # set(_boost_DEPS_STRING "(none)") + #endif() + #message(STATUS "Dependencies for Boost::${component}: ${_boost_DEPS_STRING}") +endfunction() + + +message(STATUS "Scanning ${BOOST_DIR}") + +# List of all directories and files +file(GLOB boost_contents RELATIVE "${BOOST_DIR}/boost" "${BOOST_DIR}/boost/*") + +# Components as directories +foreach(component ${boost_contents}) + if(IS_DIRECTORY "${BOOST_DIR}/boost/${component}") + list(APPEND boost_components "${component}") + endif() +endforeach() + +# The following components are not top-level directories, so require +# special-casing: + +# Special-case mpi_python, since it's a part of mpi +if(IS_DIRECTORY "${BOOST_DIR}/boost/mpi" AND + IS_DIRECTORY "${BOOST_DIR}/boost/python") + list(APPEND boost_components "mpi_python") +endif() +# Special-case wserialization, which is a variant of serialization +if(IS_DIRECTORY "${BOOST_DIR}/boost/serialization") + list(APPEND boost_components "wserialization") +endif() +# Special-case math* since there are six libraries, but no actual math +# library component. Handle specially when scanning above. +# +# Special-case separate test libraries, which are all part of test +if(EXISTS "${BOOST_DIR}/test/unit_test.hpp") + list(APPEND boost_components "unit_test_framework") +endif() +if(EXISTS "${BOOST_DIR}/test/prg_exec_monitor.hpp") + list(APPEND boost_components "prg_exec_monitor") +endif() +if(EXISTS "${BOOST_DIR}/test/test_exec_monitor.hpp") + list(APPEND boost_components "test_exec_monitor") +endif() + +if(boost_components) + list(SORT boost_components) +endif() + +# Process each component defined above +foreach(component ${boost_components}) + string(TOUPPER ${component} UPPERCOMPONENT) + _Boost_FIND_COMPONENT_DEPENDENCIES("${component}" "${BOOST_DIR}" + _Boost_${UPPERCOMPONENT}_LIBRARY_DEPENDENCIES) +endforeach() + +# Output results +foreach(component ${boost_components}) + string(TOUPPER ${component} UPPERCOMPONENT) + if(_Boost_${UPPERCOMPONENT}_LIBRARY_DEPENDENCIES) + string(REGEX REPLACE ";" " " _boost_DEPS_STRING "${_Boost_${UPPERCOMPONENT}_LIBRARY_DEPENDENCIES}") + message(STATUS "set(_Boost_${UPPERCOMPONENT}_DEPENDENCIES ${_boost_DEPS_STRING})") + endif() +endforeach() ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindBoost-imported-targets.rst | 5 + Modules/FindBoost.cmake | 386 +++++++++++++++++++++++ Tests/CMakeLists.txt | 4 + Tests/{FindJsonCpp => FindBoost}/CMakeLists.txt | 8 +- Tests/FindBoost/Test/CMakeLists.txt | 18 ++ Tests/FindBoost/Test/main.cxx | 26 ++ Utilities/Scripts/BoostScanDeps.cmake | 217 +++++++++++++ 7 files changed, 660 insertions(+), 4 deletions(-) create mode 100644 Help/release/dev/FindBoost-imported-targets.rst copy Tests/{FindJsonCpp => FindBoost}/CMakeLists.txt (53%) create mode 100644 Tests/FindBoost/Test/CMakeLists.txt create mode 100644 Tests/FindBoost/Test/main.cxx create mode 100644 Utilities/Scripts/BoostScanDeps.cmake hooks/post-receive -- CMake From chuck.atkins at kitware.com Wed Dec 2 11:08:40 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Wed, 2 Dec 2015 11:08:40 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1603-g064ad91 Message-ID: <20151202160840.48AAEDBC53@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 064ad91d29944c70567eedfa995e6375690c08e2 (commit) via 60032277ce39e4708664bb16d74a7c20c8661b19 (commit) from e5ecb1269f6f27aec1af3127bcecdfafc66a63b0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=064ad91d29944c70567eedfa995e6375690c08e2 commit 064ad91d29944c70567eedfa995e6375690c08e2 Merge: e5ecb12 6003227 Author: Chuck Atkins AuthorDate: Wed Dec 2 11:08:39 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 11:08:39 2015 -0500 Merge topic 'detect-compiler-wrappers' into next 60032277 Compiler: Add infrastructure for detecting compiler wrappers https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=60032277ce39e4708664bb16d74a7c20c8661b19 commit 60032277ce39e4708664bb16d74a7c20c8661b19 Author: Chuck Atkins AuthorDate: Wed Dec 2 08:47:43 2015 -0600 Commit: Chuck Atkins CommitDate: Wed Dec 2 11:05:29 2015 -0500 Compiler: Add infrastructure for detecting compiler wrappers diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in index c72e338..f109a14 100644 --- a/Modules/CMakeCCompiler.cmake.in +++ b/Modules/CMakeCCompiler.cmake.in @@ -2,6 +2,7 @@ set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@") set(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@") set(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@") set(CMAKE_C_COMPILER_VERSION "@CMAKE_C_COMPILER_VERSION@") +set(CMAKE_C_COMPILER_WRAPPER "@CMAKE_C_COMPILER_WRAPPER@") set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "@CMAKE_C_STANDARD_COMPUTED_DEFAULT@") set(CMAKE_C_COMPILE_FEATURES "@CMAKE_C_COMPILE_FEATURES@") set(CMAKE_C90_COMPILE_FEATURES "@CMAKE_C90_COMPILE_FEATURES@") diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index d2417aa..c204c77 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -60,6 +60,21 @@ if (NOT _INCLUDED_FILE) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) endif () + +# load any compiler-wrapper specific information +if (CMAKE_C_COMPILER_WRAPPER) + set(_INCLUDED_WRAPPER_FILE 0) + if (CMAKE_C_COMPILER_ID) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER} OPTIONAL) + endif () +endif () + # We specify the compiler information in the system file for some # platforms, but this language may not have been enabled when the file # was first included. Include it again to get the language info. diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in index 52e44f6..9e90aea 100644 --- a/Modules/CMakeCXXCompiler.cmake.in +++ b/Modules/CMakeCXXCompiler.cmake.in @@ -2,6 +2,7 @@ set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@") set(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@") set(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@") set(CMAKE_CXX_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@") +set(CMAKE_CXX_COMPILER_WRAPPER "@CMAKE_CXX_COMPILER_WRAPPER@") set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "@CMAKE_CXX_STANDARD_COMPUTED_DEFAULT@") set(CMAKE_CXX_COMPILE_FEATURES "@CMAKE_CXX_COMPILE_FEATURES@") set(CMAKE_CXX98_COMPILE_FEATURES "@CMAKE_CXX98_COMPILE_FEATURES@") diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index 091627b..cd706f4 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -59,6 +59,21 @@ if (NOT _INCLUDED_FILE) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) endif () + +# load any compiler-wrapper specific information +if (CMAKE_CXX_COMPILER_WRAPPER) + set(_INCLUDED_WRAPPER_FILE 0) + if (CMAKE_CXX_COMPILER_ID) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER} OPTIONAL) + endif () +endif () + # We specify the compiler information in the system file for some # platforms, but this language may not have been enabled when the file # was first included. Include it again to get the language info. diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 81c2509..eb54814 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -107,6 +107,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) PARENT_SCOPE) set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) + set(CMAKE_${lang}_COMPILER_WRAPPER "${CMAKE_${lang}_COMPILER_WRAPPER}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE) set(CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT "${CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT}" PARENT_SCOPE) @@ -435,6 +436,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) set(HAVE_COMPILER_VERSION_MINOR 0) set(HAVE_COMPILER_VERSION_PATCH 0) set(HAVE_COMPILER_VERSION_TWEAK 0) + set(COMPILER_WRAPPER) set(DIGIT_VALUE_1 1) set(DIGIT_VALUE_2 10) set(DIGIT_VALUE_3 100) @@ -476,6 +478,9 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) endif() endforeach() endforeach() + if("${info}" MATCHES "INFO:compiler_wrapper\\[([^]\"]*)\\]") + set(COMPILER_WRAPPER "${CMAKE_MATCH_1}") + endif() if("${info}" MATCHES "INFO:simulate\\[([^]\"]*)\\]") set(SIMULATE_ID "${CMAKE_MATCH_1}") endif() @@ -588,6 +593,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) + set(CMAKE_${lang}_COMPILER_WRAPPER "${COMPILER_WRAPPER}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE) set(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE) diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in index 14fdd60..2a4bea4 100644 --- a/Modules/CMakeFortranCompiler.cmake.in +++ b/Modules/CMakeFortranCompiler.cmake.in @@ -2,6 +2,7 @@ set(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@") set(CMAKE_Fortran_COMPILER_ARG1 "@CMAKE_Fortran_COMPILER_ARG1@") set(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@") set(CMAKE_Fortran_COMPILER_VERSION "@CMAKE_Fortran_COMPILER_VERSION@") +set(CMAKE_Fortran_COMPILER_WRAPPER "@CMAKE_Fortran_COMPILER_WRAPPER@") set(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@") set(CMAKE_Fortran_SIMULATE_ID "@CMAKE_Fortran_SIMULATE_ID@") set(CMAKE_Fortran_SIMULATE_VERSION "@CMAKE_Fortran_SIMULATE_VERSION@") diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 79393d3..110eec2 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -36,6 +36,21 @@ if (NOT _INCLUDED_FILE) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) endif () + +# load any compiler-wrapper specific information +if (CMAKE_Fortran_COMPILER_WRAPPER) + set(_INCLUDED_WRAPPER_FILE 0) + if (CMAKE_Fortran_COMPILER_ID) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER} OPTIONAL) + endif () +endif () + # We specify the compiler information in the system file for some # platforms, but this language may not have been enabled when the file # was first included. Include it again to get the language info. ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCCompiler.cmake.in | 1 + Modules/CMakeCInformation.cmake | 15 +++++++++++++++ Modules/CMakeCXXCompiler.cmake.in | 1 + Modules/CMakeCXXInformation.cmake | 15 +++++++++++++++ Modules/CMakeDetermineCompilerId.cmake | 6 ++++++ Modules/CMakeFortranCompiler.cmake.in | 1 + Modules/CMakeFortranInformation.cmake | 15 +++++++++++++++ 7 files changed, 54 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 11:42:25 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 11:42:25 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.0-656-g6f6897f Message-ID: <20151202164225.77A52D9A0B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 6f6897f1aef884963503d8068707cf27fa7d99e7 (commit) via fd7180f0c0c2554c31afda235469df986a109fe4 (commit) from 4e29a514ad83c5711e7ee894b825203e8c302269 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 11:42:25 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 11:42:25 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1605-gb2ae6a3 Message-ID: <20151202164225.A0ADAD9A4F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via b2ae6a309c8e5cc729fc5269aa04f38b46311f53 (commit) via 6f6897f1aef884963503d8068707cf27fa7d99e7 (commit) from 064ad91d29944c70567eedfa995e6375690c08e2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b2ae6a309c8e5cc729fc5269aa04f38b46311f53 commit b2ae6a309c8e5cc729fc5269aa04f38b46311f53 Merge: 064ad91 6f6897f Author: Brad King AuthorDate: Wed Dec 2 11:42:12 2015 -0500 Commit: Brad King CommitDate: Wed Dec 2 11:42:12 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 11:42:25 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 11:42:25 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.4.0-43-gfd7180f Message-ID: <20151202164225.C4181D9A4F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via fd7180f0c0c2554c31afda235469df986a109fe4 (commit) from 7cb630809db87dcce4e4d10596a5bb3d878662e2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From gjasny at googlemail.com Wed Dec 2 12:10:34 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Wed, 2 Dec 2015 12:10:34 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.0-1607-g1c27e7d Message-ID: <20151202171034.7C078DB717@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 1c27e7df4e033f981dde15f7731913ffd6750b03 (commit) via b732f72a3dcda862b16e3b7a775f9d2b34e0d5be (commit) from b2ae6a309c8e5cc729fc5269aa04f38b46311f53 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c27e7df4e033f981dde15f7731913ffd6750b03 commit 1c27e7df4e033f981dde15f7731913ffd6750b03 Merge: b2ae6a3 b732f72 Author: Gregor Jasny AuthorDate: Wed Dec 2 12:10:32 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 2 12:10:32 2015 -0500 Merge topic 'regex-explorer' into next b732f72a fixup! cmake-gui: Add regex explorer window https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b732f72a3dcda862b16e3b7a775f9d2b34e0d5be commit b732f72a3dcda862b16e3b7a775f9d2b34e0d5be Author: Gregor Jasny AuthorDate: Wed Dec 2 18:09:53 2015 +0100 Commit: Gregor Jasny CommitDate: Wed Dec 2 18:09:53 2015 +0100 fixup! cmake-gui: Add regex explorer window diff --git a/Help/release/dev/regex-explorer.rst b/Help/release/dev/regex-explorer.rst index 5c7ae3a..2147816 100644 --- a/Help/release/dev/regex-explorer.rst +++ b/Help/release/dev/regex-explorer.rst @@ -3,4 +3,4 @@ regex-explorer * The Qt base CMake GUI got a Regular Expression Explorer which could be used to create and evaluate regular expressions in real-time. The explorer window - is available via the ``Tools``menu. + is available via the ``Tools`` menu. diff --git a/Source/QtDialog/RegexExplorer.cxx b/Source/QtDialog/RegexExplorer.cxx index b583d70..dfcf048 100644 --- a/Source/QtDialog/RegexExplorer.cxx +++ b/Source/QtDialog/RegexExplorer.cxx @@ -12,7 +12,7 @@ #include "RegexExplorer.h" -RegexExplorer::RegexExplorer(QWidget* p) : m_matched(false) +RegexExplorer::RegexExplorer(QWidget* p) : QDialog(p), m_matched(false) { this->setupUi(this); @@ -96,8 +96,8 @@ void RegexExplorer::on_matchNumber_currentIndexChanged(int index) return; } - QVariant data = matchNumber->itemData(index); - int idx = data.toInt(); + QVariant itemData = matchNumber->itemData(index); + int idx = itemData.toInt(); if(idx < 1 || idx >= cmsys::RegularExpression::NSUBEXP) { ----------------------------------------------------------------------- Summary of changes: Help/release/dev/regex-explorer.rst | 2 +- Source/QtDialog/RegexExplorer.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From robert.maynard at kitware.com Wed Dec 2 14:54:11 2015 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 2 Dec 2015 14:54:11 -0500 (EST) Subject: [Cmake-commits] CMake annotated tag, v3.4.1, created. v3.4.1 Message-ID: <20151202195411.E953ADCFAD@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The annotated tag, v3.4.1 has been created at 1c011d39bb252d7f314eb837061d8dddc9bd1ce3 (tag) tagging fd7180f0c0c2554c31afda235469df986a109fe4 (commit) replaces v3.4.0 tagged by Brad King on Wed Dec 2 11:42:40 2015 -0500 - Log ----------------------------------------------------------------- CMake 3.4.1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJWXx+AAAoJEC0s7xA0khaEwYcP/3erh/Eks00FZauiGP3RiH/c R+qem3Gjqm01fXZKW2zfzgP//wk8KPVeOp/bgaB+yfq7NG78j00qPnjdYsDisLLb 1ECIMmKHYZ2TX6E0fiCrlTEfIOIxx6gCqZmIDCMF6EFYgH1IcIJfjIdLi3AhnAlY Slu/6vE5DCBkJr26UnuKFJ4ALCm7eK4eJnpzw1qHhJk7Ighh4diZk9pem4f5IhWr mE3oINbd8mj/AKAr3Zygp7r6FSSuIQ1FbYqW/I1NfiUeQbzThUZrU25Hf231hhRK CgUzKkwnmvC8fKsxABaE91WDvJh4rT2SH4PdAZTafUXECUiJeDC2HjEff1q4MRh2 fSN5ok0ziwryh7P4F0jtxlh25ii25L48B2z0y6dnVvqrNkvG0MWzVYYQUmjfYDgT KU208c/s4Lgr+/tKVpKmslbMD1atZmddY7EEQ65jOwm+8HGODlQJI2qldY79WEOL t3ri/L16HDFwCI1SvPmavllJh612aH9R59MV5HGeQ2JDIrgkTMKzWycQgjvL1Ydl Jp6q9Nx86tpU+9HcOMCWRunpyz/WgRes7pIRXmlCXl89VBxhXYjCiT/i4eGt7iXd WwG8n58EqN/mJZ7tLwgPLVH/wcsUetbJOwxa2+D1XBBFVImLzMAFxXmw1ZjJGG0L RGT7OkqlRZZiu151tFP0 =nODQ -----END PGP SIGNATURE----- Bill Hoffman (1): Fix auto export symbols for Dlls containing /bigobj for 64bit builds. Brad King (39): Cray: Implement Fortran compiler version detection (#15845) Merge branch 'cray-fortran-version' into release MSVC: Fix linking with /MANIFEST:NO option Make C and C++ default dialect detection robust to advanced optimizations Merge branch 'fix-compute-default-dialect-lto' into release Merge branch 'fix-ms-manifest-no-linker' into release FindGTest: Refactor test type checks to avoid cases triggering CMP0064 Merge branch 'FindGTest-avoid-CMP0064' into release Android: Restore generation of non-versioned soname (#15851) Merge branch 'backport-android-no-versioned-soname' into release Project: Guess default standard dialect if compiler was forced (#15852) Merge branch 'fix-forced-toolchain-dialect' into release Merge branch 'avoid-divide-by-zero' into release Merge branch 'backport-fix-autodef-bigobj-64' into release Revert "Disable shared library support when compiler links statically" (#15855) Merge branch 'revert-compiler-links-statically' into release Tests: Add case for add_subdirectory inside a function Merge branch 'test-add_subdirectory-in-function' into release Tests: Add case for unmatched cmake_policy({PUSH,POP}) Tests: Add case for package version file unmatched policy scope cmState: Skip variable scope snapshots to avoid call stack duplicates Merge branch 'test-cmake_policy-unmatched' into fix-find_package-version-file-error-stack cmMakefile: Clarify purpose of method that pops a scope snapshot cmMakefile: Remove unused PolicyPushPop interfaces cmLocalGenerator: Use ScopePushPop RAII class to manage local variable scopes cmState: Enforce policy scope balancing around variable scopes Merge branch 'fix-find_package-version-file-error-stack' into release cmLinkedTree: Rename 'Extend' method to 'Push' cmLinkedTree: Add Pop method cmListFileCache: Implement cmListFileBacktrace ctor/dtor out-of-line cmState: Avoid accumulating policy stack storage for short-lived scopes cmState: Avoid accumulating snapshot storage for short-lived scopes Merge branch 'reduce-cmState-accumulation' into release cmOrderDirectories: Factor out directory comparison cmOrderDirectories: Reduce repeat realpath() calls Merge branch 'reduce-realpath-calls' into release Merge branch 'include-for-mode_t' into release Merge branch 'backport-NIOS2-CPU' into release CMake 3.4.1 Kylie McClain (1): Include `sys/types.h` header to get `mode_t` Marek Vasut (1): Add NIOS2 CPU support Ty Smith (1): cmELF: Avoid divide by zero if there are no dynamic section entries ----------------------------------------------------------------------- hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 2 15:10:48 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 2 Dec 2015 15:10:48 -0500 (EST) Subject: [Cmake-commits] CMake branch, maint, updated. v3.4.1 Message-ID: <20151202201048.C4BA4DA137@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, maint has been updated via fd7180f0c0c2554c31afda235469df986a109fe4 (commit) via 7cb630809db87dcce4e4d10596a5bb3d878662e2 (commit) via f2ca704cbb0722da8f43b1f99b07e6fac32dc0f6 (commit) via 535760ccb954dda78cc5c23c9e75245e7529c481 (commit) via 001043ac3078c49651f6af0f1ff1b31ef71a7665 (commit) via 7b13759d5f030064fb9715f7a94194fd27aa55b0 (commit) via 4e3cf8b012404e4d9602c16d473480cc3d0c7928 (commit) via 6b1852874325520a418eb05ec3c2149c2eb194a2 (commit) via f8deadc16d03233ecb92b4d05a9e9f0d6c9f56aa (commit) via 5f860ebb67e86e0aa407e26ddf79652f73742211 (commit) via f21dc4a81c05c79b873c9918f6fe8aff4bf02133 (commit) via bc1d3a8a8783848016ef12044a02a28b620c41a0 (commit) via 85fe26b5f742b704b51a7e15b4806366feab3a23 (commit) via 518d6b22f6705c4747c713031587705641540364 (commit) via 9ecf8a14fb4a12178a7bb97a87dee3fada3204d5 (commit) via 32edac6fddfbe91e47b34506cda855232d5a9e2c (commit) via 0fa7f143a08b62459900bd811c2c0674562bb8be (commit) via d85c9176ae15f4fb203e501d777cfce8304bf256 (commit) via 8e1be7bf688dc282408aa0403e9896fa5a142ec4 (commit) via 62126b67e0048800a833d3c4ea86d2307f1a4a06 (commit) via 2e28c619f8997a2b86c72b53659be371ff10a790 (commit) via b219ff94acf0b6c934c35e2ce42dfbf99580f1e8 (commit) via 378185fb7f672113257502ef96cf7106c22dd39f (commit) via c25d642de38730cdb6627a2c2d47f85e8c470974 (commit) via 010c5959864a10f4b83907fb058006e118dd740d (commit) via 5e3045a749b34fb87c876af9a42ee190d722bada (commit) via 9682de566e264c53018cccd05465f2c5d91ccf73 (commit) via e3dfa3506c0589cb4c3e91107e560c2495cdc257 (commit) via c7ddc5f43821039f4c005271912da30ba0f213db (commit) via 16ba21f79abbd4729124c8c042b66da482500e9c (commit) via f5cd92a82600067835c05c7e82726161a150a50b (commit) via aa0460b34a8533ee5c0e0893b411f72b5784c842 (commit) via 441dba80322ec1579b34dd64e13bcfcf004f7005 (commit) via 59b6d8a81bc4f975664a1b04cd349235e5a152b7 (commit) via 3aec561aa20847f1e968448f96723d228e520251 (commit) via ce7da2dec4939b56128f7d05d008069d44ec506b (commit) via b5e7b22defa353894ad999df83b90ae45f163d61 (commit) via e32c903057774ba34de7ed2292b6156f9cf58c5e (commit) via daa72b253a5d07b985653c4ce1d2a7a647129e43 (commit) via c3dc8935ee5fe9415d37ec138b6c087f85f15d43 (commit) via ca263d1d71d953630e31daa7771dde3c6835b9a2 (commit) via 60859b93db0787f1beb421de7e61a0d79d6dfd80 (commit) via 09f754f040f3e817cd69337adea2c73cb61d53da (commit) from b4a2ada297214119647b26df8abe394cd73ca53a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCCompiler.cmake.in | 1 - Modules/CMakeCCompilerId.c.in | 1 + Modules/CMakeCInformation.cmake | 4 - Modules/CMakeCXXCompiler.cmake.in | 1 - Modules/CMakeCXXCompilerId.cpp.in | 1 + Modules/CMakeCXXInformation.cmake | 4 - Modules/CMakeDetermineCompilerId.cmake | 8 -- Modules/CMakeFortranCompiler.cmake.in | 1 - Modules/CMakeFortranCompilerId.F.in | 2 + Modules/CMakeFortranInformation.cmake | 4 - Modules/Compiler/AppleClang-C.cmake | 3 + Modules/Compiler/AppleClang-CXX.cmake | 3 + Modules/Compiler/Clang-C.cmake | 7 ++ Modules/Compiler/Clang-CXX.cmake | 3 + Modules/Compiler/GNU-C.cmake | 7 ++ Modules/Compiler/GNU-CXX.cmake | 3 + Modules/Compiler/SunPro-CXX.cmake | 3 + Modules/FindGTest.cmake | 6 +- Source/CMakeVersion.cmake | 2 +- Source/bindexplib.cxx | 2 +- Source/cmELF.cxx | 8 +- Source/cmGeneratorTarget.cxx | 1 + Source/cmLinkedTree.h | 33 +++++-- Source/cmListFileCache.cxx | 15 +++ Source/cmListFileCache.h | 6 +- Source/cmLocalGenerator.cxx | 6 +- Source/cmMakefile.cxx | 28 +++--- Source/cmMakefile.h | 8 +- Source/cmOrderDirectories.cxx | 26 +++++- Source/cmOrderDirectories.h | 6 ++ Source/cmStandardIncludes.h | 2 + Source/cmState.cxx | 96 +++++++++++++------- Source/cmState.h | 1 + Source/cmcmd.cxx | 4 +- Source/kwsys/CPU.h.in | 4 + Tests/MSManifest/Subdir/CMakeLists.txt | 2 + Tests/RunCMake/AutoExportDll/sub/sub.cxx | 2 + .../NotClosed-result.txt} | 0 Tests/RunCMake/PolicyScope/NotClosed-stderr.txt | 4 + Tests/RunCMake/PolicyScope/NotClosed.cmake | 1 + .../NotOpened-result.txt} | 0 Tests/RunCMake/PolicyScope/NotOpened-stderr.txt | 4 + Tests/RunCMake/PolicyScope/NotOpened.cmake | 1 + Tests/RunCMake/PolicyScope/RunCMakeTest.cmake | 2 + .../RunCMake/add_subdirectory/Function-stdout.txt | 10 ++ Tests/RunCMake/add_subdirectory/Function.cmake | 17 ++++ .../add_subdirectory/Function/CMakeLists.txt | 5 + Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake | 1 + .../PolicyPop-result.txt} | 0 Tests/RunCMake/find_package/PolicyPop-stderr.txt | 5 + Tests/RunCMake/find_package/PolicyPop.cmake | 1 + .../find_package/PolicyPop/PolicyPopConfig.cmake | 0 .../PolicyPop/PolicyPopConfigVersion.cmake | 3 + .../PolicyPush-result.txt} | 0 Tests/RunCMake/find_package/PolicyPush-stderr.txt | 5 + Tests/RunCMake/find_package/PolicyPush.cmake | 1 + .../find_package/PolicyPush/PolicyPushConfig.cmake | 0 .../PolicyPush/PolicyPushConfigVersion.cmake | 3 + Tests/RunCMake/find_package/RunCMakeTest.cmake | 2 + Utilities/KWIML/ABI.h.in | 4 + 60 files changed, 281 insertions(+), 102 deletions(-) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => PolicyScope/NotClosed-result.txt} (100%) create mode 100644 Tests/RunCMake/PolicyScope/NotClosed-stderr.txt create mode 100644 Tests/RunCMake/PolicyScope/NotClosed.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => PolicyScope/NotOpened-result.txt} (100%) create mode 100644 Tests/RunCMake/PolicyScope/NotOpened-stderr.txt create mode 100644 Tests/RunCMake/PolicyScope/NotOpened.cmake create mode 100644 Tests/RunCMake/add_subdirectory/Function-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/Function.cmake create mode 100644 Tests/RunCMake/add_subdirectory/Function/CMakeLists.txt copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => find_package/PolicyPop-result.txt} (100%) create mode 100644 Tests/RunCMake/find_package/PolicyPop-stderr.txt create mode 100644 Tests/RunCMake/find_package/PolicyPop.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PolicyPop/PolicyPopConfig.cmake (100%) create mode 100644 Tests/RunCMake/find_package/PolicyPop/PolicyPopConfigVersion.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => find_package/PolicyPush-result.txt} (100%) create mode 100644 Tests/RunCMake/find_package/PolicyPush-stderr.txt create mode 100644 Tests/RunCMake/find_package/PolicyPush.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PolicyPush/PolicyPushConfig.cmake (100%) create mode 100644 Tests/RunCMake/find_package/PolicyPush/PolicyPushConfigVersion.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 3 00:01:14 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 3 Dec 2015 00:01:14 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-614-g4ffeab0 Message-ID: <20151203050114.1ECB3DE439@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 4ffeab0e3c451854a4a9d424b47b2179c6cf6c6b (commit) from 6f6897f1aef884963503d8068707cf27fa7d99e7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ffeab0e3c451854a4a9d424b47b2179c6cf6c6b commit 4ffeab0e3c451854a4a9d424b47b2179c6cf6c6b Author: Kitware Robot AuthorDate: Thu Dec 3 00:01:09 2015 -0500 Commit: Kitware Robot CommitDate: Thu Dec 3 00:01:09 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 15782b6..141015d 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 4) -set(CMake_VERSION_PATCH 20151202) +set(CMake_VERSION_PATCH 20151203) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 3 09:07:05 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 3 Dec 2015 09:07:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1566-gb0cc082 Message-ID: <20151203140705.BE500DE5AF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via b0cc082ad6c6619653afbceca0ac2888d944e9e2 (commit) via e76ee2c006777e268715b39ad71f49e3d18b11a4 (commit) from 1c27e7df4e033f981dde15f7731913ffd6750b03 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0cc082ad6c6619653afbceca0ac2888d944e9e2 commit b0cc082ad6c6619653afbceca0ac2888d944e9e2 Merge: 1c27e7d e76ee2c Author: Brad King AuthorDate: Thu Dec 3 09:06:59 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 3 09:06:59 2015 -0500 Merge topic 'ios-framework-resource-layout' into next e76ee2c0 iOS: Fix framework resource directory layout (#15848) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e76ee2c006777e268715b39ad71f49e3d18b11a4 commit e76ee2c006777e268715b39ad71f49e3d18b11a4 Author: Bartosz Kosiorek AuthorDate: Wed Dec 2 22:34:25 2015 +0100 Commit: Brad King CommitDate: Thu Dec 3 08:52:09 2015 -0500 iOS: Fix framework resource directory layout (#15848) A typical iOS application bundle (also Framework Bundle) contains the application executable and any resources used by the application (for instance, the application icon, other images, and localized content) in the top-level bundle directory. The same rule applies to Framework Bundles. diff --git a/Help/prop_tgt/MACOSX_BUNDLE.rst b/Help/prop_tgt/MACOSX_BUNDLE.rst index 8d7d914..7cd8046 100644 --- a/Help/prop_tgt/MACOSX_BUNDLE.rst +++ b/Help/prop_tgt/MACOSX_BUNDLE.rst @@ -3,7 +3,7 @@ MACOSX_BUNDLE Build an executable as an Application Bundle on OS X or iOS. -When this property is set to true the executable when built on OS X +When this property is set to ``TRUE`` the executable when built on OS X or iOS will be created as an application bundle. This makes it a GUI executable that can be launched from the Finder. See the :prop_tgt:`MACOSX_FRAMEWORK_INFO_PLIST` target property for information about diff --git a/Help/prop_tgt/MACOSX_RPATH.rst b/Help/prop_tgt/MACOSX_RPATH.rst index 41bb8cc..1f9a036 100644 --- a/Help/prop_tgt/MACOSX_RPATH.rst +++ b/Help/prop_tgt/MACOSX_RPATH.rst @@ -3,8 +3,8 @@ MACOSX_RPATH Whether this target on OS X or iOS is located at runtime using rpaths. -When this property is set to true, the directory portion of -the "install_name" field of this shared library will be ``@rpath`` +When this property is set to ``TRUE``, the directory portion of +the ``install_name`` field of this shared library will be ``@rpath`` unless overridden by :prop_tgt:`INSTALL_NAME_DIR`. This indicates the shared library is to be found at runtime using runtime paths (rpaths). @@ -18,6 +18,6 @@ can be controlled by the :prop_tgt:`INSTALL_RPATH` target property on the target linking to this target. Policy :policy:`CMP0042` was introduced to change the default value of -``MACOSX_RPATH`` to ``TRUE. This is because use of ``@rpath`` is a +``MACOSX_RPATH`` to ``TRUE``. This is because use of ``@rpath`` is a more flexible and powerful alternative to ``@executable_path`` and ``@loader_path``. diff --git a/Help/prop_tgt/RESOURCE.rst b/Help/prop_tgt/RESOURCE.rst index 5dad3ea..d837f7b 100644 --- a/Help/prop_tgt/RESOURCE.rst +++ b/Help/prop_tgt/RESOURCE.rst @@ -1,11 +1,61 @@ RESOURCE -------- -Specify resource files in a :prop_tgt:`FRAMEWORK` shared library target. - -Shared library targets marked with the :prop_tgt:`FRAMEWORK` property generate -frameworks on OS X, iOS and normal shared libraries on other platforms. -This property may be set to a list of files to be placed in the -``Resources`` directory inside the framework folder. On non-Apple -platforms these files may be installed using the ``RESOURCE`` option to -the ``install(TARGETS)`` command. +Specify resource files in a :prop_tgt:`FRAMEWORK` or :prop_tgt:`BUNDLE`. + +Target marked with the :prop_tgt:`FRAMEWORK` or :prop_tgt:`BUNDLE` property +generate framework or application bundle (both OS X and iOS is supported) +or normal shared libraries on other platforms. +This property may be set to a list of files to be placed in the corresponding +directory (eg. ``Resources`` directory for OS X) inside the bundle. +On non-Apple platforms these files may be installed using the ``RESOURCE`` +option to the ``install(TARGETS)`` command. + +Following example of Application Bundle: + +.. code-block:: cmake + + add_executable(ExecutableTarget + addDemo.c + resourcefile.txt + appresourcedir/appres.txt + ) + + target_link_libraries(ExecutableTarget heymath mul) + + set(RESOURCE_FILES + resourcefile.txt + appresourcedir/appres.txt + ) + + set_target_properties(ExecutableTarget PROPERTIES + MACOSX_BUNDLE TRUE + MACOSX_FRAMEWORK_IDENTIFIER org.cmake.ExecutableTarget + RESOURCE "${RESOURCE_FILES}" + ) + +will produce flat structure for iOS systems:: + + ExecutableTarget.app + appres.txt + ExecutableTarget + Info.plist + resourcefile.txt + +For OS X systems it will produce following directory structure:: + + ExecutableTarget.app/ + Contents + Info.plist + MacOS + ExecutableTarget + Resources + appres.txt + resourcefile.txt + +For Linux, such cmake script produce following files:: + + ExecutableTarget + Resources + appres.txt + resourcefile.txt diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index cc424b4..b05fb41 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3752,7 +3752,11 @@ void cmGeneratorTarget::ConstructSourceFileFlags() const if(cmSourceFile* sf = this->Makefile->GetSource(*it)) { SourceFileFlags& flags = this->SourceFlagsMap[sf]; - flags.MacFolder = "Resources"; + flags.MacFolder = ""; + if(!this->Makefile->PlatformIsAppleIos()) + { + flags.MacFolder = "Resources"; + } flags.Type = cmGeneratorTarget::SourceFileTypeResource; } } diff --git a/Tests/RunCMake/Framework/FrameworkLayout.cmake b/Tests/RunCMake/Framework/FrameworkLayout.cmake index 107afdf..5184755 100644 --- a/Tests/RunCMake/Framework/FrameworkLayout.cmake +++ b/Tests/RunCMake/Framework/FrameworkLayout.cmake @@ -1,5 +1,11 @@ cmake_minimum_required(VERSION 3.4) enable_language(C) -add_library(Framework SHARED foo.c) -set_target_properties(Framework PROPERTIES FRAMEWORK TRUE) +add_library(Framework SHARED + foo.c + foo.h + res.txt) +set_target_properties(Framework PROPERTIES + FRAMEWORK TRUE + PUBLIC_HEADER foo.h + RESOURCE "res.txt") diff --git a/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake b/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake index 27d10d8..da1ccb4 100644 --- a/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake +++ b/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake @@ -1,7 +1,10 @@ set(framework-dir "${RunCMake_TEST_BINARY_DIR}/Framework.framework") -set(plist-file "${framework-dir}/Resources/Info.plist") +set(framework-resources "${framework-dir}/Resources") +set(framework-resource-file "${framework-resources}/res.txt") set(framework-library "${framework-dir}/Framework") set(framework-versions "${framework-dir}/Versions") +set(plist-file "${framework-resources}/Info.plist") +set(framework-header "${framework-dir}/Headers/foo.h") if(NOT IS_DIRECTORY ${framework-dir}) message(SEND_ERROR "Framework not found at ${framework-dir}") @@ -15,6 +18,18 @@ if(NOT EXISTS ${framework-library}) message(SEND_ERROR "Framework library not found at ${framework-library}") endif() +if(NOT EXISTS ${framework-resource-file}) + message(SEND_ERROR "Framework resource file not found at ${framework-resource-file}") +endif() + if(NOT EXISTS ${framework-versions}) message(SEND_ERROR "Framework versions not found at ${framework-versions}") endif() + +if(NOT EXISTS ${framework-resources}) + message(SEND_ERROR "Framework Resources not found at ${framework-resources}") +endif() + +if(NOT EXISTS ${framework-header}) + message(SEND_ERROR "Framework header file not found at ${framework-header}") +endif() diff --git a/Tests/RunCMake/Framework/foo.h b/Tests/RunCMake/Framework/foo.h new file mode 100644 index 0000000..5d5f8f0 --- /dev/null +++ b/Tests/RunCMake/Framework/foo.h @@ -0,0 +1 @@ +int foo(); diff --git a/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake b/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake index 373baad..b81a5f7 100644 --- a/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake +++ b/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake @@ -1,7 +1,10 @@ set(framework-dir "${RunCMake_TEST_BINARY_DIR}/Framework.framework") -set(plist-file "${framework-dir}/Info.plist") +set(framework-resources "${framework-dir}/Resources") +set(framework-resource-file "${framework-dir}/res.txt") set(framework-library "${framework-dir}/Framework") set(framework-versions "${framework-dir}/Versions") +set(plist-file "${framework-dir}/Info.plist") +set(framework-header "${framework-dir}/Headers/foo.h") if(NOT IS_DIRECTORY ${framework-dir}) message(SEND_ERROR "Framework not found at ${framework-dir}") @@ -15,6 +18,18 @@ if(NOT EXISTS ${framework-library}) message(SEND_ERROR "Framework library not found at ${framework-library}") endif() +if(NOT EXISTS ${framework-resource-file}) + message(SEND_ERROR "Framework resource file not found at ${framework-resource-file}") +endif() + if(EXISTS ${framework-versions}) message(SEND_ERROR "Framework versions found at ${framework-versions}") endif() + +if(EXISTS ${framework-resources}) + message(SEND_ERROR "Framework Resources found at ${framework-resources}") +endif() + +if(NOT EXISTS ${framework-header}) + message(SEND_ERROR "Framework headers not found at ${framework-header}") +endif() diff --git a/Tests/RunCMake/Framework/res.txt b/Tests/RunCMake/Framework/res.txt new file mode 100644 index 0000000..e69de29 ----------------------------------------------------------------------- Summary of changes: Help/prop_tgt/MACOSX_BUNDLE.rst | 2 +- Help/prop_tgt/MACOSX_RPATH.rst | 6 +- Help/prop_tgt/RESOURCE.rst | 66 +++++++++++++++++--- Source/cmGeneratorTarget.cxx | 6 +- Tests/RunCMake/Framework/FrameworkLayout.cmake | 10 ++- .../Framework/OSXFrameworkLayout-build-check.cmake | 17 ++++- Tests/RunCMake/Framework/foo.h | 1 + .../Framework/iOSFrameworkLayout-build-check.cmake | 17 ++++- .../hello.f => Tests/RunCMake/Framework/res.txt | 0 9 files changed, 108 insertions(+), 17 deletions(-) create mode 100644 Tests/RunCMake/Framework/foo.h copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/Framework/res.txt (100%) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 3 09:18:00 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 3 Dec 2015 09:18:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1568-g103203b Message-ID: <20151203141801.13870DC8D9@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 103203b3b0b83c73476f82a2e1bd29bb272a53c6 (commit) via d8b251e2ea84e612dc30a1c9690a8b299aeb30fd (commit) from b0cc082ad6c6619653afbceca0ac2888d944e9e2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=103203b3b0b83c73476f82a2e1bd29bb272a53c6 commit 103203b3b0b83c73476f82a2e1bd29bb272a53c6 Merge: b0cc082 d8b251e Author: Brad King AuthorDate: Thu Dec 3 09:17:56 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 3 09:17:56 2015 -0500 Merge topic 'fix-java-idlj-jarsigner-typos' into next d8b251e2 FindJava: Fix typos in IdlJ and JarSigner component implementation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8b251e2ea84e612dc30a1c9690a8b299aeb30fd commit d8b251e2ea84e612dc30a1c9690a8b299aeb30fd Author: Marc Chevrier AuthorDate: Thu Dec 3 12:34:51 2015 +0100 Commit: Brad King CommitDate: Thu Dec 3 09:17:00 2015 -0500 FindJava: Fix typos in IdlJ and JarSigner component implementation Fix typos introduced by commit v3.4.0-rc1~257^2~2 (FindJava: Add support for idlj and jarsigner tools, 2015-07-31) to correctly report when these components are found. diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake index 9f87997..cc67df6 100644 --- a/Modules/FindJava.cmake +++ b/Modules/FindJava.cmake @@ -228,12 +228,12 @@ if(Java_FIND_COMPONENTS) endif() elseif(component STREQUAL "IdlJ") list(APPEND _JAVA_REQUIRED_VARS Java_IDLJ_EXECUTABLE) - if(Java_IdlJ_EXECUTABLE) - set(Java_Extra_FOUND TRUE) + if(Java_IDLJ_EXECUTABLE) + set(Java_IdlJ_FOUND TRUE) endif() elseif(component STREQUAL "JarSigner") list(APPEND _JAVA_REQUIRED_VARS Java_JARSIGNER_EXECUTABLE) - if(Java_IDLJ_EXECUTABLE) + if(Java_JARSIGNER_EXECUTABLE) set(Java_JarSigner_FOUND TRUE) endif() else() ----------------------------------------------------------------------- Summary of changes: Modules/FindJava.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 3 09:23:11 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 3 Dec 2015 09:23:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1570-gd8ac93f Message-ID: <20151203142312.58213DDD4C@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via d8ac93fff8a91c77294d2c5b062765ebdafdbe1e (commit) via 6fc91ffb5f836e5878295030ea83a8f733fd0e96 (commit) from 103203b3b0b83c73476f82a2e1bd29bb272a53c6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8ac93fff8a91c77294d2c5b062765ebdafdbe1e commit d8ac93fff8a91c77294d2c5b062765ebdafdbe1e Merge: 103203b 6fc91ff Author: Brad King AuthorDate: Thu Dec 3 09:23:08 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 3 09:23:08 2015 -0500 Merge topic 'FindJNI-aix' into next 6fc91ffb FindJNI: Add support for AIX java sdk https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6fc91ffb5f836e5878295030ea83a8f733fd0e96 commit 6fc91ffb5f836e5878295030ea83a8f733fd0e96 Author: Marc Chevrier AuthorDate: Thu Dec 3 12:37:26 2015 +0100 Commit: Brad King CommitDate: Thu Dec 3 09:20:07 2015 -0500 FindJNI: Add support for AIX java sdk diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index cbe21d7..037764a 100644 --- a/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake @@ -63,7 +63,7 @@ macro(java_append_library_directories _var) elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64") set(_java_libarch "ppc64" "ppc") elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)") - set(_java_libarch "ppc") + set(_java_libarch "ppc" "ppc64") elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc") # Both flavours can run on the same processor set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "sparc" "sparcv9") @@ -271,7 +271,7 @@ find_path(JAVA_INCLUDE_PATH jni.h ${JAVA_AWT_INCLUDE_DIRECTORIES} ) -find_path(JAVA_INCLUDE_PATH2 jni_md.h +find_path(JAVA_INCLUDE_PATH2 NAMES jni_md.h jniport.h ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH}/darwin ${JAVA_INCLUDE_PATH}/win32 @@ -281,6 +281,7 @@ find_path(JAVA_INCLUDE_PATH2 jni_md.h ${JAVA_INCLUDE_PATH}/solaris ${JAVA_INCLUDE_PATH}/hp-ux ${JAVA_INCLUDE_PATH}/alpha + ${JAVA_INCLUDE_PATH}/aix ) find_path(JAVA_AWT_INCLUDE_PATH jawt.h ----------------------------------------------------------------------- Summary of changes: Modules/FindJNI.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 3 09:24:55 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 3 Dec 2015 09:24:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1572-g4d1d9c6 Message-ID: <20151203142456.55409DDDC3@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 4d1d9c62c5bb26fdf202e6fa5f302bee254ab77c (commit) via 56c11eee13604e163eb5a5d9092df405be0e9a5c (commit) from d8ac93fff8a91c77294d2c5b062765ebdafdbe1e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d1d9c62c5bb26fdf202e6fa5f302bee254ab77c commit 4d1d9c62c5bb26fdf202e6fa5f302bee254ab77c Merge: d8ac93f 56c11ee Author: Brad King AuthorDate: Thu Dec 3 09:24:54 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 3 09:24:54 2015 -0500 Merge topic 'UseJava-relative-manifest' into next 56c11eee UseJava: Allow relative path to manifest file just as with other sources https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=56c11eee13604e163eb5a5d9092df405be0e9a5c commit 56c11eee13604e163eb5a5d9092df405be0e9a5c Author: Marc Chevrier AuthorDate: Thu Dec 3 12:35:37 2015 +0100 Commit: Brad King CommitDate: Thu Dec 3 09:24:26 2015 -0500 UseJava: Allow relative path to manifest file just as with other sources diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake index dced6ec..6146d78 100644 --- a/Modules/UseJava.cmake +++ b/Modules/UseJava.cmake @@ -444,7 +444,7 @@ function(add_jar _TARGET_NAME) if (_add_jar_MANIFEST) set(_MANIFEST_OPTION m) - set(_MANIFEST_VALUE ${_add_jar_MANIFEST}) + get_filename_component (_MANIFEST_VALUE "${_add_jar_MANIFEST}" ABSOLUTE) endif () if (LIBRARY_OUTPUT_PATH) ----------------------------------------------------------------------- Summary of changes: Modules/UseJava.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From chuck.atkins at kitware.com Thu Dec 3 10:25:12 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Thu, 3 Dec 2015 10:25:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1574-geb9afec Message-ID: <20151203152513.68E97DDD4D@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via eb9afec9bd9949e4a7fd26b95bf1b9a0eafcfe1e (commit) via 07b0b29d6cb38cec581c126b4e69fc10e8e48d1a (commit) from 4d1d9c62c5bb26fdf202e6fa5f302bee254ab77c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb9afec9bd9949e4a7fd26b95bf1b9a0eafcfe1e commit eb9afec9bd9949e4a7fd26b95bf1b9a0eafcfe1e Merge: 4d1d9c6 07b0b29 Author: Chuck Atkins AuthorDate: Thu Dec 3 10:25:10 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 3 10:25:10 2015 -0500 Merge topic 'detect-compiler-wrappers' into next 07b0b29d Wrappers: remove generic case https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07b0b29d6cb38cec581c126b4e69fc10e8e48d1a commit 07b0b29d6cb38cec581c126b4e69fc10e8e48d1a Author: Chuck Atkins AuthorDate: Thu Dec 3 10:24:33 2015 -0500 Commit: Chuck Atkins CommitDate: Thu Dec 3 10:24:33 2015 -0500 Wrappers: remove generic case diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index c204c77..5c3705c 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -70,9 +70,6 @@ if (CMAKE_C_COMPILER_WRAPPER) if (NOT _INCLUDED_WRAPPER_FILE) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) endif () - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER} OPTIONAL) - endif () endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index cd706f4..cbcd0df 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -69,9 +69,6 @@ if (CMAKE_CXX_COMPILER_WRAPPER) if (NOT _INCLUDED_WRAPPER_FILE) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) endif () - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER} OPTIONAL) - endif () endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 110eec2..84ece04 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -46,9 +46,6 @@ if (CMAKE_Fortran_COMPILER_WRAPPER) if (NOT _INCLUDED_WRAPPER_FILE) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) endif () - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER} OPTIONAL) - endif () endif () # We specify the compiler information in the system file for some ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCInformation.cmake | 3 --- Modules/CMakeCXXInformation.cmake | 3 --- Modules/CMakeFortranInformation.cmake | 3 --- 3 files changed, 9 deletions(-) hooks/post-receive -- CMake From chuck.atkins at kitware.com Thu Dec 3 10:25:46 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Thu, 3 Dec 2015 10:25:46 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1576-g97739fa Message-ID: <20151203152547.D2408DC373@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 97739fa35a165782eba503845a14f3eb769b0338 (commit) via 8003ff4f85df29213becc0ac3d45ffa8b592bf75 (commit) from eb9afec9bd9949e4a7fd26b95bf1b9a0eafcfe1e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=97739fa35a165782eba503845a14f3eb769b0338 commit 97739fa35a165782eba503845a14f3eb769b0338 Merge: eb9afec 8003ff4 Author: Chuck Atkins AuthorDate: Thu Dec 3 10:25:46 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 3 10:25:46 2015 -0500 Merge topic 'detect-compiler-wrappers' into next 8003ff4f Compiler: Add infrastructure for detecting compiler wrappers https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8003ff4f85df29213becc0ac3d45ffa8b592bf75 commit 8003ff4f85df29213becc0ac3d45ffa8b592bf75 Author: Chuck Atkins AuthorDate: Wed Dec 2 08:47:43 2015 -0600 Commit: Chuck Atkins CommitDate: Thu Dec 3 10:25:29 2015 -0500 Compiler: Add infrastructure for detecting compiler wrappers diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in index c72e338..f109a14 100644 --- a/Modules/CMakeCCompiler.cmake.in +++ b/Modules/CMakeCCompiler.cmake.in @@ -2,6 +2,7 @@ set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@") set(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@") set(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@") set(CMAKE_C_COMPILER_VERSION "@CMAKE_C_COMPILER_VERSION@") +set(CMAKE_C_COMPILER_WRAPPER "@CMAKE_C_COMPILER_WRAPPER@") set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "@CMAKE_C_STANDARD_COMPUTED_DEFAULT@") set(CMAKE_C_COMPILE_FEATURES "@CMAKE_C_COMPILE_FEATURES@") set(CMAKE_C90_COMPILE_FEATURES "@CMAKE_C90_COMPILE_FEATURES@") diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index d2417aa..5c3705c 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -60,6 +60,18 @@ if (NOT _INCLUDED_FILE) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) endif () + +# load any compiler-wrapper specific information +if (CMAKE_C_COMPILER_WRAPPER) + set(_INCLUDED_WRAPPER_FILE 0) + if (CMAKE_C_COMPILER_ID) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () +endif () + # We specify the compiler information in the system file for some # platforms, but this language may not have been enabled when the file # was first included. Include it again to get the language info. diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in index 52e44f6..9e90aea 100644 --- a/Modules/CMakeCXXCompiler.cmake.in +++ b/Modules/CMakeCXXCompiler.cmake.in @@ -2,6 +2,7 @@ set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@") set(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@") set(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@") set(CMAKE_CXX_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@") +set(CMAKE_CXX_COMPILER_WRAPPER "@CMAKE_CXX_COMPILER_WRAPPER@") set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "@CMAKE_CXX_STANDARD_COMPUTED_DEFAULT@") set(CMAKE_CXX_COMPILE_FEATURES "@CMAKE_CXX_COMPILE_FEATURES@") set(CMAKE_CXX98_COMPILE_FEATURES "@CMAKE_CXX98_COMPILE_FEATURES@") diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index 091627b..cbcd0df 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -59,6 +59,18 @@ if (NOT _INCLUDED_FILE) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) endif () + +# load any compiler-wrapper specific information +if (CMAKE_CXX_COMPILER_WRAPPER) + set(_INCLUDED_WRAPPER_FILE 0) + if (CMAKE_CXX_COMPILER_ID) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () +endif () + # We specify the compiler information in the system file for some # platforms, but this language may not have been enabled when the file # was first included. Include it again to get the language info. diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 81c2509..eb54814 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -107,6 +107,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) PARENT_SCOPE) set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) + set(CMAKE_${lang}_COMPILER_WRAPPER "${CMAKE_${lang}_COMPILER_WRAPPER}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE) set(CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT "${CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT}" PARENT_SCOPE) @@ -435,6 +436,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) set(HAVE_COMPILER_VERSION_MINOR 0) set(HAVE_COMPILER_VERSION_PATCH 0) set(HAVE_COMPILER_VERSION_TWEAK 0) + set(COMPILER_WRAPPER) set(DIGIT_VALUE_1 1) set(DIGIT_VALUE_2 10) set(DIGIT_VALUE_3 100) @@ -476,6 +478,9 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) endif() endforeach() endforeach() + if("${info}" MATCHES "INFO:compiler_wrapper\\[([^]\"]*)\\]") + set(COMPILER_WRAPPER "${CMAKE_MATCH_1}") + endif() if("${info}" MATCHES "INFO:simulate\\[([^]\"]*)\\]") set(SIMULATE_ID "${CMAKE_MATCH_1}") endif() @@ -588,6 +593,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) + set(CMAKE_${lang}_COMPILER_WRAPPER "${COMPILER_WRAPPER}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE) set(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE) diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in index 14fdd60..2a4bea4 100644 --- a/Modules/CMakeFortranCompiler.cmake.in +++ b/Modules/CMakeFortranCompiler.cmake.in @@ -2,6 +2,7 @@ set(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@") set(CMAKE_Fortran_COMPILER_ARG1 "@CMAKE_Fortran_COMPILER_ARG1@") set(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@") set(CMAKE_Fortran_COMPILER_VERSION "@CMAKE_Fortran_COMPILER_VERSION@") +set(CMAKE_Fortran_COMPILER_WRAPPER "@CMAKE_Fortran_COMPILER_WRAPPER@") set(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@") set(CMAKE_Fortran_SIMULATE_ID "@CMAKE_Fortran_SIMULATE_ID@") set(CMAKE_Fortran_SIMULATE_VERSION "@CMAKE_Fortran_SIMULATE_VERSION@") diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 79393d3..84ece04 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -36,6 +36,18 @@ if (NOT _INCLUDED_FILE) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) endif () + +# load any compiler-wrapper specific information +if (CMAKE_Fortran_COMPILER_WRAPPER) + set(_INCLUDED_WRAPPER_FILE 0) + if (CMAKE_Fortran_COMPILER_ID) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () +endif () + # We specify the compiler information in the system file for some # platforms, but this language may not have been enabled when the file # was first included. Include it again to get the language info. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From gjasny at googlemail.com Thu Dec 3 15:49:57 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Thu, 3 Dec 2015 15:49:57 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1578-g23b5ca6 Message-ID: <20151203204959.69CADDCF7B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 23b5ca6d7461f3c166a0ab826c456bc30a370452 (commit) via fc656fa4fe2926c7a50de91ff1b5564802ac4a7e (commit) from 97739fa35a165782eba503845a14f3eb769b0338 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23b5ca6d7461f3c166a0ab826c456bc30a370452 commit 23b5ca6d7461f3c166a0ab826c456bc30a370452 Merge: 97739fa fc656fa Author: Gregor Jasny AuthorDate: Thu Dec 3 15:49:54 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 3 15:49:54 2015 -0500 Merge topic 'regex-explorer' into next fc656fa4 cmake-gui: Add regex explorer window https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc656fa4fe2926c7a50de91ff1b5564802ac4a7e commit fc656fa4fe2926c7a50de91ff1b5564802ac4a7e Author: Gregor Jasny AuthorDate: Wed Nov 18 22:40:59 2015 +0100 Commit: Gregor Jasny CommitDate: Thu Dec 3 21:45:54 2015 +0100 cmake-gui: Add regex explorer window diff --git a/Help/release/dev/regex-explorer.rst b/Help/release/dev/regex-explorer.rst new file mode 100644 index 0000000..2147816 --- /dev/null +++ b/Help/release/dev/regex-explorer.rst @@ -0,0 +1,6 @@ +regex-explorer +-------------- + +* The Qt base CMake GUI got a Regular Expression Explorer which could be used to + create and evaluate regular expressions in real-time. The explorer window + is available via the ``Tools`` menu. diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 66fd18b..cad11f5 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -113,12 +113,15 @@ set(SRCS QCMakeCacheView.h QCMakeWidgets.cxx QCMakeWidgets.h + RegexExplorer.cxx + RegexExplorer.h ) QT4_WRAP_UI(UI_SRCS CMakeSetupDialog.ui Compilers.ui CrossCompiler.ui AddCacheEntry.ui + RegexExplorer.ui ) QT4_WRAP_CPP(MOC_SRCS AddCacheEntry.h @@ -128,6 +131,7 @@ QT4_WRAP_CPP(MOC_SRCS QCMake.h QCMakeCacheView.h QCMakeWidgets.h + RegexExplorer.h ) QT4_ADD_RESOURCES(RC_SRCS CMakeSetup.qrc) diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 748dd7d..2b12834 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -33,6 +33,7 @@ #include "QCMakeCacheView.h" #include "AddCacheEntry.h" #include "FirstConfigure.h" +#include "RegexExplorer.h" #include "cmSystemTools.h" #include "cmVersion.h" @@ -125,6 +126,9 @@ CMakeSetupDialog::CMakeSetupDialog() this, SLOT(doInstallForCommandLine())); #endif ToolsMenu->addSeparator(); + ToolsMenu->addAction(tr("Regular Expression Explorer..."), + this, SLOT(doRegexExplorerDialog())); + ToolsMenu->addSeparator(); ToolsMenu->addAction(tr("&Find in Output..."), this, SLOT(doOutputFindDialog()), QKeySequence::Find); @@ -1272,6 +1276,12 @@ void CMakeSetupDialog::doOutputFindDialog() } } +void CMakeSetupDialog::doRegexExplorerDialog() +{ + RegexExplorer dialog(this); + dialog.exec(); +} + void CMakeSetupDialog::doOutputFindPrev() { doOutputFindNext(false); diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h index 1b26c64..bfd2bc9 100644 --- a/Source/QtDialog/CMakeSetupDialog.h +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -82,6 +82,7 @@ protected slots: void doOutputFindNext(bool directionForward = true); void doOutputFindPrev(); void doOutputErrorNext(); + void doRegexExplorerDialog(); protected: diff --git a/Source/QtDialog/RegexExplorer.cxx b/Source/QtDialog/RegexExplorer.cxx new file mode 100644 index 0000000..dfcf048 --- /dev/null +++ b/Source/QtDialog/RegexExplorer.cxx @@ -0,0 +1,166 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2015 Kitware, Inc., Gregor Jasny + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#include "RegexExplorer.h" + +RegexExplorer::RegexExplorer(QWidget* p) : QDialog(p), m_matched(false) +{ + this->setupUi(this); + + for(int i = 1; i < cmsys::RegularExpression::NSUBEXP; ++i) + { + matchNumber->addItem( + QString("Match %1").arg(QString::number(i)), + QVariant(i)); + } + matchNumber->setCurrentIndex(0); +} + +void RegexExplorer::setStatusColor(QWidget* widget, bool successful) +{ + QColor color = successful ? QColor(0, 127, 0) : Qt::red; + + QPalette palette = widget->palette(); + palette.setColor(QPalette::Foreground, color); + widget->setPalette(palette); +} + +void RegexExplorer::on_regularExpression_textChanged(const QString& text) +{ +#ifdef QT_NO_STL + m_regex = text.toAscii().constData(); +#else + m_regex = text.toStdString(); +#endif + + bool validExpression = + stripEscapes(m_regex) && m_regexParser.compile(m_regex); + if(!validExpression) + { + m_regexParser.set_invalid(); + } + + setStatusColor(labelRegexValid, validExpression); + + on_inputText_textChanged(); +} + +void RegexExplorer::on_inputText_textChanged() +{ + if(m_regexParser.is_valid()) + { + QString plainText = inputText->toPlainText(); +#ifdef QT_NO_STL + m_text = plainText.toAscii().constData(); +#else + m_text = plainText.toStdString(); +#endif + m_matched = m_regexParser.find(m_text); + } + else + { + m_matched = false; + } + + setStatusColor(labelRegexMatch, m_matched); + + if(!m_matched) + { + clearMatch(); + return; + } + +#ifdef QT_NO_STL + QString matchText = m_regexParser.match(0).c_str(); +#else + QString matchText = QString::fromStdString(m_regexParser.match(0)); +#endif + match0->setPlainText(matchText); + + on_matchNumber_currentIndexChanged(matchNumber->currentIndex()); +} + +void RegexExplorer::on_matchNumber_currentIndexChanged(int index) +{ + if(!m_matched) + { + return; + } + + QVariant itemData = matchNumber->itemData(index); + int idx = itemData.toInt(); + + if(idx < 1 || idx >= cmsys::RegularExpression::NSUBEXP) + { + return; + } + +#ifdef QT_NO_STL + QString match = m_regexParser.match(idx).c_str(); +#else + QString match = QString::fromStdString(m_regexParser.match(idx)); +#endif + matchN->setPlainText(match); +} + +void RegexExplorer::clearMatch() +{ + match0->clear(); + matchN->clear(); +} + +bool RegexExplorer::stripEscapes(std::string& source) +{ + const char* in = source.c_str(); + + std::string result; + result.reserve(source.size()); + + for(char inc = *in; inc != '\0'; inc = *++in) + { + if(inc == '\\') + { + char nextc = in[1]; + if(nextc == 't') + { + result.append(1, '\t'); + in++; + } + else if(nextc == 'n') + { + result.append(1, '\n'); + in++; + } + else if(nextc == 't') + { + result.append(1, '\t'); + in++; + } + else if(isalnum(nextc) || nextc == '\0') + { + return false; + } + else + { + result.append(1, nextc); + in++; + } + } + else + { + result.append(1, inc); + } + } + + source = result; + return true; +} diff --git a/Source/QtDialog/RegexExplorer.h b/Source/QtDialog/RegexExplorer.h new file mode 100644 index 0000000..2ac9c3e --- /dev/null +++ b/Source/QtDialog/RegexExplorer.h @@ -0,0 +1,48 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2015 Kitware, Inc., Gregor Jasny + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#ifndef RegexExplorer_h +#define RegexExplorer_h + +#include +#include +#include + +#include "ui_RegexExplorer.h" + +class QString; +class QWidget; + +class RegexExplorer : public QDialog, public Ui::RegexExplorer +{ + Q_OBJECT +public: + RegexExplorer(QWidget* p); + +private slots: + void on_regularExpression_textChanged(const QString& text); + void on_inputText_textChanged(); + void on_matchNumber_currentIndexChanged(int index); + +private: + static void setStatusColor(QWidget* widget, bool successful); + static bool stripEscapes(std::string& regex); + + void clearMatch(); + + cmsys::RegularExpression m_regexParser; + std::string m_text; + std::string m_regex; + bool m_matched; +}; + +#endif diff --git a/Source/QtDialog/RegexExplorer.ui b/Source/QtDialog/RegexExplorer.ui new file mode 100644 index 0000000..2c2d761 --- /dev/null +++ b/Source/QtDialog/RegexExplorer.ui @@ -0,0 +1,155 @@ + + + RegexExplorer + + + + 0 + 0 + 639 + 555 + + + + Regular Expression Explorer + + + + + + Input Text + + + + + + + + + + + + Regular Expression + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + Valid + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + Match + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + Complete Match + + + + + + + true + + + + + + + + + false + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + true + + + + + + + + ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From johnstonj.public at codenest.com Thu Dec 3 16:39:50 2015 From: johnstonj.public at codenest.com (James Johnston) Date: Thu, 3 Dec 2015 16:39:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1585-g26d765c Message-ID: <20151203214000.9DC92C4810@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 26d765cf6b6c6a08b03b8643cd7b408dc29a373b (commit) via 7a3277276e69c92d0f69674cdc27bae11bcbc14f (commit) via 25211d756fad353e96d29e289d40d780a5341c92 (commit) via 060442c2e866c44ecf0c479e49e1d5ae35e8c6fb (commit) via f3b3219c9687e54a83dc7e5dabb0afc4637bb799 (commit) via ddbda72288f022fa558d8253c8894687634448c1 (commit) via 4ffeab0e3c451854a4a9d424b47b2179c6cf6c6b (commit) from 23b5ca6d7461f3c166a0ab826c456bc30a370452 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=26d765cf6b6c6a08b03b8643cd7b408dc29a373b commit 26d765cf6b6c6a08b03b8643cd7b408dc29a373b Merge: 23b5ca6 7a32772 Author: James Johnston AuthorDate: Thu Dec 3 16:39:47 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 3 16:39:47 2015 -0500 Merge topic 'improve-embarcadero' into next 7a327727 Embarcadero: Fix erroneous interpretation of __CODEGEARC_VERSION__. 25211d75 Compiler ID: Compiler versions must be a valid, numeric version string. 060442c2 Embarcadero: Check code using CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID. f3b3219c Embarcadero/Watcom: Properly skip VSResource test for other generators. ddbda722 Embarcadero: Fix bug where duplicate Ninja job pools would be created. 4ffeab0e CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a3277276e69c92d0f69674cdc27bae11bcbc14f commit 7a3277276e69c92d0f69674cdc27bae11bcbc14f Author: James Johnston AuthorDate: Thu Dec 3 21:24:56 2015 +0000 Commit: James Johnston CommitDate: Thu Dec 3 21:37:08 2015 +0000 Embarcadero: Fix erroneous interpretation of __CODEGEARC_VERSION__. As per the following link: http://docwiki.embarcadero.com/RADStudio/Seattle/en/Example_of_CODEGEARC_VERSION_Macro The major/minor versions must be decoded as a hex string, while the patch version must be decoded as a normal decimal string. As an example, C++ Builder XE 8.1's bcc32.exe sets this macro to 0x070189C9. The file version of bcc32.exe is 7.1.5570.35273. Therefore, the correct interpretation to COMPILER_VERSION would be 7.1.35273. diff --git a/Modules/Compiler/Embarcadero-DetermineCompiler.cmake b/Modules/Compiler/Embarcadero-DetermineCompiler.cmake index 2feedac..8375624 100644 --- a/Modules/Compiler/Embarcadero-DetermineCompiler.cmake +++ b/Modules/Compiler/Embarcadero-DetermineCompiler.cmake @@ -4,4 +4,4 @@ set(_compiler_id_pp_test "defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__ set(_compiler_id_version_compute " # define @PREFIX at COMPILER_VERSION_MAJOR @MACRO_HEX@(__CODEGEARC_VERSION__>>24 & 0x00FF) # define @PREFIX at COMPILER_VERSION_MINOR @MACRO_HEX@(__CODEGEARC_VERSION__>>16 & 0x00FF) -# define @PREFIX at COMPILER_VERSION_PATCH @MACRO_HEX@(__CODEGEARC_VERSION__ & 0xFFFF)") +# define @PREFIX at COMPILER_VERSION_PATCH @MACRO_DEC@(__CODEGEARC_VERSION__ & 0xFFFF)") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=25211d756fad353e96d29e289d40d780a5341c92 commit 25211d756fad353e96d29e289d40d780a5341c92 Author: James Johnston AuthorDate: Thu Dec 3 21:17:26 2015 +0000 Commit: James Johnston CommitDate: Thu Dec 3 21:37:07 2015 +0000 Compiler ID: Compiler versions must be a valid, numeric version string. This test helps catch errors in compiler identification. diff --git a/Tests/CMakeOnly/CompilerIdC/CMakeLists.txt b/Tests/CMakeOnly/CompilerIdC/CMakeLists.txt index 848ffdd..6fea73e 100644 --- a/Tests/CMakeOnly/CompilerIdC/CMakeLists.txt +++ b/Tests/CMakeOnly/CompilerIdC/CMakeLists.txt @@ -12,3 +12,10 @@ foreach(v message(SEND_ERROR "${v} not set!") endif() endforeach() + +# Version numbers may only contain numbers and periods. +if(NOT CMAKE_C_COMPILER_VERSION MATCHES + "^([0-9]+)(\\.([0-9]+))?(\\.([0-9]+))?(\\.([0-9]+))?$" + ) + message(SEND_ERROR "Compiler version is not numeric!") +endif() diff --git a/Tests/CMakeOnly/CompilerIdCXX/CMakeLists.txt b/Tests/CMakeOnly/CompilerIdCXX/CMakeLists.txt index 94ac31e..05e6bb2 100644 --- a/Tests/CMakeOnly/CompilerIdCXX/CMakeLists.txt +++ b/Tests/CMakeOnly/CompilerIdCXX/CMakeLists.txt @@ -12,3 +12,10 @@ foreach(v message(SEND_ERROR "${v} not set!") endif() endforeach() + +# Version numbers may only contain numbers and periods. +if(NOT CMAKE_CXX_COMPILER_VERSION MATCHES + "^([0-9]+)(\\.([0-9]+))?(\\.([0-9]+))?(\\.([0-9]+))?$" + ) + message(SEND_ERROR "Compiler version is not numeric!") +endif() diff --git a/Tests/CMakeOnly/CompilerIdFortran/CMakeLists.txt b/Tests/CMakeOnly/CompilerIdFortran/CMakeLists.txt index 02e4668..067fb8c 100644 --- a/Tests/CMakeOnly/CompilerIdFortran/CMakeLists.txt +++ b/Tests/CMakeOnly/CompilerIdFortran/CMakeLists.txt @@ -12,3 +12,10 @@ foreach(v message(SEND_ERROR "${v} not set!") endif() endforeach() + +# Version numbers may only contain numbers and periods. +if(NOT CMAKE_Fortran_COMPILER_VERSION MATCHES + "^([0-9]+)(\\.([0-9]+))?(\\.([0-9]+))?(\\.([0-9]+))?$" + ) + message(SEND_ERROR "Compiler version is not numeric!") +endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=060442c2e866c44ecf0c479e49e1d5ae35e8c6fb commit 060442c2e866c44ecf0c479e49e1d5ae35e8c6fb Author: James Johnston AuthorDate: Thu Dec 3 20:42:30 2015 +0000 Commit: James Johnston CommitDate: Thu Dec 3 21:37:06 2015 +0000 Embarcadero: Check code using CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID. The CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID variables are set to "Borland" for older versions of the compiler. Newer CodeGear/Embarcadero compilers will have those variables set to "Embarcadero". Search for lines of code referencing both the variable name and Borland to be sure that they also refer to Embarcadero. diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 8205425..4f4efbc 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -230,7 +230,11 @@ macro(_test_compiler_hidden_visibility) endmacro() macro(_test_compiler_has_deprecated) + # NOTE: Some Embarcadero compilers silently compile __declspec(deprecated) + # without error, but this is not a documented feature and the attribute does + # not actually generate any warnings. if(CMAKE_CXX_COMPILER_ID MATCHES Borland + OR CMAKE_CXX_COMPILER_ID MATCHES Embarcadero OR CMAKE_CXX_COMPILER_ID MATCHES HP OR GCC_TOO_OLD OR CMAKE_CXX_COMPILER_ID MATCHES PGI diff --git a/Tests/CompileOptions/CMakeLists.txt b/Tests/CompileOptions/CMakeLists.txt index 05a5f82..692e0de 100644 --- a/Tests/CompileOptions/CMakeLists.txt +++ b/Tests/CompileOptions/CMakeLists.txt @@ -22,7 +22,7 @@ set_property(TARGET CompileOptions PROPERTY COMPILE_OPTIONS ${cxx_tests} ) -if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|Borland") +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|Borland|Embarcadero") set_property(TARGET CompileOptions APPEND PROPERTY COMPILE_OPTIONS "-DTEST_OCTOTHORPE=\"#\"" ) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f3b3219c9687e54a83dc7e5dabb0afc4637bb799 commit f3b3219c9687e54a83dc7e5dabb0afc4637bb799 Author: James Johnston AuthorDate: Thu Dec 3 19:36:13 2015 +0000 Commit: James Johnston CommitDate: Thu Dec 3 21:37:06 2015 +0000 Embarcadero/Watcom: Properly skip VSResource test for other generators. This test should be skipped based on the chosen compiler, not the chosen generator. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 5fd7159..06eb629 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -269,8 +269,7 @@ if(BUILD_TESTING) set(TEST_RESOURCES TRUE) endif() # for borland and watcom there is no resource support - if("${CMAKE_GENERATOR}" MATCHES "WMake" OR - "${CMAKE_GENERATOR}" MATCHES "Borland") + if(WATCOM OR BORLAND) set(TEST_RESOURCES FALSE) endif() if(TEST_RESOURCES) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ddbda72288f022fa558d8253c8894687634448c1 commit ddbda72288f022fa558d8253c8894687634448c1 Author: James Johnston AuthorDate: Thu Dec 3 19:10:19 2015 +0000 Commit: James Johnston CommitDate: Thu Dec 3 19:10:19 2015 +0000 Embarcadero: Fix bug where duplicate Ninja job pools would be created. If the platform file was included multiple times, it was possible that duplicate Ninja job pools would be created. diff --git a/Modules/Platform/Windows-Embarcadero.cmake b/Modules/Platform/Windows-Embarcadero.cmake index 5295a48..102e3a6 100644 --- a/Modules/Platform/Windows-Embarcadero.cmake +++ b/Modules/Platform/Windows-Embarcadero.cmake @@ -78,7 +78,11 @@ set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_SHARED_LINKER_FLAGS_R # invocations within a single working directory. if(NOT DEFINED CMAKE_JOB_POOL_LINK) set(CMAKE_JOB_POOL_LINK BCC32LinkPool) - set_property(GLOBAL APPEND PROPERTY JOB_POOLS BCC32LinkPool=1) + get_property(_bccjp GLOBAL PROPERTY JOB_POOLS) + if(NOT _bccjp MATCHES "BCC32LinkPool=") + set_property(GLOBAL APPEND PROPERTY JOB_POOLS BCC32LinkPool=1) + endif() + unset(_bccjp) endif() macro(__embarcadero_language lang) ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Embarcadero-DetermineCompiler.cmake | 2 +- Modules/GenerateExportHeader.cmake | 4 ++++ Modules/Platform/Windows-Embarcadero.cmake | 6 +++++- Source/CMakeVersion.cmake | 2 +- Tests/CMakeLists.txt | 3 +-- Tests/CMakeOnly/CompilerIdC/CMakeLists.txt | 7 +++++++ Tests/CMakeOnly/CompilerIdCXX/CMakeLists.txt | 7 +++++++ Tests/CMakeOnly/CompilerIdFortran/CMakeLists.txt | 7 +++++++ Tests/CompileOptions/CMakeLists.txt | 2 +- 9 files changed, 34 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From rleigh at codelibre.net Thu Dec 3 19:08:47 2015 From: rleigh at codelibre.net (Roger Leigh) Date: Thu, 3 Dec 2015 19:08:47 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1588-g203efca Message-ID: <20151204000848.6D846DE254@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 203efca5072f27271f5403f0188afc0bb0df767a (commit) via 09f36344eaa6adee6a238ae1320d57352eaee8f0 (commit) via a237b26d6c9821464856db283e0f83152409465b (commit) from 26d765cf6b6c6a08b03b8643cd7b408dc29a373b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=203efca5072f27271f5403f0188afc0bb0df767a commit 203efca5072f27271f5403f0188afc0bb0df767a Merge: 26d765c 09f3634 Author: Roger Leigh AuthorDate: Thu Dec 3 19:08:42 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 3 19:08:42 2015 -0500 Merge topic 'tiff-imported-target' into next 09f36344 Help: Document addition of FindTIFF imported targets a237b26d FindTIFF: Add imported targets and update documentation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=09f36344eaa6adee6a238ae1320d57352eaee8f0 commit 09f36344eaa6adee6a238ae1320d57352eaee8f0 Author: Roger Leigh AuthorDate: Thu Dec 3 23:46:44 2015 +0000 Commit: Roger Leigh CommitDate: Thu Dec 3 23:46:44 2015 +0000 Help: Document addition of FindTIFF imported targets diff --git a/Help/release/dev/FindTIFF-imported-targets.rst b/Help/release/dev/FindTIFF-imported-targets.rst new file mode 100644 index 0000000..f8bbc14 --- /dev/null +++ b/Help/release/dev/FindTIFF-imported-targets.rst @@ -0,0 +1,4 @@ +FindTIFF-imported-targets +------------------------- + +* The :module:`FindTIFF` module now provides imported targets. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a237b26d6c9821464856db283e0f83152409465b commit a237b26d6c9821464856db283e0f83152409465b Author: Roger Leigh AuthorDate: Wed Dec 2 17:20:24 2015 +0000 Commit: Roger Leigh CommitDate: Thu Dec 3 23:44:40 2015 +0000 FindTIFF: Add imported targets and update documentation - Add TIFF::TIFF imported target - Document imported target - Add testcase to test the standard variables and the imported target Also: - Add TIFF_INCLUDE_DIRS to match common practice - Update documentation generally, including documenting TIFF_INCLUDE_DIRS diff --git a/Modules/FindTIFF.cmake b/Modules/FindTIFF.cmake index ed092ea..e49a00d 100644 --- a/Modules/FindTIFF.cmake +++ b/Modules/FindTIFF.cmake @@ -2,24 +2,43 @@ # FindTIFF # -------- # -# Find TIFF library +# Find the TIFF library (libtiff). # -# Find the native TIFF includes and library This module defines +# Imported targets +# ^^^^^^^^^^^^^^^^ # -# :: +# This module defines the following :prop_tgt:`IMPORTED` targets: # -# TIFF_INCLUDE_DIR, where to find tiff.h, etc. -# TIFF_LIBRARIES, libraries to link against to use TIFF. -# TIFF_FOUND, If false, do not try to use TIFF. +# ``TIFF::TIFF`` +# The TIFF library, if found. # -# also defined, but not for general use are +# Result variables +# ^^^^^^^^^^^^^^^^ # -# :: +# This module will set the following variables in your project: # -# TIFF_LIBRARY, where to find the TIFF library. +# ``TIFF_FOUND`` +# true if the TIFF headers and libraries were found +# ``TIFF_INCLUDE_DIR`` +# the directory containing the TIFF headers +# ``TIFF_INCLUDE_DIRS`` +# the directory containing the TIFF headers +# ``TIFF_LIBRARIES`` +# TIFF libraries to be linked +# +# Cache variables +# ^^^^^^^^^^^^^^^ +# +# The following cache variables may also be set: +# +# ``TIFF_INCLUDE_DIR`` +# the directory containing the TIFF headers +# ``TIFF_LIBRARY`` +# the path to the TIFF library #============================================================================= # Copyright 2002-2009 Kitware, Inc. +# Copyright 2015 University of Dundee # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. @@ -65,7 +84,35 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF VERSION_VAR TIFF_VERSION_STRING) if(TIFF_FOUND) - set( TIFF_LIBRARIES ${TIFF_LIBRARY} ) + set(TIFF_LIBRARIES ${TIFF_LIBRARY}) + set(TIFF_INCLUDE_DIRS "${TIFF_INCLUDE_DIR}") + + if(NOT TARGET TIFF::TIFF) + add_library(TIFF::TIFF UNKNOWN IMPORTED) + if(TIFF_INCLUDE_DIRS) + set_target_properties(TIFF::TIFF PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${TIFF_INCLUDE_DIRS}") + endif() + if(EXISTS "${TIFF_LIBRARY}") + set_target_properties(TIFF::TIFF PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${TIFF_LIBRARY}") + endif() + if(EXISTS "${TIFF_LIBRARY_DEBUG}") + set_property(TARGET TIFF::TIFF APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(TIFF::TIFF PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" + IMPORTED_LOCATION_DEBUG "${TIFF_LIBRARY_DEBUG}") + endif() + if(EXISTS "${TIFF_LIBRARY_RELEASE}") + set_property(TARGET TIFF::TIFF APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(TIFF::TIFF PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${TIFF_LIBRARY_RELEASE}") + endif() + endif() endif() mark_as_advanced(TIFF_INCLUDE_DIR TIFF_LIBRARY) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 5fd7159..a040ec0 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1367,6 +1367,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release add_subdirectory(FindOpenSSL) endif() + if(CMake_TEST_FindTIFF) + add_subdirectory(FindTIFF) + endif() + if(CMake_TEST_FindXercesC) add_subdirectory(FindXercesC) endif() diff --git a/Tests/FindTIFF/CMakeLists.txt b/Tests/FindTIFF/CMakeLists.txt new file mode 100644 index 0000000..c4e0c6a --- /dev/null +++ b/Tests/FindTIFF/CMakeLists.txt @@ -0,0 +1,10 @@ +add_test(NAME FindTIFF.Test COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindTIFF/Test" + "${CMake_BINARY_DIR}/Tests/FindTIFF/Test" + ${build_generator_args} + --build-project TestFindTIFF + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) diff --git a/Tests/FindTIFF/Test/CMakeLists.txt b/Tests/FindTIFF/Test/CMakeLists.txt new file mode 100644 index 0000000..f17cda7 --- /dev/null +++ b/Tests/FindTIFF/Test/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.1) +project(TestFindTIFF C) +include(CTest) + +# CMake does not actually provide FindTIFF publicly. +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../Source/Modules) + +find_package(TIFF REQUIRED) + +add_executable(test_xercesc_tgt main.c) +target_link_libraries(test_xercesc_tgt TIFF::TIFF) +add_test(NAME test_xercesc_tgt COMMAND test_xercesc_tgt) + +add_executable(test_xercesc_var main.c) +target_include_directories(test_xercesc_var PRIVATE ${TIFF_INCLUDE_DIRS}) +target_link_libraries(test_xercesc_var PRIVATE ${TIFF_LIBRARIES}) +add_test(NAME test_xercesc_var COMMAND test_xercesc_var) diff --git a/Tests/FindTIFF/Test/main.c b/Tests/FindTIFF/Test/main.c new file mode 100644 index 0000000..fc4f337 --- /dev/null +++ b/Tests/FindTIFF/Test/main.c @@ -0,0 +1,12 @@ +#include +#include + +int main() +{ + /* Without any TIFF file to open, test that the call fails as + expected. This tests that linking worked. */ + TIFF *tiff = TIFFOpen("invalid.tiff", "r"); + assert(!tiff); + + return 0; +} ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindTIFF-imported-targets.rst | 4 ++ Modules/FindTIFF.cmake | 67 ++++++++++++++++++++---- Tests/CMakeLists.txt | 4 ++ Tests/{FindBoost => FindTIFF}/CMakeLists.txt | 8 +-- Tests/FindTIFF/Test/CMakeLists.txt | 17 ++++++ Tests/FindTIFF/Test/main.c | 12 +++++ 6 files changed, 98 insertions(+), 14 deletions(-) create mode 100644 Help/release/dev/FindTIFF-imported-targets.rst copy Tests/{FindBoost => FindTIFF}/CMakeLists.txt (54%) create mode 100644 Tests/FindTIFF/Test/CMakeLists.txt create mode 100644 Tests/FindTIFF/Test/main.c hooks/post-receive -- CMake From rleigh at codelibre.net Thu Dec 3 19:33:16 2015 From: rleigh at codelibre.net (Roger Leigh) Date: Thu, 3 Dec 2015 19:33:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1590-g28b3454 Message-ID: <20151204003316.41FA8DDDC0@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 28b34545ee7e2e8de7ef8f4dbac33ae28b9d6401 (commit) via d85228770a8062b40392e26a066954f6efd4f517 (commit) from 203efca5072f27271f5403f0188afc0bb0df767a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=28b34545ee7e2e8de7ef8f4dbac33ae28b9d6401 commit 28b34545ee7e2e8de7ef8f4dbac33ae28b9d6401 Merge: 203efca d852287 Author: Roger Leigh AuthorDate: Thu Dec 3 19:33:12 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 3 19:33:12 2015 -0500 Merge topic 'tiff-imported-target' into next d8522877 FindTIFF: Correct definition list indent https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d85228770a8062b40392e26a066954f6efd4f517 commit d85228770a8062b40392e26a066954f6efd4f517 Author: Roger Leigh AuthorDate: Fri Dec 4 00:32:32 2015 +0000 Commit: Roger Leigh CommitDate: Fri Dec 4 00:32:32 2015 +0000 FindTIFF: Correct definition list indent diff --git a/Modules/FindTIFF.cmake b/Modules/FindTIFF.cmake index e49a00d..e600498 100644 --- a/Modules/FindTIFF.cmake +++ b/Modules/FindTIFF.cmake @@ -34,7 +34,7 @@ # ``TIFF_INCLUDE_DIR`` # the directory containing the TIFF headers # ``TIFF_LIBRARY`` -# the path to the TIFF library +# the path to the TIFF library #============================================================================= # Copyright 2002-2009 Kitware, Inc. ----------------------------------------------------------------------- Summary of changes: Modules/FindTIFF.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 4 00:01:13 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 4 Dec 2015 00:01:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-615-g7410e2e Message-ID: <20151204050114.817F5DE21F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 7410e2ed61851385d0c06dd174a4782a54c44ab0 (commit) from 4ffeab0e3c451854a4a9d424b47b2179c6cf6c6b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7410e2ed61851385d0c06dd174a4782a54c44ab0 commit 7410e2ed61851385d0c06dd174a4782a54c44ab0 Author: Kitware Robot AuthorDate: Fri Dec 4 00:01:09 2015 -0500 Commit: Kitware Robot CommitDate: Fri Dec 4 00:01:09 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 141015d..81d33c2 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 4) -set(CMake_VERSION_PATCH 20151203) +set(CMake_VERSION_PATCH 20151204) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 4 09:28:31 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 4 Dec 2015 09:28:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1592-g11827db Message-ID: <20151204142840.8233DDDDB7@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 11827dbbe0052170df574bc23c9fee5ce7287e38 (commit) via 1897aba57b4471d06b54fbb178caf233a4bd6308 (commit) from 28b34545ee7e2e8de7ef8f4dbac33ae28b9d6401 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=11827dbbe0052170df574bc23c9fee5ce7287e38 commit 11827dbbe0052170df574bc23c9fee5ce7287e38 Merge: 28b3454 1897aba Author: Brad King AuthorDate: Fri Dec 4 09:28:24 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 09:28:24 2015 -0500 Merge topic 'FindJNI-aix' into next 1897aba5 fixup! FindJNI: Add support for AIX java sdk https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1897aba57b4471d06b54fbb178caf233a4bd6308 commit 1897aba57b4471d06b54fbb178caf233a4bd6308 Author: Brad King AuthorDate: Fri Dec 4 09:27:46 2015 -0500 Commit: Brad King CommitDate: Fri Dec 4 09:27:46 2015 -0500 fixup! FindJNI: Add support for AIX java sdk diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index 037764a..135038c 100644 --- a/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake @@ -272,6 +272,7 @@ find_path(JAVA_INCLUDE_PATH jni.h ) find_path(JAVA_INCLUDE_PATH2 NAMES jni_md.h jniport.h + PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH}/darwin ${JAVA_INCLUDE_PATH}/win32 ----------------------------------------------------------------------- Summary of changes: Modules/FindJNI.cmake | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 4 09:31:50 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 4 Dec 2015 09:31:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1594-g5cd4443 Message-ID: <20151204143151.7C55EDE298@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 5cd4443436fc33e6eea2dd81ce4575b4a41c7973 (commit) via 4d4fcabdfd9ceb02d947f6631370f6091e1ed337 (commit) from 11827dbbe0052170df574bc23c9fee5ce7287e38 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5cd4443436fc33e6eea2dd81ce4575b4a41c7973 commit 5cd4443436fc33e6eea2dd81ce4575b4a41c7973 Merge: 11827db 4d4fcab Author: Brad King AuthorDate: Fri Dec 4 09:31:48 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 09:31:48 2015 -0500 Merge topic 'FindJNI-aix' into next 4d4fcabd FindJNI: Add support for AIX java sdk https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d4fcabdfd9ceb02d947f6631370f6091e1ed337 commit 4d4fcabdfd9ceb02d947f6631370f6091e1ed337 Author: Marc Chevrier AuthorDate: Thu Dec 3 12:37:26 2015 +0100 Commit: Brad King CommitDate: Fri Dec 4 09:31:35 2015 -0500 FindJNI: Add support for AIX java sdk diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index cbe21d7..135038c 100644 --- a/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake @@ -63,7 +63,7 @@ macro(java_append_library_directories _var) elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64") set(_java_libarch "ppc64" "ppc") elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)") - set(_java_libarch "ppc") + set(_java_libarch "ppc" "ppc64") elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc") # Both flavours can run on the same processor set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "sparc" "sparcv9") @@ -271,7 +271,8 @@ find_path(JAVA_INCLUDE_PATH jni.h ${JAVA_AWT_INCLUDE_DIRECTORIES} ) -find_path(JAVA_INCLUDE_PATH2 jni_md.h +find_path(JAVA_INCLUDE_PATH2 NAMES jni_md.h jniport.h + PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH}/darwin ${JAVA_INCLUDE_PATH}/win32 @@ -281,6 +282,7 @@ find_path(JAVA_INCLUDE_PATH2 jni_md.h ${JAVA_INCLUDE_PATH}/solaris ${JAVA_INCLUDE_PATH}/hp-ux ${JAVA_INCLUDE_PATH}/alpha + ${JAVA_INCLUDE_PATH}/aix ) find_path(JAVA_AWT_INCLUDE_PATH jawt.h ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 4 09:54:12 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 4 Dec 2015 09:54:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-617-gd4767fc Message-ID: <20151204145412.624B7DDE33@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via d4767fca963e97ec2147a343e24ec366cc2646cb (commit) via e76ee2c006777e268715b39ad71f49e3d18b11a4 (commit) from 7410e2ed61851385d0c06dd174a4782a54c44ab0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4767fca963e97ec2147a343e24ec366cc2646cb commit d4767fca963e97ec2147a343e24ec366cc2646cb Merge: 7410e2e e76ee2c Author: Brad King AuthorDate: Fri Dec 4 09:54:09 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 09:54:09 2015 -0500 Merge topic 'ios-framework-resource-layout' e76ee2c0 iOS: Fix framework resource directory layout (#15848) ----------------------------------------------------------------------- Summary of changes: Help/prop_tgt/MACOSX_BUNDLE.rst | 2 +- Help/prop_tgt/MACOSX_RPATH.rst | 6 +- Help/prop_tgt/RESOURCE.rst | 66 +++++++++++++++++--- Source/cmGeneratorTarget.cxx | 6 +- Tests/RunCMake/Framework/FrameworkLayout.cmake | 10 ++- .../Framework/OSXFrameworkLayout-build-check.cmake | 17 ++++- Tests/RunCMake/Framework/foo.h | 1 + .../Framework/iOSFrameworkLayout-build-check.cmake | 17 ++++- .../hello.f => Tests/RunCMake/Framework/res.txt | 0 9 files changed, 108 insertions(+), 17 deletions(-) create mode 100644 Tests/RunCMake/Framework/foo.h copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/Framework/res.txt (100%) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 4 09:54:16 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 4 Dec 2015 09:54:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-624-g65dc417 Message-ID: <20151204145416.F3291DDE34@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 65dc4170f858d561144a3c79397f4d2822bae4b6 (commit) via d60cef773659d69ed2fce9b963d788ab422679b9 (commit) via 9fd987507622c585f4e0131678654e0643fd9a50 (commit) via 3f9b081f6ee85e0691c36496d989edbe8382589d (commit) via 01c80acdbdadf3811bc0a6cab0c28469a4e9f5b7 (commit) via 5183c6e5dd6ff2bbb5cce33a6f8b6b1d74dfe217 (commit) via 8a60e6961e84fc3177d2439fe6b2b5f972104cd9 (commit) from d4767fca963e97ec2147a343e24ec366cc2646cb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65dc4170f858d561144a3c79397f4d2822bae4b6 commit 65dc4170f858d561144a3c79397f4d2822bae4b6 Merge: d4767fc d60cef7 Author: Brad King AuthorDate: Fri Dec 4 09:54:13 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 09:54:13 2015 -0500 Merge topic 'FindBoost-imported-targets' d60cef77 Help: Add notes for topic 'FindBoost-imported-targets.rst' 9fd98750 Tests: Add FindBoost testcase for imported targets 3f9b081f FindBoost: Add imported targets 01c80acd FindBoost: Automatically add missing component dependencies 5183c6e5 FindBoost: Embed component dependency table 8a60e696 Utilities: Add BoostScanDeps script ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindBoost-imported-targets.rst | 5 + Modules/FindBoost.cmake | 386 +++++++++++++++++++++++ Tests/CMakeLists.txt | 4 + Tests/{FindJsonCpp => FindBoost}/CMakeLists.txt | 8 +- Tests/FindBoost/Test/CMakeLists.txt | 18 ++ Tests/FindBoost/Test/main.cxx | 26 ++ Utilities/Scripts/BoostScanDeps.cmake | 217 +++++++++++++ 7 files changed, 660 insertions(+), 4 deletions(-) create mode 100644 Help/release/dev/FindBoost-imported-targets.rst copy Tests/{FindJsonCpp => FindBoost}/CMakeLists.txt (53%) create mode 100644 Tests/FindBoost/Test/CMakeLists.txt create mode 100644 Tests/FindBoost/Test/main.cxx create mode 100644 Utilities/Scripts/BoostScanDeps.cmake hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 4 09:54:20 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 4 Dec 2015 09:54:20 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-630-g5875801 Message-ID: <20151204145422.28D47DDE55@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 5875801293ae1ba09b15cdc22902ee7766416de5 (commit) via 7a3277276e69c92d0f69674cdc27bae11bcbc14f (commit) via 25211d756fad353e96d29e289d40d780a5341c92 (commit) via 060442c2e866c44ecf0c479e49e1d5ae35e8c6fb (commit) via f3b3219c9687e54a83dc7e5dabb0afc4637bb799 (commit) via ddbda72288f022fa558d8253c8894687634448c1 (commit) from 65dc4170f858d561144a3c79397f4d2822bae4b6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5875801293ae1ba09b15cdc22902ee7766416de5 commit 5875801293ae1ba09b15cdc22902ee7766416de5 Merge: 65dc417 7a32772 Author: Brad King AuthorDate: Fri Dec 4 09:54:18 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 09:54:18 2015 -0500 Merge topic 'improve-embarcadero' 7a327727 Embarcadero: Fix erroneous interpretation of __CODEGEARC_VERSION__. 25211d75 Compiler ID: Compiler versions must be a valid, numeric version string. 060442c2 Embarcadero: Check code using CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID. f3b3219c Embarcadero/Watcom: Properly skip VSResource test for other generators. ddbda722 Embarcadero: Fix bug where duplicate Ninja job pools would be created. ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Embarcadero-DetermineCompiler.cmake | 2 +- Modules/GenerateExportHeader.cmake | 4 ++++ Modules/Platform/Windows-Embarcadero.cmake | 6 +++++- Tests/CMakeLists.txt | 3 +-- Tests/CMakeOnly/CompilerIdC/CMakeLists.txt | 7 +++++++ Tests/CMakeOnly/CompilerIdCXX/CMakeLists.txt | 7 +++++++ Tests/CMakeOnly/CompilerIdFortran/CMakeLists.txt | 7 +++++++ Tests/CompileOptions/CMakeLists.txt | 2 +- 8 files changed, 33 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 4 09:54:26 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 4 Dec 2015 09:54:26 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-632-ge069aa0 Message-ID: <20151204145427.3E3B8DDE55@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via e069aa05c6a0d8e89a677fa4f00d33432191eeaa (commit) via fc656fa4fe2926c7a50de91ff1b5564802ac4a7e (commit) from 5875801293ae1ba09b15cdc22902ee7766416de5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e069aa05c6a0d8e89a677fa4f00d33432191eeaa commit e069aa05c6a0d8e89a677fa4f00d33432191eeaa Merge: 5875801 fc656fa Author: Brad King AuthorDate: Fri Dec 4 09:54:23 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 09:54:23 2015 -0500 Merge topic 'regex-explorer' fc656fa4 cmake-gui: Add regex explorer window ----------------------------------------------------------------------- Summary of changes: Help/release/dev/regex-explorer.rst | 6 ++ Source/QtDialog/CMakeLists.txt | 4 + Source/QtDialog/CMakeSetupDialog.cxx | 10 ++ Source/QtDialog/CMakeSetupDialog.h | 1 + Source/QtDialog/RegexExplorer.cxx | 166 ++++++++++++++++++++++++++++++++++ Source/QtDialog/RegexExplorer.h | 48 ++++++++++ Source/QtDialog/RegexExplorer.ui | 155 +++++++++++++++++++++++++++++++ 7 files changed, 390 insertions(+) create mode 100644 Help/release/dev/regex-explorer.rst create mode 100644 Source/QtDialog/RegexExplorer.cxx create mode 100644 Source/QtDialog/RegexExplorer.h create mode 100644 Source/QtDialog/RegexExplorer.ui hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 4 09:54:50 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 4 Dec 2015 09:54:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1600-g64adca5 Message-ID: <20151204145451.0C2B1DDE4E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 64adca56d7c4657c1aa20b11adee703ea9a003a6 (commit) via e069aa05c6a0d8e89a677fa4f00d33432191eeaa (commit) via 5875801293ae1ba09b15cdc22902ee7766416de5 (commit) via 65dc4170f858d561144a3c79397f4d2822bae4b6 (commit) via d4767fca963e97ec2147a343e24ec366cc2646cb (commit) via 7410e2ed61851385d0c06dd174a4782a54c44ab0 (commit) from 5cd4443436fc33e6eea2dd81ce4575b4a41c7973 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=64adca56d7c4657c1aa20b11adee703ea9a003a6 commit 64adca56d7c4657c1aa20b11adee703ea9a003a6 Merge: 5cd4443 e069aa0 Author: Brad King AuthorDate: Fri Dec 4 09:54:41 2015 -0500 Commit: Brad King CommitDate: Fri Dec 4 09:54:41 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 4 10:03:13 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 4 Dec 2015 10:03:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1603-g92f8b11 Message-ID: <20151204150313.25BE0DE445@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 92f8b11450f00cf4e71a1bd42e55cc46a1dfb398 (commit) via 306e2016bb3e285fcfb58e0f17657dc228b67812 (commit) via d5d90f5ec8792fafbe754e2c943825267f7aaff1 (commit) from 64adca56d7c4657c1aa20b11adee703ea9a003a6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92f8b11450f00cf4e71a1bd42e55cc46a1dfb398 commit 92f8b11450f00cf4e71a1bd42e55cc46a1dfb398 Merge: 64adca5 306e201 Author: Brad King AuthorDate: Fri Dec 4 10:03:12 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 10:03:12 2015 -0500 Merge topic 'update-kwsys' into next 306e2016 Merge branch 'upstream-kwsys' into update-kwsys d5d90f5e KWSys 2015-12-03 (6bfc1aef) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=306e2016bb3e285fcfb58e0f17657dc228b67812 commit 306e2016bb3e285fcfb58e0f17657dc228b67812 Merge: e069aa0 d5d90f5 Author: Brad King AuthorDate: Fri Dec 4 09:59:04 2015 -0500 Commit: Brad King CommitDate: Fri Dec 4 09:59:04 2015 -0500 Merge branch 'upstream-kwsys' into update-kwsys https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5d90f5ec8792fafbe754e2c943825267f7aaff1 commit d5d90f5ec8792fafbe754e2c943825267f7aaff1 Author: KWSys Robot AuthorDate: Thu Dec 3 19:19:37 2015 +0100 Commit: Brad King CommitDate: Fri Dec 4 09:58:59 2015 -0500 KWSys 2015-12-03 (6bfc1aef) Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ 6bfc1aef | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' 9596e98d..6bfc1aef Rolf Eike Beer (6): 9e9c8ae3 SystemTools: extend test coverage of SystemTools::MakeDirectory() 3f3d9eb5 SystemTools: add basic tests for SystemTools::FindFile() 9ca5f108 SystemTools: entirely remove the extension code on non-Windows platforms 29f82f78 SystemTools: avoid needless copy of std::string ac667cdc SystemTools: remove 2 more explicit calls to FileIsDirectory() 6bfc1aef SystemTools: do not call FileExists() before calling FileIsDirectory() diff --git a/SystemTools.cxx b/SystemTools.cxx index 37fe421..82087f0 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -2402,8 +2402,7 @@ bool SystemTools::CopyFileAlways(const std::string& source, const std::string& d // name as the source in that directory. std::string destination_dir; - if(SystemTools::FileExists(destination) && - SystemTools::FileIsDirectory(destination)) + if(SystemTools::FileIsDirectory(destination)) { destination_dir = real_destination; SystemTools::ConvertToUnixSlashes(real_destination); @@ -2969,19 +2968,14 @@ std::string SystemTools::FindProgram( const std::vector& userPaths, bool no_system_path) { - std::vector extensions; std::string tryPath; #if defined (_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) - bool hasExtension = false; + std::vector extensions; // check to see if the name already has a .xxx at // the end of it - if(name.size() > 3 && name[name.size()-4] == '.') - { - hasExtension = true; - } // on windows try .com then .exe - if(!hasExtension) + if(name.size() <= 3 || name[name.size()-4] != '.') { extensions.push_back(".com"); extensions.push_back(".exe"); @@ -2992,8 +2986,7 @@ std::string SystemTools::FindProgram( { tryPath = name; tryPath += *i; - if(SystemTools::FileExists(tryPath) && - !SystemTools::FileIsDirectory(tryPath)) + if(SystemTools::FileExists(tryPath, true)) { return SystemTools::CollapseFullPath(tryPath); } @@ -3002,11 +2995,9 @@ std::string SystemTools::FindProgram( #endif // now try just the name - tryPath = name; - if(SystemTools::FileExists(tryPath) && - !SystemTools::FileIsDirectory(tryPath)) + if(SystemTools::FileExists(name, true)) { - return SystemTools::CollapseFullPath(tryPath); + return SystemTools::CollapseFullPath(name); } // now construct the path std::vector path; @@ -3043,6 +3034,7 @@ std::string SystemTools::FindProgram( // Remove double quotes from the path on windows SystemTools::ReplaceString(*p, "\"", ""); #endif +#if defined (_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) // first try with extensions for(std::vector::iterator ext = extensions.begin(); ext != extensions.end(); ++ext) @@ -3055,6 +3047,7 @@ std::string SystemTools::FindProgram( return SystemTools::CollapseFullPath(tryPath); } } +#endif // now try it without them tryPath = *p; tryPath += name; @@ -3133,8 +3126,7 @@ std::string SystemTools tryPath = *p; tryPath += name; tryPath += ".framework"; - if(SystemTools::FileExists(tryPath) - && SystemTools::FileIsDirectory(tryPath)) + if(SystemTools::FileIsDirectory(tryPath)) { return SystemTools::CollapseFullPath(tryPath); } diff --git a/testSystemTools.cxx b/testSystemTools.cxx index a0f904f..4d97688 100644 --- a/testSystemTools.cxx +++ b/testSystemTools.cxx @@ -172,6 +172,63 @@ static bool CheckFileOperations() << testNewDir << std::endl; res = false; } + // calling it again should just return true + if (!kwsys::SystemTools::MakeDirectory(testNewDir)) + { + std::cerr + << "Problem with second call to MakeDirectory for: " + << testNewDir << std::endl; + res = false; + } + // calling with 0 pointer should return false + if (kwsys::SystemTools::MakeDirectory(0)) + { + std::cerr + << "Problem with MakeDirectory(0)" + << std::endl; + res = false; + } + // calling with an empty string should return false + if (kwsys::SystemTools::MakeDirectory(std::string())) + { + std::cerr + << "Problem with MakeDirectory(std::string())" + << std::endl; + res = false; + } + // check existence + if (!kwsys::SystemTools::FileExists(testNewDir.c_str(), false)) + { + std::cerr + << "Problem with FileExists as C string and not file for: " + << testNewDir << std::endl; + res = false; + } + // remove it + if (!kwsys::SystemTools::RemoveADirectory(testNewDir)) + { + std::cerr + << "Problem with RemoveADirectory for: " + << testNewDir << std::endl; + res = false; + } + // check existence + if (kwsys::SystemTools::FileExists(testNewDir.c_str(), false)) + { + std::cerr + << "After RemoveADirectory: " + << "Problem with FileExists as C string and not file for: " + << testNewDir << std::endl; + res = false; + } + // create it using the char* version + if (!kwsys::SystemTools::MakeDirectory(testNewDir.c_str())) + { + std::cerr + << "Problem with second call to MakeDirectory as C string for: " + << testNewDir << std::endl; + res = false; + } if (!kwsys::SystemTools::Touch(testNewFile.c_str(), true)) { @@ -180,6 +237,97 @@ static bool CheckFileOperations() << testNewFile << std::endl; res = false; } + // calling MakeDirectory with something that is no file should fail + if (kwsys::SystemTools::MakeDirectory(testNewFile)) + { + std::cerr + << "Problem with to MakeDirectory for: " + << testNewFile << std::endl; + res = false; + } + + // calling with 0 pointer should return false + if (kwsys::SystemTools::FileExists(0)) + { + std::cerr + << "Problem with FileExists(0)" + << std::endl; + res = false; + } + if (kwsys::SystemTools::FileExists(0, true)) + { + std::cerr + << "Problem with FileExists(0) as file" + << std::endl; + res = false; + } + // calling with an empty string should return false + if (kwsys::SystemTools::FileExists(std::string())) + { + std::cerr + << "Problem with FileExists(std::string())" + << std::endl; + res = false; + } + // FileExists(x, true) should return false on a directory + if (kwsys::SystemTools::FileExists(testNewDir, true)) + { + std::cerr + << "Problem with FileExists as file for: " + << testNewDir << std::endl; + res = false; + } + if (kwsys::SystemTools::FileExists(testNewDir.c_str(), true)) + { + std::cerr + << "Problem with FileExists as C string and file for: " + << testNewDir << std::endl; + res = false; + } + // FileExists(x, false) should return true even on a directory + if (!kwsys::SystemTools::FileExists(testNewDir, false)) + { + std::cerr + << "Problem with FileExists as not file for: " + << testNewDir << std::endl; + res = false; + } + if (!kwsys::SystemTools::FileExists(testNewDir.c_str(), false)) + { + std::cerr + << "Problem with FileExists as C string and not file for: " + << testNewDir << std::endl; + res = false; + } + // should work, was created as new file before + if (!kwsys::SystemTools::FileExists(testNewFile)) + { + std::cerr + << "Problem with FileExists for: " + << testNewDir << std::endl; + res = false; + } + if (!kwsys::SystemTools::FileExists(testNewFile.c_str())) + { + std::cerr + << "Problem with FileExists as C string for: " + << testNewDir << std::endl; + res = false; + } + if (!kwsys::SystemTools::FileExists(testNewFile, true)) + { + std::cerr + << "Problem with FileExists as file for: " + << testNewDir << std::endl; + res = false; + } + if (!kwsys::SystemTools::FileExists(testNewFile.c_str(), true)) + { + std::cerr + << "Problem with FileExists as C string and file for: " + << testNewDir << std::endl; + res = false; + } // Reset umask #if defined(_WIN32) && !defined(__CYGWIN__) @@ -851,6 +999,44 @@ static bool CheckGetPath() return res; } +static bool CheckFind() +{ + bool res = true; + const std::string testFindFileName("testFindFile.txt"); + const std::string testFindFile(TEST_SYSTEMTOOLS_BINARY_DIR "/" + + testFindFileName); + + if (!kwsys::SystemTools::Touch(testFindFile.c_str(), true)) + { + std::cerr + << "Problem with Touch for: " + << testFindFile << std::endl; + // abort here as the existence of the file only makes the test meaningful + return false; + } + + std::vector searchPaths; + searchPaths.push_back(TEST_SYSTEMTOOLS_BINARY_DIR); + if (kwsys::SystemTools::FindFile(testFindFileName, + searchPaths, true).empty()) + { + std::cerr + << "Problem with FindFile without system paths for: " + << testFindFileName << std::endl; + res = false; + } + if (kwsys::SystemTools::FindFile(testFindFileName, + searchPaths, false).empty()) + { + std::cerr + << "Problem with FindFile with system paths for: " + << testFindFileName << std::endl; + res = false; + } + + return res; +} + //---------------------------------------------------------------------------- int testSystemTools(int, char*[]) { @@ -888,5 +1074,7 @@ int testSystemTools(int, char*[]) res &= CheckGetPath(); + res &= CheckFind(); + return res ? 0 : 1; } ----------------------------------------------------------------------- Summary of changes: Source/kwsys/SystemTools.cxx | 26 ++---- Source/kwsys/testSystemTools.cxx | 188 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 197 insertions(+), 17 deletions(-) hooks/post-receive -- CMake From chuck.atkins at kitware.com Fri Dec 4 10:29:30 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Fri, 4 Dec 2015 10:29:30 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1605-g40c9095 Message-ID: <20151204152930.12B60DEF79@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 40c9095f5559abe6acb1bc106643d2fd75959795 (commit) via 71e5f253f9b035be7049f36dab2e942220ff6209 (commit) from 92f8b11450f00cf4e71a1bd42e55cc46a1dfb398 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=40c9095f5559abe6acb1bc106643d2fd75959795 commit 40c9095f5559abe6acb1bc106643d2fd75959795 Merge: 92f8b11 71e5f25 Author: Chuck Atkins AuthorDate: Fri Dec 4 10:29:29 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 10:29:29 2015 -0500 Merge topic 'find-ftn-by-default' into next 71e5f253 Fortran: Add ftn, the Cray compiler wrapper, to the default search. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=71e5f253f9b035be7049f36dab2e942220ff6209 commit 71e5f253f9b035be7049f36dab2e942220ff6209 Author: Chuck Atkins AuthorDate: Fri Dec 4 10:28:03 2015 -0500 Commit: Chuck Atkins CommitDate: Fri Dec 4 10:28:03 2015 -0500 Fortran: Add ftn, the Cray compiler wrapper, to the default search. diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index 911ffac..ccafb07 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -54,6 +54,7 @@ else() if(NOT CMAKE_Fortran_COMPILER_INIT) # Known compilers: # f77/f90/f95: generic compiler names + # ftn: Cray fortran compiler wrapper # g77: GNU Fortran 77 compiler # gfortran: putative GNU Fortran 95+ compiler (in progress) # fort77: native F77 compiler under HP-UX (and some older Crays) @@ -73,6 +74,7 @@ else() # then 77 or older compilers, gnu is always last in the group, # so if you paid for a compiler it is picked by default. set(CMAKE_Fortran_COMPILER_LIST + ftn ifort ifc af95 af90 efc f95 pathf2003 pathf95 pgf95 pgfortran lf95 xlf95 fort gfortran gfortran-4 g95 f90 pathf90 pgf90 xlf90 epcf90 fort77 frt pgf77 xlf fl32 af77 g77 f77 ----------------------------------------------------------------------- Summary of changes: Modules/CMakeDetermineFortranCompiler.cmake | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 4 10:33:15 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 4 Dec 2015 10:33:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1608-gd4cc1d3 Message-ID: <20151204153315.617CBDF316@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via d4cc1d3df555e15699be48a603c486bdf12ba547 (commit) via 384ae5514e423fccb02e48a4da25e1549556d898 (commit) via 0be5020bf814efd040f7dcd35cc3a9f07d113458 (commit) from 40c9095f5559abe6acb1bc106643d2fd75959795 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4cc1d3df555e15699be48a603c486bdf12ba547 commit d4cc1d3df555e15699be48a603c486bdf12ba547 Merge: 40c9095 384ae55 Author: Brad King AuthorDate: Fri Dec 4 10:33:13 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 10:33:13 2015 -0500 Merge topic 'cmake-E-copy-multiple-inputs' into next 384ae551 cmake: Teach -E copy[_if_different] to support multiple files (#15703) 0be5020b cmake: Improve '-E' help message formatting https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=384ae5514e423fccb02e48a4da25e1549556d898 commit 384ae5514e423fccb02e48a4da25e1549556d898 Author: Bartosz Kosiorek AuthorDate: Thu Dec 3 21:29:30 2015 +0100 Commit: Brad King CommitDate: Fri Dec 4 10:26:34 2015 -0500 cmake: Teach -E copy[_if_different] to support multiple files (#15703) If multiple input files are provided then the destination must be a directory. If only one input file is provided then destination may be either a file or directory. diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index 3bfab7b..086f259 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -169,14 +169,14 @@ Available commands are: ``compare_files `` Check if file1 is same as file2. -``copy `` - Copy file to destination (either file or directory). +``copy ... `` + Copy files to 'destination' (either file or directory). ``copy_directory `` Copy directory 'source' content to directory 'destination'. -``copy_if_different `` - Copy file if input has changed. +``copy_if_different ... `` + Copy files if input has changed. Destination could be file or directory. ``echo [...]`` Displays arguments as text. diff --git a/Help/release/dev/cmake-E-copy-multiple-inputs.rst b/Help/release/dev/cmake-E-copy-multiple-inputs.rst new file mode 100644 index 0000000..798af53 --- /dev/null +++ b/Help/release/dev/cmake-E-copy-multiple-inputs.rst @@ -0,0 +1,5 @@ +cmake-E-copy-multiple-inputs +---------------------------- + +* The :manual:`cmake(1)` ``-E copy`` and ``-E copy_if_different`` command-line + tools learned to support copying multiple input files to a directory. diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 70107eb..0dc5a9a 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -56,11 +56,11 @@ void CMakeCommandUsage(const char* program) << "Available commands: \n" << " chdir dir cmd [args]... - run command in a given directory\n" << " compare_files file1 file2 - check if file1 is same as file2\n" - << " copy file destination - copy file to destination (either file " - "or directory)\n" + << " copy ... destination - copy files to destination " + "(either file or directory)\n" << " copy_directory source destination - copy directory 'source' " "content to directory 'destination'\n" - << " copy_if_different in-file out-file - copy file if input has " + << " copy_if_different ... destination - copy files if it has " "changed\n" << " echo [...] - displays arguments as text\n" << " echo_append [...] - displays arguments as text but no new " @@ -149,29 +149,60 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) if (args.size() > 1) { // Copy file - if (args[1] == "copy" && args.size() == 4) + if (args[1] == "copy" && args.size() > 3) { - if(!cmSystemTools::cmCopyFile(args[2].c_str(), args[3].c_str())) + // If multiple source files specified, + // then destination must be directory + if ((args.size() > 4) && + (!cmSystemTools::FileIsDirectory(args[args.size() - 1]))) { - std::cerr << "Error copying file \"" << args[2] - << "\" to \"" << args[3] << "\".\n"; + std::cerr << "Error: Target (for copy command) \"" + << args[args.size() - 1] + << "\" is not a directory.\n"; return 1; } - return 0; + // If error occurs we want to continue copying next files. + bool return_value = 0; + for (std::string::size_type cc = 2; cc < args.size() - 1; cc ++) + { + if(!cmSystemTools::cmCopyFile(args[cc].c_str(), + args[args.size() - 1].c_str())) + { + std::cerr << "Error copying file \"" << args[cc] + << "\" to \"" << args[args.size() - 1] << "\".\n"; + return_value = 1; + } + } + return return_value; } // Copy file if different. - if (args[1] == "copy_if_different" && args.size() == 4) + if (args[1] == "copy_if_different" && args.size() > 3) { - if(!cmSystemTools::CopyFileIfDifferent(args[2].c_str(), - args[3].c_str())) + // If multiple source files specified, + // then destination must be directory + if ((args.size() > 4) && + (!cmSystemTools::FileIsDirectory(args[args.size() - 1]))) { - std::cerr << "Error copying file (if different) from \"" - << args[2] << "\" to \"" << args[3] - << "\".\n"; + std::cerr << "Error: Target (for copy_if_different command) \"" + << args[args.size() - 1] + << "\" is not a directory.\n"; return 1; } - return 0; + // If error occurs we want to continue copying next files. + bool return_value = 0; + for (std::string::size_type cc = 2; cc < args.size() - 1; cc ++) + { + if(!cmSystemTools::CopyFileIfDifferent(args[cc].c_str(), + args[args.size() - 1].c_str())) + { + std::cerr << "Error copying file (if different) from \"" + << args[cc] << "\" to \"" << args[args.size() - 1] + << "\".\n"; + return_value = 1; + } + } + return return_value; } // Copy directory content diff --git a/Tests/RunCMake/CommandLine/E_copy-one-source-directory-target-is-directory-result.txt b/Tests/RunCMake/CommandLine/E_copy-one-source-directory-target-is-directory-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-one-source-directory-target-is-directory-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy-one-source-directory-target-is-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_copy-one-source-directory-target-is-directory-stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CommandLine/E_copy-one-source-file-result.txt b/Tests/RunCMake/CommandLine/E_copy-one-source-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-one-source-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_copy-one-source-file-stderr.txt b/Tests/RunCMake/CommandLine/E_copy-one-source-file-stderr.txt new file mode 100644 index 0000000..9a9301d --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-one-source-file-stderr.txt @@ -0,0 +1 @@ +^CMake Error: .* diff --git a/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-directory-result.txt b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-directory-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-directory-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-directory-stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-result.txt b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-stderr.txt b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-stderr.txt new file mode 100644 index 0000000..9504216 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-stderr.txt @@ -0,0 +1 @@ +^Error: Target \(for copy command\).* is not a directory.$ diff --git a/Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-result.txt b/Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-stderr.txt new file mode 100644 index 0000000..2d0d986 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-stderr.txt @@ -0,0 +1 @@ +^Error copying file .*not_existing_file.bad\" to .* diff --git a/Tests/RunCMake/CommandLine/E_copy_if_different-one-source-directory-target-is-directory-result.txt b/Tests/RunCMake/CommandLine/E_copy_if_different-one-source-directory-target-is-directory-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_if_different-one-source-directory-target-is-directory-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy_if_different-one-source-directory-target-is-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_if_different-one-source-directory-target-is-directory-stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-directory-result.txt b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-directory-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-directory-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-directory-stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-result.txt b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-stderr.txt new file mode 100644 index 0000000..64b7b1b --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-stderr.txt @@ -0,0 +1 @@ +^Error: Target \(for copy_if_different command\).* is not a directory.$ diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 6b4b384..dbc235d 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -101,6 +101,29 @@ if(UNIX) ) endif() +set(in ${RunCMake_SOURCE_DIR}/copy_input) +set(out ${RunCMake_BINARY_DIR}/copy_output) +file(REMOVE_RECURSE "${out}") +file(MAKE_DIRECTORY ${out}) +run_cmake_command(E_copy-one-source-file + ${CMAKE_COMMAND} -E copy ${out}/f1.txt) +run_cmake_command(E_copy-one-source-directory-target-is-directory + ${CMAKE_COMMAND} -E copy ${in}/f1.txt ${out}) +run_cmake_command(E_copy-three-source-files-target-is-directory + ${CMAKE_COMMAND} -E copy ${in}/f1.txt ${in}/f2.txt ${in}/f3.txt ${out}) +run_cmake_command(E_copy-three-source-files-target-is-file + ${CMAKE_COMMAND} -E copy ${in}/f1.txt ${in}/f2.txt ${in}/f3.txt ${out}/f1.txt) +run_cmake_command(E_copy-two-good-and-one-bad-source-files-target-is-directory + ${CMAKE_COMMAND} -E copy ${in}/f1.txt ${in}/not_existing_file.bad ${in}/f3.txt ${out}) +run_cmake_command(E_copy_if_different-one-source-directory-target-is-directory + ${CMAKE_COMMAND} -E copy_if_different ${in}/f1.txt ${out}) +run_cmake_command(E_copy_if_different-three-source-files-target-is-directory + ${CMAKE_COMMAND} -E copy_if_different ${in}/f1.txt ${in}/f2.txt ${in}/f3.txt ${out}) +run_cmake_command(E_copy_if_different-three-source-files-target-is-file + ${CMAKE_COMMAND} -E copy_if_different ${in}/f1.txt ${in}/f2.txt ${in}/f3.txt ${out}/f1.txt) +unset(in) +unset(out) + run_cmake_command(E_env-no-command0 ${CMAKE_COMMAND} -E env) run_cmake_command(E_env-no-command1 ${CMAKE_COMMAND} -E env TEST_ENV=1) run_cmake_command(E_env-bad-arg1 ${CMAKE_COMMAND} -E env -bad-arg1) diff --git a/Tests/RunCMake/CommandLine/copy_input/f1.txt b/Tests/RunCMake/CommandLine/copy_input/f1.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CommandLine/copy_input/f2.txt b/Tests/RunCMake/CommandLine/copy_input/f2.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CommandLine/copy_input/f3.txt b/Tests/RunCMake/CommandLine/copy_input/f3.txt new file mode 100644 index 0000000..e69de29 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0be5020bf814efd040f7dcd35cc3a9f07d113458 commit 0be5020bf814efd040f7dcd35cc3a9f07d113458 Author: Bartosz Kosiorek AuthorDate: Thu Dec 3 00:43:37 2015 +0100 Commit: Brad King CommitDate: Fri Dec 4 10:12:02 2015 -0500 cmake: Improve '-E' help message formatting diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index dac16bf..3bfab7b 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -193,10 +193,10 @@ Available commands are: ``make_directory `` Create a directory. -``md5sum [...]`` +``md5sum ...`` Compute md5sum of files. -``remove [-f] [...]`` +``remove [-f] ...`` Remove the file(s), use ``-f`` to force it. ``remove_directory `` diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 21b126b..70107eb 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -52,7 +52,7 @@ void CMakeCommandUsage(const char* program) // If you add new commands, change here, // and in cmakemain.cxx in the options table errorStream - << "Usage: " << program << " -E [command] [arguments ...]\n" + << "Usage: " << program << " -E [arguments...]\n" << "Available commands: \n" << " chdir dir cmd [args]... - run command in a given directory\n" << " compare_files file1 file2 - check if file1 is same as file2\n" @@ -62,15 +62,15 @@ void CMakeCommandUsage(const char* program) "content to directory 'destination'\n" << " copy_if_different in-file out-file - copy file if input has " "changed\n" - << " echo [string]... - displays arguments as text\n" - << " echo_append [string]... - displays arguments as text but no new " + << " echo [...] - displays arguments as text\n" + << " echo_append [...] - displays arguments as text but no new " "line\n" << " env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]...\n" << " - run command in a modified environment\n" << " environment - display the current environment\n" << " make_directory dir - create a directory\n" - << " md5sum file1 [...] - compute md5sum of files\n" - << " remove [-f] file1 file2 ... - remove the file(s), use -f to force " + << " md5sum ... - compute md5sum of files\n" + << " remove [-f] ... - remove the file(s), use -f to force " "it\n" << " remove_directory dir - remove a directory and its contents\n" << " rename oldname newname - rename a file or directory " @@ -78,7 +78,7 @@ void CMakeCommandUsage(const char* program) << " tar [cxt][vf][zjJ] file.tar [file/dir1 file/dir2 ...]\n" << " - create or extract a tar or zip archive\n" << " sleep ... - sleep for given number of seconds\n" - << " time command [args] ... - run command and return elapsed time\n" + << " time command [args...] - run command and return elapsed time\n" << " touch file - touch a file.\n" << " touch_nocreate file - touch a file but do not create it.\n" #if defined(_WIN32) && !defined(__CYGWIN__) diff --git a/Tests/RunCMake/CommandLine/E-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/E-no-arg-stderr.txt index 056ce05..50d9b03 100644 --- a/Tests/RunCMake/CommandLine/E-no-arg-stderr.txt +++ b/Tests/RunCMake/CommandLine/E-no-arg-stderr.txt @@ -1,3 +1,3 @@ ^CMake Error: cmake version .* -Usage: .* -E \[command\] \[arguments ...\] +Usage: .* -E \[arguments\.\.\.\] Available commands: diff --git a/Tests/RunCMake/CommandLine/E_create_symlink-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/E_create_symlink-no-arg-stderr.txt index 056ce05..50d9b03 100644 --- a/Tests/RunCMake/CommandLine/E_create_symlink-no-arg-stderr.txt +++ b/Tests/RunCMake/CommandLine/E_create_symlink-no-arg-stderr.txt @@ -1,3 +1,3 @@ ^CMake Error: cmake version .* -Usage: .* -E \[command\] \[arguments ...\] +Usage: .* -E \[arguments\.\.\.\] Available commands: diff --git a/Tests/RunCMake/CommandLine/E_rename-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/E_rename-no-arg-stderr.txt index 056ce05..50d9b03 100644 --- a/Tests/RunCMake/CommandLine/E_rename-no-arg-stderr.txt +++ b/Tests/RunCMake/CommandLine/E_rename-no-arg-stderr.txt @@ -1,3 +1,3 @@ ^CMake Error: cmake version .* -Usage: .* -E \[command\] \[arguments ...\] +Usage: .* -E \[arguments\.\.\.\] Available commands: diff --git a/Tests/RunCMake/CommandLine/E_touch_nocreate-no-arg-stderr.txt b/Tests/RunCMake/CommandLine/E_touch_nocreate-no-arg-stderr.txt index 056ce05..50d9b03 100644 --- a/Tests/RunCMake/CommandLine/E_touch_nocreate-no-arg-stderr.txt +++ b/Tests/RunCMake/CommandLine/E_touch_nocreate-no-arg-stderr.txt @@ -1,3 +1,3 @@ ^CMake Error: cmake version .* -Usage: .* -E \[command\] \[arguments ...\] +Usage: .* -E \[arguments\.\.\.\] Available commands: ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake.1.rst | 12 ++-- Help/release/dev/cmake-E-copy-multiple-inputs.rst | 5 ++ Source/cmcmd.cxx | 73 ++++++++++++++------ Tests/RunCMake/CommandLine/E-no-arg-stderr.txt | 2 +- ...ource-directory-target-is-directory-result.txt} | 0 ...source-directory-target-is-directory-stderr.txt | 0 .../E_copy-one-source-file-result.txt} | 0 .../CommandLine/E_copy-one-source-file-stderr.txt | 1 + ...ee-source-files-target-is-directory-result.txt} | 0 ...ree-source-files-target-is-directory-stderr.txt | 0 ...y-three-source-files-target-is-file-result.txt} | 0 ...py-three-source-files-target-is-file-stderr.txt | 1 + ...ad-source-files-target-is-directory-result.txt} | 0 ...bad-source-files-target-is-directory-stderr.txt | 1 + ...ource-directory-target-is-directory-result.txt} | 0 ...source-directory-target-is-directory-stderr.txt | 0 ...ee-source-files-target-is-directory-result.txt} | 0 ...ree-source-files-target-is-directory-stderr.txt | 0 ...t-three-source-files-target-is-file-result.txt} | 0 ...nt-three-source-files-target-is-file-stderr.txt | 1 + .../CommandLine/E_create_symlink-no-arg-stderr.txt | 2 +- .../CommandLine/E_rename-no-arg-stderr.txt | 2 +- .../CommandLine/E_touch_nocreate-no-arg-stderr.txt | 2 +- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 23 ++++++ .../RunCMake/CommandLine/copy_input/f1.txt | 0 .../RunCMake/CommandLine/copy_input/f2.txt | 0 .../RunCMake/CommandLine/copy_input/f3.txt | 0 27 files changed, 94 insertions(+), 31 deletions(-) create mode 100644 Help/release/dev/cmake-E-copy-multiple-inputs.rst copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_copy-one-source-directory-target-is-directory-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_copy-one-source-directory-target-is-directory-stderr.txt (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_copy-one-source-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_copy-one-source-file-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_copy-three-source-files-target-is-directory-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-directory-stderr.txt (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_copy-three-source-files-target-is-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-stderr.txt copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_copy_if_different-one-source-directory-target-is-directory-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_copy_if_different-one-source-directory-target-is-directory-stderr.txt (100%) copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_copy_if_different-three-source-files-target-is-directory-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-directory-stderr.txt (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_copy_if_different-three-source-files-target-is-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-stderr.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/copy_input/f1.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/copy_input/f2.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/copy_input/f3.txt (100%) hooks/post-receive -- CMake From chuck.atkins at kitware.com Fri Dec 4 11:58:44 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Fri, 4 Dec 2015 11:58:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1610-g1c791e9 Message-ID: <20151204165844.1B5D0DDCA7@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 1c791e9a205af480cc493e992b1bc9e4d6f6fd75 (commit) via 9eeb756f1a4c34ef598f7b5eeff4919d685ce2bc (commit) from d4cc1d3df555e15699be48a603c486bdf12ba547 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c791e9a205af480cc493e992b1bc9e4d6f6fd75 commit 1c791e9a205af480cc493e992b1bc9e4d6f6fd75 Merge: d4cc1d3 9eeb756 Author: Chuck Atkins AuthorDate: Fri Dec 4 11:58:43 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 11:58:43 2015 -0500 Merge topic 'detect-compiler-wrappers' into next 9eeb756f Compilers: Generalize the compiler wrapper loading into a macro https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9eeb756f1a4c34ef598f7b5eeff4919d685ce2bc commit 9eeb756f1a4c34ef598f7b5eeff4919d685ce2bc Author: Chuck Atkins AuthorDate: Fri Dec 4 11:57:24 2015 -0500 Commit: Chuck Atkins CommitDate: Fri Dec 4 11:57:24 2015 -0500 Compilers: Generalize the compiler wrapper loading into a macro diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index 5c3705c..fa87ca8 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -18,6 +18,8 @@ # It also loads a system - compiler - processor (or target hardware) # specific file, which is mainly useful for crosscompiling and embedded systems. +include(CMakeLanguageInformation) + # some compilers use different extensions (e.g. sdcc uses .rel) # so set the extension here first so it can be overridden by the compiler specific file if(UNIX) @@ -63,13 +65,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_C_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_C_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(C) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index cbcd0df..b35280f 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -18,6 +18,8 @@ # It also loads a system - compiler - processor (or target hardware) # specific file, which is mainly useful for crosscompiling and embedded systems. +include(CMakeLanguageInformation) + # some compilers use different extensions (e.g. sdcc uses .rel) # so set the extension here first so it can be overridden by the compiler specific file if(UNIX) @@ -62,13 +64,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_CXX_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_CXX_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(CXX) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 84ece04..7bd9310 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -12,6 +12,8 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) +include(CMakeLanguageInformation) + # This file sets the basic flags for the Fortran language in CMake. # It also loads the available platform file for the system-compiler # if it exists. @@ -39,13 +41,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_Fortran_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_Fortran_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(CXX) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeLanguageInformation.cmake b/Modules/CMakeLanguageInformation.cmake new file mode 100644 index 0000000..e14f83a --- /dev/null +++ b/Modules/CMakeLanguageInformation.cmake @@ -0,0 +1,21 @@ + +# load any compiler-wrapper specific information +macro(__cmake_include_compiler_wrapper lang) + set(_INCLUDED_WRAPPER_FILE 0) + if (CMAKE_${lang}_COMPILER_ID) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + + # No platform - wrapper - lang information so maybe there's just wrapper - lang information + if(NOT _INCLUDED_WRAPPER_FILE) + if (CMAKE_${lang}_COMPILER_ID) + include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + endif () +endmacro () ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCInformation.cmake | 10 +++------- Modules/CMakeCXXInformation.cmake | 10 +++------- Modules/CMakeFortranInformation.cmake | 10 +++------- Modules/CMakeLanguageInformation.cmake | 21 +++++++++++++++++++++ 4 files changed, 30 insertions(+), 21 deletions(-) create mode 100644 Modules/CMakeLanguageInformation.cmake hooks/post-receive -- CMake From chuck.atkins at kitware.com Fri Dec 4 13:34:46 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Fri, 4 Dec 2015 13:34:46 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1612-gb0159b6 Message-ID: <20151204183446.D9CC2DE783@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via b0159b685bd6b07fff7c88f26fe0e5eea81f1eae (commit) via 2bf9bacba60042fb1bdcd256ce37842210f29e78 (commit) from 1c791e9a205af480cc493e992b1bc9e4d6f6fd75 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0159b685bd6b07fff7c88f26fe0e5eea81f1eae commit b0159b685bd6b07fff7c88f26fe0e5eea81f1eae Merge: 1c791e9 2bf9bac Author: Chuck Atkins AuthorDate: Fri Dec 4 13:34:45 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 13:34:45 2015 -0500 Merge topic 'detect-compiler-wrappers' into next 2bf9bacb Compilers: Add copyright header to CMakeLanguageInformation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2bf9bacba60042fb1bdcd256ce37842210f29e78 commit 2bf9bacba60042fb1bdcd256ce37842210f29e78 Author: Chuck Atkins AuthorDate: Fri Dec 4 13:34:10 2015 -0500 Commit: Chuck Atkins CommitDate: Fri Dec 4 13:34:10 2015 -0500 Compilers: Add copyright header to CMakeLanguageInformation diff --git a/Modules/CMakeLanguageInformation.cmake b/Modules/CMakeLanguageInformation.cmake index e14f83a..507d7a8 100644 --- a/Modules/CMakeLanguageInformation.cmake +++ b/Modules/CMakeLanguageInformation.cmake @@ -1,3 +1,18 @@ +#============================================================================= +# Copyright 2015 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# This file contains common code blocks used by all the language information +# files # load any compiler-wrapper specific information macro(__cmake_include_compiler_wrapper lang) ----------------------------------------------------------------------- Summary of changes: Modules/CMakeLanguageInformation.cmake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) hooks/post-receive -- CMake From chuck.atkins at kitware.com Fri Dec 4 13:35:16 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Fri, 4 Dec 2015 13:35:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1614-g89a6daa Message-ID: <20151204183516.5BA9BDE793@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 89a6daaf935e28ef3867518d28322af9cfeb4280 (commit) via b88b91d25a83ae1079985f19109731d97da4e8b7 (commit) from b0159b685bd6b07fff7c88f26fe0e5eea81f1eae (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89a6daaf935e28ef3867518d28322af9cfeb4280 commit 89a6daaf935e28ef3867518d28322af9cfeb4280 Merge: b0159b6 b88b91d Author: Chuck Atkins AuthorDate: Fri Dec 4 13:35:15 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 13:35:15 2015 -0500 Merge topic 'detect-compiler-wrappers' into next b88b91d2 Compilers: Generalize the compiler wrapper loading into a macro https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b88b91d25a83ae1079985f19109731d97da4e8b7 commit b88b91d25a83ae1079985f19109731d97da4e8b7 Author: Chuck Atkins AuthorDate: Fri Dec 4 11:57:24 2015 -0500 Commit: Chuck Atkins CommitDate: Fri Dec 4 13:35:01 2015 -0500 Compilers: Generalize the compiler wrapper loading into a macro diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index 5c3705c..fa87ca8 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -18,6 +18,8 @@ # It also loads a system - compiler - processor (or target hardware) # specific file, which is mainly useful for crosscompiling and embedded systems. +include(CMakeLanguageInformation) + # some compilers use different extensions (e.g. sdcc uses .rel) # so set the extension here first so it can be overridden by the compiler specific file if(UNIX) @@ -63,13 +65,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_C_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_C_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(C) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index cbcd0df..b35280f 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -18,6 +18,8 @@ # It also loads a system - compiler - processor (or target hardware) # specific file, which is mainly useful for crosscompiling and embedded systems. +include(CMakeLanguageInformation) + # some compilers use different extensions (e.g. sdcc uses .rel) # so set the extension here first so it can be overridden by the compiler specific file if(UNIX) @@ -62,13 +64,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_CXX_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_CXX_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(CXX) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 84ece04..7bd9310 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -12,6 +12,8 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) +include(CMakeLanguageInformation) + # This file sets the basic flags for the Fortran language in CMake. # It also loads the available platform file for the system-compiler # if it exists. @@ -39,13 +41,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_Fortran_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_Fortran_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(CXX) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeLanguageInformation.cmake b/Modules/CMakeLanguageInformation.cmake new file mode 100644 index 0000000..507d7a8 --- /dev/null +++ b/Modules/CMakeLanguageInformation.cmake @@ -0,0 +1,36 @@ +#============================================================================= +# Copyright 2015 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# This file contains common code blocks used by all the language information +# files + +# load any compiler-wrapper specific information +macro(__cmake_include_compiler_wrapper lang) + set(_INCLUDED_WRAPPER_FILE 0) + if (CMAKE_${lang}_COMPILER_ID) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + + # No platform - wrapper - lang information so maybe there's just wrapper - lang information + if(NOT _INCLUDED_WRAPPER_FILE) + if (CMAKE_${lang}_COMPILER_ID) + include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + endif () +endmacro () ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From chuck.atkins at kitware.com Fri Dec 4 13:47:06 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Fri, 4 Dec 2015 13:47:06 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1616-gfe032a6 Message-ID: <20151204184706.CAD25DC65C@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via fe032a678a4e893c33ebecccec06b0167ce52b54 (commit) via fedd71b69c7266c2aa517fbe13cfa4d308a46b33 (commit) from 89a6daaf935e28ef3867518d28322af9cfeb4280 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe032a678a4e893c33ebecccec06b0167ce52b54 commit fe032a678a4e893c33ebecccec06b0167ce52b54 Merge: 89a6daa fedd71b Author: Chuck Atkins AuthorDate: Fri Dec 4 13:47:06 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 13:47:06 2015 -0500 Merge topic 'detect-compiler-wrappers' into next fedd71b6 Compiler: Fix typo in CMakeFortranInformation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fedd71b69c7266c2aa517fbe13cfa4d308a46b33 commit fedd71b69c7266c2aa517fbe13cfa4d308a46b33 Author: Chuck Atkins AuthorDate: Fri Dec 4 13:46:30 2015 -0500 Commit: Chuck Atkins CommitDate: Fri Dec 4 13:46:30 2015 -0500 Compiler: Fix typo in CMakeFortranInformation diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 7bd9310..1fd0972 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -41,7 +41,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_Fortran_COMPILER_WRAPPER) - __cmake_include_compiler_wrapper(CXX) + __cmake_include_compiler_wrapper(Fortran) endif () # We specify the compiler information in the system file for some ----------------------------------------------------------------------- Summary of changes: Modules/CMakeFortranInformation.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From chuck.atkins at kitware.com Fri Dec 4 13:47:49 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Fri, 4 Dec 2015 13:47:49 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1618-ge907bb6 Message-ID: <20151204184749.5AB77DC8D6@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via e907bb6a216e5d3d68b5d9609338382bd3916de1 (commit) via 7d9197505db6dbc6369501ad68c1fa98c4bc2ae8 (commit) from fe032a678a4e893c33ebecccec06b0167ce52b54 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e907bb6a216e5d3d68b5d9609338382bd3916de1 commit e907bb6a216e5d3d68b5d9609338382bd3916de1 Merge: fe032a6 7d91975 Author: Chuck Atkins AuthorDate: Fri Dec 4 13:47:47 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 13:47:47 2015 -0500 Merge topic 'detect-compiler-wrappers' into next 7d919750 Compiler: Generalize the compiler wrapper loading into a macro https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d9197505db6dbc6369501ad68c1fa98c4bc2ae8 commit 7d9197505db6dbc6369501ad68c1fa98c4bc2ae8 Author: Chuck Atkins AuthorDate: Fri Dec 4 11:57:24 2015 -0500 Commit: Chuck Atkins CommitDate: Fri Dec 4 13:47:24 2015 -0500 Compiler: Generalize the compiler wrapper loading into a macro diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index 5c3705c..fa87ca8 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -18,6 +18,8 @@ # It also loads a system - compiler - processor (or target hardware) # specific file, which is mainly useful for crosscompiling and embedded systems. +include(CMakeLanguageInformation) + # some compilers use different extensions (e.g. sdcc uses .rel) # so set the extension here first so it can be overridden by the compiler specific file if(UNIX) @@ -63,13 +65,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_C_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_C_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(C) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index cbcd0df..b35280f 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -18,6 +18,8 @@ # It also loads a system - compiler - processor (or target hardware) # specific file, which is mainly useful for crosscompiling and embedded systems. +include(CMakeLanguageInformation) + # some compilers use different extensions (e.g. sdcc uses .rel) # so set the extension here first so it can be overridden by the compiler specific file if(UNIX) @@ -62,13 +64,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_CXX_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_CXX_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(CXX) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 84ece04..1fd0972 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -12,6 +12,8 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) +include(CMakeLanguageInformation) + # This file sets the basic flags for the Fortran language in CMake. # It also loads the available platform file for the system-compiler # if it exists. @@ -39,13 +41,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_Fortran_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_Fortran_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(Fortran) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeLanguageInformation.cmake b/Modules/CMakeLanguageInformation.cmake new file mode 100644 index 0000000..507d7a8 --- /dev/null +++ b/Modules/CMakeLanguageInformation.cmake @@ -0,0 +1,36 @@ +#============================================================================= +# Copyright 2015 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# This file contains common code blocks used by all the language information +# files + +# load any compiler-wrapper specific information +macro(__cmake_include_compiler_wrapper lang) + set(_INCLUDED_WRAPPER_FILE 0) + if (CMAKE_${lang}_COMPILER_ID) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + + # No platform - wrapper - lang information so maybe there's just wrapper - lang information + if(NOT _INCLUDED_WRAPPER_FILE) + if (CMAKE_${lang}_COMPILER_ID) + include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + endif () +endmacro () ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From chuck.atkins at kitware.com Fri Dec 4 17:29:29 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Fri, 4 Dec 2015 17:29:29 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1620-gb23beea Message-ID: <20151204222929.89744DE72B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via b23beeab3872c765c12b4e90565cc89c891ce6d5 (commit) via ee3c15fe6151a469a1704dfb332a74c88b685d18 (commit) from e907bb6a216e5d3d68b5d9609338382bd3916de1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b23beeab3872c765c12b4e90565cc89c891ce6d5 commit b23beeab3872c765c12b4e90565cc89c891ce6d5 Merge: e907bb6 ee3c15f Author: Chuck Atkins AuthorDate: Fri Dec 4 17:29:27 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 17:29:27 2015 -0500 Merge topic 'detect-compiler-wrappers' into next ee3c15fe Add whitespace to fix copyright check https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ee3c15fe6151a469a1704dfb332a74c88b685d18 commit ee3c15fe6151a469a1704dfb332a74c88b685d18 Author: Chuck Atkins AuthorDate: Fri Dec 4 17:29:01 2015 -0500 Commit: Chuck Atkins CommitDate: Fri Dec 4 17:29:01 2015 -0500 Add whitespace to fix copyright check diff --git a/Modules/CMakeLanguageInformation.cmake b/Modules/CMakeLanguageInformation.cmake index 507d7a8..e03d149 100644 --- a/Modules/CMakeLanguageInformation.cmake +++ b/Modules/CMakeLanguageInformation.cmake @@ -1,3 +1,4 @@ + #============================================================================= # Copyright 2015 Kitware, Inc. # ----------------------------------------------------------------------- Summary of changes: Modules/CMakeLanguageInformation.cmake | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From chuck.atkins at kitware.com Fri Dec 4 17:30:00 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Fri, 4 Dec 2015 17:30:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1622-g995642c Message-ID: <20151204223000.A00B6DE753@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 995642cbf6d47366c3d24285a9d2120b569d3527 (commit) via e7d06d84eb0cf3db967474d807a88415fcd20c08 (commit) from b23beeab3872c765c12b4e90565cc89c891ce6d5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=995642cbf6d47366c3d24285a9d2120b569d3527 commit 995642cbf6d47366c3d24285a9d2120b569d3527 Merge: b23beea e7d06d8 Author: Chuck Atkins AuthorDate: Fri Dec 4 17:29:59 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 4 17:29:59 2015 -0500 Merge topic 'detect-compiler-wrappers' into next e7d06d84 Compiler: Generalize the compiler wrapper loading into a macro https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7d06d84eb0cf3db967474d807a88415fcd20c08 commit e7d06d84eb0cf3db967474d807a88415fcd20c08 Author: Chuck Atkins AuthorDate: Fri Dec 4 11:57:24 2015 -0500 Commit: Chuck Atkins CommitDate: Fri Dec 4 17:29:44 2015 -0500 Compiler: Generalize the compiler wrapper loading into a macro diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index 5c3705c..fa87ca8 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -18,6 +18,8 @@ # It also loads a system - compiler - processor (or target hardware) # specific file, which is mainly useful for crosscompiling and embedded systems. +include(CMakeLanguageInformation) + # some compilers use different extensions (e.g. sdcc uses .rel) # so set the extension here first so it can be overridden by the compiler specific file if(UNIX) @@ -63,13 +65,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_C_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_C_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(C) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index cbcd0df..b35280f 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -18,6 +18,8 @@ # It also loads a system - compiler - processor (or target hardware) # specific file, which is mainly useful for crosscompiling and embedded systems. +include(CMakeLanguageInformation) + # some compilers use different extensions (e.g. sdcc uses .rel) # so set the extension here first so it can be overridden by the compiler specific file if(UNIX) @@ -62,13 +64,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_CXX_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_CXX_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(CXX) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 84ece04..1fd0972 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -12,6 +12,8 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) +include(CMakeLanguageInformation) + # This file sets the basic flags for the Fortran language in CMake. # It also loads the available platform file for the system-compiler # if it exists. @@ -39,13 +41,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_Fortran_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_Fortran_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(Fortran) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeLanguageInformation.cmake b/Modules/CMakeLanguageInformation.cmake new file mode 100644 index 0000000..e03d149 --- /dev/null +++ b/Modules/CMakeLanguageInformation.cmake @@ -0,0 +1,37 @@ + +#============================================================================= +# Copyright 2015 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# This file contains common code blocks used by all the language information +# files + +# load any compiler-wrapper specific information +macro(__cmake_include_compiler_wrapper lang) + set(_INCLUDED_WRAPPER_FILE 0) + if (CMAKE_${lang}_COMPILER_ID) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + + # No platform - wrapper - lang information so maybe there's just wrapper - lang information + if(NOT _INCLUDED_WRAPPER_FILE) + if (CMAKE_${lang}_COMPILER_ID) + include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + endif () +endmacro () ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Sat Dec 5 00:01:09 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 5 Dec 2015 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-633-g2c03215 Message-ID: <20151205050109.67F2BDDCA5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 2c03215050fee3695e7ed9362f35dff1ea9c3016 (commit) from e069aa05c6a0d8e89a677fa4f00d33432191eeaa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c03215050fee3695e7ed9362f35dff1ea9c3016 commit 2c03215050fee3695e7ed9362f35dff1ea9c3016 Author: Kitware Robot AuthorDate: Sat Dec 5 00:01:06 2015 -0500 Commit: Kitware Robot CommitDate: Sat Dec 5 00:01:06 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 81d33c2..b31aa72 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 4) -set(CMake_VERSION_PATCH 20151204) +set(CMake_VERSION_PATCH 20151205) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Dec 6 00:01:11 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 6 Dec 2015 00:01:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-634-g5609ba1 Message-ID: <20151206050112.9E7C6DE407@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 5609ba1bcd4803547dfbb558d8de3c3d3af6369c (commit) from 2c03215050fee3695e7ed9362f35dff1ea9c3016 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5609ba1bcd4803547dfbb558d8de3c3d3af6369c commit 5609ba1bcd4803547dfbb558d8de3c3d3af6369c Author: Kitware Robot AuthorDate: Sun Dec 6 00:01:05 2015 -0500 Commit: Kitware Robot CommitDate: Sun Dec 6 00:01:05 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index b31aa72..cff022e 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 4) -set(CMake_VERSION_PATCH 20151205) +set(CMake_VERSION_PATCH 20151206) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Dec 7 00:01:11 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 7 Dec 2015 00:01:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-635-geda493a Message-ID: <20151207050111.1F9FCDF4F3@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via eda493a38021f439b08807bb8202bab29e79635d (commit) from 5609ba1bcd4803547dfbb558d8de3c3d3af6369c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eda493a38021f439b08807bb8202bab29e79635d commit eda493a38021f439b08807bb8202bab29e79635d Author: Kitware Robot AuthorDate: Mon Dec 7 00:01:07 2015 -0500 Commit: Kitware Robot CommitDate: Mon Dec 7 00:01:07 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index cff022e..21c4ab4 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 4) -set(CMake_VERSION_PATCH 20151206) +set(CMake_VERSION_PATCH 20151207) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 7 09:21:11 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 7 Dec 2015 09:21:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1624-g2dd7af2 Message-ID: <20151207142111.803F7DF511@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 2dd7af2fb8a24af0e03608de327342abc0d49db6 (commit) via ebaca6290d2c0be7dec22452389632949a700d28 (commit) from 995642cbf6d47366c3d24285a9d2120b569d3527 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2dd7af2fb8a24af0e03608de327342abc0d49db6 commit 2dd7af2fb8a24af0e03608de327342abc0d49db6 Merge: 995642c ebaca62 Author: Brad King AuthorDate: Mon Dec 7 09:21:10 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 7 09:21:10 2015 -0500 Merge topic 'FindTIFF-imported-targets' into next ebaca629 FindTIFF: Add imported targets and update documentation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ebaca6290d2c0be7dec22452389632949a700d28 commit ebaca6290d2c0be7dec22452389632949a700d28 Author: Roger Leigh AuthorDate: Wed Dec 2 17:20:24 2015 +0000 Commit: Brad King CommitDate: Mon Dec 7 09:20:08 2015 -0500 FindTIFF: Add imported targets and update documentation - Add TIFF::TIFF imported target - Document imported target - Add testcase to test the standard variables and the imported target Also: - Add TIFF_INCLUDE_DIRS to match common practice - Update documentation generally, including documenting TIFF_INCLUDE_DIRS diff --git a/Help/release/dev/FindTIFF-imported-targets.rst b/Help/release/dev/FindTIFF-imported-targets.rst new file mode 100644 index 0000000..f8bbc14 --- /dev/null +++ b/Help/release/dev/FindTIFF-imported-targets.rst @@ -0,0 +1,4 @@ +FindTIFF-imported-targets +------------------------- + +* The :module:`FindTIFF` module now provides imported targets. diff --git a/Modules/FindTIFF.cmake b/Modules/FindTIFF.cmake index ed092ea..e600498 100644 --- a/Modules/FindTIFF.cmake +++ b/Modules/FindTIFF.cmake @@ -2,24 +2,43 @@ # FindTIFF # -------- # -# Find TIFF library +# Find the TIFF library (libtiff). # -# Find the native TIFF includes and library This module defines +# Imported targets +# ^^^^^^^^^^^^^^^^ # -# :: +# This module defines the following :prop_tgt:`IMPORTED` targets: # -# TIFF_INCLUDE_DIR, where to find tiff.h, etc. -# TIFF_LIBRARIES, libraries to link against to use TIFF. -# TIFF_FOUND, If false, do not try to use TIFF. +# ``TIFF::TIFF`` +# The TIFF library, if found. # -# also defined, but not for general use are +# Result variables +# ^^^^^^^^^^^^^^^^ # -# :: +# This module will set the following variables in your project: # -# TIFF_LIBRARY, where to find the TIFF library. +# ``TIFF_FOUND`` +# true if the TIFF headers and libraries were found +# ``TIFF_INCLUDE_DIR`` +# the directory containing the TIFF headers +# ``TIFF_INCLUDE_DIRS`` +# the directory containing the TIFF headers +# ``TIFF_LIBRARIES`` +# TIFF libraries to be linked +# +# Cache variables +# ^^^^^^^^^^^^^^^ +# +# The following cache variables may also be set: +# +# ``TIFF_INCLUDE_DIR`` +# the directory containing the TIFF headers +# ``TIFF_LIBRARY`` +# the path to the TIFF library #============================================================================= # Copyright 2002-2009 Kitware, Inc. +# Copyright 2015 University of Dundee # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. @@ -65,7 +84,35 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF VERSION_VAR TIFF_VERSION_STRING) if(TIFF_FOUND) - set( TIFF_LIBRARIES ${TIFF_LIBRARY} ) + set(TIFF_LIBRARIES ${TIFF_LIBRARY}) + set(TIFF_INCLUDE_DIRS "${TIFF_INCLUDE_DIR}") + + if(NOT TARGET TIFF::TIFF) + add_library(TIFF::TIFF UNKNOWN IMPORTED) + if(TIFF_INCLUDE_DIRS) + set_target_properties(TIFF::TIFF PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${TIFF_INCLUDE_DIRS}") + endif() + if(EXISTS "${TIFF_LIBRARY}") + set_target_properties(TIFF::TIFF PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${TIFF_LIBRARY}") + endif() + if(EXISTS "${TIFF_LIBRARY_DEBUG}") + set_property(TARGET TIFF::TIFF APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(TIFF::TIFF PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" + IMPORTED_LOCATION_DEBUG "${TIFF_LIBRARY_DEBUG}") + endif() + if(EXISTS "${TIFF_LIBRARY_RELEASE}") + set_property(TARGET TIFF::TIFF APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(TIFF::TIFF PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${TIFF_LIBRARY_RELEASE}") + endif() + endif() endif() mark_as_advanced(TIFF_INCLUDE_DIR TIFF_LIBRARY) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 5fd7159..a040ec0 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1367,6 +1367,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release add_subdirectory(FindOpenSSL) endif() + if(CMake_TEST_FindTIFF) + add_subdirectory(FindTIFF) + endif() + if(CMake_TEST_FindXercesC) add_subdirectory(FindXercesC) endif() diff --git a/Tests/FindTIFF/CMakeLists.txt b/Tests/FindTIFF/CMakeLists.txt new file mode 100644 index 0000000..c4e0c6a --- /dev/null +++ b/Tests/FindTIFF/CMakeLists.txt @@ -0,0 +1,10 @@ +add_test(NAME FindTIFF.Test COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindTIFF/Test" + "${CMake_BINARY_DIR}/Tests/FindTIFF/Test" + ${build_generator_args} + --build-project TestFindTIFF + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) diff --git a/Tests/FindTIFF/Test/CMakeLists.txt b/Tests/FindTIFF/Test/CMakeLists.txt new file mode 100644 index 0000000..f17cda7 --- /dev/null +++ b/Tests/FindTIFF/Test/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.1) +project(TestFindTIFF C) +include(CTest) + +# CMake does not actually provide FindTIFF publicly. +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../Source/Modules) + +find_package(TIFF REQUIRED) + +add_executable(test_xercesc_tgt main.c) +target_link_libraries(test_xercesc_tgt TIFF::TIFF) +add_test(NAME test_xercesc_tgt COMMAND test_xercesc_tgt) + +add_executable(test_xercesc_var main.c) +target_include_directories(test_xercesc_var PRIVATE ${TIFF_INCLUDE_DIRS}) +target_link_libraries(test_xercesc_var PRIVATE ${TIFF_LIBRARIES}) +add_test(NAME test_xercesc_var COMMAND test_xercesc_var) diff --git a/Tests/FindTIFF/Test/main.c b/Tests/FindTIFF/Test/main.c new file mode 100644 index 0000000..fc4f337 --- /dev/null +++ b/Tests/FindTIFF/Test/main.c @@ -0,0 +1,12 @@ +#include +#include + +int main() +{ + /* Without any TIFF file to open, test that the call fails as + expected. This tests that linking worked. */ + TIFF *tiff = TIFFOpen("invalid.tiff", "r"); + assert(!tiff); + + return 0; +} ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 7 09:22:41 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 7 Dec 2015 09:22:41 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-637-g335314e Message-ID: <20151207142241.87AA7DF5F4@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 335314e35f5bbfe4131895e9e877e4a19cd3e806 (commit) via d8b251e2ea84e612dc30a1c9690a8b299aeb30fd (commit) from eda493a38021f439b08807bb8202bab29e79635d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=335314e35f5bbfe4131895e9e877e4a19cd3e806 commit 335314e35f5bbfe4131895e9e877e4a19cd3e806 Merge: eda493a d8b251e Author: Brad King AuthorDate: Mon Dec 7 09:22:39 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 7 09:22:39 2015 -0500 Merge topic 'fix-java-idlj-jarsigner-typos' d8b251e2 FindJava: Fix typos in IdlJ and JarSigner component implementation ----------------------------------------------------------------------- Summary of changes: Modules/FindJava.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 7 09:22:44 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 7 Dec 2015 09:22:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-639-gc3bb76d Message-ID: <20151207142244.DAB11DF600@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c3bb76dfd2bc732acb8d69ef47dacce9a55a6582 (commit) via 56c11eee13604e163eb5a5d9092df405be0e9a5c (commit) from 335314e35f5bbfe4131895e9e877e4a19cd3e806 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c3bb76dfd2bc732acb8d69ef47dacce9a55a6582 commit c3bb76dfd2bc732acb8d69ef47dacce9a55a6582 Merge: 335314e 56c11ee Author: Brad King AuthorDate: Mon Dec 7 09:22:43 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 7 09:22:43 2015 -0500 Merge topic 'UseJava-relative-manifest' 56c11eee UseJava: Allow relative path to manifest file just as with other sources ----------------------------------------------------------------------- Summary of changes: Modules/UseJava.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 7 09:22:47 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 7 Dec 2015 09:22:47 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-641-g8ff9071 Message-ID: <20151207142247.8208DDF605@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 8ff907113792d4554b2837afa7102427572997d1 (commit) via 4d4fcabdfd9ceb02d947f6631370f6091e1ed337 (commit) from c3bb76dfd2bc732acb8d69ef47dacce9a55a6582 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8ff907113792d4554b2837afa7102427572997d1 commit 8ff907113792d4554b2837afa7102427572997d1 Merge: c3bb76d 4d4fcab Author: Brad King AuthorDate: Mon Dec 7 09:22:45 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 7 09:22:45 2015 -0500 Merge topic 'FindJNI-aix' 4d4fcabd FindJNI: Add support for AIX java sdk ----------------------------------------------------------------------- Summary of changes: Modules/FindJNI.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 7 09:22:50 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 7 Dec 2015 09:22:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-644-g939792f Message-ID: <20151207142250.1DF4BDF60D@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 939792fdf6d16e192566b1e661725a8a72d6bc7d (commit) via 306e2016bb3e285fcfb58e0f17657dc228b67812 (commit) via d5d90f5ec8792fafbe754e2c943825267f7aaff1 (commit) from 8ff907113792d4554b2837afa7102427572997d1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=939792fdf6d16e192566b1e661725a8a72d6bc7d commit 939792fdf6d16e192566b1e661725a8a72d6bc7d Merge: 8ff9071 306e201 Author: Brad King AuthorDate: Mon Dec 7 09:22:48 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 7 09:22:48 2015 -0500 Merge topic 'update-kwsys' 306e2016 Merge branch 'upstream-kwsys' into update-kwsys d5d90f5e KWSys 2015-12-03 (6bfc1aef) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/SystemTools.cxx | 26 ++---- Source/kwsys/testSystemTools.cxx | 188 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 197 insertions(+), 17 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 7 09:22:53 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 7 Dec 2015 09:22:53 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-647-g8cc5e2c Message-ID: <20151207142253.0DD5ADF600@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 8cc5e2cb87cc0b2868f10015688991f257371755 (commit) via 384ae5514e423fccb02e48a4da25e1549556d898 (commit) via 0be5020bf814efd040f7dcd35cc3a9f07d113458 (commit) from 939792fdf6d16e192566b1e661725a8a72d6bc7d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8cc5e2cb87cc0b2868f10015688991f257371755 commit 8cc5e2cb87cc0b2868f10015688991f257371755 Merge: 939792f 384ae55 Author: Brad King AuthorDate: Mon Dec 7 09:22:51 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 7 09:22:51 2015 -0500 Merge topic 'cmake-E-copy-multiple-inputs' 384ae551 cmake: Teach -E copy[_if_different] to support multiple files (#15703) 0be5020b cmake: Improve '-E' help message formatting ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake.1.rst | 12 ++-- Help/release/dev/cmake-E-copy-multiple-inputs.rst | 5 ++ Source/cmcmd.cxx | 73 ++++++++++++++------ Tests/RunCMake/CommandLine/E-no-arg-stderr.txt | 2 +- ...ource-directory-target-is-directory-result.txt} | 0 ...source-directory-target-is-directory-stderr.txt | 0 .../E_copy-one-source-file-result.txt} | 0 .../CommandLine/E_copy-one-source-file-stderr.txt | 1 + ...ee-source-files-target-is-directory-result.txt} | 0 ...ree-source-files-target-is-directory-stderr.txt | 0 ...y-three-source-files-target-is-file-result.txt} | 0 ...py-three-source-files-target-is-file-stderr.txt | 1 + ...ad-source-files-target-is-directory-result.txt} | 0 ...bad-source-files-target-is-directory-stderr.txt | 1 + ...ource-directory-target-is-directory-result.txt} | 0 ...source-directory-target-is-directory-stderr.txt | 0 ...ee-source-files-target-is-directory-result.txt} | 0 ...ree-source-files-target-is-directory-stderr.txt | 0 ...t-three-source-files-target-is-file-result.txt} | 0 ...nt-three-source-files-target-is-file-stderr.txt | 1 + .../CommandLine/E_create_symlink-no-arg-stderr.txt | 2 +- .../CommandLine/E_rename-no-arg-stderr.txt | 2 +- .../CommandLine/E_touch_nocreate-no-arg-stderr.txt | 2 +- Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 23 ++++++ .../RunCMake/CommandLine/copy_input/f1.txt | 0 .../RunCMake/CommandLine/copy_input/f2.txt | 0 .../RunCMake/CommandLine/copy_input/f3.txt | 0 27 files changed, 94 insertions(+), 31 deletions(-) create mode 100644 Help/release/dev/cmake-E-copy-multiple-inputs.rst copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_copy-one-source-directory-target-is-directory-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_copy-one-source-directory-target-is-directory-stderr.txt (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_copy-one-source-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_copy-one-source-file-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_copy-three-source-files-target-is-directory-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-directory-stderr.txt (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_copy-three-source-files-target-is-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_copy-three-source-files-target-is-file-stderr.txt copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_copy-two-good-and-one-bad-source-files-target-is-directory-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_copy_if_different-one-source-directory-target-is-directory-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_copy_if_different-one-source-directory-target-is-directory-stderr.txt (100%) copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_copy_if_different-three-source-files-target-is-directory-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-directory-stderr.txt (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_copy_if_different-three-source-files-target-is-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_copy_if_different-three-source-files-target-is-file-stderr.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/copy_input/f1.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/copy_input/f2.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/copy_input/f3.txt (100%) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 7 09:22:55 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 7 Dec 2015 09:22:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-649-gd9bbc8f Message-ID: <20151207142255.9FACDDF60D@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via d9bbc8f02b8374d258c254b2e105b951620d795a (commit) via 71e5f253f9b035be7049f36dab2e942220ff6209 (commit) from 8cc5e2cb87cc0b2868f10015688991f257371755 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9bbc8f02b8374d258c254b2e105b951620d795a commit d9bbc8f02b8374d258c254b2e105b951620d795a Merge: 8cc5e2c 71e5f25 Author: Brad King AuthorDate: Mon Dec 7 09:22:54 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 7 09:22:54 2015 -0500 Merge topic 'find-ftn-by-default' 71e5f253 Fortran: Add ftn, the Cray compiler wrapper, to the default search. ----------------------------------------------------------------------- Summary of changes: Modules/CMakeDetermineFortranCompiler.cmake | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 7 09:22:58 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 7 Dec 2015 09:22:58 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-651-g128d569 Message-ID: <20151207142258.A5E6FDF60D@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 128d569af02d95e455b5ee1d8dddec07251b7033 (commit) via ebaca6290d2c0be7dec22452389632949a700d28 (commit) from d9bbc8f02b8374d258c254b2e105b951620d795a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=128d569af02d95e455b5ee1d8dddec07251b7033 commit 128d569af02d95e455b5ee1d8dddec07251b7033 Merge: d9bbc8f ebaca62 Author: Brad King AuthorDate: Mon Dec 7 09:22:56 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 7 09:22:56 2015 -0500 Merge topic 'FindTIFF-imported-targets' ebaca629 FindTIFF: Add imported targets and update documentation ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindTIFF-imported-targets.rst | 4 ++ Modules/FindTIFF.cmake | 67 ++++++++++++++++++++---- Tests/CMakeLists.txt | 4 ++ Tests/{FindBoost => FindTIFF}/CMakeLists.txt | 8 +-- Tests/FindTIFF/Test/CMakeLists.txt | 17 ++++++ Tests/FindTIFF/Test/main.c | 12 +++++ 6 files changed, 98 insertions(+), 14 deletions(-) create mode 100644 Help/release/dev/FindTIFF-imported-targets.rst copy Tests/{FindBoost => FindTIFF}/CMakeLists.txt (54%) create mode 100644 Tests/FindTIFF/Test/CMakeLists.txt create mode 100644 Tests/FindTIFF/Test/main.c hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 7 09:23:29 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 7 Dec 2015 09:23:29 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1635-g279b421 Message-ID: <20151207142329.71334DF626@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 279b421bf8e42a41b5afee9a05916fe08e278f70 (commit) via 128d569af02d95e455b5ee1d8dddec07251b7033 (commit) via d9bbc8f02b8374d258c254b2e105b951620d795a (commit) via 8cc5e2cb87cc0b2868f10015688991f257371755 (commit) via 939792fdf6d16e192566b1e661725a8a72d6bc7d (commit) via 8ff907113792d4554b2837afa7102427572997d1 (commit) via c3bb76dfd2bc732acb8d69ef47dacce9a55a6582 (commit) via 335314e35f5bbfe4131895e9e877e4a19cd3e806 (commit) via eda493a38021f439b08807bb8202bab29e79635d (commit) via 5609ba1bcd4803547dfbb558d8de3c3d3af6369c (commit) via 2c03215050fee3695e7ed9362f35dff1ea9c3016 (commit) from 2dd7af2fb8a24af0e03608de327342abc0d49db6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=279b421bf8e42a41b5afee9a05916fe08e278f70 commit 279b421bf8e42a41b5afee9a05916fe08e278f70 Merge: 2dd7af2 128d569 Author: Brad King AuthorDate: Mon Dec 7 09:23:18 2015 -0500 Commit: Brad King CommitDate: Mon Dec 7 09:23:18 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 7 10:52:55 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 7 Dec 2015 10:52:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1640-g270a1ae Message-ID: <20151207155255.AE551DF4DC@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 270a1aef1c938e7683fb338075c6db432c50bc0e (commit) via bc35087da3eb9039dad8fb5d27c1fab60b43f776 (commit) via 98be140fc0dc0bab8955c4fea9274ea52ac8cd9c (commit) via 93cc80aee59cfb328d541ba527d40239ab8348b1 (commit) via 0903812b0b8c325913d766b793bbf9438ad6b423 (commit) from 279b421bf8e42a41b5afee9a05916fe08e278f70 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=270a1aef1c938e7683fb338075c6db432c50bc0e commit 270a1aef1c938e7683fb338075c6db432c50bc0e Merge: 279b421 bc35087 Author: Brad King AuthorDate: Mon Dec 7 10:52:54 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 7 10:52:54 2015 -0500 Merge topic 'cmake-E-copy-multiple-inputs' into next bc35087d cmake: Teach -E copy_directory to support multiple input directories 98be140f cmake: Refine -E copy[_if_different] documentation 93cc80ae cmake: Refine -E copy_if_different implementation indentation 0903812b cmake: Refine -E chdir documentation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc35087da3eb9039dad8fb5d27c1fab60b43f776 commit bc35087da3eb9039dad8fb5d27c1fab60b43f776 Author: Bartosz Kosiorek AuthorDate: Sun Dec 6 20:30:44 2015 +0100 Commit: Brad King CommitDate: Mon Dec 7 10:51:27 2015 -0500 cmake: Teach -E copy_directory to support multiple input directories diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index d5e8505..4cbe976 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -174,8 +174,9 @@ Available commands are: If multiple files are specified, the ```` must be directory and it must exist. -``copy_directory `` - Copy directory 'source' content to directory 'destination'. +``copy_directory ... `` + Copy directories to ```` directory. + If ```` directory does not exist it will be created. ``copy_if_different ... `` Copy files to ```` (either file or directory) if diff --git a/Help/release/dev/cmake-E-copy-multiple-inputs.rst b/Help/release/dev/cmake-E-copy-multiple-inputs.rst index 798af53..eeb1fab 100644 --- a/Help/release/dev/cmake-E-copy-multiple-inputs.rst +++ b/Help/release/dev/cmake-E-copy-multiple-inputs.rst @@ -3,3 +3,6 @@ cmake-E-copy-multiple-inputs * The :manual:`cmake(1)` ``-E copy`` and ``-E copy_if_different`` command-line tools learned to support copying multiple input files to a directory. + +* The :manual:`cmake(1)` ``-E copy_directory`` command-line + tool learned to support copying multiple input directories to a directory. diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index c823201..6a4234f 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -58,8 +58,8 @@ void CMakeCommandUsage(const char* program) << " compare_files file1 file2 - check if file1 is same as file2\n" << " copy ... destination - copy files to destination " "(either file or directory)\n" - << " copy_directory source destination - copy directory 'source' " - "content to directory 'destination'\n" + << " copy_directory ... destination - copy content of ... " + "directories to 'destination' directory\n" << " copy_if_different ... destination - copy files if it has " "changed\n" << " echo [...] - displays arguments as text\n" @@ -206,16 +206,22 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Copy directory content - if (args[1] == "copy_directory" && args.size() == 4) + if (args[1] == "copy_directory" && args.size() > 3) { - if(!cmSystemTools::CopyADirectory(args[2], args[3])) + // If error occurs we want to continue copying next files. + bool return_value = 0; + for (std::string::size_type cc = 2; cc < args.size() - 1; cc ++) { - std::cerr << "Error copying directory from \"" - << args[2] << "\" to \"" << args[3] - << "\".\n"; - return 1; + if(!cmSystemTools::CopyADirectory(args[cc].c_str(), + args[args.size() - 1].c_str())) + { + std::cerr << "Error copying directory from \"" + << args[cc] << "\" to \"" << args[args.size() - 1] + << "\".\n"; + return_value = 1; + } } - return 0; + return return_value; } // Rename a file or directory diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-result.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-result.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-stderr.txt new file mode 100644 index 0000000..6ca3677 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-stderr.txt @@ -0,0 +1,3 @@ +^Error copying directory from .* to .*file_for_test.txt\".* +Error copying directory from .* to .*file_for_test.txt\".* +Error copying directory from .* to .*file_for_test.txt\".$ diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-result.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-stderr.txt b/Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index dbc235d..57036ba 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -124,6 +124,23 @@ run_cmake_command(E_copy_if_different-three-source-files-target-is-file unset(in) unset(out) +set(in ${RunCMake_SOURCE_DIR}/copy_input) +set(out ${RunCMake_BINARY_DIR}/copy_directory_output) +set(outfile ${out}/file_for_test.txt) +file(REMOVE_RECURSE "${out}") +file(MAKE_DIRECTORY ${out}) +file(WRITE ${outfile} "") +run_cmake_command(E_copy_directory-three-source-files-target-is-directory + ${CMAKE_COMMAND} -E copy_directory ${in}/d1 ${in}/d2 ${in}/d3 ${out}) +run_cmake_command(E_copy_directory-three-source-files-target-is-file + ${CMAKE_COMMAND} -E copy_directory ${in}/d1 ${in}/d2 ${in}/d3 ${outfile}) +run_cmake_command(E_copy_directory-three-source-files-target-is-not-exist + ${CMAKE_COMMAND} -E copy_directory ${in}/d1 ${in}/d2 ${in}/d3 ${out}/not_existing_directory) +unset(in) +unset(out) +unset(outfile) + + run_cmake_command(E_env-no-command0 ${CMAKE_COMMAND} -E env) run_cmake_command(E_env-no-command1 ${CMAKE_COMMAND} -E env TEST_ENV=1) run_cmake_command(E_env-bad-arg1 ${CMAKE_COMMAND} -E env -bad-arg1) diff --git a/Tests/RunCMake/CommandLine/copy_input/d1/d1.txt b/Tests/RunCMake/CommandLine/copy_input/d1/d1.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CommandLine/copy_input/d2/d2.txt b/Tests/RunCMake/CommandLine/copy_input/d2/d2.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CommandLine/copy_input/d3/d3.txt b/Tests/RunCMake/CommandLine/copy_input/d3/d3.txt new file mode 100644 index 0000000..e69de29 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98be140fc0dc0bab8955c4fea9274ea52ac8cd9c commit 98be140fc0dc0bab8955c4fea9274ea52ac8cd9c Author: Bartosz Kosiorek AuthorDate: Sun Dec 6 20:30:44 2015 +0100 Commit: Brad King CommitDate: Mon Dec 7 10:51:27 2015 -0500 cmake: Refine -E copy[_if_different] documentation diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index 086f259..d5e8505 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -170,13 +170,18 @@ Available commands are: Check if file1 is same as file2. ``copy ... `` - Copy files to 'destination' (either file or directory). + Copy files to ```` (either file or directory). + If multiple files are specified, the ```` must be + directory and it must exist. ``copy_directory `` Copy directory 'source' content to directory 'destination'. ``copy_if_different ... `` - Copy files if input has changed. Destination could be file or directory. + Copy files to ```` (either file or directory) if + they have changed. + If multiple files are specified, the ```` must be + directory and it must exist. ``echo [...]`` Displays arguments as text. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93cc80aee59cfb328d541ba527d40239ab8348b1 commit 93cc80aee59cfb328d541ba527d40239ab8348b1 Author: Bartosz Kosiorek AuthorDate: Sun Dec 6 20:30:44 2015 +0100 Commit: Brad King CommitDate: Mon Dec 7 10:51:14 2015 -0500 cmake: Refine -E copy_if_different implementation indentation diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 33700a1..c823201 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -197,8 +197,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) args[args.size() - 1].c_str())) { std::cerr << "Error copying file (if different) from \"" - << args[cc] << "\" to \"" << args[args.size() - 1] - << "\".\n"; + << args[cc] << "\" to \"" << args[args.size() - 1] + << "\".\n"; return_value = 1; } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0903812b0b8c325913d766b793bbf9438ad6b423 commit 0903812b0b8c325913d766b793bbf9438ad6b423 Author: Bartosz Kosiorek AuthorDate: Sun Dec 6 20:30:44 2015 +0100 Commit: Brad King CommitDate: Mon Dec 7 10:50:42 2015 -0500 cmake: Refine -E chdir documentation diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 0dc5a9a..33700a1 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -54,7 +54,7 @@ void CMakeCommandUsage(const char* program) errorStream << "Usage: " << program << " -E [arguments...]\n" << "Available commands: \n" - << " chdir dir cmd [args]... - run command in a given directory\n" + << " chdir dir cmd [args...] - run command in a given directory\n" << " compare_files file1 file2 - check if file1 is same as file2\n" << " copy ... destination - copy files to destination " "(either file or directory)\n" ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake.1.rst | 14 ++++++--- Help/release/dev/cmake-E-copy-multiple-inputs.rst | 3 ++ Source/cmcmd.cxx | 30 ++++++++++++-------- ...ee-source-files-target-is-directory-result.txt} | 0 ...ree-source-files-target-is-directory-stderr.txt | 0 ...y-three-source-files-target-is-file-result.txt} | 0 ...ry-three-source-files-target-is-file-stderr.txt | 3 ++ ...ee-source-files-target-is-not-exist-result.txt} | 0 ...ree-source-files-target-is-not-exist-stderr.txt | 0 Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 17 +++++++++++ .../RunCMake/CommandLine/copy_input/d1/d1.txt | 0 .../RunCMake/CommandLine/copy_input/d2/d2.txt | 0 .../RunCMake/CommandLine/copy_input/d3/d3.txt | 0 13 files changed, 51 insertions(+), 16 deletions(-) copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_copy_directory-three-source-files-target-is-directory-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-stderr.txt (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_copy_directory-three-source-files-target-is-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_copy_directory-three-source-files-target-is-not-exist-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-stderr.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/copy_input/d1/d1.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/copy_input/d2/d2.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/copy_input/d3/d3.txt (100%) hooks/post-receive -- CMake From chuck.atkins at kitware.com Mon Dec 7 11:31:29 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Mon, 7 Dec 2015 11:31:29 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1644-g8890311 Message-ID: <20151207163130.4CBE1DF8EB@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 88903117356d43bca0ae6e01b5aa3b687bc8a32f (commit) via eb253f04c3b90cfd692d664fbdfe289c1d0b61a0 (commit) via 0763a8365528166747746e3b94e74ca98d0d705f (commit) via 5eaac0c96ac51e1300664ef37239f3215bb58489 (commit) from 270a1aef1c938e7683fb338075c6db432c50bc0e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=88903117356d43bca0ae6e01b5aa3b687bc8a32f commit 88903117356d43bca0ae6e01b5aa3b687bc8a32f Merge: 270a1ae eb253f0 Author: Chuck Atkins AuthorDate: Mon Dec 7 11:31:26 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 7 11:31:26 2015 -0500 Merge topic 'detect-cray-wrappers' into next eb253f04 Cray: Refactor the Cray platform files to use compiler wrapper checks 0763a836 Cray: Add macro tests to detect the Cray compiler wrappers 5eaac0c9 Compiler: Add infrastructure for detecting compiler wrappers https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb253f04c3b90cfd692d664fbdfe289c1d0b61a0 commit eb253f04c3b90cfd692d664fbdfe289c1d0b61a0 Author: Chuck Atkins AuthorDate: Wed Dec 2 10:00:44 2015 -0600 Commit: Chuck Atkins CommitDate: Mon Dec 7 11:18:11 2015 -0500 Cray: Refactor the Cray platform files to use compiler wrapper checks This is an extensive refactoring of the Cray compiler wrapper usage. Using the new compiler wrapper checks, the CrayPrgEnv info files have been moved from Platform/ to Compiler/. Thhe adjusted naming convention allows the compiler-wrapper information files to be loaded for both the CrayLinuxEnvironment platform when cross-compiling and the Linux platform if building natively on the Cray compute nodes. It also creates a seperation of common arguments for compiler id and language information used to perfrom the appropriate introspection of implicit arguments and libvraries used by the compiler wrappers based on the loaded module environment. diff --git a/Modules/Compiler/CrayPrgEnv-C.cmake b/Modules/Compiler/CrayPrgEnv-C.cmake new file mode 100644 index 0000000..6b461ce --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-C.cmake @@ -0,0 +1,11 @@ +if(__craylinux_crayprgenv_c) + return() +endif() +set(__craylinux_crayprgenv_c 1) + +include(Compiler/CrayPrgEnv) +macro(__CrayPrgEnv_setup_C compiler_cmd link_cmd) + __CrayPrgEnv_setup(C + ${CMAKE_ROOT}/Modules/CMakeCCompilerABI.c + ${compiler_cmd} ${link_cmd}) +endmacro() diff --git a/Modules/Compiler/CrayPrgEnv-CXX.cmake b/Modules/Compiler/CrayPrgEnv-CXX.cmake new file mode 100644 index 0000000..aad85b6 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-CXX.cmake @@ -0,0 +1,11 @@ +if(__craylinux_crayprgenv_cxx) + return() +endif() +set(__craylinux_crayprgenv_cxx 1) + +include(Compiler/CrayPrgEnv) +macro(__CrayPrgEnv_setup_CXX compiler_cmd link_cmd) + __CrayPrgEnv_setup(CXX + ${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp + ${compiler_cmd} ${link_cmd}) +endmacro() diff --git a/Modules/Compiler/CrayPrgEnv-Cray-C.cmake b/Modules/Compiler/CrayPrgEnv-Cray-C.cmake new file mode 100644 index 0000000..547a4b4 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Cray-C.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_cray_c) + return() +endif() +set(__craylinux_crayprgenv_cray_c 1) + +include(Compiler/CrayPrgEnv-C) +__CrayPrgEnv_setup_C("/opt/cray/cce/.*/ccfe" "/opt/cray/cce/.*/ld") diff --git a/Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake b/Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake new file mode 100644 index 0000000..df8452c --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_cray_cxx) + return() +endif() +set(__craylinux_crayprgenv_cray_cxx 1) + +include(Compiler/CrayPrgEnv-CXX) +__CrayPrgEnv_setup_CXX("/opt/cray/cce/.*/ccfe" "/opt/cray/cce/.*/ld") diff --git a/Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake new file mode 100644 index 0000000..9f46a04 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_cray_fortran) + return() +endif() +set(__craylinux_crayprgenv_cray_fortran 1) + +include(Compiler/CrayPrgEnv-Fortran) +__CrayPrgEnv_setup_Fortran("/opt/cray/cce/.*/ftnfe" "/opt/cray/cce/.*/ld") diff --git a/Modules/Compiler/CrayPrgEnv-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-Fortran.cmake new file mode 100644 index 0000000..9c4d269 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Fortran.cmake @@ -0,0 +1,11 @@ +if(__craylinux_crayprgenv_fortran) + return() +endif() +set(__craylinux_crayprgenv_fortran 1) + +include(Compiler/CrayPrgEnv) +macro(__CrayPrgEnv_setup_Fortran compiler_cmd link_cmd) + __CrayPrgEnv_setup(Fortran + ${CMAKE_ROOT}/Modules/CMakeFortranCompilerABI.F + ${compiler_cmd} ${link_cmd}) +endmacro() diff --git a/Modules/Compiler/CrayPrgEnv-GNU-C.cmake b/Modules/Compiler/CrayPrgEnv-GNU-C.cmake new file mode 100644 index 0000000..248081b --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-GNU-C.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_gnu_c) + return() +endif() +set(__craylinux_crayprgenv_gnu_c 1) + +include(Compiler/CrayPrgEnv-C) +__CrayPrgEnv_setup_C("/opt/gcc/.*/cc1" "/opt/gcc/.*/collect2") diff --git a/Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake b/Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake new file mode 100644 index 0000000..be4eb6d --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_gnu_cxx) + return() +endif() +set(__craylinux_crayprgenv_gnu_cxx 1) + +include(Compiler/CrayPrgEnv-CXX) +__CrayPrgEnv_setup_CXX("/opt/gcc/.*/cc1plus" "/opt/gcc/.*/collect2") diff --git a/Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake new file mode 100644 index 0000000..8bd23ff --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_gnu_fortran) + return() +endif() +set(__craylinux_crayprgenv_gnu_fortran 1) + +include(Compiler/CrayPrgEnv-Fortran) +__CrayPrgEnv_setup_Fortran("/opt/gcc/.*/f951" "/opt/gcc/.*/collect2") diff --git a/Modules/Compiler/CrayPrgEnv-Intel-C.cmake b/Modules/Compiler/CrayPrgEnv-Intel-C.cmake new file mode 100644 index 0000000..83c4e38 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Intel-C.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_intel_c) + return() +endif() +set(__craylinux_crayprgenv_intel_c 1) + +include(Compiler/CrayPrgEnv-C) +__CrayPrgEnv_setup_C("/opt/intel/.*/mcpcom" "^ld ") diff --git a/Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake b/Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake new file mode 100644 index 0000000..3c3c3e6 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_intel_cxx) + return() +endif() +set(__craylinux_crayprgenv_intel_cxx 1) + +include(Compiler/CrayPrgEnv-CXX) +__CrayPrgEnv_setup_CXX("/opt/intel/.*/mcpcom" "^ld ") diff --git a/Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake new file mode 100644 index 0000000..08a316d --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_intel_fortran) + return() +endif() +set(__craylinux_crayprgenv_intel_fortran 1) + +include(Compiler/CrayPrgEnv-Fortran) +__CrayPrgEnv_setup_Fortran("/opt/intel/.*/fortcom" "^ld ") diff --git a/Modules/Compiler/CrayPrgEnv-PGI-C.cmake b/Modules/Compiler/CrayPrgEnv-PGI-C.cmake new file mode 100644 index 0000000..f45767c --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-PGI-C.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_pgi_c) + return() +endif() +set(__craylinux_crayprgenv_pgi_c 1) + +include(Compiler/CrayPrgEnv-C) +__CrayPrgEnv_setup_C("/opt/pgi/[^ ]*/pgc" "/usr/bin/ld") diff --git a/Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake b/Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake new file mode 100644 index 0000000..a2a286f --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_pgi_cxx) + return() +endif() +set(__craylinux_crayprgenv_pgi_cxx 1) + +include(Compiler/CrayPrgEnv-CXX) +__CrayPrgEnv_setup_CXX("/opt/pgi/[^ ]*/pgcpp" "/usr/bin/ld") diff --git a/Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake new file mode 100644 index 0000000..f6ba7c0 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_pgi_fortran) + return() +endif() +set(__craylinux_crayprgenv_pgi_fortran 1) + +include(Compiler/CrayPrgEnv-Fortran) +__CrayPrgEnv_setup_Fortran("/opt/pgi/[^ ]*/pgf" "/usr/bin/ld") diff --git a/Modules/Compiler/CrayPrgEnv.cmake b/Modules/Compiler/CrayPrgEnv.cmake new file mode 100644 index 0000000..c3e7b73 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv.cmake @@ -0,0 +1,83 @@ +# Guard against multiple inclusions +if(__craylinux_crayprgenv) + return() +endif() +set(__craylinux_crayprgenv 1) + +macro(__cray_extract_args cmd tag_regex out_var) + string(REGEX MATCHALL "${tag_regex}" args "${cmd}") + foreach(arg IN LISTS args) + string(REGEX REPLACE "^${tag_regex}$" "\\2" param "${arg}") + get_filename_component(param_abs "${param}" ABSOLUTE) + list(APPEND ${out_var} ${param_abs}) + endforeach() +endmacro() + +function(__cray_extract_implicit src compiler_cmd link_cmd lang include_dirs_var link_dirs_var link_libs_var) + execute_process( + COMMAND ${CMAKE_${lang}_COMPILER} + ${CMAKE_${lang}_VERBOSE_FLAG} -o cray_extract_implicit_${lang} ${src} + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + ) + string(REGEX REPLACE "\r?\n" ";" output_lines "${output}\n${error}") + foreach(line IN LISTS output_lines) + if("${line}" MATCHES "${compiler_cmd}") + __cray_extract_args("${line}" " -(I ?|isystem )([^ ]*)" include_dirs) + set(processed_include 1) + endif() + if("${line}" MATCHES "${link_cmd}") + __cray_extract_args("${line}" " -(L ?)([^ ]*)" link_dirs) + __cray_extract_args("${line}" " -(l ?)([^ ]*)" link_libs) + set(processed_link 1) + endif() + if(processed_include AND processed_link) + break() + endif() + endforeach() + + set(${include_dirs_var} "${include_dirs}" PARENT_SCOPE) + set(${link_dirs_var} "${link_dirs}" PARENT_SCOPE) + set(${link_libs_var} "${link_libs}" PARENT_SCOPE) + set(CRAY_${lang}_EXTRACTED_IMPLICIT 1 CACHE INTERNAL "" FORCE) +endfunction() + +macro(__CrayPrgEnv_setup lang test_src compiler_cmd link_cmd) + if(DEFINED ENV{CRAYPE_VERSION}) + message(STATUS "Cray Programming Environment $ENV{CRAYPE_VERSION} ${lang}") + elseif(DEFINED ENV{ASYNCPE_VERSION}) + message(STATUS "Cray XT Programming Environment $ENV{ASYNCPE_VERSION} ${lang}") + endif() + + # Flags for the Cray wrappers + set(CMAKE_STATIC_LIBRARY_LINK_${lang}_FLAGS "-static") + set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") + set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared") + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-dynamic") + + # If the link type is not explicitly specified in the environment then + # the Cray wrappers assume that the code will be built staticly so + # we check the following condition(s) are NOT met + # Compiler flags are explicitly dynamic + # Env var is dynamic and compiler flags are not explicitly static + if(NOT (((CMAKE_${lang}_FLAGS MATCHES "(^| )-dynamic($| )") OR + (CMAKE_EXE_LINKER_FLAGS MATCHES "(^| )-dynamic($| )")) + OR + (("$ENV{CRAYPE_LINK_TYPE}" STREQUAL "dynamic") AND + NOT ((CMAKE_${lang}_FLAGS MATCHES "(^| )-static($| )") OR + (CMAKE_EXE_LINKER_FLAGS MATCHES "(^| )-static($| )"))))) + set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) + set(BUILD_SHARED_LIBS FALSE CACHE BOOL "") + set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + set(CMAKE_LINK_SEARCH_START_STATIC TRUE) + endif() + if(NOT CRAY_${lang}_EXTRACTED_IMPLICIT) + __cray_extract_implicit( + ${test_src} ${compiler_cmd} ${link_cmd} ${lang} + CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES + CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES + CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES + ) + endif() +endmacro() diff --git a/Modules/Platform/CrayLinuxEnvironment.cmake b/Modules/Platform/CrayLinuxEnvironment.cmake index 19a0f71..97771a2 100644 --- a/Modules/Platform/CrayLinuxEnvironment.cmake +++ b/Modules/Platform/CrayLinuxEnvironment.cmake @@ -2,12 +2,6 @@ # needs to be custom. We use the variables defined through Cray's environment # modules to set up the right paths for things. -# Guard against multiple inclusions -if(__CrayLinuxEnvironment) - return() -endif() -set(__CrayLinuxEnvironment 1) - set(UNIX 1) if(DEFINED ENV{CRAYOS_VERSION}) @@ -17,7 +11,12 @@ elseif(DEFINED ENV{XTOS_VERSION}) else() message(FATAL_ERROR "Neither the CRAYOS_VERSION or XTOS_VERSION environment variables are defined. This platform file should be used inside the Cray Linux Environment for targeting compute nodes (NIDs)") endif() -message(STATUS "Cray Linux Environment ${CMAKE_SYSTEM_VERSION}") + +# Guard against multiple messages +if(NOT __CrayLinuxEnvironment_message) + set(__CrayLinuxEnvironment_message 1) + message(STATUS "Cray Linux Environment ${CMAKE_SYSTEM_VERSION}") +endif() # All cray systems are x86 CPUs and have been for quite some time # Note: this may need to change in the future with 64-bit ARM @@ -29,8 +28,13 @@ set(CMAKE_STATIC_LIBRARY_PREFIX "lib") set(CMAKE_STATIC_LIBRARY_SUFFIX ".a") set(CMAKE_FIND_LIBRARY_PREFIXES "lib") -set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a") -set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) + +# Don't override shared lib support if it's already been set and possibly +# overridden elsewhere by the CrayPrgEnv module +if(NOT CMAKE_FIND_LIBRARY_SUFFIXES) + set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a") + set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) +endif() set(CMAKE_DL_LIBS dl) @@ -42,7 +46,6 @@ set(CMAKE_DL_LIBS dl) get_filename_component(__cmake_install_dir "${CMAKE_ROOT}" PATH) get_filename_component(__cmake_install_dir "${__cmake_install_dir}" PATH) - # Note: Some Cray's have the SYSROOT_DIR variable defined, pointing to a copy # of the NIDs userland. If so, then we'll use it. Otherwise, just assume # the userland from the login node is ok @@ -78,35 +81,63 @@ list(APPEND CMAKE_SYSTEM_LIBRARY_PATH $ENV{SYSROOT_DIR}/usr/lib64 $ENV{SYSROOT_DIR}/lib64 ) - list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES $ENV{SYSROOT_DIR}/usr/local/lib64 $ENV{SYSROOT_DIR}/usr/lib64 $ENV{SYSROOT_DIR}/lib64 ) -list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES - $ENV{SYSROOT_DIR}/usr/include -) -list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES - $ENV{SYSROOT_DIR}/usr/include -) -list(APPEND CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES - $ENV{SYSROOT_DIR}/usr/include -) -# Enable use of lib64 search path variants by default. -set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) +# Compute the intersection of several lists +function(__cray_list_intersect OUTPUT INPUT0) + if(ARGC EQUAL 2) + list(APPEND ${OUTPUT} ${${INPUT0}}) + else() + foreach(I IN LISTS ${INPUT0}) + set(__is_common 1) + foreach(L IN LISTS ARGN) + list(FIND ${L} "${I}" __idx) + if(__idx EQUAL -1) + set(__is_common 0) + break() + endif() + endforeach() + if(__is_common) + list(APPEND ${OUTPUT} "${I}") + endif() + endforeach() + endif() + set(${OUTPUT} ${${OUTPUT}} PARENT_SCOPE) +endfunction() -# Check to see if we're using the cray compiler wrappers and load accordingly -# if we are -if(DEFINED ENV{CRAYPE_DIR}) - set(_CRAYPE_ROOT "$ENV{CRAYPE_DIR}") -elseif(DEFINED ENV{ASYNCPE_DIR}) - set(_CRAYPE_ROOT "$ENV{ASYNCPE_DIR}") +macro(__list_clean_dupes var) + if(${var}) + list(REMOVE_DUPLICATES ${var}) + endif() +endmacro() + +get_property(__langs GLOBAL PROPERTY ENABLED_LANGUAGES) +set(__cray_inc_path_vars) +set(__cray_lib_path_vars) +foreach(__lang IN LISTS __langs) + list(APPEND __cray_inc_path_vars CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES) + list(APPEND __cray_lib_path_vars CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES) +endforeach() +if(__cray_inc_path_vars) + __cray_list_intersect(__cray_implicit_include_dirs ${__cray_inc_path_vars}) + if(__cray_implicit_include_dirs) + list(INSERT CMAKE_SYSTEM_INCLUDE_PATH 0 ${__cray_implicit_include_dirs}) + endif() endif() -if(_CRAYPE_ROOT AND - ((CMAKE_C_COMPILER MATCHES "${_CRAYPE_ROOT}") OR - (CMAKE_CXX_COMPILER MATCHES "${_CRAYPE_ROOT}") OR - (CMAKE_Fortran_COMPILER MATCHES "${_CRAYPE_ROOT}"))) - include(Platform/CrayPrgEnv) +if(__cray_lib_path_vars) + __cray_list_intersect(__cray_implicit_library_dirs ${__cray_lib_path_vars}) + if(__cray_implicit_library_dirs) + list(INSERT CMAKE_SYSTEM_LIBRARY_PATH 0 ${__cray_implicit_library_dirs}) + endif() endif() +__list_clean_dupes(CMAKE_SYSTEM_PREFIX_PATH) +__list_clean_dupes(CMAKE_SYSTEM_INCLUDE_PATH) +__list_clean_dupes(CMAKE_SYSTEM_LIBRARY_PATH) +__list_clean_dupes(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES) + +# Enable use of lib64 search path variants by default. +set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) diff --git a/Modules/Platform/CrayPrgEnv.cmake b/Modules/Platform/CrayPrgEnv.cmake deleted file mode 100644 index d60266b..0000000 --- a/Modules/Platform/CrayPrgEnv.cmake +++ /dev/null @@ -1,149 +0,0 @@ -# Guard against multiple inclusions -if(__CrayPrgEnv) - return() -endif() -set(__CrayPrgEnv 1) -if(DEFINED ENV{CRAYPE_VERSION}) - message(STATUS "Cray Programming Environment $ENV{CRAYPE_VERSION}") - set(__verbose_flag "-craype-verbose") -elseif(DEFINED ENV{ASYNCPE_VERSION}) - message(STATUS "Cray Programming Environment $ENV{ASYNCPE_VERSION}") - set(__verbose_flag "-v") -else() - message(STATUS "Cray Programming Environment") -endif() - -if(NOT __CrayLinuxEnvironment) - message(FATAL_ERROR "The CrayPrgEnv platform file must not be used on its own and is intented to be included by the CrayLinuxEnvironment platform file") -endif() - -# Flags for the Cray wrappers -foreach(__lang C CXX Fortran) - set(CMAKE_STATIC_LIBRARY_LINK_${__lang}_FLAGS "-static") - set(CMAKE_SHARED_LIBRARY_${__lang}_FLAGS "") - set(CMAKE_SHARED_LIBRARY_CREATE_${__lang}_FLAGS "-shared") - set(CMAKE_SHARED_LIBRARY_LINK_${__lang}_FLAGS "-dynamic") -endforeach() - -# If the link type is not explicitly specified in the environment then -# the Cray wrappers assume that the code will be built staticly so -# we check the following condition(s) are NOT met -# Compiler flags are explicitly dynamic -# Env var is dynamic and compiler flags are not explicitly static -if(NOT (((CMAKE_C_FLAGS MATCHES "(^| )-dynamic($| )") OR - (CMAKE_CXX_FLAGS MATCHES "(^| )-dynamic($| )") OR - (CMAKE_Fortran_FLAGS MATCHES "(^| )-dynamic($| )") OR - (CMAKE_EXE_LINKER_FLAGS MATCHES "(^| )-dynamic($| )")) - OR - (("$ENV{CRAYPE_LINK_TYPE}" STREQUAL "dynamic") AND - NOT ((CMAKE_C_FLAGS MATCHES "(^| )-static($| )") OR - (CMAKE_CXX_FLAGS MATCHES "(^| )-static($| )") OR - (CMAKE_Fortran_FLAGS MATCHES "(^| )-static($| )") OR - (CMAKE_EXE_LINKER_FLAGS MATCHES "(^| )-static($| )"))))) - set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) - set(BUILD_SHARED_LIBS FALSE CACHE BOOL "") - set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") - set(CMAKE_LINK_SEARCH_START_STATIC TRUE) -endif() - -function(__cray_parse_flags_with_sep OUTPUT FLAG_TAG SEP INPUT) - string(REGEX MATCHALL "${SEP}${FLAG_TAG}([^${SEP}]+)" FLAG_ARGS "${INPUT}") - foreach(FLAG_ARG IN LISTS FLAG_ARGS) - string(REGEX REPLACE - "^${SEP}${FLAG_TAG}([^${SEP}]+)" "\\1" FLAG_VALUE - "${FLAG_ARG}") - list(APPEND ${OUTPUT} ${FLAG_VALUE}) - endforeach() - set(${OUTPUT} ${${OUTPUT}} PARENT_SCOPE) -endfunction() -macro(__cray_parse_flags OUTPUT FLAG_TAG INPUT) - __cray_parse_flags_with_sep(${OUTPUT} ${FLAG_TAG} " " "${INPUT}") -endmacro() - -# Remove duplicates in a list -macro(__cray_list_remove_duplicates VAR) - if(${VAR}) - list(REMOVE_DUPLICATES ${VAR}) - endif() -endmacro() - -# Compute the intersection of several lists -function(__cray_list_intersect OUTPUT INPUT0) - if(ARGC EQUAL 2) - list(APPEND ${OUTPUT} ${${INPUT0}}) - else() - foreach(I IN LISTS ${INPUT0}) - set(__is_common 1) - foreach(L IN LISTS ARGN) - list(FIND ${L} "${I}" __idx) - if(__idx EQUAL -1) - set(__is_common 0) - break() - endif() - endforeach() - if(__is_common) - list(APPEND ${OUTPUT} "${I}") - endif() - endforeach() - endif() - set(${OUTPUT} ${${OUTPUT}} PARENT_SCOPE) -endfunction() - -# Parse the implicit directories used by the wrappers -get_property(__langs GLOBAL PROPERTY ENABLED_LANGUAGES) -foreach(__lang IN LISTS __langs) - if(__lang STREQUAL "C") - set(__empty empty.c) - elseif(__lang STREQUAL CXX) - set(__empty empty.cxx) - elseif(__lang STREQUAL Fortran) - set(__empty empty.f90) - else() - continue() - endif() - - execute_process( - COMMAND ${CMAKE_${__lang}_COMPILER} ${__verbose_flag} ${__empty} - OUTPUT_VARIABLE __cmd_out - ERROR_QUIET - ) - string(REGEX MATCH "(^|\n)[^\n]*${__empty}[^\n]*" __driver "${__cmd_out}") - - # Parse include paths - set(__cray_flag_args) - __cray_parse_flags(__cray_flag_args "-I" "${__driver}") - __cray_parse_flags(__cray_flag_args "-isystem " "${__driver}") - list(APPEND CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES ${__cray_flag_args}) - __cray_list_remove_duplicates(CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES) - - # Parse library paths - set(__cray_flag_args) - __cray_parse_flags(__cray_flag_args "-L" "${__driver}") - list(APPEND CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES ${__cray_flag_args}) - __cray_list_remove_duplicates(CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES) - - # Parse libraries - set(__cray_flag_args) - __cray_parse_flags(__cray_flag_args "-l" "${__driver}") - __cray_parse_flags(__cray_linker_flags "-Wl" "${__driver}") - foreach(F IN LISTS __cray_linker_flags) - __cray_parse_flags_with_sep(__cray_flag_args "-l" "," "${F}") - endforeach() - list(APPEND CMAKE_${__lang}_IMPLICIT_LINK_LIBRARIES ${__cray_flag_args}) - __cray_list_remove_duplicates(CMAKE_${__lang}_IMPLICIT_LINK_LIBRARIES) -endforeach() - -# Determine the common directories between all languages and add them -# as system search paths -set(__cray_inc_path_vars) -set(__cray_lib_path_vars) -foreach(__lang IN LISTS __langs) - list(APPEND __cray_inc_path_vars CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES) - list(APPEND __cray_lib_path_vars CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES) -endforeach() -if(__cray_inc_path_vars) - __cray_list_intersect(CMAKE_SYSTEM_INCLUDE_PATH ${__cray_inc_path_vars}) -endif() -if(__cray_lib_path_vars) - __cray_list_intersect(CMAKE_SYSTEM_LIBRARY_PATH ${__cray_lib_path_vars}) -endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0763a8365528166747746e3b94e74ca98d0d705f commit 0763a8365528166747746e3b94e74ca98d0d705f Author: Chuck Atkins AuthorDate: Wed Dec 2 09:59:47 2015 -0600 Commit: Chuck Atkins CommitDate: Mon Dec 7 11:09:15 2015 -0500 Cray: Add macro tests to detect the Cray compiler wrappers diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index 63f8787..5bfe0fd 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -21,6 +21,10 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; char const* qnxnto = "INFO" ":" "qnxnto[]"; #endif +#if defined(__CRAYXE) || defined(__CRAYXC) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + @CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@ @CMAKE_C_COMPILER_ID_ERROR_FOR_TEST@ @@ -55,6 +59,9 @@ int main(int argc, char* argv[]) #ifdef SIMULATE_VERSION_MAJOR require += info_simulate_version[argc]; #endif +#if defined(__CRAYXE) || defined(__CRAYXC) + require += info_cray[argc]; +#endif require += info_language_dialect_default[argc]; (void)argv; return require; diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 61cd790..3e5c0fc 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -20,6 +20,10 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; char const* qnxnto = "INFO" ":" "qnxnto[]"; #endif +#if defined(__CRAYXE) || defined(__CRAYXC) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + @CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@ @CMAKE_CXX_COMPILER_ID_ERROR_FOR_TEST@ @@ -49,6 +53,9 @@ int main(int argc, char* argv[]) #ifdef SIMULATE_VERSION_MAJOR require += info_simulate_version[argc]; #endif +#if defined(__CRAYXE) || defined(__CRAYXC) + require += info_cray[argc]; +#endif require += info_language_dialect_default[argc]; (void)argv; return require; diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in index 2f7f40e..67cda3b 100644 --- a/Modules/CMakeFortranCompilerId.F.in +++ b/Modules/CMakeFortranCompilerId.F.in @@ -110,6 +110,9 @@ # endif PRINT *, 'INFO:compiler[]' #endif +#if defined(__CRAYXE) || defined(__CRAYXC) + PRINT *, 'INFO:compiler_wrapper[CrayPrgEnv]' +#endif #if 0 ! Identify the platform https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5eaac0c96ac51e1300664ef37239f3215bb58489 commit 5eaac0c96ac51e1300664ef37239f3215bb58489 Author: Chuck Atkins AuthorDate: Wed Dec 2 08:47:43 2015 -0600 Commit: Chuck Atkins CommitDate: Mon Dec 7 11:09:06 2015 -0500 Compiler: Add infrastructure for detecting compiler wrappers diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in index c72e338..f109a14 100644 --- a/Modules/CMakeCCompiler.cmake.in +++ b/Modules/CMakeCCompiler.cmake.in @@ -2,6 +2,7 @@ set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@") set(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@") set(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@") set(CMAKE_C_COMPILER_VERSION "@CMAKE_C_COMPILER_VERSION@") +set(CMAKE_C_COMPILER_WRAPPER "@CMAKE_C_COMPILER_WRAPPER@") set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "@CMAKE_C_STANDARD_COMPUTED_DEFAULT@") set(CMAKE_C_COMPILE_FEATURES "@CMAKE_C_COMPILE_FEATURES@") set(CMAKE_C90_COMPILE_FEATURES "@CMAKE_C90_COMPILE_FEATURES@") diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index d2417aa..fa87ca8 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -18,6 +18,8 @@ # It also loads a system - compiler - processor (or target hardware) # specific file, which is mainly useful for crosscompiling and embedded systems. +include(CMakeLanguageInformation) + # some compilers use different extensions (e.g. sdcc uses .rel) # so set the extension here first so it can be overridden by the compiler specific file if(UNIX) @@ -60,6 +62,12 @@ if (NOT _INCLUDED_FILE) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) endif () + +# load any compiler-wrapper specific information +if (CMAKE_C_COMPILER_WRAPPER) + __cmake_include_compiler_wrapper(C) +endif () + # We specify the compiler information in the system file for some # platforms, but this language may not have been enabled when the file # was first included. Include it again to get the language info. diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in index 52e44f6..9e90aea 100644 --- a/Modules/CMakeCXXCompiler.cmake.in +++ b/Modules/CMakeCXXCompiler.cmake.in @@ -2,6 +2,7 @@ set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@") set(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@") set(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@") set(CMAKE_CXX_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@") +set(CMAKE_CXX_COMPILER_WRAPPER "@CMAKE_CXX_COMPILER_WRAPPER@") set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "@CMAKE_CXX_STANDARD_COMPUTED_DEFAULT@") set(CMAKE_CXX_COMPILE_FEATURES "@CMAKE_CXX_COMPILE_FEATURES@") set(CMAKE_CXX98_COMPILE_FEATURES "@CMAKE_CXX98_COMPILE_FEATURES@") diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index 091627b..b35280f 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -18,6 +18,8 @@ # It also loads a system - compiler - processor (or target hardware) # specific file, which is mainly useful for crosscompiling and embedded systems. +include(CMakeLanguageInformation) + # some compilers use different extensions (e.g. sdcc uses .rel) # so set the extension here first so it can be overridden by the compiler specific file if(UNIX) @@ -59,6 +61,12 @@ if (NOT _INCLUDED_FILE) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) endif () + +# load any compiler-wrapper specific information +if (CMAKE_CXX_COMPILER_WRAPPER) + __cmake_include_compiler_wrapper(CXX) +endif () + # We specify the compiler information in the system file for some # platforms, but this language may not have been enabled when the file # was first included. Include it again to get the language info. diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 81c2509..eb54814 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -107,6 +107,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) PARENT_SCOPE) set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) + set(CMAKE_${lang}_COMPILER_WRAPPER "${CMAKE_${lang}_COMPILER_WRAPPER}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE) set(CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT "${CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT}" PARENT_SCOPE) @@ -435,6 +436,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) set(HAVE_COMPILER_VERSION_MINOR 0) set(HAVE_COMPILER_VERSION_PATCH 0) set(HAVE_COMPILER_VERSION_TWEAK 0) + set(COMPILER_WRAPPER) set(DIGIT_VALUE_1 1) set(DIGIT_VALUE_2 10) set(DIGIT_VALUE_3 100) @@ -476,6 +478,9 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) endif() endforeach() endforeach() + if("${info}" MATCHES "INFO:compiler_wrapper\\[([^]\"]*)\\]") + set(COMPILER_WRAPPER "${CMAKE_MATCH_1}") + endif() if("${info}" MATCHES "INFO:simulate\\[([^]\"]*)\\]") set(SIMULATE_ID "${CMAKE_MATCH_1}") endif() @@ -588,6 +593,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) + set(CMAKE_${lang}_COMPILER_WRAPPER "${COMPILER_WRAPPER}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE) set(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE) diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in index 14fdd60..2a4bea4 100644 --- a/Modules/CMakeFortranCompiler.cmake.in +++ b/Modules/CMakeFortranCompiler.cmake.in @@ -2,6 +2,7 @@ set(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@") set(CMAKE_Fortran_COMPILER_ARG1 "@CMAKE_Fortran_COMPILER_ARG1@") set(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@") set(CMAKE_Fortran_COMPILER_VERSION "@CMAKE_Fortran_COMPILER_VERSION@") +set(CMAKE_Fortran_COMPILER_WRAPPER "@CMAKE_Fortran_COMPILER_WRAPPER@") set(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@") set(CMAKE_Fortran_SIMULATE_ID "@CMAKE_Fortran_SIMULATE_ID@") set(CMAKE_Fortran_SIMULATE_VERSION "@CMAKE_Fortran_SIMULATE_VERSION@") diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 79393d3..1fd0972 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -12,6 +12,8 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) +include(CMakeLanguageInformation) + # This file sets the basic flags for the Fortran language in CMake. # It also loads the available platform file for the system-compiler # if it exists. @@ -36,6 +38,12 @@ if (NOT _INCLUDED_FILE) include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) endif () + +# load any compiler-wrapper specific information +if (CMAKE_Fortran_COMPILER_WRAPPER) + __cmake_include_compiler_wrapper(Fortran) +endif () + # We specify the compiler information in the system file for some # platforms, but this language may not have been enabled when the file # was first included. Include it again to get the language info. diff --git a/Modules/CMakeLanguageInformation.cmake b/Modules/CMakeLanguageInformation.cmake new file mode 100644 index 0000000..e03d149 --- /dev/null +++ b/Modules/CMakeLanguageInformation.cmake @@ -0,0 +1,37 @@ + +#============================================================================= +# Copyright 2015 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# This file contains common code blocks used by all the language information +# files + +# load any compiler-wrapper specific information +macro(__cmake_include_compiler_wrapper lang) + set(_INCLUDED_WRAPPER_FILE 0) + if (CMAKE_${lang}_COMPILER_ID) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + + # No platform - wrapper - lang information so maybe there's just wrapper - lang information + if(NOT _INCLUDED_WRAPPER_FILE) + if (CMAKE_${lang}_COMPILER_ID) + include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + endif () +endmacro () ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCCompilerId.c.in | 7 ++ Modules/CMakeCXXCompilerId.cpp.in | 7 ++ Modules/CMakeFortranCompilerId.F.in | 3 + Modules/Compiler/CrayPrgEnv-C.cmake | 11 ++ Modules/Compiler/CrayPrgEnv-CXX.cmake | 11 ++ Modules/Compiler/CrayPrgEnv-Cray-C.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-Fortran.cmake | 11 ++ Modules/Compiler/CrayPrgEnv-GNU-C.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-Intel-C.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-PGI-C.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake | 7 ++ Modules/Compiler/CrayPrgEnv.cmake | 83 +++++++++++++ Modules/Platform/CrayLinuxEnvironment.cmake | 97 ++++++++++----- Modules/Platform/CrayPrgEnv.cmake | 149 ----------------------- 21 files changed, 281 insertions(+), 182 deletions(-) create mode 100644 Modules/Compiler/CrayPrgEnv-C.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-CXX.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Cray-C.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Fortran.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-GNU-C.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Intel-C.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-PGI-C.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake create mode 100644 Modules/Compiler/CrayPrgEnv.cmake delete mode 100644 Modules/Platform/CrayPrgEnv.cmake hooks/post-receive -- CMake From domen.vrankar at gmail.com Mon Dec 7 14:22:14 2015 From: domen.vrankar at gmail.com (Domen Vrankar) Date: Mon, 7 Dec 2015 14:22:14 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1647-g8b8a03f Message-ID: <20151207192214.0F252DF439@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 8b8a03fc4a03845c797523d918fc06d408dde2c7 (commit) via 27e6f74f29084fbdee35eb5a8d309d99d39e66d8 (commit) via c926efa1398aa2c4ff273dee173d84d0031bcdf6 (commit) from 88903117356d43bca0ae6e01b5aa3b687bc8a32f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b8a03fc4a03845c797523d918fc06d408dde2c7 commit 8b8a03fc4a03845c797523d918fc06d408dde2c7 Merge: 8890311 27e6f74 Author: Domen Vrankar AuthorDate: Mon Dec 7 14:22:12 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 7 14:22:12 2015 -0500 Merge topic 'cpack-rpm-percomponent-group-and-name' into next 27e6f74f CPack: Added tests for package name and group controll fields c926efa1 CPackRPM: Configure RPM package group and name per component https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27e6f74f29084fbdee35eb5a8d309d99d39e66d8 commit 27e6f74f29084fbdee35eb5a8d309d99d39e66d8 Author: Domen Vrankar AuthorDate: Mon Dec 7 20:13:09 2015 +0100 Commit: Domen Vrankar CommitDate: Mon Dec 7 20:15:49 2015 +0100 CPack: Added tests for package name and group controll fields diff --git a/Help/release/dev/cpack-rpm-percomponent-group-and-name.rst b/Help/release/dev/cpack-rpm-percomponent-group-and-name.rst new file mode 100644 index 0000000..146f8ac --- /dev/null +++ b/Help/release/dev/cpack-rpm-percomponent-group-and-name.rst @@ -0,0 +1,7 @@ +cpack-rpm-percomponent-group-and-name +------------------------------------- + +* The :module:`CPackRPM` module learned to set Name and Group + control fields per-component. + See :variable:`CPACK_RPM__PACKAGE_NAME` + and :variable:`CPACK_RPM__PACKAGE_GROUP`. diff --git a/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-ExpectedFiles.cmake new file mode 100644 index 0000000..1f6c11b --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-ExpectedFiles.cmake @@ -0,0 +1,9 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "3") +set(EXPECTED_FILE_1 "per_component*-pkg_1.deb") +set(EXPECTED_FILE_CONTENT_1 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") +set(EXPECTED_FILE_2 "per_component*-pkg_2.deb") +set(EXPECTED_FILE_CONTENT_2 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") +set(EXPECTED_FILE_3 "per_component*-pkg_3.deb") +set(EXPECTED_FILE_CONTENT_3 "^.*/usr/foo${whitespaces_}.*/usr/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-VerifyResult.cmake new file mode 100644 index 0000000..55293be --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-VerifyResult.cmake @@ -0,0 +1,18 @@ +function(checkPackageInfo_ TYPE FILE REGEX) + set(whitespaces_ "[\t\n\r ]*") + + getPackageInfo("${FILE}" "FILE_INFO_") + if(NOT FILE_INFO_ MATCHES "${REGEX}") + message(FATAL_ERROR "Unexpected ${TYPE} in '${FILE}'; file info: '${FILE_INFO_}'") + endif() +endfunction() + +# check package name +checkPackageInfo_("name" "${FOUND_FILE_1}" ".*Package${whitespaces_}:${whitespaces_}per_component-pkg_1") +checkPackageInfo_("name" "${FOUND_FILE_2}" ".*Package${whitespaces_}:${whitespaces_}second") +checkPackageInfo_("name" "${FOUND_FILE_3}" ".*Package${whitespaces_}:${whitespaces_}per_component-pkg_3") + +# check package group +checkPackageInfo_("group" "${FOUND_FILE_1}" ".*Section${whitespaces_}:${whitespaces_}default") +checkPackageInfo_("group" "${FOUND_FILE_2}" ".*Section${whitespaces_}:${whitespaces_}second_group") +checkPackageInfo_("group" "${FOUND_FILE_3}" ".*Section${whitespaces_}:${whitespaces_}default") diff --git a/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-specifics.cmake b/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-specifics.cmake new file mode 100644 index 0000000..a1da1a3 --- /dev/null +++ b/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-specifics.cmake @@ -0,0 +1,6 @@ +set(CPACK_PACKAGE_CONTACT "someone") +set(CPACK_DEB_COMPONENT_INSTALL "ON") + +set(CPACK_DEBIAN_PACKAGE_SECTION "default") +set(CPACK_DEBIAN_PKG_2_PACKAGE_NAME "second") +set(CPACK_DEBIAN_PKG_2_PACKAGE_SECTION "second_group") diff --git a/Tests/RunCMake/CPack/PER_COMPONENT_FIELDS.cmake b/Tests/RunCMake/CPack/PER_COMPONENT_FIELDS.cmake new file mode 100644 index 0000000..bb42cf4 --- /dev/null +++ b/Tests/RunCMake/CPack/PER_COMPONENT_FIELDS.cmake @@ -0,0 +1,5 @@ +install(FILES CMakeLists.txt DESTINATION foo COMPONENT pkg_1) +install(FILES CMakeLists.txt DESTINATION foo COMPONENT pkg_2) +install(FILES CMakeLists.txt DESTINATION foo COMPONENT pkg_3) + +set(CPACK_PACKAGE_NAME "per_component") diff --git a/Tests/RunCMake/CPack/RPM/Helpers.cmake b/Tests/RunCMake/CPack/RPM/Helpers.cmake index 98cdad8..ba77a4a 100644 --- a/Tests/RunCMake/CPack/RPM/Helpers.cmake +++ b/Tests/RunCMake/CPack/RPM/Helpers.cmake @@ -8,3 +8,12 @@ function(getPackageContent FILE RESULT_VAR) set(${RESULT_VAR} "${package_content_}" PARENT_SCOPE) endfunction() + +function(getPackageInfo FILE RESULT_VAR) + execute_process(COMMAND ${RPM_EXECUTABLE} -pqi ${FILE} + OUTPUT_VARIABLE info_content + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + + set(${RESULT_VAR} "${info_content}" PARENT_SCOPE) +endfunction() diff --git a/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-ExpectedFiles.cmake new file mode 100644 index 0000000..3d28d41 --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-ExpectedFiles.cmake @@ -0,0 +1,9 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "3") +set(EXPECTED_FILE_1 "per_component*-pkg_1.rpm") +set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") +set(EXPECTED_FILE_2 "per_component*-pkg_2.rpm") +set(EXPECTED_FILE_CONTENT_2 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") +set(EXPECTED_FILE_3 "per_component*-pkg_3.rpm") +set(EXPECTED_FILE_CONTENT_3 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-VerifyResult.cmake b/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-VerifyResult.cmake new file mode 100644 index 0000000..d7d4f9d --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-VerifyResult.cmake @@ -0,0 +1,18 @@ +function(checkPackageInfo_ TYPE FILE REGEX) + set(whitespaces_ "[\t\n\r ]*") + + getPackageInfo("${FILE}" "FILE_INFO_") + if(NOT FILE_INFO_ MATCHES "${REGEX}") + message(FATAL_ERROR "Unexpected ${TYPE} in '${FILE}'; file info: '${FILE_INFO_}'") + endif() +endfunction() + +# check package name +checkPackageInfo_("name" "${FOUND_FILE_1}" ".*Name${whitespaces_}:${whitespaces_}per_component-pkg_1") +checkPackageInfo_("name" "${FOUND_FILE_2}" ".*Name${whitespaces_}:${whitespaces_}second") +checkPackageInfo_("name" "${FOUND_FILE_3}" ".*Name${whitespaces_}:${whitespaces_}per_component-pkg_3") + +# check package group +checkPackageInfo_("group" "${FOUND_FILE_1}" ".*Group${whitespaces_}:${whitespaces_}default") +checkPackageInfo_("group" "${FOUND_FILE_2}" ".*Group${whitespaces_}:${whitespaces_}second_group") +checkPackageInfo_("group" "${FOUND_FILE_3}" ".*Group${whitespaces_}:${whitespaces_}default") diff --git a/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-specifics.cmake b/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-specifics.cmake new file mode 100644 index 0000000..d398168 --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-specifics.cmake @@ -0,0 +1,5 @@ +set(CPACK_RPM_COMPONENT_INSTALL "ON") + +set(CPACK_RPM_PACKAGE_GROUP "default") +set(CPACK_RPM_pkg_2_PACKAGE_NAME "second") +set(CPACK_RPM_pkg_2_PACKAGE_GROUP "second_group") diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index b7295f4..fe2b48b 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -10,3 +10,4 @@ run_cpack_test(DEB_EXTRA "DEB" false) run_cpack_test(DEPENDENCIES "RPM;DEB" true) run_cpack_test(EMPTY_DIR "RPM;DEB;TGZ" true) run_cpack_test(COMPONENTS_EMPTY_DIR "RPM;DEB;TGZ" true) +run_cpack_test(PER_COMPONENT_FIELDS "RPM;DEB" false) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c926efa1398aa2c4ff273dee173d84d0031bcdf6 commit c926efa1398aa2c4ff273dee173d84d0031bcdf6 Author: Markus Rickert AuthorDate: Mon Dec 7 19:11:51 2015 +0100 Commit: Domen Vrankar CommitDate: Mon Dec 7 20:15:49 2015 +0100 CPackRPM: Configure RPM package group and name per component diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 1e7b055..7fb11c3 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -37,6 +37,7 @@ # * Default : CPACK_PACKAGE_DESCRIPTION_SUMMARY # # .. variable:: CPACK_RPM_PACKAGE_NAME +# CPACK_RPM__PACKAGE_NAME # # The RPM package name. # @@ -81,6 +82,7 @@ # * Default : "unknown" # # .. variable:: CPACK_RPM_PACKAGE_GROUP +# CPACK_RPM__PACKAGE_GROUP # # The RPM package group. # @@ -1106,10 +1108,7 @@ function(cpack_rpm_generate_package) # Are we packaging components ? if(CPACK_RPM_PACKAGE_COMPONENT) - set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}") string(TOUPPER ${CPACK_RPM_PACKAGE_COMPONENT} CPACK_RPM_PACKAGE_COMPONENT_UPPER) - else() - set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "") endif() set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}") @@ -1143,10 +1142,19 @@ function(cpack_rpm_generate_package) endif() # CPACK_RPM_PACKAGE_NAME (mandatory) + if(NOT CPACK_RPM_PACKAGE_NAME) string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_NAME) endif() + if(CPACK_RPM_PACKAGE_COMPONENT) + if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_NAME) + set(CPACK_RPM_PACKAGE_NAME ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_NAME}) + else() + set(CPACK_RPM_PACKAGE_NAME ${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_COMPONENT}) + endif() + endif() + # CPACK_RPM_PACKAGE_VERSION (mandatory) if(NOT CPACK_RPM_PACKAGE_VERSION) if(NOT CPACK_PACKAGE_VERSION) @@ -1206,6 +1214,15 @@ function(cpack_rpm_generate_package) endif() # CPACK_RPM_PACKAGE_GROUP + + #Check for component group first. + #If not set, it will use regular package group logic. + if(CPACK_RPM_PACKAGE_COMPONENT) + if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_GROUP) + set(CPACK_RPM_PACKAGE_GROUP ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_GROUP}) + endif() + endif() + if(NOT CPACK_RPM_PACKAGE_GROUP) set(CPACK_RPM_PACKAGE_GROUP "unknown") endif() @@ -1613,7 +1630,7 @@ function(cpack_rpm_generate_package) ) # The name of the final spec file to be used by rpmbuild - set(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.spec") + set(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}.spec") # Print out some debug information if we were asked for that if(CPACK_RPM_PACKAGE_DEBUG) @@ -1645,7 +1662,7 @@ function(cpack_rpm_generate_package) "# -*- rpm-spec -*- BuildRoot: \@CPACK_RPM_DIRECTORY\@/\@CPACK_PACKAGE_FILE_NAME\@\@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH\@ Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@ -Name: \@CPACK_RPM_PACKAGE_NAME\@\@CPACK_RPM_PACKAGE_COMPONENT_PART_NAME\@ +Name: \@CPACK_RPM_PACKAGE_NAME\@ Version: \@CPACK_RPM_PACKAGE_VERSION\@ Release: \@CPACK_RPM_PACKAGE_RELEASE\@ License: \@CPACK_RPM_PACKAGE_LICENSE\@ @@ -1749,15 +1766,15 @@ mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT "${CPACK_RPM_BINARY_SPECFILE}" WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" RESULT_VARIABLE CPACK_RPMBUILD_EXEC_RESULT - ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err" - OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out") + ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err" + OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out") if(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT) - file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err RPMBUILDERR) - file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out RPMBUILDOUT) + file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err RPMBUILDERR) + file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out RPMBUILDOUT) message("CPackRPM:Debug: You may consult rpmbuild logs in: ") - message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err") + message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.err") message("CPackRPM:Debug: *** ${RPMBUILDERR} ***") - message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out") + message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_NAME}.out") message("CPackRPM:Debug: *** ${RPMBUILDOUT} ***") endif() else() ----------------------------------------------------------------------- Summary of changes: .../dev/cpack-rpm-percomponent-group-and-name.rst | 7 ++++ Modules/CPackRPM.cmake | 39 ++++++++++++++------ .../DEB/PER_COMPONENT_FIELDS-ExpectedFiles.cmake | 9 +++++ .../DEB/PER_COMPONENT_FIELDS-VerifyResult.cmake | 18 +++++++++ .../CPack/DEB/PER_COMPONENT_FIELDS-specifics.cmake | 6 +++ Tests/RunCMake/CPack/PER_COMPONENT_FIELDS.cmake | 5 +++ Tests/RunCMake/CPack/RPM/Helpers.cmake | 9 +++++ .../RPM/PER_COMPONENT_FIELDS-ExpectedFiles.cmake | 9 +++++ .../RPM/PER_COMPONENT_FIELDS-VerifyResult.cmake | 18 +++++++++ .../CPack/RPM/PER_COMPONENT_FIELDS-specifics.cmake | 5 +++ Tests/RunCMake/CPack/RunCMakeTest.cmake | 1 + 11 files changed, 115 insertions(+), 11 deletions(-) create mode 100644 Help/release/dev/cpack-rpm-percomponent-group-and-name.rst create mode 100644 Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-VerifyResult.cmake create mode 100644 Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-specifics.cmake create mode 100644 Tests/RunCMake/CPack/PER_COMPONENT_FIELDS.cmake create mode 100644 Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-VerifyResult.cmake create mode 100644 Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-specifics.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 8 00:01:10 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 8 Dec 2015 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-652-gc6eacfd Message-ID: <20151208050110.C7072DF60C@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c6eacfd56a9c5a8da2304c446230127b6ce42470 (commit) from 128d569af02d95e455b5ee1d8dddec07251b7033 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6eacfd56a9c5a8da2304c446230127b6ce42470 commit c6eacfd56a9c5a8da2304c446230127b6ce42470 Author: Kitware Robot AuthorDate: Tue Dec 8 00:01:07 2015 -0500 Commit: Kitware Robot CommitDate: Tue Dec 8 00:01:07 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 21c4ab4..11d90d7 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 4) -set(CMake_VERSION_PATCH 20151207) +set(CMake_VERSION_PATCH 20151208) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 9 00:01:09 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 9 Dec 2015 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-653-g3a824a9 Message-ID: <20151209050109.A757DDF7DC@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 3a824a963ac54930b072e2d31c54e182af3d027c (commit) from c6eacfd56a9c5a8da2304c446230127b6ce42470 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a824a963ac54930b072e2d31c54e182af3d027c commit 3a824a963ac54930b072e2d31c54e182af3d027c Author: Kitware Robot AuthorDate: Wed Dec 9 00:01:06 2015 -0500 Commit: Kitware Robot CommitDate: Wed Dec 9 00:01:06 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 11d90d7..c24341f 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 4) -set(CMake_VERSION_PATCH 20151208) +set(CMake_VERSION_PATCH 20151209) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 9 08:36:09 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 9 Dec 2015 08:36:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1649-gdf5dbe2 Message-ID: <20151209133609.3ABA2DFDF0@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via df5dbe2d51b9b88583792bdfe818c97e8a6474c8 (commit) via a7ef02253bf8ef33d4ffdd761802ea30ef289b8a (commit) from 8b8a03fc4a03845c797523d918fc06d408dde2c7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df5dbe2d51b9b88583792bdfe818c97e8a6474c8 commit df5dbe2d51b9b88583792bdfe818c97e8a6474c8 Merge: 8b8a03f a7ef022 Author: Brad King AuthorDate: Wed Dec 9 08:36:08 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 9 08:36:08 2015 -0500 Merge topic 'detect-cray-wrappers' into next a7ef0225 Cray: Refactor the Cray platform files to use compiler wrapper checks https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7ef02253bf8ef33d4ffdd761802ea30ef289b8a commit a7ef02253bf8ef33d4ffdd761802ea30ef289b8a Author: Chuck Atkins AuthorDate: Wed Dec 2 10:00:44 2015 -0600 Commit: Brad King CommitDate: Wed Dec 9 08:35:19 2015 -0500 Cray: Refactor the Cray platform files to use compiler wrapper checks This is an extensive refactoring of the Cray compiler wrapper usage. Using the new compiler wrapper checks, the CrayPrgEnv info files have been moved from Platform/ to Compiler/. The adjusted naming convention allows the compiler-wrapper information files to be loaded for both the CrayLinuxEnvironment platform when cross-compiling and the Linux platform if building natively on the Cray compute nodes. It also creates a separation of common arguments for compiler id and language information used to perform the appropriate introspection of implicit arguments and libraries used by the compiler wrappers based on the loaded module environment. diff --git a/Modules/Compiler/CrayPrgEnv-C.cmake b/Modules/Compiler/CrayPrgEnv-C.cmake new file mode 100644 index 0000000..6b461ce --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-C.cmake @@ -0,0 +1,11 @@ +if(__craylinux_crayprgenv_c) + return() +endif() +set(__craylinux_crayprgenv_c 1) + +include(Compiler/CrayPrgEnv) +macro(__CrayPrgEnv_setup_C compiler_cmd link_cmd) + __CrayPrgEnv_setup(C + ${CMAKE_ROOT}/Modules/CMakeCCompilerABI.c + ${compiler_cmd} ${link_cmd}) +endmacro() diff --git a/Modules/Compiler/CrayPrgEnv-CXX.cmake b/Modules/Compiler/CrayPrgEnv-CXX.cmake new file mode 100644 index 0000000..aad85b6 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-CXX.cmake @@ -0,0 +1,11 @@ +if(__craylinux_crayprgenv_cxx) + return() +endif() +set(__craylinux_crayprgenv_cxx 1) + +include(Compiler/CrayPrgEnv) +macro(__CrayPrgEnv_setup_CXX compiler_cmd link_cmd) + __CrayPrgEnv_setup(CXX + ${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp + ${compiler_cmd} ${link_cmd}) +endmacro() diff --git a/Modules/Compiler/CrayPrgEnv-Cray-C.cmake b/Modules/Compiler/CrayPrgEnv-Cray-C.cmake new file mode 100644 index 0000000..547a4b4 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Cray-C.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_cray_c) + return() +endif() +set(__craylinux_crayprgenv_cray_c 1) + +include(Compiler/CrayPrgEnv-C) +__CrayPrgEnv_setup_C("/opt/cray/cce/.*/ccfe" "/opt/cray/cce/.*/ld") diff --git a/Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake b/Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake new file mode 100644 index 0000000..df8452c --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_cray_cxx) + return() +endif() +set(__craylinux_crayprgenv_cray_cxx 1) + +include(Compiler/CrayPrgEnv-CXX) +__CrayPrgEnv_setup_CXX("/opt/cray/cce/.*/ccfe" "/opt/cray/cce/.*/ld") diff --git a/Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake new file mode 100644 index 0000000..9f46a04 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_cray_fortran) + return() +endif() +set(__craylinux_crayprgenv_cray_fortran 1) + +include(Compiler/CrayPrgEnv-Fortran) +__CrayPrgEnv_setup_Fortran("/opt/cray/cce/.*/ftnfe" "/opt/cray/cce/.*/ld") diff --git a/Modules/Compiler/CrayPrgEnv-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-Fortran.cmake new file mode 100644 index 0000000..9c4d269 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Fortran.cmake @@ -0,0 +1,11 @@ +if(__craylinux_crayprgenv_fortran) + return() +endif() +set(__craylinux_crayprgenv_fortran 1) + +include(Compiler/CrayPrgEnv) +macro(__CrayPrgEnv_setup_Fortran compiler_cmd link_cmd) + __CrayPrgEnv_setup(Fortran + ${CMAKE_ROOT}/Modules/CMakeFortranCompilerABI.F + ${compiler_cmd} ${link_cmd}) +endmacro() diff --git a/Modules/Compiler/CrayPrgEnv-GNU-C.cmake b/Modules/Compiler/CrayPrgEnv-GNU-C.cmake new file mode 100644 index 0000000..248081b --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-GNU-C.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_gnu_c) + return() +endif() +set(__craylinux_crayprgenv_gnu_c 1) + +include(Compiler/CrayPrgEnv-C) +__CrayPrgEnv_setup_C("/opt/gcc/.*/cc1" "/opt/gcc/.*/collect2") diff --git a/Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake b/Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake new file mode 100644 index 0000000..be4eb6d --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_gnu_cxx) + return() +endif() +set(__craylinux_crayprgenv_gnu_cxx 1) + +include(Compiler/CrayPrgEnv-CXX) +__CrayPrgEnv_setup_CXX("/opt/gcc/.*/cc1plus" "/opt/gcc/.*/collect2") diff --git a/Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake new file mode 100644 index 0000000..8bd23ff --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_gnu_fortran) + return() +endif() +set(__craylinux_crayprgenv_gnu_fortran 1) + +include(Compiler/CrayPrgEnv-Fortran) +__CrayPrgEnv_setup_Fortran("/opt/gcc/.*/f951" "/opt/gcc/.*/collect2") diff --git a/Modules/Compiler/CrayPrgEnv-Intel-C.cmake b/Modules/Compiler/CrayPrgEnv-Intel-C.cmake new file mode 100644 index 0000000..83c4e38 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Intel-C.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_intel_c) + return() +endif() +set(__craylinux_crayprgenv_intel_c 1) + +include(Compiler/CrayPrgEnv-C) +__CrayPrgEnv_setup_C("/opt/intel/.*/mcpcom" "^ld ") diff --git a/Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake b/Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake new file mode 100644 index 0000000..3c3c3e6 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_intel_cxx) + return() +endif() +set(__craylinux_crayprgenv_intel_cxx 1) + +include(Compiler/CrayPrgEnv-CXX) +__CrayPrgEnv_setup_CXX("/opt/intel/.*/mcpcom" "^ld ") diff --git a/Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake new file mode 100644 index 0000000..08a316d --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_intel_fortran) + return() +endif() +set(__craylinux_crayprgenv_intel_fortran 1) + +include(Compiler/CrayPrgEnv-Fortran) +__CrayPrgEnv_setup_Fortran("/opt/intel/.*/fortcom" "^ld ") diff --git a/Modules/Compiler/CrayPrgEnv-PGI-C.cmake b/Modules/Compiler/CrayPrgEnv-PGI-C.cmake new file mode 100644 index 0000000..f45767c --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-PGI-C.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_pgi_c) + return() +endif() +set(__craylinux_crayprgenv_pgi_c 1) + +include(Compiler/CrayPrgEnv-C) +__CrayPrgEnv_setup_C("/opt/pgi/[^ ]*/pgc" "/usr/bin/ld") diff --git a/Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake b/Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake new file mode 100644 index 0000000..a2a286f --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_pgi_cxx) + return() +endif() +set(__craylinux_crayprgenv_pgi_cxx 1) + +include(Compiler/CrayPrgEnv-CXX) +__CrayPrgEnv_setup_CXX("/opt/pgi/[^ ]*/pgcpp" "/usr/bin/ld") diff --git a/Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake b/Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake new file mode 100644 index 0000000..f6ba7c0 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake @@ -0,0 +1,7 @@ +if(__craylinux_crayprgenv_pgi_fortran) + return() +endif() +set(__craylinux_crayprgenv_pgi_fortran 1) + +include(Compiler/CrayPrgEnv-Fortran) +__CrayPrgEnv_setup_Fortran("/opt/pgi/[^ ]*/pgf" "/usr/bin/ld") diff --git a/Modules/Compiler/CrayPrgEnv.cmake b/Modules/Compiler/CrayPrgEnv.cmake new file mode 100644 index 0000000..c3e7b73 --- /dev/null +++ b/Modules/Compiler/CrayPrgEnv.cmake @@ -0,0 +1,83 @@ +# Guard against multiple inclusions +if(__craylinux_crayprgenv) + return() +endif() +set(__craylinux_crayprgenv 1) + +macro(__cray_extract_args cmd tag_regex out_var) + string(REGEX MATCHALL "${tag_regex}" args "${cmd}") + foreach(arg IN LISTS args) + string(REGEX REPLACE "^${tag_regex}$" "\\2" param "${arg}") + get_filename_component(param_abs "${param}" ABSOLUTE) + list(APPEND ${out_var} ${param_abs}) + endforeach() +endmacro() + +function(__cray_extract_implicit src compiler_cmd link_cmd lang include_dirs_var link_dirs_var link_libs_var) + execute_process( + COMMAND ${CMAKE_${lang}_COMPILER} + ${CMAKE_${lang}_VERBOSE_FLAG} -o cray_extract_implicit_${lang} ${src} + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + ) + string(REGEX REPLACE "\r?\n" ";" output_lines "${output}\n${error}") + foreach(line IN LISTS output_lines) + if("${line}" MATCHES "${compiler_cmd}") + __cray_extract_args("${line}" " -(I ?|isystem )([^ ]*)" include_dirs) + set(processed_include 1) + endif() + if("${line}" MATCHES "${link_cmd}") + __cray_extract_args("${line}" " -(L ?)([^ ]*)" link_dirs) + __cray_extract_args("${line}" " -(l ?)([^ ]*)" link_libs) + set(processed_link 1) + endif() + if(processed_include AND processed_link) + break() + endif() + endforeach() + + set(${include_dirs_var} "${include_dirs}" PARENT_SCOPE) + set(${link_dirs_var} "${link_dirs}" PARENT_SCOPE) + set(${link_libs_var} "${link_libs}" PARENT_SCOPE) + set(CRAY_${lang}_EXTRACTED_IMPLICIT 1 CACHE INTERNAL "" FORCE) +endfunction() + +macro(__CrayPrgEnv_setup lang test_src compiler_cmd link_cmd) + if(DEFINED ENV{CRAYPE_VERSION}) + message(STATUS "Cray Programming Environment $ENV{CRAYPE_VERSION} ${lang}") + elseif(DEFINED ENV{ASYNCPE_VERSION}) + message(STATUS "Cray XT Programming Environment $ENV{ASYNCPE_VERSION} ${lang}") + endif() + + # Flags for the Cray wrappers + set(CMAKE_STATIC_LIBRARY_LINK_${lang}_FLAGS "-static") + set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") + set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared") + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-dynamic") + + # If the link type is not explicitly specified in the environment then + # the Cray wrappers assume that the code will be built staticly so + # we check the following condition(s) are NOT met + # Compiler flags are explicitly dynamic + # Env var is dynamic and compiler flags are not explicitly static + if(NOT (((CMAKE_${lang}_FLAGS MATCHES "(^| )-dynamic($| )") OR + (CMAKE_EXE_LINKER_FLAGS MATCHES "(^| )-dynamic($| )")) + OR + (("$ENV{CRAYPE_LINK_TYPE}" STREQUAL "dynamic") AND + NOT ((CMAKE_${lang}_FLAGS MATCHES "(^| )-static($| )") OR + (CMAKE_EXE_LINKER_FLAGS MATCHES "(^| )-static($| )"))))) + set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) + set(BUILD_SHARED_LIBS FALSE CACHE BOOL "") + set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + set(CMAKE_LINK_SEARCH_START_STATIC TRUE) + endif() + if(NOT CRAY_${lang}_EXTRACTED_IMPLICIT) + __cray_extract_implicit( + ${test_src} ${compiler_cmd} ${link_cmd} ${lang} + CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES + CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES + CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES + ) + endif() +endmacro() diff --git a/Modules/Platform/CrayLinuxEnvironment.cmake b/Modules/Platform/CrayLinuxEnvironment.cmake index 19a0f71..97771a2 100644 --- a/Modules/Platform/CrayLinuxEnvironment.cmake +++ b/Modules/Platform/CrayLinuxEnvironment.cmake @@ -2,12 +2,6 @@ # needs to be custom. We use the variables defined through Cray's environment # modules to set up the right paths for things. -# Guard against multiple inclusions -if(__CrayLinuxEnvironment) - return() -endif() -set(__CrayLinuxEnvironment 1) - set(UNIX 1) if(DEFINED ENV{CRAYOS_VERSION}) @@ -17,7 +11,12 @@ elseif(DEFINED ENV{XTOS_VERSION}) else() message(FATAL_ERROR "Neither the CRAYOS_VERSION or XTOS_VERSION environment variables are defined. This platform file should be used inside the Cray Linux Environment for targeting compute nodes (NIDs)") endif() -message(STATUS "Cray Linux Environment ${CMAKE_SYSTEM_VERSION}") + +# Guard against multiple messages +if(NOT __CrayLinuxEnvironment_message) + set(__CrayLinuxEnvironment_message 1) + message(STATUS "Cray Linux Environment ${CMAKE_SYSTEM_VERSION}") +endif() # All cray systems are x86 CPUs and have been for quite some time # Note: this may need to change in the future with 64-bit ARM @@ -29,8 +28,13 @@ set(CMAKE_STATIC_LIBRARY_PREFIX "lib") set(CMAKE_STATIC_LIBRARY_SUFFIX ".a") set(CMAKE_FIND_LIBRARY_PREFIXES "lib") -set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a") -set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) + +# Don't override shared lib support if it's already been set and possibly +# overridden elsewhere by the CrayPrgEnv module +if(NOT CMAKE_FIND_LIBRARY_SUFFIXES) + set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a") + set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) +endif() set(CMAKE_DL_LIBS dl) @@ -42,7 +46,6 @@ set(CMAKE_DL_LIBS dl) get_filename_component(__cmake_install_dir "${CMAKE_ROOT}" PATH) get_filename_component(__cmake_install_dir "${__cmake_install_dir}" PATH) - # Note: Some Cray's have the SYSROOT_DIR variable defined, pointing to a copy # of the NIDs userland. If so, then we'll use it. Otherwise, just assume # the userland from the login node is ok @@ -78,35 +81,63 @@ list(APPEND CMAKE_SYSTEM_LIBRARY_PATH $ENV{SYSROOT_DIR}/usr/lib64 $ENV{SYSROOT_DIR}/lib64 ) - list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES $ENV{SYSROOT_DIR}/usr/local/lib64 $ENV{SYSROOT_DIR}/usr/lib64 $ENV{SYSROOT_DIR}/lib64 ) -list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES - $ENV{SYSROOT_DIR}/usr/include -) -list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES - $ENV{SYSROOT_DIR}/usr/include -) -list(APPEND CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES - $ENV{SYSROOT_DIR}/usr/include -) -# Enable use of lib64 search path variants by default. -set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) +# Compute the intersection of several lists +function(__cray_list_intersect OUTPUT INPUT0) + if(ARGC EQUAL 2) + list(APPEND ${OUTPUT} ${${INPUT0}}) + else() + foreach(I IN LISTS ${INPUT0}) + set(__is_common 1) + foreach(L IN LISTS ARGN) + list(FIND ${L} "${I}" __idx) + if(__idx EQUAL -1) + set(__is_common 0) + break() + endif() + endforeach() + if(__is_common) + list(APPEND ${OUTPUT} "${I}") + endif() + endforeach() + endif() + set(${OUTPUT} ${${OUTPUT}} PARENT_SCOPE) +endfunction() -# Check to see if we're using the cray compiler wrappers and load accordingly -# if we are -if(DEFINED ENV{CRAYPE_DIR}) - set(_CRAYPE_ROOT "$ENV{CRAYPE_DIR}") -elseif(DEFINED ENV{ASYNCPE_DIR}) - set(_CRAYPE_ROOT "$ENV{ASYNCPE_DIR}") +macro(__list_clean_dupes var) + if(${var}) + list(REMOVE_DUPLICATES ${var}) + endif() +endmacro() + +get_property(__langs GLOBAL PROPERTY ENABLED_LANGUAGES) +set(__cray_inc_path_vars) +set(__cray_lib_path_vars) +foreach(__lang IN LISTS __langs) + list(APPEND __cray_inc_path_vars CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES) + list(APPEND __cray_lib_path_vars CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES) +endforeach() +if(__cray_inc_path_vars) + __cray_list_intersect(__cray_implicit_include_dirs ${__cray_inc_path_vars}) + if(__cray_implicit_include_dirs) + list(INSERT CMAKE_SYSTEM_INCLUDE_PATH 0 ${__cray_implicit_include_dirs}) + endif() endif() -if(_CRAYPE_ROOT AND - ((CMAKE_C_COMPILER MATCHES "${_CRAYPE_ROOT}") OR - (CMAKE_CXX_COMPILER MATCHES "${_CRAYPE_ROOT}") OR - (CMAKE_Fortran_COMPILER MATCHES "${_CRAYPE_ROOT}"))) - include(Platform/CrayPrgEnv) +if(__cray_lib_path_vars) + __cray_list_intersect(__cray_implicit_library_dirs ${__cray_lib_path_vars}) + if(__cray_implicit_library_dirs) + list(INSERT CMAKE_SYSTEM_LIBRARY_PATH 0 ${__cray_implicit_library_dirs}) + endif() endif() +__list_clean_dupes(CMAKE_SYSTEM_PREFIX_PATH) +__list_clean_dupes(CMAKE_SYSTEM_INCLUDE_PATH) +__list_clean_dupes(CMAKE_SYSTEM_LIBRARY_PATH) +__list_clean_dupes(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES) + +# Enable use of lib64 search path variants by default. +set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) diff --git a/Modules/Platform/CrayPrgEnv.cmake b/Modules/Platform/CrayPrgEnv.cmake deleted file mode 100644 index d60266b..0000000 --- a/Modules/Platform/CrayPrgEnv.cmake +++ /dev/null @@ -1,149 +0,0 @@ -# Guard against multiple inclusions -if(__CrayPrgEnv) - return() -endif() -set(__CrayPrgEnv 1) -if(DEFINED ENV{CRAYPE_VERSION}) - message(STATUS "Cray Programming Environment $ENV{CRAYPE_VERSION}") - set(__verbose_flag "-craype-verbose") -elseif(DEFINED ENV{ASYNCPE_VERSION}) - message(STATUS "Cray Programming Environment $ENV{ASYNCPE_VERSION}") - set(__verbose_flag "-v") -else() - message(STATUS "Cray Programming Environment") -endif() - -if(NOT __CrayLinuxEnvironment) - message(FATAL_ERROR "The CrayPrgEnv platform file must not be used on its own and is intented to be included by the CrayLinuxEnvironment platform file") -endif() - -# Flags for the Cray wrappers -foreach(__lang C CXX Fortran) - set(CMAKE_STATIC_LIBRARY_LINK_${__lang}_FLAGS "-static") - set(CMAKE_SHARED_LIBRARY_${__lang}_FLAGS "") - set(CMAKE_SHARED_LIBRARY_CREATE_${__lang}_FLAGS "-shared") - set(CMAKE_SHARED_LIBRARY_LINK_${__lang}_FLAGS "-dynamic") -endforeach() - -# If the link type is not explicitly specified in the environment then -# the Cray wrappers assume that the code will be built staticly so -# we check the following condition(s) are NOT met -# Compiler flags are explicitly dynamic -# Env var is dynamic and compiler flags are not explicitly static -if(NOT (((CMAKE_C_FLAGS MATCHES "(^| )-dynamic($| )") OR - (CMAKE_CXX_FLAGS MATCHES "(^| )-dynamic($| )") OR - (CMAKE_Fortran_FLAGS MATCHES "(^| )-dynamic($| )") OR - (CMAKE_EXE_LINKER_FLAGS MATCHES "(^| )-dynamic($| )")) - OR - (("$ENV{CRAYPE_LINK_TYPE}" STREQUAL "dynamic") AND - NOT ((CMAKE_C_FLAGS MATCHES "(^| )-static($| )") OR - (CMAKE_CXX_FLAGS MATCHES "(^| )-static($| )") OR - (CMAKE_Fortran_FLAGS MATCHES "(^| )-static($| )") OR - (CMAKE_EXE_LINKER_FLAGS MATCHES "(^| )-static($| )"))))) - set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) - set(BUILD_SHARED_LIBS FALSE CACHE BOOL "") - set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") - set(CMAKE_LINK_SEARCH_START_STATIC TRUE) -endif() - -function(__cray_parse_flags_with_sep OUTPUT FLAG_TAG SEP INPUT) - string(REGEX MATCHALL "${SEP}${FLAG_TAG}([^${SEP}]+)" FLAG_ARGS "${INPUT}") - foreach(FLAG_ARG IN LISTS FLAG_ARGS) - string(REGEX REPLACE - "^${SEP}${FLAG_TAG}([^${SEP}]+)" "\\1" FLAG_VALUE - "${FLAG_ARG}") - list(APPEND ${OUTPUT} ${FLAG_VALUE}) - endforeach() - set(${OUTPUT} ${${OUTPUT}} PARENT_SCOPE) -endfunction() -macro(__cray_parse_flags OUTPUT FLAG_TAG INPUT) - __cray_parse_flags_with_sep(${OUTPUT} ${FLAG_TAG} " " "${INPUT}") -endmacro() - -# Remove duplicates in a list -macro(__cray_list_remove_duplicates VAR) - if(${VAR}) - list(REMOVE_DUPLICATES ${VAR}) - endif() -endmacro() - -# Compute the intersection of several lists -function(__cray_list_intersect OUTPUT INPUT0) - if(ARGC EQUAL 2) - list(APPEND ${OUTPUT} ${${INPUT0}}) - else() - foreach(I IN LISTS ${INPUT0}) - set(__is_common 1) - foreach(L IN LISTS ARGN) - list(FIND ${L} "${I}" __idx) - if(__idx EQUAL -1) - set(__is_common 0) - break() - endif() - endforeach() - if(__is_common) - list(APPEND ${OUTPUT} "${I}") - endif() - endforeach() - endif() - set(${OUTPUT} ${${OUTPUT}} PARENT_SCOPE) -endfunction() - -# Parse the implicit directories used by the wrappers -get_property(__langs GLOBAL PROPERTY ENABLED_LANGUAGES) -foreach(__lang IN LISTS __langs) - if(__lang STREQUAL "C") - set(__empty empty.c) - elseif(__lang STREQUAL CXX) - set(__empty empty.cxx) - elseif(__lang STREQUAL Fortran) - set(__empty empty.f90) - else() - continue() - endif() - - execute_process( - COMMAND ${CMAKE_${__lang}_COMPILER} ${__verbose_flag} ${__empty} - OUTPUT_VARIABLE __cmd_out - ERROR_QUIET - ) - string(REGEX MATCH "(^|\n)[^\n]*${__empty}[^\n]*" __driver "${__cmd_out}") - - # Parse include paths - set(__cray_flag_args) - __cray_parse_flags(__cray_flag_args "-I" "${__driver}") - __cray_parse_flags(__cray_flag_args "-isystem " "${__driver}") - list(APPEND CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES ${__cray_flag_args}) - __cray_list_remove_duplicates(CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES) - - # Parse library paths - set(__cray_flag_args) - __cray_parse_flags(__cray_flag_args "-L" "${__driver}") - list(APPEND CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES ${__cray_flag_args}) - __cray_list_remove_duplicates(CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES) - - # Parse libraries - set(__cray_flag_args) - __cray_parse_flags(__cray_flag_args "-l" "${__driver}") - __cray_parse_flags(__cray_linker_flags "-Wl" "${__driver}") - foreach(F IN LISTS __cray_linker_flags) - __cray_parse_flags_with_sep(__cray_flag_args "-l" "," "${F}") - endforeach() - list(APPEND CMAKE_${__lang}_IMPLICIT_LINK_LIBRARIES ${__cray_flag_args}) - __cray_list_remove_duplicates(CMAKE_${__lang}_IMPLICIT_LINK_LIBRARIES) -endforeach() - -# Determine the common directories between all languages and add them -# as system search paths -set(__cray_inc_path_vars) -set(__cray_lib_path_vars) -foreach(__lang IN LISTS __langs) - list(APPEND __cray_inc_path_vars CMAKE_${__lang}_IMPLICIT_INCLUDE_DIRECTORIES) - list(APPEND __cray_lib_path_vars CMAKE_${__lang}_IMPLICIT_LINK_DIRECTORIES) -endforeach() -if(__cray_inc_path_vars) - __cray_list_intersect(CMAKE_SYSTEM_INCLUDE_PATH ${__cray_inc_path_vars}) -endif() -if(__cray_lib_path_vars) - __cray_list_intersect(CMAKE_SYSTEM_LIBRARY_PATH ${__cray_lib_path_vars}) -endif() ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 9 08:36:52 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 9 Dec 2015 08:36:52 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-656-g27ed820 Message-ID: <20151209133652.CF634DFDFE@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 27ed820c816a80bf140613cb2f47ccb2f21b021f (commit) via 27e6f74f29084fbdee35eb5a8d309d99d39e66d8 (commit) via c926efa1398aa2c4ff273dee173d84d0031bcdf6 (commit) from 3a824a963ac54930b072e2d31c54e182af3d027c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27ed820c816a80bf140613cb2f47ccb2f21b021f commit 27ed820c816a80bf140613cb2f47ccb2f21b021f Merge: 3a824a9 27e6f74 Author: Brad King AuthorDate: Wed Dec 9 08:36:50 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 9 08:36:50 2015 -0500 Merge topic 'cpack-rpm-percomponent-group-and-name' 27e6f74f CPack: Added tests for package name and group controll fields c926efa1 CPackRPM: Configure RPM package group and name per component ----------------------------------------------------------------------- Summary of changes: .../dev/cpack-rpm-percomponent-group-and-name.rst | 7 ++++ Modules/CPackRPM.cmake | 39 ++++++++++++++------ .../DEB/PER_COMPONENT_FIELDS-ExpectedFiles.cmake | 9 +++++ .../DEB/PER_COMPONENT_FIELDS-VerifyResult.cmake | 18 +++++++++ .../CPack/DEB/PER_COMPONENT_FIELDS-specifics.cmake | 6 +++ Tests/RunCMake/CPack/PER_COMPONENT_FIELDS.cmake | 5 +++ Tests/RunCMake/CPack/RPM/Helpers.cmake | 9 +++++ .../RPM/PER_COMPONENT_FIELDS-ExpectedFiles.cmake | 9 +++++ .../RPM/PER_COMPONENT_FIELDS-VerifyResult.cmake | 18 +++++++++ .../CPack/RPM/PER_COMPONENT_FIELDS-specifics.cmake | 5 +++ Tests/RunCMake/CPack/RunCMakeTest.cmake | 1 + 11 files changed, 115 insertions(+), 11 deletions(-) create mode 100644 Help/release/dev/cpack-rpm-percomponent-group-and-name.rst create mode 100644 Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-VerifyResult.cmake create mode 100644 Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-specifics.cmake create mode 100644 Tests/RunCMake/CPack/PER_COMPONENT_FIELDS.cmake create mode 100644 Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-VerifyResult.cmake create mode 100644 Tests/RunCMake/CPack/RPM/PER_COMPONENT_FIELDS-specifics.cmake hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 9 08:36:55 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 9 Dec 2015 08:36:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-660-gad1be6e Message-ID: <20151209133655.C2A99DFDFF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via ad1be6ee769ecaba4d6dadae84c0fc372049a333 (commit) via a7ef02253bf8ef33d4ffdd761802ea30ef289b8a (commit) via 0763a8365528166747746e3b94e74ca98d0d705f (commit) via 5eaac0c96ac51e1300664ef37239f3215bb58489 (commit) from 27ed820c816a80bf140613cb2f47ccb2f21b021f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad1be6ee769ecaba4d6dadae84c0fc372049a333 commit ad1be6ee769ecaba4d6dadae84c0fc372049a333 Merge: 27ed820 a7ef022 Author: Brad King AuthorDate: Wed Dec 9 08:36:53 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 9 08:36:53 2015 -0500 Merge topic 'detect-cray-wrappers' a7ef0225 Cray: Refactor the Cray platform files to use compiler wrapper checks 0763a836 Cray: Add macro tests to detect the Cray compiler wrappers 5eaac0c9 Compiler: Add infrastructure for detecting compiler wrappers ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCCompiler.cmake.in | 1 + Modules/CMakeCCompilerId.c.in | 7 ++ Modules/CMakeCInformation.cmake | 8 ++ Modules/CMakeCXXCompiler.cmake.in | 1 + Modules/CMakeCXXCompilerId.cpp.in | 7 ++ Modules/CMakeCXXInformation.cmake | 8 ++ Modules/CMakeDetermineCompilerId.cmake | 6 + Modules/CMakeFortranCompiler.cmake.in | 1 + Modules/CMakeFortranCompilerId.F.in | 3 + Modules/CMakeFortranInformation.cmake | 8 ++ Modules/CMakeLanguageInformation.cmake | 37 ++++++ Modules/Compiler/CrayPrgEnv-C.cmake | 11 ++ Modules/Compiler/CrayPrgEnv-CXX.cmake | 11 ++ Modules/Compiler/CrayPrgEnv-Cray-C.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-Fortran.cmake | 11 ++ Modules/Compiler/CrayPrgEnv-GNU-C.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-Intel-C.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-PGI-C.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake | 7 ++ Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake | 7 ++ Modules/Compiler/CrayPrgEnv.cmake | 83 +++++++++++++ Modules/Platform/CrayLinuxEnvironment.cmake | 97 ++++++++++----- Modules/Platform/CrayPrgEnv.cmake | 149 ----------------------- 29 files changed, 351 insertions(+), 182 deletions(-) create mode 100644 Modules/CMakeLanguageInformation.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-C.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-CXX.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Cray-C.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Cray-CXX.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Cray-Fortran.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Fortran.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-GNU-C.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-GNU-CXX.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-GNU-Fortran.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Intel-C.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Intel-CXX.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-Intel-Fortran.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-PGI-C.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-PGI-CXX.cmake create mode 100644 Modules/Compiler/CrayPrgEnv-PGI-Fortran.cmake create mode 100644 Modules/Compiler/CrayPrgEnv.cmake delete mode 100644 Modules/Platform/CrayPrgEnv.cmake hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 9 08:36:58 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 9 Dec 2015 08:36:58 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-665-gdc873f6 Message-ID: <20151209133658.6E0FBDFE04@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via dc873f6eef1e6f952cf3d09be7568b03fbf8c6d3 (commit) via bc35087da3eb9039dad8fb5d27c1fab60b43f776 (commit) via 98be140fc0dc0bab8955c4fea9274ea52ac8cd9c (commit) via 93cc80aee59cfb328d541ba527d40239ab8348b1 (commit) via 0903812b0b8c325913d766b793bbf9438ad6b423 (commit) from ad1be6ee769ecaba4d6dadae84c0fc372049a333 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc873f6eef1e6f952cf3d09be7568b03fbf8c6d3 commit dc873f6eef1e6f952cf3d09be7568b03fbf8c6d3 Merge: ad1be6e bc35087 Author: Brad King AuthorDate: Wed Dec 9 08:36:56 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 9 08:36:56 2015 -0500 Merge topic 'cmake-E-copy-multiple-inputs' bc35087d cmake: Teach -E copy_directory to support multiple input directories 98be140f cmake: Refine -E copy[_if_different] documentation 93cc80ae cmake: Refine -E copy_if_different implementation indentation 0903812b cmake: Refine -E chdir documentation ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake.1.rst | 14 ++++++--- Help/release/dev/cmake-E-copy-multiple-inputs.rst | 3 ++ Source/cmcmd.cxx | 30 ++++++++++++-------- ...ee-source-files-target-is-directory-result.txt} | 0 ...ree-source-files-target-is-directory-stderr.txt | 0 ...y-three-source-files-target-is-file-result.txt} | 0 ...ry-three-source-files-target-is-file-stderr.txt | 3 ++ ...ee-source-files-target-is-not-exist-result.txt} | 0 ...ree-source-files-target-is-not-exist-stderr.txt | 0 Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 17 +++++++++++ .../RunCMake/CommandLine/copy_input/d1/d1.txt | 0 .../RunCMake/CommandLine/copy_input/d2/d2.txt | 0 .../RunCMake/CommandLine/copy_input/d3/d3.txt | 0 13 files changed, 51 insertions(+), 16 deletions(-) copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_copy_directory-three-source-files-target-is-directory-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-directory-stderr.txt (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_copy_directory-three-source-files-target-is-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-file-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_copy_directory-three-source-files-target-is-not-exist-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_copy_directory-three-source-files-target-is-not-exist-stderr.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/copy_input/d1/d1.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/copy_input/d2/d2.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/copy_input/d3/d3.txt (100%) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 9 08:37:23 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 9 Dec 2015 08:37:23 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1655-g93c69b8 Message-ID: <20151209133723.70E46DFDFF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 93c69b8edc6c0b1a69cc995c0321cc275acdd3ee (commit) via dc873f6eef1e6f952cf3d09be7568b03fbf8c6d3 (commit) via ad1be6ee769ecaba4d6dadae84c0fc372049a333 (commit) via 27ed820c816a80bf140613cb2f47ccb2f21b021f (commit) via 3a824a963ac54930b072e2d31c54e182af3d027c (commit) via c6eacfd56a9c5a8da2304c446230127b6ce42470 (commit) from df5dbe2d51b9b88583792bdfe818c97e8a6474c8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93c69b8edc6c0b1a69cc995c0321cc275acdd3ee commit 93c69b8edc6c0b1a69cc995c0321cc275acdd3ee Merge: df5dbe2 dc873f6 Author: Brad King AuthorDate: Wed Dec 9 08:37:14 2015 -0500 Commit: Brad King CommitDate: Wed Dec 9 08:37:14 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 9 08:57:58 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 9 Dec 2015 08:57:58 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1658-g3b6d20b Message-ID: <20151209135758.7A271DFC26@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 3b6d20b90ba55652b3bd3f75ceed4bc6a45286c4 (commit) via 7f4a91effc558b164bba6de78388543411541cf4 (commit) via c185045515eaa9482bc29a0b325fde4f6490f5e1 (commit) from 93c69b8edc6c0b1a69cc995c0321cc275acdd3ee (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b6d20b90ba55652b3bd3f75ceed4bc6a45286c4 commit 3b6d20b90ba55652b3bd3f75ceed4bc6a45286c4 Merge: 93c69b8 7f4a91e Author: Brad King AuthorDate: Wed Dec 9 08:57:57 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 9 08:57:57 2015 -0500 Merge topic 'cmake-W-options' into next 7f4a91ef cmake: Deduplicate warning message control code c1850455 cmake-gui: Add options to control warning messages https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f4a91effc558b164bba6de78388543411541cf4 commit 7f4a91effc558b164bba6de78388543411541cf4 Author: Michael Scott AuthorDate: Sun Dec 6 12:58:24 2015 +0000 Commit: Brad King CommitDate: Wed Dec 9 08:56:17 2015 -0500 cmake: Deduplicate warning message control code Remove the duplicate code in cmake::Configure to set the cache variables for the warning message suppression. Replace it with calls to the dedicated methods to carry this out. diff --git a/Source/cmake.cxx b/Source/cmake.cxx index e57e512..7992495 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1269,17 +1269,11 @@ int cmake::Configure() diagLevel = this->DiagLevels["deprecated"]; if (diagLevel == DIAG_IGNORE) { - this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "FALSE", - "Whether to issue warnings for deprecated " - "functionality.", - cmState::INTERNAL); + this->SetSuppressDeprecatedWarnings(true); } else if (diagLevel == DIAG_WARN) { - this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "TRUE", - "Whether to issue warnings for deprecated " - "functionality.", - cmState::INTERNAL); + this->SetSuppressDeprecatedWarnings(false); } } @@ -1299,32 +1293,20 @@ int cmake::Configure() diagLevel = this->DiagLevels["dev"]; if (diagLevel == DIAG_IGNORE) { - this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE", - "Suppress Warnings that are meant for" - " the author of the CMakeLists.txt files.", - cmState::INTERNAL); + this->SetSuppressDevWarnings(true); if (setDeprecatedVariables) { - this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "FALSE", - "Whether to issue warnings for deprecated " - "functionality.", - cmState::INTERNAL); + this->SetSuppressDeprecatedWarnings(true); } } else if (diagLevel == DIAG_WARN) { - this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE", - "Suppress Warnings that are meant for" - " the author of the CMakeLists.txt files.", - cmState::INTERNAL); + this->SetSuppressDevWarnings(false); if (setDeprecatedVariables) { - this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "TRUE", - "Whether to issue warnings for deprecated " - "functionality.", - cmState::INTERNAL); + this->SetSuppressDeprecatedWarnings(false); } } } @@ -2881,6 +2863,24 @@ void cmake::RunCheckForUnusedVariables() #endif } +bool cmake::GetSuppressDevWarnings(cmMakefile const* mf) +{ + /* + * The suppression CMake variable may be set in the CMake configuration file + * itself, so we have to check what its set to in the makefile if we can. + */ + if (mf) + { + return mf->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); + } + else + { + const char* cacheEntryValue = this->State->GetCacheEntryValue( + "CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); + return cmSystemTools::IsOn(cacheEntryValue); + } +} + void cmake::SetSuppressDevWarnings(bool b) { std::string value; @@ -2902,24 +2902,6 @@ void cmake::SetSuppressDevWarnings(bool b) cmState::INTERNAL); } -bool cmake::GetSuppressDevWarnings(cmMakefile const* mf) -{ - /* - * The suppression CMake variable may be set in the CMake configuration file - * itself, so we have to check what its set to in the makefile if we can. - */ - if (mf) - { - return mf->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); - } - else - { - const char* cacheEntryValue = this->State->GetCacheEntryValue( - "CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); - return cmSystemTools::IsOn(cacheEntryValue); - } -} - bool cmake::GetSuppressDeprecatedWarnings(cmMakefile const* mf) { /* diff --git a/Source/cmake.h b/Source/cmake.h index 1d63e66..298d82b 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -309,26 +309,26 @@ class cmake { return this->CMakeEditCommand; } /* - * Set the state of the suppression of developer (author) warnings. - */ - void SetSuppressDevWarnings(bool v); - /* * Get the state of the suppression of developer (author) warnings. * Returns false, by default, if developer warnings should be shown, true * otherwise. */ bool GetSuppressDevWarnings(cmMakefile const* mf = NULL); - /* - * Set the state of the suppression of deprecated warnings. + * Set the state of the suppression of developer (author) warnings. */ - void SetSuppressDeprecatedWarnings(bool v); + void SetSuppressDevWarnings(bool v); + /* * Get the state of the suppression of deprecated warnings. * Returns false, by default, if deprecated warnings should be shown, true * otherwise. */ bool GetSuppressDeprecatedWarnings(cmMakefile const* mf = NULL); + /* + * Set the state of the suppression of deprecated warnings. + */ + void SetSuppressDeprecatedWarnings(bool v); /** Display a message to the user. */ void IssueMessage(cmake::MessageType t, std::string const& text, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c185045515eaa9482bc29a0b325fde4f6490f5e1 commit c185045515eaa9482bc29a0b325fde4f6490f5e1 Author: Michael Scott AuthorDate: Sun Dec 6 12:33:13 2015 +0000 Commit: Brad King CommitDate: Wed Dec 9 08:55:52 2015 -0500 cmake-gui: Add options to control warning messages Create a new dialog window for the cmake-gui that provides controls for setting the state of suppression of developer and deprecated warning messages. This replaces the previous single checkbox for setting the state of suppression of developer warnings. Added a note for the new functionality to the release notes. diff --git a/Help/release/dev/cmake-W-options.rst b/Help/release/dev/cmake-W-options.rst index 57d375f..38e71f9 100644 --- a/Help/release/dev/cmake-W-options.rst +++ b/Help/release/dev/cmake-W-options.rst @@ -10,3 +10,6 @@ cmake-W-options * Warnings about deprecated functionality are now enabled by default. They may be suppressed with ``-Wno-deprecated`` or by setting the :variable:`CMAKE_WARN_DEPRECATED` variable to false. + +* Warnings about deprecated functionality can now be controlled in the + :manual:`cmake-gui(1)` application. diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index cad11f5..9161ad3 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -115,6 +115,8 @@ set(SRCS QCMakeWidgets.h RegexExplorer.cxx RegexExplorer.h + WarningMessagesDialog.cxx + WarningMessagesDialog.h ) QT4_WRAP_UI(UI_SRCS CMakeSetupDialog.ui @@ -122,6 +124,7 @@ QT4_WRAP_UI(UI_SRCS CrossCompiler.ui AddCacheEntry.ui RegexExplorer.ui + WarningMessagesDialog.ui ) QT4_WRAP_CPP(MOC_SRCS AddCacheEntry.h @@ -132,6 +135,7 @@ QT4_WRAP_CPP(MOC_SRCS QCMakeCacheView.h QCMakeWidgets.h RegexExplorer.h + WarningMessagesDialog.h ) QT4_ADD_RESOURCES(RC_SRCS CMakeSetup.qrc) diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 2b12834..2fc4faf 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -34,6 +34,7 @@ #include "AddCacheEntry.h" #include "FirstConfigure.h" #include "RegexExplorer.h" +#include "WarningMessagesDialog.h" #include "cmSystemTools.h" #include "cmVersion.h" @@ -145,9 +146,8 @@ CMakeSetupDialog::CMakeSetupDialog() this, SLOT(doOutputErrorNext())); // in Eclipse QMenu* OptionsMenu = this->menuBar()->addMenu(tr("&Options")); - this->SuppressDevWarningsAction = - OptionsMenu->addAction(tr("&Suppress dev Warnings (-Wno-dev)")); - this->SuppressDevWarningsAction->setCheckable(true); + OptionsMenu->addAction(tr("Warning Messages..."), + this, SLOT(doWarningMessagesDialog())); this->WarnUninitializedAction = OptionsMenu->addAction(tr("&Warn Uninitialized (--warn-uninitialized)")); this->WarnUninitializedAction->setCheckable(true); @@ -278,9 +278,6 @@ void CMakeSetupDialog::initialize() QObject::connect(this->AddEntry, SIGNAL(clicked(bool)), this, SLOT(addCacheEntry())); - QObject::connect(this->SuppressDevWarningsAction, SIGNAL(triggered(bool)), - this->CMakeThread->cmakeInstance(), SLOT(setSuppressDevWarnings(bool))); - QObject::connect(this->WarnUninitializedAction, SIGNAL(triggered(bool)), this->CMakeThread->cmakeInstance(), SLOT(setWarnUninitializedMode(bool))); @@ -1369,3 +1366,9 @@ void CMakeSetupDialog::doOutputErrorNext() this->Output->setTextCursor(textCursor); } } + +void CMakeSetupDialog::doWarningMessagesDialog() +{ + WarningMessagesDialog dialog(this, this->CMakeThread->cmakeInstance()); + dialog.exec(); +} diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h index bfd2bc9..4b53b1c 100644 --- a/Source/QtDialog/CMakeSetupDialog.h +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -83,6 +83,8 @@ protected slots: void doOutputFindPrev(); void doOutputErrorNext(); void doRegexExplorerDialog(); + /// display the modal warning messages dialog window + void doWarningMessagesDialog(); protected: @@ -102,7 +104,6 @@ protected: QAction* ExitAction; QAction* ConfigureAction; QAction* GenerateAction; - QAction* SuppressDevWarningsAction; QAction* WarnUninitializedAction; QAction* WarnUnusedAction; QAction* InstallForCommandLineAction; diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 1fcb676..71b7940 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -26,7 +26,6 @@ QCMake::QCMake(QObject* p) : QObject(p) { - this->SuppressDevWarnings = false; this->WarnUninitializedMode = false; this->WarnUnusedMode = false; qRegisterMetaType(); @@ -167,7 +166,6 @@ void QCMake::configure() this->CMakeInstance->SetGeneratorPlatform(""); this->CMakeInstance->SetGeneratorToolset(this->Toolset.toLocal8Bit().data()); this->CMakeInstance->LoadCache(); - this->CMakeInstance->SetSuppressDevWarnings(this->SuppressDevWarnings); this->CMakeInstance->SetWarnUninitialized(this->WarnUninitializedMode); this->CMakeInstance->SetWarnUnused(this->WarnUnusedMode); this->CMakeInstance->PreLoadCMakeFiles(); @@ -457,10 +455,24 @@ bool QCMake::getDebugOutput() const return this->CMakeInstance->GetDebugOutput(); } +bool QCMake::getSuppressDevWarnings() +{ + return this->CMakeInstance->GetSuppressDevWarnings(); +} void QCMake::setSuppressDevWarnings(bool value) { - this->SuppressDevWarnings = value; + this->CMakeInstance->SetSuppressDevWarnings(value); +} + +bool QCMake::getSuppressDeprecatedWarnings() +{ + return this->CMakeInstance->GetSuppressDeprecatedWarnings(); +} + +void QCMake::setSuppressDeprecatedWarnings(bool value) +{ + this->CMakeInstance->SetSuppressDeprecatedWarnings(value); } void QCMake::setWarnUninitializedMode(bool value) diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index 2d45da9..4b787b9 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -91,8 +91,14 @@ public slots: void reloadCache(); /// set whether to do debug output void setDebugOutput(bool); + /// get whether to do suppress dev warnings + bool getSuppressDevWarnings(); /// set whether to do suppress dev warnings void setSuppressDevWarnings(bool value); + /// get whether to do suppress deprecated warnings + bool getSuppressDeprecatedWarnings(); + /// set whether to do suppress deprecated warnings + void setSuppressDeprecatedWarnings(bool value); /// set whether to run cmake with warnings about uninitialized variables void setWarnUninitializedMode(bool value); /// set whether to run cmake with warnings about unused variables @@ -146,7 +152,6 @@ protected: bool&, void* cd); static void stdoutCallback(const char* msg, size_t len, void* cd); static void stderrCallback(const char* msg, size_t len, void* cd); - bool SuppressDevWarnings; bool WarnUninitializedMode; bool WarnUnusedMode; bool WarnUnusedAllMode; diff --git a/Source/QtDialog/WarningMessagesDialog.cxx b/Source/QtDialog/WarningMessagesDialog.cxx new file mode 100644 index 0000000..e2f4bbc --- /dev/null +++ b/Source/QtDialog/WarningMessagesDialog.cxx @@ -0,0 +1,43 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2015 Kitware, Inc., Gregor Jasny + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#include "WarningMessagesDialog.h" + +WarningMessagesDialog::WarningMessagesDialog(QWidget* parent, QCMake* instance) + : QDialog(parent), cmakeInstance(instance) +{ + this->setupUi(this); + this->setInitialValues(); + this->setupSignals(); +} + +void WarningMessagesDialog::setInitialValues() +{ + this->suppressDeveloperWarnings->setChecked( + this->cmakeInstance->getSuppressDevWarnings()); + this->suppressDeprecatedWarnings->setChecked( + this->cmakeInstance->getSuppressDeprecatedWarnings()); +} + +void WarningMessagesDialog::setupSignals() +{ + QObject::connect(this->buttonBox, SIGNAL(accepted()), + this, SLOT(doAccept())); +} + +void WarningMessagesDialog::doAccept() +{ + this->cmakeInstance->setSuppressDevWarnings( + this->suppressDeveloperWarnings->isChecked()); + this->cmakeInstance->setSuppressDeprecatedWarnings( + this->suppressDeprecatedWarnings->isChecked()); +} diff --git a/Source/QtDialog/WarningMessagesDialog.h b/Source/QtDialog/WarningMessagesDialog.h new file mode 100644 index 0000000..dee572c --- /dev/null +++ b/Source/QtDialog/WarningMessagesDialog.h @@ -0,0 +1,53 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2015 Kitware, Inc., Gregor Jasny + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#ifndef WarningMessagesDialog_h +#define WarningMessagesDialog_h + +#include +#include + +#include "ui_WarningMessagesDialog.h" +#include "QCMake.h" + +/** + * Dialog window for setting the warning message related options. + */ +class WarningMessagesDialog : public QDialog, public Ui_MessagesDialog +{ + Q_OBJECT + +public: + WarningMessagesDialog(QWidget* parent, QCMake* instance); + +private slots: + /** + * Handler for the accept event of the ok/cancel button box. + */ + void doAccept(); + +private: + QCMake* cmakeInstance; + + /** + * Set the initial values of the widgets on this dialog window, using the + * current state of the cache. + */ + void setInitialValues(); + + /** + * Setup the signals for the widgets on this dialog window. + */ + void setupSignals(); +}; + +#endif /* MessageDialog_h */ diff --git a/Source/QtDialog/WarningMessagesDialog.ui b/Source/QtDialog/WarningMessagesDialog.ui new file mode 100644 index 0000000..2367772 --- /dev/null +++ b/Source/QtDialog/WarningMessagesDialog.ui @@ -0,0 +1,120 @@ + + + MessagesDialog + + + + 0 + 0 + 250 + 150 + + + + Warning Messages + + + true + + + + + + + 0 + 0 + + + + Suppress Warnings + + + + + + + 0 + 0 + + + + Developer Warnings + + + false + + + + + + + + 0 + 0 + + + + Deprecated Warnings + + + false + + + + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + MessagesDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + MessagesDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/Source/cmake.cxx b/Source/cmake.cxx index c0a1196..e57e512 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2883,17 +2883,23 @@ void cmake::RunCheckForUnusedVariables() void cmake::SetSuppressDevWarnings(bool b) { + std::string value; + // equivalent to -Wno-dev if (b) { - this->DiagLevels["dev"] = DIAG_IGNORE; + value = "TRUE"; } // equivalent to -Wdev else { - this->DiagLevels["dev"] = std::max(this->DiagLevels["dev"], - DIAG_WARN); + value = "FALSE"; } + + this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", value.c_str(), + "Suppress Warnings that are meant for" + " the author of the CMakeLists.txt files.", + cmState::INTERNAL); } bool cmake::GetSuppressDevWarnings(cmMakefile const* mf) @@ -2932,3 +2938,24 @@ bool cmake::GetSuppressDeprecatedWarnings(cmMakefile const* mf) return cacheEntryValue && cmSystemTools::IsOff(cacheEntryValue); } } + +void cmake::SetSuppressDeprecatedWarnings(bool b) +{ + std::string value; + + // equivalent to -Wno-deprecated + if (b) + { + value = "FALSE"; + } + // equivalent to -Wdeprecated + else + { + value = "TRUE"; + } + + this->AddCacheEntry("CMAKE_WARN_DEPRECATED", value.c_str(), + "Whether to issue warnings for deprecated " + "functionality.", + cmState::INTERNAL); +} diff --git a/Source/cmake.h b/Source/cmake.h index 4c5515b..1d63e66 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -308,6 +308,9 @@ class cmake std::string const& GetCMakeEditCommand() const { return this->CMakeEditCommand; } + /* + * Set the state of the suppression of developer (author) warnings. + */ void SetSuppressDevWarnings(bool v); /* * Get the state of the suppression of developer (author) warnings. @@ -317,6 +320,10 @@ class cmake bool GetSuppressDevWarnings(cmMakefile const* mf = NULL); /* + * Set the state of the suppression of deprecated warnings. + */ + void SetSuppressDeprecatedWarnings(bool v); + /* * Get the state of the suppression of deprecated warnings. * Returns false, by default, if deprecated warnings should be shown, true * otherwise. ----------------------------------------------------------------------- Summary of changes: Help/release/dev/cmake-W-options.rst | 3 + Source/QtDialog/CMakeLists.txt | 4 + Source/QtDialog/CMakeSetupDialog.cxx | 15 ++-- Source/QtDialog/CMakeSetupDialog.h | 3 +- Source/QtDialog/QCMake.cxx | 18 ++++- Source/QtDialog/QCMake.h | 7 +- Source/QtDialog/WarningMessagesDialog.cxx | 43 +++++++++++ Source/QtDialog/WarningMessagesDialog.h | 53 +++++++++++++ Source/QtDialog/WarningMessagesDialog.ui | 120 +++++++++++++++++++++++++++++ Source/cmake.cxx | 87 +++++++++++---------- Source/cmake.h | 9 ++- 11 files changed, 311 insertions(+), 51 deletions(-) create mode 100644 Source/QtDialog/WarningMessagesDialog.cxx create mode 100644 Source/QtDialog/WarningMessagesDialog.h create mode 100644 Source/QtDialog/WarningMessagesDialog.ui hooks/post-receive -- CMake From brad.king at kitware.com Wed Dec 9 11:40:36 2015 From: brad.king at kitware.com (Brad King) Date: Wed, 9 Dec 2015 11:40:36 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1660-g11039e0 Message-ID: <20151209164036.74C25DE511@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 11039e0002bd03eccaee930d308b1afd5dcf3a9b (commit) via d462ac27d814e966c54bb638444e4b125d1d665f (commit) from 3b6d20b90ba55652b3bd3f75ceed4bc6a45286c4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=11039e0002bd03eccaee930d308b1afd5dcf3a9b commit 11039e0002bd03eccaee930d308b1afd5dcf3a9b Merge: 3b6d20b d462ac2 Author: Brad King AuthorDate: Wed Dec 9 11:40:35 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 9 11:40:35 2015 -0500 Merge topic 'cmELF-use-KWIML' into next d462ac27 cmELF: Use KWIML ABI.h header to get endian-ness https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d462ac27d814e966c54bb638444e4b125d1d665f commit d462ac27d814e966c54bb638444e4b125d1d665f Author: Brad King AuthorDate: Wed Dec 9 11:38:10 2015 -0500 Commit: Brad King CommitDate: Wed Dec 9 11:38:10 2015 -0500 cmELF: Use KWIML ABI.h header to get endian-ness Port away from KWSys CPU header. diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 37dd328..fda6e02 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -16,8 +16,7 @@ #include // Need the native byte order of the running CPU. -#define cmsys_CPU_UNKNOWN_OKAY // We can decide at runtime if not known. -#include +#include // Include the ELF format information system header. #if defined(__OpenBSD__) @@ -102,9 +101,9 @@ public: // In most cases the processor-specific byte order will match that // of the target execution environment. If we choose wrong here // it is fixed when the header is read. -#if cmsys_CPU_ENDIAN_ID == cmsys_CPU_ENDIAN_ID_LITTLE +#if cmIML_ABI_ENDIAN_ID == cmIML_ABI_ENDIAN_ID_LITTLE this->NeedSwap = (this->ByteOrder == ByteOrderMSB); -#elif cmsys_CPU_ENDIAN_ID == cmsys_CPU_ENDIAN_ID_BIG +#elif cmIML_ABI_ENDIAN_ID == cmIML_ABI_ENDIAN_ID_BIG this->NeedSwap = (this->ByteOrder == ByteOrderLSB); #else this->NeedSwap = false; // Final decision is at runtime anyway. ----------------------------------------------------------------------- Summary of changes: Source/cmELF.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 10 00:01:09 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 10 Dec 2015 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-666-ga657b32 Message-ID: <20151210050109.55806DFBC0@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via a657b324822b5bd549706b337a74fa3bfd7bc1c6 (commit) from dc873f6eef1e6f952cf3d09be7568b03fbf8c6d3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a657b324822b5bd549706b337a74fa3bfd7bc1c6 commit a657b324822b5bd549706b337a74fa3bfd7bc1c6 Author: Kitware Robot AuthorDate: Thu Dec 10 00:01:06 2015 -0500 Commit: Kitware Robot CommitDate: Thu Dec 10 00:01:06 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c24341f..fab29ab 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 4) -set(CMake_VERSION_PATCH 20151209) +set(CMake_VERSION_PATCH 20151210) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 10 09:08:29 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 10 Dec 2015 09:08:29 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1663-gf447ad4 Message-ID: <20151210140829.5E748E0329@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via f447ad40b4a155f3501354857aaaaaa6cfb36d52 (commit) via 7984ac5e58722295e71f6c2418e2a54d6f1a0cc1 (commit) via 4ce6fbc76b0ebaeef258695c2b876061b5b61073 (commit) from 11039e0002bd03eccaee930d308b1afd5dcf3a9b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f447ad40b4a155f3501354857aaaaaa6cfb36d52 commit f447ad40b4a155f3501354857aaaaaa6cfb36d52 Merge: 11039e0 7984ac5 Author: Brad King AuthorDate: Thu Dec 10 09:08:27 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 09:08:27 2015 -0500 Merge topic 'cmake-E-multiple-inputs' into next 7984ac5e cmake: Teach -E make_directory to support multiple input directories 4ce6fbc7 Help: Rename release notes for topic 'cmake-E-multiple-inputs' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7984ac5e58722295e71f6c2418e2a54d6f1a0cc1 commit 7984ac5e58722295e71f6c2418e2a54d6f1a0cc1 Author: Bartosz Kosiorek AuthorDate: Wed Dec 9 15:59:43 2015 +0100 Commit: Brad King CommitDate: Thu Dec 10 09:07:38 2015 -0500 cmake: Teach -E make_directory to support multiple input directories diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index 4cbe976..91af3e3 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -167,7 +167,8 @@ Available commands are: Change the current working directory and run a command. ``compare_files `` - Check if file1 is same as file2. + Check if ```` is same as ````. If files are the same, + then returns 0, if not itreturns 1. ``copy ... `` Copy files to ```` (either file or directory). @@ -194,10 +195,11 @@ Available commands are: Run command in a modified environment. ``environment`` - Display the current environment. + Display the current environment variables. -``make_directory `` - Create a directory. +``make_directory ...`` + Create ```` directories. If necessary, create parent + directories too. ``md5sum ...`` Compute md5sum of files. diff --git a/Help/release/dev/cmake-E-multiple-inputs.rst b/Help/release/dev/cmake-E-multiple-inputs.rst index aa52a98..480261d 100644 --- a/Help/release/dev/cmake-E-multiple-inputs.rst +++ b/Help/release/dev/cmake-E-multiple-inputs.rst @@ -6,3 +6,6 @@ cmake-E-multiple-inputs * The :manual:`cmake(1)` ``-E copy_directory`` command-line tool learned to support copying multiple input directories to a directory. + +* The :manual:`cmake(1)` ``-E make_directory`` command-line + tool learned to support copying multiple input directories to a directory. diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 6a4234f..fb7b1f5 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -68,7 +68,7 @@ void CMakeCommandUsage(const char* program) << " env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]...\n" << " - run command in a modified environment\n" << " environment - display the current environment\n" - << " make_directory dir - create a directory\n" + << " make_directory ... - create parent and directories\n" << " md5sum ... - compute md5sum of files\n" << " remove [-f] ... - remove the file(s), use -f to force " "it\n" @@ -447,15 +447,20 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } #endif - else if (args[1] == "make_directory" && args.size() == 3) + else if (args[1] == "make_directory" && args.size() > 2) { - if(!cmSystemTools::MakeDirectory(args[2].c_str())) + // If error occurs we want to continue copying next files. + bool return_value = 0; + for (std::string::size_type cc = 2; cc < args.size(); cc ++) { - std::cerr << "Error making directory \"" << args[2] - << "\".\n"; - return 1; + if(!cmSystemTools::MakeDirectory(args[cc].c_str())) + { + std::cerr << "Error creating directory \"" + << args[cc] << "\".\n"; + return_value = 1; + } } - return 0; + return return_value; } else if (args[1] == "remove_directory" && args.size() == 3) diff --git a/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-result.txt b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt b/Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt new file mode 100644 index 0000000..08a9428 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt @@ -0,0 +1 @@ +^Error creating directory .*file_for_test.txt\".$ diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-result.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt b/Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 57036ba..5e2200f 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -140,6 +140,20 @@ unset(in) unset(out) unset(outfile) +set(out ${RunCMake_BINARY_DIR}/make_directory_output) +set(outfile ${out}/file_for_test.txt) +file(REMOVE_RECURSE "${out}") +file(MAKE_DIRECTORY ${out}) +file(WRITE ${outfile} "") +run_cmake_command(E_make_directory-three-directories + ${CMAKE_COMMAND} -E make_directory ${out}/d1 ${out}/d2 ${out}/d2) +run_cmake_command(E_make_directory-directory-with-parent + ${CMAKE_COMMAND} -E make_directory ${out}/parent/child) +run_cmake_command(E_make_directory-three-directories-and-file + ${CMAKE_COMMAND} -E make_directory ${out}/d1 ${out}/d2 ${outfile}) +unset(out) +unset(outfile) + run_cmake_command(E_env-no-command0 ${CMAKE_COMMAND} -E env) run_cmake_command(E_env-no-command1 ${CMAKE_COMMAND} -E env TEST_ENV=1) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ce6fbc76b0ebaeef258695c2b876061b5b61073 commit 4ce6fbc76b0ebaeef258695c2b876061b5b61073 Author: Brad King AuthorDate: Thu Dec 10 08:52:20 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 08:52:20 2015 -0500 Help: Rename release notes for topic 'cmake-E-multiple-inputs' This topic name will supersede cmake-E-copy-multiple-inputs. diff --git a/Help/release/dev/cmake-E-copy-multiple-inputs.rst b/Help/release/dev/cmake-E-multiple-inputs.rst similarity index 83% rename from Help/release/dev/cmake-E-copy-multiple-inputs.rst rename to Help/release/dev/cmake-E-multiple-inputs.rst index eeb1fab..aa52a98 100644 --- a/Help/release/dev/cmake-E-copy-multiple-inputs.rst +++ b/Help/release/dev/cmake-E-multiple-inputs.rst @@ -1,5 +1,5 @@ -cmake-E-copy-multiple-inputs ----------------------------- +cmake-E-multiple-inputs +----------------------- * The :manual:`cmake(1)` ``-E copy`` and ``-E copy_if_different`` command-line tools learned to support copying multiple input files to a directory. ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake.1.rst | 10 ++++++---- ...tiple-inputs.rst => cmake-E-multiple-inputs.rst} | 7 +++++-- Source/cmcmd.cxx | 19 ++++++++++++------- ...make_directory-directory-with-parent-result.txt} | 0 ..._make_directory-directory-with-parent-stderr.txt | 0 ...directory-three-directories-and-file-result.txt} | 0 ..._directory-three-directories-and-file-stderr.txt | 1 + .../E_make_directory-three-directories-result.txt} | 0 .../E_make_directory-three-directories-stderr.txt | 0 Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 14 ++++++++++++++ 10 files changed, 38 insertions(+), 13 deletions(-) rename Help/release/dev/{cmake-E-copy-multiple-inputs.rst => cmake-E-multiple-inputs.rst} (60%) copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_make_directory-directory-with-parent-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_make_directory-three-directories-and-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_make_directory-three-directories-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt (100%) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 10 09:19:51 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 10 Dec 2015 09:19:51 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1665-g2855238 Message-ID: <20151210141951.EFC1CDE29A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 28552384b40e9516073bcd099fd5f73679578c80 (commit) via 39abbaed7756ac9b4d1d2e7f44575ae85388aaf6 (commit) from f447ad40b4a155f3501354857aaaaaa6cfb36d52 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=28552384b40e9516073bcd099fd5f73679578c80 commit 28552384b40e9516073bcd099fd5f73679578c80 Merge: f447ad4 39abbae Author: Brad King AuthorDate: Thu Dec 10 09:19:51 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 09:19:51 2015 -0500 Merge topic 'FindOpenAL-win-arch' into next 39abbaed FindOpenAL: Detect Windows architecture-specific installation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=39abbaed7756ac9b4d1d2e7f44575ae85388aaf6 commit 39abbaed7756ac9b4d1d2e7f44575ae85388aaf6 Author: Brad King AuthorDate: Thu Dec 10 09:14:54 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 09:18:48 2015 -0500 FindOpenAL: Detect Windows architecture-specific installation Some OpenAL implementations on Windows provide both Win32 and Win64 binaries. Search the location of the matching architecture. Author: George "Zogzer at GitHub" diff --git a/Modules/FindOpenAL.cmake b/Modules/FindOpenAL.cmake index 8150ff2..eb63cef 100644 --- a/Modules/FindOpenAL.cmake +++ b/Modules/FindOpenAL.cmake @@ -79,11 +79,17 @@ find_path(OPENAL_INCLUDE_DIR al.h [HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir] ) +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(_OpenAL_ARCH_DIR libs/Win64) +else() + set(_OpenAL_ARCH_DIR libs/Win32) +endif() + find_library(OPENAL_LIBRARY NAMES OpenAL al openal OpenAL32 HINTS ENV OPENALDIR - PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64 + PATH_SUFFIXES lib64 lib libs64 libs ${_OpenAL_ARCH_DIR} PATHS ~/Library/Frameworks /Library/Frameworks @@ -94,6 +100,7 @@ find_library(OPENAL_LIBRARY [HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir] ) +unset(_OpenAL_ARCH_DIR) # handle the QUIETLY and REQUIRED arguments and set OPENAL_FOUND to TRUE if # all listed variables are TRUE ----------------------------------------------------------------------- Summary of changes: Modules/FindOpenAL.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 10 09:22:35 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 10 Dec 2015 09:22:35 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1667-g91798eb Message-ID: <20151210142235.702DADF9C3@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 91798eb761176a082e692411e981404474f48276 (commit) via e0ad72d8af9bfba80d24f823d79440ebb9136bda (commit) from 28552384b40e9516073bcd099fd5f73679578c80 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=91798eb761176a082e692411e981404474f48276 commit 91798eb761176a082e692411e981404474f48276 Merge: 2855238 e0ad72d Author: Brad King AuthorDate: Thu Dec 10 09:22:34 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 09:22:34 2015 -0500 Merge topic 'graphviz-spaces' into next e0ad72d8 Graphviz: Fix handling of spaces in GRAPHVIZ_GRAPH_NAME https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0ad72d8af9bfba80d24f823d79440ebb9136bda commit e0ad72d8af9bfba80d24f823d79440ebb9136bda Author: Andrey Mishchenko AuthorDate: Wed Dec 9 12:15:52 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 09:22:06 2015 -0500 Graphviz: Fix handling of spaces in GRAPHVIZ_GRAPH_NAME Without this patch, `SET (GRAPHVIZ_GRAPH_NAME "hello world")` does not work (it results in a parsing error in GraphViz when the generated output is processed), but `SET (GRAPHVIZ_GRAPH_NAME "\"hello world\"")` does. diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index a63b6e3..448306f 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -292,7 +292,7 @@ void cmGraphVizWriter::WriteGlobalFile(const char* fileName) void cmGraphVizWriter::WriteHeader(cmGeneratedFileStream& str) const { - str << this->GraphType << " " << this->GraphName << " {" << std::endl; + str << this->GraphType << " \"" << this->GraphName << "\" {" << std::endl; str << this->GraphHeader << std::endl; } ----------------------------------------------------------------------- Summary of changes: Source/cmGraphVizWriter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 10 09:28:24 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 10 Dec 2015 09:28:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1669-g75501dd Message-ID: <20151210142824.1ED49E00A8@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 75501ddf13fcfcef4f59de31d0cfdbd3665640f2 (commit) via 42232ce47b1378e7576fb66cff27e79ce9b1fed5 (commit) from 91798eb761176a082e692411e981404474f48276 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75501ddf13fcfcef4f59de31d0cfdbd3665640f2 commit 75501ddf13fcfcef4f59de31d0cfdbd3665640f2 Merge: 91798eb 42232ce Author: Brad King AuthorDate: Thu Dec 10 09:28:23 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 09:28:23 2015 -0500 Merge topic 'cmake-W-options' into next 42232ce4 fixup! cmake-gui: Add options to control warning messages https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=42232ce47b1378e7576fb66cff27e79ce9b1fed5 commit 42232ce47b1378e7576fb66cff27e79ce9b1fed5 Author: Brad King AuthorDate: Thu Dec 10 09:27:55 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 09:27:55 2015 -0500 fixup! cmake-gui: Add options to control warning messages diff --git a/Source/QtDialog/WarningMessagesDialog.cxx b/Source/QtDialog/WarningMessagesDialog.cxx index e2f4bbc..735b71c 100644 --- a/Source/QtDialog/WarningMessagesDialog.cxx +++ b/Source/QtDialog/WarningMessagesDialog.cxx @@ -12,8 +12,8 @@ #include "WarningMessagesDialog.h" -WarningMessagesDialog::WarningMessagesDialog(QWidget* parent, QCMake* instance) - : QDialog(parent), cmakeInstance(instance) +WarningMessagesDialog::WarningMessagesDialog(QWidget* prnt, QCMake* instance) + : QDialog(prnt), cmakeInstance(instance) { this->setupUi(this); this->setInitialValues(); diff --git a/Source/QtDialog/WarningMessagesDialog.h b/Source/QtDialog/WarningMessagesDialog.h index dee572c..028ec10 100644 --- a/Source/QtDialog/WarningMessagesDialog.h +++ b/Source/QtDialog/WarningMessagesDialog.h @@ -27,7 +27,7 @@ class WarningMessagesDialog : public QDialog, public Ui_MessagesDialog Q_OBJECT public: - WarningMessagesDialog(QWidget* parent, QCMake* instance); + WarningMessagesDialog(QWidget* prnt, QCMake* instance); private slots: /** ----------------------------------------------------------------------- Summary of changes: Source/QtDialog/WarningMessagesDialog.cxx | 4 ++-- Source/QtDialog/WarningMessagesDialog.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 10 09:28:54 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 10 Dec 2015 09:28:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1672-gb40c3f7 Message-ID: <20151210142855.2939BE00CE@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via b40c3f77caad27321aa570fd59b1e63ea972ea4d (commit) via 291275347be3f9c02aff6fb4dfa45a3e5b2f5b4a (commit) via 67211011d946684bed73bcd5b976ec90f4c30856 (commit) from 75501ddf13fcfcef4f59de31d0cfdbd3665640f2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b40c3f77caad27321aa570fd59b1e63ea972ea4d commit b40c3f77caad27321aa570fd59b1e63ea972ea4d Merge: 75501dd 2912753 Author: Brad King AuthorDate: Thu Dec 10 09:28:53 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 09:28:53 2015 -0500 Merge topic 'cmake-W-options' into next 29127534 cmake: Deduplicate warning message control code 67211011 cmake-gui: Add options to control warning messages https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=291275347be3f9c02aff6fb4dfa45a3e5b2f5b4a commit 291275347be3f9c02aff6fb4dfa45a3e5b2f5b4a Author: Michael Scott AuthorDate: Sun Dec 6 12:58:24 2015 +0000 Commit: Brad King CommitDate: Thu Dec 10 09:28:31 2015 -0500 cmake: Deduplicate warning message control code Remove the duplicate code in cmake::Configure to set the cache variables for the warning message suppression. Replace it with calls to the dedicated methods to carry this out. diff --git a/Source/cmake.cxx b/Source/cmake.cxx index e57e512..7992495 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1269,17 +1269,11 @@ int cmake::Configure() diagLevel = this->DiagLevels["deprecated"]; if (diagLevel == DIAG_IGNORE) { - this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "FALSE", - "Whether to issue warnings for deprecated " - "functionality.", - cmState::INTERNAL); + this->SetSuppressDeprecatedWarnings(true); } else if (diagLevel == DIAG_WARN) { - this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "TRUE", - "Whether to issue warnings for deprecated " - "functionality.", - cmState::INTERNAL); + this->SetSuppressDeprecatedWarnings(false); } } @@ -1299,32 +1293,20 @@ int cmake::Configure() diagLevel = this->DiagLevels["dev"]; if (diagLevel == DIAG_IGNORE) { - this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "TRUE", - "Suppress Warnings that are meant for" - " the author of the CMakeLists.txt files.", - cmState::INTERNAL); + this->SetSuppressDevWarnings(true); if (setDeprecatedVariables) { - this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "FALSE", - "Whether to issue warnings for deprecated " - "functionality.", - cmState::INTERNAL); + this->SetSuppressDeprecatedWarnings(true); } } else if (diagLevel == DIAG_WARN) { - this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", "FALSE", - "Suppress Warnings that are meant for" - " the author of the CMakeLists.txt files.", - cmState::INTERNAL); + this->SetSuppressDevWarnings(false); if (setDeprecatedVariables) { - this->AddCacheEntry("CMAKE_WARN_DEPRECATED", "TRUE", - "Whether to issue warnings for deprecated " - "functionality.", - cmState::INTERNAL); + this->SetSuppressDeprecatedWarnings(false); } } } @@ -2881,6 +2863,24 @@ void cmake::RunCheckForUnusedVariables() #endif } +bool cmake::GetSuppressDevWarnings(cmMakefile const* mf) +{ + /* + * The suppression CMake variable may be set in the CMake configuration file + * itself, so we have to check what its set to in the makefile if we can. + */ + if (mf) + { + return mf->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); + } + else + { + const char* cacheEntryValue = this->State->GetCacheEntryValue( + "CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); + return cmSystemTools::IsOn(cacheEntryValue); + } +} + void cmake::SetSuppressDevWarnings(bool b) { std::string value; @@ -2902,24 +2902,6 @@ void cmake::SetSuppressDevWarnings(bool b) cmState::INTERNAL); } -bool cmake::GetSuppressDevWarnings(cmMakefile const* mf) -{ - /* - * The suppression CMake variable may be set in the CMake configuration file - * itself, so we have to check what its set to in the makefile if we can. - */ - if (mf) - { - return mf->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); - } - else - { - const char* cacheEntryValue = this->State->GetCacheEntryValue( - "CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); - return cmSystemTools::IsOn(cacheEntryValue); - } -} - bool cmake::GetSuppressDeprecatedWarnings(cmMakefile const* mf) { /* diff --git a/Source/cmake.h b/Source/cmake.h index 1d63e66..298d82b 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -309,26 +309,26 @@ class cmake { return this->CMakeEditCommand; } /* - * Set the state of the suppression of developer (author) warnings. - */ - void SetSuppressDevWarnings(bool v); - /* * Get the state of the suppression of developer (author) warnings. * Returns false, by default, if developer warnings should be shown, true * otherwise. */ bool GetSuppressDevWarnings(cmMakefile const* mf = NULL); - /* - * Set the state of the suppression of deprecated warnings. + * Set the state of the suppression of developer (author) warnings. */ - void SetSuppressDeprecatedWarnings(bool v); + void SetSuppressDevWarnings(bool v); + /* * Get the state of the suppression of deprecated warnings. * Returns false, by default, if deprecated warnings should be shown, true * otherwise. */ bool GetSuppressDeprecatedWarnings(cmMakefile const* mf = NULL); + /* + * Set the state of the suppression of deprecated warnings. + */ + void SetSuppressDeprecatedWarnings(bool v); /** Display a message to the user. */ void IssueMessage(cmake::MessageType t, std::string const& text, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67211011d946684bed73bcd5b976ec90f4c30856 commit 67211011d946684bed73bcd5b976ec90f4c30856 Author: Michael Scott AuthorDate: Sun Dec 6 12:33:13 2015 +0000 Commit: Brad King CommitDate: Thu Dec 10 09:28:31 2015 -0500 cmake-gui: Add options to control warning messages Create a new dialog window for the cmake-gui that provides controls for setting the state of suppression of developer and deprecated warning messages. This replaces the previous single checkbox for setting the state of suppression of developer warnings. Added a note for the new functionality to the release notes. diff --git a/Help/release/dev/cmake-W-options.rst b/Help/release/dev/cmake-W-options.rst index 57d375f..38e71f9 100644 --- a/Help/release/dev/cmake-W-options.rst +++ b/Help/release/dev/cmake-W-options.rst @@ -10,3 +10,6 @@ cmake-W-options * Warnings about deprecated functionality are now enabled by default. They may be suppressed with ``-Wno-deprecated`` or by setting the :variable:`CMAKE_WARN_DEPRECATED` variable to false. + +* Warnings about deprecated functionality can now be controlled in the + :manual:`cmake-gui(1)` application. diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index cad11f5..9161ad3 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -115,6 +115,8 @@ set(SRCS QCMakeWidgets.h RegexExplorer.cxx RegexExplorer.h + WarningMessagesDialog.cxx + WarningMessagesDialog.h ) QT4_WRAP_UI(UI_SRCS CMakeSetupDialog.ui @@ -122,6 +124,7 @@ QT4_WRAP_UI(UI_SRCS CrossCompiler.ui AddCacheEntry.ui RegexExplorer.ui + WarningMessagesDialog.ui ) QT4_WRAP_CPP(MOC_SRCS AddCacheEntry.h @@ -132,6 +135,7 @@ QT4_WRAP_CPP(MOC_SRCS QCMakeCacheView.h QCMakeWidgets.h RegexExplorer.h + WarningMessagesDialog.h ) QT4_ADD_RESOURCES(RC_SRCS CMakeSetup.qrc) diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 2b12834..2fc4faf 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -34,6 +34,7 @@ #include "AddCacheEntry.h" #include "FirstConfigure.h" #include "RegexExplorer.h" +#include "WarningMessagesDialog.h" #include "cmSystemTools.h" #include "cmVersion.h" @@ -145,9 +146,8 @@ CMakeSetupDialog::CMakeSetupDialog() this, SLOT(doOutputErrorNext())); // in Eclipse QMenu* OptionsMenu = this->menuBar()->addMenu(tr("&Options")); - this->SuppressDevWarningsAction = - OptionsMenu->addAction(tr("&Suppress dev Warnings (-Wno-dev)")); - this->SuppressDevWarningsAction->setCheckable(true); + OptionsMenu->addAction(tr("Warning Messages..."), + this, SLOT(doWarningMessagesDialog())); this->WarnUninitializedAction = OptionsMenu->addAction(tr("&Warn Uninitialized (--warn-uninitialized)")); this->WarnUninitializedAction->setCheckable(true); @@ -278,9 +278,6 @@ void CMakeSetupDialog::initialize() QObject::connect(this->AddEntry, SIGNAL(clicked(bool)), this, SLOT(addCacheEntry())); - QObject::connect(this->SuppressDevWarningsAction, SIGNAL(triggered(bool)), - this->CMakeThread->cmakeInstance(), SLOT(setSuppressDevWarnings(bool))); - QObject::connect(this->WarnUninitializedAction, SIGNAL(triggered(bool)), this->CMakeThread->cmakeInstance(), SLOT(setWarnUninitializedMode(bool))); @@ -1369,3 +1366,9 @@ void CMakeSetupDialog::doOutputErrorNext() this->Output->setTextCursor(textCursor); } } + +void CMakeSetupDialog::doWarningMessagesDialog() +{ + WarningMessagesDialog dialog(this, this->CMakeThread->cmakeInstance()); + dialog.exec(); +} diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h index bfd2bc9..4b53b1c 100644 --- a/Source/QtDialog/CMakeSetupDialog.h +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -83,6 +83,8 @@ protected slots: void doOutputFindPrev(); void doOutputErrorNext(); void doRegexExplorerDialog(); + /// display the modal warning messages dialog window + void doWarningMessagesDialog(); protected: @@ -102,7 +104,6 @@ protected: QAction* ExitAction; QAction* ConfigureAction; QAction* GenerateAction; - QAction* SuppressDevWarningsAction; QAction* WarnUninitializedAction; QAction* WarnUnusedAction; QAction* InstallForCommandLineAction; diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 1fcb676..71b7940 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -26,7 +26,6 @@ QCMake::QCMake(QObject* p) : QObject(p) { - this->SuppressDevWarnings = false; this->WarnUninitializedMode = false; this->WarnUnusedMode = false; qRegisterMetaType(); @@ -167,7 +166,6 @@ void QCMake::configure() this->CMakeInstance->SetGeneratorPlatform(""); this->CMakeInstance->SetGeneratorToolset(this->Toolset.toLocal8Bit().data()); this->CMakeInstance->LoadCache(); - this->CMakeInstance->SetSuppressDevWarnings(this->SuppressDevWarnings); this->CMakeInstance->SetWarnUninitialized(this->WarnUninitializedMode); this->CMakeInstance->SetWarnUnused(this->WarnUnusedMode); this->CMakeInstance->PreLoadCMakeFiles(); @@ -457,10 +455,24 @@ bool QCMake::getDebugOutput() const return this->CMakeInstance->GetDebugOutput(); } +bool QCMake::getSuppressDevWarnings() +{ + return this->CMakeInstance->GetSuppressDevWarnings(); +} void QCMake::setSuppressDevWarnings(bool value) { - this->SuppressDevWarnings = value; + this->CMakeInstance->SetSuppressDevWarnings(value); +} + +bool QCMake::getSuppressDeprecatedWarnings() +{ + return this->CMakeInstance->GetSuppressDeprecatedWarnings(); +} + +void QCMake::setSuppressDeprecatedWarnings(bool value) +{ + this->CMakeInstance->SetSuppressDeprecatedWarnings(value); } void QCMake::setWarnUninitializedMode(bool value) diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h index 2d45da9..4b787b9 100644 --- a/Source/QtDialog/QCMake.h +++ b/Source/QtDialog/QCMake.h @@ -91,8 +91,14 @@ public slots: void reloadCache(); /// set whether to do debug output void setDebugOutput(bool); + /// get whether to do suppress dev warnings + bool getSuppressDevWarnings(); /// set whether to do suppress dev warnings void setSuppressDevWarnings(bool value); + /// get whether to do suppress deprecated warnings + bool getSuppressDeprecatedWarnings(); + /// set whether to do suppress deprecated warnings + void setSuppressDeprecatedWarnings(bool value); /// set whether to run cmake with warnings about uninitialized variables void setWarnUninitializedMode(bool value); /// set whether to run cmake with warnings about unused variables @@ -146,7 +152,6 @@ protected: bool&, void* cd); static void stdoutCallback(const char* msg, size_t len, void* cd); static void stderrCallback(const char* msg, size_t len, void* cd); - bool SuppressDevWarnings; bool WarnUninitializedMode; bool WarnUnusedMode; bool WarnUnusedAllMode; diff --git a/Source/QtDialog/WarningMessagesDialog.cxx b/Source/QtDialog/WarningMessagesDialog.cxx new file mode 100644 index 0000000..735b71c --- /dev/null +++ b/Source/QtDialog/WarningMessagesDialog.cxx @@ -0,0 +1,43 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2015 Kitware, Inc., Gregor Jasny + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#include "WarningMessagesDialog.h" + +WarningMessagesDialog::WarningMessagesDialog(QWidget* prnt, QCMake* instance) + : QDialog(prnt), cmakeInstance(instance) +{ + this->setupUi(this); + this->setInitialValues(); + this->setupSignals(); +} + +void WarningMessagesDialog::setInitialValues() +{ + this->suppressDeveloperWarnings->setChecked( + this->cmakeInstance->getSuppressDevWarnings()); + this->suppressDeprecatedWarnings->setChecked( + this->cmakeInstance->getSuppressDeprecatedWarnings()); +} + +void WarningMessagesDialog::setupSignals() +{ + QObject::connect(this->buttonBox, SIGNAL(accepted()), + this, SLOT(doAccept())); +} + +void WarningMessagesDialog::doAccept() +{ + this->cmakeInstance->setSuppressDevWarnings( + this->suppressDeveloperWarnings->isChecked()); + this->cmakeInstance->setSuppressDeprecatedWarnings( + this->suppressDeprecatedWarnings->isChecked()); +} diff --git a/Source/QtDialog/WarningMessagesDialog.h b/Source/QtDialog/WarningMessagesDialog.h new file mode 100644 index 0000000..028ec10 --- /dev/null +++ b/Source/QtDialog/WarningMessagesDialog.h @@ -0,0 +1,53 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2015 Kitware, Inc., Gregor Jasny + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#ifndef WarningMessagesDialog_h +#define WarningMessagesDialog_h + +#include +#include + +#include "ui_WarningMessagesDialog.h" +#include "QCMake.h" + +/** + * Dialog window for setting the warning message related options. + */ +class WarningMessagesDialog : public QDialog, public Ui_MessagesDialog +{ + Q_OBJECT + +public: + WarningMessagesDialog(QWidget* prnt, QCMake* instance); + +private slots: + /** + * Handler for the accept event of the ok/cancel button box. + */ + void doAccept(); + +private: + QCMake* cmakeInstance; + + /** + * Set the initial values of the widgets on this dialog window, using the + * current state of the cache. + */ + void setInitialValues(); + + /** + * Setup the signals for the widgets on this dialog window. + */ + void setupSignals(); +}; + +#endif /* MessageDialog_h */ diff --git a/Source/QtDialog/WarningMessagesDialog.ui b/Source/QtDialog/WarningMessagesDialog.ui new file mode 100644 index 0000000..2367772 --- /dev/null +++ b/Source/QtDialog/WarningMessagesDialog.ui @@ -0,0 +1,120 @@ + + + MessagesDialog + + + + 0 + 0 + 250 + 150 + + + + Warning Messages + + + true + + + + + + + 0 + 0 + + + + Suppress Warnings + + + + + + + 0 + 0 + + + + Developer Warnings + + + false + + + + + + + + 0 + 0 + + + + Deprecated Warnings + + + false + + + + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + MessagesDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + MessagesDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/Source/cmake.cxx b/Source/cmake.cxx index c0a1196..e57e512 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2883,17 +2883,23 @@ void cmake::RunCheckForUnusedVariables() void cmake::SetSuppressDevWarnings(bool b) { + std::string value; + // equivalent to -Wno-dev if (b) { - this->DiagLevels["dev"] = DIAG_IGNORE; + value = "TRUE"; } // equivalent to -Wdev else { - this->DiagLevels["dev"] = std::max(this->DiagLevels["dev"], - DIAG_WARN); + value = "FALSE"; } + + this->AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", value.c_str(), + "Suppress Warnings that are meant for" + " the author of the CMakeLists.txt files.", + cmState::INTERNAL); } bool cmake::GetSuppressDevWarnings(cmMakefile const* mf) @@ -2932,3 +2938,24 @@ bool cmake::GetSuppressDeprecatedWarnings(cmMakefile const* mf) return cacheEntryValue && cmSystemTools::IsOff(cacheEntryValue); } } + +void cmake::SetSuppressDeprecatedWarnings(bool b) +{ + std::string value; + + // equivalent to -Wno-deprecated + if (b) + { + value = "FALSE"; + } + // equivalent to -Wdeprecated + else + { + value = "TRUE"; + } + + this->AddCacheEntry("CMAKE_WARN_DEPRECATED", value.c_str(), + "Whether to issue warnings for deprecated " + "functionality.", + cmState::INTERNAL); +} diff --git a/Source/cmake.h b/Source/cmake.h index 4c5515b..1d63e66 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -308,6 +308,9 @@ class cmake std::string const& GetCMakeEditCommand() const { return this->CMakeEditCommand; } + /* + * Set the state of the suppression of developer (author) warnings. + */ void SetSuppressDevWarnings(bool v); /* * Get the state of the suppression of developer (author) warnings. @@ -317,6 +320,10 @@ class cmake bool GetSuppressDevWarnings(cmMakefile const* mf = NULL); /* + * Set the state of the suppression of deprecated warnings. + */ + void SetSuppressDeprecatedWarnings(bool v); + /* * Get the state of the suppression of deprecated warnings. * Returns false, by default, if deprecated warnings should be shown, true * otherwise. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 10 09:30:16 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 10 Dec 2015 09:30:16 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-668-gfc6c507 Message-ID: <20151210143016.32518E0145@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via fc6c5074e800fb7fe3f829564d7a7e284133cdd9 (commit) via d462ac27d814e966c54bb638444e4b125d1d665f (commit) from a657b324822b5bd549706b337a74fa3bfd7bc1c6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc6c5074e800fb7fe3f829564d7a7e284133cdd9 commit fc6c5074e800fb7fe3f829564d7a7e284133cdd9 Merge: a657b32 d462ac2 Author: Brad King AuthorDate: Thu Dec 10 09:30:14 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 09:30:14 2015 -0500 Merge topic 'cmELF-use-KWIML' d462ac27 cmELF: Use KWIML ABI.h header to get endian-ness ----------------------------------------------------------------------- Summary of changes: Source/cmELF.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 10 09:30:36 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 10 Dec 2015 09:30:36 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1675-gd9556ec Message-ID: <20151210143036.1326CE017A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via d9556ecb53c6a34736fee6c2b58c360203fcabd9 (commit) via fc6c5074e800fb7fe3f829564d7a7e284133cdd9 (commit) via a657b324822b5bd549706b337a74fa3bfd7bc1c6 (commit) from b40c3f77caad27321aa570fd59b1e63ea972ea4d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9556ecb53c6a34736fee6c2b58c360203fcabd9 commit d9556ecb53c6a34736fee6c2b58c360203fcabd9 Merge: b40c3f7 fc6c507 Author: Brad King AuthorDate: Thu Dec 10 09:30:28 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 09:30:28 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 10 10:19:53 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 10 Dec 2015 10:19:53 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1678-gd94e61a Message-ID: <20151210151953.1CF12DFECC@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via d94e61ab747b1eb3e8209a8e6011cbd4926122db (commit) via c025e61ad47513d63c4b09a2267d254229c13c2e (commit) via 2b7a47d76ac5289acc1572917b8ac8266ffec0ca (commit) from d9556ecb53c6a34736fee6c2b58c360203fcabd9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d94e61ab747b1eb3e8209a8e6011cbd4926122db commit d94e61ab747b1eb3e8209a8e6011cbd4926122db Merge: d9556ec c025e61 Author: Brad King AuthorDate: Thu Dec 10 10:19:52 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 10:19:52 2015 -0500 Merge topic 'update-kwsys' into next c025e61a Merge branch 'upstream-kwsys' into update-kwsys 2b7a47d7 KWSys 2015-12-09 (cdcf4c47) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c025e61ad47513d63c4b09a2267d254229c13c2e commit c025e61ad47513d63c4b09a2267d254229c13c2e Merge: fc6c507 2b7a47d Author: Brad King AuthorDate: Thu Dec 10 09:33:14 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 09:33:14 2015 -0500 Merge branch 'upstream-kwsys' into update-kwsys https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2b7a47d76ac5289acc1572917b8ac8266ffec0ca commit 2b7a47d76ac5289acc1572917b8ac8266ffec0ca Author: KWSys Robot AuthorDate: Wed Dec 9 11:45:28 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 09:32:49 2015 -0500 KWSys 2015-12-09 (cdcf4c47) Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ cdcf4c47 | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' 6bfc1aef..cdcf4c47 Brad King (2): 452b10d5 FundamentalType: Drop KWSYS_CAN_CONVERT_UI64_TO_DOUBLE macro cdcf4c47 Drop the CPU.h component of KWSys diff --git a/CMakeLists.txt b/CMakeLists.txt index ce7f563..b859e79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,7 +124,6 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) SET(KWSYS_USE_FStream 1) SET(KWSYS_USE_String 1) SET(KWSYS_USE_SystemInformation 1) - SET(KWSYS_USE_CPU 1) ENDIF() # Enforce component dependencies. @@ -425,13 +424,6 @@ IF(KWSYS_USE_FundamentalType) ENDIF() ENDFOREACH() - IF(KWSYS_USE___INT64) - KWSYS_PLATFORM_CXX_TEST(KWSYS_CAN_CONVERT_UI64_TO_DOUBLE - "Checking whether unsigned __int64 can convert to double" DIRECT) - ELSE() - SET(KWSYS_CAN_CONVERT_UI64_TO_DOUBLE 1) - ENDIF() - # Check signedness of "char" type. KWSYS_PLATFORM_CXX_TEST_RUN(KWSYS_CHAR_IS_SIGNED "Checking whether char is signed" DIRECT) @@ -749,7 +741,7 @@ ENDFOREACH() # Add selected C components. FOREACH(c - Process Base64 Encoding FundamentalType MD5 Terminal System String CPU + Process Base64 Encoding FundamentalType MD5 Terminal System String ) IF(KWSYS_USE_${c}) # Use the corresponding header file. diff --git a/CPU.h.in b/CPU.h.in deleted file mode 100644 index 66ffbb1..0000000 --- a/CPU.h.in +++ /dev/null @@ -1,141 +0,0 @@ -/*============================================================================ - KWSys - Kitware System Library - Copyright 2000-2009 Kitware, Inc., Insight Software Consortium - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#ifndef @KWSYS_NAMESPACE at _CPU_h -#define @KWSYS_NAMESPACE at _CPU_h - -#include <@KWSYS_NAMESPACE@/Configure.h> - -/* Identify possible endian cases. The macro - @KWSYS_NAMESPACE at _CPU_ENDIAN_ID will be defined to one of these, or - 0 if unknown. */ -#define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG 4321 -#define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE 1234 - -/* Apple always defines one of these. */ -#if defined(__LITTLE_ENDIAN__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE -#elif defined(__BIG_ENDIAN__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG - -/* Alpha */ -#elif defined(__alpha) || defined(__alpha__) || defined(_M_ALPHA) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE - -/* Arm */ -#elif defined(__arm__) -# if !defined(__ARMEB__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE -# else -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG -# endif - -/* Intel x86 */ -#elif defined(__i386) || defined(__i386__) || defined(_M_IX86) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE -#elif defined(_X86_) || defined(__THW_INTEL__) || defined(__I86__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE -#elif defined(__MWERKS__) && defined(__INTEL__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE - -/* Intel x86-64 */ -#elif defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE -#elif defined(__amd64) || defined(__amd64__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE - -/* Intel Architecture-64 (Itanium) */ -#elif defined(__ia64) || defined(__ia64__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE -#elif defined(_IA64) || defined(__IA64__) || defined(_M_IA64) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE - -/* PowerPC */ -#elif defined(__powerpc) || defined(__powerpc__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG -#elif defined(__ppc) || defined(__ppc__) || defined(__POWERPC__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG - -/* SPARC */ -#elif defined(__sparc) || defined(__sparc__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG - -/* HP/PA RISC */ -#elif defined(__hppa) || defined(__hppa__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG - -/* Motorola 68k */ -#elif defined(__m68k__) || defined(M68000) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG - -/* MIPSel (MIPS little endian) */ -#elif defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE - -/* MIPSeb (MIPS big endian) */ -#elif defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG - -/* MIPS (fallback, big endian) */ -#elif defined(__mips) || defined(__mips__) || defined(__MIPS__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG - -/* NIOS2 */ -#elif defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE - -/* OpenRISC 1000 */ -#elif defined(__or1k__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG - -/* RS/6000 */ -#elif defined(__THW_RS600) || defined(_IBMR2) || defined(_POWER) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG -#elif defined(_ARCH_PWR) || defined(_ARCH_PWR2) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG - -/* System/370 */ -#elif defined(__370__) || defined(__THW_370__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG - -/* System/390 */ -#elif defined(__s390__) || defined(__s390x__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG - -/* z/Architecture */ -#elif defined(__SYSC_ZARCH__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG - -/* Aarch64 */ -#elif defined(__aarch64__) -# if !defined(__AARCH64EB__) -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE -# else -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG -# endif - -/* Unknown CPU */ -#else -# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID 0 -# if !defined(@KWSYS_NAMESPACE at _CPU_UNKNOWN_OKAY) -# error "The target CPU architecture is not known." -# endif -#endif - -/* If building a C or C++ file in kwsys itself, give the source file - access to the macros without a configured namespace. */ -#if defined(KWSYS_NAMESPACE) -# define KWSYS_CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID -# define KWSYS_CPU_ENDIAN_ID_BIG @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG -# define KWSYS_CPU_ENDIAN_ID_LITTLE @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE -#endif - -#endif diff --git a/FundamentalType.h.in b/FundamentalType.h.in index ff20063..e702a7a 100644 --- a/FundamentalType.h.in +++ b/FundamentalType.h.in @@ -90,18 +90,12 @@ typedef unsigned long kwsysFundamentalType_UInt32; #if @KWSYS_NAMESPACE at _SIZEOF_LONG == 8 typedef signed long kwsysFundamentalType_Int64; typedef unsigned long kwsysFundamentalType_UInt64; -/* Whether UInt64 can be converted to double. */ -# define @KWSYS_NAMESPACE at _CAN_CONVERT_UI64_TO_DOUBLE 1 #elif @KWSYS_NAMESPACE at _USE_LONG_LONG && @KWSYS_NAMESPACE at _SIZEOF_LONG_LONG == 8 typedef signed long long kwsysFundamentalType_Int64; typedef unsigned long long kwsysFundamentalType_UInt64; -/* Whether UInt64 can be converted to double. */ -# define @KWSYS_NAMESPACE at _CAN_CONVERT_UI64_TO_DOUBLE 1 #elif @KWSYS_NAMESPACE at _USE___INT64 && @KWSYS_NAMESPACE at _SIZEOF___INT64 == 8 typedef signed __int64 kwsysFundamentalType_Int64; typedef unsigned __int64 kwsysFundamentalType_UInt64; -/* Whether UInt64 can be converted to double. */ -# define @KWSYS_NAMESPACE at _CAN_CONVERT_UI64_TO_DOUBLE @KWSYS_CAN_CONVERT_UI64_TO_DOUBLE@ #else # error "No native data type can represent a 64-bit integer." #endif @@ -140,7 +134,6 @@ typedef unsigned __int64 kwsysFundamentalType_UInt64; # define KWSYS_USE_LONG_LONG @KWSYS_NAMESPACE at _USE_LONG_LONG # define KWSYS_USE___INT64 @KWSYS_NAMESPACE at _USE___INT64 # define KWSYS_CHAR_IS_SIGNED @KWSYS_NAMESPACE at _CHAR_IS_SIGNED -# define KWSYS_CAN_CONVERT_UI64_TO_DOUBLE @KWSYS_NAMESPACE at _CAN_CONVERT_UI64_TO_DOUBLE #endif #endif diff --git a/kwsysPlatformTestsCXX.cxx b/kwsysPlatformTestsCXX.cxx index 9626937..aaa33b8 100644 --- a/kwsysPlatformTestsCXX.cxx +++ b/kwsysPlatformTestsCXX.cxx @@ -78,21 +78,6 @@ int main() } #endif -#ifdef TEST_KWSYS_CAN_CONVERT_UI64_TO_DOUBLE -void function(double& l, unsigned __int64 const& r) -{ - l = static_cast(r); -} - -int main() -{ - double tTo = 0.0; - unsigned __int64 tFrom = 0; - function(tTo, tFrom); - return 0; -} -#endif - #ifdef TEST_KWSYS_IOS_HAS_ISTREAM_LONG_LONG # include int test_istream(std::istream& is, long long& x) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/CMakeLists.txt | 10 +-- Source/kwsys/CPU.h.in | 141 -------------------------------- Source/kwsys/FundamentalType.h.in | 7 -- Source/kwsys/kwsysPlatformTestsCXX.cxx | 15 ---- 4 files changed, 1 insertion(+), 172 deletions(-) delete mode 100644 Source/kwsys/CPU.h.in hooks/post-receive -- CMake From nilsgladitz at gmail.com Thu Dec 10 10:39:39 2015 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Thu, 10 Dec 2015 10:39:39 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1680-g3c09aff Message-ID: <20151210153939.3FCB7DE208@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 3c09aff91048787b6d3a019b36a81e1bd3a8562f (commit) via ecdc77f14d7a37f9d173ea2ca4946bf51c6a43d0 (commit) from d94e61ab747b1eb3e8209a8e6011cbd4926122db (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3c09aff91048787b6d3a019b36a81e1bd3a8562f commit 3c09aff91048787b6d3a019b36a81e1bd3a8562f Merge: d94e61a ecdc77f Author: Nils Gladitz AuthorDate: Thu Dec 10 10:39:38 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 10:39:38 2015 -0500 Merge topic 'wix-fix-comp-install-prop' into next ecdc77f1 CPackWIX: Fix installed file property lookups when using components https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ecdc77f14d7a37f9d173ea2ca4946bf51c6a43d0 commit ecdc77f14d7a37f9d173ea2ca4946bf51c6a43d0 Author: Nils Gladitz AuthorDate: Thu Dec 10 17:38:18 2015 +0100 Commit: Nils Gladitz CommitDate: Thu Dec 10 17:38:18 2015 +0100 CPackWIX: Fix installed file property lookups when using components The WIX generator incorrectly looked for installed file properties by relative paths that included the component specific staging directory prefix. Remove that prefix in installed file property lookups when generating packages with components. diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index d5246db..da8b486 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -911,8 +911,9 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons( relativeDirectoryPath = "."; } - cmInstalledFile const* directoryInstalledFile = - this->GetInstalledFile(relativeDirectoryPath); + cmInstalledFile const* directoryInstalledFile = this->GetInstalledFile( + this->RelativePathWithoutComponentPrefix(relativeDirectoryPath) + ); bool emptyDirectory = dir.GetNumberOfFiles() == 2; bool createDirectory = false; @@ -980,8 +981,9 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons( } else { - cmInstalledFile const* installedFile = - this->GetInstalledFile(relativePath); + cmInstalledFile const* installedFile = this->GetInstalledFile( + this->RelativePathWithoutComponentPrefix(relativePath) + ); if(installedFile) { @@ -1230,3 +1232,16 @@ void cmCPackWIXGenerator::AddCustomFlags( stream << " " << QuotePath(*i); } } + +std::string cmCPackWIXGenerator::RelativePathWithoutComponentPrefix( + std::string const& path) +{ + if(this->Components.empty()) + { + return path; + } + + std::string::size_type pos = path.find('/'); + + return path.substr(pos + 1); +} diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.h b/Source/CPack/WiX/cmCPackWIXGenerator.h index d501609..3f66b2c 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.h +++ b/Source/CPack/WiX/cmCPackWIXGenerator.h @@ -168,6 +168,9 @@ private: void AddCustomFlags( std::string const& variableName, std::ostream& stream); + std::string RelativePathWithoutComponentPrefix( + std::string const& path); + std::vector WixSources; id_map_t PathToIdMap; ambiguity_map_t IdAmbiguityCounter; ----------------------------------------------------------------------- Summary of changes: Source/CPack/WiX/cmCPackWIXGenerator.cxx | 23 +++++++++++++++++++---- Source/CPack/WiX/cmCPackWIXGenerator.h | 3 +++ 2 files changed, 22 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 10 11:20:14 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 10 Dec 2015 11:20:14 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1682-g987c2cf Message-ID: <20151210162014.14E78DFF47@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 987c2cf1d8ae76df4bf5bfc93745d898f981bff7 (commit) via e4b7c4e3c9ab8d95c41d9c8fac4d06cfc7407625 (commit) from 3c09aff91048787b6d3a019b36a81e1bd3a8562f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=987c2cf1d8ae76df4bf5bfc93745d898f981bff7 commit 987c2cf1d8ae76df4bf5bfc93745d898f981bff7 Merge: 3c09aff e4b7c4e Author: Brad King AuthorDate: Thu Dec 10 11:20:13 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 11:20:13 2015 -0500 Merge topic 'simplify-CTest.UpdateGIT-test' into next e4b7c4e3 Tests: Simplify CTest.UpdateGIT repo path construction https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4b7c4e3c9ab8d95c41d9c8fac4d06cfc7407625 commit e4b7c4e3c9ab8d95c41d9c8fac4d06cfc7407625 Author: Brad King AuthorDate: Thu Dec 10 11:16:11 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 11:18:45 2015 -0500 Tests: Simplify CTest.UpdateGIT repo path construction Avoid constructing full paths to .git repositories in the test. Use relative paths and let Git convert them to absolute paths internally. This is simpler and also avoids trouble with various absolute path root component conventions on Windows (`c:/`, `/c/`, `/cygdrive/c/`). diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in index 6488a1f..4731f9e 100644 --- a/Tests/CTestUpdateGIT.cmake.in +++ b/Tests/CTestUpdateGIT.cmake.in @@ -41,7 +41,6 @@ run_child( COMMAND ${GIT} --bare init ) file(REMOVE_RECURSE ${TOP}/repo.git/hooks) -set(REPO file://${TOP}/repo.git) # Create submodule repository. message("Creating submodule...") @@ -51,17 +50,13 @@ run_child( COMMAND ${GIT} --bare init ) file(REMOVE_RECURSE ${TOP}/module.git/hooks) -set(MOD_REPO file://${TOP}/module.git) -create_content(module) -run_child(WORKING_DIRECTORY ${TOP}/module - COMMAND ${GIT} init +run_child(WORKING_DIRECTORY ${TOP} + COMMAND ${GIT} clone module.git module ) file(REMOVE_RECURSE ${TOP}/module/.git/hooks) file(APPEND ${TOP}/module/.git/config " -[remote \"origin\"] -\turl = ${MOD_REPO} -\tfetch = +refs/heads/*:refs/remotes/origin/* ${AUTHOR_CONFIG}") +create_content(module) run_child(WORKING_DIRECTORY ${TOP}/module COMMAND ${GIT} add . ) @@ -85,9 +80,6 @@ run_child(WORKING_DIRECTORY ${TOP}/import ) file(REMOVE_RECURSE ${TOP}/import/.git/hooks) file(APPEND ${TOP}/import/.git/config " -[remote \"origin\"] -\turl = ${REPO} -\tfetch = +refs/heads/*:refs/remotes/origin/* ${AUTHOR_CONFIG}") run_child(WORKING_DIRECTORY ${TOP}/import COMMAND ${GIT} add . @@ -96,13 +88,13 @@ run_child(WORKING_DIRECTORY ${TOP}/import COMMAND ${GIT} config core.safecrlf false ) run_child(WORKING_DIRECTORY ${TOP}/import - COMMAND ${GIT} submodule add ${MOD_REPO} module + COMMAND ${GIT} submodule add ../module.git module ) run_child(WORKING_DIRECTORY ${TOP}/import COMMAND ${GIT} commit -m "Initial content" ) run_child(WORKING_DIRECTORY ${TOP}/import - COMMAND ${GIT} push origin master:refs/heads/master + COMMAND ${GIT} push ../repo.git master:refs/heads/master ) #----------------------------------------------------------------------------- @@ -123,7 +115,7 @@ run_child(WORKING_DIRECTORY ${TOP}/module message("Checking out revision 1...") run_child( WORKING_DIRECTORY ${TOP} - COMMAND ${GIT} clone ${REPO} user-source + COMMAND ${GIT} clone repo.git user-source ) file(REMOVE_RECURSE ${TOP}/user-source/.git/hooks) file(APPEND ${TOP}/user-source/.git/config "${AUTHOR_CONFIG}") @@ -278,7 +270,7 @@ set(CTEST_GIT_COMMAND \"${GIT}\") set(CTEST_GIT_UPDATE_OPTIONS) execute_process( WORKING_DIRECTORY \"${TOP}\" - COMMAND \"${GIT}\" clone \"${REPO}\" dash-source + COMMAND \"${GIT}\" clone repo.git dash-source ) # Test .git file. ----------------------------------------------------------------------- Summary of changes: Tests/CTestUpdateGIT.cmake.in | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 10 13:54:48 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 10 Dec 2015 13:54:48 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1684-g64cfea7 Message-ID: <20151210185448.700C3DFB6C@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 64cfea7261834d8075ab5d844e0779bae4c3724c (commit) via 4f8ab578a2e9e1221fb56463d02864ed429b8613 (commit) from 987c2cf1d8ae76df4bf5bfc93745d898f981bff7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=64cfea7261834d8075ab5d844e0779bae4c3724c commit 64cfea7261834d8075ab5d844e0779bae4c3724c Merge: 987c2cf 4f8ab57 Author: Brad King AuthorDate: Thu Dec 10 13:54:47 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 13:54:47 2015 -0500 Merge topic 'simplify-CTest.UpdateGIT-test' into next 4f8ab578 fixup! Tests: Simplify CTest.UpdateGIT repo path construction https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4f8ab578a2e9e1221fb56463d02864ed429b8613 commit 4f8ab578a2e9e1221fb56463d02864ed429b8613 Author: Brad King AuthorDate: Thu Dec 10 13:54:37 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 13:54:37 2015 -0500 fixup! Tests: Simplify CTest.UpdateGIT repo path construction diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in index 4731f9e..46230cc 100644 --- a/Tests/CTestUpdateGIT.cmake.in +++ b/Tests/CTestUpdateGIT.cmake.in @@ -70,17 +70,17 @@ run_child(WORKING_DIRECTORY ${TOP}/module #----------------------------------------------------------------------------- # Import initial content into the repository. message("Importing content...") -create_content(import) -file(WRITE ${TOP}/import/HEAD "HEAD\n") -file(WRITE ${TOP}/import/master "master\n") # Import the content into the repository. -run_child(WORKING_DIRECTORY ${TOP}/import - COMMAND ${GIT} init +run_child(WORKING_DIRECTORY ${TOP} + COMMAND ${GIT} clone repo.git import ) file(REMOVE_RECURSE ${TOP}/import/.git/hooks) file(APPEND ${TOP}/import/.git/config " ${AUTHOR_CONFIG}") +create_content(import) +file(WRITE ${TOP}/import/HEAD "HEAD\n") +file(WRITE ${TOP}/import/master "master\n") run_child(WORKING_DIRECTORY ${TOP}/import COMMAND ${GIT} add . ) @@ -94,7 +94,7 @@ run_child(WORKING_DIRECTORY ${TOP}/import COMMAND ${GIT} commit -m "Initial content" ) run_child(WORKING_DIRECTORY ${TOP}/import - COMMAND ${GIT} push ../repo.git master:refs/heads/master + COMMAND ${GIT} push origin master:refs/heads/master ) #----------------------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Tests/CTestUpdateGIT.cmake.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 10 13:55:39 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 10 Dec 2015 13:55:39 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1686-g2e600b5 Message-ID: <20151210185539.F2735E052A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 2e600b5a0fc16027df9b2138164bc5268c6fc9b6 (commit) via 972849fbb7531b2d43e4ecc5bd0cf2b0b75922da (commit) from 64cfea7261834d8075ab5d844e0779bae4c3724c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e600b5a0fc16027df9b2138164bc5268c6fc9b6 commit 2e600b5a0fc16027df9b2138164bc5268c6fc9b6 Merge: 64cfea7 972849f Author: Brad King AuthorDate: Thu Dec 10 13:55:39 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 13:55:39 2015 -0500 Merge topic 'simplify-CTest.UpdateGIT-test' into next 972849fb Tests: Simplify CTest.UpdateGIT repo path construction https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=972849fbb7531b2d43e4ecc5bd0cf2b0b75922da commit 972849fbb7531b2d43e4ecc5bd0cf2b0b75922da Author: Brad King AuthorDate: Thu Dec 10 11:16:11 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 13:54:54 2015 -0500 Tests: Simplify CTest.UpdateGIT repo path construction Avoid constructing full paths to .git repositories in the test. Use relative paths and let Git convert them to absolute paths internally. This is simpler and also avoids trouble with various absolute path root component conventions on Windows (`c:/`, `/c/`, `/cygdrive/c/`). diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in index 6488a1f..46230cc 100644 --- a/Tests/CTestUpdateGIT.cmake.in +++ b/Tests/CTestUpdateGIT.cmake.in @@ -41,7 +41,6 @@ run_child( COMMAND ${GIT} --bare init ) file(REMOVE_RECURSE ${TOP}/repo.git/hooks) -set(REPO file://${TOP}/repo.git) # Create submodule repository. message("Creating submodule...") @@ -51,17 +50,13 @@ run_child( COMMAND ${GIT} --bare init ) file(REMOVE_RECURSE ${TOP}/module.git/hooks) -set(MOD_REPO file://${TOP}/module.git) -create_content(module) -run_child(WORKING_DIRECTORY ${TOP}/module - COMMAND ${GIT} init +run_child(WORKING_DIRECTORY ${TOP} + COMMAND ${GIT} clone module.git module ) file(REMOVE_RECURSE ${TOP}/module/.git/hooks) file(APPEND ${TOP}/module/.git/config " -[remote \"origin\"] -\turl = ${MOD_REPO} -\tfetch = +refs/heads/*:refs/remotes/origin/* ${AUTHOR_CONFIG}") +create_content(module) run_child(WORKING_DIRECTORY ${TOP}/module COMMAND ${GIT} add . ) @@ -75,20 +70,17 @@ run_child(WORKING_DIRECTORY ${TOP}/module #----------------------------------------------------------------------------- # Import initial content into the repository. message("Importing content...") -create_content(import) -file(WRITE ${TOP}/import/HEAD "HEAD\n") -file(WRITE ${TOP}/import/master "master\n") # Import the content into the repository. -run_child(WORKING_DIRECTORY ${TOP}/import - COMMAND ${GIT} init +run_child(WORKING_DIRECTORY ${TOP} + COMMAND ${GIT} clone repo.git import ) file(REMOVE_RECURSE ${TOP}/import/.git/hooks) file(APPEND ${TOP}/import/.git/config " -[remote \"origin\"] -\turl = ${REPO} -\tfetch = +refs/heads/*:refs/remotes/origin/* ${AUTHOR_CONFIG}") +create_content(import) +file(WRITE ${TOP}/import/HEAD "HEAD\n") +file(WRITE ${TOP}/import/master "master\n") run_child(WORKING_DIRECTORY ${TOP}/import COMMAND ${GIT} add . ) @@ -96,7 +88,7 @@ run_child(WORKING_DIRECTORY ${TOP}/import COMMAND ${GIT} config core.safecrlf false ) run_child(WORKING_DIRECTORY ${TOP}/import - COMMAND ${GIT} submodule add ${MOD_REPO} module + COMMAND ${GIT} submodule add ../module.git module ) run_child(WORKING_DIRECTORY ${TOP}/import COMMAND ${GIT} commit -m "Initial content" @@ -123,7 +115,7 @@ run_child(WORKING_DIRECTORY ${TOP}/module message("Checking out revision 1...") run_child( WORKING_DIRECTORY ${TOP} - COMMAND ${GIT} clone ${REPO} user-source + COMMAND ${GIT} clone repo.git user-source ) file(REMOVE_RECURSE ${TOP}/user-source/.git/hooks) file(APPEND ${TOP}/user-source/.git/config "${AUTHOR_CONFIG}") @@ -278,7 +270,7 @@ set(CTEST_GIT_COMMAND \"${GIT}\") set(CTEST_GIT_UPDATE_OPTIONS) execute_process( WORKING_DIRECTORY \"${TOP}\" - COMMAND \"${GIT}\" clone \"${REPO}\" dash-source + COMMAND \"${GIT}\" clone repo.git dash-source ) # Test .git file. ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 10 14:23:31 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 10 Dec 2015 14:23:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1688-g68f9dcb Message-ID: <20151210192331.7837AE0255@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 68f9dcba60f873d3091a1201a88dfdc2e26a1bb1 (commit) via 1549927d7dc29476ada7b0c0867e9630ebe6ea00 (commit) from 2e600b5a0fc16027df9b2138164bc5268c6fc9b6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=68f9dcba60f873d3091a1201a88dfdc2e26a1bb1 commit 68f9dcba60f873d3091a1201a88dfdc2e26a1bb1 Merge: 2e600b5 1549927 Author: Brad King AuthorDate: Thu Dec 10 14:23:30 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 14:23:30 2015 -0500 Merge topic 'FindOpenMP-clang' into next 1549927d FindOpenMP: Add Clang support https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1549927d7dc29476ada7b0c0867e9630ebe6ea00 commit 1549927d7dc29476ada7b0c0867e9630ebe6ea00 Author: Chris Pavlina AuthorDate: Thu Dec 10 10:40:27 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 14:19:35 2015 -0500 FindOpenMP: Add Clang support diff --git a/Help/release/dev/FindOpenMP-clang.rst b/Help/release/dev/FindOpenMP-clang.rst new file mode 100644 index 0000000..44c805c --- /dev/null +++ b/Help/release/dev/FindOpenMP-clang.rst @@ -0,0 +1,4 @@ +FindOpenMP-clang +---------------- + +* The :module:`FindOpenMP` module learned to support Clang. diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index a102c66..ee4bdd6 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -50,6 +50,8 @@ function(_OPENMP_FLAG_CANDIDATES LANG) " " #GNU "-fopenmp" + #Clang + "-fopenmp=libomp" #Microsoft Visual Studio "/openmp" #Intel windows @@ -67,6 +69,7 @@ function(_OPENMP_FLAG_CANDIDATES LANG) ) set(OMP_FLAG_GNU "-fopenmp") + set(OMP_FLAG_Clang "-fopenmp=libomp") set(OMP_FLAG_HP "+Oopenmp") if(WIN32) set(OMP_FLAG_Intel "-Qopenmp") ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindOpenMP-clang.rst | 4 ++++ Modules/FindOpenMP.cmake | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 Help/release/dev/FindOpenMP-clang.rst hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 10 14:35:21 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 10 Dec 2015 14:35:21 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1692-g65b3b57 Message-ID: <20151210193521.59C25E05F4@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 65b3b57e0b5d3c9e8f0b8fff5fa336c00a3e1644 (commit) via 4c60e07d857277f1edc45358b35c6f50439324b4 (commit) via a42bf6c5ddc70e0b15bbf60f11678aae71ff1f56 (commit) via 93936d78d221ea49f918f95e33b97796b2a3190f (commit) from 68f9dcba60f873d3091a1201a88dfdc2e26a1bb1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65b3b57e0b5d3c9e8f0b8fff5fa336c00a3e1644 commit 65b3b57e0b5d3c9e8f0b8fff5fa336c00a3e1644 Merge: 68f9dcb 4c60e07 Author: Brad King AuthorDate: Thu Dec 10 14:35:20 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 14:35:20 2015 -0500 Merge topic 'release-wix-config' into next 4c60e07d CMake: Fix WiX-generated .msi package file name convention a42bf6c5 Utilities/Release: Add support for copying .msi files 93936d78 Utilities/Release: Avoid repeat copy of files with same suffix https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c60e07d857277f1edc45358b35c6f50439324b4 commit 4c60e07d857277f1edc45358b35c6f50439324b4 Author: Brad King AuthorDate: Thu Dec 10 14:33:40 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 14:33:40 2015 -0500 CMake: Fix WiX-generated .msi package file name convention Update our configuration of the CPack WIX generator for CMake itself to produce file names consistent with other CPack generators. diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index ae00653..4ebf306 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -194,9 +194,9 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") # Reset CPACK_PACKAGE_VERSION to deal with WiX restriction. # But the file names still use the full CMake_VERSION value: set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}- at CMake_VERSION@-${CPACK_SYSTEM_NAME}") + "cmake- at CMake_VERSION@-${CPACK_SYSTEM_NAME}") set(CPACK_SOURCE_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}- at CMake_VERSION@-Source") + "cmake- at CMake_VERSION@") if(NOT CPACK_WIX_SIZEOF_VOID_P) set(CPACK_WIX_SIZEOF_VOID_P "@CMAKE_SIZEOF_VOID_P@") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a42bf6c5ddc70e0b15bbf60f11678aae71ff1f56 commit a42bf6c5ddc70e0b15bbf60f11678aae71ff1f56 Author: Brad King AuthorDate: Thu Dec 10 14:30:55 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 14:30:55 2015 -0500 Utilities/Release: Add support for copying .msi files diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index f41ec9c..0a3d324 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -112,6 +112,9 @@ foreach(gen ${generators}) if("${gen}" STREQUAL "TZ") set(SUFFIXES ${SUFFIXES} "*.tar.Z") endif() + if("${gen}" STREQUAL "WIX") + set(SUFFIXES ${SUFFIXES} "*.msi") + endif() if("${gen}" STREQUAL "ZIP") set(SUFFIXES ${SUFFIXES} "*.zip") endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93936d78d221ea49f918f95e33b97796b2a3190f commit 93936d78d221ea49f918f95e33b97796b2a3190f Author: Brad King AuthorDate: Thu Dec 10 14:28:57 2015 -0500 Commit: Brad King CommitDate: Thu Dec 10 14:29:37 2015 -0500 Utilities/Release: Avoid repeat copy of files with same suffix diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index c50602d..f41ec9c 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -120,6 +120,10 @@ foreach(gen ${generators}) endif() endforeach() +if(SUFFIXES) + list(REMOVE_DUPLICATES SUFFIXES) +endif() + if(LOCAL_DIR) file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_DIR}") else() ----------------------------------------------------------------------- Summary of changes: CMakeCPackOptions.cmake.in | 4 ++-- Utilities/Release/release_cmake.cmake | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From gjasny at googlemail.com Thu Dec 10 16:42:20 2015 From: gjasny at googlemail.com (Gregor Jasny) Date: Thu, 10 Dec 2015 16:42:20 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1695-gcaa83f4 Message-ID: <20151210214220.1D1F6DFBB8@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via caa83f4e41630cd00e8e32f2330d2c1be045b95f (commit) via 565d080a9a1e133bda868e905226181b60e90356 (commit) via 34f5ef564aa94f2f66f35c708dbfca260b419e4b (commit) from 65b3b57e0b5d3c9e8f0b8fff5fa336c00a3e1644 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=caa83f4e41630cd00e8e32f2330d2c1be045b95f commit caa83f4e41630cd00e8e32f2330d2c1be045b95f Merge: 65b3b57 565d080 Author: Gregor Jasny AuthorDate: Thu Dec 10 16:42:16 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 16:42:16 2015 -0500 Merge topic 'ios-universal' into next 565d080a Xcode: Add support for combined install on iOS 34f5ef56 iOS: Fix App Bundle layout https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=565d080a9a1e133bda868e905226181b60e90356 commit 565d080a9a1e133bda868e905226181b60e90356 Author: Ruslan Baratov AuthorDate: Thu Oct 8 03:09:34 2015 +0300 Commit: Gregor Jasny CommitDate: Thu Dec 10 22:36:12 2015 +0100 Xcode: Add support for combined install on iOS This patch solves the problem of installing both: Device and Simulator libraries on iOS. Before only one of them was installed. If the IOS_INSTALL_COMBINED property is set on a target, a special install hook will be activated which builds the corresponding target and combines both at the install location. The original patch was contributed by Ruslan Baratov, and polished by Gregor Jasny. diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 931363c..a41d484 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -191,6 +191,7 @@ Properties on Targets /prop_tgt/INTERFACE_SYSTEM_INCLUDE_DIRECTORIES /prop_tgt/INTERPROCEDURAL_OPTIMIZATION_CONFIG /prop_tgt/INTERPROCEDURAL_OPTIMIZATION + /prop_tgt/IOS_INSTALL_COMBINED /prop_tgt/JOB_POOL_COMPILE /prop_tgt/JOB_POOL_LINK /prop_tgt/LABELS diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 2116900..3f49572 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -257,6 +257,7 @@ Variables that Control the Build /variable/CMAKE_INSTALL_NAME_DIR /variable/CMAKE_INSTALL_RPATH /variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH + /variable/CMAKE_IOS_INSTALL_COMBINED /variable/CMAKE_LANG_COMPILER_LAUNCHER /variable/CMAKE_LANG_INCLUDE_WHAT_YOU_USE /variable/CMAKE_LANG_VISIBILITY_PRESET diff --git a/Help/prop_tgt/IOS_INSTALL_COMBINED.rst b/Help/prop_tgt/IOS_INSTALL_COMBINED.rst new file mode 100644 index 0000000..59f67a7 --- /dev/null +++ b/Help/prop_tgt/IOS_INSTALL_COMBINED.rst @@ -0,0 +1,11 @@ +IOS_INSTALL_COMBINED +-------------------- + +Build a combined (device and simulator) target when installing. + +When this property is set to set to false (which is the default) then it will +either be built with the device SDK or the simulator SDK depending on the SDK +set. But if this property is set to true then the target will at install time +also be built for the corresponding SDK and combined into one library. + +This feature requires at least Xcode version 6. diff --git a/Help/release/dev/ios-universal.rst b/Help/release/dev/ios-universal.rst new file mode 100644 index 0000000..f96abed --- /dev/null +++ b/Help/release/dev/ios-universal.rst @@ -0,0 +1,7 @@ +ios-universal +------------- + +* When building for embedded Apple platforms like iOS CMake learned to build and + install combined targets which contain both a device and a simulator build. + This behavior can be enabled by setting the :prop_tgt:`IOS_INSTALL_COMBINED` + target property. diff --git a/Help/variable/CMAKE_IOS_INSTALL_COMBINED.rst b/Help/variable/CMAKE_IOS_INSTALL_COMBINED.rst new file mode 100644 index 0000000..c5cb9b6 --- /dev/null +++ b/Help/variable/CMAKE_IOS_INSTALL_COMBINED.rst @@ -0,0 +1,8 @@ +CMAKE_IOS_INSTALL_COMBINED +-------------------------- + +Default value for :prop_tgt:`IOS_INSTALL_COMBINED` of targets. + +This variable is used to initialize the :prop_tgt:`IOS_INSTALL_COMBINED` +property on all the targets. See that target property for additional +information. diff --git a/Modules/CMakeIOSInstallCombined.cmake b/Modules/CMakeIOSInstallCombined.cmake new file mode 100644 index 0000000..f052a3b --- /dev/null +++ b/Modules/CMakeIOSInstallCombined.cmake @@ -0,0 +1,297 @@ + +#============================================================================= +# Copyright 2014-2015 Ruslan Baratov, Gregor Jasny +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# Function to print messages of this module +function(_ios_install_combined_message) + message("[iOS combined] " ${ARGN}) +endfunction() + +# Get build settings for the current target/config/SDK by running +# `xcodebuild -sdk ... -showBuildSettings` and parsing it's output +function(_ios_install_combined_get_build_setting sdk variable resultvar) + if("${sdk}" STREQUAL "") + message(FATAL_ERROR "`sdk` is empty") + endif() + + if("${variable}" STREQUAL "") + message(FATAL_ERROR "`variable` is empty") + endif() + + if("${resultvar}" STREQUAL "") + message(FATAL_ERROR "`resultvar` is empty") + endif() + + set( + cmd + xcodebuild -showBuildSettings + -sdk "${sdk}" + -target "${CURRENT_TARGET}" + -config "${CURRENT_CONFIG}" + ) + + execute_process( + COMMAND ${cmd} + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ) + + if(NOT result EQUAL 0) + message(FATAL_ERROR "Command failed (${result}): ${cmd}") + endif() + + if(NOT output MATCHES " ${variable} = ([^\n]*)") + message(FATAL_ERROR "${variable} not found.") + endif() + + set("${resultvar}" "${CMAKE_MATCH_1}" PARENT_SCOPE) +endfunction() + +# Get architectures of given SDK (iphonesimulator/iphoneos) +function(_ios_install_combined_get_valid_archs sdk resultvar) + cmake_policy(SET CMP0007 NEW) + + if("${resultvar}" STREQUAL "") + message(FATAL_ERROR "`resultvar` is empty") + endif() + + _ios_install_combined_get_build_setting("${sdk}" "VALID_ARCHS" valid_archs) + + separate_arguments(valid_archs) + list(REMOVE_ITEM valid_archs "") # remove empty elements + list(REMOVE_DUPLICATES valid_archs) + + set("${resultvar}" "${valid_archs}" PARENT_SCOPE) +endfunction() + +# Final target can contain more architectures that specified by SDK. This +# function will run 'lipo -info' and parse output. Result will be returned +# as a CMake list. +function(_ios_install_combined_get_real_archs filename resultvar) + set(cmd "${_lipo_path}" -info "${filename}") + execute_process( + COMMAND ${cmd} + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE output + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + if(NOT result EQUAL 0) + message( + FATAL_ERROR "Command failed (${result}): ${cmd}\n\nOutput:\n${output}" + ) + endif() + + if(NOT output MATCHES "(Architectures in the fat file: [^\n]+ are|Non-fat file: [^\n]+ is architecture): ([^\n]*)") + message(FATAL_ERROR "Could not detect architecture from: ${output}") + endif() + + separate_arguments(CMAKE_MATCH_2) + set(${resultvar} ${CMAKE_MATCH_2} PARENT_SCOPE) +endfunction() + +# Run build command for the given SDK +function(_ios_install_combined_build sdk) + if("${sdk}" STREQUAL "") + message(FATAL_ERROR "`sdk` is empty") + endif() + + _ios_install_combined_message("Build `${CURRENT_TARGET}` for `${sdk}`") + + execute_process( + COMMAND + "${CMAKE_COMMAND}" + --build + . + --target "${CURRENT_TARGET}" + --config ${CURRENT_CONFIG} + -- + -sdk "${sdk}" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" + RESULT_VARIABLE result + ) + + if(NOT result EQUAL 0) + message(FATAL_ERROR "Build failed") + endif() +endfunction() + +# Remove given architecture from file. This step needed only in rare cases +# when target was built in "unusual" way. Emit warning message. +function(_ios_install_combined_remove_arch lib arch) + _ios_install_combined_message( + "Warning! Unexpected architecture `${arch}` detected and will be removed " + "from file `${lib}`") + set(cmd "${_lipo_path}" -remove ${arch} -output ${lib} ${lib}) + execute_process( + COMMAND ${cmd} + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE output + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + if(NOT result EQUAL 0) + message( + FATAL_ERROR "Command failed (${result}): ${cmd}\n\nOutput:\n${output}" + ) + endif() +endfunction() + +# Check that 'lib' contains only 'archs' architectures (remove others). +function(_ios_install_combined_keep_archs lib archs) + _ios_install_combined_get_real_archs("${lib}" real_archs) + set(archs_to_remove ${real_archs}) + list(REMOVE_ITEM archs_to_remove ${archs}) + foreach(x ${archs_to_remove}) + _ios_install_combined_remove_arch("${lib}" "${x}") + endforeach() +endfunction() + +function(_ios_install_combined_detect_sdks this_sdk_var corr_sdk_var) + cmake_policy(SET CMP0057 NEW) + + set(this_sdk "$ENV{PLATFORM_NAME}") + if("${this_sdk}" STREQUAL "") + message(FATAL_ERROR "Environment variable PLATFORM_NAME is empty") + endif() + + set(all_platforms "$ENV{SUPPORTED_PLATFORMS}") + if("${all_platforms}" STREQUAL "") + message(FATAL_ERROR "Environment variable SUPPORTED_PLATFORMS is empty") + endif() + + separate_arguments(all_platforms) + if(NOT this_sdk IN_LIST all_platforms) + message(FATAL_ERROR "`${this_sdk}` not found in `${all_platforms}`") + endif() + + list(REMOVE_ITEM all_platforms "" "${this_sdk}") + list(LENGTH all_platforms all_platforms_length) + if(NOT all_platforms_length EQUAL 1) + message(FATAL_ERROR "Expected one element: ${all_platforms}") + endif() + + set(${this_sdk_var} "${this_sdk}" PARENT_SCOPE) + set(${corr_sdk_var} "${all_platforms}" PARENT_SCOPE) +endfunction() + +# Create combined binary for the given target. +# +# Preconditions: +# * Target already installed at ${destination} +# for the ${PLATFORM_NAME} platform +# +# This function will: +# * Run build for the lacking platform, i.e. opposite to the ${PLATFORM_NAME} +# * Fuse both libraries by running lipo +function(ios_install_combined target destination) + if("${target}" STREQUAL "") + message(FATAL_ERROR "`target` is empty") + endif() + + if("${destination}" STREQUAL "") + message(FATAL_ERROR "`destination` is empty") + endif() + + if(NOT IS_ABSOLUTE "${destination}") + message(FATAL_ERROR "`destination` is not absolute: ${destination}") + endif() + + if(IS_DIRECTORY "${destination}" OR IS_SYMLINK "${destination}") + message(FATAL_ERROR "`destination` is no regular file: ${destination}") + endif() + + if("${CMAKE_BINARY_DIR}" STREQUAL "") + message(FATAL_ERROR "`CMAKE_BINARY_DIR` is empty") + endif() + + if(NOT IS_DIRECTORY "${CMAKE_BINARY_DIR}") + message(FATAL_ERROR "Is not a directory: ${CMAKE_BINARY_DIR}") + endif() + + if("${CMAKE_INSTALL_CONFIG_NAME}" STREQUAL "") + message(FATAL_ERROR "CMAKE_INSTALL_CONFIG_NAME is empty") + endif() + + set(cmd xcrun -f lipo) + execute_process( + COMMAND ${cmd} + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE output + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + if(NOT result EQUAL 0) + message( + FATAL_ERROR "Command failed (${result}): ${cmd}\n\nOutput:\n${output}" + ) + endif() + set(_lipo_path ${output}) + + set(CURRENT_CONFIG "${CMAKE_INSTALL_CONFIG_NAME}") + set(CURRENT_TARGET "${target}") + + _ios_install_combined_message("Target: ${CURRENT_TARGET}") + _ios_install_combined_message("Config: ${CURRENT_CONFIG}") + _ios_install_combined_message("Destination: ${destination}") + + # Get SDKs + _ios_install_combined_detect_sdks(this_sdk corr_sdk) + + # Get architectures of the target + _ios_install_combined_get_valid_archs("${corr_sdk}" corr_valid_archs) + _ios_install_combined_get_valid_archs("${this_sdk}" this_valid_archs) + + # Return if there are no valid architectures for the SDK. + # (note that library already installed) + if("${corr_valid_archs}" STREQUAL "") + _ios_install_combined_message( + "No architectures detected for `${corr_sdk}` (skip)" + ) + return() + endif() + + # Trigger build of corresponding target + _ios_install_combined_build("${corr_sdk}") + + # Get location of the library in build directory + _ios_install_combined_get_build_setting( + "${corr_sdk}" "CONFIGURATION_BUILD_DIR" corr_build_dir) + _ios_install_combined_get_build_setting( + "${corr_sdk}" "EXECUTABLE_PATH" corr_executable_path) + set(corr "${corr_build_dir}/${corr_executable_path}") + + _ios_install_combined_keep_archs("${corr}" "${corr_valid_archs}") + _ios_install_combined_keep_archs("${destination}" "${this_valid_archs}") + + _ios_install_combined_message("Current: ${destination}") + _ios_install_combined_message("Corresponding: ${corr}") + + set(cmd "${_lipo_path}" -create ${corr} ${destination} -output ${destination}) + + execute_process( + COMMAND ${cmd} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + RESULT_VARIABLE result + ) + + if(NOT result EQUAL 0) + message(FATAL_ERROR "Command failed: ${cmd}") + endif() + + _ios_install_combined_message("Install done: ${destination}") +endfunction() diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index c6908c3..1158a27 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -531,6 +531,7 @@ void cmInstallTargetGenerator::PostReplacementTweaks(std::ostream& os, { this->AddInstallNamePatchRule(os, indent, config, file); this->AddChrpathPatchRule(os, indent, config, file); + this->AddUniversalInstallRule(os, indent, file); this->AddRanlibRule(os, indent, file); this->AddStripRule(os, indent, file); } @@ -867,3 +868,46 @@ cmInstallTargetGenerator::AddRanlibRule(std::ostream& os, os << indent << "execute_process(COMMAND \"" << ranlib << "\" \"" << toDestDirPath << "\")\n"; } + +//---------------------------------------------------------------------------- +void +cmInstallTargetGenerator +::AddUniversalInstallRule(std::ostream& os, + Indent const& indent, + const std::string& toDestDirPath) +{ + cmMakefile const* mf = this->Target->Target->GetMakefile(); + + if(!mf->PlatformIsAppleIos() || !mf->IsOn("XCODE")) + { + return; + } + + const char* xcodeVersion = mf->GetDefinition("XCODE_VERSION"); + if(!xcodeVersion || cmSystemTools::VersionCompareGreater("6", xcodeVersion)) + { + return; + } + + switch(this->Target->GetType()) + { + case cmState::EXECUTABLE: + case cmState::STATIC_LIBRARY: + case cmState::SHARED_LIBRARY: + case cmState::MODULE_LIBRARY: + break; + + default: + return; + } + + if(!this->Target->Target->GetPropertyAsBool("IOS_INSTALL_COMBINED")) + { + return; + } + + os << indent << "include(CMakeIOSInstallCombined)\n"; + os << indent << "ios_install_combined(" + << "\"" << this->Target->Target->GetName() << "\" " + << "\"" << toDestDirPath << "\")\n"; +} diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h index ec89c05..18b3130 100644 --- a/Source/cmInstallTargetGenerator.h +++ b/Source/cmInstallTargetGenerator.h @@ -101,6 +101,8 @@ protected: const std::string& toDestDirPath); void AddRanlibRule(std::ostream& os, Indent const& indent, const std::string& toDestDirPath); + void AddUniversalInstallRule(std::ostream& os, Indent const& indent, + const std::string& toDestDirPath); std::string TargetName; cmGeneratorTarget* Target; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 9ea1a34..1986e5f 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -132,6 +132,7 @@ void cmTarget::SetMakefile(cmMakefile* mf) this->SetPropertyDefault("Fortran_MODULE_DIRECTORY", 0); this->SetPropertyDefault("GNUtoMS", 0); this->SetPropertyDefault("OSX_ARCHITECTURES", 0); + this->SetPropertyDefault("IOS_INSTALL_COMBINED", 0); this->SetPropertyDefault("AUTOMOC", 0); this->SetPropertyDefault("AUTOUIC", 0); this->SetPropertyDefault("AUTORCC", 0); diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index f89d620..acc0075 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -94,3 +94,39 @@ if(NOT XCODE_VERSION VERSION_LESS 7) run_cmake(XcodeTbdStub) unset(RunCMake_TEST_OPTIONS) endif() + +if(NOT XCODE_VERSION VERSION_LESS 6) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombined-build) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_OPTIONS + "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install" + "-DCMAKE_IOS_INSTALL_COMBINED=YES") + + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + + run_cmake(XcodeIOSInstallCombined) + run_cmake_command(XcodeIOSInstallCombined-build ${CMAKE_COMMAND} --build .) + run_cmake_command(XcodeIOSInstallCombined-install ${CMAKE_COMMAND} --build . --target install) + + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_NO_CLEAN) + unset(RunCMake_TEST_OPTIONS) + + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedPrune-build) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_OPTIONS + "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install" + "-DCMAKE_IOS_INSTALL_COMBINED=YES") + + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + + run_cmake(XcodeIOSInstallCombinedPrune) + run_cmake_command(XcodeIOSInstallCombinedPrune-build ${CMAKE_COMMAND} --build .) + run_cmake_command(XcodeIOSInstallCombinedPrune-install ${CMAKE_COMMAND} --build . --target install) + + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_NO_CLEAN) + unset(RunCMake_TEST_OPTIONS) +endif() diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake new file mode 100644 index 0000000..a1c0671 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake @@ -0,0 +1,30 @@ +function(verify_architectures file) + execute_process( + COMMAND xcrun otool -vf ${RunCMake_TEST_BINARY_DIR}/_install/${file} + OUTPUT_VARIABLE otool_out + ERROR_VARIABLE otool_err + RESULT_VARIABLE otool_result) + if(NOT otool_result EQUAL "0") + message(SEND_ERROR "Could not retrieve fat headers: ${otool_err}") + return() + endif() + + string(REGEX MATCHALL "architecture [^ \n\t]+" architectures ${otool_out}) + string(REPLACE "architecture " "" actual "${architectures}") + list(SORT actual) + + set(expected arm64 armv7 i386 x86_64) + + if(NOT actual STREQUAL expected) + message(SEND_ERROR + "The actual library contains the architectures:\n ${actual} \n" + "which do not match expected ones:\n ${expected} \n" + "otool output:\n${otool_out}") + endif() +endfunction() + +verify_architectures(bin/foo_app.app/foo_app) +verify_architectures(lib/libfoo_static.a) +verify_architectures(lib/libfoo_shared.dylib) +verify_architectures(lib/foo_bundle.bundle/foo_bundle) +verify_architectures(lib/foo_framework.framework/foo_framework) diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake new file mode 100644 index 0000000..fc830b1 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.3) + +project(IOSInstallCombined CXX) + +set(CMAKE_OSX_SYSROOT iphoneos) +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") +set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf") +set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") + +set(CMAKE_OSX_ARCHITECTURES "armv7;arm64;i386;x86_64") + +add_executable(foo_app MACOSX_BUNDLE main.cpp) +install(TARGETS foo_app BUNDLE DESTINATION bin) + +add_library(foo_static STATIC foo.cpp) +install(TARGETS foo_static ARCHIVE DESTINATION lib) + +add_library(foo_shared SHARED foo.cpp) +install(TARGETS foo_shared LIBRARY DESTINATION lib) + +add_library(foo_bundle MODULE foo.cpp) +set_target_properties(foo_bundle PROPERTIES BUNDLE TRUE) +install(TARGETS foo_bundle LIBRARY DESTINATION lib) + +add_library(foo_framework SHARED foo.cpp) +set_target_properties(foo_framework PROPERTIES FRAMEWORK TRUE) +install(TARGETS foo_framework FRAMEWORK DESTINATION lib) diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-check.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-check.cmake new file mode 100644 index 0000000..83da17d --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-check.cmake @@ -0,0 +1,26 @@ +function(verify_architectures file) + execute_process( + COMMAND xcrun otool -vf ${RunCMake_TEST_BINARY_DIR}/_install/${file} + OUTPUT_VARIABLE otool_out + ERROR_VARIABLE otool_err + RESULT_VARIABLE otool_result) + if(NOT otool_result EQUAL "0") + message(SEND_ERROR "Could not retrieve fat headers: ${otool_err}") + return() + endif() + + string(REGEX MATCHALL "architecture [^ \n\t]+" architectures ${otool_out}) + string(REPLACE "architecture " "" actual "${architectures}") + list(SORT actual) + + set(expected armv7 x86_64) + + if(NOT actual STREQUAL expected) + message(SEND_ERROR + "The actual library contains the architectures:\n ${actual} \n" + "which do not match expected ones:\n ${expected} \n" + "otool output:\n${otool_out}") + endif() +endfunction() + +verify_architectures(lib/libfoo.dylib) diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-stdout.txt b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-stdout.txt new file mode 100644 index 0000000..28edadc --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-stdout.txt @@ -0,0 +1,2 @@ +.*Unexpected architecture `i386` detected.* +.*Unexpected architecture `arm64` detected.* \ No newline at end of file diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake new file mode 100644 index 0000000..b47d3a5 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.3) + +project(XcodeIOSInstallCombinedPrune CXX) + +set(CMAKE_OSX_SYSROOT iphoneos) +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") +set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf") + +add_library(foo SHARED foo.cpp) +install(TARGETS foo DESTINATION lib) + +add_library(baz SHARED foo.cpp) +set_target_properties( + foo baz + PROPERTIES + XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] armv7 + XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] armv7 + XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] x86_64 + XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] x86_64 +) + +add_library(boo SHARED foo.cpp) +set_target_properties( + boo + PROPERTIES + XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] arm64 + XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] arm64 + XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] i386 + XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] i386 +) + +add_custom_command( + TARGET foo + POST_BUILD + COMMAND lipo -create $ $ -output $ +) diff --git a/Tests/RunCMake/XcodeProject/main.cpp b/Tests/RunCMake/XcodeProject/main.cpp new file mode 100644 index 0000000..1695921 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/main.cpp @@ -0,0 +1,3 @@ +int main(int argc, const char * argv[]) { + return 0; +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=34f5ef564aa94f2f66f35c708dbfca260b419e4b commit 34f5ef564aa94f2f66f35c708dbfca260b419e4b Author: Gregor Jasny AuthorDate: Thu Dec 10 20:43:33 2015 +0100 Commit: Gregor Jasny CommitDate: Thu Dec 10 20:49:42 2015 +0100 iOS: Fix App Bundle layout In contrast to OS X the iOS App Bundle layout is a flat structure. diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 59d06f6..c6908c3 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -152,13 +152,19 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, // Handle OSX Bundles. if(this->Target->IsAppBundleOnApple()) { + cmMakefile const* mf = this->Target->Target->GetMakefile(); + // Install the whole app bundle directory. type = cmInstallType_DIRECTORY; literal_args += " USE_SOURCE_PERMISSIONS"; from1 += ".app"; // Tweaks apply to the binary inside the bundle. - to1 += ".app/Contents/MacOS/"; + to1 += ".app/"; + if(!mf->PlatformIsAppleIos()) + { + to1 += "Contents/MacOS/"; + } to1 += targetName; } else ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + Help/manual/cmake-variables.7.rst | 1 + Help/prop_tgt/IOS_INSTALL_COMBINED.rst | 11 + Help/release/dev/ios-universal.rst | 7 + Help/variable/CMAKE_IOS_INSTALL_COMBINED.rst | 8 + Modules/CMakeIOSInstallCombined.cmake | 297 ++++++++++++++++++++ Source/cmInstallTargetGenerator.cxx | 52 +++- Source/cmInstallTargetGenerator.h | 2 + Source/cmTarget.cxx | 1 + Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 36 +++ .../XcodeIOSInstallCombined-install-check.cmake | 30 ++ .../XcodeProject/XcodeIOSInstallCombined.cmake | 27 ++ ...codeIOSInstallCombinedPrune-install-check.cmake | 26 ++ ...XcodeIOSInstallCombinedPrune-install-stdout.txt | 2 + .../XcodeIOSInstallCombinedPrune.cmake | 36 +++ Tests/RunCMake/XcodeProject/{main.m => main.cpp} | 2 +- 16 files changed, 537 insertions(+), 2 deletions(-) create mode 100644 Help/prop_tgt/IOS_INSTALL_COMBINED.rst create mode 100644 Help/release/dev/ios-universal.rst create mode 100644 Help/variable/CMAKE_IOS_INSTALL_COMBINED.rst create mode 100644 Modules/CMakeIOSInstallCombined.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-check.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-stdout.txt create mode 100644 Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake copy Tests/RunCMake/XcodeProject/{main.m => main.cpp} (75%) hooks/post-receive -- CMake From rleigh at codelibre.net Thu Dec 10 18:11:15 2015 From: rleigh at codelibre.net (Roger Leigh) Date: Thu, 10 Dec 2015 18:11:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1698-gd3ccdd3 Message-ID: <20151210231116.5F830DF43C@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via d3ccdd30915356d716d3de0e56129e6da36bed0e (commit) via 99afe23513054db4add5143de4aa3a826e8c6c75 (commit) via 611735e76e14807e2145d6b67efbb080d419f19f (commit) from caa83f4e41630cd00e8e32f2330d2c1be045b95f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3ccdd30915356d716d3de0e56129e6da36bed0e commit d3ccdd30915356d716d3de0e56129e6da36bed0e Merge: caa83f4 99afe23 Author: Roger Leigh AuthorDate: Thu Dec 10 18:11:09 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 10 18:11:09 2015 -0500 Merge topic 'gtest-imported-targets' into next 99afe235 Tests: Add tests for FindGTest 611735e7 FindGTest: Add imported targets and update documentation https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=99afe23513054db4add5143de4aa3a826e8c6c75 commit 99afe23513054db4add5143de4aa3a826e8c6c75 Author: Roger Leigh AuthorDate: Thu Dec 10 23:08:23 2015 +0000 Commit: Roger Leigh CommitDate: Thu Dec 10 23:09:16 2015 +0000 Tests: Add tests for FindGTest diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 5d492cf..65bfb77 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1362,6 +1362,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(CMake_TEST_FindGSL) add_subdirectory(FindGSL) endif() + + if(CMake_TEST_FindGTest) + add_subdirectory(FindGTest) + endif() + if(CMake_TEST_FindJsonCpp) add_subdirectory(FindJsonCpp) endif() diff --git a/Tests/FindGTest/CMakeLists.txt b/Tests/FindGTest/CMakeLists.txt new file mode 100644 index 0000000..cbc92b1 --- /dev/null +++ b/Tests/FindGTest/CMakeLists.txt @@ -0,0 +1,10 @@ +add_test(NAME FindGTest.Test COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindGTest/Test" + "${CMake_BINARY_DIR}/Tests/FindGTest/Test" + ${build_generator_args} + --build-project TestFindGTest + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -V -C $ + ) diff --git a/Tests/FindGTest/Test/CMakeLists.txt b/Tests/FindGTest/Test/CMakeLists.txt new file mode 100644 index 0000000..99368ac --- /dev/null +++ b/Tests/FindGTest/Test/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.1) +project(TestFindGTest CXX) +include(CTest) + +# CMake does not actually provide FindGTest publicly. +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../Source/Modules) + +find_package(GTest REQUIRED) + +add_executable(test_gtest_tgt main.cxx) +target_link_libraries(test_gtest_tgt GTest::Main) +add_test(NAME test_gtest_tgt COMMAND test_gtest_tgt) + +add_executable(test_gtest_var main.cxx) +target_include_directories(test_gtest_var PRIVATE ${GTEST_INCLUDE_DIRS}) +target_link_libraries(test_gtest_var PRIVATE ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) +add_test(NAME test_gtest_var COMMAND test_gtest_var) diff --git a/Tests/FindGTest/Test/main.cxx b/Tests/FindGTest/Test/main.cxx new file mode 100644 index 0000000..0572a5d --- /dev/null +++ b/Tests/FindGTest/Test/main.cxx @@ -0,0 +1,6 @@ +#include + +TEST(FindCMake, LinksAndRuns) +{ + ASSERT_TRUE(true); +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=611735e76e14807e2145d6b67efbb080d419f19f commit 611735e76e14807e2145d6b67efbb080d419f19f Author: Roger Leigh AuthorDate: Thu Dec 10 15:52:07 2015 +0000 Commit: Roger Leigh CommitDate: Thu Dec 10 23:09:08 2015 +0000 FindGTest: Add imported targets and update documentation diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake index eb7abfd..ca49e4a 100644 --- a/Modules/FindGTest.cmake +++ b/Modules/FindGTest.cmake @@ -4,88 +4,89 @@ # # Locate the Google C++ Testing Framework. # -# Defines the following variables: +# Imported targets +# ^^^^^^^^^^^^^^^^ # -# :: -# -# GTEST_FOUND - Found the Google Testing framework -# GTEST_INCLUDE_DIRS - Include directories +# This module defines the following :prop_tgt:`IMPORTED` targets: # +# ``GTest::GTest`` +# The Google Test ``gtest`` library, if found; adds Thread::Thread +# automatically +# ``GTest::Main`` +# The Google Test ``gtest_main`` library, if found # # -# Also defines the library variables below as normal variables. These -# contain debug/optimized keywords when a debugging library is found. -# -# :: +# Result variables +# ^^^^^^^^^^^^^^^^ # -# GTEST_BOTH_LIBRARIES - Both libgtest & libgtest-main -# GTEST_LIBRARIES - libgtest -# GTEST_MAIN_LIBRARIES - libgtest-main +# This module will set the following variables in your project: # +# ``GTEST_FOUND`` +# Found the Google Testing framework +# ``GTEST_INCLUDE_DIRS`` +# the directory containing the Google Test headers # +# The library variables below are set as normal variables. These +# contain debug/optimized keywords when a debugging library is found. # -# Accepts the following variables as input: -# -# :: -# -# GTEST_ROOT - (as a CMake or environment variable) -# The root directory of the gtest install prefix -# -# +# ``GTEST_LIBRARIES`` +# The Google Test ``gtest`` library; note it also requires linking +# with an appropriate thread library +# ``GTEST_MAIN_LIBRARIES`` +# The Google Test ``gtest_main`` library +# ``GTEST_BOTH_LIBRARIES`` +# Both ``gtest`` and ``gtest_main`` # -# :: +# Cache variables +# ^^^^^^^^^^^^^^^ # -# GTEST_MSVC_SEARCH - If compiling with MSVC, this variable can be set to -# "MD" or "MT" to enable searching a GTest build tree -# (defaults: "MD") +# The following cache variables may also be set: # +# ``GTEST_ROOT`` +# The root directory of the Google Test installation (may also be +# set as an environment variable) +# ``GTEST_MSVC_SEARCH`` +# If compiling with MSVC, this variable can be set to ``MD`` or +# ``MT`` (the default) to enable searching a GTest build tree # # -# Example Usage: +# Example usage +# ^^^^^^^^^^^^^ # # :: # # enable_testing() # find_package(GTest REQUIRED) -# include_directories(${GTEST_INCLUDE_DIRS}) -# -# -# -# :: # # add_executable(foo foo.cc) -# target_link_libraries(foo ${GTEST_BOTH_LIBRARIES}) -# -# -# -# :: +# target_link_libraries(foo GTest::GTest GTest::Main) # # add_test(AllTestsInFoo foo) # # -# -# +# Deeper integration with CTest +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # # If you would like each Google test to show up in CTest as a test you -# may use the following macro. NOTE: It will slow down your tests by -# running an executable for each test and test fixture. You will also -# have to rerun CMake after adding or removing tests or test fixtures. -# -# GTEST_ADD_TESTS(executable extra_args ARGN) -# -# :: +# may use the following macro:: # -# executable = The path to the test executable -# extra_args = Pass a list of extra arguments to be passed to -# executable enclosed in quotes (or "" for none) -# ARGN = A list of source files to search for tests & test -# fixtures. Or AUTO to find them from executable target. +# GTEST_ADD_TESTS(executable extra_args files...) # +# ``executable`` +# the path to the test executable +# ``extra_args`` +# a list of extra arguments to be passed to executable enclosed in +# quotes (or ``""`` for none) +# ``files...`` +# a list of source files to search for tests and test fixtures. Or +# ``AUTO`` to find them from executable target # +# However, note that this macro will slow down your tests by running +# an executable for each test and test fixture. You will also have to +# re-run CMake after adding or removing tests or test fixtures. # -# :: +# Example usage:: # -# Example: # set(FooTestArgs --foo 1 --bar 2) # add_executable(FooTest FooUnitTest.cc) # GTEST_ADD_TESTS(FooTest "${FooTestArgs}" AUTO) @@ -208,5 +209,60 @@ if(GTEST_FOUND) _gtest_append_debugs(GTEST_LIBRARIES GTEST_LIBRARY) _gtest_append_debugs(GTEST_MAIN_LIBRARIES GTEST_MAIN_LIBRARY) set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES}) -endif() + include(CMakeFindDependencyMacro) + find_dependency(Threads) + + if(NOT TARGET GTest::GTest) + add_library(GTest::GTest UNKNOWN IMPORTED) + set_target_properties(GTest::GTest PROPERTIES + INTERFACE_LINK_LIBRARIES "Threads::Threads") + if(GTEST_INCLUDE_DIRS) + set_target_properties(GTest::GTest PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIRS}") + endif() + if(EXISTS "${GTEST_LIBRARY}") + set_target_properties(GTest::GTest PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" + IMPORTED_LOCATION "${GTEST_LIBRARY}") + endif() + if(EXISTS "${GTEST_LIBRARY_DEBUG}") + set_property(TARGET GTest::GTest APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(GTest::GTest PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" + IMPORTED_LOCATION_DEBUG "${GTEST_LIBRARY_DEBUG}") + endif() + if(EXISTS "${GTEST_LIBRARY_RELEASE}") + set_property(TARGET GTest::GTest APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(GTest::GTest PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" + IMPORTED_LOCATION_RELEASE "${GTEST_LIBRARY_RELEASE}") + endif() + endif() + if(NOT TARGET GTest::Main) + add_library(GTest::Main UNKNOWN IMPORTED) + set_target_properties(GTest::Main PROPERTIES + INTERFACE_LINK_LIBRARIES "GTest::GTest") + if(EXISTS "${GTEST_MAIN_LIBRARY}") + set_target_properties(GTest::Main PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" + IMPORTED_LOCATION "${GTEST_MAIN_LIBRARY}") + endif() + if(EXISTS "${GTEST_MAIN_LIBRARY_DEBUG}") + set_property(TARGET GTest::Main APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(GTest::Main PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" + IMPORTED_LOCATION_DEBUG "${GTEST_MAIN_LIBRARY_DEBUG}") + endif() + if(EXISTS "${GTEST_MAIN_LIBRARY_RELEASE}") + set_property(TARGET GTest::Main APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(GTest::Main PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" + IMPORTED_LOCATION_RELEASE "${GTEST_MAIN_LIBRARY_RELEASE}") + endif() + endif() +endif() ----------------------------------------------------------------------- Summary of changes: Modules/FindGTest.cmake | 160 +++++++++++++++++-------- Tests/CMakeLists.txt | 5 + Tests/{FindBoost => FindGTest}/CMakeLists.txt | 8 +- Tests/FindGTest/Test/CMakeLists.txt | 17 +++ Tests/FindGTest/Test/main.cxx | 6 + 5 files changed, 140 insertions(+), 56 deletions(-) copy Tests/{FindBoost => FindGTest}/CMakeLists.txt (54%) create mode 100644 Tests/FindGTest/Test/CMakeLists.txt create mode 100644 Tests/FindGTest/Test/main.cxx hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 11 00:01:25 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 11 Dec 2015 00:01:25 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-669-g693abba Message-ID: <20151211050125.CD44CE0252@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 693abba25176d073ab3073e7920f4aa8929cc6e0 (commit) from fc6c5074e800fb7fe3f829564d7a7e284133cdd9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=693abba25176d073ab3073e7920f4aa8929cc6e0 commit 693abba25176d073ab3073e7920f4aa8929cc6e0 Author: Kitware Robot AuthorDate: Fri Dec 11 00:01:17 2015 -0500 Commit: Kitware Robot CommitDate: Fri Dec 11 00:01:17 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index fab29ab..6c6ba32 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 4) -set(CMake_VERSION_PATCH 20151210) +set(CMake_VERSION_PATCH 20151211) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:25:35 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:25:35 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1701-g2e739f3 Message-ID: <20151211142535.78083E004D@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 2e739f3454bac56de4d37fc03d3d955344609545 (commit) via a47ed2f3b2fd2c997fada7ad4ac245caaa8cbaf7 (commit) via 24495e7ca1ed5abcf34db1ce000fb2b1163f21fc (commit) from d3ccdd30915356d716d3de0e56129e6da36bed0e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e739f3454bac56de4d37fc03d3d955344609545 commit 2e739f3454bac56de4d37fc03d3d955344609545 Merge: d3ccdd3 a47ed2f Author: Brad King AuthorDate: Fri Dec 11 09:25:34 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 11 09:25:34 2015 -0500 Merge topic 'fix-CMP0065-NEW-AIX-HP' into next a47ed2f3 fixup! AIX: Fix RPATH handling when CMP0065 is set to NEW 24495e7c AIX: Fix RPATH handling when CMP0065 is set to NEW https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a47ed2f3b2fd2c997fada7ad4ac245caaa8cbaf7 commit a47ed2f3b2fd2c997fada7ad4ac245caaa8cbaf7 Author: Brad King AuthorDate: Fri Dec 11 09:21:26 2015 -0500 Commit: Brad King CommitDate: Fri Dec 11 09:21:26 2015 -0500 fixup! AIX: Fix RPATH handling when CMP0065 is set to NEW diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake index 9cac7ad..d6f5331 100644 --- a/Modules/Platform/AIX-GNU.cmake +++ b/Modules/Platform/AIX-GNU.cmake @@ -30,7 +30,7 @@ macro(__aix_compiler_gnu lang) set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-G,-bnoipath") - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall") # +s, flag for exe link to use shared lib + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall") set(CMAKE_${lang}_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH 1) set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath") diff --git a/Modules/Platform/AIX-XL.cmake b/Modules/Platform/AIX-XL.cmake index 4bd3ed1..5470441 100644 --- a/Modules/Platform/AIX-XL.cmake +++ b/Modules/Platform/AIX-XL.cmake @@ -30,7 +30,7 @@ macro(__aix_compiler_xl lang) set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-bnoipath") # -shared - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall") # +s, flag for exe link to use shared lib + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall") set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS " ") set(CMAKE_SHARED_MODULE_${lang}_FLAGS " ") diff --git a/Modules/Platform/HP-UX-GNU.cmake b/Modules/Platform/HP-UX-GNU.cmake index eb909fe..6c71784 100644 --- a/Modules/Platform/HP-UX-GNU.cmake +++ b/Modules/Platform/HP-UX-GNU.cmake @@ -20,8 +20,10 @@ set(__HPUX_COMPILER_GNU 1) macro(__hpux_compiler_gnu lang) set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-E,-b,+nodefaultrpath") - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,+s,-E,+nodefaultrpath") + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-E") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,+b") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h") + + set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath") endmacro() diff --git a/Modules/Platform/HP-UX-HP.cmake b/Modules/Platform/HP-UX-HP.cmake index 871ea13..3935c31 100644 --- a/Modules/Platform/HP-UX-HP.cmake +++ b/Modules/Platform/HP-UX-HP.cmake @@ -22,10 +22,12 @@ macro(__hpux_compiler_hp lang) set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "+Z") set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "+Z") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-Wl,-E,+nodefaultrpath -b -L/usr/lib") - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,+s,-E,+nodefaultrpath") + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-E") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,+b") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h") set(CMAKE_${lang}_FLAGS_INIT "") + + set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath") endmacro() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24495e7ca1ed5abcf34db1ce000fb2b1163f21fc commit 24495e7ca1ed5abcf34db1ce000fb2b1163f21fc Author: Marc Chevrier AuthorDate: Fri Dec 11 11:08:24 2015 +0100 Commit: Brad King CommitDate: Fri Dec 11 09:07:31 2015 -0500 AIX: Fix RPATH handling when CMP0065 is set to NEW The CMAKE_SHARED_LIBRARY_LINK__FLAGS setting has always been meant for flags needed to export symbols from executables for use by shared library plugins. Since commit v3.4.0-rc1~58^2~1 (CMP0065: Restrict the use of CMAKE_SHARED_LIBRARY_LINK__FLAGS, 2015-08-24) this is made explicit by using the flags only for executables with ENABLE_EXPORTS, guarded by CMP0065 for compatibility. On AIX we were accidentally using this setting to pass -bnoipath and -brtl to the linker, so the flags are incorrectly dropped when CMP0065 is set to NEW. Fix this by moving the flags to more appropriate places. diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake index e5d9434..9cac7ad 100644 --- a/Modules/Platform/AIX-GNU.cmake +++ b/Modules/Platform/AIX-GNU.cmake @@ -18,10 +18,20 @@ if(__AIX_COMPILER_GNU) endif() set(__AIX_COMPILER_GNU 1) +# +# By default, runtime linking is enabled. All shared objects specified on the command line +# will be listed, even if there are no symbols referenced, in the output file. +set (CMAKE_SHARED_LINKER_FLAGS_INIT "-Wl,-brtl") +set (CMAKE_MODULE_LINKER_FLAGS_INIT "-Wl,-brtl") +set (CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,-brtl") + + macro(__aix_compiler_gnu lang) set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-G,-bnoipath") - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall") # +s, flag for exe link to use shared lib set(CMAKE_${lang}_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH 1) + + set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath") endmacro() diff --git a/Modules/Platform/AIX-XL.cmake b/Modules/Platform/AIX-XL.cmake index abf3855..4bd3ed1 100644 --- a/Modules/Platform/AIX-XL.cmake +++ b/Modules/Platform/AIX-XL.cmake @@ -18,11 +18,21 @@ if(__AIX_COMPILER_XL) endif() set(__AIX_COMPILER_XL 1) +# +# By default, runtime linking is enabled. All shared objects specified on the command line +# will be listed, even if there are no symbols referenced, in the output file. +set(CMAKE_SHARED_LINKER_FLAGS_INIT "-Wl,-brtl") +set(CMAKE_MODULE_LINKER_FLAGS_INIT "-Wl,-brtl") +set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,-brtl") + + macro(__aix_compiler_xl lang) set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-bnoipath") # -shared - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall") # +s, flag for exe link to use shared lib set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS " ") set(CMAKE_SHARED_MODULE_${lang}_FLAGS " ") + + set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath") endmacro() ----------------------------------------------------------------------- Summary of changes: Modules/Platform/AIX-GNU.cmake | 12 +++++++++++- Modules/Platform/AIX-XL.cmake | 12 +++++++++++- Modules/Platform/HP-UX-GNU.cmake | 4 +++- Modules/Platform/HP-UX-HP.cmake | 4 +++- 4 files changed, 28 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:25:48 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:25:48 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1703-gff1e328 Message-ID: <20151211142548.DC77AE0378@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via ff1e32843bee2f17f6b7d40a83620924e1ca17bf (commit) via f254276fc1a17de7cd5cfc016fd2137937830fca (commit) from 2e739f3454bac56de4d37fc03d3d955344609545 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff1e32843bee2f17f6b7d40a83620924e1ca17bf commit ff1e32843bee2f17f6b7d40a83620924e1ca17bf Merge: 2e739f3 f254276 Author: Brad King AuthorDate: Fri Dec 11 09:25:47 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 11 09:25:47 2015 -0500 Merge topic 'fix-CMP0065-NEW-AIX-HP' into next f254276f AIX,HP-UX: Fix RPATH handling when CMP0065 is set to NEW https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f254276fc1a17de7cd5cfc016fd2137937830fca commit f254276fc1a17de7cd5cfc016fd2137937830fca Author: Marc Chevrier AuthorDate: Fri Dec 11 11:08:24 2015 +0100 Commit: Brad King CommitDate: Fri Dec 11 09:21:47 2015 -0500 AIX,HP-UX: Fix RPATH handling when CMP0065 is set to NEW The CMAKE_SHARED_LIBRARY_LINK__FLAGS setting has always been meant for flags needed to export symbols from executables for use by shared library plugins. Since commit v3.4.0-rc1~58^2~1 (CMP0065: Restrict the use of CMAKE_SHARED_LIBRARY_LINK__FLAGS, 2015-08-24) this is made explicit by using the flags only for executables with ENABLE_EXPORTS, guarded by CMP0065 for compatibility. On some platforms we were accidentally using this setting to pass other flags to the linker: * AIX: -bnoipath, -brtl * HP-UX: +s, +nodefaultrpath These flags are incorrectly dropped when CMP0065 is set to NEW. Fix this by moving the flags to more appropriate places for linking executables. diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake index e5d9434..d6f5331 100644 --- a/Modules/Platform/AIX-GNU.cmake +++ b/Modules/Platform/AIX-GNU.cmake @@ -18,10 +18,20 @@ if(__AIX_COMPILER_GNU) endif() set(__AIX_COMPILER_GNU 1) +# +# By default, runtime linking is enabled. All shared objects specified on the command line +# will be listed, even if there are no symbols referenced, in the output file. +set (CMAKE_SHARED_LINKER_FLAGS_INIT "-Wl,-brtl") +set (CMAKE_MODULE_LINKER_FLAGS_INIT "-Wl,-brtl") +set (CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,-brtl") + + macro(__aix_compiler_gnu lang) set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-G,-bnoipath") - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall") set(CMAKE_${lang}_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH 1) + + set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath") endmacro() diff --git a/Modules/Platform/AIX-XL.cmake b/Modules/Platform/AIX-XL.cmake index abf3855..5470441 100644 --- a/Modules/Platform/AIX-XL.cmake +++ b/Modules/Platform/AIX-XL.cmake @@ -18,11 +18,21 @@ if(__AIX_COMPILER_XL) endif() set(__AIX_COMPILER_XL 1) +# +# By default, runtime linking is enabled. All shared objects specified on the command line +# will be listed, even if there are no symbols referenced, in the output file. +set(CMAKE_SHARED_LINKER_FLAGS_INIT "-Wl,-brtl") +set(CMAKE_MODULE_LINKER_FLAGS_INIT "-Wl,-brtl") +set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,-brtl") + + macro(__aix_compiler_xl lang) set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-bnoipath") # -shared - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall") set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS " ") set(CMAKE_SHARED_MODULE_${lang}_FLAGS " ") + + set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath") endmacro() diff --git a/Modules/Platform/HP-UX-GNU.cmake b/Modules/Platform/HP-UX-GNU.cmake index eb909fe..6c71784 100644 --- a/Modules/Platform/HP-UX-GNU.cmake +++ b/Modules/Platform/HP-UX-GNU.cmake @@ -20,8 +20,10 @@ set(__HPUX_COMPILER_GNU 1) macro(__hpux_compiler_gnu lang) set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-E,-b,+nodefaultrpath") - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,+s,-E,+nodefaultrpath") + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-E") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,+b") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h") + + set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath") endmacro() diff --git a/Modules/Platform/HP-UX-HP.cmake b/Modules/Platform/HP-UX-HP.cmake index 871ea13..3935c31 100644 --- a/Modules/Platform/HP-UX-HP.cmake +++ b/Modules/Platform/HP-UX-HP.cmake @@ -22,10 +22,12 @@ macro(__hpux_compiler_hp lang) set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "+Z") set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "+Z") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-Wl,-E,+nodefaultrpath -b -L/usr/lib") - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,+s,-E,+nodefaultrpath") + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-E") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,+b") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h") set(CMAKE_${lang}_FLAGS_INIT "") + + set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath") endmacro() ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:43:36 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:43:36 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-672-g511e5db Message-ID: <20151211144336.598A4DFC85@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 511e5dbd710af570d45488a48a1256724784b761 (commit) via 7984ac5e58722295e71f6c2418e2a54d6f1a0cc1 (commit) via 4ce6fbc76b0ebaeef258695c2b876061b5b61073 (commit) from 693abba25176d073ab3073e7920f4aa8929cc6e0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=511e5dbd710af570d45488a48a1256724784b761 commit 511e5dbd710af570d45488a48a1256724784b761 Merge: 693abba 7984ac5 Author: Brad King AuthorDate: Fri Dec 11 09:43:34 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 11 09:43:34 2015 -0500 Merge topic 'cmake-E-multiple-inputs' 7984ac5e cmake: Teach -E make_directory to support multiple input directories 4ce6fbc7 Help: Rename release notes for topic 'cmake-E-multiple-inputs' ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake.1.rst | 10 ++++++---- ...tiple-inputs.rst => cmake-E-multiple-inputs.rst} | 7 +++++-- Source/cmcmd.cxx | 19 ++++++++++++------- ...make_directory-directory-with-parent-result.txt} | 0 ..._make_directory-directory-with-parent-stderr.txt | 0 ...directory-three-directories-and-file-result.txt} | 0 ..._directory-three-directories-and-file-stderr.txt | 1 + .../E_make_directory-three-directories-result.txt} | 0 .../E_make_directory-three-directories-stderr.txt | 0 Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 14 ++++++++++++++ 10 files changed, 38 insertions(+), 13 deletions(-) rename Help/release/dev/{cmake-E-copy-multiple-inputs.rst => cmake-E-multiple-inputs.rst} (60%) copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_make_directory-directory-with-parent-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_make_directory-directory-with-parent-stderr.txt (100%) copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CommandLine/E_make_directory-three-directories-and-file-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/E_make_directory-three-directories-and-file-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CommandLine/E_make_directory-three-directories-result.txt} (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/E_make_directory-three-directories-stderr.txt (100%) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:43:38 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:43:38 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-674-g67afa4e Message-ID: <20151211144338.E79CBDFCA7@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 67afa4e407d133754cc2614b137311c35ef3dfca (commit) via 39abbaed7756ac9b4d1d2e7f44575ae85388aaf6 (commit) from 511e5dbd710af570d45488a48a1256724784b761 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67afa4e407d133754cc2614b137311c35ef3dfca commit 67afa4e407d133754cc2614b137311c35ef3dfca Merge: 511e5db 39abbae Author: Brad King AuthorDate: Fri Dec 11 09:43:37 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 11 09:43:37 2015 -0500 Merge topic 'FindOpenAL-win-arch' 39abbaed FindOpenAL: Detect Windows architecture-specific installation ----------------------------------------------------------------------- Summary of changes: Modules/FindOpenAL.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:43:41 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:43:41 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-676-ge240a48 Message-ID: <20151211144341.8AB25DFCC3@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via e240a489c15a8cd09dc36f1ec8dcb8241aac7ed1 (commit) via e0ad72d8af9bfba80d24f823d79440ebb9136bda (commit) from 67afa4e407d133754cc2614b137311c35ef3dfca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e240a489c15a8cd09dc36f1ec8dcb8241aac7ed1 commit e240a489c15a8cd09dc36f1ec8dcb8241aac7ed1 Merge: 67afa4e e0ad72d Author: Brad King AuthorDate: Fri Dec 11 09:43:39 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 11 09:43:39 2015 -0500 Merge topic 'graphviz-spaces' e0ad72d8 Graphviz: Fix handling of spaces in GRAPHVIZ_GRAPH_NAME ----------------------------------------------------------------------- Summary of changes: Source/cmGraphVizWriter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:43:44 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:43:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-679-g05d8aed Message-ID: <20151211144344.81F49DFCA2@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 05d8aed844e0e0c555ee879fd3fa893da364e12f (commit) via 291275347be3f9c02aff6fb4dfa45a3e5b2f5b4a (commit) via 67211011d946684bed73bcd5b976ec90f4c30856 (commit) from e240a489c15a8cd09dc36f1ec8dcb8241aac7ed1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05d8aed844e0e0c555ee879fd3fa893da364e12f commit 05d8aed844e0e0c555ee879fd3fa893da364e12f Merge: e240a48 2912753 Author: Brad King AuthorDate: Fri Dec 11 09:43:42 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 11 09:43:42 2015 -0500 Merge topic 'cmake-W-options' 29127534 cmake: Deduplicate warning message control code 67211011 cmake-gui: Add options to control warning messages ----------------------------------------------------------------------- Summary of changes: Help/release/dev/cmake-W-options.rst | 3 + Source/QtDialog/CMakeLists.txt | 4 + Source/QtDialog/CMakeSetupDialog.cxx | 15 ++-- Source/QtDialog/CMakeSetupDialog.h | 3 +- Source/QtDialog/QCMake.cxx | 18 ++++- Source/QtDialog/QCMake.h | 7 +- Source/QtDialog/WarningMessagesDialog.cxx | 43 +++++++++++ Source/QtDialog/WarningMessagesDialog.h | 53 +++++++++++++ Source/QtDialog/WarningMessagesDialog.ui | 120 +++++++++++++++++++++++++++++ Source/cmake.cxx | 87 +++++++++++---------- Source/cmake.h | 9 ++- 11 files changed, 311 insertions(+), 51 deletions(-) create mode 100644 Source/QtDialog/WarningMessagesDialog.cxx create mode 100644 Source/QtDialog/WarningMessagesDialog.h create mode 100644 Source/QtDialog/WarningMessagesDialog.ui hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:43:47 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:43:47 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-682-g63f2737 Message-ID: <20151211144347.2158EDFCC5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 63f2737993b5d0b0821bf7400c39266692713f16 (commit) via c025e61ad47513d63c4b09a2267d254229c13c2e (commit) via 2b7a47d76ac5289acc1572917b8ac8266ffec0ca (commit) from 05d8aed844e0e0c555ee879fd3fa893da364e12f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63f2737993b5d0b0821bf7400c39266692713f16 commit 63f2737993b5d0b0821bf7400c39266692713f16 Merge: 05d8aed c025e61 Author: Brad King AuthorDate: Fri Dec 11 09:43:45 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 11 09:43:45 2015 -0500 Merge topic 'update-kwsys' c025e61a Merge branch 'upstream-kwsys' into update-kwsys 2b7a47d7 KWSys 2015-12-09 (cdcf4c47) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/CMakeLists.txt | 10 +-- Source/kwsys/CPU.h.in | 141 -------------------------------- Source/kwsys/FundamentalType.h.in | 7 -- Source/kwsys/kwsysPlatformTestsCXX.cxx | 15 ---- 4 files changed, 1 insertion(+), 172 deletions(-) delete mode 100644 Source/kwsys/CPU.h.in hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:43:50 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:43:50 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-684-gc634b5d Message-ID: <20151211144350.4073FDFCD1@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c634b5d4c5f5856be7b7ae163f34019b93175c51 (commit) via ecdc77f14d7a37f9d173ea2ca4946bf51c6a43d0 (commit) from 63f2737993b5d0b0821bf7400c39266692713f16 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c634b5d4c5f5856be7b7ae163f34019b93175c51 commit c634b5d4c5f5856be7b7ae163f34019b93175c51 Merge: 63f2737 ecdc77f Author: Brad King AuthorDate: Fri Dec 11 09:43:48 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 11 09:43:48 2015 -0500 Merge topic 'wix-fix-comp-install-prop' ecdc77f1 CPackWIX: Fix installed file property lookups when using components ----------------------------------------------------------------------- Summary of changes: Source/CPack/WiX/cmCPackWIXGenerator.cxx | 23 +++++++++++++++++++---- Source/CPack/WiX/cmCPackWIXGenerator.h | 3 +++ 2 files changed, 22 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:43:53 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:43:53 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-686-g198e7df Message-ID: <20151211144353.12B21DFCD1@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 198e7df97e7efafca8a96f448c2712125aa71266 (commit) via 1549927d7dc29476ada7b0c0867e9630ebe6ea00 (commit) from c634b5d4c5f5856be7b7ae163f34019b93175c51 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=198e7df97e7efafca8a96f448c2712125aa71266 commit 198e7df97e7efafca8a96f448c2712125aa71266 Merge: c634b5d 1549927 Author: Brad King AuthorDate: Fri Dec 11 09:43:51 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 11 09:43:51 2015 -0500 Merge topic 'FindOpenMP-clang' 1549927d FindOpenMP: Add Clang support ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindOpenMP-clang.rst | 4 ++++ Modules/FindOpenMP.cmake | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 Help/release/dev/FindOpenMP-clang.rst hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:43:55 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:43:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-690-g57d5628 Message-ID: <20151211144357.4AB73DFCAA@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 57d5628fd9155a9f7f203ee6d612c6feeb3cc704 (commit) via 4c60e07d857277f1edc45358b35c6f50439324b4 (commit) via a42bf6c5ddc70e0b15bbf60f11678aae71ff1f56 (commit) via 93936d78d221ea49f918f95e33b97796b2a3190f (commit) from 198e7df97e7efafca8a96f448c2712125aa71266 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=57d5628fd9155a9f7f203ee6d612c6feeb3cc704 commit 57d5628fd9155a9f7f203ee6d612c6feeb3cc704 Merge: 198e7df 4c60e07 Author: Brad King AuthorDate: Fri Dec 11 09:43:54 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 11 09:43:54 2015 -0500 Merge topic 'release-wix-config' 4c60e07d CMake: Fix WiX-generated .msi package file name convention a42bf6c5 Utilities/Release: Add support for copying .msi files 93936d78 Utilities/Release: Avoid repeat copy of files with same suffix ----------------------------------------------------------------------- Summary of changes: CMakeCPackOptions.cmake.in | 4 ++-- Utilities/Release/release_cmake.cmake | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:43:59 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:43:59 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-692-g5393087 Message-ID: <20151211144359.C9092DFCDD@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 53930877b3e8ae356a6b1dfbb1c63c92e7383465 (commit) via 972849fbb7531b2d43e4ecc5bd0cf2b0b75922da (commit) from 57d5628fd9155a9f7f203ee6d612c6feeb3cc704 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53930877b3e8ae356a6b1dfbb1c63c92e7383465 commit 53930877b3e8ae356a6b1dfbb1c63c92e7383465 Merge: 57d5628 972849f Author: Brad King AuthorDate: Fri Dec 11 09:43:58 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 11 09:43:58 2015 -0500 Merge topic 'simplify-CTest.UpdateGIT-test' 972849fb Tests: Simplify CTest.UpdateGIT repo path construction ----------------------------------------------------------------------- Summary of changes: Tests/CTestUpdateGIT.cmake.in | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:44:55 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:44:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1714-ga2aebd1 Message-ID: <20151211144455.22046DFD9B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via a2aebd15058cbee5fea2b692808059bc51dfe35c (commit) via 53930877b3e8ae356a6b1dfbb1c63c92e7383465 (commit) via 57d5628fd9155a9f7f203ee6d612c6feeb3cc704 (commit) via 198e7df97e7efafca8a96f448c2712125aa71266 (commit) via c634b5d4c5f5856be7b7ae163f34019b93175c51 (commit) via 63f2737993b5d0b0821bf7400c39266692713f16 (commit) via 05d8aed844e0e0c555ee879fd3fa893da364e12f (commit) via e240a489c15a8cd09dc36f1ec8dcb8241aac7ed1 (commit) via 67afa4e407d133754cc2614b137311c35ef3dfca (commit) via 511e5dbd710af570d45488a48a1256724784b761 (commit) via 693abba25176d073ab3073e7920f4aa8929cc6e0 (commit) from ff1e32843bee2f17f6b7d40a83620924e1ca17bf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2aebd15058cbee5fea2b692808059bc51dfe35c commit a2aebd15058cbee5fea2b692808059bc51dfe35c Merge: ff1e328 5393087 Author: Brad King AuthorDate: Fri Dec 11 09:44:45 2015 -0500 Commit: Brad King CommitDate: Fri Dec 11 09:44:45 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:47:20 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:47:20 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-695-ga680211 Message-ID: <20151211144721.1FB26DFE10@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via a680211ca782751159d70464e51eac812d8db8f1 (commit) via 565d080a9a1e133bda868e905226181b60e90356 (commit) via 34f5ef564aa94f2f66f35c708dbfca260b419e4b (commit) from 53930877b3e8ae356a6b1dfbb1c63c92e7383465 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a680211ca782751159d70464e51eac812d8db8f1 commit a680211ca782751159d70464e51eac812d8db8f1 Merge: 5393087 565d080 Author: Brad King AuthorDate: Fri Dec 11 09:47:18 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 11 09:47:18 2015 -0500 Merge topic 'ios-universal' 565d080a Xcode: Add support for combined install on iOS 34f5ef56 iOS: Fix App Bundle layout ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + Help/manual/cmake-variables.7.rst | 1 + Help/prop_tgt/IOS_INSTALL_COMBINED.rst | 11 + Help/release/dev/ios-universal.rst | 7 + Help/variable/CMAKE_IOS_INSTALL_COMBINED.rst | 8 + Modules/CMakeIOSInstallCombined.cmake | 297 ++++++++++++++++++++ Source/cmInstallTargetGenerator.cxx | 52 +++- Source/cmInstallTargetGenerator.h | 2 + Source/cmTarget.cxx | 1 + Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 36 +++ .../XcodeIOSInstallCombined-install-check.cmake | 30 ++ .../XcodeProject/XcodeIOSInstallCombined.cmake | 27 ++ ...codeIOSInstallCombinedPrune-install-check.cmake | 26 ++ ...XcodeIOSInstallCombinedPrune-install-stdout.txt | 2 + .../XcodeIOSInstallCombinedPrune.cmake | 36 +++ Tests/RunCMake/XcodeProject/{main.m => main.cpp} | 2 +- 16 files changed, 537 insertions(+), 2 deletions(-) create mode 100644 Help/prop_tgt/IOS_INSTALL_COMBINED.rst create mode 100644 Help/release/dev/ios-universal.rst create mode 100644 Help/variable/CMAKE_IOS_INSTALL_COMBINED.rst create mode 100644 Modules/CMakeIOSInstallCombined.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-check.cmake create mode 100644 Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-stdout.txt create mode 100644 Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake copy Tests/RunCMake/XcodeProject/{main.m => main.cpp} (75%) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 09:47:35 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 09:47:35 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1716-gf970a8a Message-ID: <20151211144735.B533CDFF7A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via f970a8a319f6ab69a734452e3d6d3c7264bec722 (commit) via a680211ca782751159d70464e51eac812d8db8f1 (commit) from a2aebd15058cbee5fea2b692808059bc51dfe35c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f970a8a319f6ab69a734452e3d6d3c7264bec722 commit f970a8a319f6ab69a734452e3d6d3c7264bec722 Merge: a2aebd1 a680211 Author: Brad King AuthorDate: Fri Dec 11 09:47:28 2015 -0500 Commit: Brad King CommitDate: Fri Dec 11 09:47:28 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 11 10:04:51 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 11 Dec 2015 10:04:51 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1718-ga41efac Message-ID: <20151211150451.3DBA9E0503@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via a41efac3d6559d8efdc013321483ba32da5e5be3 (commit) via 2908103d04daeaf396173b6f868f2cad5eb47b08 (commit) from f970a8a319f6ab69a734452e3d6d3c7264bec722 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a41efac3d6559d8efdc013321483ba32da5e5be3 commit a41efac3d6559d8efdc013321483ba32da5e5be3 Merge: f970a8a 2908103 Author: Brad King AuthorDate: Fri Dec 11 10:04:50 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 11 10:04:50 2015 -0500 Merge topic 'FindProtobuf-fix-case' into next 2908103d FindProtobuf: Set Protobuf_FOUND in addition to PROTOBUF_FOUND https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2908103d04daeaf396173b6f868f2cad5eb47b08 commit 2908103d04daeaf396173b6f868f2cad5eb47b08 Author: Sebastian Schuberth AuthorDate: Fri Dec 11 10:11:16 2015 +0100 Commit: Brad King CommitDate: Fri Dec 11 10:03:22 2015 -0500 FindProtobuf: Set Protobuf_FOUND in addition to PROTOBUF_FOUND All other modules use their module name (e.g. XxX for FindXxX.cmake) in find_package_handle_standard_args. Protobuf used all-caps, which triggers a bug when we try to find Protobuf with the CMakeFindDependencyMacro.cmake macro, which only checks for the mixed-case _FOUND. diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index 4a68cd1..2f13b09 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -305,7 +305,7 @@ mark_as_advanced(PROTOBUF_PROTOC_EXECUTABLE) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROTOBUF DEFAULT_MSG +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Protobuf DEFAULT_MSG PROTOBUF_LIBRARY PROTOBUF_INCLUDE_DIR) if(PROTOBUF_FOUND) ----------------------------------------------------------------------- Summary of changes: Modules/FindProtobuf.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Dec 12 00:01:10 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 12 Dec 2015 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-696-g8ed8c29 Message-ID: <20151212050110.E66C3E0342@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 8ed8c2956486d841a4e62ffb8f1d82c6c8534b1c (commit) from a680211ca782751159d70464e51eac812d8db8f1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8ed8c2956486d841a4e62ffb8f1d82c6c8534b1c commit 8ed8c2956486d841a4e62ffb8f1d82c6c8534b1c Author: Kitware Robot AuthorDate: Sat Dec 12 00:01:07 2015 -0500 Commit: Kitware Robot CommitDate: Sat Dec 12 00:01:07 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 6c6ba32..76ddf74 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 4) -set(CMake_VERSION_PATCH 20151211) +set(CMake_VERSION_PATCH 20151212) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From nilsgladitz at gmail.com Sat Dec 12 04:38:39 2015 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Sat, 12 Dec 2015 04:38:39 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1722-ga93d6bf Message-ID: <20151212093839.83D22E049E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via a93d6bfc9f94463468acde105e9d9bfec830baf4 (commit) via cdd538824948101a207fe1522f3c4e50b39d69e1 (commit) via 38d723b37e660223a9c8a125cf01ae5a6c9977ba (commit) via 8ed8c2956486d841a4e62ffb8f1d82c6c8534b1c (commit) from a41efac3d6559d8efdc013321483ba32da5e5be3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a93d6bfc9f94463468acde105e9d9bfec830baf4 commit a93d6bfc9f94463468acde105e9d9bfec830baf4 Merge: a41efac cdd5388 Author: Nils Gladitz AuthorDate: Sat Dec 12 04:38:38 2015 -0500 Commit: CMake Topic Stage CommitDate: Sat Dec 12 04:38:38 2015 -0500 Merge topic 'release-wix-config-ng' into next cdd53882 CMake: Mimic NSIS options dialog in WiX installer 38d723b3 CPackWIX: Allow patching of shortcut components 8ed8c295 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cdd538824948101a207fe1522f3c4e50b39d69e1 commit cdd538824948101a207fe1522f3c4e50b39d69e1 Author: Nils Gladitz AuthorDate: Thu Dec 10 23:55:07 2015 +0100 Commit: Nils Gladitz CommitDate: Sat Dec 12 10:36:51 2015 +0100 CMake: Mimic NSIS options dialog in WiX installer diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 4ebf306..eb36015 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -234,10 +234,21 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-dcl:high") set(CPACK_WIX_UI_BANNER - "@CMake_SOURCE_DIR@/Utilities/Release/cpack_wix_ui_banner.jpg" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/ui_banner.jpg" ) set(CPACK_WIX_UI_DIALOG - "@CMake_SOURCE_DIR@/Utilities/Release/cpack_wix_ui_dialog.jpg" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/ui_dialog.jpg" + ) + + set(CPACK_WIX_EXTRA_SOURCES + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/install_dir.wxs" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/cmake_extra_dialog.wxs" + ) + + set(CPACK_WIX_UI_REF "CMakeUI_InstallDir") + + set(CPACK_WIX_PATCH_FILE + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch.xml" ) endif() diff --git a/Utilities/Release/WiX/cmake_extra_dialog.wxs b/Utilities/Release/WiX/cmake_extra_dialog.wxs new file mode 100644 index 0000000..6047c08 --- /dev/null +++ b/Utilities/Release/WiX/cmake_extra_dialog.wxs @@ -0,0 +1,35 @@ + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Utilities/Release/WiX/install_dir.wxs b/Utilities/Release/WiX/install_dir.wxs new file mode 100644 index 0000000..883efba --- /dev/null +++ b/Utilities/Release/WiX/install_dir.wxs @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + 1 + "1"]]> + + 1 + + NOT Installed + Installed AND PATCH + + 1 + LicenseAccepted = "1" + + 1 + 1 + NOT WIXUI_DONTVALIDATEPATH + "1"]]> + WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1" + 1 + 1 + + 1 + 1 + + NOT Installed + Installed AND NOT PATCH + Installed AND PATCH + + 1 + + 1 + 1 + 1 + + + + + + + diff --git a/Utilities/Release/WiX/patch.xml b/Utilities/Release/WiX/patch.xml new file mode 100644 index 0000000..666c7ac --- /dev/null +++ b/Utilities/Release/WiX/patch.xml @@ -0,0 +1,30 @@ + + + DESKTOP_SHORTCUT_REQUESTED = 1 + + + + + + ADD_CMAKE_TO_PATH = "System" + + + + + + + ADD_CMAKE_TO_PATH = "User" + + + + + + + + + + diff --git a/Utilities/Release/cpack_wix_ui_banner.jpg b/Utilities/Release/WiX/ui_banner.jpg similarity index 100% rename from Utilities/Release/cpack_wix_ui_banner.jpg rename to Utilities/Release/WiX/ui_banner.jpg diff --git a/Utilities/Release/cpack_wix_ui_dialog.jpg b/Utilities/Release/WiX/ui_dialog.jpg similarity index 100% rename from Utilities/Release/cpack_wix_ui_dialog.jpg rename to Utilities/Release/WiX/ui_dialog.jpg https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38d723b37e660223a9c8a125cf01ae5a6c9977ba commit 38d723b37e660223a9c8a125cf01ae5a6c9977ba Author: Nils Gladitz AuthorDate: Sat Dec 12 00:39:08 2015 +0100 Commit: Nils Gladitz CommitDate: Sat Dec 12 10:36:51 2015 +0100 CPackWIX: Allow patching of shortcut components diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index da8b486..b55c5a5 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -817,6 +817,8 @@ bool cmCPackWIXGenerator::CreateShortcutsOfSpecificType( fileDefinitions.AddAttribute("Id", componentId); fileDefinitions.AddAttribute("Guid", "*"); + this->Patch->ApplyFragment(componentId, fileDefinitions); + std::string registryKey = std::string("Software\\") + cpackVendor + "\\" + cpackPackageName; ----------------------------------------------------------------------- Summary of changes: CMakeCPackOptions.cmake.in | 15 ++++- Source/CMakeVersion.cmake | 2 +- Source/CPack/WiX/cmCPackWIXGenerator.cxx | 2 + Utilities/Release/WiX/cmake_extra_dialog.wxs | 35 +++++++++++ Utilities/Release/WiX/install_dir.wxs | 61 ++++++++++++++++++++ Utilities/Release/WiX/patch.xml | 30 ++++++++++ .../{cpack_wix_ui_banner.jpg => WiX/ui_banner.jpg} | Bin 2607 -> 2607 bytes .../{cpack_wix_ui_dialog.jpg => WiX/ui_dialog.jpg} | Bin 13369 -> 13369 bytes 8 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 Utilities/Release/WiX/cmake_extra_dialog.wxs create mode 100644 Utilities/Release/WiX/install_dir.wxs create mode 100644 Utilities/Release/WiX/patch.xml rename Utilities/Release/{cpack_wix_ui_banner.jpg => WiX/ui_banner.jpg} (100%) rename Utilities/Release/{cpack_wix_ui_dialog.jpg => WiX/ui_dialog.jpg} (100%) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Dec 13 00:01:10 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 13 Dec 2015 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-697-gac6025c Message-ID: <20151213050110.DF9AEE022C@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via ac6025c5ff9a24a6a03b225c0b02ce67d65013d3 (commit) from 8ed8c2956486d841a4e62ffb8f1d82c6c8534b1c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac6025c5ff9a24a6a03b225c0b02ce67d65013d3 commit ac6025c5ff9a24a6a03b225c0b02ce67d65013d3 Author: Kitware Robot AuthorDate: Sun Dec 13 00:01:06 2015 -0500 Commit: Kitware Robot CommitDate: Sun Dec 13 00:01:06 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 76ddf74..cd46853 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 4) -set(CMake_VERSION_PATCH 20151212) +set(CMake_VERSION_PATCH 20151213) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Dec 14 00:01:09 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 14 Dec 2015 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-698-gb970185 Message-ID: <20151214050109.E5F7AE0512@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via b97018534fbb4ce238561a1363f2698526bcda31 (commit) from ac6025c5ff9a24a6a03b225c0b02ce67d65013d3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b97018534fbb4ce238561a1363f2698526bcda31 commit b97018534fbb4ce238561a1363f2698526bcda31 Author: Kitware Robot AuthorDate: Mon Dec 14 00:01:05 2015 -0500 Commit: Kitware Robot CommitDate: Mon Dec 14 00:01:05 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index cd46853..4e596d9 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 4) -set(CMake_VERSION_PATCH 20151213) +set(CMake_VERSION_PATCH 20151214) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 14 09:48:07 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 14 Dec 2015 09:48:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1724-gf13c32c Message-ID: <20151214144807.7BAB9E0390@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via f13c32c336518c1ffbe319abebea4f3e5196943b (commit) via 08580be2ada7b226c3b8f91b6ecdbc57d843d42e (commit) from a93d6bfc9f94463468acde105e9d9bfec830baf4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f13c32c336518c1ffbe319abebea4f3e5196943b commit f13c32c336518c1ffbe319abebea4f3e5196943b Merge: a93d6bf 08580be Author: Brad King AuthorDate: Mon Dec 14 09:48:06 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 14 09:48:06 2015 -0500 Merge topic 'FindOpenGL-no-osx-AGL' into next 08580be2 FindOpenGL: Don't add AGL to OPENGL_LIBRARIES on OS X. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=08580be2ada7b226c3b8f91b6ecdbc57d843d42e commit 08580be2ada7b226c3b8f91b6ecdbc57d843d42e Author: David Gobbi AuthorDate: Sat Dec 12 09:32:42 2015 -0700 Commit: Brad King CommitDate: Mon Dec 14 09:46:32 2015 -0500 FindOpenGL: Don't add AGL to OPENGL_LIBRARIES on OS X. CMake had been setting OPENGL_glu_LIBRARY to AGL.framework, even though AGL is not GLU. AGL is simply the GL component for the deprecated Carbon framework. GLU is provided by OpenGL.framework. A side effect of the old behavior was that if AGL was not found (it is absent from OS X SDK 10.10 or later), then OPENGL_GLU_FOUND would be incorrectly set to "NO". diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index a7eefa7..93e488b 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -71,9 +71,11 @@ elseif (WIN32) elseif (APPLE) - find_library(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL lib for OSX") - find_library(OPENGL_glu_LIBRARY AGL DOC "AGL lib for OSX") - find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX") + # The OpenGL.framework provides both gl and glu + find_library(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL library for OS X") + find_library(OPENGL_glu_LIBRARY OpenGL DOC + "GLU library for OS X (usually same as OpenGL library)") + find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OS X") list(APPEND _OpenGL_REQUIRED_VARS OPENGL_INCLUDE_DIR) else() @@ -149,7 +151,9 @@ if(OPENGL_gl_LIBRARY) set( OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_LIBRARIES}) if(OPENGL_glu_LIBRARY) set( OPENGL_GLU_FOUND "YES" ) - set( OPENGL_LIBRARIES ${OPENGL_glu_LIBRARY} ${OPENGL_LIBRARIES} ) + if(NOT "${OPENGL_glu_LIBRARY}" STREQUAL "${OPENGL_gl_LIBRARY}") + set( OPENGL_LIBRARIES ${OPENGL_glu_LIBRARY} ${OPENGL_LIBRARIES} ) + endif() else() set( OPENGL_GLU_FOUND "NO" ) endif() ----------------------------------------------------------------------- Summary of changes: Modules/FindOpenGL.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 14 09:58:58 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 14 Dec 2015 09:58:58 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1726-g7bce703 Message-ID: <20151214145858.3F356E07E2@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 7bce703841f1204d82fb23fa2cfc3e91ee2d7fc4 (commit) via f0b5ce7f94ae699ed583777534742bbeb211407a (commit) from f13c32c336518c1ffbe319abebea4f3e5196943b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7bce703841f1204d82fb23fa2cfc3e91ee2d7fc4 commit 7bce703841f1204d82fb23fa2cfc3e91ee2d7fc4 Merge: f13c32c f0b5ce7 Author: Brad King AuthorDate: Mon Dec 14 09:58:52 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 14 09:58:52 2015 -0500 Merge topic 'FindGTest-imported-targets' into next f0b5ce7f Help: Add notes for topic 'FindGTest-imported-targets' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0b5ce7f94ae699ed583777534742bbeb211407a commit f0b5ce7f94ae699ed583777534742bbeb211407a Author: Brad King AuthorDate: Mon Dec 14 09:56:30 2015 -0500 Commit: Brad King CommitDate: Mon Dec 14 09:56:30 2015 -0500 Help: Add notes for topic 'FindGTest-imported-targets' diff --git a/Help/release/dev/FindGTest-imported-targets.rst b/Help/release/dev/FindGTest-imported-targets.rst new file mode 100644 index 0000000..3cb98da --- /dev/null +++ b/Help/release/dev/FindGTest-imported-targets.rst @@ -0,0 +1,4 @@ +FindGTest-imported-targets +-------------------------- + +* The :module:`FindGTest` module now provides imported targets. ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindGTest-imported-targets.rst | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Help/release/dev/FindGTest-imported-targets.rst hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 14 10:00:00 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 14 Dec 2015 10:00:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-700-g09da79b Message-ID: <20151214150000.D5CA3E082D@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 09da79b40ff5a809490b40709a9e564e4ceec0b7 (commit) via f254276fc1a17de7cd5cfc016fd2137937830fca (commit) from b97018534fbb4ce238561a1363f2698526bcda31 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=09da79b40ff5a809490b40709a9e564e4ceec0b7 commit 09da79b40ff5a809490b40709a9e564e4ceec0b7 Merge: b970185 f254276 Author: Brad King AuthorDate: Mon Dec 14 09:59:58 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 14 09:59:58 2015 -0500 Merge topic 'fix-CMP0065-NEW-AIX-HP' f254276f AIX,HP-UX: Fix RPATH handling when CMP0065 is set to NEW ----------------------------------------------------------------------- Summary of changes: Modules/Platform/AIX-GNU.cmake | 12 +++++++++++- Modules/Platform/AIX-XL.cmake | 12 +++++++++++- Modules/Platform/HP-UX-GNU.cmake | 4 +++- Modules/Platform/HP-UX-HP.cmake | 4 +++- 4 files changed, 28 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 14 10:00:04 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 14 Dec 2015 10:00:04 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-704-gc952f2b Message-ID: <20151214150004.C71B6E0840@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c952f2b42469c22b09570d35eb67d6521eeffbb7 (commit) via f0b5ce7f94ae699ed583777534742bbeb211407a (commit) via 99afe23513054db4add5143de4aa3a826e8c6c75 (commit) via 611735e76e14807e2145d6b67efbb080d419f19f (commit) from 09da79b40ff5a809490b40709a9e564e4ceec0b7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c952f2b42469c22b09570d35eb67d6521eeffbb7 commit c952f2b42469c22b09570d35eb67d6521eeffbb7 Merge: 09da79b f0b5ce7 Author: Brad King AuthorDate: Mon Dec 14 10:00:02 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 14 10:00:02 2015 -0500 Merge topic 'FindGTest-imported-targets' f0b5ce7f Help: Add notes for topic 'FindGTest-imported-targets' 99afe235 Tests: Add tests for FindGTest 611735e7 FindGTest: Add imported targets and update documentation ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindGTest-imported-targets.rst | 4 + Modules/FindGTest.cmake | 160 +++++++++++++++-------- Tests/CMakeLists.txt | 5 + Tests/{FindBoost => FindGTest}/CMakeLists.txt | 8 +- Tests/FindGTest/Test/CMakeLists.txt | 17 +++ Tests/FindGTest/Test/main.cxx | 6 + 6 files changed, 144 insertions(+), 56 deletions(-) create mode 100644 Help/release/dev/FindGTest-imported-targets.rst copy Tests/{FindBoost => FindGTest}/CMakeLists.txt (54%) create mode 100644 Tests/FindGTest/Test/CMakeLists.txt create mode 100644 Tests/FindGTest/Test/main.cxx hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 14 10:00:07 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 14 Dec 2015 10:00:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-706-g22ccae1 Message-ID: <20151214150007.44133E083F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 22ccae1d683b3d2e829edaa08abea0a7f6362000 (commit) via 2908103d04daeaf396173b6f868f2cad5eb47b08 (commit) from c952f2b42469c22b09570d35eb67d6521eeffbb7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22ccae1d683b3d2e829edaa08abea0a7f6362000 commit 22ccae1d683b3d2e829edaa08abea0a7f6362000 Merge: c952f2b 2908103 Author: Brad King AuthorDate: Mon Dec 14 10:00:05 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 14 10:00:05 2015 -0500 Merge topic 'FindProtobuf-fix-case' 2908103d FindProtobuf: Set Protobuf_FOUND in addition to PROTOBUF_FOUND ----------------------------------------------------------------------- Summary of changes: Modules/FindProtobuf.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 14 10:00:38 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 14 Dec 2015 10:00:38 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1732-gfb02b77 Message-ID: <20151214150038.69C16DFF29@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via fb02b77199c5ed153c9b4f7fe82b069017bbbeef (commit) via 22ccae1d683b3d2e829edaa08abea0a7f6362000 (commit) via c952f2b42469c22b09570d35eb67d6521eeffbb7 (commit) via 09da79b40ff5a809490b40709a9e564e4ceec0b7 (commit) via b97018534fbb4ce238561a1363f2698526bcda31 (commit) via ac6025c5ff9a24a6a03b225c0b02ce67d65013d3 (commit) from 7bce703841f1204d82fb23fa2cfc3e91ee2d7fc4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb02b77199c5ed153c9b4f7fe82b069017bbbeef commit fb02b77199c5ed153c9b4f7fe82b069017bbbeef Merge: 7bce703 22ccae1 Author: Brad King AuthorDate: Mon Dec 14 10:00:26 2015 -0500 Commit: Brad King CommitDate: Mon Dec 14 10:00:26 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 14 10:02:41 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 14 Dec 2015 10:02:41 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-709-g6a6d00a Message-ID: <20151214150241.965AEE08B9@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 6a6d00aeeffadcb535b5a4cf4adaeda296f91b3a (commit) via a9e8b123de79a65074dab1944bf80d94dc101b12 (commit) via 5914d5eabc8f050f9b1c9873d31598331eaeefa7 (commit) from 22ccae1d683b3d2e829edaa08abea0a7f6362000 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 14 10:02:41 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 14 Dec 2015 10:02:41 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1736-gd75e40d Message-ID: <20151214150241.C2100E08BB@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via d75e40d647d3d8869d375455a64a78aa0eca4f93 (commit) via 6a6d00aeeffadcb535b5a4cf4adaeda296f91b3a (commit) via a9e8b123de79a65074dab1944bf80d94dc101b12 (commit) via 5914d5eabc8f050f9b1c9873d31598331eaeefa7 (commit) from fb02b77199c5ed153c9b4f7fe82b069017bbbeef (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d75e40d647d3d8869d375455a64a78aa0eca4f93 commit d75e40d647d3d8869d375455a64a78aa0eca4f93 Merge: fb02b77 6a6d00a Author: Brad King AuthorDate: Mon Dec 14 10:02:30 2015 -0500 Commit: Brad King CommitDate: Mon Dec 14 10:02:30 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 14 10:02:41 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 14 Dec 2015 10:02:41 -0500 (EST) Subject: [Cmake-commits] CMake branch, release, updated. v3.4.1-4-ga9e8b12 Message-ID: <20151214150241.D2AD2E08C0@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via a9e8b123de79a65074dab1944bf80d94dc101b12 (commit) via f254276fc1a17de7cd5cfc016fd2137937830fca (commit) via 5914d5eabc8f050f9b1c9873d31598331eaeefa7 (commit) via d8b251e2ea84e612dc30a1c9690a8b299aeb30fd (commit) from fd7180f0c0c2554c31afda235469df986a109fe4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/FindJava.cmake | 6 +++--- Modules/Platform/AIX-GNU.cmake | 12 +++++++++++- Modules/Platform/AIX-XL.cmake | 12 +++++++++++- Modules/Platform/HP-UX-GNU.cmake | 4 +++- Modules/Platform/HP-UX-HP.cmake | 4 +++- 5 files changed, 31 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From nilsgladitz at gmail.com Mon Dec 14 15:00:00 2015 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 14 Dec 2015 15:00:00 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1738-g3d5ec08 Message-ID: <20151214200000.69A44E088A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 3d5ec083460e03b1ad57baa90cddbc543233f3fa (commit) via 95224b2152c8df6869f02f04a1f741f5607b111f (commit) from d75e40d647d3d8869d375455a64a78aa0eca4f93 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d5ec083460e03b1ad57baa90cddbc543233f3fa commit 3d5ec083460e03b1ad57baa90cddbc543233f3fa Merge: d75e40d 95224b2 Author: Nils Gladitz AuthorDate: Mon Dec 14 14:59:59 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 14 14:59:59 2015 -0500 Merge topic 'release-wix-config-ng' into next 95224b21 CMake: !fixup Support building WiX installer without Qt Dialog https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=95224b2152c8df6869f02f04a1f741f5607b111f commit 95224b2152c8df6869f02f04a1f741f5607b111f Author: Nils Gladitz AuthorDate: Mon Dec 14 20:58:59 2015 +0100 Commit: Nils Gladitz CommitDate: Mon Dec 14 20:58:59 2015 +0100 CMake: !fixup Support building WiX installer without Qt Dialog diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index eb36015..0562732 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -249,6 +249,14 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") set(CPACK_WIX_UI_REF "CMakeUI_InstallDir") set(CPACK_WIX_PATCH_FILE - "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch.xml" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_path_env.xml" ) + + set(BUILD_QtDialog "@BUILD_QtDialog@") + + if(BUILD_QtDialog) + list(APPEND CPACK_WIX_PATCH_FILE + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_desktop_shortcut.xml" + ) + endif() endif() diff --git a/Utilities/Release/WiX/patch_desktop_shortcut.xml b/Utilities/Release/WiX/patch_desktop_shortcut.xml new file mode 100644 index 0000000..d30705d --- /dev/null +++ b/Utilities/Release/WiX/patch_desktop_shortcut.xml @@ -0,0 +1,5 @@ + + + DESKTOP_SHORTCUT_REQUESTED = 1 + + diff --git a/Utilities/Release/WiX/patch.xml b/Utilities/Release/WiX/patch_path_env.xml similarity index 87% rename from Utilities/Release/WiX/patch.xml rename to Utilities/Release/WiX/patch_path_env.xml index 666c7ac..0e335c4 100644 --- a/Utilities/Release/WiX/patch.xml +++ b/Utilities/Release/WiX/patch_path_env.xml @@ -1,8 +1,4 @@ - - DESKTOP_SHORTCUT_REQUESTED = 1 - - ----------------------------------------------------------------------- Summary of changes: CMakeCPackOptions.cmake.in | 10 +++++++++- Utilities/Release/WiX/patch_desktop_shortcut.xml | 5 +++++ Utilities/Release/WiX/{patch.xml => patch_path_env.xml} | 4 ---- 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 Utilities/Release/WiX/patch_desktop_shortcut.xml rename Utilities/Release/WiX/{patch.xml => patch_path_env.xml} (87%) hooks/post-receive -- CMake From nilsgladitz at gmail.com Mon Dec 14 15:00:48 2015 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 14 Dec 2015 15:00:48 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1740-g906215d Message-ID: <20151214200048.27BE0E08F1@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 906215d2fe7e9c6408be4c69935c150cf85210d3 (commit) via 017ef8f70f259e4b6f826fc6bd710fe6a5a386ae (commit) from 3d5ec083460e03b1ad57baa90cddbc543233f3fa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=906215d2fe7e9c6408be4c69935c150cf85210d3 commit 906215d2fe7e9c6408be4c69935c150cf85210d3 Merge: 3d5ec08 017ef8f Author: Nils Gladitz AuthorDate: Mon Dec 14 15:00:47 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 14 15:00:47 2015 -0500 Merge topic 'release-wix-config-ng' into next 017ef8f7 CMake: Mimic NSIS options dialog in WiX installer https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=017ef8f70f259e4b6f826fc6bd710fe6a5a386ae commit 017ef8f70f259e4b6f826fc6bd710fe6a5a386ae Author: Nils Gladitz AuthorDate: Thu Dec 10 23:55:07 2015 +0100 Commit: Nils Gladitz CommitDate: Mon Dec 14 21:00:18 2015 +0100 CMake: Mimic NSIS options dialog in WiX installer diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 4ebf306..0562732 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -234,10 +234,29 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-dcl:high") set(CPACK_WIX_UI_BANNER - "@CMake_SOURCE_DIR@/Utilities/Release/cpack_wix_ui_banner.jpg" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/ui_banner.jpg" ) set(CPACK_WIX_UI_DIALOG - "@CMake_SOURCE_DIR@/Utilities/Release/cpack_wix_ui_dialog.jpg" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/ui_dialog.jpg" ) + + set(CPACK_WIX_EXTRA_SOURCES + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/install_dir.wxs" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/cmake_extra_dialog.wxs" + ) + + set(CPACK_WIX_UI_REF "CMakeUI_InstallDir") + + set(CPACK_WIX_PATCH_FILE + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_path_env.xml" + ) + + set(BUILD_QtDialog "@BUILD_QtDialog@") + + if(BUILD_QtDialog) + list(APPEND CPACK_WIX_PATCH_FILE + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_desktop_shortcut.xml" + ) + endif() endif() diff --git a/Utilities/Release/WiX/cmake_extra_dialog.wxs b/Utilities/Release/WiX/cmake_extra_dialog.wxs new file mode 100644 index 0000000..6047c08 --- /dev/null +++ b/Utilities/Release/WiX/cmake_extra_dialog.wxs @@ -0,0 +1,35 @@ + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Utilities/Release/WiX/install_dir.wxs b/Utilities/Release/WiX/install_dir.wxs new file mode 100644 index 0000000..883efba --- /dev/null +++ b/Utilities/Release/WiX/install_dir.wxs @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + 1 + "1"]]> + + 1 + + NOT Installed + Installed AND PATCH + + 1 + LicenseAccepted = "1" + + 1 + 1 + NOT WIXUI_DONTVALIDATEPATH + "1"]]> + WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1" + 1 + 1 + + 1 + 1 + + NOT Installed + Installed AND NOT PATCH + Installed AND PATCH + + 1 + + 1 + 1 + 1 + + + + + + + diff --git a/Utilities/Release/WiX/patch_desktop_shortcut.xml b/Utilities/Release/WiX/patch_desktop_shortcut.xml new file mode 100644 index 0000000..d30705d --- /dev/null +++ b/Utilities/Release/WiX/patch_desktop_shortcut.xml @@ -0,0 +1,5 @@ + + + DESKTOP_SHORTCUT_REQUESTED = 1 + + diff --git a/Utilities/Release/WiX/patch_path_env.xml b/Utilities/Release/WiX/patch_path_env.xml new file mode 100644 index 0000000..0e335c4 --- /dev/null +++ b/Utilities/Release/WiX/patch_path_env.xml @@ -0,0 +1,26 @@ + + + + + ADD_CMAKE_TO_PATH = "System" + + + + + + + ADD_CMAKE_TO_PATH = "User" + + + + + + + + + + diff --git a/Utilities/Release/cpack_wix_ui_banner.jpg b/Utilities/Release/WiX/ui_banner.jpg similarity index 100% rename from Utilities/Release/cpack_wix_ui_banner.jpg rename to Utilities/Release/WiX/ui_banner.jpg diff --git a/Utilities/Release/cpack_wix_ui_dialog.jpg b/Utilities/Release/WiX/ui_dialog.jpg similarity index 100% rename from Utilities/Release/cpack_wix_ui_dialog.jpg rename to Utilities/Release/WiX/ui_dialog.jpg ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From nilsgladitz at gmail.com Mon Dec 14 17:27:52 2015 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 14 Dec 2015 17:27:52 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1743-g8afdd81 Message-ID: <20151214222752.82049E08DF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 8afdd81e1c8ad9f42506fa38e5d005427beef0c0 (commit) via b31550dba8557e9fe306b8123d172d484bb8c25c (commit) via 96c6c8574b0a176fd27401eb2464f88c6b76b47b (commit) from 906215d2fe7e9c6408be4c69935c150cf85210d3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8afdd81e1c8ad9f42506fa38e5d005427beef0c0 commit 8afdd81e1c8ad9f42506fa38e5d005427beef0c0 Merge: 906215d b31550d Author: Nils Gladitz AuthorDate: Mon Dec 14 17:27:50 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 14 17:27:50 2015 -0500 Merge topic 'release-wix-config-ng' into next b31550db CMake: !fixup Omit desktop shortcut checkbox when not building QtDialog 96c6c857 CPackWIX: Allow multiple patch files and diagnose if any are missing https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b31550dba8557e9fe306b8123d172d484bb8c25c commit b31550dba8557e9fe306b8123d172d484bb8c25c Author: Nils Gladitz AuthorDate: Mon Dec 14 23:09:11 2015 +0100 Commit: Nils Gladitz CommitDate: Mon Dec 14 23:20:38 2015 +0100 CMake: !fixup Omit desktop shortcut checkbox when not building QtDialog diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 0562732..09568c3 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -258,5 +258,7 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") list(APPEND CPACK_WIX_PATCH_FILE "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_desktop_shortcut.xml" ) + + set(CPACK_WIX_CANDLE_EXTRA_FLAGS "-dBUILD_QtDialog=1") endif() endif() diff --git a/Utilities/Release/WiX/cmake_extra_dialog.wxs b/Utilities/Release/WiX/cmake_extra_dialog.wxs index 6047c08..0ee3d99 100644 --- a/Utilities/Release/WiX/cmake_extra_dialog.wxs +++ b/Utilities/Release/WiX/cmake_extra_dialog.wxs @@ -27,8 +27,9 @@ - - + + + https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=96c6c8574b0a176fd27401eb2464f88c6b76b47b commit 96c6c8574b0a176fd27401eb2464f88c6b76b47b Author: Nils Gladitz AuthorDate: Mon Dec 14 23:04:41 2015 +0100 Commit: Nils Gladitz CommitDate: Mon Dec 14 23:04:41 2015 +0100 CPackWIX: Allow multiple patch files and diagnose if any are missing CPACK_WIX_PATCH_FILE now accepts a list of patch files. An error will now be produced if any of the patch files is missing. Previously this would be silently ignored. diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake index bef8e16..4994005 100644 --- a/Modules/CPackWIX.cmake +++ b/Modules/CPackWIX.cmake @@ -119,7 +119,8 @@ # # .. variable:: CPACK_WIX_PATCH_FILE # -# Optional XML file with fragments to be inserted into generated WiX sources +# Optional list of XML files with fragments to be inserted into +# generated WiX sources # # This optional variable can be used to specify an XML file that the # WiX generator will use to inject fragments into its generated diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index b55c5a5..ece327a 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -242,7 +242,16 @@ bool cmCPackWIXGenerator::InitializeWiXConfiguration() const char* patchFilePath = GetOption("CPACK_WIX_PATCH_FILE"); if(patchFilePath) { - this->Patch->LoadFragments(patchFilePath); + std::vector patchFilePaths; + cmSystemTools::ExpandListArgument(patchFilePath, patchFilePaths); + + for(size_t i = 0; i < patchFilePaths.size(); ++i) + { + if(!this->Patch->LoadFragments(patchFilePaths[i])) + { + return false; + } + } } return true; diff --git a/Source/CPack/WiX/cmWIXPatch.cxx b/Source/CPack/WiX/cmWIXPatch.cxx index 471c3a4..07375da 100644 --- a/Source/CPack/WiX/cmWIXPatch.cxx +++ b/Source/CPack/WiX/cmWIXPatch.cxx @@ -20,10 +20,18 @@ cmWIXPatch::cmWIXPatch(cmCPackLog* logger): } -void cmWIXPatch::LoadFragments(std::string const& patchFilePath) +bool cmWIXPatch::LoadFragments(std::string const& patchFilePath) { cmWIXPatchParser parser(Fragments, Logger); - parser.ParseFile(patchFilePath.c_str()); + if(!parser.ParseFile(patchFilePath.c_str())) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Failed parsing XML patch file: '" << + patchFilePath << "'" << std::endl); + return false; + } + + return true; } void cmWIXPatch::ApplyFragment( diff --git a/Source/CPack/WiX/cmWIXPatch.h b/Source/CPack/WiX/cmWIXPatch.h index d53fcb4..2f31a01 100644 --- a/Source/CPack/WiX/cmWIXPatch.h +++ b/Source/CPack/WiX/cmWIXPatch.h @@ -26,7 +26,7 @@ class cmWIXPatch public: cmWIXPatch(cmCPackLog* logger); - void LoadFragments(std::string const& patchFilePath); + bool LoadFragments(std::string const& patchFilePath); void ApplyFragment(std::string const& id, cmWIXSourceWriter& writer); ----------------------------------------------------------------------- Summary of changes: CMakeCPackOptions.cmake.in | 2 ++ Modules/CPackWIX.cmake | 3 ++- Source/CPack/WiX/cmCPackWIXGenerator.cxx | 11 ++++++++++- Source/CPack/WiX/cmWIXPatch.cxx | 12 ++++++++++-- Source/CPack/WiX/cmWIXPatch.h | 2 +- Utilities/Release/WiX/cmake_extra_dialog.wxs | 5 +++-- 6 files changed, 28 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From nilsgladitz at gmail.com Mon Dec 14 17:29:07 2015 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Mon, 14 Dec 2015 17:29:07 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1746-gabe5e4a Message-ID: <20151214222907.292F2E0914@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via abe5e4a93c0f0a2041cf670371c4b8604595ae59 (commit) via a4c6b4d6b17b430c23aab2f7452e4fe860244916 (commit) via de77d4a741c84e0b5774e79a0c84e945e25ad9f8 (commit) from 8afdd81e1c8ad9f42506fa38e5d005427beef0c0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=abe5e4a93c0f0a2041cf670371c4b8604595ae59 commit abe5e4a93c0f0a2041cf670371c4b8604595ae59 Merge: 8afdd81 a4c6b4d Author: Nils Gladitz AuthorDate: Mon Dec 14 17:29:06 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 14 17:29:06 2015 -0500 Merge topic 'release-wix-config-ng' into next a4c6b4d6 CMake: Mimic NSIS options dialog in WiX installer de77d4a7 CPackWIX: Allow multiple patch files and diagnose if any are missing https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a4c6b4d6b17b430c23aab2f7452e4fe860244916 commit a4c6b4d6b17b430c23aab2f7452e4fe860244916 Author: Nils Gladitz AuthorDate: Thu Dec 10 23:55:07 2015 +0100 Commit: Nils Gladitz CommitDate: Mon Dec 14 23:28:44 2015 +0100 CMake: Mimic NSIS options dialog in WiX installer diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 4ebf306..09568c3 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -234,10 +234,31 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-dcl:high") set(CPACK_WIX_UI_BANNER - "@CMake_SOURCE_DIR@/Utilities/Release/cpack_wix_ui_banner.jpg" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/ui_banner.jpg" ) set(CPACK_WIX_UI_DIALOG - "@CMake_SOURCE_DIR@/Utilities/Release/cpack_wix_ui_dialog.jpg" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/ui_dialog.jpg" ) + + set(CPACK_WIX_EXTRA_SOURCES + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/install_dir.wxs" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/cmake_extra_dialog.wxs" + ) + + set(CPACK_WIX_UI_REF "CMakeUI_InstallDir") + + set(CPACK_WIX_PATCH_FILE + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_path_env.xml" + ) + + set(BUILD_QtDialog "@BUILD_QtDialog@") + + if(BUILD_QtDialog) + list(APPEND CPACK_WIX_PATCH_FILE + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_desktop_shortcut.xml" + ) + + set(CPACK_WIX_CANDLE_EXTRA_FLAGS "-dBUILD_QtDialog=1") + endif() endif() diff --git a/Utilities/Release/WiX/cmake_extra_dialog.wxs b/Utilities/Release/WiX/cmake_extra_dialog.wxs new file mode 100644 index 0000000..0ee3d99 --- /dev/null +++ b/Utilities/Release/WiX/cmake_extra_dialog.wxs @@ -0,0 +1,36 @@ + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Utilities/Release/WiX/install_dir.wxs b/Utilities/Release/WiX/install_dir.wxs new file mode 100644 index 0000000..883efba --- /dev/null +++ b/Utilities/Release/WiX/install_dir.wxs @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + 1 + "1"]]> + + 1 + + NOT Installed + Installed AND PATCH + + 1 + LicenseAccepted = "1" + + 1 + 1 + NOT WIXUI_DONTVALIDATEPATH + "1"]]> + WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1" + 1 + 1 + + 1 + 1 + + NOT Installed + Installed AND NOT PATCH + Installed AND PATCH + + 1 + + 1 + 1 + 1 + + + + + + + diff --git a/Utilities/Release/WiX/patch_desktop_shortcut.xml b/Utilities/Release/WiX/patch_desktop_shortcut.xml new file mode 100644 index 0000000..d30705d --- /dev/null +++ b/Utilities/Release/WiX/patch_desktop_shortcut.xml @@ -0,0 +1,5 @@ + + + DESKTOP_SHORTCUT_REQUESTED = 1 + + diff --git a/Utilities/Release/WiX/patch_path_env.xml b/Utilities/Release/WiX/patch_path_env.xml new file mode 100644 index 0000000..0e335c4 --- /dev/null +++ b/Utilities/Release/WiX/patch_path_env.xml @@ -0,0 +1,26 @@ + + + + + ADD_CMAKE_TO_PATH = "System" + + + + + + + ADD_CMAKE_TO_PATH = "User" + + + + + + + + + + diff --git a/Utilities/Release/cpack_wix_ui_banner.jpg b/Utilities/Release/WiX/ui_banner.jpg similarity index 100% rename from Utilities/Release/cpack_wix_ui_banner.jpg rename to Utilities/Release/WiX/ui_banner.jpg diff --git a/Utilities/Release/cpack_wix_ui_dialog.jpg b/Utilities/Release/WiX/ui_dialog.jpg similarity index 100% rename from Utilities/Release/cpack_wix_ui_dialog.jpg rename to Utilities/Release/WiX/ui_dialog.jpg https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=de77d4a741c84e0b5774e79a0c84e945e25ad9f8 commit de77d4a741c84e0b5774e79a0c84e945e25ad9f8 Author: Nils Gladitz AuthorDate: Mon Dec 14 23:04:41 2015 +0100 Commit: Nils Gladitz CommitDate: Mon Dec 14 23:28:42 2015 +0100 CPackWIX: Allow multiple patch files and diagnose if any are missing CPACK_WIX_PATCH_FILE now accepts a list of patch files. An error will now be produced if any of the patch files is missing. Previously this would be silently ignored. diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake index bef8e16..4994005 100644 --- a/Modules/CPackWIX.cmake +++ b/Modules/CPackWIX.cmake @@ -119,7 +119,8 @@ # # .. variable:: CPACK_WIX_PATCH_FILE # -# Optional XML file with fragments to be inserted into generated WiX sources +# Optional list of XML files with fragments to be inserted into +# generated WiX sources # # This optional variable can be used to specify an XML file that the # WiX generator will use to inject fragments into its generated diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index b55c5a5..ece327a 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -242,7 +242,16 @@ bool cmCPackWIXGenerator::InitializeWiXConfiguration() const char* patchFilePath = GetOption("CPACK_WIX_PATCH_FILE"); if(patchFilePath) { - this->Patch->LoadFragments(patchFilePath); + std::vector patchFilePaths; + cmSystemTools::ExpandListArgument(patchFilePath, patchFilePaths); + + for(size_t i = 0; i < patchFilePaths.size(); ++i) + { + if(!this->Patch->LoadFragments(patchFilePaths[i])) + { + return false; + } + } } return true; diff --git a/Source/CPack/WiX/cmWIXPatch.cxx b/Source/CPack/WiX/cmWIXPatch.cxx index 471c3a4..07375da 100644 --- a/Source/CPack/WiX/cmWIXPatch.cxx +++ b/Source/CPack/WiX/cmWIXPatch.cxx @@ -20,10 +20,18 @@ cmWIXPatch::cmWIXPatch(cmCPackLog* logger): } -void cmWIXPatch::LoadFragments(std::string const& patchFilePath) +bool cmWIXPatch::LoadFragments(std::string const& patchFilePath) { cmWIXPatchParser parser(Fragments, Logger); - parser.ParseFile(patchFilePath.c_str()); + if(!parser.ParseFile(patchFilePath.c_str())) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Failed parsing XML patch file: '" << + patchFilePath << "'" << std::endl); + return false; + } + + return true; } void cmWIXPatch::ApplyFragment( diff --git a/Source/CPack/WiX/cmWIXPatch.h b/Source/CPack/WiX/cmWIXPatch.h index d53fcb4..2f31a01 100644 --- a/Source/CPack/WiX/cmWIXPatch.h +++ b/Source/CPack/WiX/cmWIXPatch.h @@ -26,7 +26,7 @@ class cmWIXPatch public: cmWIXPatch(cmCPackLog* logger); - void LoadFragments(std::string const& patchFilePath); + bool LoadFragments(std::string const& patchFilePath); void ApplyFragment(std::string const& id, cmWIXSourceWriter& writer); ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 15 00:01:11 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 15 Dec 2015 00:01:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-710-g7a47745 Message-ID: <20151215050111.54E31E07A4@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 7a47745d69003ec580e8f38d26dbf8858a4f5b18 (commit) from 6a6d00aeeffadcb535b5a4cf4adaeda296f91b3a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a47745d69003ec580e8f38d26dbf8858a4f5b18 commit 7a47745d69003ec580e8f38d26dbf8858a4f5b18 Author: Kitware Robot AuthorDate: Tue Dec 15 00:01:08 2015 -0500 Commit: Kitware Robot CommitDate: Tue Dec 15 00:01:08 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 4e596d9..b7a3791 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 4) -set(CMake_VERSION_PATCH 20151214) +set(CMake_VERSION_PATCH 20151215) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From nilsgladitz at gmail.com Tue Dec 15 12:35:55 2015 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Tue, 15 Dec 2015 12:35:55 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1748-gb1ee0f0 Message-ID: <20151215173555.E28A3E08FA@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via b1ee0f0c0c6999b4c83e66ee6fe009d0c53f8d57 (commit) via 26df433e9e54e6a2c6bc862e2b19ad63c037082d (commit) from abe5e4a93c0f0a2041cf670371c4b8604595ae59 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b1ee0f0c0c6999b4c83e66ee6fe009d0c53f8d57 commit b1ee0f0c0c6999b4c83e66ee6fe009d0c53f8d57 Merge: abe5e4a 26df433 Author: Nils Gladitz AuthorDate: Tue Dec 15 12:35:54 2015 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 15 12:35:54 2015 -0500 Merge topic 'release-wix-config-ng' into next 26df433e CMake: !fixup Support downgrades with WiX installers https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=26df433e9e54e6a2c6bc862e2b19ad63c037082d commit 26df433e9e54e6a2c6bc862e2b19ad63c037082d Author: Nils Gladitz AuthorDate: Tue Dec 15 18:22:34 2015 +0100 Commit: Nils Gladitz CommitDate: Tue Dec 15 18:22:34 2015 +0100 CMake: !fixup Support downgrades with WiX installers diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 09568c3..25af0c9 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -252,6 +252,10 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_path_env.xml" ) + set(CPACK_WIX_TEMPLATE + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/WIX.template.in" + ) + set(BUILD_QtDialog "@BUILD_QtDialog@") if(BUILD_QtDialog) diff --git a/Utilities/Release/WiX/WIX.template.in b/Utilities/Release/WiX/WIX.template.in new file mode 100644 index 0000000..8f10f61 --- /dev/null +++ b/Utilities/Release/WiX/WIX.template.in @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + ProductIcon.ico + + + + + + + + + + + + + + + + + + + ----------------------------------------------------------------------- Summary of changes: CMakeCPackOptions.cmake.in | 4 ++++ {Modules => Utilities/Release/WiX}/WIX.template.in | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) copy {Modules => Utilities/Release/WiX}/WIX.template.in (90%) hooks/post-receive -- CMake From nilsgladitz at gmail.com Tue Dec 15 12:36:31 2015 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Tue, 15 Dec 2015 12:36:31 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1750-g1c87eba Message-ID: <20151215173631.8D6E1E0661@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 1c87eba4a16e0d31175f955ed6d7a55ce86931a7 (commit) via 6ed1a5bb93664b4654a2f1528530d8d4e67db668 (commit) from b1ee0f0c0c6999b4c83e66ee6fe009d0c53f8d57 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c87eba4a16e0d31175f955ed6d7a55ce86931a7 commit 1c87eba4a16e0d31175f955ed6d7a55ce86931a7 Merge: b1ee0f0 6ed1a5b Author: Nils Gladitz AuthorDate: Tue Dec 15 12:36:30 2015 -0500 Commit: CMake Topic Stage CommitDate: Tue Dec 15 12:36:30 2015 -0500 Merge topic 'release-wix-config-ng' into next 6ed1a5bb CMake: Mimic NSIS options dialog in WiX installer https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ed1a5bb93664b4654a2f1528530d8d4e67db668 commit 6ed1a5bb93664b4654a2f1528530d8d4e67db668 Author: Nils Gladitz AuthorDate: Thu Dec 10 23:55:07 2015 +0100 Commit: Nils Gladitz CommitDate: Tue Dec 15 18:36:14 2015 +0100 CMake: Mimic NSIS options dialog in WiX installer diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 4ebf306..25af0c9 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -234,10 +234,35 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-dcl:high") set(CPACK_WIX_UI_BANNER - "@CMake_SOURCE_DIR@/Utilities/Release/cpack_wix_ui_banner.jpg" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/ui_banner.jpg" ) set(CPACK_WIX_UI_DIALOG - "@CMake_SOURCE_DIR@/Utilities/Release/cpack_wix_ui_dialog.jpg" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/ui_dialog.jpg" ) + + set(CPACK_WIX_EXTRA_SOURCES + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/install_dir.wxs" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/cmake_extra_dialog.wxs" + ) + + set(CPACK_WIX_UI_REF "CMakeUI_InstallDir") + + set(CPACK_WIX_PATCH_FILE + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_path_env.xml" + ) + + set(CPACK_WIX_TEMPLATE + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/WIX.template.in" + ) + + set(BUILD_QtDialog "@BUILD_QtDialog@") + + if(BUILD_QtDialog) + list(APPEND CPACK_WIX_PATCH_FILE + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_desktop_shortcut.xml" + ) + + set(CPACK_WIX_CANDLE_EXTRA_FLAGS "-dBUILD_QtDialog=1") + endif() endif() diff --git a/Utilities/Release/WiX/WIX.template.in b/Utilities/Release/WiX/WIX.template.in new file mode 100644 index 0000000..8f10f61 --- /dev/null +++ b/Utilities/Release/WiX/WIX.template.in @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + ProductIcon.ico + + + + + + + + + + + + + + + + + + + diff --git a/Utilities/Release/WiX/cmake_extra_dialog.wxs b/Utilities/Release/WiX/cmake_extra_dialog.wxs new file mode 100644 index 0000000..0ee3d99 --- /dev/null +++ b/Utilities/Release/WiX/cmake_extra_dialog.wxs @@ -0,0 +1,36 @@ + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Utilities/Release/WiX/install_dir.wxs b/Utilities/Release/WiX/install_dir.wxs new file mode 100644 index 0000000..883efba --- /dev/null +++ b/Utilities/Release/WiX/install_dir.wxs @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + 1 + "1"]]> + + 1 + + NOT Installed + Installed AND PATCH + + 1 + LicenseAccepted = "1" + + 1 + 1 + NOT WIXUI_DONTVALIDATEPATH + "1"]]> + WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1" + 1 + 1 + + 1 + 1 + + NOT Installed + Installed AND NOT PATCH + Installed AND PATCH + + 1 + + 1 + 1 + 1 + + + + + + + diff --git a/Utilities/Release/WiX/patch_desktop_shortcut.xml b/Utilities/Release/WiX/patch_desktop_shortcut.xml new file mode 100644 index 0000000..d30705d --- /dev/null +++ b/Utilities/Release/WiX/patch_desktop_shortcut.xml @@ -0,0 +1,5 @@ + + + DESKTOP_SHORTCUT_REQUESTED = 1 + + diff --git a/Utilities/Release/WiX/patch_path_env.xml b/Utilities/Release/WiX/patch_path_env.xml new file mode 100644 index 0000000..0e335c4 --- /dev/null +++ b/Utilities/Release/WiX/patch_path_env.xml @@ -0,0 +1,26 @@ + + + + + ADD_CMAKE_TO_PATH = "System" + + + + + + + ADD_CMAKE_TO_PATH = "User" + + + + + + + + + + diff --git a/Utilities/Release/cpack_wix_ui_banner.jpg b/Utilities/Release/WiX/ui_banner.jpg similarity index 100% rename from Utilities/Release/cpack_wix_ui_banner.jpg rename to Utilities/Release/WiX/ui_banner.jpg diff --git a/Utilities/Release/cpack_wix_ui_dialog.jpg b/Utilities/Release/WiX/ui_dialog.jpg similarity index 100% rename from Utilities/Release/cpack_wix_ui_dialog.jpg rename to Utilities/Release/WiX/ui_dialog.jpg ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 16 00:01:09 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 16 Dec 2015 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-711-g7e29021 Message-ID: <20151216050109.BD7F1E08BF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 7e290214659b2b253bd7034a2f56e47d0ff032b5 (commit) from 7a47745d69003ec580e8f38d26dbf8858a4f5b18 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7e290214659b2b253bd7034a2f56e47d0ff032b5 commit 7e290214659b2b253bd7034a2f56e47d0ff032b5 Author: Kitware Robot AuthorDate: Wed Dec 16 00:01:06 2015 -0500 Commit: Kitware Robot CommitDate: Wed Dec 16 00:01:06 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index b7a3791..d760757 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 4) -set(CMake_VERSION_PATCH 20151215) +set(CMake_VERSION_PATCH 20151216) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 17 00:01:08 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 17 Dec 2015 00:01:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-712-ge51fa1d Message-ID: <20151217050108.2DB72E0A55@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via e51fa1dc4dcc8c06899f2681890ec61b2517420d (commit) from 7e290214659b2b253bd7034a2f56e47d0ff032b5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e51fa1dc4dcc8c06899f2681890ec61b2517420d commit e51fa1dc4dcc8c06899f2681890ec61b2517420d Author: Kitware Robot AuthorDate: Thu Dec 17 00:01:05 2015 -0500 Commit: Kitware Robot CommitDate: Thu Dec 17 00:01:05 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index d760757..8fe4618 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 4) -set(CMake_VERSION_PATCH 20151216) +set(CMake_VERSION_PATCH 20151217) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 17 09:55:12 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 17 Dec 2015 09:55:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-714-g2913876 Message-ID: <20151217145513.0096EE0918@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 2913876c58daec60fec24c6b47c16c3d13b28405 (commit) via 08580be2ada7b226c3b8f91b6ecdbc57d843d42e (commit) from e51fa1dc4dcc8c06899f2681890ec61b2517420d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2913876c58daec60fec24c6b47c16c3d13b28405 commit 2913876c58daec60fec24c6b47c16c3d13b28405 Merge: e51fa1d 08580be Author: Brad King AuthorDate: Thu Dec 17 09:55:11 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 17 09:55:11 2015 -0500 Merge topic 'FindOpenGL-no-osx-AGL' 08580be2 FindOpenGL: Don't add AGL to OPENGL_LIBRARIES on OS X. ----------------------------------------------------------------------- Summary of changes: Modules/FindOpenGL.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 17 09:55:29 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 17 Dec 2015 09:55:29 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1755-g7a9f867 Message-ID: <20151217145529.7BE7CE0931@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 7a9f867254c923cba334c73e5cbf512e2ae64419 (commit) via 2913876c58daec60fec24c6b47c16c3d13b28405 (commit) via e51fa1dc4dcc8c06899f2681890ec61b2517420d (commit) via 7e290214659b2b253bd7034a2f56e47d0ff032b5 (commit) via 7a47745d69003ec580e8f38d26dbf8858a4f5b18 (commit) from 1c87eba4a16e0d31175f955ed6d7a55ce86931a7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a9f867254c923cba334c73e5cbf512e2ae64419 commit 7a9f867254c923cba334c73e5cbf512e2ae64419 Merge: 1c87eba 2913876 Author: Brad King AuthorDate: Thu Dec 17 09:55:20 2015 -0500 Commit: Brad King CommitDate: Thu Dec 17 09:55:20 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From nilsgladitz at gmail.com Thu Dec 17 09:57:11 2015 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Thu, 17 Dec 2015 09:57:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1757-g45b017a Message-ID: <20151217145711.A51F2E09AE@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 45b017abd486a576137b01d41cef654f78721b9c (commit) via 69873d4a4434d4be2261f23f99ff4f0bffae60e4 (commit) from 7a9f867254c923cba334c73e5cbf512e2ae64419 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=45b017abd486a576137b01d41cef654f78721b9c commit 45b017abd486a576137b01d41cef654f78721b9c Merge: 7a9f867 69873d4 Author: Nils Gladitz AuthorDate: Thu Dec 17 09:57:11 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 17 09:57:11 2015 -0500 Merge topic 'release-wix-config-ng' into next 69873d4a CMake: !fixup perform per machine WiX installations https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69873d4a4434d4be2261f23f99ff4f0bffae60e4 commit 69873d4a4434d4be2261f23f99ff4f0bffae60e4 Author: Nils Gladitz AuthorDate: Thu Dec 17 15:56:23 2015 +0100 Commit: Nils Gladitz CommitDate: Thu Dec 17 15:56:23 2015 +0100 CMake: !fixup perform per machine WiX installations diff --git a/Utilities/Release/WiX/WIX.template.in b/Utilities/Release/WiX/WIX.template.in index 8f10f61..094999f 100644 --- a/Utilities/Release/WiX/WIX.template.in +++ b/Utilities/Release/WiX/WIX.template.in @@ -12,7 +12,7 @@ Manufacturer="$(var.CPACK_PACKAGE_VENDOR)" UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)"> - + ----------------------------------------------------------------------- Summary of changes: Utilities/Release/WiX/WIX.template.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From nilsgladitz at gmail.com Thu Dec 17 09:57:52 2015 From: nilsgladitz at gmail.com (Nils Gladitz) Date: Thu, 17 Dec 2015 09:57:52 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1759-gdeef02d Message-ID: <20151217145752.BC70BE09EB@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via deef02dd4b919d85f636eecd8dca09500ee322c4 (commit) via 24cdb9df598a1c10fffc718255527729595442a1 (commit) from 45b017abd486a576137b01d41cef654f78721b9c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=deef02dd4b919d85f636eecd8dca09500ee322c4 commit deef02dd4b919d85f636eecd8dca09500ee322c4 Merge: 45b017a 24cdb9d Author: Nils Gladitz AuthorDate: Thu Dec 17 09:57:52 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 17 09:57:52 2015 -0500 Merge topic 'release-wix-config-ng' into next 24cdb9df CMake: Mimic NSIS options dialog in WiX installer https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24cdb9df598a1c10fffc718255527729595442a1 commit 24cdb9df598a1c10fffc718255527729595442a1 Author: Nils Gladitz AuthorDate: Thu Dec 10 23:55:07 2015 +0100 Commit: Nils Gladitz CommitDate: Thu Dec 17 15:57:30 2015 +0100 CMake: Mimic NSIS options dialog in WiX installer diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 4ebf306..25af0c9 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -234,10 +234,35 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-dcl:high") set(CPACK_WIX_UI_BANNER - "@CMake_SOURCE_DIR@/Utilities/Release/cpack_wix_ui_banner.jpg" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/ui_banner.jpg" ) set(CPACK_WIX_UI_DIALOG - "@CMake_SOURCE_DIR@/Utilities/Release/cpack_wix_ui_dialog.jpg" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/ui_dialog.jpg" ) + + set(CPACK_WIX_EXTRA_SOURCES + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/install_dir.wxs" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/cmake_extra_dialog.wxs" + ) + + set(CPACK_WIX_UI_REF "CMakeUI_InstallDir") + + set(CPACK_WIX_PATCH_FILE + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_path_env.xml" + ) + + set(CPACK_WIX_TEMPLATE + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/WIX.template.in" + ) + + set(BUILD_QtDialog "@BUILD_QtDialog@") + + if(BUILD_QtDialog) + list(APPEND CPACK_WIX_PATCH_FILE + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/patch_desktop_shortcut.xml" + ) + + set(CPACK_WIX_CANDLE_EXTRA_FLAGS "-dBUILD_QtDialog=1") + endif() endif() diff --git a/Utilities/Release/WiX/WIX.template.in b/Utilities/Release/WiX/WIX.template.in new file mode 100644 index 0000000..094999f --- /dev/null +++ b/Utilities/Release/WiX/WIX.template.in @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + ProductIcon.ico + + + + + + + + + + + + + + + + + + + diff --git a/Utilities/Release/WiX/cmake_extra_dialog.wxs b/Utilities/Release/WiX/cmake_extra_dialog.wxs new file mode 100644 index 0000000..0ee3d99 --- /dev/null +++ b/Utilities/Release/WiX/cmake_extra_dialog.wxs @@ -0,0 +1,36 @@ + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Utilities/Release/WiX/install_dir.wxs b/Utilities/Release/WiX/install_dir.wxs new file mode 100644 index 0000000..883efba --- /dev/null +++ b/Utilities/Release/WiX/install_dir.wxs @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + 1 + "1"]]> + + 1 + + NOT Installed + Installed AND PATCH + + 1 + LicenseAccepted = "1" + + 1 + 1 + NOT WIXUI_DONTVALIDATEPATH + "1"]]> + WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1" + 1 + 1 + + 1 + 1 + + NOT Installed + Installed AND NOT PATCH + Installed AND PATCH + + 1 + + 1 + 1 + 1 + + + + + + + diff --git a/Utilities/Release/WiX/patch_desktop_shortcut.xml b/Utilities/Release/WiX/patch_desktop_shortcut.xml new file mode 100644 index 0000000..d30705d --- /dev/null +++ b/Utilities/Release/WiX/patch_desktop_shortcut.xml @@ -0,0 +1,5 @@ + + + DESKTOP_SHORTCUT_REQUESTED = 1 + + diff --git a/Utilities/Release/WiX/patch_path_env.xml b/Utilities/Release/WiX/patch_path_env.xml new file mode 100644 index 0000000..0e335c4 --- /dev/null +++ b/Utilities/Release/WiX/patch_path_env.xml @@ -0,0 +1,26 @@ + + + + + ADD_CMAKE_TO_PATH = "System" + + + + + + + ADD_CMAKE_TO_PATH = "User" + + + + + + + + + + diff --git a/Utilities/Release/cpack_wix_ui_banner.jpg b/Utilities/Release/WiX/ui_banner.jpg similarity index 100% rename from Utilities/Release/cpack_wix_ui_banner.jpg rename to Utilities/Release/WiX/ui_banner.jpg diff --git a/Utilities/Release/cpack_wix_ui_dialog.jpg b/Utilities/Release/WiX/ui_dialog.jpg similarity index 100% rename from Utilities/Release/cpack_wix_ui_dialog.jpg rename to Utilities/Release/WiX/ui_dialog.jpg ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 17 10:45:30 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 17 Dec 2015 10:45:30 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1763-gf07caa4 Message-ID: <20151217154530.3144EE0473@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via f07caa4874144ecb7701df41bb1c2e7ef754f16d (commit) via ab8a280857da5cf8545bd2a6f69b7378f53449a5 (commit) via e8b148318f1fab26b2289cadc2d0c5e12201169d (commit) via cbbdfc2b6120e192b4248ce89af93cf34ea8a254 (commit) from deef02dd4b919d85f636eecd8dca09500ee322c4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f07caa4874144ecb7701df41bb1c2e7ef754f16d commit f07caa4874144ecb7701df41bb1c2e7ef754f16d Merge: deef02d ab8a280 Author: Brad King AuthorDate: Thu Dec 17 10:45:28 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 17 10:45:28 2015 -0500 Merge topic 'CMakeParseArguments-native-impl' into next ab8a2808 cmake_parse_arguments: consider duplicate keyword as warning e8b14831 CMakeParseArguments: replace by native cmake_parse_arguments command cbbdfc2b CMakeParseArguments: add a RunCMake test suite https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ab8a280857da5cf8545bd2a6f69b7378f53449a5 commit ab8a280857da5cf8545bd2a6f69b7378f53449a5 Author: Matthias Maennich AuthorDate: Sat Dec 5 19:02:19 2015 +0100 Commit: Brad King CommitDate: Thu Dec 17 10:45:19 2015 -0500 cmake_parse_arguments: consider duplicate keyword as warning The behaviour of double specified keywords is rather undefined or at least not clearly documented. This change introduces a strict check and emits a warning in case a keyword has been specified more than once. diff --git a/Help/command/cmake_parse_arguments.rst b/Help/command/cmake_parse_arguments.rst index 7638b61..6206611 100644 --- a/Help/command/cmake_parse_arguments.rst +++ b/Help/command/cmake_parse_arguments.rst @@ -25,6 +25,13 @@ The ```` argument contains all keywords for this macro which can be followed by more than one value, like e.g. the ``TARGETS`` or ``FILES`` keywords of the :command:`install` command. +.. note:: + + All keywords shall be unique. I.e. every keyword shall only be specified + once in either ````, ```` or + ````. A warning will be emitted if uniqueness is + violated. + When done, ``cmake_parse_arguments`` will have defined for each of the keywords listed in ````, ```` and ```` a variable composed of the given ```` diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index ce7a7b3..a861965 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -43,6 +43,10 @@ bool cmParseArgumentsCommand // anything else is put into a vector of unparsed strings std::vector unparsed; + // remember already defined keywords + std::set used_keywords; + const std::string dup_warning = "keyword defined more than once: "; + // the second argument is a (cmake) list of options without argument std::vector list; cmSystemTools::ExpandListArgument(*argIter++, list); @@ -50,6 +54,10 @@ bool cmParseArgumentsCommand end = list.end(); iter != end; ++iter) { + if (!used_keywords.insert(*iter).second) + { + this->GetMakefile()->IssueMessage(cmake::WARNING, dup_warning + *iter); + } options[*iter]; // default initialize } @@ -60,6 +68,10 @@ bool cmParseArgumentsCommand end = list.end(); iter != end; ++iter) { + if (!used_keywords.insert(*iter).second) + { + this->GetMakefile()->IssueMessage(cmake::WARNING, dup_warning + *iter); + } single[*iter]; // default initialize } @@ -70,6 +82,10 @@ bool cmParseArgumentsCommand end = list.end(); iter != end; ++iter) { + if (!used_keywords.insert(*iter).second) + { + this->GetMakefile()->IssueMessage(cmake::WARNING, dup_warning + *iter); + } multi[*iter]; // default initialize } diff --git a/Tests/RunCMake/cmake_parse_arguments/Errors-stderr.txt b/Tests/RunCMake/cmake_parse_arguments/Errors-stderr.txt index 5394eaf..f2ba9b8 100644 --- a/Tests/RunCMake/cmake_parse_arguments/Errors-stderr.txt +++ b/Tests/RunCMake/cmake_parse_arguments/Errors-stderr.txt @@ -1,14 +1,44 @@ -CMake Error at Errors\.cmake:1 \(cmake_parse_arguments\): +CMake Error at Errors\.cmake:2 \(cmake_parse_arguments\): cmake_parse_arguments must be called with at least 4 arguments\. Call Stack \(most recent call first\): CMakeLists\.txt:3 \(include\) + -CMake Error at Errors\.cmake:2 \(cmake_parse_arguments\): +CMake Error at Errors\.cmake:3 \(cmake_parse_arguments\): cmake_parse_arguments must be called with at least 4 arguments\. Call Stack \(most recent call first\): CMakeLists\.txt:3 \(include\) + -CMake Error at Errors\.cmake:3 \(cmake_parse_arguments\): +CMake Error at Errors\.cmake:4 \(cmake_parse_arguments\): cmake_parse_arguments must be called with at least 4 arguments\. Call Stack \(most recent call first\): CMakeLists\.txt:3 \(include\) ++ +CMake Warning at Errors\.cmake:8 \(cmake_parse_arguments\): + keyword defined more than once: OPT +Call Stack \(most recent call first\): + CMakeLists\.txt:3 \(include\) ++ +CMake Warning at Errors\.cmake:9 \(cmake_parse_arguments\): + keyword defined more than once: OPT +Call Stack \(most recent call first\): + CMakeLists\.txt:3 \(include\) ++ +CMake Warning at Errors\.cmake:10 \(cmake_parse_arguments\): + keyword defined more than once: OPT +Call Stack \(most recent call first\): + CMakeLists\.txt:3 \(include\) ++ +CMake Warning at Errors\.cmake:12 \(cmake_parse_arguments\): + keyword defined more than once: OPT +Call Stack \(most recent call first\): + CMakeLists\.txt:3 \(include\) ++ +CMake Warning at Errors\.cmake:13 \(cmake_parse_arguments\): + keyword defined more than once: OPT +Call Stack \(most recent call first\): + CMakeLists\.txt:3 \(include\) ++ +CMake Warning at Errors\.cmake:14 \(cmake_parse_arguments\): + keyword defined more than once: OPT +Call Stack \(most recent call first\): + CMakeLists\.txt:3 \(include\) diff --git a/Tests/RunCMake/cmake_parse_arguments/Errors.cmake b/Tests/RunCMake/cmake_parse_arguments/Errors.cmake index 98e22e9..6a38081 100644 --- a/Tests/RunCMake/cmake_parse_arguments/Errors.cmake +++ b/Tests/RunCMake/cmake_parse_arguments/Errors.cmake @@ -1,4 +1,14 @@ +# wrong argument count cmake_parse_arguments() cmake_parse_arguments(prefix OPT) cmake_parse_arguments(prefix OPT SINGLE) cmake_parse_arguments(prefix OPT SINGLE MULTI) # not an error + +# duplicate keywords +cmake_parse_arguments(prefix "OPT;OPT" "" "") +cmake_parse_arguments(prefix "" "OPT;OPT" "") +cmake_parse_arguments(prefix "" "" "OPT;OPT") + +cmake_parse_arguments(prefix "OPT" "OPT" "") +cmake_parse_arguments(prefix "" "OPT" "OPT") +cmake_parse_arguments(prefix "OPT" "" "OPT") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8b148318f1fab26b2289cadc2d0c5e12201169d commit e8b148318f1fab26b2289cadc2d0c5e12201169d Author: Matthias Maennich AuthorDate: Sat Dec 5 19:01:12 2015 +0100 Commit: Brad King CommitDate: Thu Dec 17 10:44:28 2015 -0500 CMakeParseArguments: replace by native cmake_parse_arguments command Implement a native `cmake_parse_arguments` command that is fully compatible with the documented behaviour of the previous implementation. Leave the CMakeParseArguments module empty but existing for compatibility. diff --git a/Help/command/cmake_parse_arguments.rst b/Help/command/cmake_parse_arguments.rst new file mode 100644 index 0000000..7638b61 --- /dev/null +++ b/Help/command/cmake_parse_arguments.rst @@ -0,0 +1,78 @@ +cmake_parse_arguments +--------------------- + +``cmake_parse_arguments`` is intended to be used in macros or functions for +parsing the arguments given to that macro or function. It processes the +arguments and defines a set of variables which hold the values of the +respective options. + +:: + + cmake_parse_arguments( + args...) + + +The ```` argument contains all options for the respective macro, +i.e. keywords which can be used when calling the macro without any value +following, like e.g. the ``OPTIONAL`` keyword of the :command:`install` +command. + +The ```` argument contains all keywords for this macro +which are followed by one value, like e.g. ``DESTINATION`` keyword of the +:command:`install` command. + +The ```` argument contains all keywords for this +macro which can be followed by more than one value, like e.g. the +``TARGETS`` or ``FILES`` keywords of the :command:`install` command. + +When done, ``cmake_parse_arguments`` will have defined for each of the +keywords listed in ````, ```` and +```` a variable composed of the given ```` +followed by ``"_"`` and the name of the respective keyword. These +variables will then hold the respective value from the argument list. +For the ```` keywords this will be ``TRUE`` or ``FALSE``. + +All remaining arguments are collected in a variable +``_UNPARSED_ARGUMENTS``, this can be checked afterwards to see +whether your macro was called with unrecognized parameters. + +As an example here a ``my_install()`` macro, which takes similar arguments +as the real :command:`install` command: + +.. code-block:: cmake + + function(MY_INSTALL) + set(options OPTIONAL FAST) + set(oneValueArgs DESTINATION RENAME) + set(multiValueArgs TARGETS CONFIGURATIONS) + cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" + "${multiValueArgs}" ${ARGN} ) + + # ... + +Assume ``my_install()`` has been called like this: + +.. code-block:: cmake + + my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub) + +After the ``cmake_parse_arguments`` call the macro will have set the +following variables:: + + MY_INSTALL_OPTIONAL = TRUE + MY_INSTALL_FAST = FALSE (was not used in call to my_install) + MY_INSTALL_DESTINATION = "bin" + MY_INSTALL_RENAME = "" (was not used) + MY_INSTALL_TARGETS = "foo;bar" + MY_INSTALL_CONFIGURATIONS = "" (was not used) + MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (nothing expected after "OPTIONAL") + +You can then continue and process these variables. + +Keywords terminate lists of values, e.g. if directly after a +one_value_keyword another recognized keyword follows, this is +interpreted as the beginning of the new option. E.g. +``my_install(TARGETS foo DESTINATION OPTIONAL)`` would result in +``MY_INSTALL_DESTINATION`` set to ``"OPTIONAL"``, but as ``OPTIONAL`` +is a keyword itself ``MY_INSTALL_DESTINATION`` will be empty and +``MY_INSTALL_OPTIONAL`` will therefore be set to ``TRUE``. diff --git a/Help/manual/cmake-commands.7.rst b/Help/manual/cmake-commands.7.rst index 5b92b51..d0c2986 100644 --- a/Help/manual/cmake-commands.7.rst +++ b/Help/manual/cmake-commands.7.rst @@ -29,6 +29,7 @@ These commands may be used freely in CMake projects. /command/build_command /command/cmake_host_system_information /command/cmake_minimum_required + /command/cmake_parse_arguments /command/cmake_policy /command/configure_file /command/continue diff --git a/Help/release/dev/CMakeParseArguments-native-impl.rst b/Help/release/dev/CMakeParseArguments-native-impl.rst new file mode 100644 index 0000000..114a099 --- /dev/null +++ b/Help/release/dev/CMakeParseArguments-native-impl.rst @@ -0,0 +1,6 @@ +CMakeParseArguments-native-impl +------------------------------- + +* The :command:`cmake_parse_arguments` command is now implemented natively. + The :module:`CMakeParseArguments` module remains as an empty placeholder + for compatibility. diff --git a/Modules/CMakeParseArguments.cmake b/Modules/CMakeParseArguments.cmake index 8553f38..fc64ab9 100644 --- a/Modules/CMakeParseArguments.cmake +++ b/Modules/CMakeParseArguments.cmake @@ -2,86 +2,10 @@ # CMakeParseArguments # ------------------- # -# -# -# CMAKE_PARSE_ARGUMENTS( -# args...) -# -# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions -# for parsing the arguments given to that macro or function. It -# processes the arguments and defines a set of variables which hold the -# values of the respective options. -# -# The argument contains all options for the respective macro, -# i.e. keywords which can be used when calling the macro without any -# value following, like e.g. the OPTIONAL keyword of the install() -# command. -# -# The argument contains all keywords for this macro -# which are followed by one value, like e.g. DESTINATION keyword of the -# install() command. -# -# The argument contains all keywords for this -# macro which can be followed by more than one value, like e.g. the -# TARGETS or FILES keywords of the install() command. -# -# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the -# keywords listed in , and -# a variable composed of the given -# followed by "_" and the name of the respective keyword. These -# variables will then hold the respective value from the argument list. -# For the keywords this will be TRUE or FALSE. -# -# All remaining arguments are collected in a variable -# _UNPARSED_ARGUMENTS, this can be checked afterwards to see -# whether your macro was called with unrecognized parameters. -# -# As an example here a my_install() macro, which takes similar arguments -# as the real install() command: -# -# :: -# -# function(MY_INSTALL) -# set(options OPTIONAL FAST) -# set(oneValueArgs DESTINATION RENAME) -# set(multiValueArgs TARGETS CONFIGURATIONS) -# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" -# "${multiValueArgs}" ${ARGN} ) -# ... -# -# -# -# Assume my_install() has been called like this: -# -# :: -# -# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub) -# -# -# -# After the cmake_parse_arguments() call the macro will have set the -# following variables: -# -# :: -# -# MY_INSTALL_OPTIONAL = TRUE -# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install() -# MY_INSTALL_DESTINATION = "bin" -# MY_INSTALL_RENAME = "" (was not used) -# MY_INSTALL_TARGETS = "foo;bar" -# MY_INSTALL_CONFIGURATIONS = "" (was not used) -# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL" -# -# -# -# You can then continue and process these variables. -# -# Keywords terminate lists of values, e.g. if directly after a -# one_value_keyword another recognized keyword follows, this is -# interpreted as the beginning of the new option. E.g. -# my_install(TARGETS foo DESTINATION OPTIONAL) would result in -# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION -# would be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor. +# This module once implemented the :command:`cmake_parse_arguments` command +# that is now implemented natively by CMake. It is now an empty placeholder +# for compatibility with projects that include it to get the command from +# CMake 3.4 and lower. #============================================================================= # Copyright 2010 Alexander Neundorf @@ -95,67 +19,3 @@ #============================================================================= # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) - - -if(__CMAKE_PARSE_ARGUMENTS_INCLUDED) - return() -endif() -set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE) - - -function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames) - # first set all result variables to empty/FALSE - foreach(arg_name ${_singleArgNames} ${_multiArgNames}) - set(${prefix}_${arg_name}) - endforeach() - - foreach(option ${_optionNames}) - set(${prefix}_${option} FALSE) - endforeach() - - set(${prefix}_UNPARSED_ARGUMENTS) - - set(insideValues FALSE) - set(currentArgName) - - # now iterate over all arguments and fill the result variables - foreach(currentArg ${ARGN}) - list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword - list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword - list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword - - if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1) - if(insideValues) - if("${insideValues}" STREQUAL "SINGLE") - set(${prefix}_${currentArgName} ${currentArg}) - set(insideValues FALSE) - elseif("${insideValues}" STREQUAL "MULTI") - list(APPEND ${prefix}_${currentArgName} ${currentArg}) - endif() - else() - list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg}) - endif() - else() - if(NOT ${optionIndex} EQUAL -1) - set(${prefix}_${currentArg} TRUE) - set(insideValues FALSE) - elseif(NOT ${singleArgIndex} EQUAL -1) - set(currentArgName ${currentArg}) - set(${prefix}_${currentArgName}) - set(insideValues "SINGLE") - elseif(NOT ${multiArgIndex} EQUAL -1) - set(currentArgName ${currentArg}) - set(${prefix}_${currentArgName}) - set(insideValues "MULTI") - endif() - endif() - - endforeach() - - # propagate the result variables to the caller: - foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames}) - set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE) - endforeach() - set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE) - -endfunction() diff --git a/Source/cmBootstrapCommands1.cxx b/Source/cmBootstrapCommands1.cxx index 1184514..0782b3b 100644 --- a/Source/cmBootstrapCommands1.cxx +++ b/Source/cmBootstrapCommands1.cxx @@ -54,6 +54,7 @@ #include "cmFunctionCommand.cxx" #include "cmPathLabel.cxx" #include "cmSearchPath.cxx" +#include "cmParseArgumentsCommand.cxx" void GetBootstrapCommands1(std::vector& commands) { @@ -91,4 +92,5 @@ void GetBootstrapCommands1(std::vector& commands) commands.push_back(new cmFindProgramCommand); commands.push_back(new cmForEachCommand); commands.push_back(new cmFunctionCommand); + commands.push_back(new cmParseArgumentsCommand); } diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx new file mode 100644 index 0000000..ce7a7b3 --- /dev/null +++ b/Source/cmParseArgumentsCommand.cxx @@ -0,0 +1,176 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2015 Matthias Maennich + Copyright 2010 Alexander Neundorf + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#include "cmParseArgumentsCommand.h" +#include "cmAlgorithms.h" + +//---------------------------------------------------------------------------- +bool cmParseArgumentsCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + // cmake_parse_arguments(prefix options single multi ) + // 1 2 3 4 + if (args.size() < 4) + { + this->SetError("must be called with at least 4 arguments."); + return false; + } + + std::vector::const_iterator argIter = args.begin(), + argEnd = args.end(); + // the first argument is the prefix + const std::string prefix = (*argIter++) + "_"; + + // define the result maps holding key/value pairs for + // options, single values and multi values + typedef std::map options_map; + typedef std::map single_map; + typedef std::map > multi_map; + options_map options; + single_map single; + multi_map multi; + + // anything else is put into a vector of unparsed strings + std::vector unparsed; + + // the second argument is a (cmake) list of options without argument + std::vector list; + cmSystemTools::ExpandListArgument(*argIter++, list); + for (std::vector::const_iterator iter = list.begin(), + end = list.end(); + iter != end; ++iter) + { + options[*iter]; // default initialize + } + + // the third argument is a (cmake) list of single argument options + list.clear(); + cmSystemTools::ExpandListArgument(*argIter++, list); + for (std::vector::const_iterator iter = list.begin(), + end = list.end(); + iter != end; ++iter) + { + single[*iter]; // default initialize + } + + // the fourth argument is a (cmake) list of multi argument options + list.clear(); + cmSystemTools::ExpandListArgument(*argIter++, list); + for (std::vector::const_iterator iter = list.begin(), + end = list.end(); + iter != end; ++iter) + { + multi[*iter]; // default initialize + } + + enum insideValues + { + NONE, + SINGLE, + MULTI + } insideValues = NONE; + std::string currentArgName; + + // now iterate over the remaining arguments + // and fill in the values where applicable + for(; argIter != argEnd; ++argIter) + { + const options_map::iterator optIter = options.find(*argIter); + if (optIter != options.end()) + { + insideValues = NONE; + optIter->second = true; + continue; + } + + const single_map::iterator singleIter = single.find(*argIter); + if (singleIter != single.end()) + { + insideValues = SINGLE; + currentArgName = *argIter; + continue; + } + + const multi_map::iterator multiIter = multi.find(*argIter); + if (multiIter != multi.end()) + { + insideValues = MULTI; + currentArgName = *argIter; + continue; + } + + switch(insideValues) + { + case SINGLE: + single[currentArgName] = *argIter; + insideValues = NONE; + break; + case MULTI: + multi[currentArgName].push_back(*argIter); + break; + default: + unparsed.push_back(*argIter); + break; + } + } + + // now iterate over the collected values and update their definition + // within the current scope. undefine if necessary. + + for (options_map::const_iterator iter = options.begin(), end = options.end(); + iter != end; ++iter) + { + this->Makefile->AddDefinition(prefix + iter->first, + iter->second? "TRUE": "FALSE"); + } + for (single_map::const_iterator iter = single.begin(), end = single.end(); + iter != end; ++iter) + { + if (!iter->second.empty()) + { + this->Makefile->AddDefinition(prefix + iter->first, + iter->second.c_str()); + } + else + { + this->Makefile->RemoveDefinition(prefix + iter->first); + } + } + + for (multi_map::const_iterator iter = multi.begin(), end = multi.end(); + iter != end; ++iter) + { + if (!iter->second.empty()) + { + this->Makefile->AddDefinition(prefix + iter->first, + cmJoin(cmMakeRange(iter->second), ";") + .c_str()); + } + else + { + this->Makefile->RemoveDefinition(prefix + iter->first); + } + } + + if (!unparsed.empty()) + { + this->Makefile->AddDefinition(prefix + "UNPARSED_ARGUMENTS", + cmJoin(cmMakeRange(unparsed), ";").c_str()); + } + else + { + this->Makefile->RemoveDefinition(prefix + "UNPARSED_ARGUMENTS"); + } + + return true; +} diff --git a/Source/cmParseArgumentsCommand.h b/Source/cmParseArgumentsCommand.h new file mode 100644 index 0000000..7fbf642 --- /dev/null +++ b/Source/cmParseArgumentsCommand.h @@ -0,0 +1,54 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2015 Matthias Maennich + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#ifndef cmParseArgumentsCommand_h +#define cmParseArgumentsCommand_h + +#include "cmCommand.h" + +/** \class cmParseArgumentsCommand + * + */ +class cmParseArgumentsCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmParseArgumentsCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() const { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual std::string GetName() const { return "cmake_parse_arguments";} + + cmTypeMacro(cmParseArgumentsCommand, cmCommand); + +}; + + +#endif diff --git a/Tests/RunCMake/cmake_parse_arguments/CornerCases.cmake b/Tests/RunCMake/cmake_parse_arguments/CornerCases.cmake index 7337b71..9a727dd 100644 --- a/Tests/RunCMake/cmake_parse_arguments/CornerCases.cmake +++ b/Tests/RunCMake/cmake_parse_arguments/CornerCases.cmake @@ -1,5 +1,4 @@ include(${CMAKE_CURRENT_LIST_DIR}/test_utils.cmake) -include(CMakeParseArguments) # example from the documentation # OPTIONAL is a keyword and therefore terminates the definition of diff --git a/Tests/RunCMake/cmake_parse_arguments/Errors-stderr.txt b/Tests/RunCMake/cmake_parse_arguments/Errors-stderr.txt index 5976fdc..5394eaf 100644 --- a/Tests/RunCMake/cmake_parse_arguments/Errors-stderr.txt +++ b/Tests/RunCMake/cmake_parse_arguments/Errors-stderr.txt @@ -1,17 +1,14 @@ -CMake Error at Errors.cmake:3 \(cmake_parse_arguments\): - CMAKE_PARSE_ARGUMENTS Function invoked with incorrect arguments for - function named: CMAKE_PARSE_ARGUMENTS +CMake Error at Errors\.cmake:1 \(cmake_parse_arguments\): + cmake_parse_arguments must be called with at least 4 arguments\. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:3 \(include\) + -CMake Error at Errors.cmake:4 \(cmake_parse_arguments\): - CMAKE_PARSE_ARGUMENTS Function invoked with incorrect arguments for - function named: CMAKE_PARSE_ARGUMENTS +CMake Error at Errors\.cmake:2 \(cmake_parse_arguments\): + cmake_parse_arguments must be called with at least 4 arguments\. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:3 \(include\) + -CMake Error at Errors.cmake:5 \(cmake_parse_arguments\): - CMAKE_PARSE_ARGUMENTS Function invoked with incorrect arguments for - function named: CMAKE_PARSE_ARGUMENTS +CMake Error at Errors\.cmake:3 \(cmake_parse_arguments\): + cmake_parse_arguments must be called with at least 4 arguments\. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:3 \(include\) diff --git a/Tests/RunCMake/cmake_parse_arguments/Errors.cmake b/Tests/RunCMake/cmake_parse_arguments/Errors.cmake index 2db3bb1..98e22e9 100644 --- a/Tests/RunCMake/cmake_parse_arguments/Errors.cmake +++ b/Tests/RunCMake/cmake_parse_arguments/Errors.cmake @@ -1,5 +1,3 @@ -include(CMakeParseArguments) - cmake_parse_arguments() cmake_parse_arguments(prefix OPT) cmake_parse_arguments(prefix OPT SINGLE) diff --git a/Tests/RunCMake/cmake_parse_arguments/Initialization.cmake b/Tests/RunCMake/cmake_parse_arguments/Initialization.cmake index 8729bc6..462f923 100644 --- a/Tests/RunCMake/cmake_parse_arguments/Initialization.cmake +++ b/Tests/RunCMake/cmake_parse_arguments/Initialization.cmake @@ -1,5 +1,4 @@ include(${CMAKE_CURRENT_LIST_DIR}/test_utils.cmake) -include(CMakeParseArguments) # unparsed arguments cmake_parse_arguments(pref "" "" "") diff --git a/Tests/RunCMake/cmake_parse_arguments/Mix.cmake b/Tests/RunCMake/cmake_parse_arguments/Mix.cmake index c14fdfd..b3eff39 100644 --- a/Tests/RunCMake/cmake_parse_arguments/Mix.cmake +++ b/Tests/RunCMake/cmake_parse_arguments/Mix.cmake @@ -1,5 +1,4 @@ include(${CMAKE_CURRENT_LIST_DIR}/test_utils.cmake) -include(CMakeParseArguments) # specify two keywords for each category and set the first keyword of each # within ARGN https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbbdfc2b6120e192b4248ce89af93cf34ea8a254 commit cbbdfc2b6120e192b4248ce89af93cf34ea8a254 Author: Matthias Maennich AuthorDate: Sat Dec 5 18:57:41 2015 +0100 Commit: Brad King CommitDate: Thu Dec 17 10:31:04 2015 -0500 CMakeParseArguments: add a RunCMake test suite diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index a6cbf86..0a388c5 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -177,6 +177,7 @@ add_RunCMake_test(build_command) add_RunCMake_test(execute_process) add_RunCMake_test(export) add_RunCMake_test(cmake_minimum_required) +add_RunCMake_test(cmake_parse_arguments) add_RunCMake_test(continue) add_RunCMake_test(ctest_build) add_RunCMake_test(ctest_configure) diff --git a/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt b/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt new file mode 100644 index 0000000..6dd8cdf --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.4) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/cmake_parse_arguments/CornerCases.cmake b/Tests/RunCMake/cmake_parse_arguments/CornerCases.cmake new file mode 100644 index 0000000..7337b71 --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/CornerCases.cmake @@ -0,0 +1,16 @@ +include(${CMAKE_CURRENT_LIST_DIR}/test_utils.cmake) +include(CMakeParseArguments) + +# example from the documentation +# OPTIONAL is a keyword and therefore terminates the definition of +# the multi-value DEFINITION before even a single value has been added + +set(options OPTIONAL FAST) +set(oneValueArgs DESTINATION RENAME) +set(multiValueArgs TARGETS CONFIGURATIONS) +cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" + "${multiValueArgs}" + TARGETS foo DESTINATION OPTIONAL) + +TEST(MY_INSTALL_DESTINATION UNDEFINED) +TEST(MY_INSTALL_OPTIONAL TRUE) diff --git a/Tests/RunCMake/cmake_parse_arguments/Errors-result.txt b/Tests/RunCMake/cmake_parse_arguments/Errors-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/Errors-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_parse_arguments/Errors-stderr.txt b/Tests/RunCMake/cmake_parse_arguments/Errors-stderr.txt new file mode 100644 index 0000000..5976fdc --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/Errors-stderr.txt @@ -0,0 +1,17 @@ +CMake Error at Errors.cmake:3 \(cmake_parse_arguments\): + CMAKE_PARSE_ARGUMENTS Function invoked with incorrect arguments for + function named: CMAKE_PARSE_ARGUMENTS +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Error at Errors.cmake:4 \(cmake_parse_arguments\): + CMAKE_PARSE_ARGUMENTS Function invoked with incorrect arguments for + function named: CMAKE_PARSE_ARGUMENTS +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Error at Errors.cmake:5 \(cmake_parse_arguments\): + CMAKE_PARSE_ARGUMENTS Function invoked with incorrect arguments for + function named: CMAKE_PARSE_ARGUMENTS +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/cmake_parse_arguments/Errors.cmake b/Tests/RunCMake/cmake_parse_arguments/Errors.cmake new file mode 100644 index 0000000..2db3bb1 --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/Errors.cmake @@ -0,0 +1,6 @@ +include(CMakeParseArguments) + +cmake_parse_arguments() +cmake_parse_arguments(prefix OPT) +cmake_parse_arguments(prefix OPT SINGLE) +cmake_parse_arguments(prefix OPT SINGLE MULTI) # not an error diff --git a/Tests/RunCMake/cmake_parse_arguments/Initialization.cmake b/Tests/RunCMake/cmake_parse_arguments/Initialization.cmake new file mode 100644 index 0000000..8729bc6 --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/Initialization.cmake @@ -0,0 +1,69 @@ +include(${CMAKE_CURRENT_LIST_DIR}/test_utils.cmake) +include(CMakeParseArguments) + +# unparsed arguments +cmake_parse_arguments(pref "" "" "") +TEST(pref_UNPARSED_ARGUMENTS UNDEFINED) + +cmake_parse_arguments(pref "" "" "" FOO) +TEST(pref_UNPARSED_ARGUMENTS "FOO") +cmake_parse_arguments(pref "" "" "" FOO BAR) +TEST(pref_UNPARSED_ARGUMENTS "FOO;BAR") +cmake_parse_arguments(pref "" "" "") +TEST(pref_UNPARSED_ARGUMENTS UNDEFINED) + + +# options +cmake_parse_arguments(pref "OPT1" "" "") +TEST(pref_OPT1 FALSE) + +cmake_parse_arguments(pref "OPT1;OPT2" "" "") +TEST(pref_OPT1 FALSE) +TEST(pref_OPT2 FALSE) + +cmake_parse_arguments(pref "OPT1" "" "" OPT1) +TEST(pref_OPT1 TRUE) +cmake_parse_arguments(pref "OPT1;OPT2" "" "" OPT1 OPT2) +TEST(pref_OPT1 TRUE) +TEST(pref_OPT2 TRUE) +cmake_parse_arguments(pref "OPT1;OPT2" "" "") +TEST(pref_OPT1 FALSE) +TEST(pref_OPT2 FALSE) + + +# single arguments +cmake_parse_arguments(pref "" "SINGLE1" "") +TEST(pref_SINGLE1 UNDEFINED) + +cmake_parse_arguments(pref "" "SINGLE1;SINGLE2" "") +TEST(pref_SINGLE1 UNDEFINED) +TEST(pref_SINGLE2 UNDEFINED) + + +cmake_parse_arguments(pref "" "SINGLE1" "" SINGLE1 foo) +TEST(pref_SINGLE1 foo) +cmake_parse_arguments(pref "" "SINGLE1;SINGLE2" "" SINGLE1 foo SINGLE2 bar) +TEST(pref_SINGLE1 foo) +TEST(pref_SINGLE2 bar) +cmake_parse_arguments(pref "" "SINGLE1;SINGLE2" "") +TEST(pref_SINGLE1 UNDEFINED) +TEST(pref_SINGLE2 UNDEFINED) + + +# multi arguments + +cmake_parse_arguments(pref "" "" "MULTI1") +TEST(pref_MULTI1 UNDEFINED) + +cmake_parse_arguments(pref "" "" "MULTI1;MULTI2") +TEST(pref_MULTI1 UNDEFINED) +TEST(pref_MULTI2 UNDEFINED) + +cmake_parse_arguments(pref "" "" "MULTI1" MULTI1 foo) +TEST(pref_MULTI1 foo) +cmake_parse_arguments(pref "" "" "MULTI1;MULTI2" MULTI1 foo bar MULTI2 bar foo) +TEST(pref_MULTI1 foo bar) +TEST(pref_MULTI2 bar foo) +cmake_parse_arguments(pref "" "" "MULTI1;MULTI2") +TEST(pref_MULTI1 UNDEFINED) +TEST(pref_MULTI2 UNDEFINED) diff --git a/Tests/RunCMake/cmake_parse_arguments/Mix.cmake b/Tests/RunCMake/cmake_parse_arguments/Mix.cmake new file mode 100644 index 0000000..c14fdfd --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/Mix.cmake @@ -0,0 +1,25 @@ +include(${CMAKE_CURRENT_LIST_DIR}/test_utils.cmake) +include(CMakeParseArguments) + +# specify two keywords for each category and set the first keyword of each +# within ARGN +cmake_parse_arguments(pref "OPT1;OPT2" "SINGLE1;SINGLE2" "MULTI1;MULTI2" + OPT1 SINGLE1 foo MULTI1 bar foo bar) +TEST(pref_OPT1 TRUE) +TEST(pref_OPT2 FALSE) +TEST(pref_SINGLE1 foo) +TEST(pref_SINGLE2 UNDEFINED) +TEST(pref_MULTI1 bar foo bar) +TEST(pref_MULTI2 UNDEFINED) +TEST(pref_UNPARSED_ARGUMENTS UNDEFINED) + +# same as above but reversed ARGN +cmake_parse_arguments(pref "OPT1;OPT2" "SINGLE1;SINGLE2" "MULTI1;MULTI2" + MULTI1 bar foo bar SINGLE1 foo OPT1) +TEST(pref_OPT1 TRUE) +TEST(pref_OPT2 FALSE) +TEST(pref_SINGLE1 foo) +TEST(pref_SINGLE2 UNDEFINED) +TEST(pref_MULTI1 bar foo bar) +TEST(pref_MULTI2 UNDEFINED) +TEST(pref_UNPARSED_ARGUMENTS UNDEFINED) diff --git a/Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake b/Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake new file mode 100644 index 0000000..b89f1a5 --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake @@ -0,0 +1,7 @@ +include(RunCMake) + +run_cmake(Utils) +run_cmake(Initialization) +run_cmake(Mix) +run_cmake(CornerCases) +run_cmake(Errors) diff --git a/Tests/RunCMake/cmake_parse_arguments/Utils.cmake b/Tests/RunCMake/cmake_parse_arguments/Utils.cmake new file mode 100644 index 0000000..3bbf115 --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/Utils.cmake @@ -0,0 +1,20 @@ +include(${CMAKE_CURRENT_LIST_DIR}/test_utils.cmake) + +# test the TEST macro itself + +TEST(asdf UNDEFINED) + +SET (asdf FALSE) +TEST(asdf FALSE) + +SET (asdf TRUE) +TEST(asdf TRUE) + +SET (asdf TRUE) +TEST(asdf TRUE) + +SET (asdf "some value") +TEST(asdf "some value") + +SET (asdf some list) +TEST(asdf "some;list") diff --git a/Tests/RunCMake/cmake_parse_arguments/test_utils.cmake b/Tests/RunCMake/cmake_parse_arguments/test_utils.cmake new file mode 100644 index 0000000..f5425c2 --- /dev/null +++ b/Tests/RunCMake/cmake_parse_arguments/test_utils.cmake @@ -0,0 +1,20 @@ +macro(TEST variable) + SET(expected "${ARGN}") + if ( "${expected}" STREQUAL "UNDEFINED" ) + if (DEFINED ${variable}) + message(FATAL_ERROR "'${variable}' shall be undefined but has value '${${variable}}'") + endif() + elseif( "${expected}" STREQUAL "FALSE" ) + if (NOT ${variable} STREQUAL "FALSE") + message(FATAL_ERROR "'${variable}' shall be FALSE") + endif() + elseif( "${expected}" STREQUAL "TRUE" ) + if (NOT ${variable} STREQUAL "TRUE") + message(FATAL_ERROR "'${variable}' shall be TRUE") + endif() + else() + if (NOT ${variable} STREQUAL "${expected}") + message(FATAL_ERROR "'${variable}' shall be '${expected}'") + endif() + endif() +endmacro() ----------------------------------------------------------------------- Summary of changes: Help/command/cmake_parse_arguments.rst | 85 +++++++++ Help/manual/cmake-commands.7.rst | 1 + .../dev/CMakeParseArguments-native-impl.rst | 6 + Modules/CMakeParseArguments.cmake | 148 +-------------- Source/cmBootstrapCommands1.cxx | 2 + Source/cmParseArgumentsCommand.cxx | 192 ++++++++++++++++++++ ...riteFileCommand.h => cmParseArgumentsCommand.h} | 19 +- Tests/RunCMake/CMakeLists.txt | 1 + .../CMakeLists.txt | 0 .../cmake_parse_arguments/CornerCases.cmake | 15 ++ .../Errors-result.txt} | 0 .../cmake_parse_arguments/Errors-stderr.txt | 44 +++++ Tests/RunCMake/cmake_parse_arguments/Errors.cmake | 14 ++ .../cmake_parse_arguments/Initialization.cmake | 68 +++++++ Tests/RunCMake/cmake_parse_arguments/Mix.cmake | 24 +++ .../cmake_parse_arguments/RunCMakeTest.cmake | 7 + Tests/RunCMake/cmake_parse_arguments/Utils.cmake | 20 ++ .../cmake_parse_arguments/test_utils.cmake | 20 ++ 18 files changed, 513 insertions(+), 153 deletions(-) create mode 100644 Help/command/cmake_parse_arguments.rst create mode 100644 Help/release/dev/CMakeParseArguments-native-impl.rst create mode 100644 Source/cmParseArgumentsCommand.cxx copy Source/{cmWriteFileCommand.h => cmParseArgumentsCommand.h} (74%) copy Tests/RunCMake/{Framework => cmake_parse_arguments}/CMakeLists.txt (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/CornerCases.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => cmake_parse_arguments/Errors-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/Errors-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/Errors.cmake create mode 100644 Tests/RunCMake/cmake_parse_arguments/Initialization.cmake create mode 100644 Tests/RunCMake/cmake_parse_arguments/Mix.cmake create mode 100644 Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/cmake_parse_arguments/Utils.cmake create mode 100644 Tests/RunCMake/cmake_parse_arguments/test_utils.cmake hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 17 10:56:54 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 17 Dec 2015 10:56:54 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1765-g3ddf434 Message-ID: <20151217155654.72AC2E0A33@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 3ddf434f437c49f4a342796f2a92f28a10465bf6 (commit) via a479d7a0ae1583e0e9471e747393839f1af6a593 (commit) from f07caa4874144ecb7701df41bb1c2e7ef754f16d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3ddf434f437c49f4a342796f2a92f28a10465bf6 commit 3ddf434f437c49f4a342796f2a92f28a10465bf6 Merge: f07caa4 a479d7a Author: Brad King AuthorDate: Thu Dec 17 10:56:53 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 17 10:56:53 2015 -0500 Merge topic 'BundleUtilities-fix-osx-rpath' into next a479d7a0 BundleUtilities: Fix handling of multiple RPATHs from OS X otool https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a479d7a0ae1583e0e9471e747393839f1af6a593 commit a479d7a0ae1583e0e9471e747393839f1af6a593 Author: Emilie Harquel AuthorDate: Wed Dec 16 14:12:56 2015 +0100 Commit: Brad King CommitDate: Thu Dec 17 10:56:27 2015 -0500 BundleUtilities: Fix handling of multiple RPATHs from OS X otool The `otool` command may return multiple RPATH entires, so call `gp_append_unique` for each one. Otherwise we may try to ask `install_name_tool` to deal with the same entry twice. diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index b7975d3..45dda40 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -424,7 +424,9 @@ function(get_item_rpaths item rpaths_var) string(REGEX MATCHALL "rpath [^\n]+" load_cmds_ov "${load_cmds_ov}") string(REGEX REPLACE "rpath " "" load_cmds_ov "${load_cmds_ov}") if(load_cmds_ov) - gp_append_unique(${rpaths_var} "${load_cmds_ov}") + foreach(rpath ${load_cmds_ov}) + gp_append_unique(${rpaths_var} "${rpath}") + endforeach() endif() endif() ----------------------------------------------------------------------- Summary of changes: Modules/BundleUtilities.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 17 14:48:12 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 17 Dec 2015 14:48:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1772-g8df8012 Message-ID: <20151217194812.50BF2E07CF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 8df8012086280e9b9c79cc393fa8cf7b7df398d9 (commit) via 38c31ed5f5e34894febf19c873be83eab4f6ea3c (commit) via ec1398d7aec410da0aa085cf7693d62afa11291d (commit) via c4282347e27badf2f1e8b8b5a17bb01ce3209eea (commit) via f1ee10c15e9c4f7d46962029fbb7a9d312ce878d (commit) via 498c36850ba3e3b04dc2cbcd0baad7e8ee750de7 (commit) via dcca789272057e2cb0aae640836c189873701d68 (commit) from 3ddf434f437c49f4a342796f2a92f28a10465bf6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8df8012086280e9b9c79cc393fa8cf7b7df398d9 commit 8df8012086280e9b9c79cc393fa8cf7b7df398d9 Merge: 3ddf434 38c31ed Author: Brad King AuthorDate: Thu Dec 17 14:48:10 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 17 14:48:10 2015 -0500 Merge topic 'update-kwsys' into next 38c31ed5 Merge branch 'upstream-KWSys' into update-kwsys ec1398d7 KWSys 2015-12-14 (c1149ef6) c4282347 Add script to update KWSys from upstream f1ee10c1 Merge branch 'upstream-KWSys' into update-kwsys 498c3685 Add a script to help update third-party sources dcca7892 KWSys 2015-12-09 (cdcf4c47) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38c31ed5f5e34894febf19c873be83eab4f6ea3c commit 38c31ed5f5e34894febf19c873be83eab4f6ea3c Merge: c428234 ec1398d Author: Brad King AuthorDate: Thu Dec 17 14:46:12 2015 -0500 Commit: Brad King CommitDate: Thu Dec 17 14:46:12 2015 -0500 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2015-12-14 (c1149ef6) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec1398d7aec410da0aa085cf7693d62afa11291d commit ec1398d7aec410da0aa085cf7693d62afa11291d Author: KWSys Upstream AuthorDate: Mon Dec 14 09:36:13 2015 -0500 Commit: Brad King CommitDate: Thu Dec 17 14:46:11 2015 -0500 KWSys 2015-12-14 (c1149ef6) Code extracted from: http://public.kitware.com/KWSys.git at commit c1149ef69956eab13221e05ffb2d9b5e55c2e3ee (master). Upstream Shortlog ----------------- Brad King (1): c1149ef6 Drop the FundamentalType.h component of KWSys diff --git a/CMakeLists.txt b/CMakeLists.txt index b859e79..8b15394 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,7 +118,6 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) SET(KWSYS_USE_System 1) SET(KWSYS_USE_SystemTools 1) SET(KWSYS_USE_CommandLineArguments 1) - SET(KWSYS_USE_FundamentalType 1) SET(KWSYS_USE_Terminal 1) SET(KWSYS_USE_IOStream 1) SET(KWSYS_USE_FStream 1) @@ -374,61 +373,6 @@ IF(KWSYS_CXX_HAS___INT64) ENDIF() ENDIF() -IF(KWSYS_USE_FundamentalType) - # Look for type size helper macros. - KWSYS_PLATFORM_INFO_TEST(C KWSYS_C_TYPE_MACROS - "Checking for C type size macros") - SET(macro_regex ".*INFO:macro\\[([^]]*)\\].*") - FOREACH(info ${KWSYS_C_TYPE_MACROS}) - IF("${info}" MATCHES "${macro_regex}") - STRING(REGEX REPLACE "${macro_regex}" "\\1" macro "${info}") - SET(KWSYS_C_HAS_MACRO_${macro} 1) - ENDIF() - ENDFOREACH() - - # Determine type sizes at preprocessing time if possible, and - # otherwise fall back to a try-compile. - SET(KWSYS_C_TYPE_NAME_CHAR "char") - SET(KWSYS_C_TYPE_NAME_SHORT "short") - SET(KWSYS_C_TYPE_NAME_INT "int") - SET(KWSYS_C_TYPE_NAME_LONG "long") - SET(KWSYS_C_TYPE_NAME_LONG_LONG "long long") - SET(KWSYS_C_TYPE_NAME___INT64 "__int64") - FOREACH(type CHAR SHORT INT LONG LONG_LONG __INT64) - IF(KWSYS_C_HAS_MACRO___SIZEOF_${type}__) - # Use __SIZEOF_${type}__ macro. - SET(KWSYS_SIZEOF_${type} TRUE) - SET(KWSYS_C_CODE_SIZEOF_${type} "#define ${KWSYS_NAMESPACE}_SIZEOF_${type} __SIZEOF_${type}__") - ELSEIF(KWSYS_C_HAS_MACRO___${type}_MAX__) - # Use __${type}_MAX__ macro. - SET(KWSYS_SIZEOF_${type} TRUE) - SET(KWSYS_C_CODE_SIZEOF_${type} "#if __${type}_MAX__ == 0x7f -# define ${KWSYS_NAMESPACE}_SIZEOF_${type} 1 -#elif __${type}_MAX__ == 0x7fff -# define ${KWSYS_NAMESPACE}_SIZEOF_${type} 2 -#elif __${type}_MAX__ == 0x7fffffff -# define ${KWSYS_NAMESPACE}_SIZEOF_${type} 4 -#elif __${type}_MAX__>>32 == 0x7fffffff -# define ${KWSYS_NAMESPACE}_SIZEOF_${type} 8 -#else -# error \"Cannot determine sizeof(${KWSYS_C_TYPE_NAME_${type}}).\" -#endif") - ELSE() - # Configure a hard-coded type size. - CHECK_TYPE_SIZE("${KWSYS_C_TYPE_NAME_${type}}" KWSYS_SIZEOF_${type}) - IF(NOT KWSYS_SIZEOF_${type}) - SET(KWSYS_SIZEOF_${type} 0) - ENDIF() - SET(KWSYS_C_CODE_SIZEOF_${type} - "#define ${KWSYS_NAMESPACE}_SIZEOF_${type} ${KWSYS_SIZEOF_${type}}") - ENDIF() - ENDFOREACH() - - # Check signedness of "char" type. - KWSYS_PLATFORM_CXX_TEST_RUN(KWSYS_CHAR_IS_SIGNED - "Checking whether char is signed" DIRECT) -ENDIF() - IF(KWSYS_USE_Encoding) # Look for type size helper macros. KWSYS_PLATFORM_CXX_TEST(KWSYS_STL_HAS_WSTRING @@ -741,7 +685,7 @@ ENDFOREACH() # Add selected C components. FOREACH(c - Process Base64 Encoding FundamentalType MD5 Terminal System String + Process Base64 Encoding MD5 Terminal System String ) IF(KWSYS_USE_${c}) # Use the corresponding header file. diff --git a/FundamentalType.h.in b/FundamentalType.h.in deleted file mode 100644 index e702a7a..0000000 --- a/FundamentalType.h.in +++ /dev/null @@ -1,139 +0,0 @@ -/*============================================================================ - KWSys - Kitware System Library - Copyright 2000-2009 Kitware, Inc., Insight Software Consortium - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#ifndef @KWSYS_NAMESPACE at _FundamentalType_h -#define @KWSYS_NAMESPACE at _FundamentalType_h - -#include <@KWSYS_NAMESPACE@/Configure.h> - -/* Redefine all public interface symbol names to be in the proper - namespace. These macros are used internally to kwsys only, and are - not visible to user code. Use kwsysHeaderDump.pl to reproduce - these macros after making changes to the interface. */ -#if !defined(KWSYS_NAMESPACE) -# define kwsys_ns(x) @KWSYS_NAMESPACE@##x -# define kwsysEXPORT @KWSYS_NAMESPACE at _EXPORT -#endif - -#if !@KWSYS_NAMESPACE at _NAME_IS_KWSYS -# define kwsysFundamentalType kwsys_ns(FundamentalType) -# define kwsysFundamentalType_Int8 kwsys_ns(FundamentalType_Int8) -# define kwsysFundamentalType_UInt8 kwsys_ns(FundamentalType_UInt8) -# define kwsysFundamentalType_Int16 kwsys_ns(FundamentalType_Int16) -# define kwsysFundamentalType_UInt16 kwsys_ns(FundamentalType_UInt16) -# define kwsysFundamentalType_Int32 kwsys_ns(FundamentalType_Int32) -# define kwsysFundamentalType_UInt32 kwsys_ns(FundamentalType_UInt32) -# define kwsysFundamentalType_Int64 kwsys_ns(FundamentalType_Int64) -# define kwsysFundamentalType_UInt64 kwsys_ns(FundamentalType_UInt64) -#endif - -/* The size of fundamental types. Types that do not exist have size 0. */ - at KWSYS_C_CODE_SIZEOF_CHAR@ - at KWSYS_C_CODE_SIZEOF_SHORT@ - at KWSYS_C_CODE_SIZEOF_INT@ - at KWSYS_C_CODE_SIZEOF_LONG@ - at KWSYS_C_CODE_SIZEOF_LONG_LONG@ - at KWSYS_C_CODE_SIZEOF___INT64@ - -/* Whether types "long long" and "__int64" are enabled. If a type is - enabled then it is a unique fundamental type. */ -#define @KWSYS_NAMESPACE at _USE_LONG_LONG @KWSYS_USE_LONG_LONG@ -#define @KWSYS_NAMESPACE at _USE___INT64 @KWSYS_USE___INT64@ - -/* Whether type "char" is signed (it may be signed or unsigned). */ -#define @KWSYS_NAMESPACE at _CHAR_IS_SIGNED @KWSYS_CHAR_IS_SIGNED@ - -#if defined(__cplusplus) -extern "C" -{ -#endif - -/* Select an 8-bit integer type. */ -#if @KWSYS_NAMESPACE at _SIZEOF_CHAR == 1 -typedef signed char kwsysFundamentalType_Int8; -typedef unsigned char kwsysFundamentalType_UInt8; -#else -# error "No native data type can represent an 8-bit integer." -#endif - -/* Select a 16-bit integer type. */ -#if @KWSYS_NAMESPACE at _SIZEOF_SHORT == 2 -typedef short kwsysFundamentalType_Int16; -typedef unsigned short kwsysFundamentalType_UInt16; -#elif @KWSYS_NAMESPACE at _SIZEOF_INT == 2 -typedef int kwsysFundamentalType_Int16; -typedef unsigned int kwsysFundamentalType_UInt16; -#else -# error "No native data type can represent a 16-bit integer." -#endif - -/* Select a 32-bit integer type. */ -#if @KWSYS_NAMESPACE at _SIZEOF_INT == 4 -typedef int kwsysFundamentalType_Int32; -typedef unsigned int kwsysFundamentalType_UInt32; -#elif @KWSYS_NAMESPACE at _SIZEOF_LONG == 4 -typedef long kwsysFundamentalType_Int32; -typedef unsigned long kwsysFundamentalType_UInt32; -#else -# error "No native data type can represent a 32-bit integer." -#endif - -/* Select a 64-bit integer type. */ -#if @KWSYS_NAMESPACE at _SIZEOF_LONG == 8 -typedef signed long kwsysFundamentalType_Int64; -typedef unsigned long kwsysFundamentalType_UInt64; -#elif @KWSYS_NAMESPACE at _USE_LONG_LONG && @KWSYS_NAMESPACE at _SIZEOF_LONG_LONG == 8 -typedef signed long long kwsysFundamentalType_Int64; -typedef unsigned long long kwsysFundamentalType_UInt64; -#elif @KWSYS_NAMESPACE at _USE___INT64 && @KWSYS_NAMESPACE at _SIZEOF___INT64 == 8 -typedef signed __int64 kwsysFundamentalType_Int64; -typedef unsigned __int64 kwsysFundamentalType_UInt64; -#else -# error "No native data type can represent a 64-bit integer." -#endif - -#if defined(__cplusplus) -} /* extern "C" */ -#endif - -/* If we are building a kwsys .c or .cxx file, let it use these macros. - Otherwise, undefine them to keep the namespace clean. */ -#if !defined(KWSYS_NAMESPACE) -# undef kwsys_ns -# undef kwsysEXPORT -# if !defined(KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE at _NAME_IS_KWSYS -# undef kwsysFundamentalType -# undef kwsysFundamentalType_Int8 -# undef kwsysFundamentalType_UInt8 -# undef kwsysFundamentalType_Int16 -# undef kwsysFundamentalType_UInt16 -# undef kwsysFundamentalType_Int32 -# undef kwsysFundamentalType_UInt32 -# undef kwsysFundamentalType_Int64 -# undef kwsysFundamentalType_UInt64 -# endif -#endif - -/* If building a C or C++ file in kwsys itself, give the source file - access to the configured macros without a configured namespace. */ -#if defined(KWSYS_NAMESPACE) -# define KWSYS_SIZEOF_CHAR @KWSYS_NAMESPACE at _SIZEOF_CHAR -# define KWSYS_SIZEOF_SHORT @KWSYS_NAMESPACE at _SIZEOF_SHORT -# define KWSYS_SIZEOF_INT @KWSYS_NAMESPACE at _SIZEOF_INT -# define KWSYS_SIZEOF_LONG @KWSYS_NAMESPACE at _SIZEOF_LONG -# define KWSYS_SIZEOF_LONG_LONG @KWSYS_NAMESPACE at _SIZEOF_LONG_LONG -# define KWSYS_SIZEOF___INT64 @KWSYS_NAMESPACE at _SIZEOF___INT64 -# define KWSYS_USE_LONG_LONG @KWSYS_NAMESPACE at _USE_LONG_LONG -# define KWSYS_USE___INT64 @KWSYS_NAMESPACE at _USE___INT64 -# define KWSYS_CHAR_IS_SIGNED @KWSYS_NAMESPACE at _CHAR_IS_SIGNED -#endif - -#endif diff --git a/kwsysPlatformTestsCXX.cxx b/kwsysPlatformTestsCXX.cxx index aaa33b8..fc87f91 100644 --- a/kwsysPlatformTestsCXX.cxx +++ b/kwsysPlatformTestsCXX.cxx @@ -130,15 +130,6 @@ int main() } #endif -#ifdef TEST_KWSYS_CHAR_IS_SIGNED -/* Return 0 for char signed and 1 for char unsigned. */ -int main() -{ - unsigned char uc = 255; - return (*reinterpret_cast(&uc) < 0)?0:1; -} -#endif - #ifdef TEST_KWSYS_LFS_WORKS /* Return 0 when LFS is available and 1 otherwise. */ #define _LARGEFILE_SOURCE @@ -326,93 +317,6 @@ int main() } #endif -#ifdef TEST_KWSYS_CXX_TYPE_INFO -/* Collect fundamental type information and save it to a CMake script. */ - -/* Include limits.h to get macros indicating long long and __int64. - Note that certain compilers need special macros to define these - macros in limits.h. */ -#if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS) -# define _MSC_EXTENSIONS -#endif -#if defined(__GNUC__) && __GNUC__ < 3 -# define _GNU_SOURCE -#endif -#include - -#include -#include - -/* Due to shell differences and limitations of ADD_DEFINITIONS the - KWSYS_CXX_TYPE_INFO_FILE macro will sometimes have double quotes - and sometimes not. This macro will make sure the value is treated - as a double-quoted string. */ -#define TO_STRING(x) TO_STRING0(x) -#define TO_STRING0(x) TO_STRING1(x) -#define TO_STRING1(x) #x - -void f() {} - -int main() -{ - /* Construct the output file name. Some preprocessors will add an - extra level of double quotes, so strip them. */ - char fbuf[] = TO_STRING(KWSYS_CXX_TYPE_INFO_FILE); - char* fname = fbuf; - if(fname[0] == '"') - { - ++fname; - int len = static_cast(strlen(fname)); - if(len > 0 && fname[len-1] == '"') - { - fname[len-1] = 0; - } - } - - /* Try to open the output file. */ - if(FILE* fout = fopen(fname, "w")) - { - /* Set the size of standard types. */ - fprintf(fout, "SET(KWSYS_SIZEOF_CHAR %d)\n", static_cast(sizeof(char))); - fprintf(fout, "SET(KWSYS_SIZEOF_SHORT %d)\n", static_cast(sizeof(short))); - fprintf(fout, "SET(KWSYS_SIZEOF_INT %d)\n", static_cast(sizeof(int))); - fprintf(fout, "SET(KWSYS_SIZEOF_LONG %d)\n", static_cast(sizeof(long))); - - /* Set the size of some non-standard but common types. */ - /* Check for a limits.h macro for long long to see if the type exists. */ -#if defined(LLONG_MAX) || defined(LONG_LONG_MAX) || defined(LONGLONG_MAX) - fprintf(fout, "SET(KWSYS_SIZEOF_LONG_LONG %d)\n", static_cast(sizeof(long long))); -#else - fprintf(fout, "SET(KWSYS_SIZEOF_LONG_LONG 0) # No long long available.\n"); -#endif - /* Check for a limits.h macro for __int64 to see if the type exists. */ -#if defined(_I64_MIN) - fprintf(fout, "SET(KWSYS_SIZEOF___INT64 %d)\n", static_cast(sizeof(__int64))); -#else - fprintf(fout, "SET(KWSYS_SIZEOF___INT64 0) # No __int64 available.\n"); -#endif - - /* Set the size of some pointer types. */ - fprintf(fout, "SET(KWSYS_SIZEOF_PDATA %d)\n", static_cast(sizeof(void*))); - fprintf(fout, "SET(KWSYS_SIZEOF_PFUNC %d)\n", static_cast(sizeof(&f))); - - /* Set whether the native type "char" is signed or unsigned. */ - unsigned char uc = 255; - fprintf(fout, "SET(KWSYS_CHAR_IS_SIGNED %d)\n", - (*reinterpret_cast(&uc) < 0)?1:0); - - fclose(fout); - return 0; - } - else - { - fprintf(stderr, "Failed to write fundamental type info to \"%s\".\n", - fname); - return 1; - } -} -#endif - #ifdef TEST_KWSYS_CXX_HAS_BORLAND_ASM int main() { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c4282347e27badf2f1e8b8b5a17bb01ce3209eea commit c4282347e27badf2f1e8b8b5a17bb01ce3209eea Author: Brad King AuthorDate: Thu Dec 17 14:30:36 2015 -0500 Commit: Brad King CommitDate: Thu Dec 17 14:46:09 2015 -0500 Add script to update KWSys from upstream diff --git a/Utilities/Scripts/update-kwsys.bash b/Utilities/Scripts/update-kwsys.bash new file mode 100755 index 0000000..650841f --- /dev/null +++ b/Utilities/Scripts/update-kwsys.bash @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -e +set -x +shopt -s dotglob + +readonly name="KWSys" +readonly ownership="KWSys Upstream " +readonly subtree="Source/kwsys" +readonly repo="http://public.kitware.com/KWSys.git" +readonly tag="master" +readonly shortlog=true +readonly paths=" +" + +extract_source () { + git_archive +} + +export HOOKS_ALLOW_KWSYS=1 + +. "${BASH_SOURCE%/*}/update-third-party.bash" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f1ee10c15e9c4f7d46962029fbb7a9d312ce878d commit f1ee10c15e9c4f7d46962029fbb7a9d312ce878d Merge: 498c368 dcca789 Author: Brad King AuthorDate: Thu Dec 17 14:45:57 2015 -0500 Commit: Brad King CommitDate: Thu Dec 17 14:45:57 2015 -0500 Merge branch 'upstream-KWSys' into update-kwsys https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=498c36850ba3e3b04dc2cbcd0baad7e8ee750de7 commit 498c36850ba3e3b04dc2cbcd0baad7e8ee750de7 Author: Ben Boeckel AuthorDate: Thu Dec 17 14:26:19 2015 -0500 Commit: Brad King CommitDate: Thu Dec 17 14:44:53 2015 -0500 Add a script to help update third-party sources Use the VTK `ThirdParty/update-common.sh` script as of commit 2f24b7b0f60b67a2a28b9aef210f06f904e7a977. Co-Author: Brad King diff --git a/Utilities/Scripts/update-third-party.bash b/Utilities/Scripts/update-third-party.bash new file mode 100644 index 0000000..8925296 --- /dev/null +++ b/Utilities/Scripts/update-third-party.bash @@ -0,0 +1,146 @@ +######################################################################## +# Script for updating third party packages. +# +# This script should be sourced in a project-specific script which sets +# the following variables: +# +# name +# The name of the project. +# ownership +# A git author name/email for the commits. +# subtree +# The location of the thirdparty package within the main source +# tree. +# repo +# The git repository to use as upstream. +# tag +# The tag, branch or commit hash to use for upstream. +# shortlog +# Optional. Set to 'true' to get a shortlog in the commit message. +# +# Additionally, an "extract_source" function must be defined. It will be +# run within the checkout of the project on the requested tag. It should +# should place the desired tree into $extractdir/$name-reduced. This +# directory will be used as the newest commit for the project. +# +# For convenience, the function may use the "git_archive" function which +# does a standard "git archive" extraction using the (optional) "paths" +# variable to only extract a subset of the source tree. +######################################################################## + +######################################################################## +# Utility functions +######################################################################## +git_archive () { + git archive --prefix="$name-reduced/" HEAD -- $paths | \ + tar -C "$extractdir" -x +} + +die () { + echo >&2 "$@" + exit 1 +} + +warn () { + echo >&2 "warning: $@" +} + +readonly regex_date='20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]' +readonly basehash_regex="$name $regex_date ([0-9a-f]*)" +readonly basehash="$( git rev-list --author="$ownership" --grep="$basehash_regex" -n 1 HEAD )" +readonly upstream_old_short="$( git cat-file commit "$basehash" | sed -n '/'"$basehash_regex"'/ {s/.*(//;s/)//;p}' | egrep '^[0-9a-f]+$' )" + +######################################################################## +# Sanity checking +######################################################################## +[ -n "$name" ] || \ + die "'name' is empty" +[ -n "$ownership" ] || \ + die "'ownership' is empty" +[ -n "$subtree" ] || \ + die "'subtree' is empty" +[ -n "$repo" ] || \ + die "'repo' is empty" +[ -n "$tag" ] || \ + die "'tag' is empty" +[ -n "$basehash" ] || \ + warn "'basehash' is empty; performing initial import" +readonly do_shortlog="${shortlog-false}" + +readonly workdir="$PWD/work" +readonly upstreamdir="$workdir/upstream" +readonly extractdir="$workdir/extract" + +[ -d "$workdir" ] && \ + die "error: workdir '$workdir' already exists" + +trap "rm -rf '$workdir'" EXIT + +# Get upstream +git clone "$repo" "$upstreamdir" + +if [ -n "$basehash" ]; then + # Use the existing package's history + git worktree add "$extractdir" "$basehash" + # Clear out the working tree + pushd "$extractdir" + git ls-files | xargs rm -v + popd +else + # Create a repo to hold this package's history + mkdir -p "$extractdir" + git -C "$extractdir" init +fi + +# Extract the subset of upstream we care about +pushd "$upstreamdir" +git checkout "$tag" +readonly upstream_hash="$( git rev-parse HEAD )" +readonly upstream_hash_short="$( git rev-parse --short=8 "$upstream_hash" )" +readonly upstream_datetime="$( git rev-list "$upstream_hash" --format='%ci' -n 1 | grep -e "^$regex_date" )" +readonly upstream_date="$( echo "$upstream_datetime" | grep -o -e "$regex_date" )" +if $do_shortlog && [ -n "$basehash" ]; then + readonly commit_shortlog=" + +Upstream Shortlog +----------------- + +$( git shortlog --no-merges --abbrev=8 --format='%h %s' "$upstream_old_short".."$upstream_hash" )" +else + readonly commit_shortlog="" +fi +extract_source || \ + die "failed to extract source" +popd + +[ -d "$extractdir/$name-reduced" ] || \ + die "expected directory to extract does not exist" +readonly commit_summary="$name $upstream_date ($upstream_hash_short)" + +# Commit the subset +pushd "$extractdir" +mv -v "$name-reduced/"* . +rmdir "$name-reduced/" +git add -A . +git commit -n --author="$ownership" --date="$upstream_datetime" -F - <<-EOF +$commit_summary + +Code extracted from: + + $repo + +at commit $upstream_hash ($tag).$commit_shortlog +EOF +git branch -f "upstream-$name" +popd + +# Merge the subset into this repository +if [ -n "$basehash" ]; then + git merge --log -s recursive "-Xsubtree=$subtree/" --no-commit "upstream-$name" +else + git fetch "$extractdir" "upstream-$name:upstream-$name" + git merge --log -s ours --no-commit "upstream-$name" + git read-tree -u --prefix="$subtree/" "upstream-$name" +fi +git commit --no-edit +git branch -d "upstream-$name" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dcca789272057e2cb0aae640836c189873701d68 commit dcca789272057e2cb0aae640836c189873701d68 Author: KWSys Upstream AuthorDate: Wed Dec 9 11:45:28 2015 -0500 Commit: Brad King CommitDate: Mon Dec 14 14:37:35 2015 -0500 KWSys 2015-12-09 (cdcf4c47) Code extracted from: http://public.kitware.com/KWSys.git at commit cdcf4c4753d8e90895f1fb2cb6ab622342bcaaa8. ----------------------------------------------------------------------- Summary of changes: Source/kwsys/CMakeLists.txt | 58 +----------- Source/kwsys/FundamentalType.h.in | 139 --------------------------- Source/kwsys/kwsysPlatformTestsCXX.cxx | 96 ------------------- Utilities/Scripts/update-kwsys.bash | 22 +++++ Utilities/Scripts/update-third-party.bash | 146 +++++++++++++++++++++++++++++ 5 files changed, 169 insertions(+), 292 deletions(-) delete mode 100644 Source/kwsys/FundamentalType.h.in create mode 100755 Utilities/Scripts/update-kwsys.bash create mode 100644 Utilities/Scripts/update-third-party.bash hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 17 15:16:33 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 17 Dec 2015 15:16:33 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1778-gad8a17f Message-ID: <20151217201633.E696DE0572@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via ad8a17f8c2763e3ccabaf9c70580972fef0673a2 (commit) via 20cb54ff1292226acef12ae75da0aa92c524b303 (commit) via 12293371ee0f3b930afee8d328415968eb8201e6 (commit) via 3fdbb0a806f67f10ea8428e03a4523d08d2b083c (commit) via 55b21d072e2df9a35a354fd33e8cf2d0c3bd22be (commit) via c7d9a249118a7b01ed8fa9cc8c61833e39d251d2 (commit) from 8df8012086280e9b9c79cc393fa8cf7b7df398d9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad8a17f8c2763e3ccabaf9c70580972fef0673a2 commit ad8a17f8c2763e3ccabaf9c70580972fef0673a2 Merge: 8df8012 20cb54f Author: Brad King AuthorDate: Thu Dec 17 15:16:30 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 17 15:16:30 2015 -0500 Merge topic 'import-kwiml' into next 20cb54ff Port CMake from cmIML to KWIML 12293371 Merge branch 'upstream-KWIML' into import-kwiml 3fdbb0a8 KWIML 2015-12-09 (43f9f8d0) 55b21d07 Add script to update KWIML from upstream c7d9a249 Utilities/KWIML: Drop sources to make room for fresh import https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20cb54ff1292226acef12ae75da0aa92c524b303 commit 20cb54ff1292226acef12ae75da0aa92c524b303 Author: Brad King AuthorDate: Thu Dec 17 15:03:42 2015 -0500 Commit: Brad King CommitDate: Thu Dec 17 15:12:21 2015 -0500 Port CMake from cmIML to KWIML KWIML no longer uses a configured prefix. diff --git a/CMakeLists.txt b/CMakeLists.txt index ebee14b..932d07e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -538,9 +538,9 @@ if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x") set(CMAKE_TESTS_CDASH_SERVER "http://open.cdash.org") endif() -# Create the KWIML library for CMake. -set(KWIML cmIML) -set(KWIML_HEADER_ROOT ${CMake_BINARY_DIR}/Utilities) +if(BUILD_TESTING) + set(KWIML_TEST_ENABLE 1) +endif() add_subdirectory(Utilities/KWIML) if(NOT CMake_TEST_EXTERNAL_CMAKE) diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index bda933b..ef607d2 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -162,13 +162,13 @@ struct cmRange const_iterator end() const { return End; } bool empty() const { return std::distance(Begin, End) == 0; } difference_type size() const { return std::distance(Begin, End); } - cmRange& advance(cmIML_INT_intptr_t amount) + cmRange& advance(KWIML_INT_intptr_t amount) { std::advance(Begin, amount); return *this; } - cmRange& retreat(cmIML_INT_intptr_t amount) + cmRange& retreat(KWIML_INT_intptr_t amount) { std::advance(End, -amount); return *this; diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index fda6e02..b480cd5 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -15,9 +15,6 @@ #include #include -// Need the native byte order of the running CPU. -#include - // Include the ELF format information system header. #if defined(__OpenBSD__) # include @@ -101,9 +98,9 @@ public: // In most cases the processor-specific byte order will match that // of the target execution environment. If we choose wrong here // it is fixed when the header is read. -#if cmIML_ABI_ENDIAN_ID == cmIML_ABI_ENDIAN_ID_LITTLE +#if KWIML_ABI_ENDIAN_ID == KWIML_ABI_ENDIAN_ID_LITTLE this->NeedSwap = (this->ByteOrder == ByteOrderMSB); -#elif cmIML_ABI_ENDIAN_ID == cmIML_ABI_ENDIAN_ID_BIG +#elif KWIML_ABI_ENDIAN_ID == KWIML_ABI_ENDIAN_ID_BIG this->NeedSwap = (this->ByteOrder == ByteOrderLSB); #else this->NeedSwap = false; // Final decision is at runtime anyway. @@ -197,7 +194,7 @@ struct cmELFTypes32 typedef Elf32_Shdr ELF_Shdr; typedef Elf32_Dyn ELF_Dyn; typedef Elf32_Half ELF_Half; - typedef cmIML_INT_uint32_t tagtype; + typedef KWIML_INT_uint32_t tagtype; static const char* GetName() { return "32-bit"; } }; @@ -208,7 +205,7 @@ struct cmELFTypes64 typedef Elf64_Shdr ELF_Shdr; typedef Elf64_Dyn ELF_Dyn; typedef Elf64_Half ELF_Half; - typedef cmIML_INT_uint64_t tagtype; + typedef KWIML_INT_uint64_t tagtype; static const char* GetName() { return "64-bit"; } }; diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index df95d9d..b3557f9 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2811,8 +2811,8 @@ namespace { case CURLINFO_SSL_DATA_OUT: { char buf[128]; - int n = sprintf(buf, "[%" cmIML_INT_PRIu64 " bytes data]\n", - static_cast(size)); + int n = sprintf(buf, "[%" KWIML_INT_PRIu64 " bytes data]\n", + static_cast(size)); if (n > 0) { vec->insert(vec->end(), buf, buf + n); diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index 3eee404..8bfd405 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -130,7 +130,7 @@ private: unsigned int VersionFoundPatch; unsigned int VersionFoundTweak; unsigned int VersionFoundCount; - cmIML_INT_uint64_t RequiredCMakeVersion; + KWIML_INT_uint64_t RequiredCMakeVersion; bool Quiet; bool Required; bool UseConfigFiles; diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 6a57374..1d17032 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2980,7 +2980,7 @@ cmLocalGenerator::GetTargetDirectory(const cmGeneratorTarget*) const } //---------------------------------------------------------------------------- -cmIML_INT_uint64_t cmLocalGenerator::GetBackwardsCompatibility() +KWIML_INT_uint64_t cmLocalGenerator::GetBackwardsCompatibility() { // The computed version may change until the project is fully // configured. @@ -3033,7 +3033,7 @@ bool cmLocalGenerator::NeedBackwardsCompatibility_2_4() // Compatibility is needed if CMAKE_BACKWARDS_COMPATIBILITY is set // equal to or lower than the given version. - cmIML_INT_uint64_t actual_compat = this->GetBackwardsCompatibility(); + KWIML_INT_uint64_t actual_compat = this->GetBackwardsCompatibility(); return (actual_compat && actual_compat <= CMake_VERSION_ENCODE(2, 4, 255)); } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index e2f5519..68e7667 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -267,7 +267,7 @@ public: * * and is monotonically increasing with the CMake version. */ - cmIML_INT_uint64_t GetBackwardsCompatibility(); + KWIML_INT_uint64_t GetBackwardsCompatibility(); /** * Test whether compatibility is set to a given version or lower. @@ -390,7 +390,7 @@ protected: // committed. std::string TargetImplib; - cmIML_INT_uint64_t BackwardsCompatibility; + KWIML_INT_uint64_t BackwardsCompatibility; bool BackwardsCompatibilityFinal; private: void AddSharedFlags(std::string& flags, const std::string& lang, diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index aed2e74..272c136 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -31,7 +31,7 @@ #endif // Provide fixed-size integer types. -#include +#include #include #include diff --git a/Source/cmVersion.h b/Source/cmVersion.h index 0ab6390..84f750f 100644 --- a/Source/cmVersion.h +++ b/Source/cmVersion.h @@ -34,7 +34,7 @@ public: /* Encode with room for up to 1000 minor releases between major releases and to encode dates until the year 10000 in the patch level. */ -#define CMake_VERSION_ENCODE__BASE cmIML_INT_UINT64_C(100000000) +#define CMake_VERSION_ENCODE__BASE KWIML_INT_UINT64_C(100000000) #define CMake_VERSION_ENCODE(major, minor, patch) \ ((((major) * 1000u) * CMake_VERSION_ENCODE__BASE) + \ (((minor) % 1000u) * CMake_VERSION_ENCODE__BASE) + \ diff --git a/Source/cm_sha2.c b/Source/cm_sha2.c index b90e060..649c39a 100644 --- a/Source/cm_sha2.c +++ b/Source/cm_sha2.c @@ -87,22 +87,21 @@ * made). */ #if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN) -/* CMake modification: use byte order from cmIML. */ -# include "cmIML/ABI.h" +/* CMake modification: use byte order from KWIML. */ # undef BYTE_ORDER # undef BIG_ENDIAN # undef LITTLE_ENDIAN -# define BYTE_ORDER cmIML_ABI_ENDIAN_ID -# define BIG_ENDIAN cmIML_ABI_ENDIAN_ID_BIG -# define LITTLE_ENDIAN cmIML_ABI_ENDIAN_ID_LITTLE +# define BYTE_ORDER KWIML_ABI_ENDIAN_ID +# define BIG_ENDIAN KWIML_ABI_ENDIAN_ID_BIG +# define LITTLE_ENDIAN KWIML_ABI_ENDIAN_ID_LITTLE #endif /* CMake modification: use types computed in header. */ typedef cm_sha2_uint8_t sha_byte; /* Exactly 1 byte */ typedef cm_sha2_uint32_t sha_word32; /* Exactly 4 bytes */ typedef cm_sha2_uint64_t sha_word64; /* Exactly 8 bytes */ -#define SHA_UINT32_C(x) cmIML_INT_UINT32_C(x) -#define SHA_UINT64_C(x) cmIML_INT_UINT64_C(x) +#define SHA_UINT32_C(x) KWIML_INT_UINT32_C(x) +#define SHA_UINT64_C(x) KWIML_INT_UINT64_C(x) #if defined(__clang__) # pragma clang diagnostic ignored "-Wcast-align" #endif diff --git a/Source/cm_sha2.h b/Source/cm_sha2.h index 71395f0..f151031 100644 --- a/Source/cm_sha2.h +++ b/Source/cm_sha2.h @@ -38,11 +38,11 @@ #include "cm_sha2_mangle.h" -/* CMake modification: use integer types from cmIML. */ -#include "cmIML/INT.h" -typedef cmIML_INT_uint8_t cm_sha2_uint8_t; -typedef cmIML_INT_uint32_t cm_sha2_uint32_t; -typedef cmIML_INT_uint64_t cm_sha2_uint64_t; +/* CMake modification: use integer types from KWIML. */ +#include +typedef KWIML_INT_uint8_t cm_sha2_uint8_t; +typedef KWIML_INT_uint32_t cm_sha2_uint32_t; +typedef KWIML_INT_uint64_t cm_sha2_uint64_t; #ifdef __cplusplus extern "C" { diff --git a/Utilities/cm_kwiml.h b/Utilities/cm_kwiml.h new file mode 100644 index 0000000..2e1a108 --- /dev/null +++ b/Utilities/cm_kwiml.h @@ -0,0 +1,18 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2015 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef cm_kwiml_h +#define cm_kwiml_h + +#include "KWIML/include/kwiml/abi.h" +#include "KWIML/include/kwiml/int.h" + +#endif diff --git a/bootstrap b/bootstrap index b2421a1..cb712c8 100755 --- a/bootstrap +++ b/bootstrap @@ -373,11 +373,6 @@ KWSYS_FILES="\ SystemTools.hxx \ Terminal.h" -KWIML_FILES=' - ABI.h - INT.h -' - # Display CMake bootstrap usage cmake_usage() { @@ -455,6 +450,18 @@ cmake_error() exit ${res} } +cmake_generate_file () +{ + OUTFILE="$1" + CONTENT="$2" + echo "$CONTENT" > "$OUTFILE.tmp" + if "${_diff}" "$OUTFILE.tmp" "$OUTFILE" > /dev/null 2> /dev/null ; then + rm -f "$OUTFILE.tmp" + else + mv -f "$OUTFILE.tmp" "$OUTFILE" + fi +} + # Replace KWSYS_NAMESPACE with cmsys cmake_replace_string () { @@ -702,11 +709,6 @@ if [ ! -d "cmsys" ]; then cmake_error 4 "Cannot create directory ${cmake_bootstrap_dir}/cmsys" fi -[ -d "cmIML" ] || mkdir "cmIML" -if [ ! -d "cmIML" ]; then - cmake_error 12 "Cannot create directory ${cmake_bootstrap_dir}/cmIML" -fi - # Delete all the bootstrap files rm -f "${cmake_bootstrap_dir}/cmake_bootstrap.log" rm -f "${cmake_bootstrap_dir}/cmConfigure.h${_tmp}" @@ -1280,13 +1282,13 @@ for a in ${KWSYS_FILES}; do "${cmake_bootstrap_dir}/cmsys/${a}" KWSYS_NAMESPACE cmsys done -for a in ${KWIML_FILES}; do - cmake_replace_string "${cmake_source_dir}/Utilities/KWIML/${a}.in" \ - "${cmake_bootstrap_dir}/cmIML/${a}" KWIML cmIML -done +cmake_generate_file "${cmake_bootstrap_dir}/cm_kwiml.h" " +#include \"${cmake_source_dir}/Utilities/KWIML/include/kwiml/abi.h\" +#include \"${cmake_source_dir}/Utilities/KWIML/include/kwiml/int.h\" +" # Generate Makefile -dep="cmConfigure.h cmsys/*.hxx cmsys/*.h `cmake_escape \"${cmake_source_dir}\"`/Source/*.h" +dep="cmConfigure.h cm_kwiml.h cmsys/*.hxx cmsys/*.h `cmake_escape \"${cmake_source_dir}\"`/Source/*.h" objs="" for a in ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES} ${KWSYS_CXX_SOURCES} ${KWSYS_C_SOURCES}; do objs="${objs} ${a}.o" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12293371ee0f3b930afee8d328415968eb8201e6 commit 12293371ee0f3b930afee8d328415968eb8201e6 Merge: 55b21d0 3fdbb0a Author: Brad King AuthorDate: Thu Dec 17 14:56:40 2015 -0500 Commit: Brad King CommitDate: Thu Dec 17 14:56:40 2015 -0500 Merge branch 'upstream-KWIML' into import-kwiml * upstream-KWIML: KWIML 2015-12-09 (43f9f8d0) diff --cc Utilities/KWIML/.gitattributes index 0000000,ecbf219..ecbf219 mode 000000,100644..100644 --- a/Utilities/KWIML/.gitattributes +++ b/Utilities/KWIML/.gitattributes diff --cc Utilities/KWIML/CMakeLists.txt index 0000000,15e65e5..15e65e5 mode 000000,100644..100644 --- a/Utilities/KWIML/CMakeLists.txt +++ b/Utilities/KWIML/CMakeLists.txt diff --cc Utilities/KWIML/Copyright.txt index 0000000,a6204b0..a6204b0 mode 000000,100644..100644 --- a/Utilities/KWIML/Copyright.txt +++ b/Utilities/KWIML/Copyright.txt diff --cc Utilities/KWIML/README.md index 0000000,37d72d1..37d72d1 mode 000000,100644..100644 --- a/Utilities/KWIML/README.md +++ b/Utilities/KWIML/README.md diff --cc Utilities/KWIML/include/kwiml/abi.h index 0000000,3626361..3626361 mode 000000,100644..100644 --- a/Utilities/KWIML/include/kwiml/abi.h +++ b/Utilities/KWIML/include/kwiml/abi.h diff --cc Utilities/KWIML/include/kwiml/int.h index 0000000,b297ace..b297ace mode 000000,100644..100644 --- a/Utilities/KWIML/include/kwiml/int.h +++ b/Utilities/KWIML/include/kwiml/int.h diff --cc Utilities/KWIML/src/kwiml-config.cmake.in index 0000000,124f0fc..124f0fc mode 000000,100644..100644 --- a/Utilities/KWIML/src/kwiml-config.cmake.in +++ b/Utilities/KWIML/src/kwiml-config.cmake.in diff --cc Utilities/KWIML/src/version.h.in index 0000000,e58e0dc..e58e0dc mode 000000,100644..100644 --- a/Utilities/KWIML/src/version.h.in +++ b/Utilities/KWIML/src/version.h.in diff --cc Utilities/KWIML/test/CMakeLists.txt index 0000000,4f6f37b..4f6f37b mode 000000,100644..100644 --- a/Utilities/KWIML/test/CMakeLists.txt +++ b/Utilities/KWIML/test/CMakeLists.txt diff --cc Utilities/KWIML/test/test.c index 0000000,5f5b5d7..5f5b5d7 mode 000000,100644..100644 --- a/Utilities/KWIML/test/test.c +++ b/Utilities/KWIML/test/test.c diff --cc Utilities/KWIML/test/test.cxx index 0000000,464325b..464325b mode 000000,100644..100644 --- a/Utilities/KWIML/test/test.cxx +++ b/Utilities/KWIML/test/test.cxx diff --cc Utilities/KWIML/test/test.h index 0000000,44add3f..44add3f mode 000000,100644..100644 --- a/Utilities/KWIML/test/test.h +++ b/Utilities/KWIML/test/test.h diff --cc Utilities/KWIML/test/test_abi_C.c index 0000000,18b639f..18b639f mode 000000,100644..100644 --- a/Utilities/KWIML/test/test_abi_C.c +++ b/Utilities/KWIML/test/test_abi_C.c diff --cc Utilities/KWIML/test/test_abi_CXX.cxx index 0000000,e8feb44..e8feb44 mode 000000,100644..100644 --- a/Utilities/KWIML/test/test_abi_CXX.cxx +++ b/Utilities/KWIML/test/test_abi_CXX.cxx diff --cc Utilities/KWIML/test/test_abi_endian.h index 0000000,334b018..334b018 mode 000000,100644..100644 --- a/Utilities/KWIML/test/test_abi_endian.h +++ b/Utilities/KWIML/test/test_abi_endian.h diff --cc Utilities/KWIML/test/test_include_C.c index 0000000,518544d..518544d mode 000000,100644..100644 --- a/Utilities/KWIML/test/test_include_C.c +++ b/Utilities/KWIML/test/test_include_C.c diff --cc Utilities/KWIML/test/test_include_CXX.cxx index 0000000,82aa546..82aa546 mode 000000,100644..100644 --- a/Utilities/KWIML/test/test_include_CXX.cxx +++ b/Utilities/KWIML/test/test_include_CXX.cxx diff --cc Utilities/KWIML/test/test_int_C.c index 0000000,fe8ee8e..fe8ee8e mode 000000,100644..100644 --- a/Utilities/KWIML/test/test_int_C.c +++ b/Utilities/KWIML/test/test_int_C.c diff --cc Utilities/KWIML/test/test_int_CXX.cxx index 0000000,ffa4c9b..ffa4c9b mode 000000,100644..100644 --- a/Utilities/KWIML/test/test_int_CXX.cxx +++ b/Utilities/KWIML/test/test_int_CXX.cxx diff --cc Utilities/KWIML/test/test_int_format.h index 0000000,24dcdfb..24dcdfb mode 000000,100644..100644 --- a/Utilities/KWIML/test/test_int_format.h +++ b/Utilities/KWIML/test/test_int_format.h https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3fdbb0a806f67f10ea8428e03a4523d08d2b083c commit 3fdbb0a806f67f10ea8428e03a4523d08d2b083c Author: KWIML Upstream AuthorDate: Wed Dec 9 13:31:42 2015 -0500 Commit: Brad King CommitDate: Thu Dec 17 14:56:38 2015 -0500 KWIML 2015-12-09 (43f9f8d0) Code extracted from: https://github.com/Kitware/KWIML.git at commit 43f9f8d0b0c8ee62aa056a2020981a6d98a40dd4 (master). diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..ecbf219 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.md conflict-marker-size=78 diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..15e65e5 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,104 @@ +# +# Copyright Kitware, Inc. +# Distributed under the OSI-approved BSD 3-Clause License. +# See accompanying file Copyright.txt for details. +# +if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + cmake_minimum_required(VERSION 3.0 FATAL_ERROR) + set(kwiml_standalone 1) + project(KWIML) + include(CTest) + mark_as_advanced(BUILD_TESTING) + if(BUILD_TESTING) + set(KWIML_TEST_ENABLE 1) + endif() + if(NOT DEFINED KWIML_INSTALL_INCLUDE_DIR) + set(KWIML_INSTALL_INCLUDE_DIR include) + endif() + set(KWIML_INCLUDE_PREFIX kwiml) +else() + cmake_minimum_required(VERSION 2.8.2 FATAL_ERROR) + set(kwiml_standalone 0) + if(KWIML_INSTALL_INCLUDE_DIR AND NOT DEFINED KWIML_INCLUDE_PREFIX) + message(FATAL_ERROR "Host project must set KWIML_INCLUDE_PREFIX") + endif() +endif() + +get_property(KWIML_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) +foreach(lang ${KWIML_LANGUAGES}) + set(KWIML_LANGUAGE_${lang} 1) +endforeach() +if(NOT KWIML_LANGUAGE_C AND NOT KWIML_LANGUAGE_CXX) + set(BUILD_TESTING OFF) +endif() + +if(KWIML_INSTALL_INCLUDE_DIR) + install(FILES + include/kwiml/abi.h + include/kwiml/int.h + DESTINATION ${KWIML_INSTALL_INCLUDE_DIR}/${KWIML_INCLUDE_PREFIX} + ${KWIML_INSTALL_INCLUDE_OPTIONS} + ) +endif() + +if(KWIML_TEST_ENABLE) + add_subdirectory(test) +endif() + +if(NOT kwiml_standalone) + return() +endif() + +#---------------------------------------------------------------------------- +set(KWIML_VERSION 1.0.0) +if(KWIML_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)") + set(KWIML_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(KWIML_VERSION_MINOR "${CMAKE_MATCH_2}") + set(KWIML_VERSION_PATCH "${CMAKE_MATCH_3}") + math(EXPR KWIML_VERSION_DECIMAL + "${KWIML_VERSION_MAJOR}*1000000 + ${KWIML_VERSION_MINOR}*1000 + ${KWIML_VERSION_PATCH}") +else() + message(FATAL_ERROR "Failed to parse KWIML_VERSION='${KWIML_VERSION}'") +endif() + +configure_file(src/version.h.in include/kwiml/version.h @ONLY) +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/include/kwiml/version.h + DESTINATION ${KWIML_INSTALL_INCLUDE_DIR}/kwiml + ) + +if(NOT KWIML_INSTALL_PACKAGE_DIR) + set(KWIML_INSTALL_PACKAGE_DIR share/cmake/kwiml-${KWIML_VERSION_MAJOR}.${KWIML_VERSION_MINOR}) +endif() + +add_library(kwiml INTERFACE) +target_include_directories(kwiml INTERFACE + $/${KWIML_INSTALL_INCLUDE_DIR}> + $ + $ + ) +export(TARGETS kwiml + NAMESPACE kwiml:: + FILE kwiml-targets.cmake + ) +install(TARGETS kwiml + DESTINATION lib + EXPORT kwiml-targets + ) +install(EXPORT kwiml-targets + NAMESPACE kwiml:: + DESTINATION ${KWIML_INSTALL_PACKAGE_DIR} + ) + +configure_file(src/kwiml-config.cmake.in kwiml-config.cmake @ONLY) +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/kwiml-config-version.cmake" + VERSION ${KWIML_VERSION} + COMPATIBILITY AnyNewerVersion + ) +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/kwiml-config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/kwiml-config-version.cmake + DESTINATION ${KWIML_INSTALL_PACKAGE_DIR} + ) diff --git a/Copyright.txt b/Copyright.txt new file mode 100644 index 0000000..a6204b0 --- /dev/null +++ b/Copyright.txt @@ -0,0 +1,30 @@ +Kitware Information Macro Library +Copyright 2010-2015 Kitware, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* Neither the name of Kitware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..37d72d1 --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +Kitware Information Macro Library (KWIML) +========================================= + +KWIML provides header files that use preprocessor tests to detect and +provide information about the compiler and its target architecture. +The headers contain no configuration-time test results and thus may +be installed into an architecture-independent include directory. +This makes them suitable for use in the public interface of any package. + +The following headers are provided. See header comments for details: + +* [kwiml/abi.h][]: Fundamental type size and representation. + +* [kwiml/int.h][]: Fixed-size integer types and format specifiers. + +* [kwiml/version.h][]: Information about this version of KWIML. + +The [test][] subdirectory builds tests that verify correctness of the +information provided by each header. + +License +======= + +KWIML is distributed under the OSI-approved 3-clause BSD License. + +Files used only for build and test purposes contain a copyright notice and +reference [Copyright.txt][] for details. Headers meant for installation and +distribution outside the source tree come with full inlined copies of the +copyright notice and license text. This makes them suitable for distribution +with any package under compatible license terms. + +[Copyright.txt]: Copyright.txt +[kwiml/abi.h]: include/kwiml/abi.h +[kwiml/int.h]: include/kwiml/int.h +[kwiml/version.h]: src/version.h.in +[test]: test/ diff --git a/include/kwiml/abi.h b/include/kwiml/abi.h new file mode 100644 index 0000000..3626361 --- /dev/null +++ b/include/kwiml/abi.h @@ -0,0 +1,562 @@ +/*============================================================================ + Kitware Information Macro Library + Copyright 2010-2015 Kitware, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Kitware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +============================================================================*/ +/* +This header defines macros with information about the C ABI. +Only information that can be determined using the preprocessor at +compilation time is available. No try-compile results may be added +here. Instead we memorize results on platforms of interest. + +An includer may optionally define the following macros to suppress errors: + + KWIML_ABI_NO_VERIFY = skip verification declarations + KWIML_ABI_NO_ERROR_CHAR_SIGN = signedness of 'char' may be unknown + KWIML_ABI_NO_ERROR_LONG_LONG = existence of 'long long' may be unknown + KWIML_ABI_NO_ERROR_ENDIAN = byte order of CPU may be unknown + +An includer may test the following macros after inclusion: + + KWIML_ABI_VERSION = interface version number # of this header + + KWIML_ABI_SIZEOF_DATA_PTR = sizeof(void*) + KWIML_ABI_SIZEOF_CODE_PTR = sizeof(void(*)(void)) + KWIML_ABI_SIZEOF_FLOAT = sizeof(float) + KWIML_ABI_SIZEOF_DOUBLE = sizeof(double) + KWIML_ABI_SIZEOF_CHAR = sizeof(char) + KWIML_ABI_SIZEOF_SHORT = sizeof(short) + KWIML_ABI_SIZEOF_INT = sizeof(int) + KWIML_ABI_SIZEOF_LONG = sizeof(long) + + KWIML_ABI_SIZEOF_LONG_LONG = sizeof(long long) or 0 if not a type + Undefined if existence is unknown and error suppression macro + KWIML_ABI_NO_ERROR_LONG_LONG was defined. + + KWIML_ABI_SIZEOF___INT64 = 8 if '__int64' exists or 0 if not + Undefined if existence is unknown. + + KWIML_ABI___INT64_IS_LONG = 1 if '__int64' is 'long' (same type) + Undefined otherwise. + KWIML_ABI___INT64_IS_LONG_LONG = 1 if '__int64' is 'long long' (same type) + Undefined otherwise. + KWIML_ABI___INT64_IS_UNIQUE = 1 if '__int64' is a distinct type + Undefined otherwise. + + KWIML_ABI_CHAR_IS_UNSIGNED = 1 if 'char' is unsigned, else undefined + KWIML_ABI_CHAR_IS_SIGNED = 1 if 'char' is signed, else undefined + One of these is defined unless signedness of 'char' is unknown and + error suppression macro KWIML_ABI_NO_ERROR_CHAR_SIGN was defined. + + KWIML_ABI_ENDIAN_ID_BIG = id for big-endian (always defined) + KWIML_ABI_ENDIAN_ID_LITTLE = id for little-endian (always defined) + KWIML_ABI_ENDIAN_ID = id of byte order of target CPU + Defined to KWIML_ABI_ENDIAN_ID_BIG or KWIML_ABI_ENDIAN_ID_LITTLE + unless byte order is unknown and error suppression macro + KWIML_ABI_NO_ERROR_ENDIAN was defined. + +We verify most results using dummy "extern" declarations that are +invalid if the macros are wrong. Verification is disabled if +suppression macro KWIML_ABI_NO_VERIFY was defined. +*/ + +#define KWIML_ABI_private_VERSION 1 + +/* Guard definition of this version. */ +#ifndef KWIML_ABI_detail_DEFINED_VERSION_1 +# define KWIML_ABI_detail_DEFINED_VERSION_1 1 +# define KWIML_ABI_private_DO_DEFINE +#endif + +/* Guard verification of this version. */ +#if !defined(KWIML_ABI_NO_VERIFY) +# ifndef KWIML_ABI_detail_VERIFIED_VERSION_1 +# define KWIML_ABI_detail_VERIFIED_VERSION_1 +# define KWIML_ABI_private_DO_VERIFY +# endif +#endif + +#ifdef KWIML_ABI_private_DO_DEFINE +#undef KWIML_ABI_private_DO_DEFINE + +/* Define version as most recent of those included. */ +#if !defined(KWIML_ABI_VERSION) || KWIML_ABI_VERSION < KWIML_ABI_private_VERSION +# undef KWIML_ABI_VERSION +# define KWIML_ABI_VERSION 1 +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_ABI_SIZEOF_DATA_PTR) +# if defined(__SIZEOF_POINTER__) +# define KWIML_ABI_SIZEOF_DATA_PTR __SIZEOF_POINTER__ +# elif defined(_SIZE_PTR) +# define KWIML_ABI_SIZEOF_DATA_PTR (_SIZE_PTR >> 3) +# elif defined(_LP64) || defined(__LP64__) +# define KWIML_ABI_SIZEOF_DATA_PTR 8 +# elif defined(_ILP32) +# define KWIML_ABI_SIZEOF_DATA_PTR 4 +# elif defined(__64BIT__) /* IBM XL */ +# define KWIML_ABI_SIZEOF_DATA_PTR 8 +# elif defined(_M_X64) +# define KWIML_ABI_SIZEOF_DATA_PTR 8 +# elif defined(__ia64) +# define KWIML_ABI_SIZEOF_DATA_PTR 8 +# elif defined(__sparcv9) +# define KWIML_ABI_SIZEOF_DATA_PTR 8 +# elif defined(__x86_64) || defined(__x86_64__) +# define KWIML_ABI_SIZEOF_DATA_PTR 8 +# elif defined(__amd64) || defined(__amd64__) +# define KWIML_ABI_SIZEOF_DATA_PTR 8 +# elif defined(__i386) || defined(__i386__) +# define KWIML_ABI_SIZEOF_DATA_PTR 4 +# endif +#endif +#if !defined(KWIML_ABI_SIZEOF_DATA_PTR) +# define KWIML_ABI_SIZEOF_DATA_PTR 4 +#endif +#if !defined(KWIML_ABI_SIZEOF_CODE_PTR) +# define KWIML_ABI_SIZEOF_CODE_PTR KWIML_ABI_SIZEOF_DATA_PTR +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_ABI_SIZEOF_CHAR) +# define KWIML_ABI_SIZEOF_CHAR 1 +#endif + +#if !defined(KWIML_ABI_CHAR_IS_UNSIGNED) && !defined(KWIML_ABI_CHAR_IS_SIGNED) +# if defined(__CHAR_UNSIGNED__) /* GNU, some IBM XL, others? */ +# define KWIML_ABI_CHAR_IS_UNSIGNED 1 +# elif defined(_CHAR_UNSIGNED) /* Intel, IBM XL, MSVC, Borland, others? */ +# define KWIML_ABI_CHAR_IS_UNSIGNED 1 +# elif defined(_CHAR_SIGNED) /* IBM XL, others? */ +# define KWIML_ABI_CHAR_IS_SIGNED 1 +# elif defined(__CHAR_SIGNED__) /* IBM XL, Watcom, others? */ +# define KWIML_ABI_CHAR_IS_SIGNED 1 +# elif defined(__SIGNED_CHARS__) /* EDG, Intel, SGI MIPSpro */ +# define KWIML_ABI_CHAR_IS_SIGNED 1 +# elif defined(_CHAR_IS_SIGNED) /* Some SunPro, others? */ +# define KWIML_ABI_CHAR_IS_SIGNED 1 +# elif defined(_CHAR_IS_UNSIGNED) /* SunPro, others? */ +# define KWIML_ABI_CHAR_IS_UNSIGNED 1 +# elif defined(__GNUC__) /* GNU default */ +# define KWIML_ABI_CHAR_IS_SIGNED 1 +# elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* SunPro default */ +# define KWIML_ABI_CHAR_IS_SIGNED 1 +# elif defined(__HP_cc) || defined(__HP_aCC) /* HP default (unless +uc) */ +# define KWIML_ABI_CHAR_IS_SIGNED 1 +# elif defined(_SGI_COMPILER_VERSION) /* SGI MIPSpro default */ +# define KWIML_ABI_CHAR_IS_UNSIGNED 1 +# elif defined(__PGIC__) /* PGI default */ +# define KWIML_ABI_CHAR_IS_SIGNED 1 +# elif defined(_MSC_VER) /* MSVC default */ +# define KWIML_ABI_CHAR_IS_SIGNED 1 +# elif defined(__WATCOMC__) /* Watcom default */ +# define KWIML_ABI_CHAR_IS_UNSIGNED 1 +# elif defined(__BORLANDC__) /* Borland default */ +# define KWIML_ABI_CHAR_IS_SIGNED 1 +# elif defined(__hpux) /* Old HP: no __HP_cc/__HP_aCC/__GNUC__ above */ +# define KWIML_ABI_CHAR_IS_SIGNED 1 /* (unless +uc) */ +# endif +#endif +#if !defined(KWIML_ABI_CHAR_IS_UNSIGNED) && !defined(KWIML_ABI_CHAR_IS_SIGNED) \ + && !defined(KWIML_ABI_NO_ERROR_CHAR_SIGN) +# error "Signedness of 'char' unknown." +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_ABI_SIZEOF_SHORT) +# if defined(__SIZEOF_SHORT__) +# define KWIML_ABI_SIZEOF_SHORT __SIZEOF_SHORT__ +# endif +#endif +#if !defined(KWIML_ABI_SIZEOF_SHORT) +# define KWIML_ABI_SIZEOF_SHORT 2 +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_ABI_SIZEOF_INT) +# if defined(__SIZEOF_INT__) +# define KWIML_ABI_SIZEOF_INT __SIZEOF_INT__ +# elif defined(_SIZE_INT) +# define KWIML_ABI_SIZEOF_INT (_SIZE_INT >> 3) +# endif +#endif +#if !defined(KWIML_ABI_SIZEOF_INT) +# define KWIML_ABI_SIZEOF_INT 4 +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_ABI_SIZEOF_LONG) +# if defined(__SIZEOF_LONG__) +# define KWIML_ABI_SIZEOF_LONG __SIZEOF_LONG__ +# elif defined(_SIZE_LONG) +# define KWIML_ABI_SIZEOF_LONG (_SIZE_LONG >> 3) +# elif defined(__LONG_MAX__) +# if __LONG_MAX__ == 0x7fffffff +# define KWIML_ABI_SIZEOF_LONG 4 +# elif __LONG_MAX__>>32 == 0x7fffffff +# define KWIML_ABI_SIZEOF_LONG 8 +# endif +# elif defined(_MSC_VER) /* MSVC and Intel on Windows */ +# define KWIML_ABI_SIZEOF_LONG 4 +# endif +#endif +#if !defined(KWIML_ABI_SIZEOF_LONG) +# define KWIML_ABI_SIZEOF_LONG KWIML_ABI_SIZEOF_DATA_PTR +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_ABI_SIZEOF_LONG_LONG) +# if defined(__SIZEOF_LONG_LONG__) +# define KWIML_ABI_SIZEOF_LONG_LONG __SIZEOF_LONG_LONG__ +# elif defined(__LONG_LONG_MAX__) +# if __LONG_LONG_MAX__ == 0x7fffffff +# define KWIML_ABI_SIZEOF_LONG_LONG 4 +# elif __LONG_LONG_MAX__>>32 == 0x7fffffff +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# endif +# endif +#endif +#if !defined(KWIML_ABI_SIZEOF_LONG_LONG) +# if defined(_LONGLONG) /* SGI, some GNU, perhaps others. */ \ + && !defined(_MSC_VER) +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# elif defined(_LONG_LONG) /* IBM XL, perhaps others. */ +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# elif defined(__NO_LONG_LONG) /* EDG */ +# define KWIML_ABI_SIZEOF_LONG_LONG 0 +# elif defined(__cplusplus) && __cplusplus > 199711L /* C++0x */ +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* SunPro */ +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# elif defined(__HP_cc) || defined(__HP_aCC) /* HP */ +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# elif defined(__PGIC__) /* PGI */ +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# elif defined(__WATCOMC__) /* Watcom */ +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# elif defined(__INTEL_COMPILER) /* Intel */ +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# elif defined(__BORLANDC__) /* Borland */ +# if __BORLANDC__ >= 0x0560 +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# else +# define KWIML_ABI_SIZEOF_LONG_LONG 0 +# endif +# elif defined(_MSC_VER) /* Microsoft */ +# if _MSC_VER >= 1310 +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# else +# define KWIML_ABI_SIZEOF_LONG_LONG 0 +# endif +# elif defined(__GNUC__) /* GNU */ +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# elif defined(__hpux) /* Old HP: no __HP_cc/__HP_aCC/__GNUC__ above */ +# define KWIML_ABI_SIZEOF_LONG_LONG 8 +# endif +#endif +#if !defined(KWIML_ABI_SIZEOF_LONG_LONG) && !defined(KWIML_ABI_NO_ERROR_LONG_LONG) +# error "Existence of 'long long' unknown." +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_ABI_SIZEOF___INT64) +# if defined(__INTEL_COMPILER) +# define KWIML_ABI_SIZEOF___INT64 8 +# elif defined(_MSC_VER) +# define KWIML_ABI_SIZEOF___INT64 8 +# elif defined(__BORLANDC__) +# define KWIML_ABI_SIZEOF___INT64 8 +# else +# define KWIML_ABI_SIZEOF___INT64 0 +# endif +#endif + +#if defined(KWIML_ABI_SIZEOF___INT64) && KWIML_ABI_SIZEOF___INT64 > 0 +# if KWIML_ABI_SIZEOF_LONG == 8 +# define KWIML_ABI___INT64_IS_LONG 1 +# elif defined(KWIML_ABI_SIZEOF_LONG_LONG) && KWIML_ABI_SIZEOF_LONG_LONG == 8 +# define KWIML_ABI___INT64_IS_LONG_LONG 1 +# else +# define KWIML_ABI___INT64_IS_UNIQUE 1 +# endif +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_ABI_SIZEOF_FLOAT) +# if defined(__SIZEOF_FLOAT__) +# define KWIML_ABI_SIZEOF_FLOAT __SIZEOF_FLOAT__ +# endif +#endif +#if !defined(KWIML_ABI_SIZEOF_FLOAT) +# define KWIML_ABI_SIZEOF_FLOAT 4 +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_ABI_SIZEOF_DOUBLE) +# if defined(__SIZEOF_DOUBLE__) +# define KWIML_ABI_SIZEOF_DOUBLE __SIZEOF_DOUBLE__ +# endif +#endif +#if !defined(KWIML_ABI_SIZEOF_DOUBLE) +# define KWIML_ABI_SIZEOF_DOUBLE 8 +#endif + +/*--------------------------------------------------------------------------*/ +/* Identify possible endian cases. The macro KWIML_ABI_ENDIAN_ID will be + defined to one of these, or undefined if unknown. */ +#if !defined(KWIML_ABI_ENDIAN_ID_BIG) +# define KWIML_ABI_ENDIAN_ID_BIG 4321 +#endif +#if !defined(KWIML_ABI_ENDIAN_ID_LITTLE) +# define KWIML_ABI_ENDIAN_ID_LITTLE 1234 +#endif +#if KWIML_ABI_ENDIAN_ID_BIG == KWIML_ABI_ENDIAN_ID_LITTLE +# error "KWIML_ABI_ENDIAN_ID_BIG == KWIML_ABI_ENDIAN_ID_LITTLE" +#endif + +#if defined(KWIML_ABI_ENDIAN_ID) /* Skip #elif cases if already defined. */ + +/* Use dedicated symbols if the compiler defines them. Do this first + because some architectures allow runtime byte order selection by + the operating system (values for such architectures below are + guesses for compilers that do not define a dedicated symbol). + Ensure that only one is defined in case the platform or a header + defines both as possible values for some third symbol. */ +#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG +#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE +#elif defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG +#elif defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + +/* Alpha */ +#elif defined(__alpha) || defined(__alpha__) || defined(_M_ALPHA) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + +/* Arm */ +#elif defined(__arm__) +# if !defined(__ARMEB__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE +# else +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG +# endif + +/* Intel x86 */ +#elif defined(__i386) || defined(__i386__) || defined(_M_IX86) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE +#elif defined(_X86_) || defined(__THW_INTEL__) || defined(__I86__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE +#elif defined(__MWERKS__) && defined(__INTEL__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + +/* Intel x86-64 */ +#elif defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE +#elif defined(__amd64) || defined(__amd64__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + +/* Intel Architecture-64 (Itanium) */ +#elif defined(__ia64) || defined(__ia64__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE +#elif defined(_IA64) || defined(__IA64__) || defined(_M_IA64) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + +/* PowerPC */ +#elif defined(__powerpc) || defined(__powerpc__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG +#elif defined(__ppc) || defined(__ppc__) || defined(__POWERPC__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG + +/* SPARC */ +#elif defined(__sparc) || defined(__sparc__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG + +/* HP/PA RISC */ +#elif defined(__hppa) || defined(__hppa__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG + +/* Motorola 68k */ +#elif defined(__m68k__) || defined(M68000) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG + +/* MIPSel (MIPS little endian) */ +#elif defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + +/* MIPSeb (MIPS big endian) */ +#elif defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG + +/* MIPS (fallback, big endian) */ +#elif defined(__mips) || defined(__mips__) || defined(__MIPS__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG + +/* NIOS2 */ +#elif defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + +/* OpenRISC 1000 */ +#elif defined(__or1k__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG + +/* RS/6000 */ +#elif defined(__THW_RS600) || defined(_IBMR2) || defined(_POWER) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG +#elif defined(_ARCH_PWR) || defined(_ARCH_PWR2) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG + +/* System/370 */ +#elif defined(__370__) || defined(__THW_370__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG + +/* System/390 */ +#elif defined(__s390__) || defined(__s390x__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG + +/* z/Architecture */ +#elif defined(__SYSC_ZARCH__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG + +/* VAX */ +#elif defined(__vax__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG + +/* Aarch64 */ +#elif defined(__aarch64__) +# if !defined(__AARCH64EB__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE +# else +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG +# endif + +/* Xtensa */ +#elif defined(__XTENSA_EB__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_BIG +#elif defined(__XTENSA_EL__) +# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + +/* Unknown CPU */ +#elif !defined(KWIML_ABI_NO_ERROR_ENDIAN) +# error "Byte order of target CPU unknown." +#endif + +#endif /* KWIML_ABI_private_DO_DEFINE */ + +/*--------------------------------------------------------------------------*/ +#ifdef KWIML_ABI_private_DO_VERIFY +#undef KWIML_ABI_private_DO_VERIFY + +#if defined(_MSC_VER) +# pragma warning (push) +# pragma warning (disable:4310) /* cast truncates constant value */ +#endif + +#define KWIML_ABI_private_VERIFY(n, x, y) KWIML_ABI_private_VERIFY_0(KWIML_ABI_private_VERSION, n, x, y) +#define KWIML_ABI_private_VERIFY_0(V, n, x, y) KWIML_ABI_private_VERIFY_1(V, n, x, y) +#define KWIML_ABI_private_VERIFY_1(V, n, x, y) extern int (*n##_v##V)[x]; extern int (*n##_v##V)[y] + +#define KWIML_ABI_private_VERIFY_SAME_IMPL(n, x, y) KWIML_ABI_private_VERIFY_SAME_IMPL_0(KWIML_ABI_private_VERSION, n, x, y) +#define KWIML_ABI_private_VERIFY_SAME_IMPL_0(V, n, x, y) KWIML_ABI_private_VERIFY_SAME_IMPL_1(V, n, x, y) +#define KWIML_ABI_private_VERIFY_SAME_IMPL_1(V, n, x, y) extern int (*n##_v##V)(x*); extern int (*n##_v##V)(y*) + +#define KWIML_ABI_private_VERIFY_DIFF_IMPL(n, x, y) KWIML_ABI_private_VERIFY_DIFF_IMPL_0(KWIML_ABI_private_VERSION, n, x, y) +#define KWIML_ABI_private_VERIFY_DIFF_IMPL_0(V, n, x, y) KWIML_ABI_private_VERIFY_DIFF_IMPL_1(V, n, x, y) +#if defined(__cplusplus) +# define KWIML_ABI_private_VERIFY_DIFF_IMPL_1(V, n, x, y) extern int* n##_v##V(x*); extern char* n##_v##V(y*) +#else +# define KWIML_ABI_private_VERIFY_DIFF_IMPL_1(V, n, x, y) extern int* n##_v##V(x*) /* TODO: possible? */ +#endif + +#define KWIML_ABI_private_VERIFY_BOOL(m, b) KWIML_ABI_private_VERIFY(KWIML_ABI_detail_VERIFY_##m, 2, (b)?2:3) +#define KWIML_ABI_private_VERIFY_SIZE(m, t) KWIML_ABI_private_VERIFY(KWIML_ABI_detail_VERIFY_##m, m, sizeof(t)) +#define KWIML_ABI_private_VERIFY_SAME(m, x, y) KWIML_ABI_private_VERIFY_SAME_IMPL(KWIML_ABI_detail_VERIFY_##m, x, y) +#define KWIML_ABI_private_VERIFY_DIFF(m, x, y) KWIML_ABI_private_VERIFY_DIFF_IMPL(KWIML_ABI_detail_VERIFY_##m, x, y) + +KWIML_ABI_private_VERIFY_SIZE(KWIML_ABI_SIZEOF_DATA_PTR, int*); +KWIML_ABI_private_VERIFY_SIZE(KWIML_ABI_SIZEOF_CODE_PTR, int(*)(int)); +KWIML_ABI_private_VERIFY_SIZE(KWIML_ABI_SIZEOF_CHAR, char); +KWIML_ABI_private_VERIFY_SIZE(KWIML_ABI_SIZEOF_SHORT, short); +KWIML_ABI_private_VERIFY_SIZE(KWIML_ABI_SIZEOF_INT, int); +KWIML_ABI_private_VERIFY_SIZE(KWIML_ABI_SIZEOF_LONG, long); +#if defined(KWIML_ABI_SIZEOF_LONG_LONG) && KWIML_ABI_SIZEOF_LONG_LONG > 0 +KWIML_ABI_private_VERIFY_SIZE(KWIML_ABI_SIZEOF_LONG_LONG, long long); +#endif +#if defined(KWIML_ABI_SIZEOF___INT64) && KWIML_ABI_SIZEOF___INT64 > 0 +KWIML_ABI_private_VERIFY_SIZE(KWIML_ABI_SIZEOF___INT64, __int64); +#endif +KWIML_ABI_private_VERIFY_SIZE(KWIML_ABI_SIZEOF_FLOAT, float); +KWIML_ABI_private_VERIFY_SIZE(KWIML_ABI_SIZEOF_DOUBLE, double); + +#if defined(KWIML_ABI___INT64_IS_LONG) +KWIML_ABI_private_VERIFY_SAME(KWIML_ABI___INT64_IS_LONG, __int64, long); +#elif defined(KWIML_ABI___INT64_IS_LONG_LONG) +KWIML_ABI_private_VERIFY_SAME(KWIML_ABI___INT64_IS_LONG_LONG, __int64, long long); +#elif defined(KWIML_ABI_SIZEOF___INT64) && KWIML_ABI_SIZEOF___INT64 > 0 +KWIML_ABI_private_VERIFY_DIFF(KWIML_ABI___INT64_NOT_LONG, __int64, long); +# if defined(KWIML_ABI_SIZEOF_LONG_LONG) && KWIML_ABI_SIZEOF_LONG_LONG > 0 +KWIML_ABI_private_VERIFY_DIFF(KWIML_ABI___INT64_NOT_LONG_LONG, __int64, long long); +# endif +#endif + +#if defined(KWIML_ABI_CHAR_IS_UNSIGNED) +KWIML_ABI_private_VERIFY_BOOL(KWIML_ABI_CHAR_IS_UNSIGNED, (char)0x80 > 0); +#elif defined(KWIML_ABI_CHAR_IS_SIGNED) +KWIML_ABI_private_VERIFY_BOOL(KWIML_ABI_CHAR_IS_SIGNED, (char)0x80 < 0); +#endif + +#undef KWIML_ABI_private_VERIFY_DIFF +#undef KWIML_ABI_private_VERIFY_SAME +#undef KWIML_ABI_private_VERIFY_SIZE +#undef KWIML_ABI_private_VERIFY_BOOL + +#undef KWIML_ABI_private_VERIFY_DIFF_IMPL_1 +#undef KWIML_ABI_private_VERIFY_DIFF_IMPL_0 +#undef KWIML_ABI_private_VERIFY_DIFF_IMPL + +#undef KWIML_ABI_private_VERIFY_SAME_IMPL_1 +#undef KWIML_ABI_private_VERIFY_SAME_IMPL_0 +#undef KWIML_ABI_private_VERIFY_SAME_IMPL + +#undef KWIML_ABI_private_VERIFY_1 +#undef KWIML_ABI_private_VERIFY_0 +#undef KWIML_ABI_private_VERIFY + +#if defined(_MSC_VER) +# pragma warning (pop) +#endif + +#endif /* KWIML_ABI_private_DO_VERIFY */ + +#undef KWIML_ABI_private_VERSION diff --git a/include/kwiml/int.h b/include/kwiml/int.h new file mode 100644 index 0000000..b297ace --- /dev/null +++ b/include/kwiml/int.h @@ -0,0 +1,1069 @@ +/*============================================================================ + Kitware Information Macro Library + Copyright 2010-2015 Kitware, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Kitware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +============================================================================*/ +/* +This header defines macros with information about sized integer types. +Only information that can be determined using the preprocessor at +compilation time is available. No try-compile results may be added +here. Instead we memorize results on platforms of interest. + +An includer may optionally define the following macros to suppress errors: + +Input: + KWIML_INT_NO_VERIFY = skip verification declarations + KWIML_INT_NO_ERROR_INT64_T = type 'KWIML_INT_int64_t' is optional (*) + KWIML_INT_NO_ERROR_UINT64_T = type 'KWIML_INT_uint64_t' is optional (*) + KWIML_INT_NO_ERROR_INTPTR_T = type 'KWIML_INT_intptr_t' is optional (*) + KWIML_INT_NO_ERROR_UINTPTR_T = type 'KWIML_INT_uintptr_t' is optional (*) + +An includer may optionally define the following macros to override defaults. +Either way, an includer may test these macros after inclusion: + + KWIML_INT_HAVE_STDINT_H = include + KWIML_INT_NO_STDINT_H = do not include + KWIML_INT_HAVE_INTTYPES_H = include + KWIML_INT_NO_INTTYPES_H = do not include + +An includer may test the following macros after inclusion: + + KWIML_INT_VERSION = interface version number # of this header + + KWIML_INT_HAVE_INT#_T = type 'int#_t' is available + KWIML_INT_HAVE_UINT#_T = type 'uint#_t' is available + # = 8, 16, 32, 64, PTR + + KWIML_INT_int#_t = signed integer type exactly # bits wide + KWIML_INT_uint#_t = unsigned integer type exactly # bits wide + # = 8, 16, 32, 64 (*), ptr (*) + + KWIML_INT_NO_INT64_T = type 'KWIML_INT_int64_t' not available + KWIML_INT_NO_UINT64_T = type 'KWIML_INT_uint64_t' not available + KWIML_INT_NO_INTPTR_T = type 'KWIML_INT_intptr_t' not available + KWIML_INT_NO_UINTPTR_T = type 'KWIML_INT_uintptr_t' not available + + KWIML_INT_INT#_C(c) = signed integer constant at least # bits wide + KWIML_INT_UINT#_C(c) = unsigned integer constant at least # bits wide + # = 8, 16, 32, 64 (*) + + KWIML_INT_# = print or scan format, in table below + # = 8, 16, 32, 64, PTR (*) + + signed unsigned + ----------- ------------------------------ + | decimal | decimal octal hexadecimal | + print | PRId PRIi | PRIu PRIo PRIx PRIX | + scan | SCNd SCNi | SCNu SCNo SCNx | + ----------- ------------------------------ + + The SCN*8 and SCN*64 format macros will not be defined on systems + with scanf implementations known not to support them. + + KWIML_INT_BROKEN_# = macro # is incorrect if defined + Some compilers define integer format macros incorrectly for their + own formatted print/scan implementations. + + KWIML_INT_BROKEN_INT#_C = macro INT#_C is incorrect if defined + KWIML_INT_BROKEN_UINT#_C = macro UINT#_C is incorrect if defined + Some compilers define integer constant macros incorrectly and + cannot handle literals as large as the integer type or even + produce bad preprocessor syntax. + + KWIML_INT_BROKEN_INT8_T = type 'int8_t' is available but incorrect + Some compilers have a flag to make 'char' (un)signed but do not account + for it while defining int8_t in the non-default case. + + The broken cases do not affect correctness of the macros documented above. +*/ + +#include "abi.h" + +#define KWIML_INT_private_VERSION 1 + +/* Guard definition of this version. */ +#ifndef KWIML_INT_detail_DEFINED_VERSION_1 +# define KWIML_INT_detail_DEFINED_VERSION_1 1 +# define KWIML_INT_private_DO_DEFINE +#endif + +/* Guard verification of this version. */ +#if !defined(KWIML_INT_NO_VERIFY) +# ifndef KWIML_INT_detail_VERIFIED_VERSION_1 +# define KWIML_INT_detail_VERIFIED_VERSION_1 +# define KWIML_INT_private_DO_VERIFY +# endif +#endif + +#ifdef KWIML_INT_private_DO_DEFINE +#undef KWIML_INT_private_DO_DEFINE + +/* Define version as most recent of those included. */ +#if !defined(KWIML_INT_VERSION) || KWIML_INT_VERSION < KWIML_INT_private_VERSION +# undef KWIML_INT_VERSION +# define KWIML_INT_VERSION 1 +#endif + +/*--------------------------------------------------------------------------*/ +#if defined(KWIML_INT_HAVE_STDINT_H) /* Already defined. */ +#elif defined(KWIML_INT_NO_STDINT_H) /* Already defined. */ +#elif defined(HAVE_STDINT_H) /* Optionally provided by includer. */ +# define KWIML_INT_HAVE_STDINT_H 1 +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ +# define KWIML_INT_HAVE_STDINT_H 1 +#elif defined(_MSC_VER) /* MSVC */ +# if _MSC_VER >= 1600 +# define KWIML_INT_HAVE_STDINT_H 1 +# else +# define KWIML_INT_NO_STDINT_H 1 +# endif +#elif defined(__BORLANDC__) /* Borland */ +# if __BORLANDC__ >= 0x560 +# define KWIML_INT_HAVE_STDINT_H 1 +# else +# define KWIML_INT_NO_STDINT_H 1 +# endif +#elif defined(__WATCOMC__) /* Watcom */ +# define KWIML_INT_NO_STDINT_H 1 +#endif + +/*--------------------------------------------------------------------------*/ +#if defined(KWIML_INT_HAVE_INTTYPES_H) /* Already defined. */ +#elif defined(KWIML_INT_NO_INTTYPES_H) /* Already defined. */ +#elif defined(HAVE_INTTYPES_H) /* Optionally provided by includer. */ +# define KWIML_INT_HAVE_INTTYPES_H 1 +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ +# define KWIML_INT_HAVE_INTTYPES_H 1 +#elif defined(_MSC_VER) /* MSVC */ +# define KWIML_INT_NO_INTTYPES_H 1 +#elif defined(__BORLANDC__) /* Borland */ +# define KWIML_INT_NO_INTTYPES_H 1 +#elif defined(__WATCOMC__) /* Watcom */ +# define KWIML_INT_NO_INTTYPES_H 1 +#else /* Assume it exists. */ +# define KWIML_INT_HAVE_INTTYPES_H 1 +#endif + +/*--------------------------------------------------------------------------*/ +#if defined(KWIML_INT_HAVE_STDINT_H) && defined(KWIML_INT_NO_STDINT_H) +# error "Both KWIML_INT_HAVE_STDINT_H and KWIML_INT_NO_STDINT_H defined!" +#endif +#if defined(KWIML_INT_HAVE_INTTYPES_H) && defined(KWIML_INT_NO_INTTYPES_H) +# error "Both KWIML_INT_HAVE_INTTYPES_H and KWIML_INT_NO_INTTYPES_H defined!" +#endif + +#if defined(KWIML_INT_HAVE_STDINT_H) +# ifndef KWIML_INT_detail_INCLUDED_STDINT_H +# define KWIML_INT_detail_INCLUDED_STDINT_H +# include +# endif +#endif +#if defined(KWIML_INT_HAVE_INTTYPES_H) +# ifndef KWIML_INT_detail_INCLUDED_INTTYPES_H +# define KWIML_INT_detail_INCLUDED_INTTYPES_H +# if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) +# define __STDC_FORMAT_MACROS +# endif +# include +# endif +#endif + +#if defined(KWIML_INT_HAVE_STDINT_H) || defined(KWIML_INT_HAVE_INTTYPES_H) +#define KWIML_INT_HAVE_INT8_T 1 +#define KWIML_INT_HAVE_UINT8_T 1 +#define KWIML_INT_HAVE_INT16_T 1 +#define KWIML_INT_HAVE_UINT16_T 1 +#define KWIML_INT_HAVE_INT32_T 1 +#define KWIML_INT_HAVE_UINT32_T 1 +#define KWIML_INT_HAVE_INT64_T 1 +#define KWIML_INT_HAVE_UINT64_T 1 +#define KWIML_INT_HAVE_INTPTR_T 1 +#define KWIML_INT_HAVE_UINTPTR_T 1 +# if defined(__cplusplus) +# define KWIML_INT_detail_GLOBAL_NS(T) ::T +# else +# define KWIML_INT_detail_GLOBAL_NS(T) T +# endif +#endif + +#if defined(_AIX43) && !defined(_AIX50) && !defined(_AIX51) + /* AIX 4.3 defines these incorrectly with % and no quotes. */ +# define KWIML_INT_BROKEN_PRId8 1 +# define KWIML_INT_BROKEN_SCNd8 1 +# define KWIML_INT_BROKEN_PRIi8 1 +# define KWIML_INT_BROKEN_SCNi8 1 +# define KWIML_INT_BROKEN_PRIo8 1 +# define KWIML_INT_BROKEN_SCNo8 1 +# define KWIML_INT_BROKEN_PRIu8 1 +# define KWIML_INT_BROKEN_SCNu8 1 +# define KWIML_INT_BROKEN_PRIx8 1 +# define KWIML_INT_BROKEN_SCNx8 1 +# define KWIML_INT_BROKEN_PRIX8 1 +# define KWIML_INT_BROKEN_PRId16 1 +# define KWIML_INT_BROKEN_SCNd16 1 +# define KWIML_INT_BROKEN_PRIi16 1 +# define KWIML_INT_BROKEN_SCNi16 1 +# define KWIML_INT_BROKEN_PRIo16 1 +# define KWIML_INT_BROKEN_SCNo16 1 +# define KWIML_INT_BROKEN_PRIu16 1 +# define KWIML_INT_BROKEN_SCNu16 1 +# define KWIML_INT_BROKEN_PRIx16 1 +# define KWIML_INT_BROKEN_SCNx16 1 +# define KWIML_INT_BROKEN_PRIX16 1 +# define KWIML_INT_BROKEN_PRId32 1 +# define KWIML_INT_BROKEN_SCNd32 1 +# define KWIML_INT_BROKEN_PRIi32 1 +# define KWIML_INT_BROKEN_SCNi32 1 +# define KWIML_INT_BROKEN_PRIo32 1 +# define KWIML_INT_BROKEN_SCNo32 1 +# define KWIML_INT_BROKEN_PRIu32 1 +# define KWIML_INT_BROKEN_SCNu32 1 +# define KWIML_INT_BROKEN_PRIx32 1 +# define KWIML_INT_BROKEN_SCNx32 1 +# define KWIML_INT_BROKEN_PRIX32 1 +# define KWIML_INT_BROKEN_PRId64 1 +# define KWIML_INT_BROKEN_SCNd64 1 +# define KWIML_INT_BROKEN_PRIi64 1 +# define KWIML_INT_BROKEN_SCNi64 1 +# define KWIML_INT_BROKEN_PRIo64 1 +# define KWIML_INT_BROKEN_SCNo64 1 +# define KWIML_INT_BROKEN_PRIu64 1 +# define KWIML_INT_BROKEN_SCNu64 1 +# define KWIML_INT_BROKEN_PRIx64 1 +# define KWIML_INT_BROKEN_SCNx64 1 +# define KWIML_INT_BROKEN_PRIX64 1 +# define KWIML_INT_BROKEN_PRIdPTR 1 +# define KWIML_INT_BROKEN_SCNdPTR 1 +# define KWIML_INT_BROKEN_PRIiPTR 1 +# define KWIML_INT_BROKEN_SCNiPTR 1 +# define KWIML_INT_BROKEN_PRIoPTR 1 +# define KWIML_INT_BROKEN_SCNoPTR 1 +# define KWIML_INT_BROKEN_PRIuPTR 1 +# define KWIML_INT_BROKEN_SCNuPTR 1 +# define KWIML_INT_BROKEN_PRIxPTR 1 +# define KWIML_INT_BROKEN_SCNxPTR 1 +# define KWIML_INT_BROKEN_PRIXPTR 1 +#endif + +#if (defined(__SUNPRO_C)||defined(__SUNPRO_CC)) && defined(_CHAR_IS_UNSIGNED) +# define KWIML_INT_BROKEN_INT8_T 1 /* system type defined incorrectly */ +#elif defined(__BORLANDC__) && defined(_CHAR_UNSIGNED) +# define KWIML_INT_BROKEN_INT8_T 1 /* system type defined incorrectly */ +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_INT_int8_t) +# if defined(KWIML_INT_HAVE_INT8_T) && !defined(KWIML_INT_BROKEN_INT8_T) +# define KWIML_INT_int8_t KWIML_INT_detail_GLOBAL_NS(int8_t) +# else +# define KWIML_INT_int8_t signed char +# endif +#endif +#if !defined(KWIML_INT_uint8_t) +# if defined(KWIML_INT_HAVE_UINT8_T) +# define KWIML_INT_uint8_t KWIML_INT_detail_GLOBAL_NS(uint8_t) +# else +# define KWIML_INT_uint8_t unsigned char +# endif +#endif + +#if defined(__INTEL_COMPILER) +# if defined(_WIN32) +# define KWIML_INT_private_NO_SCN8 +# endif +#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) +# define KWIML_INT_private_NO_SCN8 +#elif defined(__BORLANDC__) +# define KWIML_INT_private_NO_SCN8 +# define KWIML_INT_private_NO_SCN64 +#elif defined(_MSC_VER) +# define KWIML_INT_private_NO_SCN8 +#elif defined(__WATCOMC__) +# define KWIML_INT_private_NO_SCN8 +# elif defined(__hpux) /* HP runtime lacks support (any compiler) */ +# define KWIML_INT_private_NO_SCN8 +#endif + +/* 8-bit d, i */ +#if !defined(KWIML_INT_PRId8) +# if defined(KWIML_INT_HAVE_INT8_T) && defined(PRId8) \ + && !defined(KWIML_INT_BROKEN_PRId8) +# define KWIML_INT_PRId8 PRId8 +# else +# define KWIML_INT_PRId8 "d" +# endif +#endif +#if !defined(KWIML_INT_SCNd8) +# if defined(KWIML_INT_HAVE_INT8_T) && defined(SCNd8) \ + && !defined(KWIML_INT_BROKEN_SCNd8) +# define KWIML_INT_SCNd8 SCNd8 +# elif !defined(KWIML_INT_private_NO_SCN8) +# define KWIML_INT_SCNd8 "hhd" +# endif +#endif +#if !defined(KWIML_INT_PRIi8) +# if defined(KWIML_INT_HAVE_INT8_T) && defined(PRIi8) \ + && !defined(KWIML_INT_BROKEN_PRIi8) +# define KWIML_INT_PRIi8 PRIi8 +# else +# define KWIML_INT_PRIi8 "i" +# endif +#endif +#if !defined(KWIML_INT_SCNi8) +# if defined(KWIML_INT_HAVE_INT8_T) && defined(SCNi8) \ + && !defined(KWIML_INT_BROKEN_SCNi8) +# define KWIML_INT_SCNi8 SCNi8 +# elif !defined(KWIML_INT_private_NO_SCN8) +# define KWIML_INT_SCNi8 "hhi" +# endif +#endif + +/* 8-bit o, u, x, X */ +#if !defined(KWIML_INT_PRIo8) +# if defined(KWIML_INT_HAVE_UINT8_T) && defined(PRIo8) \ + && !defined(KWIML_INT_BROKEN_PRIo8) +# define KWIML_INT_PRIo8 PRIo8 +# else +# define KWIML_INT_PRIo8 "o" +# endif +#endif +#if !defined(KWIML_INT_SCNo8) +# if defined(KWIML_INT_HAVE_UINT8_T) && defined(SCNo8) \ + && !defined(KWIML_INT_BROKEN_SCNo8) +# define KWIML_INT_SCNo8 SCNo8 +# elif !defined(KWIML_INT_private_NO_SCN8) +# define KWIML_INT_SCNo8 "hho" +# endif +#endif +#if !defined(KWIML_INT_PRIu8) +# if defined(KWIML_INT_HAVE_UINT8_T) && defined(PRIu8) \ + && !defined(KWIML_INT_BROKEN_PRIu8) +# define KWIML_INT_PRIu8 PRIu8 +# else +# define KWIML_INT_PRIu8 "u" +# endif +#endif +#if !defined(KWIML_INT_SCNu8) +# if defined(KWIML_INT_HAVE_UINT8_T) && defined(SCNu8) \ + && !defined(KWIML_INT_BROKEN_SCNu8) +# define KWIML_INT_SCNu8 SCNu8 +# elif !defined(KWIML_INT_private_NO_SCN8) +# define KWIML_INT_SCNu8 "hhu" +# endif +#endif +#if !defined(KWIML_INT_PRIx8) +# if defined(KWIML_INT_HAVE_UINT8_T) && defined(PRIx8) \ + && !defined(KWIML_INT_BROKEN_PRIx8) +# define KWIML_INT_PRIx8 PRIx8 +# else +# define KWIML_INT_PRIx8 "x" +# endif +#endif +#if !defined(KWIML_INT_SCNx8) +# if defined(KWIML_INT_HAVE_UINT8_T) && defined(SCNx8) \ + && !defined(KWIML_INT_BROKEN_SCNx8) +# define KWIML_INT_SCNx8 SCNx8 +# elif !defined(KWIML_INT_private_NO_SCN8) +# define KWIML_INT_SCNx8 "hhx" +# endif +#endif +#if !defined(KWIML_INT_PRIX8) +# if defined(KWIML_INT_HAVE_UINT8_T) && defined(PRIX8) \ + && !defined(KWIML_INT_BROKEN_PRIX8) +# define KWIML_INT_PRIX8 PRIX8 +# else +# define KWIML_INT_PRIX8 "X" +# endif +#endif + +/* 8-bit constants */ +#if !defined(KWIML_INT_INT8_C) +# if defined(INT8_C) && !defined(KWIML_INT_BROKEN_INT8_C) +# define KWIML_INT_INT8_C(c) INT8_C(c) +# else +# define KWIML_INT_INT8_C(c) c +# endif +#endif +#if !defined(KWIML_INT_UINT8_C) +# if defined(UINT8_C) && !defined(KWIML_INT_BROKEN_UINT8_C) +# define KWIML_INT_UINT8_C(c) UINT8_C(c) +# else +# define KWIML_INT_UINT8_C(c) c ## u +# endif +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_INT_int16_t) +# if defined(KWIML_INT_HAVE_INT16_T) +# define KWIML_INT_int16_t KWIML_INT_detail_GLOBAL_NS(int16_t) +# else +# define KWIML_INT_int16_t signed short +# endif +#endif +#if !defined(KWIML_INT_uint16_t) +# if defined(KWIML_INT_HAVE_UINT16_T) +# define KWIML_INT_uint16_t KWIML_INT_detail_GLOBAL_NS(uint16_t) +# else +# define KWIML_INT_uint16_t unsigned short +# endif +#endif + +/* 16-bit d, i */ +#if !defined(KWIML_INT_PRId16) +# if defined(KWIML_INT_HAVE_INT16_T) && defined(PRId16) \ + && !defined(KWIML_INT_BROKEN_PRId16) +# define KWIML_INT_PRId16 PRId16 +# else +# define KWIML_INT_PRId16 "d" +# endif +#endif +#if !defined(KWIML_INT_SCNd16) +# if defined(KWIML_INT_HAVE_INT16_T) && defined(SCNd16) \ + && !defined(KWIML_INT_BROKEN_SCNd16) +# define KWIML_INT_SCNd16 SCNd16 +# else +# define KWIML_INT_SCNd16 "hd" +# endif +#endif +#if !defined(KWIML_INT_PRIi16) +# if defined(KWIML_INT_HAVE_INT16_T) && defined(PRIi16) \ + && !defined(KWIML_INT_BROKEN_PRIi16) +# define KWIML_INT_PRIi16 PRIi16 +# else +# define KWIML_INT_PRIi16 "i" +# endif +#endif +#if !defined(KWIML_INT_SCNi16) +# if defined(KWIML_INT_HAVE_INT16_T) && defined(SCNi16) \ + && !defined(KWIML_INT_BROKEN_SCNi16) +# define KWIML_INT_SCNi16 SCNi16 +# else +# define KWIML_INT_SCNi16 "hi" +# endif +#endif + +/* 16-bit o, u, x, X */ +#if !defined(KWIML_INT_PRIo16) +# if defined(KWIML_INT_HAVE_UINT16_T) && defined(PRIo16) \ + && !defined(KWIML_INT_BROKEN_PRIo16) +# define KWIML_INT_PRIo16 PRIo16 +# else +# define KWIML_INT_PRIo16 "o" +# endif +#endif +#if !defined(KWIML_INT_SCNo16) +# if defined(KWIML_INT_HAVE_UINT16_T) && defined(SCNo16) \ + && !defined(KWIML_INT_BROKEN_SCNo16) +# define KWIML_INT_SCNo16 SCNo16 +# else +# define KWIML_INT_SCNo16 "ho" +# endif +#endif +#if !defined(KWIML_INT_PRIu16) +# if defined(KWIML_INT_HAVE_UINT16_T) && defined(PRIu16) \ + && !defined(KWIML_INT_BROKEN_PRIu16) +# define KWIML_INT_PRIu16 PRIu16 +# else +# define KWIML_INT_PRIu16 "u" +# endif +#endif +#if !defined(KWIML_INT_SCNu16) +# if defined(KWIML_INT_HAVE_UINT16_T) && defined(SCNu16) \ + && !defined(KWIML_INT_BROKEN_SCNu16) +# define KWIML_INT_SCNu16 SCNu16 +# else +# define KWIML_INT_SCNu16 "hu" +# endif +#endif +#if !defined(KWIML_INT_PRIx16) +# if defined(KWIML_INT_HAVE_UINT16_T) && defined(PRIx16) \ + && !defined(KWIML_INT_BROKEN_PRIx16) +# define KWIML_INT_PRIx16 PRIx16 +# else +# define KWIML_INT_PRIx16 "x" +# endif +#endif +#if !defined(KWIML_INT_SCNx16) +# if defined(KWIML_INT_HAVE_UINT16_T) && defined(SCNx16) \ + && !defined(KWIML_INT_BROKEN_SCNx16) +# define KWIML_INT_SCNx16 SCNx16 +# else +# define KWIML_INT_SCNx16 "hx" +# endif +#endif +#if !defined(KWIML_INT_PRIX16) +# if defined(KWIML_INT_HAVE_UINT16_T) && defined(PRIX16) \ + && !defined(KWIML_INT_BROKEN_PRIX16) +# define KWIML_INT_PRIX16 PRIX16 +# else +# define KWIML_INT_PRIX16 "X" +# endif +#endif + +/* 16-bit constants */ +#if !defined(KWIML_INT_INT16_C) +# if defined(INT16_C) && !defined(KWIML_INT_BROKEN_INT16_C) +# define KWIML_INT_INT16_C(c) INT16_C(c) +# else +# define KWIML_INT_INT16_C(c) c +# endif +#endif +#if !defined(KWIML_INT_UINT16_C) +# if defined(UINT16_C) && !defined(KWIML_INT_BROKEN_UINT16_C) +# define KWIML_INT_UINT16_C(c) UINT16_C(c) +# else +# define KWIML_INT_UINT16_C(c) c ## u +# endif +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_INT_int32_t) +# if defined(KWIML_INT_HAVE_INT32_T) +# define KWIML_INT_int32_t KWIML_INT_detail_GLOBAL_NS(int32_t) +# else +# define KWIML_INT_int32_t signed int +# endif +#endif +#if !defined(KWIML_INT_uint32_t) +# if defined(KWIML_INT_HAVE_UINT32_T) +# define KWIML_INT_uint32_t KWIML_INT_detail_GLOBAL_NS(uint32_t) +# else +# define KWIML_INT_uint32_t unsigned int +# endif +#endif + +/* 32-bit d, i */ +#if !defined(KWIML_INT_PRId32) +# if defined(KWIML_INT_HAVE_INT32_T) && defined(PRId32) \ + && !defined(KWIML_INT_BROKEN_PRId32) +# define KWIML_INT_PRId32 PRId32 +# else +# define KWIML_INT_PRId32 "d" +# endif +#endif +#if !defined(KWIML_INT_SCNd32) +# if defined(KWIML_INT_HAVE_INT32_T) && defined(SCNd32) \ + && !defined(KWIML_INT_BROKEN_SCNd32) +# define KWIML_INT_SCNd32 SCNd32 +# else +# define KWIML_INT_SCNd32 "d" +# endif +#endif +#if !defined(KWIML_INT_PRIi32) +# if defined(KWIML_INT_HAVE_INT32_T) && defined(PRIi32) \ + && !defined(KWIML_INT_BROKEN_PRIi32) +# define KWIML_INT_PRIi32 PRIi32 +# else +# define KWIML_INT_PRIi32 "i" +# endif +#endif +#if !defined(KWIML_INT_SCNi32) +# if defined(KWIML_INT_HAVE_INT32_T) && defined(SCNi32) \ + && !defined(KWIML_INT_BROKEN_SCNi32) +# define KWIML_INT_SCNi32 SCNi32 +# else +# define KWIML_INT_SCNi32 "i" +# endif +#endif + +/* 32-bit o, u, x, X */ +#if !defined(KWIML_INT_PRIo32) +# if defined(KWIML_INT_HAVE_UINT32_T) && defined(PRIo32) \ + && !defined(KWIML_INT_BROKEN_PRIo32) +# define KWIML_INT_PRIo32 PRIo32 +# else +# define KWIML_INT_PRIo32 "o" +# endif +#endif +#if !defined(KWIML_INT_SCNo32) +# if defined(KWIML_INT_HAVE_UINT32_T) && defined(SCNo32) \ + && !defined(KWIML_INT_BROKEN_SCNo32) +# define KWIML_INT_SCNo32 SCNo32 +# else +# define KWIML_INT_SCNo32 "o" +# endif +#endif +#if !defined(KWIML_INT_PRIu32) +# if defined(KWIML_INT_HAVE_UINT32_T) && defined(PRIu32) \ + && !defined(KWIML_INT_BROKEN_PRIu32) +# define KWIML_INT_PRIu32 PRIu32 +# else +# define KWIML_INT_PRIu32 "u" +# endif +#endif +#if !defined(KWIML_INT_SCNu32) +# if defined(KWIML_INT_HAVE_UINT32_T) && defined(SCNu32) \ + && !defined(KWIML_INT_BROKEN_SCNu32) +# define KWIML_INT_SCNu32 SCNu32 +# else +# define KWIML_INT_SCNu32 "u" +# endif +#endif +#if !defined(KWIML_INT_PRIx32) +# if defined(KWIML_INT_HAVE_UINT32_T) && defined(PRIx32) \ + && !defined(KWIML_INT_BROKEN_PRIx32) +# define KWIML_INT_PRIx32 PRIx32 +# else +# define KWIML_INT_PRIx32 "x" +# endif +#endif +#if !defined(KWIML_INT_SCNx32) +# if defined(KWIML_INT_HAVE_UINT32_T) && defined(SCNx32) \ + && !defined(KWIML_INT_BROKEN_SCNx32) +# define KWIML_INT_SCNx32 SCNx32 +# else +# define KWIML_INT_SCNx32 "x" +# endif +#endif +#if !defined(KWIML_INT_PRIX32) +# if defined(KWIML_INT_HAVE_UINT32_T) && defined(PRIX32) \ + && !defined(KWIML_INT_BROKEN_PRIX32) +# define KWIML_INT_PRIX32 PRIX32 +# else +# define KWIML_INT_PRIX32 "X" +# endif +#endif + +#if defined(__hpux) && defined(__GNUC__) && !defined(__LP64__) \ + && defined(__CONCAT__) && defined(__CONCAT_U__) + /* Some HPs define UINT32_C incorrectly and break GNU. */ +# define KWIML_INT_BROKEN_UINT32_C 1 +#endif + +/* 32-bit constants */ +#if !defined(KWIML_INT_INT32_C) +# if defined(INT32_C) && !defined(KWIML_INT_BROKEN_INT32_C) +# define KWIML_INT_INT32_C(c) INT32_C(c) +# else +# define KWIML_INT_INT32_C(c) c +# endif +#endif +#if !defined(KWIML_INT_UINT32_C) +# if defined(UINT32_C) && !defined(KWIML_INT_BROKEN_UINT32_C) +# define KWIML_INT_UINT32_C(c) UINT32_C(c) +# else +# define KWIML_INT_UINT32_C(c) c ## u +# endif +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_INT_int64_t) && !defined(KWIML_INT_NO_INT64_T) +# if defined(KWIML_INT_HAVE_INT64_T) +# define KWIML_INT_int64_t KWIML_INT_detail_GLOBAL_NS(int64_t) +# elif KWIML_ABI_SIZEOF_LONG == 8 +# define KWIML_INT_int64_t signed long +# elif defined(KWIML_ABI_SIZEOF_LONG_LONG) && KWIML_ABI_SIZEOF_LONG_LONG == 8 +# define KWIML_INT_int64_t signed long long +# elif defined(KWIML_ABI_SIZEOF___INT64) +# define KWIML_INT_int64_t signed __int64 +# elif defined(KWIML_INT_NO_ERROR_INT64_T) +# define KWIML_INT_NO_INT64_T +# else +# error "No type known for 'int64_t'." +# endif +#endif +#if !defined(KWIML_INT_uint64_t) && !defined(KWIML_INT_NO_UINT64_T) +# if defined(KWIML_INT_HAVE_UINT64_T) +# define KWIML_INT_uint64_t KWIML_INT_detail_GLOBAL_NS(uint64_t) +# elif KWIML_ABI_SIZEOF_LONG == 8 +# define KWIML_INT_uint64_t unsigned long +# elif defined(KWIML_ABI_SIZEOF_LONG_LONG) && KWIML_ABI_SIZEOF_LONG_LONG == 8 +# define KWIML_INT_uint64_t unsigned long long +# elif defined(KWIML_ABI_SIZEOF___INT64) +# define KWIML_INT_uint64_t unsigned __int64 +# elif defined(KWIML_INT_NO_ERROR_UINT64_T) +# define KWIML_INT_NO_UINT64_T +# else +# error "No type known for 'uint64_t'." +# endif +#endif + +#if defined(__INTEL_COMPILER) +#elif defined(__BORLANDC__) +# define KWIML_INT_private_NO_FMTLL /* type 'long long' but not 'll' format */ +# define KWIML_INT_BROKEN_INT64_C 1 /* system macro defined incorrectly */ +# define KWIML_INT_BROKEN_UINT64_C 1 /* system macro defined incorrectly */ +#elif defined(_MSC_VER) && _MSC_VER < 1400 +# define KWIML_INT_private_NO_FMTLL /* type 'long long' but not 'll' format */ +#endif + +#if !defined(KWIML_INT_detail_FMT64) +# if KWIML_ABI_SIZEOF_LONG == 8 +# define KWIML_INT_detail_FMT64 "l" +# elif defined(KWIML_ABI_SIZEOF_LONG_LONG) && KWIML_ABI_SIZEOF_LONG_LONG == 8 +# if !defined(KWIML_INT_private_NO_FMTLL) +# define KWIML_INT_detail_FMT64 "ll" +# else +# define KWIML_INT_detail_FMT64 "I64" +# endif +# elif defined(KWIML_ABI_SIZEOF___INT64) +# if defined(__BORLANDC__) +# define KWIML_INT_detail_FMT64 "L" +# else +# define KWIML_INT_detail_FMT64 "I64" +# endif +# endif +#endif + +#undef KWIML_INT_private_NO_FMTLL + +/* 64-bit d, i */ +#if !defined(KWIML_INT_PRId64) +# if defined(KWIML_INT_HAVE_INT64_T) && defined(PRId64) \ + && !defined(KWIML_INT_BROKEN_PRId64) +# define KWIML_INT_PRId64 PRId64 +# elif defined(KWIML_INT_detail_FMT64) +# define KWIML_INT_PRId64 KWIML_INT_detail_FMT64 "d" +# endif +#endif +#if !defined(KWIML_INT_SCNd64) +# if defined(KWIML_INT_HAVE_INT64_T) && defined(SCNd64) \ + && !defined(KWIML_INT_BROKEN_SCNd64) +# define KWIML_INT_SCNd64 SCNd64 +# elif defined(KWIML_INT_detail_FMT64) && !defined(KWIML_INT_private_NO_SCN64) +# define KWIML_INT_SCNd64 KWIML_INT_detail_FMT64 "d" +# endif +#endif +#if !defined(KWIML_INT_PRIi64) +# if defined(KWIML_INT_HAVE_INT64_T) && defined(PRIi64) \ + && !defined(KWIML_INT_BROKEN_PRIi64) +# define KWIML_INT_PRIi64 PRIi64 +# elif defined(KWIML_INT_detail_FMT64) +# define KWIML_INT_PRIi64 KWIML_INT_detail_FMT64 "d" +# endif +#endif +#if !defined(KWIML_INT_SCNi64) +# if defined(KWIML_INT_HAVE_INT64_T) && defined(SCNi64) \ + && !defined(KWIML_INT_BROKEN_SCNi64) +# define KWIML_INT_SCNi64 SCNi64 +# elif defined(KWIML_INT_detail_FMT64) && !defined(KWIML_INT_private_NO_SCN64) +# define KWIML_INT_SCNi64 KWIML_INT_detail_FMT64 "d" +# endif +#endif + +/* 64-bit o, u, x, X */ +#if !defined(KWIML_INT_PRIo64) +# if defined(KWIML_INT_HAVE_UINT64_T) && defined(PRIo64) \ + && !defined(KWIML_INT_BROKEN_PRIo64) +# define KWIML_INT_PRIo64 PRIo64 +# elif defined(KWIML_INT_detail_FMT64) +# define KWIML_INT_PRIo64 KWIML_INT_detail_FMT64 "o" +# endif +#endif +#if !defined(KWIML_INT_SCNo64) +# if defined(KWIML_INT_HAVE_UINT64_T) && defined(SCNo64) \ + && !defined(KWIML_INT_BROKEN_SCNo64) +# define KWIML_INT_SCNo64 SCNo64 +# elif defined(KWIML_INT_detail_FMT64) && !defined(KWIML_INT_private_NO_SCN64) +# define KWIML_INT_SCNo64 KWIML_INT_detail_FMT64 "o" +# endif +#endif +#if !defined(KWIML_INT_PRIu64) +# if defined(KWIML_INT_HAVE_UINT64_T) && defined(PRIu64) \ + && !defined(KWIML_INT_BROKEN_PRIu64) +# define KWIML_INT_PRIu64 PRIu64 +# elif defined(KWIML_INT_detail_FMT64) +# define KWIML_INT_PRIu64 KWIML_INT_detail_FMT64 "u" +# endif +#endif +#if !defined(KWIML_INT_SCNu64) +# if defined(KWIML_INT_HAVE_UINT64_T) && defined(SCNu64) \ + && !defined(KWIML_INT_BROKEN_SCNu64) +# define KWIML_INT_SCNu64 SCNu64 +# elif defined(KWIML_INT_detail_FMT64) && !defined(KWIML_INT_private_NO_SCN64) +# define KWIML_INT_SCNu64 KWIML_INT_detail_FMT64 "u" +# endif +#endif +#if !defined(KWIML_INT_PRIx64) +# if defined(KWIML_INT_HAVE_UINT64_T) && defined(PRIx64) \ + && !defined(KWIML_INT_BROKEN_PRIx64) +# define KWIML_INT_PRIx64 PRIx64 +# elif defined(KWIML_INT_detail_FMT64) +# define KWIML_INT_PRIx64 KWIML_INT_detail_FMT64 "x" +# endif +#endif +#if !defined(KWIML_INT_SCNx64) +# if defined(KWIML_INT_HAVE_UINT64_T) && defined(SCNx64) \ + && !defined(KWIML_INT_BROKEN_SCNx64) +# define KWIML_INT_SCNx64 SCNx64 +# elif defined(KWIML_INT_detail_FMT64) && !defined(KWIML_INT_private_NO_SCN64) +# define KWIML_INT_SCNx64 KWIML_INT_detail_FMT64 "x" +# endif +#endif +#if !defined(KWIML_INT_PRIX64) +# if defined(KWIML_INT_HAVE_UINT64_T) && defined(PRIX64) \ + && !defined(KWIML_INT_BROKEN_PRIX64) +# define KWIML_INT_PRIX64 PRIX64 +# elif defined(KWIML_INT_detail_FMT64) +# define KWIML_INT_PRIX64 KWIML_INT_detail_FMT64 "X" +# endif +#endif + +/* 64-bit constants */ +#if !defined(KWIML_INT_INT64_C) +# if defined(KWIML_INT_HAVE_INT64_T) && defined(INT64_C) \ + && !defined(KWIML_INT_BROKEN_INT64_C) +# define KWIML_INT_INT64_C(c) INT64_C(c) +# elif KWIML_ABI_SIZEOF_LONG == 8 +# define KWIML_INT_INT64_C(c) c ## l +# elif defined(KWIML_ABI_SIZEOF_LONG_LONG) && KWIML_ABI_SIZEOF_LONG_LONG == 8 +# define KWIML_INT_INT64_C(c) c ## ll +# elif defined(KWIML_ABI_SIZEOF___INT64) +# define KWIML_INT_INT64_C(c) c ## i64 +# endif +#endif +#if !defined(KWIML_INT_UINT64_C) +# if defined(KWIML_INT_HAVE_UINT64_T) && defined(UINT64_C) \ + && !defined(KWIML_INT_BROKEN_UINT64_C) +# define KWIML_INT_UINT64_C(c) UINT64_C(c) +# elif KWIML_ABI_SIZEOF_LONG == 8 +# define KWIML_INT_UINT64_C(c) c ## ul +# elif defined(KWIML_ABI_SIZEOF_LONG_LONG) && KWIML_ABI_SIZEOF_LONG_LONG == 8 +# define KWIML_INT_UINT64_C(c) c ## ull +# elif defined(KWIML_ABI_SIZEOF___INT64) +# define KWIML_INT_UINT64_C(c) c ## ui64 +# endif +#endif + +/*--------------------------------------------------------------------------*/ +#if !defined(KWIML_INT_intptr_t) && !defined(KWIML_INT_NO_INTPTR_T) +# if defined(KWIML_INT_HAVE_INTPTR_T) +# define KWIML_INT_intptr_t KWIML_INT_detail_GLOBAL_NS(intptr_t) +# elif KWIML_ABI_SIZEOF_DATA_PTR == 4 +# define KWIML_INT_intptr_t KWIML_INT_int32_t +# elif !defined(KWIML_INT_NO_INT64_T) +# define KWIML_INT_intptr_t KWIML_INT_int64_t +# elif defined(KWIML_INT_NO_ERROR_INTPTR_T) +# define KWIML_INT_NO_INTPTR_T +# else +# error "No type known for 'intptr_t'." +# endif +#endif +#if !defined(KWIML_INT_uintptr_t) && !defined(KWIML_INT_NO_UINTPTR_T) +# if defined(KWIML_INT_HAVE_UINTPTR_T) +# define KWIML_INT_uintptr_t KWIML_INT_detail_GLOBAL_NS(uintptr_t) +# elif KWIML_ABI_SIZEOF_DATA_PTR == 4 +# define KWIML_INT_uintptr_t KWIML_INT_uint32_t +# elif !defined(KWIML_INT_NO_UINT64_T) +# define KWIML_INT_uintptr_t KWIML_INT_uint64_t +# elif defined(KWIML_INT_NO_ERROR_UINTPTR_T) +# define KWIML_INT_NO_UINTPTR_T +# else +# error "No type known for 'uintptr_t'." +# endif +#endif + +#if !defined(KWIML_INT_PRIdPTR) +# if defined(KWIML_INT_HAVE_INTPTR_T) && defined(PRIdPTR) \ + && !defined(KWIML_INT_BROKEN_PRIdPTR) +# define KWIML_INT_PRIdPTR PRIdPTR +# elif KWIML_ABI_SIZEOF_DATA_PTR == 4 +# define KWIML_INT_PRIdPTR KWIML_INT_PRId32 +# elif !defined(KWIML_INT_NO_UINT64_T) +# define KWIML_INT_PRIdPTR KWIML_INT_PRId64 +# endif +#endif +#if !defined(KWIML_INT_SCNdPTR) +# if defined(KWIML_INT_HAVE_INTPTR_T) && defined(SCNdPTR) \ + && !defined(KWIML_INT_BROKEN_SCNdPTR) +# define KWIML_INT_SCNdPTR SCNdPTR +# elif KWIML_ABI_SIZEOF_DATA_PTR == 4 +# define KWIML_INT_SCNdPTR KWIML_INT_SCNd32 +# elif !defined(KWIML_INT_NO_UINT64_T) +# define KWIML_INT_SCNdPTR KWIML_INT_SCNd64 +# endif +#endif +#if !defined(KWIML_INT_PRIiPTR) +# if defined(KWIML_INT_HAVE_INTPTR_T) && defined(PRIiPTR) \ + && !defined(KWIML_INT_BROKEN_PRIiPTR) +# define KWIML_INT_PRIiPTR PRIiPTR +# elif KWIML_ABI_SIZEOF_DATA_PTR == 4 +# define KWIML_INT_PRIiPTR KWIML_INT_PRIi32 +# elif !defined(KWIML_INT_NO_UINT64_T) +# define KWIML_INT_PRIiPTR KWIML_INT_PRIi64 +# endif +#endif +#if !defined(KWIML_INT_SCNiPTR) +# if defined(KWIML_INT_HAVE_INTPTR_T) && defined(SCNiPTR) \ + && !defined(KWIML_INT_BROKEN_SCNiPTR) +# define KWIML_INT_SCNiPTR SCNiPTR +# elif KWIML_ABI_SIZEOF_DATA_PTR == 4 +# define KWIML_INT_SCNiPTR KWIML_INT_SCNi32 +# elif !defined(KWIML_INT_NO_UINT64_T) +# define KWIML_INT_SCNiPTR KWIML_INT_SCNi64 +# endif +#endif + +#if !defined(KWIML_INT_PRIoPTR) +# if defined(KWIML_INT_HAVE_UINTPTR_T) && defined(PRIoPTR) \ + && !defined(KWIML_INT_BROKEN_PRIoPTR) +# define KWIML_INT_PRIoPTR PRIoPTR +# elif KWIML_ABI_SIZEOF_DATA_PTR == 4 +# define KWIML_INT_PRIoPTR KWIML_INT_PRIo32 +# elif !defined(KWIML_INT_NO_UINT64_T) +# define KWIML_INT_PRIoPTR KWIML_INT_PRIo64 +# endif +#endif +#if !defined(KWIML_INT_SCNoPTR) +# if defined(KWIML_INT_HAVE_UINTPTR_T) && defined(SCNoPTR) \ + && !defined(KWIML_INT_BROKEN_SCNoPTR) +# define KWIML_INT_SCNoPTR SCNoPTR +# elif KWIML_ABI_SIZEOF_DATA_PTR == 4 +# define KWIML_INT_SCNoPTR KWIML_INT_SCNo32 +# elif !defined(KWIML_INT_NO_UINT64_T) +# define KWIML_INT_SCNoPTR KWIML_INT_SCNo64 +# endif +#endif +#if !defined(KWIML_INT_PRIuPTR) +# if defined(KWIML_INT_HAVE_UINTPTR_T) && defined(PRIuPTR) \ + && !defined(KWIML_INT_BROKEN_PRIuPTR) +# define KWIML_INT_PRIuPTR PRIuPTR +# elif KWIML_ABI_SIZEOF_DATA_PTR == 4 +# define KWIML_INT_PRIuPTR KWIML_INT_PRIu32 +# elif !defined(KWIML_INT_NO_UINT64_T) +# define KWIML_INT_PRIuPTR KWIML_INT_PRIu64 +# endif +#endif +#if !defined(KWIML_INT_SCNuPTR) +# if defined(KWIML_INT_HAVE_UINTPTR_T) && defined(SCNuPTR) \ + && !defined(KWIML_INT_BROKEN_SCNuPTR) +# define KWIML_INT_SCNuPTR SCNuPTR +# elif KWIML_ABI_SIZEOF_DATA_PTR == 4 +# define KWIML_INT_SCNuPTR KWIML_INT_SCNu32 +# elif !defined(KWIML_INT_NO_UINT64_T) +# define KWIML_INT_SCNuPTR KWIML_INT_SCNu64 +# endif +#endif +#if !defined(KWIML_INT_PRIxPTR) +# if defined(KWIML_INT_HAVE_UINTPTR_T) && defined(PRIxPTR) \ + && !defined(KWIML_INT_BROKEN_PRIxPTR) +# define KWIML_INT_PRIxPTR PRIxPTR +# elif KWIML_ABI_SIZEOF_DATA_PTR == 4 +# define KWIML_INT_PRIxPTR KWIML_INT_PRIx32 +# elif !defined(KWIML_INT_NO_UINT64_T) +# define KWIML_INT_PRIxPTR KWIML_INT_PRIx64 +# endif +#endif +#if !defined(KWIML_INT_SCNxPTR) +# if defined(KWIML_INT_HAVE_UINTPTR_T) && defined(SCNxPTR) \ + && !defined(KWIML_INT_BROKEN_SCNxPTR) +# define KWIML_INT_SCNxPTR SCNxPTR +# elif KWIML_ABI_SIZEOF_DATA_PTR == 4 +# define KWIML_INT_SCNxPTR KWIML_INT_SCNx32 +# elif !defined(KWIML_INT_NO_UINT64_T) +# define KWIML_INT_SCNxPTR KWIML_INT_SCNx64 +# endif +#endif +#if !defined(KWIML_INT_PRIXPTR) +# if defined(KWIML_INT_HAVE_UINTPTR_T) && defined(PRIXPTR) \ + && !defined(KWIML_INT_BROKEN_PRIXPTR) +# define KWIML_INT_PRIXPTR PRIXPTR +# elif KWIML_ABI_SIZEOF_DATA_PTR == 4 +# define KWIML_INT_PRIXPTR KWIML_INT_PRIX32 +# elif !defined(KWIML_INT_NO_UINT64_T) +# define KWIML_INT_PRIXPTR KWIML_INT_PRIX64 +# endif +#endif + +#undef KWIML_INT_private_NO_SCN64 +#undef KWIML_INT_private_NO_SCN8 + +#endif /* KWIML_INT_private_DO_DEFINE */ + +/*--------------------------------------------------------------------------*/ +#ifdef KWIML_INT_private_DO_VERIFY +#undef KWIML_INT_private_DO_VERIFY + +#if defined(_MSC_VER) +# pragma warning (push) +# pragma warning (disable:4310) /* cast truncates constant value */ +#endif + +#define KWIML_INT_private_VERIFY(n, x, y) KWIML_INT_private_VERIFY_0(KWIML_INT_private_VERSION, n, x, y) +#define KWIML_INT_private_VERIFY_0(V, n, x, y) KWIML_INT_private_VERIFY_1(V, n, x, y) +#define KWIML_INT_private_VERIFY_1(V, n, x, y) extern int (*n##_v##V)[x]; extern int (*n##_v##V)[y] + +#define KWIML_INT_private_VERIFY_BOOL(m, b) KWIML_INT_private_VERIFY(KWIML_INT_detail_VERIFY_##m, 2, (b)?2:3) +#define KWIML_INT_private_VERIFY_TYPE(t, s) KWIML_INT_private_VERIFY(KWIML_INT_detail_VERIFY_##t, s, sizeof(t)) +#define KWIML_INT_private_VERIFY_SIGN(t, u, o) KWIML_INT_private_VERIFY_BOOL(SIGN_##t, (t)((u)1 << ((sizeof(t)<<3)-1)) o 0) + +KWIML_INT_private_VERIFY_TYPE(KWIML_INT_int8_t, 1); +KWIML_INT_private_VERIFY_TYPE(KWIML_INT_uint8_t, 1); +KWIML_INT_private_VERIFY_TYPE(KWIML_INT_int16_t, 2); +KWIML_INT_private_VERIFY_TYPE(KWIML_INT_uint16_t, 2); +KWIML_INT_private_VERIFY_TYPE(KWIML_INT_int32_t, 4); +KWIML_INT_private_VERIFY_TYPE(KWIML_INT_uint32_t, 4); +#if !defined(KWIML_INT_NO_INT64_T) +KWIML_INT_private_VERIFY_TYPE(KWIML_INT_int64_t, 8); +#endif +#if !defined(KWIML_INT_NO_UINT64_T) +KWIML_INT_private_VERIFY_TYPE(KWIML_INT_uint64_t, 8); +#endif +#if !defined(KWIML_INT_NO_INTPTR_T) +KWIML_INT_private_VERIFY_TYPE(KWIML_INT_intptr_t, sizeof(void*)); +#endif +#if !defined(KWIML_INT_NO_UINTPTR_T) +KWIML_INT_private_VERIFY_TYPE(KWIML_INT_uintptr_t, sizeof(void*)); +#endif + +KWIML_INT_private_VERIFY_SIGN(KWIML_INT_int8_t, KWIML_INT_uint8_t, <); +KWIML_INT_private_VERIFY_SIGN(KWIML_INT_uint8_t, KWIML_INT_uint8_t, >); +KWIML_INT_private_VERIFY_SIGN(KWIML_INT_int16_t, KWIML_INT_uint16_t, <); +KWIML_INT_private_VERIFY_SIGN(KWIML_INT_uint16_t, KWIML_INT_uint16_t, >); +KWIML_INT_private_VERIFY_SIGN(KWIML_INT_int32_t, KWIML_INT_uint32_t, <); +KWIML_INT_private_VERIFY_SIGN(KWIML_INT_uint32_t, KWIML_INT_uint32_t, >); +#if !defined(KWIML_INT_NO_INT64_T) +KWIML_INT_private_VERIFY_SIGN(KWIML_INT_int64_t, KWIML_INT_uint64_t, <); +#endif +#if !defined(KWIML_INT_NO_UINT64_T) +KWIML_INT_private_VERIFY_SIGN(KWIML_INT_uint64_t, KWIML_INT_uint64_t, >); +#endif +#if !defined(KWIML_INT_NO_INTPTR_T) +KWIML_INT_private_VERIFY_SIGN(KWIML_INT_intptr_t, KWIML_INT_uintptr_t, <); +#endif +#if !defined(KWIML_INT_NO_UINTPTR_T) +KWIML_INT_private_VERIFY_SIGN(KWIML_INT_uintptr_t, KWIML_INT_uintptr_t, >); +#endif + +#undef KWIML_INT_private_VERIFY_SIGN +#undef KWIML_INT_private_VERIFY_TYPE +#undef KWIML_INT_private_VERIFY_BOOL + +#undef KWIML_INT_private_VERIFY_1 +#undef KWIML_INT_private_VERIFY_0 +#undef KWIML_INT_private_VERIFY + +#if defined(_MSC_VER) +# pragma warning (pop) +#endif + +#endif /* KWIML_INT_private_DO_VERIFY */ + +#undef KWIML_INT_private_VERSION diff --git a/src/kwiml-config.cmake.in b/src/kwiml-config.cmake.in new file mode 100644 index 0000000..124f0fc --- /dev/null +++ b/src/kwiml-config.cmake.in @@ -0,0 +1 @@ +include(${CMAKE_CURRENT_LIST_DIR}/kwiml-targets.cmake) diff --git a/src/version.h.in b/src/version.h.in new file mode 100644 index 0000000..e58e0dc --- /dev/null +++ b/src/version.h.in @@ -0,0 +1,59 @@ +/*============================================================================ + Kitware Information Macro Library + Copyright 2010-2015 Kitware, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Kitware, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +============================================================================*/ +#ifndef KWIML_VERSION_H +#define KWIML_VERSION_H +/* +This header defines macros with information about this version of KWIML. + +An includer may test the following macros after inclusion: + + KWIML_VERSION = KWIML version number encoded in an integer as + `printf("%d%03d%03d", MAJOR, MINOR, PATCH)`. + MAJOR is incremented on incompatible changes. + MINOR is incremented on interface additions. + PATCH is incremented on implementation updates. + + KWIML_VERSION_STRING = KWIML version number in string formatted as + `printf("%d.%d.%d", MAJOR, MINOR PATCH)`. + + KWIML_VERSION_HAS_ABI_H = header 'kwiml/abi.h' is available + KWIML_VERSION_HAS_INT_H = header 'kwiml/int.h' is available +*/ + +#define KWIML_VERSION @KWIML_VERSION_DECIMAL@ +#define KWIML_VERSION_STRING "@KWIML_VERSION@" + +#define KWIML_VERSION_HAS_ABI_H 1 +#define KWIML_VERSION_HAS_INT_H 1 + +#endif diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..4f6f37b --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,54 @@ +# +# Copyright Kitware, Inc. +# Distributed under the OSI-approved BSD 3-Clause License. +# See accompanying file Copyright.txt for details. +# +if(NOT KWIML_TEST_PREFIX) + set(KWIML_TEST_PREFIX kwiml) +endif() + +# Suppress printf/scanf format warnings; we test if the sizes match. +foreach(lang C CXX) + if(KWIML_LANGUAGE_${lang} AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU") + set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format") + endif() +endforeach() + +if(KWIML_LANGUAGE_C) + set(test_srcs test.c) +else() + set(test_srcs test.cxx) +endif() +if(KWIML_LANGUAGE_C) + list(APPEND test_defs KWIML_LANGUAGE_C) + list(APPEND test_srcs + test_abi_C.c + test_int_C.c + test_include_C.c + ) +endif() +if(KWIML_LANGUAGE_CXX) + list(APPEND test_defs KWIML_LANGUAGE_CXX) + list(APPEND test_srcs + test_abi_CXX.cxx + test_int_CXX.cxx + test_include_CXX.cxx + ) +endif() + +add_executable(kwiml_test ${test_srcs}) +set_property(TARGET kwiml_test PROPERTY COMPILE_DEFINITIONS ${test_defs}) +set_property(TARGET kwiml_test PROPERTY + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +add_test(NAME ${KWIML_TEST_PREFIX}.test COMMAND kwiml_test) +set_property(TEST ${KWIML_TEST_PREFIX}.test PROPERTY LABELS ${KWIML_TEST_LABELS}) + +# Xcode 2.x forgets to create the output directory before linking +# the individual architectures. +if(CMAKE_OSX_ARCHITECTURES AND XCODE + AND NOT "${XCODE_VERSION}" MATCHES "^[^12]") + add_custom_command( + TARGET kwiml_test + PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}" + ) +endif() diff --git a/test/test.c b/test/test.c new file mode 100644 index 0000000..5f5b5d7 --- /dev/null +++ b/test/test.c @@ -0,0 +1,33 @@ +/* + Copyright Kitware, Inc. + Distributed under the OSI-approved BSD 3-Clause License. + See accompanying file Copyright.txt for details. +*/ +#ifdef __cplusplus +extern "C" { +#endif +extern int test_abi_C(void); +extern int test_int_C(void); +extern int test_abi_CXX(void); +extern int test_int_CXX(void); +extern int test_include_C(void); +extern int test_include_CXX(void); +#ifdef __cplusplus +} // extern "C" +#endif + +int main(void) +{ + int result = 1; +#ifdef KWIML_LANGUAGE_C + result = test_abi_C() && result; + result = test_int_C() && result; + result = test_include_C() && result; +#endif +#ifdef KWIML_LANGUAGE_CXX + result = test_abi_CXX() && result; + result = test_int_CXX() && result; + result = test_include_CXX() && result; +#endif + return result? 0 : 1; +} diff --git a/test/test.cxx b/test/test.cxx new file mode 100644 index 0000000..464325b --- /dev/null +++ b/test/test.cxx @@ -0,0 +1,6 @@ +/* + Copyright Kitware, Inc. + Distributed under the OSI-approved BSD 3-Clause License. + See accompanying file Copyright.txt for details. +*/ +#include "test.c" diff --git a/test/test.h b/test/test.h new file mode 100644 index 0000000..44add3f --- /dev/null +++ b/test/test.h @@ -0,0 +1,16 @@ +/* + Copyright Kitware, Inc. + Distributed under the OSI-approved BSD 3-Clause License. + See accompanying file Copyright.txt for details. +*/ +#ifndef KWIML_TEST_H +#define KWIML_TEST_H + +/* Quiet MS standard library deprecation warnings. */ +#ifndef _CRT_SECURE_NO_DEPRECATE +# define _CRT_SECURE_NO_DEPRECATE +#endif + +#else +# error "test.h included multiple times." +#endif diff --git a/test/test_abi_C.c b/test/test_abi_C.c new file mode 100644 index 0000000..18b639f --- /dev/null +++ b/test/test_abi_C.c @@ -0,0 +1,19 @@ +/* + Copyright Kitware, Inc. + Distributed under the OSI-approved BSD 3-Clause License. + See accompanying file Copyright.txt for details. +*/ +#include "test.h" +#include "../include/kwiml/abi.h" +#include "test_abi_endian.h" +#ifndef KWIML_ABI_VERSION +# error "KWIML_ABI_VERSION not defined!" +#endif +int test_abi_C(void) +{ + if(!test_abi_endian()) + { + return 0; + } + return 1; +} diff --git a/test/test_abi_CXX.cxx b/test/test_abi_CXX.cxx new file mode 100644 index 0000000..e8feb44 --- /dev/null +++ b/test/test_abi_CXX.cxx @@ -0,0 +1,19 @@ +/* + Copyright Kitware, Inc. + Distributed under the OSI-approved BSD 3-Clause License. + See accompanying file Copyright.txt for details. +*/ +#include "test.h" +#include "../include/kwiml/abi.h" +#include "test_abi_endian.h" +#ifndef KWIML_ABI_VERSION +# error "KWIML_ABI_VERSION not defined!" +#endif +extern "C" int test_abi_CXX(void) +{ + if(!test_abi_endian()) + { + return 0; + } + return 1; +} diff --git a/test/test_abi_endian.h b/test/test_abi_endian.h new file mode 100644 index 0000000..334b018 --- /dev/null +++ b/test/test_abi_endian.h @@ -0,0 +1,41 @@ +/* + Copyright Kitware, Inc. + Distributed under the OSI-approved BSD 3-Clause License. + See accompanying file Copyright.txt for details. +*/ +#include + +#ifdef __cplusplus +# define LANG "C++ " +#else +# define LANG "C " +#endif + +static int test_abi_endian(void) +{ + int result = 1; + { +#if defined(KWIML_ABI_ENDIAN_ID) + int expect; + union { short s; unsigned char c[sizeof(short)]; } x; + x.s = 1; + expect = (x.c[0] == 1 ? + KWIML_ABI_ENDIAN_ID_LITTLE : KWIML_ABI_ENDIAN_ID_BIG); + printf(LANG "KWIML_ABI_ENDIAN_ID: expected [%d], got [%d]", + expect, KWIML_ABI_ENDIAN_ID); + if(KWIML_ABI_ENDIAN_ID == expect) + { + printf(", PASSED\n"); + } + else + { + printf(", FAILED\n"); + result = 0; + } +#else + printf(LANG "KWIML_ABI_ENDIAN_ID: unknown, FAILED\n"); + result = 0; +#endif + } + return result; +} diff --git a/test/test_include_C.c b/test/test_include_C.c new file mode 100644 index 0000000..518544d --- /dev/null +++ b/test/test_include_C.c @@ -0,0 +1,16 @@ +/* + Copyright Kitware, Inc. + Distributed under the OSI-approved BSD 3-Clause License. + See accompanying file Copyright.txt for details. +*/ +#include + +/* Test KWIML header inclusion after above system headers. */ +#include "test.h" +#include "../include/kwiml/abi.h" +#include "../include/kwiml/int.h" + +int test_include_C(void) +{ + return 1; +} diff --git a/test/test_include_CXX.cxx b/test/test_include_CXX.cxx new file mode 100644 index 0000000..82aa546 --- /dev/null +++ b/test/test_include_CXX.cxx @@ -0,0 +1,22 @@ +/* + Copyright Kitware, Inc. + Distributed under the OSI-approved BSD 3-Clause License. + See accompanying file Copyright.txt for details. +*/ +#include + +#if defined(_MSC_VER) && defined(NDEBUG) +// Use C++ runtime to avoid linker warning: +// warning LNK4089: all references to 'MSVCP71.dll' discarded by /OPT:REF +std::string test_include_CXX_use_stl_string; +#endif + +/* Test KWIML header inclusion after above system headers. */ +#include "test.h" +#include "../include/kwiml/abi.h" +#include "../include/kwiml/int.h" + +extern "C" int test_include_CXX(void) +{ + return 1; +} diff --git a/test/test_int_C.c b/test/test_int_C.c new file mode 100644 index 0000000..fe8ee8e --- /dev/null +++ b/test/test_int_C.c @@ -0,0 +1,19 @@ +/* + Copyright Kitware, Inc. + Distributed under the OSI-approved BSD 3-Clause License. + See accompanying file Copyright.txt for details. +*/ +#include "test.h" +#include "../include/kwiml/int.h" +#include "test_int_format.h" +#ifndef KWIML_INT_VERSION +# error "KWIML_INT_VERSION not defined!" +#endif +int test_int_C(void) +{ + if(!test_int_format()) + { + return 0; + } + return 1; +} diff --git a/test/test_int_CXX.cxx b/test/test_int_CXX.cxx new file mode 100644 index 0000000..ffa4c9b --- /dev/null +++ b/test/test_int_CXX.cxx @@ -0,0 +1,19 @@ +/* + Copyright Kitware, Inc. + Distributed under the OSI-approved BSD 3-Clause License. + See accompanying file Copyright.txt for details. +*/ +#include "test.h" +#include "../include/kwiml/int.h" +#include "test_int_format.h" +#ifndef KWIML_INT_VERSION +# error "KWIML_INT_VERSION not defined!" +#endif +extern "C" int test_int_CXX(void) +{ + if(!test_int_format()) + { + return 0; + } + return 1; +} diff --git a/test/test_int_format.h b/test/test_int_format.h new file mode 100644 index 0000000..24dcdfb --- /dev/null +++ b/test/test_int_format.h @@ -0,0 +1,203 @@ +/* + Copyright Kitware, Inc. + Distributed under the OSI-approved BSD 3-Clause License. + See accompanying file Copyright.txt for details. +*/ +#include +#include + +#if defined(_MSC_VER) +# pragma warning (push) +# pragma warning (disable:4310) /* cast truncates constant value */ +#endif + +#ifdef __cplusplus +# define LANG "C++ " +#else +# define LANG "C " +#endif + +#define VALUE(T, U) (T)((U)0xab << ((sizeof(T)-1)<<3)) + +#define TEST_C_(C, V, PRI, T, U) \ + { \ + T const x = VALUE(T, U); \ + T y = C(V); \ + printf(LANG #C ":" \ + " expression [%" KWIML_INT_PRI##PRI "]," \ + " literal [%" KWIML_INT_PRI##PRI "]", x, y); \ + if(x == y) \ + { \ + printf(", PASSED\n"); \ + } \ + else \ + { \ + printf(", FAILED\n"); \ + result = 0; \ + } \ + } + +#define TEST_PRI_(PRI, T, U, STR) \ + { \ + T const x = VALUE(T, U); \ + char const* str = STR; \ + sprintf(buf, "%" KWIML_INT_PRI##PRI, x); \ + printf(LANG "KWIML_INT_PRI" #PRI ":" \ + " expected [%s], got [%s]", str, buf); \ + if(strcmp(str, buf) == 0) \ + { \ + printf(", PASSED\n"); \ + } \ + else \ + { \ + printf(", FAILED\n"); \ + result = 0; \ + } \ + } + +#define TEST_SCN_(SCN, T, U, STR) TEST_SCN2_(SCN, SCN, T, U, STR) +#define TEST_SCN2_(PRI, SCN, T, U, STR) \ + { \ + T const x = VALUE(T, U); \ + T y; \ + char const* str = STR; \ + if(sscanf(str, "%" KWIML_INT_SCN##SCN, &y) != 1) \ + { \ + y = 0; \ + } \ + printf(LANG "KWIML_INT_SCN" #SCN ":" \ + " expected [%" KWIML_INT_PRI##PRI "]," \ + " got [%" KWIML_INT_PRI##PRI "]", x, y); \ + if(x == y) \ + { \ + printf(", PASSED\n"); \ + } \ + else \ + { \ + printf(", FAILED\n"); \ + result = 0; \ + } \ + } + +#define TEST_(FMT, T, U, STR) TEST2_(FMT, FMT, T, U, STR) +#define TEST2_(PRI, SCN, T, U, STR) \ + TEST_PRI_(PRI, T, U, STR) \ + TEST_SCN2_(PRI, SCN, T, U, STR) + +/* Concatenate T and U now to avoid expanding them. */ +#define TEST(FMT, T, U, STR) \ + TEST_(FMT, KWIML_INT_##T, KWIML_INT_##U, STR) +#define TEST2(PRI, SCN, T, U, STR) \ + TEST2_(PRI, SCN, KWIML_INT_##T, KWIML_INT_##U, STR) +#define TEST_C(C, V, PRI, T, U) \ + TEST_C_(KWIML_INT_##C, V, PRI, KWIML_INT_##T, KWIML_INT_##U) +#define TEST_PRI(PRI, T, U, STR) \ + TEST_PRI_(PRI, KWIML_INT_##T, KWIML_INT_##U, STR) +#define TEST_SCN(SCN, T, U, STR) \ + TEST_SCN_(SCN, KWIML_INT_##T, KWIML_INT_##U, STR) +#define TEST_SCN2(PRI, SCN, T, U, STR) \ + TEST_SCN2_(PRI, SCN, KWIML_INT_##T, KWIML_INT_##U, STR) + +static int test_int_format(void) +{ + int result = 1; + char buf[256]; + TEST_PRI(i8, int8_t, uint8_t, "-85") +#if defined(KWIML_INT_SCNi8) + TEST_SCN(i8, int8_t, uint8_t, "-85") +#endif + TEST_PRI(d8, int8_t, uint8_t, "-85") +#if defined(KWIML_INT_SCNd8) + TEST_SCN(d8, int8_t, uint8_t, "-85") +#endif + TEST_PRI(o8, uint8_t, uint8_t, "253") +#if defined(KWIML_INT_SCNo8) + TEST_SCN(o8, uint8_t, uint8_t, "253") +#endif + TEST_PRI(u8, uint8_t, uint8_t, "171") +#if defined(KWIML_INT_SCNu8) + TEST_SCN(u8, uint8_t, uint8_t, "171") +#endif + TEST_PRI(x8, uint8_t, uint8_t, "ab") + TEST_PRI(X8, uint8_t, uint8_t, "AB") +#if defined(KWIML_INT_SCNx8) + TEST_SCN(x8, uint8_t, uint8_t, "ab") + TEST_SCN2(X8, x8, uint8_t, uint8_t, "AB") +#endif + + TEST(i16, int16_t, uint16_t, "-21760") + TEST(d16, int16_t, uint16_t, "-21760") + TEST(o16, uint16_t, uint16_t, "125400") + TEST(u16, uint16_t, uint16_t, "43776") + TEST(x16, uint16_t, uint16_t, "ab00") + TEST2(X16, x16, uint16_t, uint16_t, "AB00") + + TEST(i32, int32_t, uint32_t, "-1426063360") + TEST(d32, int32_t, uint32_t, "-1426063360") + TEST(o32, uint32_t, uint32_t, "25300000000") + TEST(u32, uint32_t, uint32_t, "2868903936") + TEST(x32, uint32_t, uint32_t, "ab000000") + TEST2(X32, x32, uint32_t, uint32_t, "AB000000") + + TEST_PRI(i64, int64_t, uint64_t, "-6124895493223874560") +#if defined(KWIML_INT_SCNi64) + TEST_SCN(i64, int64_t, uint64_t, "-6124895493223874560") +#endif + TEST_PRI(d64, int64_t, uint64_t, "-6124895493223874560") +#if defined(KWIML_INT_SCNd64) + TEST_SCN(d64, int64_t, uint64_t, "-6124895493223874560") +#endif + TEST_PRI(o64, uint64_t, uint64_t, "1254000000000000000000") +#if defined(KWIML_INT_SCNo64) + TEST_SCN(o64, uint64_t, uint64_t, "1254000000000000000000") +#endif + TEST_PRI(u64, uint64_t, uint64_t, "12321848580485677056") +#if defined(KWIML_INT_SCNu64) + TEST_SCN(u64, uint64_t, uint64_t, "12321848580485677056") +#endif + TEST_PRI(x64, uint64_t, uint64_t, "ab00000000000000") + TEST_PRI(X64, uint64_t, uint64_t, "AB00000000000000") +#if defined(KWIML_INT_SCNx64) + TEST_SCN(x64, uint64_t, uint64_t, "ab00000000000000") + TEST_SCN2(X64, x64, uint64_t, uint64_t, "AB00000000000000") +#endif + +#if !defined(KWIML_INT_NO_INTPTR_T) +# if KWIML_ABI_SIZEOF_DATA_PTR == 4 + TEST(iPTR, intptr_t, uint32_t, "-1426063360") + TEST(dPTR, intptr_t, uint32_t, "-1426063360") +# else + TEST(iPTR, intptr_t, uint64_t, "-6124895493223874560") + TEST(dPTR, intptr_t, uint64_t, "-6124895493223874560") +# endif +#endif + +#if !defined(KWIML_INT_NO_UINTPTR_T) +# if KWIML_ABI_SIZEOF_DATA_PTR == 4 + TEST(oPTR, uintptr_t, uintptr_t, "25300000000") + TEST(uPTR, uintptr_t, uintptr_t, "2868903936") + TEST(xPTR, uintptr_t, uintptr_t, "ab000000") + TEST2(XPTR, xPTR, uintptr_t, uintptr_t, "AB000000") +# else + TEST(oPTR, uintptr_t, uintptr_t, "1254000000000000000000") + TEST(uPTR, uintptr_t, uintptr_t, "12321848580485677056") + TEST(xPTR, uintptr_t, uintptr_t, "ab00000000000000") + TEST2(XPTR, xPTR, uintptr_t, uintptr_t, "AB00000000000000") +# endif +#endif + + TEST_C(INT8_C, -0x55, i8, int8_t, uint8_t) + TEST_C(UINT8_C, 0xAB, u8, uint8_t, uint8_t) + TEST_C(INT16_C, -0x5500, i16, int16_t, uint16_t) + TEST_C(UINT16_C, 0xAB00, u16, uint16_t, uint16_t) + TEST_C(INT32_C, -0x55000000, i32, int32_t, uint32_t) + TEST_C(UINT32_C, 0xAB000000, u32, uint32_t, uint32_t) + TEST_C(INT64_C, -0x5500000000000000, i64, int64_t, uint64_t) + TEST_C(UINT64_C, 0xAB00000000000000, u64, uint64_t, uint64_t) + + return result; +} + +#if defined(_MSC_VER) +# pragma warning (pop) +#endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=55b21d072e2df9a35a354fd33e8cf2d0c3bd22be commit 55b21d072e2df9a35a354fd33e8cf2d0c3bd22be Author: Brad King AuthorDate: Thu Dec 17 14:56:31 2015 -0500 Commit: Brad King CommitDate: Thu Dec 17 14:56:31 2015 -0500 Add script to update KWIML from upstream diff --git a/Utilities/Scripts/update-kwiml.bash b/Utilities/Scripts/update-kwiml.bash new file mode 100755 index 0000000..5c0d192 --- /dev/null +++ b/Utilities/Scripts/update-kwiml.bash @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -e +set -x +shopt -s dotglob + +readonly name="KWIML" +readonly ownership="KWIML Upstream " +readonly subtree="Utilities/KWIML" +readonly repo="https://github.com/Kitware/KWIML.git" +readonly tag="master" +readonly shortlog=true +readonly paths=" +" + +extract_source () { + git_archive +} + +. "${BASH_SOURCE%/*}/update-third-party.bash" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c7d9a249118a7b01ed8fa9cc8c61833e39d251d2 commit c7d9a249118a7b01ed8fa9cc8c61833e39d251d2 Author: Brad King AuthorDate: Thu Dec 17 14:55:38 2015 -0500 Commit: Brad King CommitDate: Thu Dec 17 14:55:38 2015 -0500 Utilities/KWIML: Drop sources to make room for fresh import diff --git a/Utilities/KWIML/ABI.h.in b/Utilities/KWIML/ABI.h.in deleted file mode 100644 index 87b6e96..0000000 --- a/Utilities/KWIML/ABI.h.in +++ /dev/null @@ -1,506 +0,0 @@ -/*============================================================================ - Kitware Information Macro Library - Copyright 2010-2011 Kitware, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of Kitware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -============================================================================*/ -#ifndef @KWIML at _ABI_H -#define @KWIML at _ABI_H -/* -This header defines macros with information about the C ABI. -Only information that can be determined using the preprocessor at -compilation time is available. No try-compile results may be added -here. Instead we memorize results on platforms of interest. - -An includer may optionally define the following macros to suppress errors: - - @KWIML at _ABI_NO_VERIFY = skip verification declarations - @KWIML at _ABI_NO_ERROR_CHAR_SIGN = signedness of 'char' may be unknown - @KWIML at _ABI_NO_ERROR_LONG_LONG = existence of 'long long' may be unknown - @KWIML at _ABI_NO_ERROR_ENDIAN = byte order of CPU may be unknown - -An includer may test the following macros after inclusion: - - @KWIML at _ABI_SIZEOF_DATA_PTR = sizeof(void*) - @KWIML at _ABI_SIZEOF_CODE_PTR = sizeof(void(*)(void)) - @KWIML at _ABI_SIZEOF_FLOAT = sizeof(float) - @KWIML at _ABI_SIZEOF_DOUBLE = sizeof(double) - @KWIML at _ABI_SIZEOF_CHAR = sizeof(char) - @KWIML at _ABI_SIZEOF_SHORT = sizeof(short) - @KWIML at _ABI_SIZEOF_INT = sizeof(int) - @KWIML at _ABI_SIZEOF_LONG = sizeof(long) - - @KWIML at _ABI_SIZEOF_LONG_LONG = sizeof(long long) or 0 if not a type - Undefined if existence is unknown and error suppression macro - @KWIML at _ABI_NO_ERROR_LONG_LONG was defined. - - @KWIML at _ABI_SIZEOF___INT64 = 8 if '__int64' exists or 0 if not - Undefined if existence is unknown. - - @KWIML at _ABI___INT64_IS_LONG = 1 if '__int64' is 'long' (same type) - Undefined otherwise. - @KWIML at _ABI___INT64_IS_LONG_LONG = 1 if '__int64' is 'long long' (same type) - Undefined otherwise. - @KWIML at _ABI___INT64_IS_UNIQUE = 1 if '__int64' is a distinct type - Undefined otherwise. - - @KWIML at _ABI_CHAR_IS_UNSIGNED = 1 if 'char' is unsigned, else undefined - @KWIML at _ABI_CHAR_IS_SIGNED = 1 if 'char' is signed, else undefined - One of these is defined unless signedness of 'char' is unknown and - error suppression macro @KWIML at _ABI_NO_ERROR_CHAR_SIGN was defined. - - @KWIML at _ABI_ENDIAN_ID_BIG = id for big-endian (always defined) - @KWIML at _ABI_ENDIAN_ID_LITTLE = id for little-endian (always defined) - @KWIML at _ABI_ENDIAN_ID = id of byte order of target CPU - Defined to @KWIML at _ABI_ENDIAN_ID_BIG or @KWIML at _ABI_ENDIAN_ID_LITTLE - unless byte order is unknown and error suppression macro - @KWIML at _ABI_NO_ERROR_ENDIAN was defined. - -We verify most results using dummy "extern" declarations that are -invalid if the macros are wrong. Verification is disabled if -suppression macro @KWIML at _ABI_NO_VERIFY was defined. -*/ - -/*--------------------------------------------------------------------------*/ -#if !defined(@KWIML at _ABI_SIZEOF_DATA_PTR) -# if defined(__SIZEOF_POINTER__) -# define @KWIML at _ABI_SIZEOF_DATA_PTR __SIZEOF_POINTER__ -# elif defined(_SIZE_PTR) -# define @KWIML at _ABI_SIZEOF_DATA_PTR (_SIZE_PTR >> 3) -# elif defined(_LP64) || defined(__LP64__) -# define @KWIML at _ABI_SIZEOF_DATA_PTR 8 -# elif defined(_ILP32) -# define @KWIML at _ABI_SIZEOF_DATA_PTR 4 -# elif defined(__64BIT__) /* IBM XL */ -# define @KWIML at _ABI_SIZEOF_DATA_PTR 8 -# elif defined(_M_X64) -# define @KWIML at _ABI_SIZEOF_DATA_PTR 8 -# elif defined(__ia64) -# define @KWIML at _ABI_SIZEOF_DATA_PTR 8 -# elif defined(__sparcv9) -# define @KWIML at _ABI_SIZEOF_DATA_PTR 8 -# elif defined(__x86_64) || defined(__x86_64__) -# define @KWIML at _ABI_SIZEOF_DATA_PTR 8 -# elif defined(__amd64) || defined(__amd64__) -# define @KWIML at _ABI_SIZEOF_DATA_PTR 8 -# elif defined(__i386) || defined(__i386__) -# define @KWIML at _ABI_SIZEOF_DATA_PTR 4 -# endif -#endif -#if !defined(@KWIML at _ABI_SIZEOF_DATA_PTR) -# define @KWIML at _ABI_SIZEOF_DATA_PTR 4 -#endif -#if !defined(@KWIML at _ABI_SIZEOF_CODE_PTR) -# define @KWIML at _ABI_SIZEOF_CODE_PTR @KWIML at _ABI_SIZEOF_DATA_PTR -#endif - -/*--------------------------------------------------------------------------*/ -#if !defined(@KWIML at _ABI_SIZEOF_CHAR) -# define @KWIML at _ABI_SIZEOF_CHAR 1 -#endif - -#if !defined(@KWIML at _ABI_CHAR_IS_UNSIGNED) && !defined(@KWIML at _ABI_CHAR_IS_SIGNED) -# if defined(__CHAR_UNSIGNED__) /* GNU, some IBM XL, others? */ -# define @KWIML at _ABI_CHAR_IS_UNSIGNED 1 -# elif defined(_CHAR_UNSIGNED) /* Intel, IBM XL, MSVC, Borland, others? */ -# define @KWIML at _ABI_CHAR_IS_UNSIGNED 1 -# elif defined(_CHAR_SIGNED) /* IBM XL, others? */ -# define @KWIML at _ABI_CHAR_IS_SIGNED 1 -# elif defined(__CHAR_SIGNED__) /* IBM XL, Watcom, others? */ -# define @KWIML at _ABI_CHAR_IS_SIGNED 1 -# elif defined(__SIGNED_CHARS__) /* EDG, Intel, SGI MIPSpro */ -# define @KWIML at _ABI_CHAR_IS_SIGNED 1 -# elif defined(_CHAR_IS_SIGNED) /* Some SunPro, others? */ -# define @KWIML at _ABI_CHAR_IS_SIGNED 1 -# elif defined(_CHAR_IS_UNSIGNED) /* SunPro, others? */ -# define @KWIML at _ABI_CHAR_IS_UNSIGNED 1 -# elif defined(__GNUC__) /* GNU default */ -# define @KWIML at _ABI_CHAR_IS_SIGNED 1 -# elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* SunPro default */ -# define @KWIML at _ABI_CHAR_IS_SIGNED 1 -# elif defined(__HP_cc) || defined(__HP_aCC) /* HP default (unless +uc) */ -# define @KWIML at _ABI_CHAR_IS_SIGNED 1 -# elif defined(_SGI_COMPILER_VERSION) /* SGI MIPSpro default */ -# define @KWIML at _ABI_CHAR_IS_UNSIGNED 1 -# elif defined(__PGIC__) /* PGI default */ -# define @KWIML at _ABI_CHAR_IS_SIGNED 1 -# elif defined(_MSC_VER) /* MSVC default */ -# define @KWIML at _ABI_CHAR_IS_SIGNED 1 -# elif defined(__WATCOMC__) /* Watcom default */ -# define @KWIML at _ABI_CHAR_IS_UNSIGNED 1 -# elif defined(__BORLANDC__) /* Borland default */ -# define @KWIML at _ABI_CHAR_IS_SIGNED 1 -# elif defined(__hpux) /* Old HP: no __HP_cc/__HP_aCC/__GNUC__ above */ -# define @KWIML at _ABI_CHAR_IS_SIGNED 1 /* (unless +uc) */ -# endif -#endif -#if !defined(@KWIML at _ABI_CHAR_IS_UNSIGNED) && !defined(@KWIML at _ABI_CHAR_IS_SIGNED) \ - && !defined(@KWIML at _ABI_NO_ERROR_CHAR_SIGN) -# error "Signedness of 'char' unknown." -#endif - -/*--------------------------------------------------------------------------*/ -#if !defined(@KWIML at _ABI_SIZEOF_SHORT) -# if defined(__SIZEOF_SHORT__) -# define @KWIML at _ABI_SIZEOF_SHORT __SIZEOF_SHORT__ -# endif -#endif -#if !defined(@KWIML at _ABI_SIZEOF_SHORT) -# define @KWIML at _ABI_SIZEOF_SHORT 2 -#endif - -/*--------------------------------------------------------------------------*/ -#if !defined(@KWIML at _ABI_SIZEOF_INT) -# if defined(__SIZEOF_INT__) -# define @KWIML at _ABI_SIZEOF_INT __SIZEOF_INT__ -# elif defined(_SIZE_INT) -# define @KWIML at _ABI_SIZEOF_INT (_SIZE_INT >> 3) -# endif -#endif -#if !defined(@KWIML at _ABI_SIZEOF_INT) -# define @KWIML at _ABI_SIZEOF_INT 4 -#endif - -/*--------------------------------------------------------------------------*/ -#if !defined(@KWIML at _ABI_SIZEOF_LONG) -# if defined(__SIZEOF_LONG__) -# define @KWIML at _ABI_SIZEOF_LONG __SIZEOF_LONG__ -# elif defined(_SIZE_LONG) -# define @KWIML at _ABI_SIZEOF_LONG (_SIZE_LONG >> 3) -# elif defined(__LONG_MAX__) -# if __LONG_MAX__ == 0x7fffffff -# define @KWIML at _ABI_SIZEOF_LONG 4 -# elif __LONG_MAX__>>32 == 0x7fffffff -# define @KWIML at _ABI_SIZEOF_LONG 8 -# endif -# elif defined(_MSC_VER) /* MSVC and Intel on Windows */ -# define @KWIML at _ABI_SIZEOF_LONG 4 -# endif -#endif -#if !defined(@KWIML at _ABI_SIZEOF_LONG) -# define @KWIML at _ABI_SIZEOF_LONG @KWIML at _ABI_SIZEOF_DATA_PTR -#endif - -/*--------------------------------------------------------------------------*/ -#if !defined(@KWIML at _ABI_SIZEOF_LONG_LONG) -# if defined(__SIZEOF_LONG_LONG__) -# define @KWIML at _ABI_SIZEOF_LONG_LONG __SIZEOF_LONG_LONG__ -# elif defined(__LONG_LONG_MAX__) -# if __LONG_LONG_MAX__ == 0x7fffffff -# define @KWIML at _ABI_SIZEOF_LONG_LONG 4 -# elif __LONG_LONG_MAX__>>32 == 0x7fffffff -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# endif -# endif -#endif -#if !defined(@KWIML at _ABI_SIZEOF_LONG_LONG) -# if defined(_LONGLONG) /* SGI, some GNU, perhaps others. */ \ - && !defined(_MSC_VER) -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# elif defined(_LONG_LONG) /* IBM XL, perhaps others. */ -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# elif defined(__NO_LONG_LONG) /* EDG */ -# define @KWIML at _ABI_SIZEOF_LONG_LONG 0 -# elif defined(__cplusplus) && __cplusplus > 199711L /* C++0x */ -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* SunPro */ -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# elif defined(__HP_cc) || defined(__HP_aCC) /* HP */ -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# elif defined(__PGIC__) /* PGI */ -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# elif defined(__WATCOMC__) /* Watcom */ -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# elif defined(__INTEL_COMPILER) /* Intel */ -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# elif defined(__BORLANDC__) /* Borland */ -# if __BORLANDC__ >= 0x0560 -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# else -# define @KWIML at _ABI_SIZEOF_LONG_LONG 0 -# endif -# elif defined(_MSC_VER) /* Microsoft */ -# if _MSC_VER >= 1310 -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# else -# define @KWIML at _ABI_SIZEOF_LONG_LONG 0 -# endif -# elif defined(__GNUC__) /* GNU */ -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# elif defined(__hpux) /* Old HP: no __HP_cc/__HP_aCC/__GNUC__ above */ -# define @KWIML at _ABI_SIZEOF_LONG_LONG 8 -# endif -#endif -#if !defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && !defined(@KWIML at _ABI_NO_ERROR_LONG_LONG) -# error "Existence of 'long long' unknown." -#endif - -/*--------------------------------------------------------------------------*/ -#if !defined(@KWIML at _ABI_SIZEOF___INT64) -# if defined(__INTEL_COMPILER) -# define @KWIML at _ABI_SIZEOF___INT64 8 -# elif defined(_MSC_VER) -# define @KWIML at _ABI_SIZEOF___INT64 8 -# elif defined(__BORLANDC__) -# define @KWIML at _ABI_SIZEOF___INT64 8 -# else -# define @KWIML at _ABI_SIZEOF___INT64 0 -# endif -#endif - -#if defined(@KWIML at _ABI_SIZEOF___INT64) && @KWIML at _ABI_SIZEOF___INT64 > 0 -# if @KWIML at _ABI_SIZEOF_LONG == 8 -# define @KWIML at _ABI___INT64_IS_LONG 1 -# elif defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG == 8 -# define @KWIML at _ABI___INT64_IS_LONG_LONG 1 -# else -# define @KWIML at _ABI___INT64_IS_UNIQUE 1 -# endif -#endif - -/*--------------------------------------------------------------------------*/ -#if !defined(@KWIML at _ABI_SIZEOF_FLOAT) -# if defined(__SIZEOF_FLOAT__) -# define @KWIML at _ABI_SIZEOF_FLOAT __SIZEOF_FLOAT__ -# endif -#endif -#if !defined(@KWIML at _ABI_SIZEOF_FLOAT) -# define @KWIML at _ABI_SIZEOF_FLOAT 4 -#endif - -/*--------------------------------------------------------------------------*/ -#if !defined(@KWIML at _ABI_SIZEOF_DOUBLE) -# if defined(__SIZEOF_DOUBLE__) -# define @KWIML at _ABI_SIZEOF_DOUBLE __SIZEOF_DOUBLE__ -# endif -#endif -#if !defined(@KWIML at _ABI_SIZEOF_DOUBLE) -# define @KWIML at _ABI_SIZEOF_DOUBLE 8 -#endif - -/*--------------------------------------------------------------------------*/ -/* Identify possible endian cases. The macro @KWIML at _ABI_ENDIAN_ID will be - defined to one of these, or undefined if unknown. */ -#if !defined(@KWIML at _ABI_ENDIAN_ID_BIG) -# define @KWIML at _ABI_ENDIAN_ID_BIG 4321 -#endif -#if !defined(@KWIML at _ABI_ENDIAN_ID_LITTLE) -# define @KWIML at _ABI_ENDIAN_ID_LITTLE 1234 -#endif -#if @KWIML at _ABI_ENDIAN_ID_BIG == @KWIML at _ABI_ENDIAN_ID_LITTLE -# error "@KWIML at _ABI_ENDIAN_ID_BIG == @KWIML at _ABI_ENDIAN_ID_LITTLE" -#endif - -#if defined(@KWIML at _ABI_ENDIAN_ID) /* Skip #elif cases if already defined. */ - -/* Use dedicated symbols if the compiler defines them. Do this first - because some architectures allow runtime byte order selection by - the operating system (values for such architectures below are - guesses for compilers that do not define a dedicated symbol). - Ensure that only one is defined in case the platform or a header - defines both as possible values for some third symbol. */ -#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG -#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE -#elif defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG -#elif defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE - -/* Alpha */ -#elif defined(__alpha) || defined(__alpha__) || defined(_M_ALPHA) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE - -/* Arm */ -#elif defined(__arm__) -# if !defined(__ARMEB__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE -# else -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG -# endif - -/* Intel x86 */ -#elif defined(__i386) || defined(__i386__) || defined(_M_IX86) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE -#elif defined(_X86_) || defined(__THW_INTEL__) || defined(__I86__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE -#elif defined(__MWERKS__) && defined(__INTEL__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE - -/* Intel x86-64 */ -#elif defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE -#elif defined(__amd64) || defined(__amd64__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE - -/* Intel Architecture-64 (Itanium) */ -#elif defined(__ia64) || defined(__ia64__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE -#elif defined(_IA64) || defined(__IA64__) || defined(_M_IA64) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE - -/* PowerPC */ -#elif defined(__powerpc) || defined(__powerpc__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG -#elif defined(__ppc) || defined(__ppc__) || defined(__POWERPC__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG - -/* SPARC */ -#elif defined(__sparc) || defined(__sparc__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG - -/* HP/PA RISC */ -#elif defined(__hppa) || defined(__hppa__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG - -/* Motorola 68k */ -#elif defined(__m68k__) || defined(M68000) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG - -/* MIPSel (MIPS little endian) */ -#elif defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE - -/* MIPSeb (MIPS big endian) */ -#elif defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG - -/* MIPS (fallback, big endian) */ -#elif defined(__mips) || defined(__mips__) || defined(__MIPS__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG - -/* NIOS2 */ -#elif defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE - -/* OpenRISC 1000 */ -#elif defined(__or1k__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG - -/* RS/6000 */ -#elif defined(__THW_RS600) || defined(_IBMR2) || defined(_POWER) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG -#elif defined(_ARCH_PWR) || defined(_ARCH_PWR2) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG - -/* System/370 */ -#elif defined(__370__) || defined(__THW_370__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG - -/* System/390 */ -#elif defined(__s390__) || defined(__s390x__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG - -/* z/Architecture */ -#elif defined(__SYSC_ZARCH__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG - -/* VAX */ -#elif defined(__vax__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG - -/* Aarch64 */ -#elif defined(__aarch64__) -# if !defined(__AARCH64EB__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE -# else -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG -# endif - -/* Xtensa */ -#elif defined(__XTENSA_EB__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_BIG -#elif defined(__XTENSA_EL__) -# define @KWIML at _ABI_ENDIAN_ID @KWIML at _ABI_ENDIAN_ID_LITTLE - -/* Unknown CPU */ -#elif !defined(@KWIML at _ABI_NO_ERROR_ENDIAN) -# error "Byte order of target CPU unknown." -#endif - -/*--------------------------------------------------------------------------*/ -#if !defined(@KWIML at _ABI_NO_VERIFY) -#define @KWIML at _ABI__VERIFY(n, x, y) extern int (*n)[x]; extern int (*n)[y] -#define @KWIML at _ABI__VERIFY2(n, x, y) extern int (*n)(x*); extern int (*n)(y*) -#if defined(__cplusplus) -# define @KWIML at _ABI__VERIFY3(n, x, y) extern int* n(x*); extern char* n(y*) -#else -# define @KWIML at _ABI__VERIFY3(n, x, y) extern int* n(x*) /* TODO: possible? */ -#endif -#define @KWIML at _ABI__VERIFY_BOOL(m, b) @KWIML at _ABI__VERIFY(m##__VERIFY__, 2, (b)?2:3) -#define @KWIML at _ABI__VERIFY_SIZE(m, t) @KWIML at _ABI__VERIFY(m##__VERIFY__, m, sizeof(t)) -#define @KWIML at _ABI__VERIFY_SAME(m, x, y) @KWIML at _ABI__VERIFY2(m##__VERIFY__, x, y) -#define @KWIML at _ABI__VERIFY_DIFF(m, x, y) @KWIML at _ABI__VERIFY3(m##__VERIFY__, x, y) - - at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_DATA_PTR, int*); - at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_CODE_PTR, int(*)(int)); - at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_CHAR, char); - at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_SHORT, short); - at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_INT, int); - at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_LONG, long); -#if defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG > 0 - at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_LONG_LONG, long long); -#endif -#if defined(@KWIML at _ABI_SIZEOF___INT64) && @KWIML at _ABI_SIZEOF___INT64 > 0 - at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF___INT64, __int64); -#endif - at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_FLOAT, float); - at KWIML@_ABI__VERIFY_SIZE(@KWIML at _ABI_SIZEOF_DOUBLE, double); - -#if defined(@KWIML at _ABI___INT64_IS_LONG) - at KWIML@_ABI__VERIFY_SAME(@KWIML at _ABI___INT64_IS_LONG, __int64, long); -#elif defined(@KWIML at _ABI___INT64_IS_LONG_LONG) - at KWIML@_ABI__VERIFY_SAME(@KWIML at _ABI___INT64_IS_LONG_LONG, __int64, long long); -#elif defined(@KWIML at _ABI_SIZEOF___INT64) && @KWIML at _ABI_SIZEOF___INT64 > 0 - at KWIML@_ABI__VERIFY_DIFF(@KWIML at _ABI___INT64_NOT_LONG, __int64, long); -# if defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG > 0 - at KWIML@_ABI__VERIFY_DIFF(@KWIML at _ABI___INT64_NOT_LONG_LONG, __int64, long long); -# endif -#endif - -#if defined(@KWIML at _ABI_CHAR_IS_UNSIGNED) - at KWIML@_ABI__VERIFY_BOOL(@KWIML at _ABI_CHAR_IS_UNSIGNED, (char)0x80 > 0); -#elif defined(@KWIML at _ABI_CHAR_IS_SIGNED) - at KWIML@_ABI__VERIFY_BOOL(@KWIML at _ABI_CHAR_IS_SIGNED, (char)0x80 < 0); -#endif - -#undef @KWIML at _ABI__VERIFY_DIFF -#undef @KWIML at _ABI__VERIFY_SAME -#undef @KWIML at _ABI__VERIFY_SIZE -#undef @KWIML at _ABI__VERIFY_BOOL -#undef @KWIML at _ABI__VERIFY3 -#undef @KWIML at _ABI__VERIFY2 -#undef @KWIML at _ABI__VERIFY - -#endif - -#endif diff --git a/Utilities/KWIML/CMakeLists.txt b/Utilities/KWIML/CMakeLists.txt deleted file mode 100644 index 62b6fff..0000000 --- a/Utilities/KWIML/CMakeLists.txt +++ /dev/null @@ -1,79 +0,0 @@ -#============================================================================= -# Kitware Information Macro Library -# Copyright 2010-2011 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= - -# Import the KWIML directory tree into a subdirectory under a parent -# project and configure the library as follows: -# -# set(KWIML myIML) -# subdirs(KWIML) -# -# Optional settings are as follows: -# -# KWIML_HEADER_ROOT = build tree directory to hold KWIML headers. -# Headers will go in a directory called "${KWIML}" under this root. -# For example: -# -# set(KWIML_HEADER_ROOT ${PROJECT_BINARY_DIR}) -# include_directories(${PROJECT_BINARY_DIR}) -# -# KWIML_INSTALL_INCLUDE_DIR = install KWIML with "make install" -# Specify a value relative to the install prefix and do NOT start with '/'. -# KWIML_INSTALL_INCLUDE_OPTIONS = extra header installation options -# Specify options for the install(FILES) command. -# -# KWIML_LABELS_TEST = list of labels for KWIML tests - -cmake_minimum_required(VERSION 2.6.3 FATAL_ERROR) - -#----------------------------------------------------------------------------- -if(NOT DEFINED KWIML) - if(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") - message(FATAL_ERROR "Set KWIML namespace in parent directory!") - endif() - set(KWIML KWIML) - set(KWIML_STANDALONE 1) - project(KWIML) - include(CTest) - mark_as_advanced(BUILD_TESTING) -endif() - -#----------------------------------------------------------------------------- -get_property(KWIML_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) -foreach(lang ${KWIML_LANGUAGES}) - set(KWIML_LANGUAGE_${lang} 1) -endforeach() -if(NOT KWIML_LANGUAGE_C AND NOT KWIML_LANGUAGE_CXX) - set(BUILD_TESTING OFF) -endif() - -#----------------------------------------------------------------------------- -if(NOT KWIML_HEADER_ROOT) - set(KWIML_HEADER_ROOT "${PROJECT_BINARY_DIR}") -endif() -set(KWIML_HEADER_DIR "${KWIML_HEADER_ROOT}/${KWIML}") -include_directories(${KWIML_HEADER_ROOT}) - -#----------------------------------------------------------------------------- -foreach(h ABI INT) - set(header ${KWIML_HEADER_DIR}/${h}.h) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${h}.h.in ${header} @ONLY) - if(KWIML_INSTALL_INCLUDE_DIR) - install(FILES ${header} - DESTINATION ${KWIML_INSTALL_INCLUDE_DIR}/${KWIML} - ${KWIML_INSTALL_INCLUDE_OPTIONS}) - endif() -endforeach() - -#----------------------------------------------------------------------------- -if(BUILD_TESTING) - add_subdirectory(test) -endif() diff --git a/Utilities/KWIML/Copyright.txt b/Utilities/KWIML/Copyright.txt deleted file mode 100644 index c1e5ebc..0000000 --- a/Utilities/KWIML/Copyright.txt +++ /dev/null @@ -1,30 +0,0 @@ -Kitware Information Macro Library -Copyright 2010-2011 Kitware, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the name of Kitware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Utilities/KWIML/INT.h.in b/Utilities/KWIML/INT.h.in deleted file mode 100644 index d2eda63..0000000 --- a/Utilities/KWIML/INT.h.in +++ /dev/null @@ -1,861 +0,0 @@ -/*============================================================================ - Kitware Information Macro Library - Copyright 2010-2011 Kitware, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of Kitware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -============================================================================*/ -#ifndef @KWIML at _INT_H -#define @KWIML at _INT_H -/* -This header defines macros with information about sized integer types. -Only information that can be determined using the preprocessor at -compilation time is available. No try-compile results may be added -here. Instead we memorize results on platforms of interest. - -An includer may optionally define the following macros to suppress errors: - -Input: - @KWIML at _INT_NO_VERIFY = skip verification declarations - @KWIML at _INT_NO_ERROR_INT64_T = type '@KWIML at _INT_int64_t' is optional (*) - @KWIML at _INT_NO_ERROR_UINT64_T = type '@KWIML at _INT_uint64_t' is optional (*) - @KWIML at _INT_NO_ERROR_INTPTR_T = type '@KWIML at _INT_intptr_t' is optional (*) - @KWIML at _INT_NO_ERROR_UINTPTR_T = type '@KWIML at _INT_uintptr_t' is optional (*) - -An includer may optionally define the following macros to override defaults. -Either way, an includer may test these macros after inclusion: - - @KWIML at _INT_HAVE_STDINT_H = include - @KWIML at _INT_NO_STDINT_H = do not include - @KWIML at _INT_HAVE_INTTYPES_H = include - @KWIML at _INT_NO_INTTYPES_H = do not include - -An includer may test the following macros after inclusion: - - @KWIML at _INT_HAVE_INT#_T = type 'int#_t' is available - @KWIML at _INT_HAVE_UINT#_T = type 'uint#_t' is available - # = 8, 16, 32, 64, PTR - - @KWIML at _INT_int#_t = signed integer type exactly # bits wide - @KWIML at _INT_uint#_t = unsigned integer type exactly # bits wide - # = 8, 16, 32, 64 (*), ptr (*) - - @KWIML at _INT_NO_INT64_T = type '@KWIML at _INT_int64_t' not available - @KWIML at _INT_NO_UINT64_T = type '@KWIML at _INT_uint64_t' not available - @KWIML at _INT_NO_INTPTR_T = type '@KWIML at _INT_intptr_t' not available - @KWIML at _INT_NO_UINTPTR_T = type '@KWIML at _INT_uintptr_t' not available - - @KWIML at _INT_INT#_C(c) = signed integer constant at least # bits wide - @KWIML at _INT_UINT#_C(c) = unsigned integer constant at least # bits wide - # = 8, 16, 32, 64 (*) - - @KWIML at _INT_# = print or scan format, in table below - # = 8, 16, 32, 64, PTR (*) - - signed unsigned - ----------- ------------------------------ - | decimal | decimal octal hexadecimal | - print | PRId PRIi | PRIu PRIo PRIx PRIX | - scan | SCNd SCNi | SCNu SCNo SCNx | - ----------- ------------------------------ - - The SCN*8 and SCN*64 format macros will not be defined on systems - with scanf implementations known not to support them. - - @KWIML at _INT_BROKEN_# = macro # is incorrect if defined - Some compilers define integer format macros incorrectly for their - own formatted print/scan implementations. - - @KWIML at _INT_BROKEN_INT#_C = macro INT#_C is incorrect if defined - @KWIML at _INT_BROKEN_UINT#_C = macro UINT#_C is incorrect if defined - Some compilers define integer constant macros incorrectly and - cannot handle literals as large as the integer type or even - produce bad preprocessor syntax. - - @KWIML at _INT_BROKEN_INT8_T = type 'int8_t' is available but incorrect - Some compilers have a flag to make 'char' (un)signed but do not account - for it while defining int8_t in the non-default case. - - The broken cases do not affect correctness of the macros documented above. -*/ - -#include "ABI.h" - -/*--------------------------------------------------------------------------*/ -#if defined(@KWIML at _INT_HAVE_STDINT_H) /* Already defined. */ -#elif defined(@KWIML at _INT_NO_STDINT_H) /* Already defined. */ -#elif defined(HAVE_STDINT_H) /* Optionally provided by includer. */ -# define @KWIML at _INT_HAVE_STDINT_H 1 -#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ -# define @KWIML at _INT_HAVE_STDINT_H 1 -#elif defined(_MSC_VER) /* MSVC */ -# if _MSC_VER >= 1600 -# define @KWIML at _INT_HAVE_STDINT_H 1 -# else -# define @KWIML at _INT_NO_STDINT_H 1 -# endif -#elif defined(__BORLANDC__) /* Borland */ -# if __BORLANDC__ >= 0x560 -# define @KWIML at _INT_HAVE_STDINT_H 1 -# else -# define @KWIML at _INT_NO_STDINT_H 1 -# endif -#elif defined(__WATCOMC__) /* Watcom */ -# define @KWIML at _INT_NO_STDINT_H 1 -#endif - -/*--------------------------------------------------------------------------*/ -#if defined(@KWIML at _INT_HAVE_INTTYPES_H) /* Already defined. */ -#elif defined(@KWIML at _INT_NO_INTTYPES_H) /* Already defined. */ -#elif defined(HAVE_INTTYPES_H) /* Optionally provided by includer. */ -# define @KWIML at _INT_HAVE_INTTYPES_H 1 -#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ -# define @KWIML at _INT_HAVE_INTTYPES_H 1 -#elif defined(_MSC_VER) /* MSVC */ -# define @KWIML at _INT_NO_INTTYPES_H 1 -#elif defined(__BORLANDC__) /* Borland */ -# define @KWIML at _INT_NO_INTTYPES_H 1 -#elif defined(__WATCOMC__) /* Watcom */ -# define @KWIML at _INT_NO_INTTYPES_H 1 -#else /* Assume it exists. */ -# define @KWIML at _INT_HAVE_INTTYPES_H 1 -#endif - -/*--------------------------------------------------------------------------*/ -#if defined(@KWIML at _INT_HAVE_STDINT_H) && defined(@KWIML at _INT_NO_STDINT_H) -# error "Both @KWIML at _INT_HAVE_STDINT_H and @KWIML at _INT_NO_STDINT_H defined!" -#endif -#if defined(@KWIML at _INT_HAVE_INTTYPES_H) && defined(@KWIML at _INT_NO_INTTYPES_H) -# error "Both @KWIML at _INT_HAVE_INTTYPES_H and @KWIML at _INT_NO_INTTYPES_H defined!" -#endif - -#if defined(@KWIML at _INT_HAVE_STDINT_H) -# include -#endif -#if defined(@KWIML at _INT_HAVE_INTTYPES_H) -# if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) -# define __STDC_FORMAT_MACROS -# endif -# include -#endif - -#if defined(@KWIML at _INT_HAVE_STDINT_H) || defined(@KWIML at _INT_HAVE_INTTYPES_H) -#define @KWIML at _INT_HAVE_INT8_T 1 -#define @KWIML at _INT_HAVE_UINT8_T 1 -#define @KWIML at _INT_HAVE_INT16_T 1 -#define @KWIML at _INT_HAVE_UINT16_T 1 -#define @KWIML at _INT_HAVE_INT32_T 1 -#define @KWIML at _INT_HAVE_UINT32_T 1 -#define @KWIML at _INT_HAVE_INT64_T 1 -#define @KWIML at _INT_HAVE_UINT64_T 1 -#define @KWIML at _INT_HAVE_INTPTR_T 1 -#define @KWIML at _INT_HAVE_UINTPTR_T 1 -#endif - -#if defined(_AIX43) && !defined(_AIX50) && !defined(_AIX51) - /* AIX 4.3 defines these incorrectly with % and no quotes. */ -# define @KWIML at _INT_BROKEN_PRId8 -# define @KWIML at _INT_BROKEN_SCNd8 -# define @KWIML at _INT_BROKEN_PRIi8 -# define @KWIML at _INT_BROKEN_SCNi8 -# define @KWIML at _INT_BROKEN_PRIo8 -# define @KWIML at _INT_BROKEN_SCNo8 -# define @KWIML at _INT_BROKEN_PRIu8 -# define @KWIML at _INT_BROKEN_SCNu8 -# define @KWIML at _INT_BROKEN_PRIx8 -# define @KWIML at _INT_BROKEN_SCNx8 -# define @KWIML at _INT_BROKEN_PRIX8 -# define @KWIML at _INT_BROKEN_PRId16 -# define @KWIML at _INT_BROKEN_SCNd16 -# define @KWIML at _INT_BROKEN_PRIi16 -# define @KWIML at _INT_BROKEN_SCNi16 -# define @KWIML at _INT_BROKEN_PRIo16 -# define @KWIML at _INT_BROKEN_SCNo16 -# define @KWIML at _INT_BROKEN_PRIu16 -# define @KWIML at _INT_BROKEN_SCNu16 -# define @KWIML at _INT_BROKEN_PRIx16 -# define @KWIML at _INT_BROKEN_SCNx16 -# define @KWIML at _INT_BROKEN_PRIX16 -# define @KWIML at _INT_BROKEN_PRId32 -# define @KWIML at _INT_BROKEN_SCNd32 -# define @KWIML at _INT_BROKEN_PRIi32 -# define @KWIML at _INT_BROKEN_SCNi32 -# define @KWIML at _INT_BROKEN_PRIo32 -# define @KWIML at _INT_BROKEN_SCNo32 -# define @KWIML at _INT_BROKEN_PRIu32 -# define @KWIML at _INT_BROKEN_SCNu32 -# define @KWIML at _INT_BROKEN_PRIx32 -# define @KWIML at _INT_BROKEN_SCNx32 -# define @KWIML at _INT_BROKEN_PRIX32 -# define @KWIML at _INT_BROKEN_PRId64 -# define @KWIML at _INT_BROKEN_SCNd64 -# define @KWIML at _INT_BROKEN_PRIi64 -# define @KWIML at _INT_BROKEN_SCNi64 -# define @KWIML at _INT_BROKEN_PRIo64 -# define @KWIML at _INT_BROKEN_SCNo64 -# define @KWIML at _INT_BROKEN_PRIu64 -# define @KWIML at _INT_BROKEN_SCNu64 -# define @KWIML at _INT_BROKEN_PRIx64 -# define @KWIML at _INT_BROKEN_SCNx64 -# define @KWIML at _INT_BROKEN_PRIX64 -# define @KWIML at _INT_BROKEN_PRIdPTR -# define @KWIML at _INT_BROKEN_SCNdPTR -# define @KWIML at _INT_BROKEN_PRIiPTR -# define @KWIML at _INT_BROKEN_SCNiPTR -# define @KWIML at _INT_BROKEN_PRIoPTR -# define @KWIML at _INT_BROKEN_SCNoPTR -# define @KWIML at _INT_BROKEN_PRIuPTR -# define @KWIML at _INT_BROKEN_SCNuPTR -# define @KWIML at _INT_BROKEN_PRIxPTR -# define @KWIML at _INT_BROKEN_SCNxPTR -# define @KWIML at _INT_BROKEN_PRIXPTR -#endif - -#if (defined(__SUNPRO_C)||defined(__SUNPRO_CC)) && defined(_CHAR_IS_UNSIGNED) -# define @KWIML at _INT_BROKEN_INT8_T /* system type defined incorrectly */ -#elif defined(__BORLANDC__) && defined(_CHAR_UNSIGNED) -# define @KWIML at _INT_BROKEN_INT8_T /* system type defined incorrectly */ -#endif - -/*--------------------------------------------------------------------------*/ -#if defined(@KWIML at _INT_HAVE_INT8_T) && !defined(@KWIML at _INT_BROKEN_INT8_T) -# define @KWIML at _INT_int8_t int8_t -#else -# define @KWIML at _INT_int8_t signed char -#endif -#if defined(@KWIML at _INT_HAVE_UINT8_T) -# define @KWIML at _INT_uint8_t uint8_t -#else -# define @KWIML at _INT_uint8_t unsigned char -#endif - -#if defined(__INTEL_COMPILER) -# if defined(_WIN32) -# define @KWIML at _INT__NO_SCN8 -# endif -#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) -# define @KWIML at _INT__NO_SCN8 -#elif defined(__BORLANDC__) -# define @KWIML at _INT__NO_SCN8 -# define @KWIML at _INT__NO_SCN64 -#elif defined(_MSC_VER) -# define @KWIML at _INT__NO_SCN8 -#elif defined(__WATCOMC__) -# define @KWIML at _INT__NO_SCN8 -# elif defined(__hpux) /* HP runtime lacks support (any compiler) */ -# define @KWIML at _INT__NO_SCN8 -#endif - -/* 8-bit d, i */ -#if defined(@KWIML at _INT_HAVE_INT8_T) && defined(PRId8) \ - && !defined(@KWIML at _INT_BROKEN_PRId8) -# define @KWIML at _INT_PRId8 PRId8 -#else -# define @KWIML at _INT_PRId8 "d" -#endif -#if defined(@KWIML at _INT_HAVE_INT8_T) && defined(SCNd8) \ - && !defined(@KWIML at _INT_BROKEN_SCNd8) -# define @KWIML at _INT_SCNd8 SCNd8 -#elif !defined(@KWIML at _INT__NO_SCN8) -# define @KWIML at _INT_SCNd8 "hhd" -#endif -#if defined(@KWIML at _INT_HAVE_INT8_T) && defined(PRIi8) \ - && !defined(@KWIML at _INT_BROKEN_PRIi8) -# define @KWIML at _INT_PRIi8 PRIi8 -#else -# define @KWIML at _INT_PRIi8 "i" -#endif -#if defined(@KWIML at _INT_HAVE_INT8_T) && defined(SCNi8) \ - && !defined(@KWIML at _INT_BROKEN_SCNi8) -# define @KWIML at _INT_SCNi8 SCNi8 -#elif !defined(@KWIML at _INT__NO_SCN8) -# define @KWIML at _INT_SCNi8 "hhi" -#endif - -/* 8-bit o, u, x, X */ -#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(PRIo8) \ - && !defined(@KWIML at _INT_BROKEN_PRIo8) -# define @KWIML at _INT_PRIo8 PRIo8 -#else -# define @KWIML at _INT_PRIo8 "o" -#endif -#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(SCNo8) \ - && !defined(@KWIML at _INT_BROKEN_SCNo8) -# define @KWIML at _INT_SCNo8 SCNo8 -#elif !defined(@KWIML at _INT__NO_SCN8) -# define @KWIML at _INT_SCNo8 "hho" -#endif -#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(PRIu8) \ - && !defined(@KWIML at _INT_BROKEN_PRIu8) -# define @KWIML at _INT_PRIu8 PRIu8 -#else -# define @KWIML at _INT_PRIu8 "u" -#endif -#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(SCNu8) \ - && !defined(@KWIML at _INT_BROKEN_SCNu8) -# define @KWIML at _INT_SCNu8 SCNu8 -#elif !defined(@KWIML at _INT__NO_SCN8) -# define @KWIML at _INT_SCNu8 "hhu" -#endif -#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(PRIx8) \ - && !defined(@KWIML at _INT_BROKEN_PRIx8) -# define @KWIML at _INT_PRIx8 PRIx8 -#else -# define @KWIML at _INT_PRIx8 "x" -#endif -#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(SCNx8) \ - && !defined(@KWIML at _INT_BROKEN_SCNx8) -# define @KWIML at _INT_SCNx8 SCNx8 -#elif !defined(@KWIML at _INT__NO_SCN8) -# define @KWIML at _INT_SCNx8 "hhx" -#endif -#if defined(@KWIML at _INT_HAVE_UINT8_T) && defined(PRIX8) \ - && !defined(@KWIML at _INT_BROKEN_PRIX8) -# define @KWIML at _INT_PRIX8 PRIX8 -#else -# define @KWIML at _INT_PRIX8 "X" -#endif - -/* 8-bit constants */ -#if defined(INT8_C) && !defined(@KWIML at _INT_BROKEN_INT8_C) -# define @KWIML at _INT_INT8_C(c) INT8_C(c) -#else -# define @KWIML at _INT_INT8_C(c) c -#endif -#if defined(UINT8_C) && !defined(@KWIML at _INT_BROKEN_UINT8_C) -# define @KWIML at _INT_UINT8_C(c) UINT8_C(c) -#else -# define @KWIML at _INT_UINT8_C(c) c ## u -#endif - -/*--------------------------------------------------------------------------*/ -#if defined(@KWIML at _INT_HAVE_INT16_T) -# define @KWIML at _INT_int16_t int16_t -#else -# define @KWIML at _INT_int16_t signed short -#endif -#if defined(@KWIML at _INT_HAVE_UINT16_T) -# define @KWIML at _INT_uint16_t uint16_t -#else -# define @KWIML at _INT_uint16_t unsigned short -#endif - -/* 16-bit d, i */ -#if defined(@KWIML at _INT_HAVE_INT16_T) && defined(PRId16) \ - && !defined(@KWIML at _INT_BROKEN_PRId16) -# define @KWIML at _INT_PRId16 PRId16 -#else -# define @KWIML at _INT_PRId16 "d" -#endif -#if defined(@KWIML at _INT_HAVE_INT16_T) && defined(SCNd16) \ - && !defined(@KWIML at _INT_BROKEN_SCNd16) -# define @KWIML at _INT_SCNd16 SCNd16 -#else -# define @KWIML at _INT_SCNd16 "hd" -#endif -#if defined(@KWIML at _INT_HAVE_INT16_T) && defined(PRIi16) \ - && !defined(@KWIML at _INT_BROKEN_PRIi16) -# define @KWIML at _INT_PRIi16 PRIi16 -#else -# define @KWIML at _INT_PRIi16 "i" -#endif -#if defined(@KWIML at _INT_HAVE_INT16_T) && defined(SCNi16) \ - && !defined(@KWIML at _INT_BROKEN_SCNi16) -# define @KWIML at _INT_SCNi16 SCNi16 -#else -# define @KWIML at _INT_SCNi16 "hi" -#endif - -/* 16-bit o, u, x, X */ -#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(PRIo16) \ - && !defined(@KWIML at _INT_BROKEN_PRIo16) -# define @KWIML at _INT_PRIo16 PRIo16 -#else -# define @KWIML at _INT_PRIo16 "o" -#endif -#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(SCNo16) \ - && !defined(@KWIML at _INT_BROKEN_SCNo16) -# define @KWIML at _INT_SCNo16 SCNo16 -#else -# define @KWIML at _INT_SCNo16 "ho" -#endif -#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(PRIu16) \ - && !defined(@KWIML at _INT_BROKEN_PRIu16) -# define @KWIML at _INT_PRIu16 PRIu16 -#else -# define @KWIML at _INT_PRIu16 "u" -#endif -#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(SCNu16) \ - && !defined(@KWIML at _INT_BROKEN_SCNu16) -# define @KWIML at _INT_SCNu16 SCNu16 -#else -# define @KWIML at _INT_SCNu16 "hu" -#endif -#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(PRIx16) \ - && !defined(@KWIML at _INT_BROKEN_PRIx16) -# define @KWIML at _INT_PRIx16 PRIx16 -#else -# define @KWIML at _INT_PRIx16 "x" -#endif -#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(SCNx16) \ - && !defined(@KWIML at _INT_BROKEN_SCNx16) -# define @KWIML at _INT_SCNx16 SCNx16 -#else -# define @KWIML at _INT_SCNx16 "hx" -#endif -#if defined(@KWIML at _INT_HAVE_UINT16_T) && defined(PRIX16) \ - && !defined(@KWIML at _INT_BROKEN_PRIX16) -# define @KWIML at _INT_PRIX16 PRIX16 -#else -# define @KWIML at _INT_PRIX16 "X" -#endif - -/* 16-bit constants */ -#if defined(INT16_C) && !defined(@KWIML at _INT_BROKEN_INT16_C) -# define @KWIML at _INT_INT16_C(c) INT16_C(c) -#else -# define @KWIML at _INT_INT16_C(c) c -#endif -#if defined(UINT16_C) && !defined(@KWIML at _INT_BROKEN_UINT16_C) -# define @KWIML at _INT_UINT16_C(c) UINT16_C(c) -#else -# define @KWIML at _INT_UINT16_C(c) c ## u -#endif - -/*--------------------------------------------------------------------------*/ -#if defined(@KWIML at _INT_HAVE_INT32_T) -# define @KWIML at _INT_int32_t int32_t -#else -# define @KWIML at _INT_int32_t signed int -#endif -#if defined(@KWIML at _INT_HAVE_UINT32_T) -# define @KWIML at _INT_uint32_t uint32_t -#else -# define @KWIML at _INT_uint32_t unsigned int -#endif - -/* 32-bit d, i */ -#if defined(@KWIML at _INT_HAVE_INT32_T) && defined(PRId32) \ - && !defined(@KWIML at _INT_BROKEN_PRId32) -# define @KWIML at _INT_PRId32 PRId32 -#else -# define @KWIML at _INT_PRId32 "d" -#endif -#if defined(@KWIML at _INT_HAVE_INT32_T) && defined(SCNd32) \ - && !defined(@KWIML at _INT_BROKEN_SCNd32) -# define @KWIML at _INT_SCNd32 SCNd32 -#else -# define @KWIML at _INT_SCNd32 "d" -#endif -#if defined(@KWIML at _INT_HAVE_INT32_T) && defined(PRIi32) \ - && !defined(@KWIML at _INT_BROKEN_PRIi32) -# define @KWIML at _INT_PRIi32 PRIi32 -#else -# define @KWIML at _INT_PRIi32 "i" -#endif -#if defined(@KWIML at _INT_HAVE_INT32_T) && defined(SCNi32) \ - && !defined(@KWIML at _INT_BROKEN_SCNi32) -# define @KWIML at _INT_SCNi32 SCNi32 -#else -# define @KWIML at _INT_SCNi32 "i" -#endif - -/* 32-bit o, u, x, X */ -#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(PRIo32) \ - && !defined(@KWIML at _INT_BROKEN_PRIo32) -# define @KWIML at _INT_PRIo32 PRIo32 -#else -# define @KWIML at _INT_PRIo32 "o" -#endif -#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(SCNo32) \ - && !defined(@KWIML at _INT_BROKEN_SCNo32) -# define @KWIML at _INT_SCNo32 SCNo32 -#else -# define @KWIML at _INT_SCNo32 "o" -#endif -#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(PRIu32) \ - && !defined(@KWIML at _INT_BROKEN_PRIu32) -# define @KWIML at _INT_PRIu32 PRIu32 -#else -# define @KWIML at _INT_PRIu32 "u" -#endif -#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(SCNu32) \ - && !defined(@KWIML at _INT_BROKEN_SCNu32) -# define @KWIML at _INT_SCNu32 SCNu32 -#else -# define @KWIML at _INT_SCNu32 "u" -#endif -#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(PRIx32) \ - && !defined(@KWIML at _INT_BROKEN_PRIx32) -# define @KWIML at _INT_PRIx32 PRIx32 -#else -# define @KWIML at _INT_PRIx32 "x" -#endif -#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(SCNx32) \ - && !defined(@KWIML at _INT_BROKEN_SCNx32) -# define @KWIML at _INT_SCNx32 SCNx32 -#else -# define @KWIML at _INT_SCNx32 "x" -#endif -#if defined(@KWIML at _INT_HAVE_UINT32_T) && defined(PRIX32) \ - && !defined(@KWIML at _INT_BROKEN_PRIX32) -# define @KWIML at _INT_PRIX32 PRIX32 -#else -# define @KWIML at _INT_PRIX32 "X" -#endif - -#if defined(__hpux) && defined(__GNUC__) && !defined(__LP64__) \ - && defined(__CONCAT__) && defined(__CONCAT_U__) - /* Some HPs define UINT32_C incorrectly and break GNU. */ -# define @KWIML at _INT_BROKEN_UINT32_C -#endif - -/* 32-bit constants */ -#if defined(INT32_C) && !defined(@KWIML at _INT_BROKEN_INT32_C) -# define @KWIML at _INT_INT32_C(c) INT32_C(c) -#else -# define @KWIML at _INT_INT32_C(c) c -#endif -#if defined(UINT32_C) && !defined(@KWIML at _INT_BROKEN_UINT32_C) -# define @KWIML at _INT_UINT32_C(c) UINT32_C(c) -#else -# define @KWIML at _INT_UINT32_C(c) c ## u -#endif - -/*--------------------------------------------------------------------------*/ -#if defined(@KWIML at _INT_HAVE_INT64_T) -# define @KWIML at _INT_int64_t int64_t -#elif @KWIML at _ABI_SIZEOF_LONG == 8 -# define @KWIML at _INT_int64_t signed long -#elif defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG == 8 -# define @KWIML at _INT_int64_t signed long long -#elif defined(@KWIML at _ABI_SIZEOF___INT64) -# define @KWIML at _INT_int64_t signed __int64 -#elif defined(@KWIML at _INT_NO_ERROR_INT64_T) -# define @KWIML at _INT_NO_INT64_T -#else -# error "No type known for 'int64_t'." -#endif -#if defined(@KWIML at _INT_HAVE_UINT64_T) -# define @KWIML at _INT_uint64_t uint64_t -#elif @KWIML at _ABI_SIZEOF_LONG == 8 -# define @KWIML at _INT_uint64_t unsigned long -#elif defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG == 8 -# define @KWIML at _INT_uint64_t unsigned long long -#elif defined(@KWIML at _ABI_SIZEOF___INT64) -# define @KWIML at _INT_uint64_t unsigned __int64 -#elif defined(@KWIML at _INT_NO_ERROR_UINT64_T) -# define @KWIML at _INT_NO_UINT64_T -#else -# error "No type known for 'uint64_t'." -#endif - -#if defined(__INTEL_COMPILER) -#elif defined(__BORLANDC__) -# define @KWIML at _INT__NO_FMTLL /* type 'long long' but not 'll' format */ -# define @KWIML at _INT_BROKEN_INT64_C /* system macro defined incorrectly */ -# define @KWIML at _INT_BROKEN_UINT64_C /* system macro defined incorrectly */ -#elif defined(_MSC_VER) && _MSC_VER < 1400 -# define @KWIML at _INT__NO_FMTLL /* type 'long long' but not 'll' format */ -#endif - -#if @KWIML at _ABI_SIZEOF_LONG == 8 -# define @KWIML at _INT__FMT64 "l" -#elif defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG == 8 -# if !defined(@KWIML at _INT__NO_FMTLL) -# define @KWIML at _INT__FMT64 "ll" -# else -# define @KWIML at _INT__FMT64 "I64" -# endif -#elif defined(@KWIML at _ABI_SIZEOF___INT64) -# if defined(__BORLANDC__) -# define @KWIML at _INT__FMT64 "L" -# else -# define @KWIML at _INT__FMT64 "I64" -# endif -#endif - -/* 64-bit d, i */ -#if defined(@KWIML at _INT_HAVE_INT64_T) && defined(PRId64) \ - && !defined(@KWIML at _INT_BROKEN_PRId64) -# define @KWIML at _INT_PRId64 PRId64 -#elif defined(@KWIML at _INT__FMT64) -# define @KWIML at _INT_PRId64 @KWIML at _INT__FMT64 "d" -#endif -#if defined(@KWIML at _INT_HAVE_INT64_T) && defined(SCNd64) \ - && !defined(@KWIML at _INT_BROKEN_SCNd64) -# define @KWIML at _INT_SCNd64 SCNd64 -#elif defined(@KWIML at _INT__FMT64) && !defined(@KWIML at _INT__NO_SCN64) -# define @KWIML at _INT_SCNd64 @KWIML at _INT__FMT64 "d" -#endif -#if defined(@KWIML at _INT_HAVE_INT64_T) && defined(PRIi64) \ - && !defined(@KWIML at _INT_BROKEN_PRIi64) -# define @KWIML at _INT_PRIi64 PRIi64 -#elif defined(@KWIML at _INT__FMT64) -# define @KWIML at _INT_PRIi64 @KWIML at _INT__FMT64 "d" -#endif -#if defined(@KWIML at _INT_HAVE_INT64_T) && defined(SCNi64) \ - && !defined(@KWIML at _INT_BROKEN_SCNi64) -# define @KWIML at _INT_SCNi64 SCNi64 -#elif defined(@KWIML at _INT__FMT64) && !defined(@KWIML at _INT__NO_SCN64) -# define @KWIML at _INT_SCNi64 @KWIML at _INT__FMT64 "d" -#endif - -/* 64-bit o, u, x, X */ -#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(PRIo64) \ - && !defined(@KWIML at _INT_BROKEN_PRIo64) -# define @KWIML at _INT_PRIo64 PRIo64 -#elif defined(@KWIML at _INT__FMT64) -# define @KWIML at _INT_PRIo64 @KWIML at _INT__FMT64 "o" -#endif -#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(SCNo64) \ - && !defined(@KWIML at _INT_BROKEN_SCNo64) -# define @KWIML at _INT_SCNo64 SCNo64 -#elif defined(@KWIML at _INT__FMT64) && !defined(@KWIML at _INT__NO_SCN64) -# define @KWIML at _INT_SCNo64 @KWIML at _INT__FMT64 "o" -#endif -#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(PRIu64) \ - && !defined(@KWIML at _INT_BROKEN_PRIu64) -# define @KWIML at _INT_PRIu64 PRIu64 -#elif defined(@KWIML at _INT__FMT64) -# define @KWIML at _INT_PRIu64 @KWIML at _INT__FMT64 "u" -#endif -#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(SCNu64) \ - && !defined(@KWIML at _INT_BROKEN_SCNu64) -# define @KWIML at _INT_SCNu64 SCNu64 -#elif defined(@KWIML at _INT__FMT64) && !defined(@KWIML at _INT__NO_SCN64) -# define @KWIML at _INT_SCNu64 @KWIML at _INT__FMT64 "u" -#endif -#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(PRIx64) \ - && !defined(@KWIML at _INT_BROKEN_PRIx64) -# define @KWIML at _INT_PRIx64 PRIx64 -#elif defined(@KWIML at _INT__FMT64) -# define @KWIML at _INT_PRIx64 @KWIML at _INT__FMT64 "x" -#endif -#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(SCNx64) \ - && !defined(@KWIML at _INT_BROKEN_SCNx64) -# define @KWIML at _INT_SCNx64 SCNx64 -#elif defined(@KWIML at _INT__FMT64) && !defined(@KWIML at _INT__NO_SCN64) -# define @KWIML at _INT_SCNx64 @KWIML at _INT__FMT64 "x" -#endif -#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(PRIX64) \ - && !defined(@KWIML at _INT_BROKEN_PRIX64) -# define @KWIML at _INT_PRIX64 PRIX64 -#elif defined(@KWIML at _INT__FMT64) -# define @KWIML at _INT_PRIX64 @KWIML at _INT__FMT64 "X" -#endif - -/* 64-bit constants */ -#if defined(@KWIML at _INT_HAVE_INT64_T) && defined(INT64_C) \ - && !defined(@KWIML at _INT_BROKEN_INT64_C) -# define @KWIML at _INT_INT64_C(c) INT64_C(c) -#elif @KWIML at _ABI_SIZEOF_LONG == 8 -# define @KWIML at _INT_INT64_C(c) c ## l -#elif defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG == 8 -# define @KWIML at _INT_INT64_C(c) c ## ll -#elif defined(@KWIML at _ABI_SIZEOF___INT64) -# define @KWIML at _INT_INT64_C(c) c ## i64 -#endif -#if defined(@KWIML at _INT_HAVE_UINT64_T) && defined(UINT64_C) \ - && !defined(@KWIML at _INT_BROKEN_UINT64_C) -# define @KWIML at _INT_UINT64_C(c) UINT64_C(c) -#elif @KWIML at _ABI_SIZEOF_LONG == 8 -# define @KWIML at _INT_UINT64_C(c) c ## ul -#elif defined(@KWIML at _ABI_SIZEOF_LONG_LONG) && @KWIML at _ABI_SIZEOF_LONG_LONG == 8 -# define @KWIML at _INT_UINT64_C(c) c ## ull -#elif defined(@KWIML at _ABI_SIZEOF___INT64) -# define @KWIML at _INT_UINT64_C(c) c ## ui64 -#endif - -/*--------------------------------------------------------------------------*/ -#if defined(@KWIML at _INT_HAVE_INTPTR_T) -# define @KWIML at _INT_intptr_t intptr_t -#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4 -# define @KWIML at _INT_intptr_t @KWIML at _INT_int32_t -#elif !defined(@KWIML at _INT_NO_INT64_T) -# define @KWIML at _INT_intptr_t @KWIML at _INT_int64_t -#elif defined(@KWIML at _INT_NO_ERROR_INTPTR_T) -# define @KWIML at _INT_NO_INTPTR_T -#else -# error "No type known for 'intptr_t'." -#endif -#if defined(@KWIML at _INT_HAVE_UINTPTR_T) -# define @KWIML at _INT_uintptr_t uintptr_t -#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4 -# define @KWIML at _INT_uintptr_t @KWIML at _INT_uint32_t -#elif !defined(@KWIML at _INT_NO_UINT64_T) -# define @KWIML at _INT_uintptr_t @KWIML at _INT_uint64_t -#elif defined(@KWIML at _INT_NO_ERROR_UINTPTR_T) -# define @KWIML at _INT_NO_UINTPTR_T -#else -# error "No type known for 'uintptr_t'." -#endif - -#if defined(@KWIML at _INT_HAVE_INTPTR_T) && defined(PRIdPTR) \ - && !defined(@KWIML at _INT_BROKEN_PRIdPTR) -# define @KWIML at _INT_PRIdPTR PRIdPTR -#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4 -# define @KWIML at _INT_PRIdPTR @KWIML at _INT_PRId32 -#elif !defined(@KWIML at _INT_NO_UINT64_T) -# define @KWIML at _INT_PRIdPTR @KWIML at _INT_PRId64 -#endif -#if defined(@KWIML at _INT_HAVE_INTPTR_T) && defined(SCNdPTR) \ - && !defined(@KWIML at _INT_BROKEN_SCNdPTR) -# define @KWIML at _INT_SCNdPTR SCNdPTR -#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4 -# define @KWIML at _INT_SCNdPTR @KWIML at _INT_SCNd32 -#elif !defined(@KWIML at _INT_NO_UINT64_T) -# define @KWIML at _INT_SCNdPTR @KWIML at _INT_SCNd64 -#endif -#if defined(@KWIML at _INT_HAVE_INTPTR_T) && defined(PRIiPTR) \ - && !defined(@KWIML at _INT_BROKEN_PRIiPTR) -# define @KWIML at _INT_PRIiPTR PRIiPTR -#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4 -# define @KWIML at _INT_PRIiPTR @KWIML at _INT_PRIi32 -#elif !defined(@KWIML at _INT_NO_UINT64_T) -# define @KWIML at _INT_PRIiPTR @KWIML at _INT_PRIi64 -#endif -#if defined(@KWIML at _INT_HAVE_INTPTR_T) && defined(SCNiPTR) \ - && !defined(@KWIML at _INT_BROKEN_SCNiPTR) -# define @KWIML at _INT_SCNiPTR SCNiPTR -#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4 -# define @KWIML at _INT_SCNiPTR @KWIML at _INT_SCNi32 -#elif !defined(@KWIML at _INT_NO_UINT64_T) -# define @KWIML at _INT_SCNiPTR @KWIML at _INT_SCNi64 -#endif - -#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(PRIoPTR) \ - && !defined(@KWIML at _INT_BROKEN_PRIoPTR) -# define @KWIML at _INT_PRIoPTR PRIoPTR -#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4 -# define @KWIML at _INT_PRIoPTR @KWIML at _INT_PRIo32 -#elif !defined(@KWIML at _INT_NO_UINT64_T) -# define @KWIML at _INT_PRIoPTR @KWIML at _INT_PRIo64 -#endif -#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(SCNoPTR) \ - && !defined(@KWIML at _INT_BROKEN_SCNoPTR) -# define @KWIML at _INT_SCNoPTR SCNoPTR -#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4 -# define @KWIML at _INT_SCNoPTR @KWIML at _INT_SCNo32 -#elif !defined(@KWIML at _INT_NO_UINT64_T) -# define @KWIML at _INT_SCNoPTR @KWIML at _INT_SCNo64 -#endif -#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(PRIuPTR) \ - && !defined(@KWIML at _INT_BROKEN_PRIuPTR) -# define @KWIML at _INT_PRIuPTR PRIuPTR -#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4 -# define @KWIML at _INT_PRIuPTR @KWIML at _INT_PRIu32 -#elif !defined(@KWIML at _INT_NO_UINT64_T) -# define @KWIML at _INT_PRIuPTR @KWIML at _INT_PRIu64 -#endif -#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(SCNuPTR) \ - && !defined(@KWIML at _INT_BROKEN_SCNuPTR) -# define @KWIML at _INT_SCNuPTR SCNuPTR -#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4 -# define @KWIML at _INT_SCNuPTR @KWIML at _INT_SCNu32 -#elif !defined(@KWIML at _INT_NO_UINT64_T) -# define @KWIML at _INT_SCNuPTR @KWIML at _INT_SCNu64 -#endif -#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(PRIxPTR) \ - && !defined(@KWIML at _INT_BROKEN_PRIxPTR) -# define @KWIML at _INT_PRIxPTR PRIxPTR -#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4 -# define @KWIML at _INT_PRIxPTR @KWIML at _INT_PRIx32 -#elif !defined(@KWIML at _INT_NO_UINT64_T) -# define @KWIML at _INT_PRIxPTR @KWIML at _INT_PRIx64 -#endif -#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(SCNxPTR) \ - && !defined(@KWIML at _INT_BROKEN_SCNxPTR) -# define @KWIML at _INT_SCNxPTR SCNxPTR -#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4 -# define @KWIML at _INT_SCNxPTR @KWIML at _INT_SCNx32 -#elif !defined(@KWIML at _INT_NO_UINT64_T) -# define @KWIML at _INT_SCNxPTR @KWIML at _INT_SCNx64 -#endif -#if defined(@KWIML at _INT_HAVE_UINTPTR_T) && defined(PRIXPTR) \ - && !defined(@KWIML at _INT_BROKEN_PRIXPTR) -# define @KWIML at _INT_PRIXPTR PRIXPTR -#elif @KWIML at _ABI_SIZEOF_DATA_PTR == 4 -# define @KWIML at _INT_PRIXPTR @KWIML at _INT_PRIX32 -#elif !defined(@KWIML at _INT_NO_UINT64_T) -# define @KWIML at _INT_PRIXPTR @KWIML at _INT_PRIX64 -#endif - -/*--------------------------------------------------------------------------*/ -#if !defined(@KWIML at _INT_NO_VERIFY) -#define @KWIML at _INT__VERIFY(n, x, y) extern int (*n)[x]; extern int (*n)[y] -#define @KWIML at _INT__VERIFY_BOOL(m, b) @KWIML at _INT__VERIFY(m##__VERIFY__, 2, (b)?2:3) -#define @KWIML at _INT__VERIFY_TYPE(t, s) @KWIML at _INT__VERIFY(t##__VERIFY__, s, sizeof(t)) -#define @KWIML at _INT__VERIFY_SIGN(t, u, o) @KWIML at _INT__VERIFY_BOOL(t##__SIGN, (t)((u)1 << ((sizeof(t)<<3)-1)) o 0) - - at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_int8_t, 1); - at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_uint8_t, 1); - at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_int16_t, 2); - at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_uint16_t, 2); - at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_int32_t, 4); - at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_uint32_t, 4); -#if !defined(@KWIML at _INT_NO_INT64_T) - at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_int64_t, 8); -#endif -#if !defined(@KWIML at _INT_NO_UINT64_T) - at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_uint64_t, 8); -#endif -#if !defined(@KWIML at _INT_NO_INTPTR_T) - at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_intptr_t, sizeof(void*)); -#endif -#if !defined(@KWIML at _INT_NO_UINTPTR_T) - at KWIML@_INT__VERIFY_TYPE(@KWIML at _INT_uintptr_t, sizeof(void*)); -#endif - - at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_int8_t, @KWIML at _INT_uint8_t, <); - at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_uint8_t, @KWIML at _INT_uint8_t, >); - at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_int16_t, @KWIML at _INT_uint16_t, <); - at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_uint16_t, @KWIML at _INT_uint16_t, >); - at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_int32_t, @KWIML at _INT_uint32_t, <); - at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_uint32_t, @KWIML at _INT_uint32_t, >); -#if !defined(@KWIML at _INT_NO_INT64_T) - at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_int64_t, @KWIML at _INT_uint64_t, <); -#endif -#if !defined(@KWIML at _INT_NO_UINT64_T) - at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_uint64_t, @KWIML at _INT_uint64_t, >); -#endif -#if !defined(@KWIML at _INT_NO_INTPTR_T) - at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_intptr_t, @KWIML at _INT_uintptr_t, <); -#endif -#if !defined(@KWIML at _INT_NO_UINTPTR_T) - at KWIML@_INT__VERIFY_SIGN(@KWIML at _INT_uintptr_t, @KWIML at _INT_uintptr_t, >); -#endif - -#undef @KWIML at _INT__VERIFY_SIGN -#undef @KWIML at _INT__VERIFY_TYPE -#undef @KWIML at _INT__VERIFY_BOOL -#undef @KWIML at _INT__VERIFY - -#endif - -#endif diff --git a/Utilities/KWIML/README.txt b/Utilities/KWIML/README.txt deleted file mode 100644 index 6bdf859..0000000 --- a/Utilities/KWIML/README.txt +++ /dev/null @@ -1,29 +0,0 @@ -KWIML - The Kitware Information Macro Library - -KWIML provides header files that use preprocessor tests to detect and -provide information about the compiler and its target architecture. The -headers contain no configuration-time test results and thus may be -installed into an architecture-independent include directory. This -makes them suitable for use in the public interface of any package. - -This source tree is intended for distribution inside the source trees of -other packages. In order to avoid name collisions among multiple -packages the KWIML headers are configured with a per-package prefix on -both the header locations and the macros they define. See comments in -CMakeLists.txt for instructions to include KWIML inside another project. - -The entire KWIML source tree is distributed under the OSI-approved -3-clause BSD License. Files used only for build and test purposes -contain a copyright notice and reference Copyright.txt for details. -Headers meant for installation and distribution outside the source tree -come with full inlined copies of the copyright notice and license text. -This makes them suitable for distribution with any package under -compatible license terms. - -The following components are provided. See header comments for details: - - ABI.h = Fundamental type size and representation - INT.h = Fixed-size integer types and format specifiers - -The "test" subdirectory builds tests that verify correctness of the -information provided by each header. diff --git a/Utilities/KWIML/test/CMakeLists.txt b/Utilities/KWIML/test/CMakeLists.txt deleted file mode 100644 index a16b5cd..0000000 --- a/Utilities/KWIML/test/CMakeLists.txt +++ /dev/null @@ -1,70 +0,0 @@ -#============================================================================= -# Kitware Information Macro Library -# Copyright 2010-2011 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= - -set(test_defs KWIML_NAMESPACE=${KWIML}) - -# Tell CMake how to follow dependencies of sources in this directory. -set_property(DIRECTORY - PROPERTY IMPLICIT_DEPENDS_INCLUDE_TRANSFORM - "KWIML_HEADER(%)=<${KWIML}/%>" - ) - -# Suppress printf/scanf format warnings; we test if the sizes match. -foreach(lang C CXX) - if(KWIML_LANGUAGE_${lang} AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU") - set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format") - endif() -endforeach() - -if(KWIML_LANGUAGE_C) - set(test_srcs test.c) -else() - set(test_srcs test.cxx) -endif() -if(KWIML_LANGUAGE_C) - list(APPEND test_defs KWIML_LANGUAGE_C) - list(APPEND test_srcs - test_ABI_C.c - test_INT_C.c - test_include_C.c - ) -endif() -if(KWIML_LANGUAGE_CXX) - list(APPEND test_defs KWIML_LANGUAGE_CXX) - list(APPEND test_srcs - test_ABI_CXX.cxx - test_INT_CXX.cxx - test_include_CXX.cxx - ) -endif() - -foreach(th test_ABI_endian test_INT_format) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${th}.h.in - ${CMAKE_CURRENT_BINARY_DIR}/${th}.h @ONLY) -endforeach() -include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) -add_executable(${KWIML}_test ${test_srcs}) -set_property(TARGET ${KWIML}_test PROPERTY COMPILE_DEFINITIONS ${test_defs}) -set_property(TARGET ${KWIML}_test PROPERTY - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) -add_test(${KWIML}.test ${CMAKE_CURRENT_BINARY_DIR}/${KWIML}_test) -set_property(TEST ${KWIML}.test PROPERTY LABELS ${KWIML_LABELS_TEST}) - -# Xcode 2.x forgets to create the output directory before linking -# the individual architectures. -if(CMAKE_OSX_ARCHITECTURES AND XCODE - AND NOT "${XCODE_VERSION}" MATCHES "^[^12]") - add_custom_command( - TARGET ${KWIML}_test - PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}" - ) -endif() diff --git a/Utilities/KWIML/test/test.c b/Utilities/KWIML/test/test.c deleted file mode 100644 index 131c81f..0000000 --- a/Utilities/KWIML/test/test.c +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================ - Kitware Information Macro Library - Copyright 2010-2011 Kitware, Inc. - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#ifdef __cplusplus -extern "C" { -#endif -extern int test_ABI_C(void); -extern int test_INT_C(void); -extern int test_ABI_CXX(void); -extern int test_INT_CXX(void); -extern int test_include_C(void); -extern int test_include_CXX(void); -#ifdef __cplusplus -} // extern "C" -#endif - -int main(void) -{ - int result = 1; -#ifdef KWIML_LANGUAGE_C - result = test_ABI_C() && result; - result = test_INT_C() && result; - result = test_include_C() && result; -#endif -#ifdef KWIML_LANGUAGE_CXX - result = test_ABI_CXX() && result; - result = test_INT_CXX() && result; - result = test_include_CXX() && result; -#endif - return result? 0 : 1; -} diff --git a/Utilities/KWIML/test/test.cxx b/Utilities/KWIML/test/test.cxx deleted file mode 100644 index bf61421..0000000 --- a/Utilities/KWIML/test/test.cxx +++ /dev/null @@ -1,12 +0,0 @@ -/*============================================================================ - Kitware Information Macro Library - Copyright 2010-2011 Kitware, Inc. - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#include "test.c" diff --git a/Utilities/KWIML/test/test.h b/Utilities/KWIML/test/test.h deleted file mode 100644 index b87a0e7..0000000 --- a/Utilities/KWIML/test/test.h +++ /dev/null @@ -1,37 +0,0 @@ -/*============================================================================ - Kitware Information Macro Library - Copyright 2010-2011 Kitware, Inc. - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#ifndef KWIML_NAMESPACE -# error "Do not include test.h outside of KWIML test files." -#endif - -#ifndef KWIML_TEST_H -#define KWIML_TEST_H - -/* - Define KWIML_HEADER macro to help the test files include kwiml - headers from the configured namespace directory. The macro can be - used like this: - - #include KWIML_HEADER(ABI.h) -*/ -#define KWIML_HEADER(x) KWIML_HEADER0(KWIML_NAMESPACE/x) -#define KWIML_HEADER0(x) KWIML_HEADER1(x) -#define KWIML_HEADER1(x) - -/* Quiet MS standard library deprecation warnings. */ -#ifndef _CRT_SECURE_NO_DEPRECATE -# define _CRT_SECURE_NO_DEPRECATE -#endif - -#else -# error "test.h included multiple times." -#endif diff --git a/Utilities/KWIML/test/test_ABI_C.c b/Utilities/KWIML/test/test_ABI_C.c deleted file mode 100644 index 3ca4ad3..0000000 --- a/Utilities/KWIML/test/test_ABI_C.c +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================ - Kitware Information Macro Library - Copyright 2010-2011 Kitware, Inc. - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#include "test.h" -#include KWIML_HEADER(ABI.h) -#include "test_ABI_endian.h" -int test_ABI_C(void) -{ - if(!test_ABI_endian()) - { - return 0; - } - return 1; -} diff --git a/Utilities/KWIML/test/test_ABI_CXX.cxx b/Utilities/KWIML/test/test_ABI_CXX.cxx deleted file mode 100644 index 7ede20e..0000000 --- a/Utilities/KWIML/test/test_ABI_CXX.cxx +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================ - Kitware Information Macro Library - Copyright 2010-2011 Kitware, Inc. - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#include "test.h" -#include KWIML_HEADER(ABI.h) -#include "test_ABI_endian.h" -extern "C" int test_ABI_CXX(void) -{ - if(!test_ABI_endian()) - { - return 0; - } - return 1; -} diff --git a/Utilities/KWIML/test/test_ABI_endian.h.in b/Utilities/KWIML/test/test_ABI_endian.h.in deleted file mode 100644 index 992baea..0000000 --- a/Utilities/KWIML/test/test_ABI_endian.h.in +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================ - Kitware Information Macro Library - Copyright 2010-2011 Kitware, Inc. - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#include - -#ifdef __cplusplus -# define LANG "C++ " -#else -# define LANG "C " -#endif - -static int test_ABI_endian(void) -{ - int result = 1; - { -#if defined(@KWIML at _ABI_ENDIAN_ID) - int expect; - union { short s; unsigned char c[sizeof(short)]; } x; - x.s = 1; - expect = (x.c[0] == 1 ? - @KWIML at _ABI_ENDIAN_ID_LITTLE : @KWIML at _ABI_ENDIAN_ID_BIG); - printf(LANG "@KWIML at _ABI_ENDIAN_ID: expected [%d], got [%d]", - expect, @KWIML at _ABI_ENDIAN_ID); - if(@KWIML at _ABI_ENDIAN_ID == expect) - { - printf(", PASSED\n"); - } - else - { - printf(", FAILED\n"); - result = 0; - } -#else - printf(LANG "@KWIML at _ABI_ENDIAN_ID: unknown, FAILED\n"); - result = 0; -#endif - } - return result; -} diff --git a/Utilities/KWIML/test/test_INT_C.c b/Utilities/KWIML/test/test_INT_C.c deleted file mode 100644 index 5513a0b..0000000 --- a/Utilities/KWIML/test/test_INT_C.c +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================ - Kitware Information Macro Library - Copyright 2010-2011 Kitware, Inc. - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#include "test.h" -#include KWIML_HEADER(INT.h) -#include "test_INT_format.h" -int test_INT_C(void) -{ - if(!test_INT_format()) - { - return 0; - } - return 1; -} diff --git a/Utilities/KWIML/test/test_INT_CXX.cxx b/Utilities/KWIML/test/test_INT_CXX.cxx deleted file mode 100644 index 9f74e96..0000000 --- a/Utilities/KWIML/test/test_INT_CXX.cxx +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================ - Kitware Information Macro Library - Copyright 2010-2011 Kitware, Inc. - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#include "test.h" -#include KWIML_HEADER(INT.h) -#include "test_INT_format.h" -extern "C" int test_INT_CXX(void) -{ - if(!test_INT_format()) - { - return 0; - } - return 1; -} diff --git a/Utilities/KWIML/test/test_INT_format.h.in b/Utilities/KWIML/test/test_INT_format.h.in deleted file mode 100644 index 71b443d..0000000 --- a/Utilities/KWIML/test/test_INT_format.h.in +++ /dev/null @@ -1,200 +0,0 @@ -/*============================================================================ - Kitware Information Macro Library - Copyright 2010-2011 Kitware, Inc. - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#include -#include - -#ifdef __cplusplus -# define LANG "C++ " -#else -# define LANG "C " -#endif - -#define VALUE(T, U) (T)((U)0xab << ((sizeof(T)-1)<<3)) - -#define TEST_C_(C, V, PRI, T, U) \ - { \ - T const x = VALUE(T, U); \ - T y = C(V); \ - printf(LANG #C ":" \ - " expression [%" @KWIML at _INT_PRI##PRI "]," \ - " literal [%" @KWIML at _INT_PRI##PRI "]", x, y); \ - if(x == y) \ - { \ - printf(", PASSED\n"); \ - } \ - else \ - { \ - printf(", FAILED\n"); \ - result = 0; \ - } \ - } - -#define TEST_PRI_(PRI, T, U, STR) \ - { \ - T const x = VALUE(T, U); \ - char const* str = STR; \ - sprintf(buf, "%" @KWIML at _INT_PRI##PRI, x); \ - printf(LANG "@KWIML at _INT_PRI" #PRI ":" \ - " expected [%s], got [%s]", str, buf); \ - if(strcmp(str, buf) == 0) \ - { \ - printf(", PASSED\n"); \ - } \ - else \ - { \ - printf(", FAILED\n"); \ - result = 0; \ - } \ - } - -#define TEST_SCN_(SCN, T, U, STR) TEST_SCN2_(SCN, SCN, T, U, STR) -#define TEST_SCN2_(PRI, SCN, T, U, STR) \ - { \ - T const x = VALUE(T, U); \ - T y; \ - char const* str = STR; \ - if(sscanf(str, "%" @KWIML at _INT_SCN##SCN, &y) != 1) \ - { \ - y = 0; \ - } \ - printf(LANG "@KWIML at _INT_SCN" #SCN ":" \ - " expected [%" @KWIML at _INT_PRI##PRI "]," \ - " got [%" @KWIML at _INT_PRI##PRI "]", x, y); \ - if(x == y) \ - { \ - printf(", PASSED\n"); \ - } \ - else \ - { \ - printf(", FAILED\n"); \ - result = 0; \ - } \ - } - -#define TEST_(FMT, T, U, STR) TEST2_(FMT, FMT, T, U, STR) -#define TEST2_(PRI, SCN, T, U, STR) \ - TEST_PRI_(PRI, T, U, STR) \ - TEST_SCN2_(PRI, SCN, T, U, STR) - -/* Concatenate T and U now to avoid expanding them. */ -#define TEST(FMT, T, U, STR) \ - TEST_(FMT, @KWIML at _INT_##T, @KWIML at _INT_##U, STR) -#define TEST2(PRI, SCN, T, U, STR) \ - TEST2_(PRI, SCN, @KWIML at _INT_##T, @KWIML at _INT_##U, STR) -#define TEST_C(C, V, PRI, T, U) \ - TEST_C_(@KWIML at _INT_##C, V, PRI, @KWIML at _INT_##T, @KWIML at _INT_##U) -#define TEST_PRI(PRI, T, U, STR) \ - TEST_PRI_(PRI, @KWIML at _INT_##T, @KWIML at _INT_##U, STR) -#define TEST_SCN(SCN, T, U, STR) \ - TEST_SCN_(SCN, @KWIML at _INT_##T, @KWIML at _INT_##U, STR) -#define TEST_SCN2(PRI, SCN, T, U, STR) \ - TEST_SCN2_(PRI, SCN, @KWIML at _INT_##T, @KWIML at _INT_##U, STR) - -static int test_INT_format(void) -{ - int result = 1; - char buf[256]; - TEST_PRI(i8, int8_t, uint8_t, "-85") -#if defined(@KWIML at _INT_SCNi8) - TEST_SCN(i8, int8_t, uint8_t, "-85") -#endif - TEST_PRI(d8, int8_t, uint8_t, "-85") -#if defined(@KWIML at _INT_SCNd8) - TEST_SCN(d8, int8_t, uint8_t, "-85") -#endif - TEST_PRI(o8, uint8_t, uint8_t, "253") -#if defined(@KWIML at _INT_SCNo8) - TEST_SCN(o8, uint8_t, uint8_t, "253") -#endif - TEST_PRI(u8, uint8_t, uint8_t, "171") -#if defined(@KWIML at _INT_SCNu8) - TEST_SCN(u8, uint8_t, uint8_t, "171") -#endif - TEST_PRI(x8, uint8_t, uint8_t, "ab") - TEST_PRI(X8, uint8_t, uint8_t, "AB") -#if defined(@KWIML at _INT_SCNx8) - TEST_SCN(x8, uint8_t, uint8_t, "ab") - TEST_SCN2(X8, x8, uint8_t, uint8_t, "AB") -#endif - - TEST(i16, int16_t, uint16_t, "-21760") - TEST(d16, int16_t, uint16_t, "-21760") - TEST(o16, uint16_t, uint16_t, "125400") - TEST(u16, uint16_t, uint16_t, "43776") - TEST(x16, uint16_t, uint16_t, "ab00") - TEST2(X16, x16, uint16_t, uint16_t, "AB00") - - TEST(i32, int32_t, uint32_t, "-1426063360") - TEST(d32, int32_t, uint32_t, "-1426063360") - TEST(o32, uint32_t, uint32_t, "25300000000") - TEST(u32, uint32_t, uint32_t, "2868903936") - TEST(x32, uint32_t, uint32_t, "ab000000") - TEST2(X32, x32, uint32_t, uint32_t, "AB000000") - - TEST_PRI(i64, int64_t, uint64_t, "-6124895493223874560") -#if defined(@KWIML at _INT_SCNi64) - TEST_SCN(i64, int64_t, uint64_t, "-6124895493223874560") -#endif - TEST_PRI(d64, int64_t, uint64_t, "-6124895493223874560") -#if defined(@KWIML at _INT_SCNd64) - TEST_SCN(d64, int64_t, uint64_t, "-6124895493223874560") -#endif - TEST_PRI(o64, uint64_t, uint64_t, "1254000000000000000000") -#if defined(@KWIML at _INT_SCNo64) - TEST_SCN(o64, uint64_t, uint64_t, "1254000000000000000000") -#endif - TEST_PRI(u64, uint64_t, uint64_t, "12321848580485677056") -#if defined(@KWIML at _INT_SCNu64) - TEST_SCN(u64, uint64_t, uint64_t, "12321848580485677056") -#endif - TEST_PRI(x64, uint64_t, uint64_t, "ab00000000000000") - TEST_PRI(X64, uint64_t, uint64_t, "AB00000000000000") -#if defined(@KWIML at _INT_SCNx64) - TEST_SCN(x64, uint64_t, uint64_t, "ab00000000000000") - TEST_SCN2(X64, x64, uint64_t, uint64_t, "AB00000000000000") -#endif - -#if !defined(@KWIML at _INT_NO_INTPTR_T) -# if @KWIML at _ABI_SIZEOF_DATA_PTR == 4 - TEST(iPTR, intptr_t, uint32_t, "-1426063360") - TEST(dPTR, intptr_t, uint32_t, "-1426063360") -# else - TEST(iPTR, intptr_t, uint64_t, "-6124895493223874560") - TEST(dPTR, intptr_t, uint64_t, "-6124895493223874560") -# endif -#endif - -#if !defined(@KWIML at _INT_NO_UINTPTR_T) -# if @KWIML at _ABI_SIZEOF_DATA_PTR == 4 - TEST(oPTR, uintptr_t, uintptr_t, "25300000000") - TEST(uPTR, uintptr_t, uintptr_t, "2868903936") - TEST(xPTR, uintptr_t, uintptr_t, "ab000000") - TEST2(XPTR, xPTR, uintptr_t, uintptr_t, "AB000000") -# else - TEST(oPTR, uintptr_t, uintptr_t, "1254000000000000000000") - TEST(uPTR, uintptr_t, uintptr_t, "12321848580485677056") - TEST(xPTR, uintptr_t, uintptr_t, "ab00000000000000") - TEST2(XPTR, xPTR, uintptr_t, uintptr_t, "AB00000000000000") -# endif -#endif - - TEST_C(INT8_C, -0x55, i8, int8_t, uint8_t) - TEST_C(UINT8_C, 0xAB, u8, uint8_t, uint8_t) - TEST_C(INT16_C, -0x5500, i16, int16_t, uint16_t) - TEST_C(UINT16_C, 0xAB00, u16, uint16_t, uint16_t) - TEST_C(INT32_C, -0x55000000, i32, int32_t, uint32_t) - TEST_C(UINT32_C, 0xAB000000, u32, uint32_t, uint32_t) - TEST_C(INT64_C, -0x5500000000000000, i64, int64_t, uint64_t) - TEST_C(UINT64_C, 0xAB00000000000000, u64, uint64_t, uint64_t) - - return result; -} diff --git a/Utilities/KWIML/test/test_include_C.c b/Utilities/KWIML/test/test_include_C.c deleted file mode 100644 index fb3e4cf..0000000 --- a/Utilities/KWIML/test/test_include_C.c +++ /dev/null @@ -1,22 +0,0 @@ -/*============================================================================ - Kitware Information Macro Library - Copyright 2010-2011 Kitware, Inc. - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#include - -/* Test KWIML header inclusion after above system headers. */ -#include "test.h" -#include KWIML_HEADER(ABI.h) -#include KWIML_HEADER(INT.h) - -int test_include_C(void) -{ - return 1; -} diff --git a/Utilities/KWIML/test/test_include_CXX.cxx b/Utilities/KWIML/test/test_include_CXX.cxx deleted file mode 100644 index 111311a..0000000 --- a/Utilities/KWIML/test/test_include_CXX.cxx +++ /dev/null @@ -1,28 +0,0 @@ -/*============================================================================ - Kitware Information Macro Library - Copyright 2010-2011 Kitware, Inc. - - Distributed under the OSI-approved BSD License (the "License"); - see accompanying file Copyright.txt for details. - - This software is distributed WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the License for more information. -============================================================================*/ -#include - -#if defined(_MSC_VER) && defined(NDEBUG) -// Use C++ runtime to avoid linker warning: -// warning LNK4089: all references to 'MSVCP71.dll' discarded by /OPT:REF -std::string test_include_CXX_use_stl_string; -#endif - -/* Test KWIML header inclusion after above system headers. */ -#include "test.h" -#include KWIML_HEADER(ABI.h) -#include KWIML_HEADER(INT.h) - -extern "C" int test_include_CXX(void) -{ - return 1; -} ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 6 +- Source/cmAlgorithms.h | 4 +- Source/cmELF.cxx | 11 +- Source/cmFileCommand.cxx | 4 +- Source/cmFindPackageCommand.h | 2 +- Source/cmLocalGenerator.cxx | 4 +- Source/cmLocalGenerator.h | 4 +- Source/cmStandardIncludes.h | 2 +- Source/cmVersion.h | 2 +- Source/cm_sha2.c | 13 +- Source/cm_sha2.h | 10 +- Utilities/KWIML/.gitattributes | 1 + Utilities/KWIML/ABI.h.in | 506 --------- Utilities/KWIML/CMakeLists.txt | 145 +-- Utilities/KWIML/Copyright.txt | 2 +- Utilities/KWIML/INT.h.in | 861 ---------------- Utilities/KWIML/README.md | 36 + Utilities/KWIML/README.txt | 29 - Utilities/KWIML/include/kwiml/abi.h | 562 ++++++++++ Utilities/KWIML/include/kwiml/int.h | 1069 ++++++++++++++++++++ Utilities/KWIML/src/kwiml-config.cmake.in | 1 + Utilities/KWIML/src/version.h.in | 59 ++ Utilities/KWIML/test/CMakeLists.txt | 48 +- Utilities/KWIML/test/test.c | 32 +- Utilities/KWIML/test/test.cxx | 16 +- Utilities/KWIML/test/test.h | 31 +- Utilities/KWIML/test/test_ABI_C.c | 22 - Utilities/KWIML/test/test_ABI_CXX.cxx | 22 - Utilities/KWIML/test/test_ABI_endian.h.in | 47 - Utilities/KWIML/test/test_INT_C.c | 22 - Utilities/KWIML/test/test_INT_CXX.cxx | 22 - Utilities/KWIML/test/test_abi_C.c | 19 + Utilities/KWIML/test/test_abi_CXX.cxx | 19 + Utilities/KWIML/test/test_abi_endian.h | 41 + Utilities/KWIML/test/test_include_C.c | 20 +- Utilities/KWIML/test/test_include_CXX.cxx | 20 +- Utilities/KWIML/test/test_int_C.c | 19 + Utilities/KWIML/test/test_int_CXX.cxx | 19 + .../{test_INT_format.h.in => test_int_format.h} | 83 +- .../{update-kwsys.bash => update-kwiml.bash} | 10 +- Source/cmCurl.h => Utilities/cm_kwiml.h | 11 +- bootstrap | 32 +- 42 files changed, 2081 insertions(+), 1807 deletions(-) create mode 100644 Utilities/KWIML/.gitattributes delete mode 100644 Utilities/KWIML/ABI.h.in delete mode 100644 Utilities/KWIML/INT.h.in create mode 100644 Utilities/KWIML/README.md delete mode 100644 Utilities/KWIML/README.txt create mode 100644 Utilities/KWIML/include/kwiml/abi.h create mode 100644 Utilities/KWIML/include/kwiml/int.h create mode 100644 Utilities/KWIML/src/kwiml-config.cmake.in create mode 100644 Utilities/KWIML/src/version.h.in delete mode 100644 Utilities/KWIML/test/test_ABI_C.c delete mode 100644 Utilities/KWIML/test/test_ABI_CXX.cxx delete mode 100644 Utilities/KWIML/test/test_ABI_endian.h.in delete mode 100644 Utilities/KWIML/test/test_INT_C.c delete mode 100644 Utilities/KWIML/test/test_INT_CXX.cxx create mode 100644 Utilities/KWIML/test/test_abi_C.c create mode 100644 Utilities/KWIML/test/test_abi_CXX.cxx create mode 100644 Utilities/KWIML/test/test_abi_endian.h create mode 100644 Utilities/KWIML/test/test_int_C.c create mode 100644 Utilities/KWIML/test/test_int_CXX.cxx rename Utilities/KWIML/test/{test_INT_format.h.in => test_int_format.h} (78%) copy Utilities/Scripts/{update-kwsys.bash => update-kwiml.bash} (51%) copy Source/cmCurl.h => Utilities/cm_kwiml.h (75%) hooks/post-receive -- CMake From rleigh at codelibre.net Thu Dec 17 16:58:59 2015 From: rleigh at codelibre.net (Roger Leigh) Date: Thu, 17 Dec 2015 16:58:59 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1780-g1d104f2 Message-ID: <20151217215859.7CD34E0AFD@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 1d104f29c75e8cb264b94bd1fa916ae769e4cb18 (commit) via 0a31fdabecd2724d456aef0664ad7da1ca28f359 (commit) from ad8a17f8c2763e3ccabaf9c70580972fef0673a2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1d104f29c75e8cb264b94bd1fa916ae769e4cb18 commit 1d104f29c75e8cb264b94bd1fa916ae769e4cb18 Merge: ad8a17f 0a31fda Author: Roger Leigh AuthorDate: Thu Dec 17 16:58:58 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 17 16:58:58 2015 -0500 Merge topic 'boost-1.60' into next 0a31fdab FindBoost: Add support for Boost 1.60 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a31fdabecd2724d456aef0664ad7da1ca28f359 commit 0a31fdabecd2724d456aef0664ad7da1ca28f359 Author: Roger Leigh AuthorDate: Thu Dec 17 21:46:58 2015 +0000 Commit: Roger Leigh CommitDate: Thu Dec 17 21:46:58 2015 +0000 FindBoost: Add support for Boost 1.60 diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index e517a6a..edfed8e 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -707,6 +707,20 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret) set(_Boost_TIMER_DEPENDENCIES chrono system) set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic) set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) + elseif(NOT Boost_VERSION VERSION_LESS 106000 AND Boost_VERSION VERSION_LESS 106100) + set(_Boost_CHRONO_DEPENDENCIES system) + set(_Boost_COROUTINE_DEPENDENCIES context system) + set(_Boost_FILESYSTEM_DEPENDENCIES system) + set(_Boost_IOSTREAMS_DEPENDENCIES regex) + set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic) + set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic) + set(_Boost_MPI_DEPENDENCIES serialization) + set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization) + set(_Boost_RANDOM_DEPENDENCIES system) + set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic) + set(_Boost_TIMER_DEPENDENCIES chrono system) + set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic) + set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) else() message(WARNING "Imported targets not available for Boost version ${Boost_VERSION}") set(_Boost_IMPORTED_TARGETS FALSE) @@ -807,7 +821,7 @@ else() # information in _Boost_COMPONENT_DEPENDENCIES. See the # instructions at the top of _Boost_COMPONENT_DEPENDENCIES. set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} - + "1.60.0" "1.60" "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1" ----------------------------------------------------------------------- Summary of changes: Modules/FindBoost.cmake | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 18 00:01:11 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 18 Dec 2015 00:01:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-715-g614c8a1 Message-ID: <20151218050112.0B11CE0B47@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 614c8a1c920083c3ae76ff035168f7096db6c510 (commit) from 2913876c58daec60fec24c6b47c16c3d13b28405 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=614c8a1c920083c3ae76ff035168f7096db6c510 commit 614c8a1c920083c3ae76ff035168f7096db6c510 Author: Kitware Robot AuthorDate: Fri Dec 18 00:01:07 2015 -0500 Commit: Kitware Robot CommitDate: Fri Dec 18 00:01:07 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 8fe4618..7515139 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 4) -set(CMake_VERSION_PATCH 20151217) +set(CMake_VERSION_PATCH 20151218) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 18 09:16:05 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 18 Dec 2015 09:16:05 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1782-g46b3d79 Message-ID: <20151218141605.94D33E0596@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 46b3d791b50efad69db00959244b2f8f738776f5 (commit) via fa0cd33d066bd789e8c04f24547905c78dc2cc69 (commit) from 1d104f29c75e8cb264b94bd1fa916ae769e4cb18 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=46b3d791b50efad69db00959244b2f8f738776f5 commit 46b3d791b50efad69db00959244b2f8f738776f5 Merge: 1d104f2 fa0cd33 Author: Brad King AuthorDate: Fri Dec 18 09:16:04 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 18 09:16:04 2015 -0500 Merge topic 'import-kwiml' into next fa0cd33d fixup! Port CMake from cmIML to KWIML https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa0cd33d066bd789e8c04f24547905c78dc2cc69 commit fa0cd33d066bd789e8c04f24547905c78dc2cc69 Author: Brad King AuthorDate: Fri Dec 18 08:24:10 2015 -0500 Commit: Brad King CommitDate: Fri Dec 18 09:13:44 2015 -0500 fixup! Port CMake from cmIML to KWIML diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 2adf317..db64559 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -36,7 +36,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "LINK : warning LNK4089: all references to.*SHELL32.dll.*discarded by /OPT:REF" "LINK : warning LNK4089: all references to.*USER32.dll.*discarded by /OPT:REF" "LINK : warning LNK4089: all references to.*ole32.dll.*discarded by /OPT:REF" - "Warning.*: .*/Utilities/KWIML/test/test_INT_format.h.* # Redundant preprocessing concatenation" + "Warning.*: .*/Utilities/KWIML/test/test_int_format.h.* # Redundant preprocessing concatenation" "Warning: library was too large for page size.*" "Warning: public.*_archive_.*in module.*archive_*clashes with prior module.*archive_.*" "Warning: public.*BZ2_bz.*in module.*bzlib.*clashes with prior module.*bzlib.*" diff --git a/bootstrap b/bootstrap index cb712c8..8b7a611 100755 --- a/bootstrap +++ b/bootstrap @@ -1282,13 +1282,8 @@ for a in ${KWSYS_FILES}; do "${cmake_bootstrap_dir}/cmsys/${a}" KWSYS_NAMESPACE cmsys done -cmake_generate_file "${cmake_bootstrap_dir}/cm_kwiml.h" " -#include \"${cmake_source_dir}/Utilities/KWIML/include/kwiml/abi.h\" -#include \"${cmake_source_dir}/Utilities/KWIML/include/kwiml/int.h\" -" - # Generate Makefile -dep="cmConfigure.h cm_kwiml.h cmsys/*.hxx cmsys/*.h `cmake_escape \"${cmake_source_dir}\"`/Source/*.h" +dep="cmConfigure.h cmsys/*.hxx cmsys/*.h `cmake_escape \"${cmake_source_dir}\"`/Source/*.h" objs="" for a in ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES} ${KWSYS_CXX_SOURCES} ${KWSYS_C_SOURCES}; do objs="${objs} ${a}.o" @@ -1328,9 +1323,9 @@ cmake_cxx_flags_SystemTools=" -DKWSYS_CXX_HAS_UTIMES=${KWSYS_CXX_HAS_UTIMES} " cmake_c_flags="${cmake_c_flags}-I`cmake_escape \"${cmake_bootstrap_dir}\"` -I`cmake_escape \"${cmake_source_dir}/Source\"` \ - -I`cmake_escape \"${cmake_bootstrap_dir}\"`" + -I`cmake_escape \"${cmake_source_dir}/Utilities\"`" cmake_cxx_flags="${cmake_cxx_flags} -I`cmake_escape \"${cmake_bootstrap_dir}\"` -I`cmake_escape \"${cmake_source_dir}/Source\"` \ - -I`cmake_escape \"${cmake_bootstrap_dir}\"`" + -I`cmake_escape \"${cmake_source_dir}/Utilities\"`" echo "cmake: ${objs}" > "${cmake_bootstrap_dir}/Makefile" echo " ${cmake_cxx_compiler} ${cmake_ld_flags} ${cmake_cxx_flags} ${objs} -o cmake" >> "${cmake_bootstrap_dir}/Makefile" for a in ${CMAKE_CXX_SOURCES}; do ----------------------------------------------------------------------- Summary of changes: CTestCustom.cmake.in | 2 +- bootstrap | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 18 09:18:33 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 18 Dec 2015 09:18:33 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1784-ge8e36aa Message-ID: <20151218141833.9F6CEE07C3@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via e8e36aac89d44f7d6bfeecf795b9c662f1e5f3b0 (commit) via ce359e539d5591535cb11a7dc59cc19b0b716a3d (commit) from 46b3d791b50efad69db00959244b2f8f738776f5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8e36aac89d44f7d6bfeecf795b9c662f1e5f3b0 commit e8e36aac89d44f7d6bfeecf795b9c662f1e5f3b0 Merge: 46b3d79 ce359e5 Author: Brad King AuthorDate: Fri Dec 18 09:18:32 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 18 09:18:32 2015 -0500 Merge topic 'import-kwiml' into next ce359e53 fixup! Port CMake from cmIML to KWIML https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ce359e539d5591535cb11a7dc59cc19b0b716a3d commit ce359e539d5591535cb11a7dc59cc19b0b716a3d Author: Brad King AuthorDate: Fri Dec 18 09:17:57 2015 -0500 Commit: Brad King CommitDate: Fri Dec 18 09:17:57 2015 -0500 fixup! Port CMake from cmIML to KWIML diff --git a/bootstrap b/bootstrap index 8b7a611..860b5e4 100755 --- a/bootstrap +++ b/bootstrap @@ -450,18 +450,6 @@ cmake_error() exit ${res} } -cmake_generate_file () -{ - OUTFILE="$1" - CONTENT="$2" - echo "$CONTENT" > "$OUTFILE.tmp" - if "${_diff}" "$OUTFILE.tmp" "$OUTFILE" > /dev/null 2> /dev/null ; then - rm -f "$OUTFILE.tmp" - else - mv -f "$OUTFILE.tmp" "$OUTFILE" - fi -} - # Replace KWSYS_NAMESPACE with cmsys cmake_replace_string () { ----------------------------------------------------------------------- Summary of changes: bootstrap | 12 ------------ 1 file changed, 12 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 18 10:02:22 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 18 Dec 2015 10:02:22 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1786-g2250452 Message-ID: <20151218150222.60348E0C47@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 22504521bd226abdb85db22fb036dea49d9816e0 (commit) via 036b6ef7c47ccb19f291d2f36df37aaf885b4ba8 (commit) from e8e36aac89d44f7d6bfeecf795b9c662f1e5f3b0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22504521bd226abdb85db22fb036dea49d9816e0 commit 22504521bd226abdb85db22fb036dea49d9816e0 Merge: e8e36aa 036b6ef Author: Brad King AuthorDate: Fri Dec 18 10:02:21 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 18 10:02:21 2015 -0500 Merge topic 'import-kwiml' into next 036b6ef7 Port CMake from cmIML to KWIML https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=036b6ef7c47ccb19f291d2f36df37aaf885b4ba8 commit 036b6ef7c47ccb19f291d2f36df37aaf885b4ba8 Author: Brad King AuthorDate: Thu Dec 17 15:03:42 2015 -0500 Commit: Brad King CommitDate: Fri Dec 18 10:02:07 2015 -0500 Port CMake from cmIML to KWIML KWIML no longer uses a configured prefix. diff --git a/CMakeLists.txt b/CMakeLists.txt index ebee14b..932d07e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -538,9 +538,9 @@ if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x") set(CMAKE_TESTS_CDASH_SERVER "http://open.cdash.org") endif() -# Create the KWIML library for CMake. -set(KWIML cmIML) -set(KWIML_HEADER_ROOT ${CMake_BINARY_DIR}/Utilities) +if(BUILD_TESTING) + set(KWIML_TEST_ENABLE 1) +endif() add_subdirectory(Utilities/KWIML) if(NOT CMake_TEST_EXTERNAL_CMAKE) diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 2adf317..db64559 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -36,7 +36,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "LINK : warning LNK4089: all references to.*SHELL32.dll.*discarded by /OPT:REF" "LINK : warning LNK4089: all references to.*USER32.dll.*discarded by /OPT:REF" "LINK : warning LNK4089: all references to.*ole32.dll.*discarded by /OPT:REF" - "Warning.*: .*/Utilities/KWIML/test/test_INT_format.h.* # Redundant preprocessing concatenation" + "Warning.*: .*/Utilities/KWIML/test/test_int_format.h.* # Redundant preprocessing concatenation" "Warning: library was too large for page size.*" "Warning: public.*_archive_.*in module.*archive_*clashes with prior module.*archive_.*" "Warning: public.*BZ2_bz.*in module.*bzlib.*clashes with prior module.*bzlib.*" diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index bda933b..ef607d2 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -162,13 +162,13 @@ struct cmRange const_iterator end() const { return End; } bool empty() const { return std::distance(Begin, End) == 0; } difference_type size() const { return std::distance(Begin, End); } - cmRange& advance(cmIML_INT_intptr_t amount) + cmRange& advance(KWIML_INT_intptr_t amount) { std::advance(Begin, amount); return *this; } - cmRange& retreat(cmIML_INT_intptr_t amount) + cmRange& retreat(KWIML_INT_intptr_t amount) { std::advance(End, -amount); return *this; diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index fda6e02..b480cd5 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -15,9 +15,6 @@ #include #include -// Need the native byte order of the running CPU. -#include - // Include the ELF format information system header. #if defined(__OpenBSD__) # include @@ -101,9 +98,9 @@ public: // In most cases the processor-specific byte order will match that // of the target execution environment. If we choose wrong here // it is fixed when the header is read. -#if cmIML_ABI_ENDIAN_ID == cmIML_ABI_ENDIAN_ID_LITTLE +#if KWIML_ABI_ENDIAN_ID == KWIML_ABI_ENDIAN_ID_LITTLE this->NeedSwap = (this->ByteOrder == ByteOrderMSB); -#elif cmIML_ABI_ENDIAN_ID == cmIML_ABI_ENDIAN_ID_BIG +#elif KWIML_ABI_ENDIAN_ID == KWIML_ABI_ENDIAN_ID_BIG this->NeedSwap = (this->ByteOrder == ByteOrderLSB); #else this->NeedSwap = false; // Final decision is at runtime anyway. @@ -197,7 +194,7 @@ struct cmELFTypes32 typedef Elf32_Shdr ELF_Shdr; typedef Elf32_Dyn ELF_Dyn; typedef Elf32_Half ELF_Half; - typedef cmIML_INT_uint32_t tagtype; + typedef KWIML_INT_uint32_t tagtype; static const char* GetName() { return "32-bit"; } }; @@ -208,7 +205,7 @@ struct cmELFTypes64 typedef Elf64_Shdr ELF_Shdr; typedef Elf64_Dyn ELF_Dyn; typedef Elf64_Half ELF_Half; - typedef cmIML_INT_uint64_t tagtype; + typedef KWIML_INT_uint64_t tagtype; static const char* GetName() { return "64-bit"; } }; diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index df95d9d..b3557f9 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2811,8 +2811,8 @@ namespace { case CURLINFO_SSL_DATA_OUT: { char buf[128]; - int n = sprintf(buf, "[%" cmIML_INT_PRIu64 " bytes data]\n", - static_cast(size)); + int n = sprintf(buf, "[%" KWIML_INT_PRIu64 " bytes data]\n", + static_cast(size)); if (n > 0) { vec->insert(vec->end(), buf, buf + n); diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index 3eee404..8bfd405 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -130,7 +130,7 @@ private: unsigned int VersionFoundPatch; unsigned int VersionFoundTweak; unsigned int VersionFoundCount; - cmIML_INT_uint64_t RequiredCMakeVersion; + KWIML_INT_uint64_t RequiredCMakeVersion; bool Quiet; bool Required; bool UseConfigFiles; diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 6a57374..1d17032 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2980,7 +2980,7 @@ cmLocalGenerator::GetTargetDirectory(const cmGeneratorTarget*) const } //---------------------------------------------------------------------------- -cmIML_INT_uint64_t cmLocalGenerator::GetBackwardsCompatibility() +KWIML_INT_uint64_t cmLocalGenerator::GetBackwardsCompatibility() { // The computed version may change until the project is fully // configured. @@ -3033,7 +3033,7 @@ bool cmLocalGenerator::NeedBackwardsCompatibility_2_4() // Compatibility is needed if CMAKE_BACKWARDS_COMPATIBILITY is set // equal to or lower than the given version. - cmIML_INT_uint64_t actual_compat = this->GetBackwardsCompatibility(); + KWIML_INT_uint64_t actual_compat = this->GetBackwardsCompatibility(); return (actual_compat && actual_compat <= CMake_VERSION_ENCODE(2, 4, 255)); } diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index e2f5519..68e7667 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -267,7 +267,7 @@ public: * * and is monotonically increasing with the CMake version. */ - cmIML_INT_uint64_t GetBackwardsCompatibility(); + KWIML_INT_uint64_t GetBackwardsCompatibility(); /** * Test whether compatibility is set to a given version or lower. @@ -390,7 +390,7 @@ protected: // committed. std::string TargetImplib; - cmIML_INT_uint64_t BackwardsCompatibility; + KWIML_INT_uint64_t BackwardsCompatibility; bool BackwardsCompatibilityFinal; private: void AddSharedFlags(std::string& flags, const std::string& lang, diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index aed2e74..272c136 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -31,7 +31,7 @@ #endif // Provide fixed-size integer types. -#include +#include #include #include diff --git a/Source/cmVersion.h b/Source/cmVersion.h index 0ab6390..84f750f 100644 --- a/Source/cmVersion.h +++ b/Source/cmVersion.h @@ -34,7 +34,7 @@ public: /* Encode with room for up to 1000 minor releases between major releases and to encode dates until the year 10000 in the patch level. */ -#define CMake_VERSION_ENCODE__BASE cmIML_INT_UINT64_C(100000000) +#define CMake_VERSION_ENCODE__BASE KWIML_INT_UINT64_C(100000000) #define CMake_VERSION_ENCODE(major, minor, patch) \ ((((major) * 1000u) * CMake_VERSION_ENCODE__BASE) + \ (((minor) % 1000u) * CMake_VERSION_ENCODE__BASE) + \ diff --git a/Source/cm_sha2.c b/Source/cm_sha2.c index b90e060..649c39a 100644 --- a/Source/cm_sha2.c +++ b/Source/cm_sha2.c @@ -87,22 +87,21 @@ * made). */ #if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN) -/* CMake modification: use byte order from cmIML. */ -# include "cmIML/ABI.h" +/* CMake modification: use byte order from KWIML. */ # undef BYTE_ORDER # undef BIG_ENDIAN # undef LITTLE_ENDIAN -# define BYTE_ORDER cmIML_ABI_ENDIAN_ID -# define BIG_ENDIAN cmIML_ABI_ENDIAN_ID_BIG -# define LITTLE_ENDIAN cmIML_ABI_ENDIAN_ID_LITTLE +# define BYTE_ORDER KWIML_ABI_ENDIAN_ID +# define BIG_ENDIAN KWIML_ABI_ENDIAN_ID_BIG +# define LITTLE_ENDIAN KWIML_ABI_ENDIAN_ID_LITTLE #endif /* CMake modification: use types computed in header. */ typedef cm_sha2_uint8_t sha_byte; /* Exactly 1 byte */ typedef cm_sha2_uint32_t sha_word32; /* Exactly 4 bytes */ typedef cm_sha2_uint64_t sha_word64; /* Exactly 8 bytes */ -#define SHA_UINT32_C(x) cmIML_INT_UINT32_C(x) -#define SHA_UINT64_C(x) cmIML_INT_UINT64_C(x) +#define SHA_UINT32_C(x) KWIML_INT_UINT32_C(x) +#define SHA_UINT64_C(x) KWIML_INT_UINT64_C(x) #if defined(__clang__) # pragma clang diagnostic ignored "-Wcast-align" #endif diff --git a/Source/cm_sha2.h b/Source/cm_sha2.h index 71395f0..f151031 100644 --- a/Source/cm_sha2.h +++ b/Source/cm_sha2.h @@ -38,11 +38,11 @@ #include "cm_sha2_mangle.h" -/* CMake modification: use integer types from cmIML. */ -#include "cmIML/INT.h" -typedef cmIML_INT_uint8_t cm_sha2_uint8_t; -typedef cmIML_INT_uint32_t cm_sha2_uint32_t; -typedef cmIML_INT_uint64_t cm_sha2_uint64_t; +/* CMake modification: use integer types from KWIML. */ +#include +typedef KWIML_INT_uint8_t cm_sha2_uint8_t; +typedef KWIML_INT_uint32_t cm_sha2_uint32_t; +typedef KWIML_INT_uint64_t cm_sha2_uint64_t; #ifdef __cplusplus extern "C" { diff --git a/Utilities/cm_kwiml.h b/Utilities/cm_kwiml.h new file mode 100644 index 0000000..2e1a108 --- /dev/null +++ b/Utilities/cm_kwiml.h @@ -0,0 +1,18 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2015 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef cm_kwiml_h +#define cm_kwiml_h + +#include "KWIML/include/kwiml/abi.h" +#include "KWIML/include/kwiml/int.h" + +#endif diff --git a/bootstrap b/bootstrap index b2421a1..860b5e4 100755 --- a/bootstrap +++ b/bootstrap @@ -373,11 +373,6 @@ KWSYS_FILES="\ SystemTools.hxx \ Terminal.h" -KWIML_FILES=' - ABI.h - INT.h -' - # Display CMake bootstrap usage cmake_usage() { @@ -702,11 +697,6 @@ if [ ! -d "cmsys" ]; then cmake_error 4 "Cannot create directory ${cmake_bootstrap_dir}/cmsys" fi -[ -d "cmIML" ] || mkdir "cmIML" -if [ ! -d "cmIML" ]; then - cmake_error 12 "Cannot create directory ${cmake_bootstrap_dir}/cmIML" -fi - # Delete all the bootstrap files rm -f "${cmake_bootstrap_dir}/cmake_bootstrap.log" rm -f "${cmake_bootstrap_dir}/cmConfigure.h${_tmp}" @@ -1280,11 +1270,6 @@ for a in ${KWSYS_FILES}; do "${cmake_bootstrap_dir}/cmsys/${a}" KWSYS_NAMESPACE cmsys done -for a in ${KWIML_FILES}; do - cmake_replace_string "${cmake_source_dir}/Utilities/KWIML/${a}.in" \ - "${cmake_bootstrap_dir}/cmIML/${a}" KWIML cmIML -done - # Generate Makefile dep="cmConfigure.h cmsys/*.hxx cmsys/*.h `cmake_escape \"${cmake_source_dir}\"`/Source/*.h" objs="" @@ -1326,9 +1311,9 @@ cmake_cxx_flags_SystemTools=" -DKWSYS_CXX_HAS_UTIMES=${KWSYS_CXX_HAS_UTIMES} " cmake_c_flags="${cmake_c_flags}-I`cmake_escape \"${cmake_bootstrap_dir}\"` -I`cmake_escape \"${cmake_source_dir}/Source\"` \ - -I`cmake_escape \"${cmake_bootstrap_dir}\"`" + -I`cmake_escape \"${cmake_source_dir}/Utilities\"`" cmake_cxx_flags="${cmake_cxx_flags} -I`cmake_escape \"${cmake_bootstrap_dir}\"` -I`cmake_escape \"${cmake_source_dir}/Source\"` \ - -I`cmake_escape \"${cmake_bootstrap_dir}\"`" + -I`cmake_escape \"${cmake_source_dir}/Utilities\"`" echo "cmake: ${objs}" > "${cmake_bootstrap_dir}/Makefile" echo " ${cmake_cxx_compiler} ${cmake_ld_flags} ${cmake_cxx_flags} ${objs} -o cmake" >> "${cmake_bootstrap_dir}/Makefile" for a in ${CMAKE_CXX_SOURCES}; do ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 18 10:07:37 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 18 Dec 2015 10:07:37 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1788-g50e3373 Message-ID: <20151218150737.CAEB2E0D6E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 50e3373bfe154b3fd37d9e74f728552a1c012bfc (commit) via a5dd0c9d427d66f7e361b0aa714a0a41b65ae4f0 (commit) from 22504521bd226abdb85db22fb036dea49d9816e0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=50e3373bfe154b3fd37d9e74f728552a1c012bfc commit 50e3373bfe154b3fd37d9e74f728552a1c012bfc Merge: 2250452 a5dd0c9 Author: Brad King AuthorDate: Fri Dec 18 10:07:37 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 18 10:07:37 2015 -0500 Merge topic 'import-kwiml' into next a5dd0c9d Add option to use a system-installed KWIML https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5dd0c9d427d66f7e361b0aa714a0a41b65ae4f0 commit a5dd0c9d427d66f7e361b0aa714a0a41b65ae4f0 Author: Brad King AuthorDate: Fri Dec 18 09:57:55 2015 -0500 Commit: Brad King CommitDate: Fri Dec 18 10:02:28 2015 -0500 Add option to use a system-installed KWIML Do not activate it with the general use-system-libs options for now because KWIML is not commonly distributed or available. diff --git a/CMakeLists.txt b/CMakeLists.txt index 932d07e..9381f35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,8 +138,13 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES) option(CMAKE_USE_SYSTEM_FORM "Use system-installed libform" "${CMAKE_USE_SYSTEM_LIBRARY_FORM}") option(CMAKE_USE_SYSTEM_JSONCPP "Use system-installed jsoncpp" "${CMAKE_USE_SYSTEM_LIBRARY_JSONCPP}") + # For now use system KWIML only if explicitly requested rather + # than activating via the general system libs options. + option(CMAKE_USE_SYSTEM_KWIML "Use system-installed KWIML" OFF) + mark_as_advanced(CMAKE_USE_SYSTEM_KWIML) + # Mention to the user what system libraries are being used. - foreach(util ${UTILITIES}) + foreach(util ${UTILITIES} KWIML) if(CMAKE_USE_SYSTEM_${util}) message(STATUS "Using system-installed ${util}") endif() @@ -270,6 +275,20 @@ macro (CMAKE_BUILD_UTILITIES) # (a macro defined in this file) CMAKE_HANDLE_SYSTEM_LIBRARIES() + if(CMAKE_USE_SYSTEM_KWIML) + find_package(KWIML 1.0) + if(NOT KWIML_FOUND) + message(FATAL_ERROR "CMAKE_USE_SYSTEM_KWIML is ON but KWIML is not found!") + endif() + set(CMake_KWIML_LIBRARIES kwiml::kwiml) + else() + set(CMake_KWIML_LIBRARIES "") + if(BUILD_TESTING) + set(KWIML_TEST_ENABLE 1) + endif() + add_subdirectory(Utilities/KWIML) + endif() + #--------------------------------------------------------------------- # Build zlib library for Curl, CMake, and CTest. set(CMAKE_ZLIB_HEADER "cm_zlib.h") @@ -538,10 +557,10 @@ if("x${CMAKE_TESTS_CDASH_SERVER}" STREQUAL "x") set(CMAKE_TESTS_CDASH_SERVER "http://open.cdash.org") endif() -if(BUILD_TESTING) +if(CMake_TEST_EXTERNAL_CMAKE) set(KWIML_TEST_ENABLE 1) + add_subdirectory(Utilities/KWIML) endif() -add_subdirectory(Utilities/KWIML) if(NOT CMake_TEST_EXTERNAL_CMAKE) # build the utilities (a macro defined in this file) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index f23331b..ab70568 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -566,6 +566,7 @@ target_link_libraries(CMakeLib cmsys ${CMAKE_TAR_LIBRARIES} ${CMAKE_COMPRESS_LIBRARIES} ${CMAKE_CURL_LIBRARIES} ${CMAKE_JSONCPP_LIBRARIES} + ${CMake_KWIML_LIBRARIES} ) # On Apple we need CoreFoundation diff --git a/Utilities/cmThirdParty.h.in b/Utilities/cmThirdParty.h.in index 0cb6809..4c1177c 100644 --- a/Utilities/cmThirdParty.h.in +++ b/Utilities/cmThirdParty.h.in @@ -15,6 +15,7 @@ /* Whether CMake is using its own utility libraries. */ #cmakedefine CMAKE_USE_SYSTEM_CURL #cmakedefine CMAKE_USE_SYSTEM_EXPAT +#cmakedefine CMAKE_USE_SYSTEM_KWIML #cmakedefine CMAKE_USE_SYSTEM_ZLIB #cmakedefine CMAKE_USE_SYSTEM_BZIP2 #cmakedefine CMAKE_USE_SYSTEM_LIBARCHIVE diff --git a/Utilities/cm_kwiml.h b/Utilities/cm_kwiml.h index 2e1a108..ab2b80b 100644 --- a/Utilities/cm_kwiml.h +++ b/Utilities/cm_kwiml.h @@ -12,7 +12,14 @@ #ifndef cm_kwiml_h #define cm_kwiml_h -#include "KWIML/include/kwiml/abi.h" -#include "KWIML/include/kwiml/int.h" +/* Use the KWIML library configured for CMake. */ +#include "cmThirdParty.h" +#ifdef CMAKE_USE_SYSTEM_KWIML +# include +# include +#else +# include "KWIML/include/kwiml/abi.h" +# include "KWIML/include/kwiml/int.h" +#endif #endif diff --git a/Utilities/cmjsoncpp/CMakeLists.txt b/Utilities/cmjsoncpp/CMakeLists.txt index 1c863f8..d0114e7 100644 --- a/Utilities/cmjsoncpp/CMakeLists.txt +++ b/Utilities/cmjsoncpp/CMakeLists.txt @@ -23,3 +23,4 @@ include_directories( ) add_library(cmjsoncpp ${JSONCPP_SOURCES}) +target_link_libraries(cmjsoncpp ${CMake_KWIML_LIBRARIES}) diff --git a/bootstrap b/bootstrap index 860b5e4..9e30363 100755 --- a/bootstrap +++ b/bootstrap @@ -450,6 +450,18 @@ cmake_error() exit ${res} } +cmake_generate_file () +{ + OUTFILE="$1" + CONTENT="$2" + echo "$CONTENT" > "$OUTFILE.tmp" + if "${_diff}" "$OUTFILE.tmp" "$OUTFILE" > /dev/null 2> /dev/null ; then + rm -f "$OUTFILE.tmp" + else + mv -f "$OUTFILE.tmp" "$OUTFILE" + fi +} + # Replace KWSYS_NAMESPACE with cmsys cmake_replace_string () { @@ -1270,6 +1282,8 @@ for a in ${KWSYS_FILES}; do "${cmake_bootstrap_dir}/cmsys/${a}" KWSYS_NAMESPACE cmsys done +cmake_generate_file "${cmake_bootstrap_dir}/cmThirdParty.h" "" + # Generate Makefile dep="cmConfigure.h cmsys/*.hxx cmsys/*.h `cmake_escape \"${cmake_source_dir}\"`/Source/*.h" objs="" ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 25 ++++++++++++++++++++++--- Source/CMakeLists.txt | 1 + Utilities/cmThirdParty.h.in | 1 + Utilities/cm_kwiml.h | 11 +++++++++-- Utilities/cmjsoncpp/CMakeLists.txt | 1 + bootstrap | 14 ++++++++++++++ 6 files changed, 48 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 18 10:12:38 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 18 Dec 2015 10:12:38 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-719-g4395190 Message-ID: <20151218151238.20F6AE0169@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 4395190cd474f3e83139961d1271c766604e4a1c (commit) via ab8a280857da5cf8545bd2a6f69b7378f53449a5 (commit) via e8b148318f1fab26b2289cadc2d0c5e12201169d (commit) via cbbdfc2b6120e192b4248ce89af93cf34ea8a254 (commit) from 614c8a1c920083c3ae76ff035168f7096db6c510 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4395190cd474f3e83139961d1271c766604e4a1c commit 4395190cd474f3e83139961d1271c766604e4a1c Merge: 614c8a1 ab8a280 Author: Brad King AuthorDate: Fri Dec 18 10:12:35 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 18 10:12:35 2015 -0500 Merge topic 'CMakeParseArguments-native-impl' ab8a2808 cmake_parse_arguments: consider duplicate keyword as warning e8b14831 CMakeParseArguments: replace by native cmake_parse_arguments command cbbdfc2b CMakeParseArguments: add a RunCMake test suite ----------------------------------------------------------------------- Summary of changes: Help/command/cmake_parse_arguments.rst | 85 +++++++++ Help/manual/cmake-commands.7.rst | 1 + .../dev/CMakeParseArguments-native-impl.rst | 6 + Modules/CMakeParseArguments.cmake | 148 +-------------- Source/cmBootstrapCommands1.cxx | 2 + Source/cmParseArgumentsCommand.cxx | 192 ++++++++++++++++++++ ...riteFileCommand.h => cmParseArgumentsCommand.h} | 19 +- Tests/RunCMake/CMakeLists.txt | 1 + .../CMakeLists.txt | 0 .../cmake_parse_arguments/CornerCases.cmake | 15 ++ .../Errors-result.txt} | 0 .../cmake_parse_arguments/Errors-stderr.txt | 44 +++++ Tests/RunCMake/cmake_parse_arguments/Errors.cmake | 14 ++ .../cmake_parse_arguments/Initialization.cmake | 68 +++++++ Tests/RunCMake/cmake_parse_arguments/Mix.cmake | 24 +++ .../cmake_parse_arguments/RunCMakeTest.cmake | 7 + Tests/RunCMake/cmake_parse_arguments/Utils.cmake | 20 ++ .../cmake_parse_arguments/test_utils.cmake | 20 ++ 18 files changed, 513 insertions(+), 153 deletions(-) create mode 100644 Help/command/cmake_parse_arguments.rst create mode 100644 Help/release/dev/CMakeParseArguments-native-impl.rst create mode 100644 Source/cmParseArgumentsCommand.cxx copy Source/{cmWriteFileCommand.h => cmParseArgumentsCommand.h} (74%) copy Tests/RunCMake/{Framework => cmake_parse_arguments}/CMakeLists.txt (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/CornerCases.cmake copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => cmake_parse_arguments/Errors-result.txt} (100%) create mode 100644 Tests/RunCMake/cmake_parse_arguments/Errors-stderr.txt create mode 100644 Tests/RunCMake/cmake_parse_arguments/Errors.cmake create mode 100644 Tests/RunCMake/cmake_parse_arguments/Initialization.cmake create mode 100644 Tests/RunCMake/cmake_parse_arguments/Mix.cmake create mode 100644 Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/cmake_parse_arguments/Utils.cmake create mode 100644 Tests/RunCMake/cmake_parse_arguments/test_utils.cmake hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 18 10:12:40 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 18 Dec 2015 10:12:40 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-721-g83a1f0a Message-ID: <20151218151240.7D38BE016A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 83a1f0a99b05d5f8d060d5777349a32d196be16d (commit) via a479d7a0ae1583e0e9471e747393839f1af6a593 (commit) from 4395190cd474f3e83139961d1271c766604e4a1c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=83a1f0a99b05d5f8d060d5777349a32d196be16d commit 83a1f0a99b05d5f8d060d5777349a32d196be16d Merge: 4395190 a479d7a Author: Brad King AuthorDate: Fri Dec 18 10:12:38 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 18 10:12:38 2015 -0500 Merge topic 'BundleUtilities-fix-osx-rpath' a479d7a0 BundleUtilities: Fix handling of multiple RPATHs from OS X otool ----------------------------------------------------------------------- Summary of changes: Modules/BundleUtilities.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 18 10:12:43 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 18 Dec 2015 10:12:43 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-728-g81e5bf2 Message-ID: <20151218151243.320C2E01E2@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 81e5bf2548f91adae813360aef8f7fa5cd2ef0b0 (commit) via 38c31ed5f5e34894febf19c873be83eab4f6ea3c (commit) via ec1398d7aec410da0aa085cf7693d62afa11291d (commit) via c4282347e27badf2f1e8b8b5a17bb01ce3209eea (commit) via f1ee10c15e9c4f7d46962029fbb7a9d312ce878d (commit) via 498c36850ba3e3b04dc2cbcd0baad7e8ee750de7 (commit) via dcca789272057e2cb0aae640836c189873701d68 (commit) from 83a1f0a99b05d5f8d060d5777349a32d196be16d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=81e5bf2548f91adae813360aef8f7fa5cd2ef0b0 commit 81e5bf2548f91adae813360aef8f7fa5cd2ef0b0 Merge: 83a1f0a 38c31ed Author: Brad King AuthorDate: Fri Dec 18 10:12:41 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 18 10:12:41 2015 -0500 Merge topic 'update-kwsys' 38c31ed5 Merge branch 'upstream-KWSys' into update-kwsys ec1398d7 KWSys 2015-12-14 (c1149ef6) c4282347 Add script to update KWSys from upstream f1ee10c1 Merge branch 'upstream-KWSys' into update-kwsys 498c3685 Add a script to help update third-party sources dcca7892 KWSys 2015-12-09 (cdcf4c47) ----------------------------------------------------------------------- Summary of changes: Source/kwsys/CMakeLists.txt | 58 +----------- Source/kwsys/FundamentalType.h.in | 139 --------------------------- Source/kwsys/kwsysPlatformTestsCXX.cxx | 96 ------------------- Utilities/Scripts/update-kwsys.bash | 22 +++++ Utilities/Scripts/update-third-party.bash | 146 +++++++++++++++++++++++++++++ 5 files changed, 169 insertions(+), 292 deletions(-) delete mode 100644 Source/kwsys/FundamentalType.h.in create mode 100755 Utilities/Scripts/update-kwsys.bash create mode 100644 Utilities/Scripts/update-third-party.bash hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 18 10:12:45 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 18 Dec 2015 10:12:45 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-730-g5ffdd37 Message-ID: <20151218151245.987E2E0209@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 5ffdd37b7ff8279ffffbf8cc5a007a541be0d7ff (commit) via 0a31fdabecd2724d456aef0664ad7da1ca28f359 (commit) from 81e5bf2548f91adae813360aef8f7fa5cd2ef0b0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ffdd37b7ff8279ffffbf8cc5a007a541be0d7ff commit 5ffdd37b7ff8279ffffbf8cc5a007a541be0d7ff Merge: 81e5bf2 0a31fda Author: Brad King AuthorDate: Fri Dec 18 10:12:44 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 18 10:12:44 2015 -0500 Merge topic 'boost-1.60' 0a31fdab FindBoost: Add support for Boost 1.60 ----------------------------------------------------------------------- Summary of changes: Modules/FindBoost.cmake | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 18 10:13:02 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 18 Dec 2015 10:13:02 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1794-g7dc60bb Message-ID: <20151218151302.AE813E0229@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 7dc60bb47e942f702680217d4e5bf5ed34b06902 (commit) via 5ffdd37b7ff8279ffffbf8cc5a007a541be0d7ff (commit) via 81e5bf2548f91adae813360aef8f7fa5cd2ef0b0 (commit) via 83a1f0a99b05d5f8d060d5777349a32d196be16d (commit) via 4395190cd474f3e83139961d1271c766604e4a1c (commit) via 614c8a1c920083c3ae76ff035168f7096db6c510 (commit) from 50e3373bfe154b3fd37d9e74f728552a1c012bfc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7dc60bb47e942f702680217d4e5bf5ed34b06902 commit 7dc60bb47e942f702680217d4e5bf5ed34b06902 Merge: 50e3373 5ffdd37 Author: Brad King AuthorDate: Fri Dec 18 10:12:54 2015 -0500 Commit: Brad King CommitDate: Fri Dec 18 10:12:54 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From chuck.atkins at kitware.com Fri Dec 18 10:51:35 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Fri, 18 Dec 2015 10:51:35 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1796-g9c8fbca Message-ID: <20151218155135.03EC1E0A50@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 9c8fbca2ea642d32ba3a6e4e0324c2d9874c0baa (commit) via 928d2085d8ebeadc498e9e9f884b8adabf3346c3 (commit) from 7dc60bb47e942f702680217d4e5bf5ed34b06902 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c8fbca2ea642d32ba3a6e4e0324c2d9874c0baa commit 9c8fbca2ea642d32ba3a6e4e0324c2d9874c0baa Merge: 7dc60bb 928d208 Author: Chuck Atkins AuthorDate: Fri Dec 18 10:51:34 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 18 10:51:34 2015 -0500 Merge topic 'fix-absolute-libs-for-cray-wrappers' into next 928d2085 CrayPrgEnv: Don't use absolute paths for imlicit libraries https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=928d2085d8ebeadc498e9e9f884b8adabf3346c3 commit 928d2085d8ebeadc498e9e9f884b8adabf3346c3 Author: Chuck Atkins AuthorDate: Fri Dec 18 09:27:55 2015 -0600 Commit: Chuck Atkins CommitDate: Fri Dec 18 09:27:55 2015 -0600 CrayPrgEnv: Don't use absolute paths for imlicit libraries When parsing implicit include dirs, link dirs, and link libs, all arguments are resolved to absolute paths instead of relative paths. This is correct for link and include directories but link libraries should only include the library name, not it's path. diff --git a/Modules/Compiler/CrayPrgEnv.cmake b/Modules/Compiler/CrayPrgEnv.cmake index c3e7b73..61daa0f 100644 --- a/Modules/Compiler/CrayPrgEnv.cmake +++ b/Modules/Compiler/CrayPrgEnv.cmake @@ -4,12 +4,14 @@ if(__craylinux_crayprgenv) endif() set(__craylinux_crayprgenv 1) -macro(__cray_extract_args cmd tag_regex out_var) +macro(__cray_extract_args cmd tag_regex out_var make_absolute) string(REGEX MATCHALL "${tag_regex}" args "${cmd}") foreach(arg IN LISTS args) string(REGEX REPLACE "^${tag_regex}$" "\\2" param "${arg}") - get_filename_component(param_abs "${param}" ABSOLUTE) - list(APPEND ${out_var} ${param_abs}) + if(make_absolute) + get_filename_component(param "${param}" ABSOLUTE) + endif() + list(APPEND ${out_var} ${param}) endforeach() endmacro() @@ -21,15 +23,18 @@ function(__cray_extract_implicit src compiler_cmd link_cmd lang include_dirs_var OUTPUT_VARIABLE output ERROR_VARIABLE error ) + set(include_dirs) + set(link_dirs) + set(link_libs) string(REGEX REPLACE "\r?\n" ";" output_lines "${output}\n${error}") foreach(line IN LISTS output_lines) if("${line}" MATCHES "${compiler_cmd}") - __cray_extract_args("${line}" " -(I ?|isystem )([^ ]*)" include_dirs) + __cray_extract_args("${line}" " -(I ?|isystem )([^ ]*)" include_dirs 1) set(processed_include 1) endif() if("${line}" MATCHES "${link_cmd}") - __cray_extract_args("${line}" " -(L ?)([^ ]*)" link_dirs) - __cray_extract_args("${line}" " -(l ?)([^ ]*)" link_libs) + __cray_extract_args("${line}" " -(L ?)([^ ]*)" link_dirs 1) + __cray_extract_args("${line}" " -(l ?)([^ ]*)" link_libs 0) set(processed_link 1) endif() if(processed_include AND processed_link) ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/CrayPrgEnv.cmake | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 18 10:55:37 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 18 Dec 2015 10:55:37 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-734-gf9e3ca4 Message-ID: <20151218155537.B95F3E0532@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via f9e3ca46cbeae4fb885398e8f7b90c784078b1d3 (commit) via 24cdb9df598a1c10fffc718255527729595442a1 (commit) via de77d4a741c84e0b5774e79a0c84e945e25ad9f8 (commit) via 38d723b37e660223a9c8a125cf01ae5a6c9977ba (commit) from 5ffdd37b7ff8279ffffbf8cc5a007a541be0d7ff (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9e3ca46cbeae4fb885398e8f7b90c784078b1d3 commit f9e3ca46cbeae4fb885398e8f7b90c784078b1d3 Merge: 5ffdd37 24cdb9d Author: Brad King AuthorDate: Fri Dec 18 10:55:35 2015 -0500 Commit: CMake Topic Stage CommitDate: Fri Dec 18 10:55:35 2015 -0500 Merge topic 'release-wix-config-ng' 24cdb9df CMake: Mimic NSIS options dialog in WiX installer de77d4a7 CPackWIX: Allow multiple patch files and diagnose if any are missing 38d723b3 CPackWIX: Allow patching of shortcut components ----------------------------------------------------------------------- Summary of changes: CMakeCPackOptions.cmake.in | 29 +++++++++- Modules/CPackWIX.cmake | 3 +- Source/CPack/WiX/cmCPackWIXGenerator.cxx | 13 ++++- Source/CPack/WiX/cmWIXPatch.cxx | 12 +++- Source/CPack/WiX/cmWIXPatch.h | 2 +- {Modules => Utilities/Release/WiX}/WIX.template.in | 5 +- Utilities/Release/WiX/cmake_extra_dialog.wxs | 36 ++++++++++++ Utilities/Release/WiX/install_dir.wxs | 61 ++++++++++++++++++++ Utilities/Release/WiX/patch_desktop_shortcut.xml | 5 ++ Utilities/Release/WiX/patch_path_env.xml | 26 +++++++++ .../{cpack_wix_ui_banner.jpg => WiX/ui_banner.jpg} | Bin 2607 -> 2607 bytes .../{cpack_wix_ui_dialog.jpg => WiX/ui_dialog.jpg} | Bin 13369 -> 13369 bytes 12 files changed, 182 insertions(+), 10 deletions(-) copy {Modules => Utilities/Release/WiX}/WIX.template.in (86%) create mode 100644 Utilities/Release/WiX/cmake_extra_dialog.wxs create mode 100644 Utilities/Release/WiX/install_dir.wxs create mode 100644 Utilities/Release/WiX/patch_desktop_shortcut.xml create mode 100644 Utilities/Release/WiX/patch_path_env.xml rename Utilities/Release/{cpack_wix_ui_banner.jpg => WiX/ui_banner.jpg} (100%) rename Utilities/Release/{cpack_wix_ui_dialog.jpg => WiX/ui_dialog.jpg} (100%) hooks/post-receive -- CMake From brad.king at kitware.com Fri Dec 18 10:55:53 2015 From: brad.king at kitware.com (Brad King) Date: Fri, 18 Dec 2015 10:55:53 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1798-gb6883ac Message-ID: <20151218155553.630A3E0BBB@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via b6883ac381657dd855dfe9a8cda76b040a225dcf (commit) via f9e3ca46cbeae4fb885398e8f7b90c784078b1d3 (commit) from 9c8fbca2ea642d32ba3a6e4e0324c2d9874c0baa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b6883ac381657dd855dfe9a8cda76b040a225dcf commit b6883ac381657dd855dfe9a8cda76b040a225dcf Merge: 9c8fbca f9e3ca4 Author: Brad King AuthorDate: Fri Dec 18 10:55:45 2015 -0500 Commit: Brad King CommitDate: Fri Dec 18 10:55:45 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Sat Dec 19 00:01:10 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 19 Dec 2015 00:01:10 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-735-ga5149d3 Message-ID: <20151219050110.43391E0B13@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via a5149d31beaf7e36c449659066f5348136666a8c (commit) from f9e3ca46cbeae4fb885398e8f7b90c784078b1d3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5149d31beaf7e36c449659066f5348136666a8c commit a5149d31beaf7e36c449659066f5348136666a8c Author: Kitware Robot AuthorDate: Sat Dec 19 00:01:07 2015 -0500 Commit: Kitware Robot CommitDate: Sat Dec 19 00:01:07 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7515139..99c621a 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 4) -set(CMake_VERSION_PATCH 20151218) +set(CMake_VERSION_PATCH 20151219) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Dec 20 00:01:24 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 20 Dec 2015 00:01:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-736-g693a42f Message-ID: <20151220050124.9DDBAE0A74@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 693a42fb00650180c98a15a62e11e450b6ab99f0 (commit) from a5149d31beaf7e36c449659066f5348136666a8c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=693a42fb00650180c98a15a62e11e450b6ab99f0 commit 693a42fb00650180c98a15a62e11e450b6ab99f0 Author: Kitware Robot AuthorDate: Sun Dec 20 00:01:16 2015 -0500 Commit: Kitware Robot CommitDate: Sun Dec 20 00:01:16 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 99c621a..85a752e 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 4) -set(CMake_VERSION_PATCH 20151219) +set(CMake_VERSION_PATCH 20151220) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Dec 21 00:01:24 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 21 Dec 2015 00:01:24 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-737-gba88bfc Message-ID: <20151221050124.26C9EE0B43@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via ba88bfcf212bc8e93eb065e6d4bafbbf34394e68 (commit) from 693a42fb00650180c98a15a62e11e450b6ab99f0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba88bfcf212bc8e93eb065e6d4bafbbf34394e68 commit ba88bfcf212bc8e93eb065e6d4bafbbf34394e68 Author: Kitware Robot AuthorDate: Mon Dec 21 00:01:16 2015 -0500 Commit: Kitware Robot CommitDate: Mon Dec 21 00:01:16 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 85a752e..15feed4 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 4) -set(CMake_VERSION_PATCH 20151220) +set(CMake_VERSION_PATCH 20151221) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 21 09:34:43 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 21 Dec 2015 09:34:43 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1800-gddbacc2 Message-ID: <20151221143443.2E9E4E0F23@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via ddbacc21f0b21abed14bf1ba34437cf03b299f73 (commit) via d9bf5206d007507fff3e1a89b8f49d7960a209c8 (commit) from b6883ac381657dd855dfe9a8cda76b040a225dcf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ddbacc21f0b21abed14bf1ba34437cf03b299f73 commit ddbacc21f0b21abed14bf1ba34437cf03b299f73 Merge: b6883ac d9bf520 Author: Brad King AuthorDate: Mon Dec 21 09:34:42 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 21 09:34:42 2015 -0500 Merge topic 'vs-compiler-id-itanium' into next d9bf5206 CMakeDetermineCompilerId: Fix VS Itanium platform name (#15889) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9bf5206d007507fff3e1a89b8f49d7960a209c8 commit d9bf5206d007507fff3e1a89b8f49d7960a209c8 Author: Brad King AuthorDate: Mon Dec 21 09:30:26 2015 -0500 Commit: Brad King CommitDate: Mon Dec 21 09:34:16 2015 -0500 CMakeDetermineCompilerId: Fix VS Itanium platform name (#15889) VS expects the platform to be just `Itanium`, so drop the incorrect special case mapping it to `ia64`. This platform name has been wrong since the logic was added by commit v2.8.10~148^2~8 (VS: Detect the compiler id and tool location, 2012-08-16). diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 81c2509..5b3c7f2 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -182,9 +182,6 @@ Id flags: ${testflags} set(v 6) set(ext dsp) endif() - if("${id_platform}" STREQUAL "Itanium") - set(id_platform ia64) - endif() if(CMAKE_VS_PLATFORM_TOOLSET) if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android") set(id_toolset "${CMAKE_VS_PLATFORM_TOOLSET}") ----------------------------------------------------------------------- Summary of changes: Modules/CMakeDetermineCompilerId.cmake | 3 --- 1 file changed, 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 21 09:41:03 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 21 Dec 2015 09:41:03 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-739-g3768a79 Message-ID: <20151221144103.AF09DE001A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 3768a79c232dc2456b9e9b70da6582b0eb1e78f1 (commit) via 928d2085d8ebeadc498e9e9f884b8adabf3346c3 (commit) from ba88bfcf212bc8e93eb065e6d4bafbbf34394e68 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3768a79c232dc2456b9e9b70da6582b0eb1e78f1 commit 3768a79c232dc2456b9e9b70da6582b0eb1e78f1 Merge: ba88bfc 928d208 Author: Brad King AuthorDate: Mon Dec 21 09:41:02 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 21 09:41:02 2015 -0500 Merge topic 'fix-absolute-libs-for-cray-wrappers' 928d2085 CrayPrgEnv: Don't use absolute paths for imlicit libraries ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/CrayPrgEnv.cmake | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 21 09:41:12 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 21 Dec 2015 09:41:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-746-ga53e016 Message-ID: <20151221144112.4F0C5E0156@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via a53e0168c344111de301ad67498ad89862b58cdf (commit) via a5dd0c9d427d66f7e361b0aa714a0a41b65ae4f0 (commit) via 036b6ef7c47ccb19f291d2f36df37aaf885b4ba8 (commit) via 12293371ee0f3b930afee8d328415968eb8201e6 (commit) via 3fdbb0a806f67f10ea8428e03a4523d08d2b083c (commit) via 55b21d072e2df9a35a354fd33e8cf2d0c3bd22be (commit) via c7d9a249118a7b01ed8fa9cc8c61833e39d251d2 (commit) from 3768a79c232dc2456b9e9b70da6582b0eb1e78f1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a53e0168c344111de301ad67498ad89862b58cdf commit a53e0168c344111de301ad67498ad89862b58cdf Merge: 3768a79 a5dd0c9 Author: Brad King AuthorDate: Mon Dec 21 09:41:09 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 21 09:41:09 2015 -0500 Merge topic 'import-kwiml' a5dd0c9d Add option to use a system-installed KWIML 036b6ef7 Port CMake from cmIML to KWIML 12293371 Merge branch 'upstream-KWIML' into import-kwiml 3fdbb0a8 KWIML 2015-12-09 (43f9f8d0) 55b21d07 Add script to update KWIML from upstream c7d9a249 Utilities/KWIML: Drop sources to make room for fresh import ----------------------------------------------------------------------- Summary of changes: CMakeLists.txt | 29 +- CTestCustom.cmake.in | 2 +- Source/CMakeLists.txt | 1 + Source/cmAlgorithms.h | 4 +- Source/cmELF.cxx | 11 +- Source/cmFileCommand.cxx | 4 +- Source/cmFindPackageCommand.h | 2 +- Source/cmLocalGenerator.cxx | 4 +- Source/cmLocalGenerator.h | 4 +- Source/cmStandardIncludes.h | 2 +- Source/cmVersion.h | 2 +- Source/cm_sha2.c | 13 +- Source/cm_sha2.h | 10 +- Utilities/KWIML/.gitattributes | 1 + Utilities/KWIML/ABI.h.in | 506 --------- Utilities/KWIML/CMakeLists.txt | 145 +-- Utilities/KWIML/Copyright.txt | 2 +- Utilities/KWIML/INT.h.in | 861 ---------------- Utilities/KWIML/README.md | 36 + Utilities/KWIML/README.txt | 29 - Utilities/KWIML/include/kwiml/abi.h | 562 ++++++++++ Utilities/KWIML/include/kwiml/int.h | 1069 ++++++++++++++++++++ Utilities/KWIML/src/kwiml-config.cmake.in | 1 + Utilities/KWIML/src/version.h.in | 59 ++ Utilities/KWIML/test/CMakeLists.txt | 48 +- Utilities/KWIML/test/test.c | 32 +- Utilities/KWIML/test/test.cxx | 16 +- Utilities/KWIML/test/test.h | 31 +- Utilities/KWIML/test/test_ABI_C.c | 22 - Utilities/KWIML/test/test_ABI_CXX.cxx | 22 - Utilities/KWIML/test/test_ABI_endian.h.in | 47 - Utilities/KWIML/test/test_INT_C.c | 22 - Utilities/KWIML/test/test_INT_CXX.cxx | 22 - Utilities/KWIML/test/test_abi_C.c | 19 + Utilities/KWIML/test/test_abi_CXX.cxx | 19 + Utilities/KWIML/test/test_abi_endian.h | 41 + Utilities/KWIML/test/test_include_C.c | 20 +- Utilities/KWIML/test/test_include_CXX.cxx | 20 +- Utilities/KWIML/test/test_int_C.c | 19 + Utilities/KWIML/test/test_int_CXX.cxx | 19 + .../{test_INT_format.h.in => test_int_format.h} | 83 +- .../{update-kwsys.bash => update-kwiml.bash} | 10 +- Utilities/cmThirdParty.h.in | 1 + Utilities/{cm_jsoncpp_writer.h => cm_kwiml.h} | 14 +- Utilities/cmjsoncpp/CMakeLists.txt | 1 + bootstrap | 31 +- 46 files changed, 2108 insertions(+), 1810 deletions(-) create mode 100644 Utilities/KWIML/.gitattributes delete mode 100644 Utilities/KWIML/ABI.h.in delete mode 100644 Utilities/KWIML/INT.h.in create mode 100644 Utilities/KWIML/README.md delete mode 100644 Utilities/KWIML/README.txt create mode 100644 Utilities/KWIML/include/kwiml/abi.h create mode 100644 Utilities/KWIML/include/kwiml/int.h create mode 100644 Utilities/KWIML/src/kwiml-config.cmake.in create mode 100644 Utilities/KWIML/src/version.h.in delete mode 100644 Utilities/KWIML/test/test_ABI_C.c delete mode 100644 Utilities/KWIML/test/test_ABI_CXX.cxx delete mode 100644 Utilities/KWIML/test/test_ABI_endian.h.in delete mode 100644 Utilities/KWIML/test/test_INT_C.c delete mode 100644 Utilities/KWIML/test/test_INT_CXX.cxx create mode 100644 Utilities/KWIML/test/test_abi_C.c create mode 100644 Utilities/KWIML/test/test_abi_CXX.cxx create mode 100644 Utilities/KWIML/test/test_abi_endian.h create mode 100644 Utilities/KWIML/test/test_int_C.c create mode 100644 Utilities/KWIML/test/test_int_CXX.cxx rename Utilities/KWIML/test/{test_INT_format.h.in => test_int_format.h} (78%) copy Utilities/Scripts/{update-kwsys.bash => update-kwiml.bash} (51%) copy Utilities/{cm_jsoncpp_writer.h => cm_kwiml.h} (71%) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 21 09:41:48 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 21 Dec 2015 09:41:48 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1806-g4631633 Message-ID: <20151221144148.6E36EE0393@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 4631633ebf7cf92bc1ed03c24d51d74e00519fcb (commit) via a53e0168c344111de301ad67498ad89862b58cdf (commit) via 3768a79c232dc2456b9e9b70da6582b0eb1e78f1 (commit) via ba88bfcf212bc8e93eb065e6d4bafbbf34394e68 (commit) via 693a42fb00650180c98a15a62e11e450b6ab99f0 (commit) via a5149d31beaf7e36c449659066f5348136666a8c (commit) from ddbacc21f0b21abed14bf1ba34437cf03b299f73 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4631633ebf7cf92bc1ed03c24d51d74e00519fcb commit 4631633ebf7cf92bc1ed03c24d51d74e00519fcb Merge: ddbacc2 a53e016 Author: Brad King AuthorDate: Mon Dec 21 09:41:30 2015 -0500 Commit: Brad King CommitDate: Mon Dec 21 09:41:30 2015 -0500 Merge branch 'master' into next ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 21 09:51:47 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 21 Dec 2015 09:51:47 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1808-ga314171 Message-ID: <20151221145147.40D57E0FB5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via a314171669df6f6b8584eec9554b68b542841ba2 (commit) via 8b627550ef91e12a0952e8ed271a4f90a8da1aaa (commit) from 4631633ebf7cf92bc1ed03c24d51d74e00519fcb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a314171669df6f6b8584eec9554b68b542841ba2 commit a314171669df6f6b8584eec9554b68b542841ba2 Merge: 4631633 8b62755 Author: Brad King AuthorDate: Mon Dec 21 09:51:46 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 21 09:51:46 2015 -0500 Merge topic 'suppress-Wshadow-single' into next 8b627550 CTestCustom: Suppress -Wshadow warning about Solaris 'single' typedef https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b627550ef91e12a0952e8ed271a4f90a8da1aaa commit 8b627550ef91e12a0952e8ed271a4f90a8da1aaa Author: Brad King AuthorDate: Mon Dec 21 09:48:35 2015 -0500 Commit: Brad King CommitDate: Mon Dec 21 09:49:00 2015 -0500 CTestCustom: Suppress -Wshadow warning about Solaris 'single' typedef On Solaris the system `/usr/include/floatingpoint.h` header contains typedef float single; so the GNU compiler warns that uses of the name `single` shadow it. Just suppress the warning because our uses of this name would become less readable with a different name. diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index db64559..634d22a 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -21,6 +21,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "Utilities.cmcurl" "Utilities.cmexpat." "Utilities.cmlibarchive" + "warning: declaration of .single. shadows a global declaration" "/usr/include.*warning.*shadowed declaration is here" "/usr/bin/ld.*warning.*-..*directory.name.*bin.*does not exist" "Redeclaration of .send..... with a different storage class specifier" ----------------------------------------------------------------------- Summary of changes: CTestCustom.cmake.in | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 21 10:27:19 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 21 Dec 2015 10:27:19 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1810-gf80b5b2 Message-ID: <20151221152719.31DC8E0FBE@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via f80b5b22722ae4e20eec33705a56c3734df2dd05 (commit) via 7656662148782b7751c62efd256e644c7295c883 (commit) from a314171669df6f6b8584eec9554b68b542841ba2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f80b5b22722ae4e20eec33705a56c3734df2dd05 commit f80b5b22722ae4e20eec33705a56c3734df2dd05 Merge: a314171 7656662 Author: Brad King AuthorDate: Mon Dec 21 10:27:18 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 21 10:27:18 2015 -0500 Merge topic 'install-xdgdata-dir' into next 76566621 QtDialog: Add option to control XDG file install destination https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7656662148782b7751c62efd256e644c7295c883 commit 7656662148782b7751c62efd256e644c7295c883 Author: Niels Ole Salscheider AuthorDate: Mon Dec 21 16:02:11 2015 +0100 Commit: Brad King CommitDate: Mon Dec 21 10:23:48 2015 -0500 QtDialog: Add option to control XDG file install destination Create a `CMAKE_XDGDATA_DIR` option and add a corresponding flag to the `bootstrap` script. This is needed for multiarch layouts where the prefix is `/usr/${host}` but where architecture-independent files (like the XDG-specific ones) are installed to `/usr/share`. diff --git a/Source/CMakeInstallDestinations.cmake b/Source/CMakeInstallDestinations.cmake index 99c86ca..2f9d95a 100644 --- a/Source/CMakeInstallDestinations.cmake +++ b/Source/CMakeInstallDestinations.cmake @@ -3,24 +3,29 @@ if(BEOS) set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # HAIKU set(CMAKE_MAN_DIR_DEFAULT "documentation/man") # HAIKU set(CMAKE_DOC_DIR_DEFAULT "documentation/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # HAIKU + set(CMAKE_XDGDATA_DIR_DEFAULT "share") # HAIKU elseif(CYGWIN) set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION}") # CYGWIN set(CMAKE_DOC_DIR_DEFAULT "share/doc/cmake-${CMake_VERSION}") # CYGWIN set(CMAKE_MAN_DIR_DEFAULT "share/man") # CYGWIN + set(CMAKE_XDGDATA_DIR_DEFAULT "share") # CYGWIN else() set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # OTHER set(CMAKE_DOC_DIR_DEFAULT "doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # OTHER set(CMAKE_MAN_DIR_DEFAULT "man") # OTHER + set(CMAKE_XDGDATA_DIR_DEFAULT "share") # OTHER endif() set(CMAKE_DATA_DIR_DESC "data") set(CMAKE_DOC_DIR_DESC "docs") set(CMAKE_MAN_DIR_DESC "man pages") +set(CMAKE_XDGDATA_DIR_DESC "XDG specific files") foreach(v CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR + CMAKE_XDGDATA_DIR ) # Populate the cache with empty values so we know when the user sets them. set(${v} "" CACHE STRING "") diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 9161ad3..f17de5d 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -193,7 +193,7 @@ if(UNIX AND NOT APPLE) foreach (size IN ITEMS 32 128) install( FILES "${CMAKE_CURRENT_SOURCE_DIR}/CMakeSetup${size}.png" - DESTINATION "share/icons/hicolor/${size}x${size}/apps" + DESTINATION "${CMAKE_XDGDATA_DIR}/icons/hicolor/${size}x${size}/apps" ${COMPONENT} RENAME "CMakeSetup.png") endforeach () @@ -201,10 +201,10 @@ if(UNIX AND NOT APPLE) # install a desktop file so CMake appears in the application start menu # with an icon install(FILES CMake.desktop - DESTINATION share/applications + DESTINATION "${CMAKE_XDGDATA_DIR}/applications" ${COMPONENT}) install(FILES cmakecache.xml - DESTINATION share/mime/packages + DESTINATION "${CMAKE_XDGDATA_DIR}/mime/packages" ${COMPONENT}) endif() diff --git a/bootstrap b/bootstrap index b2421a1..97e85bf 100755 --- a/bootstrap +++ b/bootstrap @@ -63,9 +63,11 @@ cmake_copyright="`grep '^Copyright .* Kitware' "${cmake_source_dir}/Copyright.tx cmake_data_dir_keyword="OTHER" cmake_doc_dir_keyword="OTHER" cmake_man_dir_keyword="OTHER" +cmake_xdgdata_dir_keyword="OTHER" cmake_data_dir="" cmake_doc_dir="" cmake_man_dir="" +cmake_xdgdata_dir="" cmake_init_file="" cmake_bootstrap_system_libs="" cmake_bootstrap_qt_gui="" @@ -214,6 +216,7 @@ fi cmake_data_dir_default="`cmake_install_dest_default DATA ${cmake_data_dir_keyword}`" cmake_doc_dir_default="`cmake_install_dest_default DOC ${cmake_doc_dir_keyword}`" cmake_man_dir_default="`cmake_install_dest_default MAN ${cmake_man_dir_keyword}`" +cmake_xdgdata_dir_default="`cmake_install_dest_default XDGDATA ${cmake_xdgdata_dir_keyword}`" CMAKE_KNOWN_C_COMPILERS="cc gcc xlc icc tcc" CMAKE_KNOWN_CXX_COMPILERS="aCC xlC CC g++ c++ icc como " @@ -428,6 +431,8 @@ Directory and file names: ['"${cmake_doc_dir_default}"'] --mandir=DIR install man pages files in PREFIX/DIR/manN ['"${cmake_man_dir_default}"'] + --xdgdatadir=DIR install XDG specific files in PREFIX/DIR + ['"${cmake_xdgdata_dir_default}"'] ' exit 10 } @@ -616,6 +621,7 @@ while test $# != 0; do --datadir=*) cmake_data_dir=`cmake_arg "$1"` ;; --docdir=*) cmake_doc_dir=`cmake_arg "$1"` ;; --mandir=*) cmake_man_dir=`cmake_arg "$1"` ;; + --xdgdatadir=*) cmake_xdgdata_dir=`cmake_arg "$1"` ;; --init=*) cmake_init_file=`cmake_arg "$1"` ;; --system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1" ;; --no-system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0" ;; @@ -1368,6 +1374,7 @@ set (CMAKE_INSTALL_PREFIX "'"${cmake_prefix_dir}"'" CACHE PATH "Install path pre set (CMAKE_DOC_DIR "'"${cmake_doc_dir}"'" CACHE PATH "Install location for documentation (relative to prefix)." FORCE) set (CMAKE_MAN_DIR "'"${cmake_man_dir}"'" CACHE PATH "Install location for man pages (relative to prefix)." FORCE) set (CMAKE_DATA_DIR "'"${cmake_data_dir}"'" CACHE PATH "Install location for data (relative to prefix)." FORCE) +set (CMAKE_XDGDATA_DIR "'"${cmake_xdgdata_dir}"'" CACHE PATH "Install location for XDG specific files (relative to prefix)." FORCE) ' > "${cmake_bootstrap_dir}/InitialCacheFlags.cmake" # Add configuration settings given as command-line options. ----------------------------------------------------------------------- Summary of changes: Source/CMakeInstallDestinations.cmake | 5 +++++ Source/QtDialog/CMakeLists.txt | 6 +++--- bootstrap | 7 +++++++ 3 files changed, 15 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From brad.king at kitware.com Mon Dec 21 11:30:19 2015 From: brad.king at kitware.com (Brad King) Date: Mon, 21 Dec 2015 11:30:19 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1815-g2aa0380 Message-ID: <20151221163019.A3552E0E73@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 2aa03802ead74a2adbcb2687b6a17e783add47db (commit) via fae4779864d1e5a93369b1ac7de9ee7428a28043 (commit) via 083312a8fd39f6ff7a9abc79184e31eb233e8933 (commit) via 240b065faa9bc3b1a8dcf073a94028cd473a8c62 (commit) via a95b47154ef0508cb30c82b79dab75526743498a (commit) from f80b5b22722ae4e20eec33705a56c3734df2dd05 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2aa03802ead74a2adbcb2687b6a17e783add47db commit 2aa03802ead74a2adbcb2687b6a17e783add47db Merge: f80b5b2 fae4779 Author: Brad King AuthorDate: Mon Dec 21 11:30:18 2015 -0500 Commit: CMake Topic Stage CommitDate: Mon Dec 21 11:30:18 2015 -0500 Merge topic 'release-windows' into next fae47798 Utilities/Release: Configure Windows binary to support Windows XP 083312a8 Utilities/Release: Switch to .msi builder for Windows binary 240b065f Utilities/Release: Optionally load environment on remote build server a95b4715 Utilities/Release: Add optional remote launcher to ssh calls https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fae4779864d1e5a93369b1ac7de9ee7428a28043 commit fae4779864d1e5a93369b1ac7de9ee7428a28043 Author: Brad King AuthorDate: Fri Dec 18 14:35:34 2015 -0500 Commit: Brad King CommitDate: Mon Dec 21 10:05:03 2015 -0500 Utilities/Release: Configure Windows binary to support Windows XP Compile with `-D_WIN32_WINNT=0x501` to use a WinXP-compatible API. Compile with `-D_USING_V110_SDK71_` to tell the VS standard library headers that we are building with a WinXP-compatible Windows SDK. Link executables with `-subsystem:console,5.01` to make them runnable on Windows XP. Ideally `cmake-gui` should instead be linked with `-subsystem:windows,5.01` but with the Ninja and Makefile generators CMake adds `-subsystem:windows` after our `-subsystem:console,5.01` flag and the linker seems to interpret this combination as we need. diff --git a/Utilities/Release/dash3win7_release.cmake b/Utilities/Release/dash3win7_release.cmake index 290b473..f25d638 100644 --- a/Utilities/Release/dash3win7_release.cmake +++ b/Utilities/Release/dash3win7_release.cmake @@ -17,7 +17,11 @@ CMAKE_GENERATOR:INTERNAL=Ninja BUILD_QtDialog:BOOL:=TRUE CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE CMake_INSTALL_DEPENDENCIES:BOOL=ON +CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x86 -subsystem:console,5.01 ") +set(ppflags "-D_WIN32_WINNT=0x501 -D_USING_V110_SDK71_") +set(CFLAGS "${ppflags}") +set(CXXFLAGS "${ppflags}") set(ENV ". ~/rel/env") get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) set(GIT_EXTRA "git config core.autocrlf true") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=083312a8fd39f6ff7a9abc79184e31eb233e8933 commit 083312a8fd39f6ff7a9abc79184e31eb233e8933 Author: Brad King AuthorDate: Thu Dec 10 14:59:09 2015 -0500 Commit: Brad King CommitDate: Mon Dec 21 09:52:28 2015 -0500 Utilities/Release: Switch to .msi builder for Windows binary Use a new build machine to produce the Windows binary using the CPack WiX generator to produce a `.msi` installer. diff --git a/Help/release/dev/release-windows.rst b/Help/release/dev/release-windows.rst new file mode 100644 index 0000000..cc9f2d5 --- /dev/null +++ b/Help/release/dev/release-windows.rst @@ -0,0 +1,7 @@ +release-windows +--------------- + +* The precompiled Windows binary provided on ``cmake.org`` is now a + ``.msi`` package instead of an installer executable. One may need + to manually uninstall CMake versions lower than 3.5 before installing + the new package. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 65bfb77..043b757 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -685,7 +685,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endmacro() if(CMAKE_BUILD_NIGHTLY_RELEASES) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyWindows - dash2win64_release.cmake) + dash3win7_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyOSX dashmacmini5_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyLinux32 diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake index 76057d1..d41c4ec 100644 --- a/Utilities/Release/create-cmake-release.cmake +++ b/Utilities/Release/create-cmake-release.cmake @@ -6,7 +6,7 @@ endif() file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/logs) set(RELEASE_SCRIPTS_BATCH_1 - dash2win64_release.cmake # Windows + dash3win7_release.cmake # Windows dashmacmini5_release.cmake # OS X x86_64 magrathea_release.cmake # Linux linux64_release.cmake # Linux x86_64 diff --git a/Utilities/Release/dash2win64_release.cmake b/Utilities/Release/dash3win7_release.cmake similarity index 70% rename from Utilities/Release/dash2win64_release.cmake rename to Utilities/Release/dash3win7_release.cmake index ecfd7c5..290b473 100644 --- a/Utilities/Release/dash2win64_release.cmake +++ b/Utilities/Release/dash3win7_release.cmake @@ -1,23 +1,24 @@ -set(CMAKE_RELEASE_DIRECTORY "c:/cygwin/home/dashboard/CMakeReleaseDirectory") +set(CMAKE_RELEASE_DIRECTORY "c:/msys64/home/dashboard/CMakeReleaseDirectory") set(CONFIGURE_WITH_CMAKE TRUE) set(CMAKE_CONFIGURE_PATH "c:/Program\\ Files\\ \\(x86\\)/CMake/bin/cmake.exe") set(PROCESSORS 8) -set(HOST dash2win64) -set(CPACK_BINARY_GENERATORS "NSIS ZIP") +set(HOST dash3win7) +set(RUN_LAUNCHER ~/rel/run) +set(CPACK_BINARY_GENERATORS "WIX ZIP") set(CPACK_SOURCE_GENERATORS "ZIP") -set(MAKE_PROGRAM "make") +set(MAKE_PROGRAM "ninja") set(MAKE "${MAKE_PROGRAM} -j8") set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release CMAKE_DOC_DIR:STRING=doc/cmake CMAKE_USE_OPENSSL:BOOL=OFF CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE CMAKE_Fortran_COMPILER:FILEPATH=FALSE -CMAKE_GENERATOR:INTERNAL=Unix Makefiles +CMAKE_GENERATOR:INTERNAL=Ninja BUILD_QtDialog:BOOL:=TRUE CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE CMake_INSTALL_DEPENDENCIES:BOOL=ON -QT_QMAKE_EXECUTABLE:FILEPATH=c:/Dashboards/Support/qt-build/Qt/bin/qmake.exe ") +set(ENV ". ~/rel/env") get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) set(GIT_EXTRA "git config core.autocrlf true") include(${path}/release_cmake.cmake) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=240b065faa9bc3b1a8dcf073a94028cd473a8c62 commit 240b065faa9bc3b1a8dcf073a94028cd473a8c62 Author: Brad King AuthorDate: Thu Dec 10 14:58:11 2015 -0500 Commit: Brad King CommitDate: Mon Dec 21 09:52:28 2015 -0500 Utilities/Release: Optionally load environment on remote build server diff --git a/Utilities/Release/release_cmake.sh.in b/Utilities/Release/release_cmake.sh.in index 06e720f..1465129 100755 --- a/Utilities/Release/release_cmake.sh.in +++ b/Utilities/Release/release_cmake.sh.in @@ -5,6 +5,7 @@ echo "" echo "remove and create working directory @CMAKE_RELEASE_DIRECTORY@" rm -rf @CMAKE_RELEASE_DIRECTORY@ mkdir @CMAKE_RELEASE_DIRECTORY@ + at ENV@ check_exit_value() { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a95b47154ef0508cb30c82b79dab75526743498a commit a95b47154ef0508cb30c82b79dab75526743498a Author: Brad King AuthorDate: Thu Dec 10 14:57:22 2015 -0500 Commit: Brad King CommitDate: Mon Dec 21 09:52:28 2015 -0500 Utilities/Release: Add optional remote launcher to ssh calls diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index 0a3d324..0d9c784 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -19,6 +19,9 @@ endif() if(NOT DEFINED RUN_SHELL) set(RUN_SHELL "/bin/sh") endif() +if(NOT DEFINED RUN_LAUNCHER) + set(RUN_LAUNCHER "") +endif() if(NOT DEFINED PROCESSORS) set(PROCESSORS 1) endif() @@ -52,11 +55,11 @@ message("Creating CMake release ${CMAKE_CREATE_VERSION} on ${HOST} with parallel macro(remote_command comment command) message("${comment}") if(${ARGC} GREATER 2) - message("ssh ${HOST} ${command}") - execute_process(COMMAND ssh ${HOST} ${command} RESULT_VARIABLE result INPUT_FILE ${ARGV2}) + message("ssh ${HOST} ${RUN_LAUNCHER} ${command}") + execute_process(COMMAND ssh ${HOST} ${RUN_LAUNCHER} ${command} RESULT_VARIABLE result INPUT_FILE ${ARGV2}) else() - message("ssh ${HOST} ${command}") - execute_process(COMMAND ssh ${HOST} ${command} RESULT_VARIABLE result) + message("ssh ${HOST} ${RUN_LAUNCHER} ${command}") + execute_process(COMMAND ssh ${HOST} ${RUN_LAUNCHER} ${command} RESULT_VARIABLE result) endif() if(${result} GREATER 0) message(FATAL_ERROR "Error running command: ${command}, return value = ${result}") ----------------------------------------------------------------------- Summary of changes: Help/release/dev/release-windows.rst | 7 +++++++ Tests/CMakeLists.txt | 2 +- Utilities/Release/create-cmake-release.cmake | 2 +- ...sh2win64_release.cmake => dash3win7_release.cmake} | 17 +++++++++++------ Utilities/Release/release_cmake.cmake | 11 +++++++---- Utilities/Release/release_cmake.sh.in | 1 + 6 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 Help/release/dev/release-windows.rst rename Utilities/Release/{dash2win64_release.cmake => dash3win7_release.cmake} (61%) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 22 00:01:11 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 22 Dec 2015 00:01:11 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-747-g8a45573 Message-ID: <20151222050111.64BEFE0F85@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 8a45573e99165e926482b07da5ceb3dd86307ea5 (commit) from a53e0168c344111de301ad67498ad89862b58cdf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8a45573e99165e926482b07da5ceb3dd86307ea5 commit 8a45573e99165e926482b07da5ceb3dd86307ea5 Author: Kitware Robot AuthorDate: Tue Dec 22 00:01:07 2015 -0500 Commit: Kitware Robot CommitDate: Tue Dec 22 00:01:07 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 15feed4..636083d 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 4) -set(CMake_VERSION_PATCH 20151221) +set(CMake_VERSION_PATCH 20151222) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 23 00:01:08 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 23 Dec 2015 00:01:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-748-g56653b8 Message-ID: <20151223050108.B08D1E1DBA@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 56653b81b85c7484a37b6574a1f4b628f462c717 (commit) from 8a45573e99165e926482b07da5ceb3dd86307ea5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=56653b81b85c7484a37b6574a1f4b628f462c717 commit 56653b81b85c7484a37b6574a1f4b628f462c717 Author: Kitware Robot AuthorDate: Wed Dec 23 00:01:05 2015 -0500 Commit: Kitware Robot CommitDate: Wed Dec 23 00:01:05 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 636083d..7cc5615 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 4) -set(CMake_VERSION_PATCH 20151222) +set(CMake_VERSION_PATCH 20151223) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 24 00:01:15 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 24 Dec 2015 00:01:15 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-749-g554c307 Message-ID: <20151224050115.1B9CDE1836@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 554c3074556fb8fbf4918fc3e2ea3bef97add1ad (commit) from 56653b81b85c7484a37b6574a1f4b628f462c717 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=554c3074556fb8fbf4918fc3e2ea3bef97add1ad commit 554c3074556fb8fbf4918fc3e2ea3bef97add1ad Author: Kitware Robot AuthorDate: Thu Dec 24 00:01:07 2015 -0500 Commit: Kitware Robot CommitDate: Thu Dec 24 00:01:07 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7cc5615..7c730e5 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 4) -set(CMake_VERSION_PATCH 20151223) +set(CMake_VERSION_PATCH 20151224) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Dec 25 00:01:09 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 25 Dec 2015 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-750-g630e444 Message-ID: <20151225050109.49429E1AFA@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 630e444e97df52d35a93d22c54359881c1e11193 (commit) from 554c3074556fb8fbf4918fc3e2ea3bef97add1ad (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=630e444e97df52d35a93d22c54359881c1e11193 commit 630e444e97df52d35a93d22c54359881c1e11193 Author: Kitware Robot AuthorDate: Fri Dec 25 00:01:06 2015 -0500 Commit: Kitware Robot CommitDate: Fri Dec 25 00:01:06 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7c730e5..c8c71b5 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 4) -set(CMake_VERSION_PATCH 20151224) +set(CMake_VERSION_PATCH 20151225) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Dec 26 00:01:09 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 26 Dec 2015 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-751-g0b3b5fb Message-ID: <20151226050109.E5A06E19B4@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 0b3b5fb16984e81639a92796ddf1f846ae6e8cea (commit) from 630e444e97df52d35a93d22c54359881c1e11193 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b3b5fb16984e81639a92796ddf1f846ae6e8cea commit 0b3b5fb16984e81639a92796ddf1f846ae6e8cea Author: Kitware Robot AuthorDate: Sat Dec 26 00:01:06 2015 -0500 Commit: Kitware Robot CommitDate: Sat Dec 26 00:01:06 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c8c71b5..ba2902e 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 4) -set(CMake_VERSION_PATCH 20151225) +set(CMake_VERSION_PATCH 20151226) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Dec 27 00:01:09 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 27 Dec 2015 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-752-g1d73f65 Message-ID: <20151227050111.54959E1B0E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 1d73f6525c523661e51173829b327acf9de9dfc4 (commit) from 0b3b5fb16984e81639a92796ddf1f846ae6e8cea (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1d73f6525c523661e51173829b327acf9de9dfc4 commit 1d73f6525c523661e51173829b327acf9de9dfc4 Author: Kitware Robot AuthorDate: Sun Dec 27 00:01:05 2015 -0500 Commit: Kitware Robot CommitDate: Sun Dec 27 00:01:05 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ba2902e..842b6ba 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 4) -set(CMake_VERSION_PATCH 20151226) +set(CMake_VERSION_PATCH 20151227) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Dec 28 00:01:09 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 28 Dec 2015 00:01:09 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-753-g9fdb66c Message-ID: <20151228050109.05928E1D30@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 9fdb66cff6c28fa279ff510ae9af6662b155524f (commit) from 1d73f6525c523661e51173829b327acf9de9dfc4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9fdb66cff6c28fa279ff510ae9af6662b155524f commit 9fdb66cff6c28fa279ff510ae9af6662b155524f Author: Kitware Robot AuthorDate: Mon Dec 28 00:01:06 2015 -0500 Commit: Kitware Robot CommitDate: Mon Dec 28 00:01:06 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 842b6ba..342fe0c 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 4) -set(CMake_VERSION_PATCH 20151227) +set(CMake_VERSION_PATCH 20151228) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Dec 29 00:01:13 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 29 Dec 2015 00:01:13 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-754-g6937491 Message-ID: <20151229050113.EC151E1CFC@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 69374919fd3fde3cd414eddfe01be79d16908391 (commit) from 9fdb66cff6c28fa279ff510ae9af6662b155524f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69374919fd3fde3cd414eddfe01be79d16908391 commit 69374919fd3fde3cd414eddfe01be79d16908391 Author: Kitware Robot AuthorDate: Tue Dec 29 00:01:08 2015 -0500 Commit: Kitware Robot CommitDate: Tue Dec 29 00:01:08 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 342fe0c..07a675b 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 4) -set(CMake_VERSION_PATCH 20151228) +set(CMake_VERSION_PATCH 20151229) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Dec 30 00:01:08 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 30 Dec 2015 00:01:08 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-755-gf04a09d Message-ID: <20151230050108.7102EE1B3A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via f04a09d1bd7107b73d2063c1ac4de3080b21cea4 (commit) from 69374919fd3fde3cd414eddfe01be79d16908391 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f04a09d1bd7107b73d2063c1ac4de3080b21cea4 commit f04a09d1bd7107b73d2063c1ac4de3080b21cea4 Author: Kitware Robot AuthorDate: Wed Dec 30 00:01:05 2015 -0500 Commit: Kitware Robot CommitDate: Wed Dec 30 00:01:05 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 07a675b..4c8f3d7 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 4) -set(CMake_VERSION_PATCH 20151229) +set(CMake_VERSION_PATCH 20151230) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From chuck.atkins at kitware.com Wed Dec 30 10:55:51 2015 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Wed, 30 Dec 2015 10:55:51 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1825-g3f07257 Message-ID: <20151230155551.0CB09E1BCF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 3f0725765641ba3dff41f135c5a23b089ac40e1b (commit) via 64e26850fc2a98994424a34eada9bec90f384c7e (commit) via 69374919fd3fde3cd414eddfe01be79d16908391 (commit) via 9fdb66cff6c28fa279ff510ae9af6662b155524f (commit) via 1d73f6525c523661e51173829b327acf9de9dfc4 (commit) via 0b3b5fb16984e81639a92796ddf1f846ae6e8cea (commit) via 630e444e97df52d35a93d22c54359881c1e11193 (commit) via 554c3074556fb8fbf4918fc3e2ea3bef97add1ad (commit) via 56653b81b85c7484a37b6574a1f4b628f462c717 (commit) via 8a45573e99165e926482b07da5ceb3dd86307ea5 (commit) from 2aa03802ead74a2adbcb2687b6a17e783add47db (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f0725765641ba3dff41f135c5a23b089ac40e1b commit 3f0725765641ba3dff41f135c5a23b089ac40e1b Merge: 2aa0380 64e2685 Author: Chuck Atkins AuthorDate: Wed Dec 30 10:55:50 2015 -0500 Commit: CMake Topic Stage CommitDate: Wed Dec 30 10:55:50 2015 -0500 Merge topic 'cray-prgev-cleanup' into next 64e26850 CrayPrgEnv: Cleanup binaries from implicit compile flag detection 69374919 CMake Nightly Date Stamp 9fdb66cf CMake Nightly Date Stamp 1d73f652 CMake Nightly Date Stamp 0b3b5fb1 CMake Nightly Date Stamp 630e444e CMake Nightly Date Stamp 554c3074 CMake Nightly Date Stamp 56653b81 CMake Nightly Date Stamp 8a45573e CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=64e26850fc2a98994424a34eada9bec90f384c7e commit 64e26850fc2a98994424a34eada9bec90f384c7e Author: Chuck Atkins AuthorDate: Tue Dec 29 12:08:35 2015 -0500 Commit: Chuck Atkins CommitDate: Tue Dec 29 10:21:07 2015 -0700 CrayPrgEnv: Cleanup binaries from implicit compile flag detection diff --git a/Modules/Compiler/CrayPrgEnv.cmake b/Modules/Compiler/CrayPrgEnv.cmake index 61daa0f..fa39b00 100644 --- a/Modules/Compiler/CrayPrgEnv.cmake +++ b/Modules/Compiler/CrayPrgEnv.cmake @@ -16,13 +16,16 @@ macro(__cray_extract_args cmd tag_regex out_var make_absolute) endmacro() function(__cray_extract_implicit src compiler_cmd link_cmd lang include_dirs_var link_dirs_var link_libs_var) + set(BIN "${CMAKE_PLATFORM_INFO_DIR}/CrayExtractImplicit_${lang}.bin") execute_process( - COMMAND ${CMAKE_${lang}_COMPILER} - ${CMAKE_${lang}_VERBOSE_FLAG} -o cray_extract_implicit_${lang} ${src} + COMMAND ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_VERBOSE_FLAG} -o ${BIN} RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error ) + if(EXISTS "${BIN}") + file(REMOVE "${BIN}") + endif() set(include_dirs) set(link_dirs) set(link_libs) ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/CrayPrgEnv.cmake | 7 +++++-- Source/CMakeVersion.cmake | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Dec 31 00:01:12 2015 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 31 Dec 2015 00:01:12 -0500 (EST) Subject: [Cmake-commits] CMake branch, master, updated. v3.4.1-756-g4aff165 Message-ID: <20151231050112.30825E1FF0@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 4aff1650d698fe31dd5d1f1cfdd359737d16c727 (commit) from f04a09d1bd7107b73d2063c1ac4de3080b21cea4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4aff1650d698fe31dd5d1f1cfdd359737d16c727 commit 4aff1650d698fe31dd5d1f1cfdd359737d16c727 Author: Kitware Robot AuthorDate: Thu Dec 31 00:01:09 2015 -0500 Commit: Kitware Robot CommitDate: Thu Dec 31 00:01:09 2015 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 4c8f3d7..d93b5bb 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 4) -set(CMake_VERSION_PATCH 20151230) +set(CMake_VERSION_PATCH 20151231) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From johnstonj.public at codenest.com Thu Dec 31 12:52:44 2015 From: johnstonj.public at codenest.com (James Johnston) Date: Thu, 31 Dec 2015 12:52:44 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1829-gacd8471 Message-ID: <20151231175244.92621E168B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via acd84715b0e4cfabbb2dadb8e7941efb3fd8f96b (commit) via d5eb7d8565d01af80e4ab0b08014e52286d43f95 (commit) via 4aff1650d698fe31dd5d1f1cfdd359737d16c727 (commit) via f04a09d1bd7107b73d2063c1ac4de3080b21cea4 (commit) from 3f0725765641ba3dff41f135c5a23b089ac40e1b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=acd84715b0e4cfabbb2dadb8e7941efb3fd8f96b commit acd84715b0e4cfabbb2dadb8e7941efb3fd8f96b Merge: 3f07257 d5eb7d8 Author: James Johnston AuthorDate: Thu Dec 31 12:52:43 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 31 12:52:43 2015 -0500 Merge topic 'fix-GenerateExportHeader-on-borland' into next d5eb7d85 GenerateExportHeader: Work around buggy std::getline behavior in BCB5. 4aff1650 CMake Nightly Date Stamp f04a09d1 CMake Nightly Date Stamp https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5eb7d8565d01af80e4ab0b08014e52286d43f95 commit d5eb7d8565d01af80e4ab0b08014e52286d43f95 Author: James Johnston AuthorDate: Thu Dec 31 17:45:34 2015 +0000 Commit: James Johnston CommitDate: Thu Dec 31 17:45:34 2015 +0000 GenerateExportHeader: Work around buggy std::getline behavior in BCB5. diff --git a/Tests/Module/GenerateExportHeader/exportheader_test.cpp b/Tests/Module/GenerateExportHeader/exportheader_test.cpp index 146374a..4f45f37 100644 --- a/Tests/Module/GenerateExportHeader/exportheader_test.cpp +++ b/Tests/Module/GenerateExportHeader/exportheader_test.cpp @@ -39,6 +39,18 @@ void compare(const char* refName, const char* testName) std::string testLine; std::getline(ref, refLine); std::getline(test, testLine); + // Some very old Borland runtimes (C++ Builder 5 WITHOUT Update 1) add a + // trailing null to the string that we need to strip before testing for a + // trailing space. + if (refLine.size() && refLine[refLine.size()-1] == 0) + { + refLine = refLine.substr(0, refLine.size() - 1); + } + if (testLine.size() && testLine[testLine.size()-1] == 0) + { + testLine = testLine.substr(0, testLine.size() - 1); + } + // The reference files never have trailing spaces: if (testLine.size() && testLine[testLine.size()-1] == ' ') { testLine = testLine.substr(0, testLine.size() - 1); ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Tests/Module/GenerateExportHeader/exportheader_test.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From brad.king at kitware.com Thu Dec 31 19:17:17 2015 From: brad.king at kitware.com (Brad King) Date: Thu, 31 Dec 2015 19:17:17 -0500 (EST) Subject: [Cmake-commits] CMake branch, next, updated. v3.4.1-1831-g11fa53d Message-ID: <20160101001717.95AE0E17A3@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, next has been updated via 11fa53d45aae116826340668efa4a035db17fb4e (commit) via 9647b32f85d368e9e7adc78372ab5639f4ae64bd (commit) from acd84715b0e4cfabbb2dadb8e7941efb3fd8f96b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=11fa53d45aae116826340668efa4a035db17fb4e commit 11fa53d45aae116826340668efa4a035db17fb4e Merge: acd8471 9647b32 Author: Brad King AuthorDate: Thu Dec 31 19:17:15 2015 -0500 Commit: CMake Topic Stage CommitDate: Thu Dec 31 19:17:15 2015 -0500 Merge topic 'copyright-year' into next 9647b32f Copyright.txt: Update year range to end in 2016 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9647b32f85d368e9e7adc78372ab5639f4ae64bd commit 9647b32f85d368e9e7adc78372ab5639f4ae64bd Author: Brad King AuthorDate: Thu Dec 31 19:15:34 2015 -0500 Commit: Brad King CommitDate: Thu Dec 31 19:15:34 2015 -0500 Copyright.txt: Update year range to end in 2016 diff --git a/Copyright.txt b/Copyright.txt index 6c9fb09..f99998f 100644 --- a/Copyright.txt +++ b/Copyright.txt @@ -1,5 +1,5 @@ CMake - Cross Platform Makefile Generator -Copyright 2000-2015 Kitware, Inc. +Copyright 2000-2016 Kitware, Inc. Copyright 2000-2011 Insight Software Consortium All rights reserved. ----------------------------------------------------------------------- Summary of changes: Copyright.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake