diff options
110 files changed, 664 insertions, 461 deletions
diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el index 08ac490..d74dba0 100644 --- a/Auxiliary/cmake-mode.el +++ b/Auxiliary/cmake-mode.el @@ -304,7 +304,8 @@ and store the result as a list in LISTVAR." (save-window-excursion (cmake-command-run (concat "--help-" listname "-list") nil temp-buffer-name) (with-current-buffer temp-buffer-name - (set listvar (cdr (split-string (buffer-substring-no-properties (point-min) (point-max)) "\n" t)))))) + ; FIXME: Ignore first line if it is "cmake version ..." from CMake < 3.0. + (set listvar (split-string (buffer-substring-no-properties (point-min) (point-max)) "\n" t))))) (symbol-value listvar) )) ) diff --git a/Help/generator/Ninja.rst b/Help/generator/Ninja.rst index 920abcb..d94e5f6 100644 --- a/Help/generator/Ninja.rst +++ b/Help/generator/Ninja.rst @@ -6,3 +6,7 @@ Generates build.ninja files. A build.ninja file is generated into the build tree. Recent versions of the ninja program can build the project through the "all" target. An "install" target is also provided. + +For each subdirectory ``sub/dir`` of the project an additional target +named ``sub/dir/all`` is generated that depends on all targets required +by that subdirectory. diff --git a/Help/generator/Visual Studio 7.rst b/Help/generator/Visual Studio 7.rst index eb426f4..54d29df 100644 --- a/Help/generator/Visual Studio 7.rst +++ b/Help/generator/Visual Studio 7.rst @@ -1,10 +1,6 @@ Visual Studio 7 --------------- -Deprected. Generates Visual Studio .NET 2002 project files. - -.. note:: - This generator is deprecated and will be removed - in a future version of CMake. It will still be - possible to build with VS 7.0 tools using the - :generator:`NMake Makefiles` generator. +Removed. This once generated Visual Studio .NET 2002 project files, but +the generator has been removed since CMake 3.6. It is still possible to +build with VS 7.0 tools using the :generator:`NMake Makefiles` generator. diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 9051ca0..578f85a 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -141,6 +141,7 @@ Properties on Targets /prop_tgt/CXX_STANDARD_REQUIRED /prop_tgt/DEBUG_POSTFIX /prop_tgt/DEFINE_SYMBOL + /prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY /prop_tgt/EchoString /prop_tgt/ENABLE_EXPORTS /prop_tgt/EXCLUDE_FROM_ALL diff --git a/Help/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY.rst b/Help/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY.rst new file mode 100644 index 0000000..1ff5bf0 --- /dev/null +++ b/Help/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY.rst @@ -0,0 +1,18 @@ +DEPLOYMENT_REMOTE_DIRECTORY +--------------------------- + +Set the WinCE project ``RemoteDirectory`` in ``DeploymentTool`` and +``RemoteExecutable`` in ``DebuggerTool`` in ``.vcproj`` files generated +by the :generator:`Visual Studio 9 2008` and :generator:`Visual Studio 8 2005` +generators. This is useful when you want to debug on remote WinCE device. +For example: + +.. code-block:: cmake + + set_property(TARGET ${TARGET} PROPERTY + DEPLOYMENT_REMOTE_DIRECTORY "\\FlashStorage") + +produces:: + + <DeploymentTool RemoteDirectory="\FlashStorage" ... /> + <DebuggerTool RemoteExecutable="\FlashStorage\target_file" ... /> diff --git a/Help/release/dev/FindGTest-depends.rst b/Help/release/dev/FindGTest-depends.rst new file mode 100644 index 0000000..33c1489 --- /dev/null +++ b/Help/release/dev/FindGTest-depends.rst @@ -0,0 +1,6 @@ +FindGTest-depends +----------------- + +* The :module:`FindGTest` module ``gtest_add_tests`` function now causes + CMake to automatically re-run when test sources change so that they + can be re-scanned. diff --git a/Help/release/dev/FindProtobuf-variable-case.rst b/Help/release/dev/FindProtobuf-variable-case.rst new file mode 100644 index 0000000..0df00e7 --- /dev/null +++ b/Help/release/dev/FindProtobuf-variable-case.rst @@ -0,0 +1,7 @@ +FindProtobuf-variable-case +-------------------------- + +* The :module:`FindProtobuf` module input and output variables were all renamed + from ``PROTOBUF_`` to ``Protobuf_`` for consistency with other find modules. + Input variables of the old case will be honored if provided, and output + variables of the old case are always provided. diff --git a/Help/release/dev/FindProtobuf-version.rst b/Help/release/dev/FindProtobuf-version.rst index 2bfd9f4..40c2ff5 100644 --- a/Help/release/dev/FindProtobuf-version.rst +++ b/Help/release/dev/FindProtobuf-version.rst @@ -1,6 +1,6 @@ FindProtobuf-version -------------------- -* The :module:`FindProtobuf` module learned to provide a ``PROTOBUF_VERSION`` +* The :module:`FindProtobuf` module learned to provide a ``Protobuf_VERSION`` variable and check the version number requested in a :command:`find_package` call. diff --git a/Help/release/dev/add-bruce-c.rst b/Help/release/dev/add-bruce-c.rst new file mode 100644 index 0000000..9e47900 --- /dev/null +++ b/Help/release/dev/add-bruce-c.rst @@ -0,0 +1,4 @@ +add-bruce-c +----------- + +* Support was added for the Bruce C Compiler with compiler id ``Bruce``. diff --git a/Help/release/dev/cygwin-clang.rst b/Help/release/dev/cygwin-clang.rst new file mode 100644 index 0000000..7d06d2a --- /dev/null +++ b/Help/release/dev/cygwin-clang.rst @@ -0,0 +1,4 @@ +cygwin-clang +------------ + +* The Clang compiler is now supported on CYGWIN. diff --git a/Help/release/dev/find-blas-lapack-OpenBLAS.rst b/Help/release/dev/find-blas-lapack-OpenBLAS.rst new file mode 100644 index 0000000..893422a --- /dev/null +++ b/Help/release/dev/find-blas-lapack-OpenBLAS.rst @@ -0,0 +1,5 @@ +find-blas-lapack-OpenBLAS +------------------------- + +* The :module:`FindBLAS` and :module:`FindLAPACK` modules learned to + support `OpenBLAS <http://www.openblas.net>`__. diff --git a/Help/release/dev/ninja-depfile-system-headers.rst b/Help/release/dev/ninja-depfile-system-headers.rst new file mode 100644 index 0000000..7033cef --- /dev/null +++ b/Help/release/dev/ninja-depfile-system-headers.rst @@ -0,0 +1,5 @@ +ninja-depfile-system-headers +---------------------------- + +* The :generator:`Ninja` generator now includes system header files in build + dependencies to ensure correct re-builds when system packages are updated. diff --git a/Help/release/dev/ninja-directory-targets.rst b/Help/release/dev/ninja-directory-targets.rst new file mode 100644 index 0000000..4826228 --- /dev/null +++ b/Help/release/dev/ninja-directory-targets.rst @@ -0,0 +1,7 @@ +ninja-directory-targets +----------------------- + +* The :generator:`Ninja` generator learned to produce phony targets + of the form ``sub/dir/all`` to drive the build of a subdirectory. + This is equivalent to ``cd sub/dir; make all`` with + :ref:`Makefile Generators`. diff --git a/Help/release/dev/remove-vs7.0-generator.rst b/Help/release/dev/remove-vs7.0-generator.rst new file mode 100644 index 0000000..314bef9 --- /dev/null +++ b/Help/release/dev/remove-vs7.0-generator.rst @@ -0,0 +1,5 @@ +remove-vs7.0-generator +---------------------- + +* The :generator:`Visual Studio 7` generator (for VS .NET 2002) has been + removed. diff --git a/Help/release/dev/vs-remote-directory.rst b/Help/release/dev/vs-remote-directory.rst new file mode 100644 index 0000000..194236d --- /dev/null +++ b/Help/release/dev/vs-remote-directory.rst @@ -0,0 +1,7 @@ +vs-remote-directory +------------------- + +* The :generator:`Visual Studio 9 2008` and :generator:`Visual Studio 8 2005` + generators learned to generate the remote directory for WinCE project + deployment and debugger settings. See the + :prop_tgt:`DEPLOYMENT_REMOTE_DIRECTORY` target property. diff --git a/Help/variable/CMAKE_LANG_COMPILER_ID.rst b/Help/variable/CMAKE_LANG_COMPILER_ID.rst index 81976a9..ebd616e 100644 --- a/Help/variable/CMAKE_LANG_COMPILER_ID.rst +++ b/Help/variable/CMAKE_LANG_COMPILER_ID.rst @@ -12,6 +12,7 @@ include: ADSP = Analog VisualDSP++ (analog.com) AppleClang = Apple Clang (apple.com) ARMCC = ARM Compiler (arm.com) + Bruce = Bruce C Compiler CCur = Concurrent Fortran (ccur.com) Clang = LLVM Clang (clang.llvm.org) Cray = Cray Compiler (cray.com) diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index 5bfe0fd..c107dfd 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -5,6 +5,11 @@ #if defined(__18CXX) # define ID_VOID_MAIN #endif +#if defined(__CLASSIC_C__) +/* cv-qualifiers did not exist in K&R C */ +# define const +# define volatile +#endif @CMAKE_C_COMPILER_ID_CONTENT@ @@ -28,23 +33,28 @@ char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; @CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@ @CMAKE_C_COMPILER_ID_ERROR_FOR_TEST@ -const char* info_language_dialect_default = "INFO" ":" "dialect_default[" -#if !defined(__STDC_VERSION__) - "90" +#if !defined(__STDC__) +# define C_DIALECT #elif __STDC_VERSION__ >= 201000L - "11" +# define C_DIALECT "11" #elif __STDC_VERSION__ >= 199901L - "99" +# define C_DIALECT "99" #else +# define C_DIALECT "90" #endif -"]"; +const char* info_language_dialect_default = + "INFO" ":" "dialect_default[" C_DIALECT "]"; /*--------------------------------------------------------------------------*/ #ifdef ID_VOID_MAIN void main() {} #else +# if defined(__CLASSIC_C__) +int main(argc, argv) int argc; char *argv[]; +# else int main(int argc, char* argv[]) +# endif { int require = 0; require += info_compiler[argc]; diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake index cbc0055..1d341e5 100644 --- a/Modules/CMakeCompilerIdDetection.cmake +++ b/Modules/CMakeCompilerIdDetection.cmake @@ -79,6 +79,7 @@ function(compiler_id_detection outvar lang) if (lang STREQUAL C) list(APPEND ordered_compilers TinyCC + Bruce ) endif() list(APPEND ordered_compilers diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index e0b5468..f8c6303 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -87,6 +87,9 @@ else() # Try enabling ANSI mode on HP. "-Aa" + + # Try compiling K&R-compatible code (needed by Bruce C Compiler). + "-D__CLASSIC_C__" ) endif() diff --git a/Modules/CMakeIOSInstallCombined.cmake b/Modules/CMakeIOSInstallCombined.cmake index f052a3b..1256f56 100644 --- a/Modules/CMakeIOSInstallCombined.cmake +++ b/Modules/CMakeIOSInstallCombined.cmake @@ -52,7 +52,14 @@ function(_ios_install_combined_get_build_setting sdk variable resultvar) endif() if(NOT output MATCHES " ${variable} = ([^\n]*)") - message(FATAL_ERROR "${variable} not found.") + if("${variable}" STREQUAL "VALID_ARCHS") + # VALID_ARCHS may be unset by user for given SDK + # (e.g. for build without simulator). + set("${resultvar}" "" PARENT_SCOPE) + return() + else() + message(FATAL_ERROR "${variable} not found.") + endif() endif() set("${resultvar}" "${CMAKE_MATCH_1}" PARENT_SCOPE) @@ -72,6 +79,9 @@ function(_ios_install_combined_get_valid_archs sdk resultvar) list(REMOVE_ITEM valid_archs "") # remove empty elements list(REMOVE_DUPLICATES valid_archs) + string(REPLACE ";" " " printable "${valid_archs}") + _ios_install_combined_message("Architectures (${sdk}): ${printable}") + set("${resultvar}" "${valid_archs}" PARENT_SCOPE) endfunction() diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in index da99b9e..47eb00a 100644 --- a/Modules/CMakePlatformId.h.in +++ b/Modules/CMakePlatformId.h.in @@ -91,11 +91,11 @@ # define PLATFORM_ID "Windows3x" # else /* unknown platform */ -# define PLATFORM_ID "" +# define PLATFORM_ID # endif #else /* unknown platform */ -# define PLATFORM_ID "" +# define PLATFORM_ID #endif @@ -145,7 +145,7 @@ # endif #else -# define ARCHITECTURE_ID "" +# define ARCHITECTURE_ID #endif /* Convert integer to decimal digit literals. */ diff --git a/Modules/CPack.OSXX11.Info.plist.in b/Modules/CPack.OSXX11.Info.plist.in index 851b67b..23a1483 100644 --- a/Modules/CPack.OSXX11.Info.plist.in +++ b/Modules/CPack.OSXX11.Info.plist.in @@ -41,8 +41,6 @@ <string>@CPACK_APPLE_GUI_BUNDLE_VERSION@</string> <key>CSResourcesFileMapped</key> <true/> - <key>LSRequiresCarbon</key> - <true/> <key>NSHumanReadableCopyright</key> <string>@CPACK_APPLE_GUI_COPYRIGHT@</string> </dict> diff --git a/Modules/Compiler/Bruce-C-DetermineCompiler.cmake b/Modules/Compiler/Bruce-C-DetermineCompiler.cmake new file mode 100644 index 0000000..bb9f4b9 --- /dev/null +++ b/Modules/Compiler/Bruce-C-DetermineCompiler.cmake @@ -0,0 +1 @@ +set(_compiler_id_pp_test "defined(__BCC__)") diff --git a/Modules/Compiler/Bruce-C.cmake b/Modules/Compiler/Bruce-C.cmake new file mode 100644 index 0000000..23676ec --- /dev/null +++ b/Modules/Compiler/Bruce-C.cmake @@ -0,0 +1,7 @@ +# Bruce C Compiler ignores "-g" flag and optimization cannot be +# enabled here (it is implemented only for 8086 target). +set (CMAKE_C_FLAGS_INIT "-D__CLASSIC_C__") +set (CMAKE_C_FLAGS_DEBUG_INIT "-g") +set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG") +set (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG") +set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG") diff --git a/Modules/Compiler/GHS-C.cmake b/Modules/Compiler/GHS-C.cmake index e97d62c..a58d9b0 100644 --- a/Modules/Compiler/GHS-C.cmake +++ b/Modules/Compiler/GHS-C.cmake @@ -12,6 +12,8 @@ set(CMAKE_C_GHS_KERNEL_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT}") set(CMAKE_C_GHS_KERNEL_FLAGS_RELWITHDEBINFO_INIT "-ldebug ${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}") +set(CMAKE_EXECUTABLE_SUFFIX ".as") + if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) set (CMAKE_C_GHS_KERNEL_FLAGS_DEBUG "${CMAKE_C_GHS_KERNEL_FLAGS_DEBUG_INIT}" CACHE STRING "Kernel flags used by the compiler during debug builds.") diff --git a/Modules/Compiler/GHS-CXX.cmake b/Modules/Compiler/GHS-CXX.cmake index 71a0dec..9e202d3 100644 --- a/Modules/Compiler/GHS-CXX.cmake +++ b/Modules/Compiler/GHS-CXX.cmake @@ -15,6 +15,8 @@ set(CMAKE_CXX_GHS_KERNEL_FLAGS_RELEASE_INIT set(CMAKE_CXX_GHS_KERNEL_FLAGS_RELWITHDEBINFO_INIT "-ldebug ${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}") +set(CMAKE_EXECUTABLE_SUFFIX ".as") + if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) set (CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG "${CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG_INIT}" diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index d1ca85e..c2d393d 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -41,7 +41,7 @@ macro(__compiler_gnu lang) # distcc does not transform -o to -MT when invoking the preprocessor # internally, as it ought to. Work around this bug by setting -MT here # even though it isn't strictly necessary. - set(CMAKE_DEPFILE_FLAGS_${lang} "-MMD -MT <OBJECT> -MF <DEPFILE>") + set(CMAKE_DEPFILE_FLAGS_${lang} "-MD -MT <OBJECT> -MF <DEPFILE>") endif() # Initial configuration flags. diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake index dfba4b2..77363eb 100644 --- a/Modules/Compiler/Intel-C.cmake +++ b/Modules/Compiler/Intel-C.cmake @@ -6,7 +6,7 @@ set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") set(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") -set(CMAKE_DEPFILE_FLAGS_C "-MMD -MT <OBJECT> -MF <DEPFILE>") +set(CMAKE_DEPFILE_FLAGS_C "-MD -MT <OBJECT> -MF <DEPFILE>") set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index 7947695..02c636c 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -6,7 +6,7 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") -set(CMAKE_DEPFILE_FLAGS_CXX "-MMD -MT <OBJECT> -MF <DEPFILE>") +set(CMAKE_DEPFILE_FLAGS_CXX "-MD -MT <OBJECT> -MF <DEPFILE>") set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") diff --git a/Modules/Compiler/QCC.cmake b/Modules/Compiler/QCC.cmake index 76477e4..f69c7bd 100644 --- a/Modules/Compiler/QCC.cmake +++ b/Modules/Compiler/QCC.cmake @@ -20,5 +20,5 @@ macro(__compiler_qcc lang) set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "-V") set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-Wp,-isystem,") - set(CMAKE_DEPFILE_FLAGS_${lang} "-Wc,-MMD,<DEPFILE>,-MT,<OBJECT>,-MF,<DEPFILE>") + set(CMAKE_DEPFILE_FLAGS_${lang} "-Wc,-MD,<DEPFILE>,-MT,<OBJECT>,-MF,<DEPFILE>") endmacro() diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 416b666..546ada1 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -30,9 +30,9 @@ # BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK # # ######### ## List of vendors (BLA_VENDOR) valid in this module # -# Goto,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 -# (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread -# model, lp64 model), # Intel10_64lp_seq (intel mkl v10 64 +# Goto,OpenBLAS,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL, +# Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit, +# lp thread model, lp64 model), # Intel10_64lp_seq (intel mkl v10 64 # bit,sequential code, lp64 model), # Intel( older versions of mkl 32 # and 64 bit), ACML,ACML_MP,ACML_GPU,Apple, NAS, Generic C/CXX should be # enabled to use Intel mkl @@ -172,6 +172,20 @@ if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") endif() endif () +if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") + if(NOT BLAS_LIBRARIES) + # OpenBLAS (http://www.openblas.net) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "openblas" + "" + ) + endif() +endif () + if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All") if(NOT BLAS_LIBRARIES) # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index c3058ea..728dcdf 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -745,9 +745,10 @@ endfunction() # defined; FALSE if dependency information is unavailable). # # componentvar - the component list variable name +# extravar - the indirect dependency list variable name # # -function(_Boost_MISSING_DEPENDENCIES componentvar) +function(_Boost_MISSING_DEPENDENCIES componentvar extravar) # _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 @@ -773,7 +774,12 @@ function(_Boost_MISSING_DEPENDENCIES componentvar) set(_boost_unprocessed_components ${_boost_new_components}) unset(_boost_new_components) endwhile() + set(_boost_extra_components ${_boost_processed_components}) + if(_boost_extra_components AND ${componentvar}) + list(REMOVE_ITEM _boost_extra_components ${${componentvar}}) + endif() set(${componentvar} ${_boost_processed_components} PARENT_SCOPE) + set(${extravar} ${_boost_extra_components} PARENT_SCOPE) endfunction() # @@ -1306,7 +1312,7 @@ endif() # Additional components may be required via component dependencies. # Add any missing components to the list. -_Boost_MISSING_DEPENDENCIES(Boost_FIND_COMPONENTS) +_Boost_MISSING_DEPENDENCIES(Boost_FIND_COMPONENTS _Boost_EXTRA_FIND_COMPONENTS) # If thread is required, get the thread libs as a dependency list(FIND Boost_FIND_COMPONENTS thread _Boost_THREAD_DEPENDENCY_LIBS) @@ -1484,6 +1490,10 @@ if(Boost_FOUND) list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT}) endif() endforeach() + if(_Boost_MISSING_COMPONENTS AND _Boost_EXTRA_FIND_COMPONENTS) + # Optional indirect dependencies are not counted as missing. + list(REMOVE_ITEM _Boost_MISSING_COMPONENTS ${_Boost_EXTRA_FIND_COMPONENTS}) + endif() if(Boost_DEBUG) message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}") diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake index ca49e4a..a7ffcfe 100644 --- a/Modules/FindGTest.cmake +++ b/Modules/FindGTest.cmake @@ -82,8 +82,7 @@ # ``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. +# an executable for each test and test fixture. # # Example usage:: # @@ -119,6 +118,7 @@ function(GTEST_ADD_TESTS executable extra_args) set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+) *, *([A-Za-z_0-9]+) *\\).*") set(gtest_test_type_regex "(TYPED_TEST|TEST_?[FP]?)") foreach(source ${ARGN}) + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${source}) file(READ "${source}" contents) string(REGEX MATCHALL "${gtest_test_type_regex} *\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents}) foreach(hit ${found_tests}) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index b11edc3..2708de0 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -31,7 +31,7 @@ # BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK # # ## List of vendors (BLA_VENDOR) valid in this module # Intel(mkl), -# ACML,Apple, NAS, Generic +# OpenBLAS, ACML,Apple, NAS, Generic #============================================================================= # Copyright 2007-2009 Kitware, Inc. @@ -181,6 +181,19 @@ if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") endif() endif () +if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "openblas" + "${BLAS_LIBRARIES}" + "" + ) + endif() +endif () #acml lapack if (BLA_VENDOR MATCHES "ACML" OR BLA_VENDOR STREQUAL "All") diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index 4f50e38..447c526 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -383,7 +383,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma pkg_get_variable("${_pkg_check_prefix}_INCLUDEDIR" ${_pkg_check_modules_pkg} "includedir") pkg_get_variable("${_pkg_check_prefix}_LIBDIR" ${_pkg_check_modules_pkg} "libdir") foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR) - _pkgconfig_set("${_pkg_check_modules_pkg}_${variable}" "${${_pkg_check_modules_pkg}_${variable}}") + _pkgconfig_set("${_pkg_check_prefix}_${variable}" "${${_pkg_check_prefix}_${variable}}") endforeach () if (NOT ${_is_silent}) diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index 95e3b1e..8042073 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -6,51 +6,51 @@ # # The following variables can be set and are optional: # -# ``PROTOBUF_SRC_ROOT_FOLDER`` +# ``Protobuf_SRC_ROOT_FOLDER`` # When compiling with MSVC, if this cache variable is set # the protobuf-default VS project build locations # (vsprojects/Debug and vsprojects/Release # or vsprojects/x64/Debug and vsprojects/x64/Release) # will be searched for libraries and binaries. -# ``PROTOBUF_IMPORT_DIRS`` +# ``Protobuf_IMPORT_DIRS`` # List of additional directories to be searched for # imported .proto files. -# ``PROTOBUF_DEBUG`` +# ``Protobuf_DEBUG`` # Show debug messages. # # Defines the following variables: # -# ``PROTOBUF_FOUND`` +# ``Protobuf_FOUND`` # Found the Google Protocol Buffers library # (libprotobuf & header files) -# ``PROTOBUF_VERSION`` +# ``Protobuf_VERSION`` # Version of package found. -# ``PROTOBUF_INCLUDE_DIRS`` +# ``Protobuf_INCLUDE_DIRS`` # Include directories for Google Protocol Buffers -# ``PROTOBUF_LIBRARIES`` +# ``Protobuf_LIBRARIES`` # The protobuf libraries -# ``PROTOBUF_PROTOC_LIBRARIES`` +# ``Protobuf_PROTOC_LIBRARIES`` # The protoc libraries -# ``PROTOBUF_LITE_LIBRARIES`` +# ``Protobuf_LITE_LIBRARIES`` # The protobuf-lite libraries # # The following cache variables are also available to set or use: # -# ``PROTOBUF_LIBRARY`` +# ``Protobuf_LIBRARY`` # The protobuf library -# ``PROTOBUF_PROTOC_LIBRARY`` +# ``Protobuf_PROTOC_LIBRARY`` # The protoc library -# ``PROTOBUF_INCLUDE_DIR`` +# ``Protobuf_INCLUDE_DIR`` # The include directory for protocol buffers -# ``PROTOBUF_PROTOC_EXECUTABLE`` +# ``Protobuf_PROTOC_EXECUTABLE`` # The protoc compiler -# ``PROTOBUF_LIBRARY_DEBUG`` +# ``Protobuf_LIBRARY_DEBUG`` # The protobuf library (debug) -# ``PROTOBUF_PROTOC_LIBRARY_DEBUG`` +# ``Protobuf_PROTOC_LIBRARY_DEBUG`` # The protoc library (debug) -# ``PROTOBUF_LITE_LIBRARY`` +# ``Protobuf_LITE_LIBRARY`` # The protobuf lite library -# ``PROTOBUF_LITE_LIBRARY_DEBUG`` +# ``Protobuf_LITE_LIBRARY_DEBUG`` # The protobuf lite library (debug) # # Example: @@ -58,12 +58,12 @@ # .. code-block:: cmake # # find_package(Protobuf REQUIRED) -# include_directories(${PROTOBUF_INCLUDE_DIRS}) +# include_directories(${Protobuf_INCLUDE_DIRS}) # include_directories(${CMAKE_CURRENT_BINARY_DIR}) # protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS foo.proto) # protobuf_generate_python(PROTO_PY foo.proto) # add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS}) -# target_link_libraries(bar ${PROTOBUF_LIBRARIES}) +# target_link_libraries(bar ${Protobuf_LIBRARIES}) # # .. note:: # The ``protobuf_generate_cpp`` and ``protobuf_generate_python`` @@ -129,8 +129,8 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS) set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR}) endif() - if(DEFINED PROTOBUF_IMPORT_DIRS) - foreach(DIR ${PROTOBUF_IMPORT_DIRS}) + if(DEFINED Protobuf_IMPORT_DIRS) + foreach(DIR ${Protobuf_IMPORT_DIRS}) get_filename_component(ABS_PATH ${DIR} ABSOLUTE) list(FIND _protobuf_include_path ${ABS_PATH} _contains_already) if(${_contains_already} EQUAL -1) @@ -151,9 +151,9 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS) add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc" "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h" - COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} + COMMAND ${Protobuf_PROTOC_EXECUTABLE} ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL} - DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_EXECUTABLE} + DEPENDS ${ABS_FIL} ${Protobuf_PROTOC_EXECUTABLE} COMMENT "Running C++ protocol buffer compiler on ${FIL}" VERBATIM ) endforeach() @@ -183,8 +183,8 @@ function(PROTOBUF_GENERATE_PYTHON SRCS) set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR}) endif() - if(DEFINED PROTOBUF_IMPORT_DIRS) - foreach(DIR ${PROTOBUF_IMPORT_DIRS}) + if(DEFINED Protobuf_IMPORT_DIRS) + foreach(DIR ${Protobuf_IMPORT_DIRS}) get_filename_component(ABS_PATH ${DIR} ABSOLUTE) list(FIND _protobuf_include_path ${ABS_PATH} _contains_already) if(${_contains_already} EQUAL -1) @@ -201,8 +201,8 @@ function(PROTOBUF_GENERATE_PYTHON SRCS) list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}_pb2.py") add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}_pb2.py" - COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} --python_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL} - DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_EXECUTABLE} + COMMAND ${Protobuf_PROTOC_EXECUTABLE} --python_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL} + DEPENDS ${ABS_FIL} ${Protobuf_PROTOC_EXECUTABLE} COMMENT "Running Python protocol buffer compiler on ${FIL}" VERBATIM ) endforeach() @@ -210,6 +210,29 @@ function(PROTOBUF_GENERATE_PYTHON SRCS) set(${SRCS} ${${SRCS}} PARENT_SCOPE) endfunction() +# Backwards compatibility +# Define camel case versions of input variables +foreach(UPPER + PROTOBUF_SRC_ROOT_FOLDER + PROTOBUF_IMPORT_DIRS + PROTOBUF_DEBUG + PROTOBUF_LIBRARY + PROTOBUF_PROTOC_LIBRARY + PROTOBUF_INCLUDE_DIR + PROTOBUF_PROTOC_EXECUTABLE + PROTOBUF_LIBRARY_DEBUG + PROTOBUF_PROTOC_LIBRARY_DEBUG + PROTOBUF_LITE_LIBRARY + PROTOBUF_LITE_LIBRARY_DEBUG + ) + if (DEFINED ${UPPER}) + string(REPLACE "PROTOBUF_" "Protobuf_" Camel ${UPPER}) + if (NOT DEFINED ${Camel}) + set(${Camel} ${${UPPER}}) + endif() + endif() +endforeach() + if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(_PROTOBUF_ARCH_DIR x64/) endif() @@ -229,12 +252,12 @@ function(_protobuf_find_libraries name filename) else() find_library(${name}_LIBRARY_RELEASE NAMES ${filename} - PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Release) + PATHS ${Protobuf_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Release) mark_as_advanced(${name}_LIBRARY_RELEASE) find_library(${name}_LIBRARY_DEBUG NAMES ${filename} - PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Debug) + PATHS ${Protobuf_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Debug) mark_as_advanced(${name}_LIBRARY_DEBUG) select_library_configurations(${name}) @@ -248,8 +271,8 @@ function(_protobuf_find_threads) set(CMAKE_THREAD_PREFER_PTHREAD TRUE) find_package(Threads) if(Threads_FOUND) - list(APPEND PROTOBUF_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) - set(PROTOBUF_LIBRARIES "${PROTOBUF_LIBRARIES}" PARENT_SCOPE) + list(APPEND Protobuf_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) + set(Protobuf_LIBRARIES "${Protobuf_LIBRARIES}" PARENT_SCOPE) endif() endfunction() @@ -267,24 +290,24 @@ endif() # Google's provided vcproj files generate libraries with a "lib" # prefix on Windows if(MSVC) - set(PROTOBUF_ORIG_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}") + set(Protobuf_ORIG_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}") set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "") - find_path(PROTOBUF_SRC_ROOT_FOLDER protobuf.pc.in) + find_path(Protobuf_SRC_ROOT_FOLDER protobuf.pc.in) endif() # The Protobuf library -_protobuf_find_libraries(PROTOBUF protobuf) +_protobuf_find_libraries(Protobuf protobuf) #DOC "The Google Protocol Buffers RELEASE Library" -_protobuf_find_libraries(PROTOBUF_LITE protobuf-lite) +_protobuf_find_libraries(Protobuf_LITE protobuf-lite) # The Protobuf Protoc Library -_protobuf_find_libraries(PROTOBUF_PROTOC protoc) +_protobuf_find_libraries(Protobuf_PROTOC protoc) # Restore original find library prefixes if(MSVC) - set(CMAKE_FIND_LIBRARY_PREFIXES "${PROTOBUF_ORIG_FIND_LIBRARY_PREFIXES}") + set(CMAKE_FIND_LIBRARY_PREFIXES "${Protobuf_ORIG_FIND_LIBRARY_PREFIXES}") endif() if(UNIX) @@ -292,78 +315,101 @@ if(UNIX) endif() # Find the include directory -find_path(PROTOBUF_INCLUDE_DIR +find_path(Protobuf_INCLUDE_DIR google/protobuf/service.h - PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/src + PATHS ${Protobuf_SRC_ROOT_FOLDER}/src ) -mark_as_advanced(PROTOBUF_INCLUDE_DIR) +mark_as_advanced(Protobuf_INCLUDE_DIR) # Find the protoc Executable -find_program(PROTOBUF_PROTOC_EXECUTABLE +find_program(Protobuf_PROTOC_EXECUTABLE NAMES protoc DOC "The Google Protocol Buffers Compiler" PATHS - ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Release - ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Debug + ${Protobuf_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Release + ${Protobuf_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Debug ) -mark_as_advanced(PROTOBUF_PROTOC_EXECUTABLE) +mark_as_advanced(Protobuf_PROTOC_EXECUTABLE) -if(PROTOBUF_DEBUG) +if(Protobuf_DEBUG) message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " "requested version of Google Protobuf is ${Protobuf_FIND_VERSION}") endif() -if(PROTOBUF_INCLUDE_DIR) - set(_PROTOBUF_COMMON_HEADER ${PROTOBUF_INCLUDE_DIR}/google/protobuf/stubs/common.h) +if(Protobuf_INCLUDE_DIR) + set(_PROTOBUF_COMMON_HEADER ${Protobuf_INCLUDE_DIR}/google/protobuf/stubs/common.h) - if(PROTOBUF_DEBUG) + if(Protobuf_DEBUG) message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " "location of common.h: ${_PROTOBUF_COMMON_HEADER}") endif() - set(PROTOBUF_VERSION "") - set(PROTOBUF_LIB_VERSION "") + set(Protobuf_VERSION "") + set(Protobuf_LIB_VERSION "") file(STRINGS ${_PROTOBUF_COMMON_HEADER} _PROTOBUF_COMMON_H_CONTENTS REGEX "#define[ \t]+GOOGLE_PROTOBUF_VERSION[ \t]+") if(_PROTOBUF_COMMON_H_CONTENTS MATCHES "#define[ \t]+GOOGLE_PROTOBUF_VERSION[ \t]+([0-9]+)") - set(PROTOBUF_LIB_VERSION "${CMAKE_MATCH_1}") + set(Protobuf_LIB_VERSION "${CMAKE_MATCH_1}") endif() unset(_PROTOBUF_COMMON_H_CONTENTS) - math(EXPR _PROTOBUF_MAJOR_VERSION "${PROTOBUF_LIB_VERSION} / 1000000") - math(EXPR _PROTOBUF_MINOR_VERSION "${PROTOBUF_LIB_VERSION} / 1000 % 1000") - math(EXPR _PROTOBUF_SUBMINOR_VERSION "${PROTOBUF_LIB_VERSION} % 1000") - set(PROTOBUF_VERSION "${_PROTOBUF_MAJOR_VERSION}.${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}") + math(EXPR _PROTOBUF_MAJOR_VERSION "${Protobuf_LIB_VERSION} / 1000000") + math(EXPR _PROTOBUF_MINOR_VERSION "${Protobuf_LIB_VERSION} / 1000 % 1000") + math(EXPR _PROTOBUF_SUBMINOR_VERSION "${Protobuf_LIB_VERSION} % 1000") + set(Protobuf_VERSION "${_PROTOBUF_MAJOR_VERSION}.${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}") - if(PROTOBUF_DEBUG) + if(Protobuf_DEBUG) message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "${_PROTOBUF_COMMON_HEADER} reveals protobuf ${PROTOBUF_VERSION}") + "${_PROTOBUF_COMMON_HEADER} reveals protobuf ${Protobuf_VERSION}") endif() # Check Protobuf compiler version to be aligned with libraries version - execute_process(COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} --version + execute_process(COMMAND ${Protobuf_PROTOC_EXECUTABLE} --version OUTPUT_VARIABLE _PROTOBUF_PROTOC_EXECUTABLE_VERSION) if("${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" MATCHES "libprotoc ([0-9.]+)") set(_PROTOBUF_PROTOC_EXECUTABLE_VERSION "${CMAKE_MATCH_1}") endif() - if(PROTOBUF_DEBUG) + if(Protobuf_DEBUG) message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " - "${PROTOBUF_PROTOC_EXECUTABLE} reveals version ${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}") + "${Protobuf_PROTOC_EXECUTABLE} reveals version ${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}") endif() - if(NOT "${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" VERSION_EQUAL "${PROTOBUF_VERSION}") + if(NOT "${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" VERSION_EQUAL "${Protobuf_VERSION}") message(WARNING "Protobuf compiler version ${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" - " doesn't match library version ${PROTOBUF_VERSION}") + " doesn't match library version ${Protobuf_VERSION}") endif() endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Protobuf - REQUIRED_VARS PROTOBUF_LIBRARIES PROTOBUF_INCLUDE_DIR - VERSION_VAR PROTOBUF_VERSION + REQUIRED_VARS Protobuf_LIBRARIES Protobuf_INCLUDE_DIR + VERSION_VAR Protobuf_VERSION ) -if(PROTOBUF_FOUND) - set(PROTOBUF_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIR}) +if(Protobuf_FOUND) + set(Protobuf_INCLUDE_DIRS ${Protobuf_INCLUDE_DIR}) endif() + +# Backwards compatibility +# Define upper case versions of output variables +foreach(Camel + Protobuf_SRC_ROOT_FOLDER + Protobuf_IMPORT_DIRS + Protobuf_DEBUG + Protobuf_INCLUDE_DIRS + Protobuf_LIBRARIES + Protobuf_PROTOC_LIBRARIES + Protobuf_LITE_LIBRARIES + Protobuf_LIBRARY + Protobuf_PROTOC_LIBRARY + Protobuf_INCLUDE_DIR + Protobuf_PROTOC_EXECUTABLE + Protobuf_LIBRARY_DEBUG + Protobuf_PROTOC_LIBRARY_DEBUG + Protobuf_LITE_LIBRARY + Protobuf_LITE_LIBRARY_DEBUG + ) + string(TOUPPER ${Camel} UPPER) + set(${UPPER} ${${Camel}}) +endforeach() diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 4f4efbc..6389d30 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -341,7 +341,9 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY) string(MAKE_C_IDENTIFIER ${STATIC_DEFINE} STATIC_DEFINE) if(_GEH_DEFINE_NO_DEPRECATED) - set(DEFINE_NO_DEPRECATED TRUE) + set(DEFINE_NO_DEPRECATED 1) + else() + set(DEFINE_NO_DEPRECATED 0) endif() if(_GEH_NO_DEPRECATED_MACRO_NAME) diff --git a/Modules/MacOSXBundleInfo.plist.in b/Modules/MacOSXBundleInfo.plist.in index a466dc7..a4009bc 100644 --- a/Modules/MacOSXBundleInfo.plist.in +++ b/Modules/MacOSXBundleInfo.plist.in @@ -28,8 +28,6 @@ <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string> <key>CSResourcesFileMapped</key> <true/> - <key>LSRequiresCarbon</key> - <true/> <key>NSHumanReadableCopyright</key> <string>${MACOSX_BUNDLE_COPYRIGHT}</string> </dict> diff --git a/Modules/Platform/CYGWIN-Clang-C.cmake b/Modules/Platform/CYGWIN-Clang-C.cmake new file mode 100644 index 0000000..e8343a4 --- /dev/null +++ b/Modules/Platform/CYGWIN-Clang-C.cmake @@ -0,0 +1 @@ +include(Platform/CYGWIN-GNU-C) diff --git a/Modules/Platform/CYGWIN-Clang-CXX.cmake b/Modules/Platform/CYGWIN-Clang-CXX.cmake new file mode 100644 index 0000000..67775de --- /dev/null +++ b/Modules/Platform/CYGWIN-Clang-CXX.cmake @@ -0,0 +1 @@ +include(Platform/CYGWIN-GNU-CXX) diff --git a/Modules/TestBigEndian.cmake b/Modules/TestBigEndian.cmake index fcb41ab..fdc3adb 100644 --- a/Modules/TestBigEndian.cmake +++ b/Modules/TestBigEndian.cmake @@ -104,7 +104,7 @@ macro(TEST_BIG_ENDIAN VARIABLE) message(SEND_ERROR "TEST_BIG_ENDIAN found no result!") endif() - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the system is big endian passed with the following output:\n${OUTPUT}\nTestEndianess.c:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n") else() diff --git a/Modules/exportheader.cmake.in b/Modules/exportheader.cmake.in index 118de16..7cfbcbd 100644 --- a/Modules/exportheader.cmake.in +++ b/Modules/exportheader.cmake.in @@ -33,9 +33,10 @@ # define @DEPRECATED_MACRO_NAME@_NO_EXPORT @NO_EXPORT_MACRO_NAME@ @DEPRECATED_MACRO_NAME@ #endif -#cmakedefine01 DEFINE_NO_DEPRECATED -#if DEFINE_NO_DEPRECATED -# define @NO_DEPRECATED_MACRO_NAME@ +#if @DEFINE_NO_DEPRECATED@ /* DEFINE_NO_DEPRECATED */ +# ifndef @NO_DEPRECATED_MACRO_NAME@ +# define @NO_DEPRECATED_MACRO_NAME@ +# endif #endif #endif diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 6129293..467b692 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -724,7 +724,20 @@ endif() add_library(CPackLib ${CPACK_SRCS}) target_link_libraries(CPackLib CMakeLib) if(APPLE) - target_link_libraries(CPackLib "-framework Carbon") + # Some compilers produce errors in the CoreServices framework headers. + # Ideally such errors should be fixed by either the compiler vendor + # or the framework source, but we try to workaround it and build anyway. + # If it does not work, build with reduced functionality and warn. + check_include_file("CoreServices/CoreServices.h" HAVE_CoreServices) + if(HAVE_CoreServices) + set_property(SOURCE CPack/cmCPackDragNDropGenerator.cxx PROPERTY COMPILE_DEFINITIONS HAVE_CoreServices) + target_link_libraries(CPackLib "-framework CoreServices") + else() + message(WARNING "This compiler does not appear to support\n" + " #include <CoreServices/CoreServices.h>\n" + "Some CPack functionality may be limited.\n" + "See CMakeFiles/CMakeError.log for details of the failure.") + endif() endif() if(APPLE) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index b60c3b3..f61e30e 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 5) -set(CMake_VERSION_PATCH 20160310) +set(CMake_VERSION_PATCH 20160322) #set(CMake_VERSION_RC 1) diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index 7b94ca3..d6de77d 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -20,20 +20,13 @@ #include <iomanip> -#include <CoreFoundation/CFBase.h> -#include <CoreFoundation/CFString.h> -#include <CoreFoundation/CFLocale.h> - -// The carbon framework is deprecated, but the Region codes it supplies are -// needed for the LPic data structure used for generating multi-lingual SLAs. -// There does not seem to be a replacement API for these region codes. -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wdeprecated-declarations" -#endif -#include <Carbon/Carbon.h> -#if defined(__clang__) -# pragma clang diagnostic pop +#include <CoreFoundation/CoreFoundation.h> + +#ifdef HAVE_CoreServices +// For the old LocaleStringToLangAndRegionCodes() function, to convert +// to the old Script Manager RegionCode values needed for the 'LPic' data +// structure used for generating multi-lingual SLAs. +#include <CoreServices/CoreServices.h> #endif static const char* SLAHeader = @@ -652,9 +645,11 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, kCFStringEncodingMacRoman); LangCode lang = 0; RegionCode region = 0; +#ifdef HAVE_CoreServices OSStatus err = LocaleStringToLangAndRegionCodes(iso_language_cstr, &lang, ®ion); if (err != noErr) +#endif { cmCPackLogger(cmCPackLog::LOG_ERROR, "No language/region code available for " << iso_language_cstr @@ -662,10 +657,12 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, free(iso_language_cstr); return 0; } +#ifdef HAVE_CoreServices free(iso_language_cstr); header_data.push_back(region); header_data.push_back(i); header_data.push_back(0); +#endif } ofs << "data 'LPic' (5000) {\n"; ofs << std::hex << std::uppercase << std::setfill('0'); diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index f17de5d..a906f4a 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -173,6 +173,7 @@ if(APPLE) MACOSX_BUNDLE_SHORT_VERSION_STRING "${CMAKE_BUNDLE_VERSION}" # TBD: MACOSX_BUNDLE_BUNDLE_VERSION "${CMAKE_BUNDLE_VERSION}" MACOSX_BUNDLE_COPYRIGHT "${copyright_line}" + MACOSX_BUNDLE_GUI_IDENTIFIER "org.cmake.cmake" ) # Create a symlink in the build tree to provide a "cmake-gui" next diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx index 54c27d6..e670991 100644 --- a/Source/cmCreateTestSourceList.cxx +++ b/Source/cmCreateTestSourceList.cxx @@ -78,8 +78,7 @@ bool cmCreateTestSourceList driver += *i; ++i; - std::string configFile = - this->Makefile->GetRequiredDefinition("CMAKE_ROOT"); + std::string configFile = cmSystemTools::GetCMakeRoot(); configFile += "/Templates/TestDriver.cxx.in"; // Create the test driver file diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index ed0c69c..476d3ac 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -259,13 +259,12 @@ void cmExtraCodeBlocksGenerator } // Convert - const char* cmakeRoot = mf->GetDefinition("CMAKE_ROOT"); for (std::vector<std::string>::const_iterator jt = listFiles.begin(); jt != listFiles.end(); ++jt) { // don't put cmake's own files into the project (#12110): - if (jt->find(cmakeRoot) == 0) + if (jt->find(cmSystemTools::GetCMakeRoot()) == 0) { continue; } diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ff12320..d7c2782 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3909,8 +3909,7 @@ void checkPropertyConsistency(cmGeneratorTarget const* depender, std::vector<std::string> props; cmSystemTools::ExpandListArgument(prop, props); - std::string pdir = - dependee->Target->GetMakefile()->GetRequiredDefinition("CMAKE_ROOT"); + std::string pdir = cmSystemTools::GetCMakeRoot(); pdir += "/Help/prop_tgt/"; for(std::vector<std::string>::iterator pi = props.begin(); diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 18e140e..c5813ba 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -217,8 +217,11 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string &config, if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY) { + std::string const static_library_suffix = + this->Makefile->GetSafeDefinition("CMAKE_STATIC_LIBRARY_SUFFIX"); *this->GetFolderBuildStreams() << " -o \"" - << outputDir << outputFilename << ".a\"" + << outputDir << outputFilename + << static_library_suffix << "\"" << std::endl; } else if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE) @@ -238,8 +241,11 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string &config, } else { + std::string const executable_suffix = + this->Makefile->GetSafeDefinition("CMAKE_EXECUTABLE_SUFFIX"); *this->GetFolderBuildStreams() << " -o \"" - << outputDir << outputFilename << ".as\"" + << outputDir << outputFilename + << executable_suffix << "\"" << std::endl; } } diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index c628406..1d0ade4 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -820,7 +820,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages, // Now load files that can override any settings on the platform or for // the project First load the project compatibility file if it is in // cmake - std::string projectCompatibility = mf->GetDefinition("CMAKE_ROOT"); + std::string projectCompatibility = cmSystemTools::GetCMakeRoot(); projectCompatibility += "/Modules/"; projectCompatibility += mf->GetSafeDefinition("PROJECT_NAME"); projectCompatibility += "Compatibility.cmake"; diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 83422b7..f12396f 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -577,6 +577,7 @@ void cmGlobalNinjaGenerator::Generate() this->WriteAssumedSourceDependencies(); this->WriteTargetAliases(*this->BuildFileStream); + this->WriteFolderTargets(*this->BuildFileStream); this->WriteUnknownExplicitDependencies(*this->BuildFileStream); this->WriteBuiltinTargets(*this->BuildFileStream); @@ -848,6 +849,18 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) return convPath; } +std::string +cmGlobalNinjaGenerator::ConvertToNinjaFolderRule(const std::string& path) +{ + cmLocalNinjaGenerator *ng = + static_cast<cmLocalNinjaGenerator *>(this->LocalGenerators[0]); + std::string convPath = ng->Convert(path+"/all", cmOutputConverter::HOME); +#ifdef _WIN32 + cmSystemTools::ReplaceString(convPath, "/", "\\"); +#endif + return convPath; +} + void cmGlobalNinjaGenerator::AddCXXCompileCommand( const std::string &commandLine, const std::string &sourceFile) @@ -1044,6 +1057,75 @@ void cmGlobalNinjaGenerator::WriteTargetAliases(std::ostream& os) } } +void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os) +{ + cmGlobalNinjaGenerator::WriteDivider(os); + os << "# Folder targets.\n\n"; + + std::map<std::string, cmNinjaDeps> targetsPerFolder; + for (std::vector<cmLocalGenerator *>::const_iterator + lgi = this->LocalGenerators.begin(); + lgi != this->LocalGenerators.end(); ++lgi) + { + cmLocalGenerator const* lg = *lgi; + const std::string currentSourceFolder( + lg->GetStateSnapshot().GetDirectory().GetCurrentSource()); + // The directory-level rule should depend on the target-level rules + // for all targets in the directory. + targetsPerFolder[currentSourceFolder] = cmNinjaDeps(); + for (std::vector<cmGeneratorTarget*>::const_iterator + ti = lg->GetGeneratorTargets().begin(); + ti != lg->GetGeneratorTargets().end(); ++ti) + { + cmGeneratorTarget const* gt = *ti; + cmState::TargetType const type = gt->GetType(); + if((type == cmState::EXECUTABLE || + type == cmState::STATIC_LIBRARY || + type == cmState::SHARED_LIBRARY || + type == cmState::MODULE_LIBRARY || + type == cmState::OBJECT_LIBRARY || + type == cmState::UTILITY) && + !gt->GetPropertyAsBool("EXCLUDE_FROM_ALL")) + { + targetsPerFolder[currentSourceFolder].push_back(gt->GetName()); + } + } + + // The directory-level rule should depend on the directory-level + // rules of the subdirectories. + std::vector<cmState::Snapshot> const& children = + lg->GetStateSnapshot().GetChildren(); + for(std::vector<cmState::Snapshot>::const_iterator + stateIt = children.begin(); stateIt != children.end(); ++stateIt) + { + targetsPerFolder[currentSourceFolder].push_back( + this->ConvertToNinjaFolderRule( + stateIt->GetDirectory().GetCurrentSource())); + } + } + + std::string const rootSourceDir = + this->LocalGenerators[0]->GetSourceDirectory(); + for (std::map<std::string, cmNinjaDeps >::const_iterator it = + targetsPerFolder.begin(); it != targetsPerFolder.end(); ++it) + { + cmGlobalNinjaGenerator::WriteDivider( os ); + std::string const& currentSourceDir = it->first; + + // Do not generate a rule for the root source dir. + if (rootSourceDir.length() >= currentSourceDir.length()) + { + continue; + } + + std::string const comment = "Folder: " + currentSourceDir; + cmNinjaDeps output(1); + output.push_back(this->ConvertToNinjaFolderRule(currentSourceDir)); + + this->WritePhonyBuild(os, comment, output, it->second); + } +} + void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os) { if (!this->ComputingUnknownDependencies) diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 8656590..3023a95 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -228,6 +228,8 @@ public: return this->RulesFileStream; } std::string ConvertToNinjaPath(const std::string& path); + std::string ConvertToNinjaFolderRule(const std::string& path); + struct MapToNinjaPathImpl { cmGlobalNinjaGenerator* GG; @@ -342,6 +344,7 @@ private: void WriteAssumedSourceDependencies(); void WriteTargetAliases(std::ostream& os); + void WriteFolderTargets(std::ostream& os); void WriteUnknownExplicitDependencies(std::ostream& os); void WriteBuiltinTargets(std::ostream& os); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index f5848ab..c1c8c77 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -335,23 +335,6 @@ void cmGlobalVisualStudio7Generator::Generate() { this->CallVisualStudioMacro(MacroReload); } - - if (!this->CMakeInstance->GetIsInTryCompile() && - this->GetName() == "Visual Studio 7") - { - const char* cmakeWarnVS70 = - this->CMakeInstance->GetState()->GetCacheEntryValue("CMAKE_WARN_VS70"); - if (!cmakeWarnVS70 || !cmSystemTools::IsOff(cmakeWarnVS70)) - { - this->CMakeInstance->IssueMessage( - cmake::WARNING, - "The \"Visual Studio 7\" generator is deprecated " - "and will be removed in a future version of CMake." - "\n" - "Add CMAKE_WARN_VS70=OFF to the cache to disable this warning." - ); - } - } } void cmGlobalVisualStudio7Generator @@ -551,71 +534,6 @@ void cmGlobalVisualStudio7Generator::WriteTargetDepends( } //---------------------------------------------------------------------------- -// Write a SLN file to the stream -void cmGlobalVisualStudio7Generator -::WriteSLNFile(std::ostream& fout, - cmLocalGenerator* root, - std::vector<cmLocalGenerator*>& generators) -{ - std::vector<std::string> configs; - root->GetMakefile()->GetConfigurations(configs); - - // Write out the header for a SLN file - this->WriteSLNHeader(fout); - - // Collect all targets under this root generator and the transitive - // closure of their dependencies. - TargetDependSet projectTargets; - TargetDependSet originalTargets; - this->GetTargetSets(projectTargets, originalTargets, root, generators); - OrderedTargetDependSet orderedProjectTargets(projectTargets, "ALL_BUILD"); - - this->WriteTargetsToSolution(fout, root, orderedProjectTargets); - - bool useFolderProperty = this->UseFolderProperty(); - if (useFolderProperty) - { - this->WriteFolders(fout); - } - - // Write out the configurations information for the solution - fout << "Global\n" - << "\tGlobalSection(SolutionConfiguration) = preSolution\n"; - - int c = 0; - for(std::vector<std::string>::iterator i = configs.begin(); - i != configs.end(); ++i) - { - fout << "\t\tConfigName." << c << " = " << *i << "\n"; - c++; - } - fout << "\tEndGlobalSection\n"; - // Write out project(target) depends - fout << "\tGlobalSection(ProjectDependencies) = postSolution\n"; - this->WriteTargetDepends(fout, orderedProjectTargets); - fout << "\tEndGlobalSection\n"; - - if (useFolderProperty) - { - // Write out project folders - fout << "\tGlobalSection(NestedProjects) = preSolution\n"; - this->WriteFoldersContent(fout); - fout << "\tEndGlobalSection\n"; - } - - // Write out the configurations for all the targets in the project - fout << "\tGlobalSection(ProjectConfiguration) = postSolution\n"; - this->WriteTargetConfigurations(fout, configs, orderedProjectTargets); - fout << "\tEndGlobalSection\n"; - - // Write out global sections - this->WriteSLNGlobalSections(fout, root); - - // Write the footer for the SLN file - this->WriteSLNFooter(fout); -} - -//---------------------------------------------------------------------------- void cmGlobalVisualStudio7Generator::WriteFolders(std::ostream& fout) { const char *prefix = "CMAKE_FOLDER_GUID_"; @@ -680,134 +598,6 @@ cmGlobalVisualStudio7Generator::ConvertToSolutionPath(const char* path) return d; } -// Write a dsp file into the SLN file, -// Note, that dependencies from executables to -// the libraries it uses are also done here -void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout, - const std::string& dspname, - const char* dir, - cmGeneratorTarget const* target) -{ - // check to see if this is a fortran build - const char* ext = ".vcproj"; - const char* project = - "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""; - if(this->TargetIsFortranOnly(target)) - { - ext = ".vfproj"; - project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \""; - } - - fout << project - << dspname << "\", \"" - << this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"") - << dspname << ext << "\", \"{" - << this->GetGUID(dspname) << "}\"\nEndProject\n"; - - UtilityDependsMap::iterator ui = this->UtilityDepends.find(target); - if(ui != this->UtilityDepends.end()) - { - const char* uname = ui->second.c_str(); - fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"" - << uname << "\", \"" - << this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"") - << uname << ".vcproj" << "\", \"{" - << this->GetGUID(uname) << "}\"\n" - << "EndProject\n"; - } -} - - - -// Write a dsp file into the SLN file, -// Note, that dependencies from executables to -// the libraries it uses are also done here -void -cmGlobalVisualStudio7Generator -::WriteProjectDepends(std::ostream& fout, - const std::string& dspname, - const char*, cmGeneratorTarget const* target) -{ - int depcount = 0; - std::string dspguid = this->GetGUID(dspname); - VSDependSet const& depends = this->VSTargetDepends[target]; - for(VSDependSet::const_iterator di = depends.begin(); - di != depends.end(); ++di) - { - const char* name = di->c_str(); - std::string guid = this->GetGUID(name); - if(guid.empty()) - { - std::string m = "Target: "; - m += target->GetName(); - m += " depends on unknown target: "; - m += name; - cmSystemTools::Error(m.c_str()); - } - fout << "\t\t{" << dspguid << "}." << depcount << " = {" << guid << "}\n"; - depcount++; - } - - UtilityDependsMap::iterator ui = this->UtilityDepends.find(target); - if(ui != this->UtilityDepends.end()) - { - const char* uname = ui->second.c_str(); - fout << "\t\t{" << this->GetGUID(uname) << "}.0 = {" << dspguid << "}\n"; - } -} - - -// Write a dsp file into the SLN file, Note, that dependencies from -// executables to the libraries it uses are also done here -void cmGlobalVisualStudio7Generator -::WriteProjectConfigurations( - std::ostream& fout, const std::string& name, cmState::TargetType, - std::vector<std::string> const& configs, - const std::set<std::string>& configsPartOfDefaultBuild, - const std::string& platformMapping) -{ - const std::string& platformName = - !platformMapping.empty() ? platformMapping : this->GetPlatformName(); - std::string guid = this->GetGUID(name); - for(std::vector<std::string>::const_iterator i = configs.begin(); - i != configs.end(); ++i) - { - fout << "\t\t{" << guid << "}." << *i - << ".ActiveCfg = " << *i << "|" << platformName << "\n"; - std::set<std::string>::const_iterator - ci = configsPartOfDefaultBuild.find(*i); - if(!(ci == configsPartOfDefaultBuild.end())) - { - fout << "\t\t{" << guid << "}." << *i - << ".Build.0 = " << *i << "|" << platformName << "\n"; - } - } -} - - - -// Write a dsp file into the SLN file, -// Note, that dependencies from executables to -// the libraries it uses are also done here -void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& fout, - const std::string& name, - const char* location, - const char* typeGuid, - const std::set<std::string>&) -{ - fout << "Project(" - << "\"{" - << (typeGuid ? typeGuid : this->ExternalProjectType(location)) - << "}\") = \"" - << name << "\", \"" - << this->ConvertToSolutionPath(location) << "\", \"{" - << this->GetGUID(name) - << "}\"\n"; - fout << "EndProject\n"; -} - - - void cmGlobalVisualStudio7Generator ::WriteSLNGlobalSections(std::ostream& fout, cmLocalGenerator* root) @@ -871,21 +661,12 @@ void cmGlobalVisualStudio7Generator << "\tEndGlobalSection\n"; } - - // Standard end of dsw file void cmGlobalVisualStudio7Generator::WriteSLNFooter(std::ostream& fout) { fout << "EndGlobal\n"; } - -// ouput standard header for dsw file -void cmGlobalVisualStudio7Generator::WriteSLNHeader(std::ostream& fout) -{ - fout << "Microsoft Visual Studio Solution File, Format Version 7.00\n"; -} - //---------------------------------------------------------------------------- std::string cmGlobalVisualStudio7Generator::WriteUtilityDepend( @@ -970,14 +751,6 @@ std::string cmGlobalVisualStudio7Generator::GetGUID(std::string const& name) } //---------------------------------------------------------------------------- -void cmGlobalVisualStudio7Generator -::GetDocumentation(cmDocumentationEntry& entry) -{ - entry.Name = cmGlobalVisualStudio7Generator::GetActualName(); - entry.Brief = "Deprecated. Generates Visual Studio .NET 2002 project files."; -} - -//---------------------------------------------------------------------------- void cmGlobalVisualStudio7Generator ::AppendDirectoryForConfig(const std::string& prefix, diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index de2d35e..02f9809 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -30,15 +30,6 @@ public: const std::string& platformName = ""); ~cmGlobalVisualStudio7Generator(); - static cmGlobalGeneratorFactory* NewFactory() { - return new cmGlobalGeneratorSimpleFactory - <cmGlobalVisualStudio7Generator>(); } - - ///! Get the name for the generator. - virtual std::string GetName() const { - return cmGlobalVisualStudio7Generator::GetActualName();} - static std::string GetActualName() {return "Visual Studio 7";} - ///! Get the name for the platform. std::string const& GetPlatformName() const; @@ -49,9 +40,6 @@ public: virtual bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf); - /** Get the documentation entry for this generator. */ - static void GetDocumentation(cmDocumentationEntry& entry); - /** * Utilized by the generator factory to determine if this generator * supports toolsets. @@ -117,7 +105,7 @@ public: protected: virtual void Generate(); - virtual const char* GetIDEVersion() { return "7.0"; } + virtual const char* GetIDEVersion() = 0; std::string const& GetDevEnvCommand(); virtual std::string FindDevEnvCommand(); @@ -127,22 +115,22 @@ protected: virtual void OutputSLNFile(cmLocalGenerator* root, std::vector<cmLocalGenerator*>& generators); virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root, - std::vector<cmLocalGenerator*>& generators); + std::vector<cmLocalGenerator*>& generators) = 0; virtual void WriteProject(std::ostream& fout, const std::string& name, const char* path, - const cmGeneratorTarget *t); + const cmGeneratorTarget *t) = 0; virtual void WriteProjectDepends(std::ostream& fout, const std::string& name, const char* path, - cmGeneratorTarget const* t); + cmGeneratorTarget const* t) = 0; virtual void WriteProjectConfigurations( std::ostream& fout, const std::string& name, cmState::TargetType type, std::vector<std::string> const& configs, const std::set<std::string>& configsPartOfDefaultBuild, - const std::string& platformMapping = ""); + const std::string& platformMapping = "") = 0; virtual void WriteSLNGlobalSections(std::ostream& fout, cmLocalGenerator* root); virtual void WriteSLNFooter(std::ostream& fout); - virtual void WriteSLNHeader(std::ostream& fout); + virtual void WriteSLNHeader(std::ostream& fout) = 0; virtual std::string WriteUtilityDepend(const cmGeneratorTarget *target); virtual void WriteTargetsToSolution( @@ -162,7 +150,7 @@ protected: const char* path, const char* typeGuid, const std::set<std::string>& - dependencies); + dependencies) = 0; std::string ConvertToSolutionPath(const char* path); diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 6a1aa29..00bb511 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -184,12 +184,11 @@ void RegisterVisualStudioMacros(const std::string& macrosFile, //---------------------------------------------------------------------------- void cmGlobalVisualStudioGenerator::ConfigureCMakeVisualStudioMacros() { - cmMakefile* mf = this->LocalGenerators[0]->GetMakefile(); std::string dir = this->GetUserMacrosDirectory(); if (dir != "") { - std::string src = mf->GetRequiredDefinition("CMAKE_ROOT"); + std::string src = cmSystemTools::GetCMakeRoot(); src += "/Templates/" CMAKE_VSMACROS_FILENAME; std::string dst = dir + "/CMakeMacros/" CMAKE_VSMACROS_FILENAME; diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index adfbe2a..abae564 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1012,6 +1012,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, this->OutputTargetRules(fout, configName, target, libName); this->OutputBuildTool(fout, configName, target, targetOptions); + this->OutputDeploymentDebuggerTool(fout, configName, target); fout << "\t\t</Configuration>\n"; } @@ -1374,6 +1375,32 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, } } +void cmLocalVisualStudio7Generator::OutputDeploymentDebuggerTool( + std::ostream& fout, std::string const& config, cmGeneratorTarget* target) +{ + if (this->WindowsCEProject) + { + if (const char* dir = target->GetProperty("DEPLOYMENT_REMOTE_DIRECTORY")) + { + fout << + "\t\t\t<DeploymentTool\n" + "\t\t\t\tForceDirty=\"-1\"\n" + "\t\t\t\tRemoteDirectory=\"" << this->EscapeForXML(dir) << "\"\n" + "\t\t\t\tRegisterOutput=\"0\"\n" + "\t\t\t\tAdditionalFiles=\"\"/>\n" + ; + std::string const exe = + dir + std::string("\\") + target->GetFullName(config); + fout << + "\t\t\t<DebuggerTool\n" + "\t\t\t\tRemoteExecutable=\"" << this->EscapeForXML(exe) << "\"\n" + "\t\t\t\tArguments=\"\"\n" + "\t\t\t/>\n" + ; + } + } +} + //---------------------------------------------------------------------------- void cmLocalVisualStudio7Generator diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h index 7bb9cc6..562f485 100644 --- a/Source/cmLocalVisualStudio7Generator.h +++ b/Source/cmLocalVisualStudio7Generator.h @@ -92,6 +92,9 @@ private: const std::string& libName); void OutputBuildTool(std::ostream& fout, const std::string& configName, cmGeneratorTarget* t, const Options& targetOptions); + void OutputDeploymentDebuggerTool(std::ostream& fout, + std::string const& config, + cmGeneratorTarget* target); void OutputLibraryDirectories(std::ostream& fout, std::vector<std::string> const& dirs); void WriteProjectSCC(std::ostream& fout, cmGeneratorTarget *target); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8f59e2c..1df5cec 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3738,17 +3738,13 @@ std::string cmMakefile::GetModulesFile(const char* filename) const } // Always search in the standard modules location. - const char* cmakeRoot = this->GetDefinition("CMAKE_ROOT"); - if(cmakeRoot) - { - moduleInCMakeRoot = cmakeRoot; - moduleInCMakeRoot += "/Modules/"; - moduleInCMakeRoot += filename; - cmSystemTools::ConvertToUnixSlashes(moduleInCMakeRoot); - if(!cmSystemTools::FileExists(moduleInCMakeRoot.c_str())) - { - moduleInCMakeRoot = ""; - } + moduleInCMakeRoot = cmSystemTools::GetCMakeRoot(); + moduleInCMakeRoot += "/Modules/"; + moduleInCMakeRoot += filename; + cmSystemTools::ConvertToUnixSlashes(moduleInCMakeRoot); + if(!cmSystemTools::FileExists(moduleInCMakeRoot.c_str())) + { + moduleInCMakeRoot = ""; } // Normally, prefer the files found in CMAKE_MODULE_PATH. Only when the file @@ -3763,7 +3759,7 @@ std::string cmMakefile::GetModulesFile(const char* filename) const if (!moduleInCMakeModulePath.empty() && !moduleInCMakeRoot.empty()) { const char* currentFile = this->GetDefinition("CMAKE_CURRENT_LIST_FILE"); - std::string mods = cmakeRoot + std::string("/Modules/"); + std::string mods = cmSystemTools::GetCMakeRoot() + "/Modules/"; if (currentFile && strncmp(currentFile, mods.c_str(), mods.size()) == 0) { switch (this->GetPolicyStatus(cmPolicies::CMP0017)) diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 08caea3..4cab81f 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -1003,8 +1003,7 @@ void cmQtAutoGeneratorInitializer::SetupAutoGenerateTarget( SetupAutoRccTarget(target); } - const char* cmakeRoot = makefile->GetSafeDefinition("CMAKE_ROOT"); - std::string inputFile = cmakeRoot; + std::string inputFile = cmSystemTools::GetCMakeRoot(); inputFile += "/Modules/AutogenInfo.cmake.in"; std::string outputFile = targetDir; outputFile += "/AutogenInfo.cmake"; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index c197dae..dcc95af 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -51,7 +51,6 @@ // include the generator #if defined(_WIN32) && !defined(__CYGWIN__) # if !defined(CMAKE_BOOT_MINGW) -# include "cmGlobalVisualStudio7Generator.h" # include "cmGlobalVisualStudio71Generator.h" # include "cmGlobalVisualStudio8Generator.h" # include "cmGlobalVisualStudio9Generator.h" @@ -1428,7 +1427,6 @@ int cmake::ActualConfigure() const char* GeneratorName; }; VSRegistryEntryName version[] = { - {"7.0", "Visual Studio 7"}, {"7.1", "Visual Studio 7 .NET 2003"}, {"8.0", "Visual Studio 8 2005"}, {"9.0", "Visual Studio 9 2008"}, @@ -1835,8 +1833,6 @@ void cmake::AddDefaultGenerators() this->Generators.push_back( cmGlobalVisualStudio71Generator::NewFactory()); this->Generators.push_back( - cmGlobalVisualStudio7Generator::NewFactory()); - this->Generators.push_back( cmGlobalBorlandMakefileGenerator::NewFactory()); this->Generators.push_back( cmGlobalNMakeMakefileGenerator::NewFactory()); @@ -2413,8 +2409,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args) // we have to find the module directory, so we can copy the files this->AddCMakePaths(); - std::string modulesPath = - this->State->GetInitializedCacheValue("CMAKE_ROOT"); + std::string modulesPath = cmSystemTools::GetCMakeRoot(); modulesPath += "/Modules"; std::string inFile = modulesPath; inFile += "/SystemInformation.cmake"; diff --git a/Templates/AppleInfo.plist b/Templates/AppleInfo.plist index 1f68ccf..3445e53 100644 --- a/Templates/AppleInfo.plist +++ b/Templates/AppleInfo.plist @@ -28,8 +28,6 @@ <string>${APPLE_GUI_BUNDLE_VERSION}</string> <key>CSResourcesFileMapped</key> <true/> - <key>LSRequiresCarbon</key> - <true/> <key>NSHumanReadableCopyright</key> <string>${APPLE_GUI_COPYRIGHT}</string> </dict> diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 76ea5b4..8a256bf 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -684,14 +684,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif() endmacro() if(CMAKE_BUILD_NIGHTLY_RELEASES) - ADD_NIGHTLY_BUILD_TEST(CMakeNightlyWindows - dash3win7_release.cmake) + ADD_NIGHTLY_BUILD_TEST(CMakeNightlyWin32 + win32_release.cmake) + ADD_NIGHTLY_BUILD_TEST(CMakeNightlyWin64 + win64_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyOSX - bigmac_release.cmake) + osx_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyLinux32 - magrathea_release.cmake) + linux32_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyLinux64 linux64_release.cmake) + set_property(TEST CMakeNightlyWin64 PROPERTY DEPENDS CMakeNightlyWin32) endif() # add tests with more complex invocations diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt index 1f39052..8f842d6 100644 --- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt +++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt @@ -87,10 +87,9 @@ foreach(VTEST ALSA ARMADILLO BZIP2 CUPS CURL EXPAT FREETYPE GETTEXT GIT HG endforeach() foreach(VTEST BISON Boost CUDA DOXYGEN FLEX GIF GTK2 - HDF5 LibArchive OPENSCENEGRAPH RUBY SWIG) + HDF5 LibArchive OPENSCENEGRAPH RUBY SWIG Protobuf) check_version_string(${VTEST} ${VTEST}_VERSION) endforeach() check_version_string(PYTHONINTERP PYTHON_VERSION_STRING) -check_version_string(Protobuf PROTOBUF_VERSION) check_version_string(SUBVERSION Subversion_VERSION_SVN) diff --git a/Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h index b6749b2..e8af0a5 100644 --- a/Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h +++ b/Tests/Module/GenerateExportHeader/reference/Empty/libshared_export.h @@ -33,9 +33,10 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSHARED_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSHARED_NO_DEPRECATED +# define LIBSHARED_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h index e8000e2..598bd71 100644 --- a/Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h +++ b/Tests/Module/GenerateExportHeader/reference/Empty/libstatic_export.h @@ -33,9 +33,10 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSTATIC_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSTATIC_NO_DEPRECATED +# define LIBSTATIC_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h index d376631..cc20e09 100644 --- a/Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h +++ b/Tests/Module/GenerateExportHeader/reference/MinGW/libshared_export.h @@ -33,9 +33,10 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSHARED_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSHARED_NO_DEPRECATED +# define LIBSHARED_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h index fd021e9..4aaa848 100644 --- a/Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h +++ b/Tests/Module/GenerateExportHeader/reference/MinGW/libstatic_export.h @@ -33,9 +33,10 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSTATIC_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSTATIC_NO_DEPRECATED +# define LIBSTATIC_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h index 7d8087f..053ad18 100644 --- a/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h +++ b/Tests/Module/GenerateExportHeader/reference/UNIX/libshared_export.h @@ -33,9 +33,10 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSHARED_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSHARED_NO_DEPRECATED +# define LIBSHARED_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h index fd021e9..4aaa848 100644 --- a/Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h +++ b/Tests/Module/GenerateExportHeader/reference/UNIX/libstatic_export.h @@ -33,9 +33,10 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSTATIC_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSTATIC_NO_DEPRECATED +# define LIBSTATIC_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h index 5681f58..808ff01 100644 --- a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h +++ b/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libshared_export.h @@ -33,9 +33,10 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSHARED_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSHARED_NO_DEPRECATED +# define LIBSHARED_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h index fd021e9..4aaa848 100644 --- a/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h +++ b/Tests/Module/GenerateExportHeader/reference/UNIX_DeprecatedOnly/libstatic_export.h @@ -33,9 +33,10 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSTATIC_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSTATIC_NO_DEPRECATED +# define LIBSTATIC_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h index d376631..cc20e09 100644 --- a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h +++ b/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libshared_export.h @@ -33,9 +33,10 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSHARED_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSHARED_NO_DEPRECATED +# define LIBSHARED_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h index fd021e9..4aaa848 100644 --- a/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h +++ b/Tests/Module/GenerateExportHeader/reference/Win32-Clang/libstatic_export.h @@ -33,9 +33,10 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSTATIC_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSTATIC_NO_DEPRECATED +# define LIBSTATIC_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h index 976c92e..4e675af 100644 --- a/Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h +++ b/Tests/Module/GenerateExportHeader/reference/Win32/libshared_export.h @@ -33,9 +33,10 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSHARED_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSHARED_NO_DEPRECATED +# define LIBSHARED_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h index db4df61..4d5ed4e 100644 --- a/Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h +++ b/Tests/Module/GenerateExportHeader/reference/Win32/libstatic_export.h @@ -33,9 +33,10 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSTATIC_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSTATIC_NO_DEPRECATED +# define LIBSTATIC_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h b/Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h index 2dc41d4..84340e3 100644 --- a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h +++ b/Tests/Module/GenerateExportHeader/reference/WinEmpty/libshared_export.h @@ -33,9 +33,10 @@ # define LIBSHARED_DEPRECATED_NO_EXPORT LIBSHARED_NO_EXPORT LIBSHARED_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSHARED_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSHARED_NO_DEPRECATED +# define LIBSHARED_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h b/Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h index e8000e2..598bd71 100644 --- a/Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h +++ b/Tests/Module/GenerateExportHeader/reference/WinEmpty/libstatic_export.h @@ -33,9 +33,10 @@ # define LIBSTATIC_DEPRECATED_NO_EXPORT LIBSTATIC_NO_EXPORT LIBSTATIC_DEPRECATED #endif -#define DEFINE_NO_DEPRECATED 0 -#if DEFINE_NO_DEPRECATED -# define LIBSTATIC_NO_DEPRECATED +#if 0 /* DEFINE_NO_DEPRECATED */ +# ifndef LIBSTATIC_NO_DEPRECATED +# define LIBSTATIC_NO_DEPRECATED +# endif #endif #endif diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 7e7ed45..048b5e3 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -235,7 +235,7 @@ endif() if("${CMAKE_GENERATOR}" MATCHES "Visual Studio") add_RunCMake_test(include_external_msproject) - add_RunCMake_test(SolutionGlobalSections) + add_RunCMake_test(VSSolution) endif() if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([^789]|[789][0-9])") diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake index 8d8d000..d0046ca 100644 --- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake @@ -1,14 +1,15 @@ +cmake_minimum_required(VERSION 3.3) + find_package(PkgConfig REQUIRED) pkg_check_modules(NCURSES QUIET ncurses) if (NCURSES_FOUND) foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR) - get_property("${variable}" + get_property(value CACHE "NCURSES_${variable}" - PROPERTY TYPE - SET) - if (NOT ${variable}) - message(FATAL_ERROR "Failed to set cache entry for NCURSES_${variable}") + PROPERTY VALUE) + if (NOT value STREQUAL NCURSES_${variable}) + message(FATAL_ERROR "Failed to set cache entry for NCURSES_${variable}:\nexpected -->${value}<--\nreceived -->${NCURSES_${variable}}<--") endif () endforeach () else () diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index 64f97bc..4e06888 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -16,3 +16,19 @@ run_CMP0058(WARN-no) run_CMP0058(WARN-by) run_CMP0058(NEW-no) run_CMP0058(NEW-by) + +function(run_SubDir) + # Use a single build tree for a few tests without cleaning. + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SubDir-build) + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + run_cmake(SubDir) + if(WIN32) + set(SubDir_all [[SubDir\all]]) + else() + set(SubDir_all [[SubDir/all]]) + endif() + run_cmake_command(SubDir-build ${CMAKE_COMMAND} --build . --target ${SubDir_all}) +endfunction() +run_SubDir() diff --git a/Tests/RunCMake/Ninja/SubDir-build-stdout.txt b/Tests/RunCMake/Ninja/SubDir-build-stdout.txt new file mode 100644 index 0000000..e4b4662 --- /dev/null +++ b/Tests/RunCMake/Ninja/SubDir-build-stdout.txt @@ -0,0 +1 @@ +Building InAll diff --git a/Tests/RunCMake/Ninja/SubDir.cmake b/Tests/RunCMake/Ninja/SubDir.cmake new file mode 100644 index 0000000..7224ec3 --- /dev/null +++ b/Tests/RunCMake/Ninja/SubDir.cmake @@ -0,0 +1,2 @@ +add_subdirectory(SubDir) +add_custom_target(TopFail ALL COMMAND does_not_exist) diff --git a/Tests/RunCMake/Ninja/SubDir/CMakeLists.txt b/Tests/RunCMake/Ninja/SubDir/CMakeLists.txt new file mode 100644 index 0000000..73ae431 --- /dev/null +++ b/Tests/RunCMake/Ninja/SubDir/CMakeLists.txt @@ -0,0 +1,2 @@ +add_custom_target(SubFail COMMAND does_not_exist) +add_custom_target(InAll ALL COMMAND ${CMAKE_COMMAND} -E echo "Building InAll") diff --git a/Tests/RunCMake/SolutionGlobalSections/CMakeLists.txt b/Tests/RunCMake/VSSolution/CMakeLists.txt index 12cd3c7..12cd3c7 100644 --- a/Tests/RunCMake/SolutionGlobalSections/CMakeLists.txt +++ b/Tests/RunCMake/VSSolution/CMakeLists.txt diff --git a/Tests/RunCMake/SolutionGlobalSections/MorePost-check.cmake b/Tests/RunCMake/VSSolution/MorePost-check.cmake index 0f7e370..0f7e370 100644 --- a/Tests/RunCMake/SolutionGlobalSections/MorePost-check.cmake +++ b/Tests/RunCMake/VSSolution/MorePost-check.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/MorePost.cmake b/Tests/RunCMake/VSSolution/MorePost.cmake index 2eb3f60..2eb3f60 100644 --- a/Tests/RunCMake/SolutionGlobalSections/MorePost.cmake +++ b/Tests/RunCMake/VSSolution/MorePost.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/MorePre-check.cmake b/Tests/RunCMake/VSSolution/MorePre-check.cmake index 45e7419..45e7419 100644 --- a/Tests/RunCMake/SolutionGlobalSections/MorePre-check.cmake +++ b/Tests/RunCMake/VSSolution/MorePre-check.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/MorePre.cmake b/Tests/RunCMake/VSSolution/MorePre.cmake index 07f4eb8..07f4eb8 100644 --- a/Tests/RunCMake/SolutionGlobalSections/MorePre.cmake +++ b/Tests/RunCMake/VSSolution/MorePre.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/OnePost-check.cmake b/Tests/RunCMake/VSSolution/OnePost-check.cmake index 6af5156..6af5156 100644 --- a/Tests/RunCMake/SolutionGlobalSections/OnePost-check.cmake +++ b/Tests/RunCMake/VSSolution/OnePost-check.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/OnePost.cmake b/Tests/RunCMake/VSSolution/OnePost.cmake index 2295cfb..2295cfb 100644 --- a/Tests/RunCMake/SolutionGlobalSections/OnePost.cmake +++ b/Tests/RunCMake/VSSolution/OnePost.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/OnePre-check.cmake b/Tests/RunCMake/VSSolution/OnePre-check.cmake index 70b18b2..70b18b2 100644 --- a/Tests/RunCMake/SolutionGlobalSections/OnePre-check.cmake +++ b/Tests/RunCMake/VSSolution/OnePre-check.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/OnePre.cmake b/Tests/RunCMake/VSSolution/OnePre.cmake index 1499b47..1499b47 100644 --- a/Tests/RunCMake/SolutionGlobalSections/OnePre.cmake +++ b/Tests/RunCMake/VSSolution/OnePre.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/Override1-check.cmake b/Tests/RunCMake/VSSolution/Override1-check.cmake index a19e2e1..a19e2e1 100644 --- a/Tests/RunCMake/SolutionGlobalSections/Override1-check.cmake +++ b/Tests/RunCMake/VSSolution/Override1-check.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/Override1.cmake b/Tests/RunCMake/VSSolution/Override1.cmake index a726c9f..a726c9f 100644 --- a/Tests/RunCMake/SolutionGlobalSections/Override1.cmake +++ b/Tests/RunCMake/VSSolution/Override1.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/Override2-check.cmake b/Tests/RunCMake/VSSolution/Override2-check.cmake index d9656e1..d9656e1 100644 --- a/Tests/RunCMake/SolutionGlobalSections/Override2-check.cmake +++ b/Tests/RunCMake/VSSolution/Override2-check.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/Override2.cmake b/Tests/RunCMake/VSSolution/Override2.cmake index 0ce43cc..0ce43cc 100644 --- a/Tests/RunCMake/SolutionGlobalSections/Override2.cmake +++ b/Tests/RunCMake/VSSolution/Override2.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/PrePost-check.cmake b/Tests/RunCMake/VSSolution/PrePost-check.cmake index 322a689..322a689 100644 --- a/Tests/RunCMake/SolutionGlobalSections/PrePost-check.cmake +++ b/Tests/RunCMake/VSSolution/PrePost-check.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/PrePost.cmake b/Tests/RunCMake/VSSolution/PrePost.cmake index 976c341..976c341 100644 --- a/Tests/RunCMake/SolutionGlobalSections/PrePost.cmake +++ b/Tests/RunCMake/VSSolution/PrePost.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/RunCMakeTest.cmake b/Tests/RunCMake/VSSolution/RunCMakeTest.cmake index 6ae158d..6ae158d 100644 --- a/Tests/RunCMake/SolutionGlobalSections/RunCMakeTest.cmake +++ b/Tests/RunCMake/VSSolution/RunCMakeTest.cmake diff --git a/Tests/RunCMake/SolutionGlobalSections/solution_parsing.cmake b/Tests/RunCMake/VSSolution/solution_parsing.cmake index dd158ef..dd158ef 100644 --- a/Tests/RunCMake/SolutionGlobalSections/solution_parsing.cmake +++ b/Tests/RunCMake/VSSolution/solution_parsing.cmake diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 395c74b..b77d5d4 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -97,6 +97,7 @@ if(NOT XCODE_VERSION VERSION_LESS 7) endif() if(NOT XCODE_VERSION VERSION_LESS 6) + # XcodeIOSInstallCombined set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombined-build) set(RunCMake_TEST_NO_CLEAN 1) set(RunCMake_TEST_OPTIONS @@ -114,6 +115,7 @@ if(NOT XCODE_VERSION VERSION_LESS 6) unset(RunCMake_TEST_NO_CLEAN) unset(RunCMake_TEST_OPTIONS) + # XcodeIOSInstallCombinedPrune set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedPrune-build) set(RunCMake_TEST_NO_CLEAN 1) set(RunCMake_TEST_OPTIONS @@ -130,4 +132,22 @@ if(NOT XCODE_VERSION VERSION_LESS 6) unset(RunCMake_TEST_BINARY_DIR) unset(RunCMake_TEST_NO_CLEAN) unset(RunCMake_TEST_OPTIONS) + + # XcodeIOSInstallCombinedSingleArch + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedSingleArch-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(XcodeIOSInstallCombinedSingleArch) + run_cmake_command(XcodeIOSInstallCombinedSingleArch-build ${CMAKE_COMMAND} --build .) + run_cmake_command(XcodeIOSInstallCombinedSingleArch-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/XcodeIOSInstallCombinedSingleArch-install-check.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake new file mode 100644 index 0000000..3c11ae0 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake @@ -0,0 +1,25 @@ +function(verify_architecture file) + execute_process( + COMMAND xcrun lipo -info ${RunCMake_TEST_BINARY_DIR}/_install/${file} + OUTPUT_VARIABLE lipo_out + ERROR_VARIABLE lipo_err + RESULT_VARIABLE lipo_result) + if(NOT lipo_result EQUAL "0") + message(SEND_ERROR "lipo -info failed: ${lipo_err}") + return() + endif() + + string(REGEX MATCHALL "is architecture: [^ \n\t]+" architecture "${lipo_out}") + string(REGEX REPLACE "is architecture: " "" actual "${architecture}") + + set(expected armv7) + + if(NOT actual STREQUAL expected) + message(SEND_ERROR + "The actual library architecture:\n ${actual} \n" + "which do not match expected ones:\n ${expected} \n" + "lipo output:\n${lipo_out}") + endif() +endfunction() + +verify_architecture(lib/libfoo.dylib) diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake new file mode 100644 index 0000000..4b5e7ce --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.3) + +project(XcodeIOSInstallCombinedSingleArch 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) + +set_target_properties( + foo + PROPERTIES + XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] armv7 + XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] armv7 + XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "" + XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "" +) diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake index 403367b..f8844e9 100644 --- a/Utilities/Release/create-cmake-release.cmake +++ b/Utilities/Release/create-cmake-release.cmake @@ -6,14 +6,15 @@ endif() file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/logs) set(RELEASE_SCRIPTS_BATCH_1 - dash3win7_release.cmake # Windows - bigmac_release.cmake # OS X x86_64 - magrathea_release.cmake # Linux + win32_release.cmake # Windows x86 + osx_release.cmake # OS X x86_64 + linux32_release.cmake # Linux x86 linux64_release.cmake # Linux x86_64 ) set(RELEASE_SCRIPTS_BATCH_2 - dash2win64_cygwin.cmake # Cygwin + cygwin_release.cmake # Cygwin x86 + win64_release.cmake # Windows x64 ) function(write_batch_shell_script filename) diff --git a/Utilities/Release/dash2win64_cygwin.cmake b/Utilities/Release/cygwin_release.cmake index ca590ed..ca3e794 100644 --- a/Utilities/Release/dash2win64_cygwin.cmake +++ b/Utilities/Release/cygwin_release.cmake @@ -17,7 +17,6 @@ CMake_INSTALL_DEPENDENCIES:BOOL=ON ") set(CXX g++) set(CC gcc) -set(SCRIPT_NAME dash2win64cygwin) set(GIT_EXTRA "git config core.autocrlf false") get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) diff --git a/Utilities/Release/magrathea_release.cmake b/Utilities/Release/linux32_release.cmake index 00abcc1..00abcc1 100644 --- a/Utilities/Release/magrathea_release.cmake +++ b/Utilities/Release/linux32_release.cmake diff --git a/Utilities/Release/bigmac_release.cmake b/Utilities/Release/osx_release.cmake index 568a98c..568a98c 100644 --- a/Utilities/Release/bigmac_release.cmake +++ b/Utilities/Release/osx_release.cmake diff --git a/Utilities/Release/dash3win7_release.cmake b/Utilities/Release/win32_release.cmake index f25d638..1d3ec86 100644 --- a/Utilities/Release/dash3win7_release.cmake +++ b/Utilities/Release/win32_release.cmake @@ -25,4 +25,8 @@ set(CXXFLAGS "${ppflags}") set(ENV ". ~/rel/env") get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) set(GIT_EXTRA "git config core.autocrlf true") +if(CMAKE_CREATE_VERSION STREQUAL "nightly") + # Some tests fail spuriously too often. + set(EXTRA_CTEST_ARGS "-E Qt5Autogen") +endif() include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/win64_release.cmake b/Utilities/Release/win64_release.cmake new file mode 100644 index 0000000..cc1f37f --- /dev/null +++ b/Utilities/Release/win64_release.cmake @@ -0,0 +1,29 @@ +set(CMAKE_RELEASE_DIRECTORY "c:/msys64/home/dashboard/CMakeReleaseDirectory64") +set(CONFIGURE_WITH_CMAKE TRUE) +set(CMAKE_CONFIGURE_PATH "c:/Program\\ Files\\ \\(x86\\)/CMake/bin/cmake.exe") +set(PROCESSORS 8) +set(HOST dash3win7) +set(SCRIPT_NAME dash3win7x64) +set(RUN_LAUNCHER ~/rel/run) +set(CPACK_BINARY_GENERATORS "WIX ZIP") +set(CPACK_SOURCE_GENERATORS "") +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=Ninja +BUILD_QtDialog:BOOL:=TRUE +CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE +CMake_INSTALL_DEPENDENCIES:BOOL=ON +CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x64 -subsystem:console,5.02 +") +set(ppflags "-D_WIN32_WINNT=0x502 -D_USING_V110_SDK71_") +set(CFLAGS "${ppflags}") +set(CXXFLAGS "${ppflags}") +set(ENV ". ~/rel/env64") +get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) +set(GIT_EXTRA "git config core.autocrlf true") +include(${path}/release_cmake.cmake) |