This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, master has been updated via 947b02e2e0d0a7d9c8155b50ac79b56818f4b6f6 (commit) via a023a2e4fe289dedd42a883464c9f7514ac0d0e9 (commit) via 27928290acc81971fbaf5cac04f9667ba39d72d8 (commit) via 12368e6d15c4fd7a682aad8127fb4168971d0013 (commit) via 9c9e66289acc7f54dfdb518a92b625f5a34c7c2d (commit) via 3ded5b6da8cb10d855e36d4ea534222ba870d165 (commit) from 52891c816d167a417961f5a7dbb1c2f0636969ab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=947b02e2e0d0a7d9c8155b50ac79b56818f4b6f6 commit 947b02e2e0d0a7d9c8155b50ac79b56818f4b6f6 Merge: a023a2e 3ded5b6 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Oct 7 14:34:41 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Mon Oct 7 10:34:50 2019 -0400 Merge topic 'export-genex-under-prefix' 3ded5b6da8 install,export: Fix export of a genex following $<INSTALL_PREFIX> Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3886 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a023a2e4fe289dedd42a883464c9f7514ac0d0e9 commit a023a2e4fe289dedd42a883464c9f7514ac0d0e9 Merge: 2792829 9c9e662 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Oct 7 14:33:41 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Mon Oct 7 10:33:50 2019 -0400 Merge topic 'test-per-config-sources' 9c9e66289a Tests: Enable ConfigSources test on every configuration Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3888 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27928290acc81971fbaf5cac04f9667ba39d72d8 commit 27928290acc81971fbaf5cac04f9667ba39d72d8 Merge: 52891c8 12368e6 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Oct 7 14:31:52 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Mon Oct 7 10:32:03 2019 -0400 Merge topic 'doc-install-strip' 12368e6d15 Help: Document install/strip targets for Ninja/UNIX Makefiles generators Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3887 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12368e6d15c4fd7a682aad8127fb4168971d0013 commit 12368e6d15c4fd7a682aad8127fb4168971d0013 Author: Cristian Adam <cristian.a...@gmail.com> AuthorDate: Fri Oct 4 16:40:54 2019 +0200 Commit: Cristian Adam <cristian.a...@gmail.com> CommitDate: Fri Oct 4 17:00:18 2019 +0200 Help: Document install/strip targets for Ninja/UNIX Makefiles generators diff --git a/Help/generator/Ninja.rst b/Help/generator/Ninja.rst index 51ef49b..c75d2c4 100644 --- a/Help/generator/Ninja.rst +++ b/Help/generator/Ninja.rst @@ -3,9 +3,9 @@ Ninja 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. +A ``build.ninja`` file is generated into the build tree. Use the ninja +program to build the project through the ``all`` target and install the +project through the ``install`` (or ``install/strip``) target. For each subdirectory ``sub/dir`` of the project, additional targets are generated: @@ -16,6 +16,13 @@ are generated: ``sub/dir/install`` Runs the install step in the subdirectory, if any. +``sub/dir/install/strip`` + Runs the install step in the subdirectory followed by a ``CMAKE_STRIP`` command, + if any. + + The ``CMAKE_STRIP`` variable will contain the platform's ``strip`` utility, which + removes symbols information from generated binaries. + ``sub/dir/test`` Runs the test step in the subdirectory, if any. diff --git a/Help/generator/Unix Makefiles.rst b/Help/generator/Unix Makefiles.rst index 1e65ee1..dfe4ecb 100644 --- a/Help/generator/Unix Makefiles.rst +++ b/Help/generator/Unix Makefiles.rst @@ -3,6 +3,29 @@ Unix Makefiles Generates standard UNIX makefiles. -A hierarchy of UNIX makefiles is generated into the build tree. Any -standard UNIX-style make program can build the project through the -default ``all`` target. An ``install`` target is also provided. +A hierarchy of UNIX makefiles is generated into the build tree. Use +any standard UNIX-style make program to build the project through +the ``all`` target and install the project through the ``install`` +(or ``install/strip``) target. + +For each subdirectory ``sub/dir`` of the project a UNIX makefile will +be created, containing the following targets: + +``all`` + Depends on all targets required by the subdirectory. + +``install`` + Runs the install step in the subdirectory, if any. + +``install/strip`` + Runs the install step in the subdirectory followed by a ``CMAKE_STRIP`` command, + if any. + + The ``CMAKE_STRIP`` variable will contain the platform's ``strip`` utility, which + removes symbols information from generated binaries. + +``test`` + Runs the test step in the subdirectory, if any. + +``package`` + Runs the package step in the subdirectory, if any. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c9e66289acc7f54dfdb518a92b625f5a34c7c2d commit 9c9e66289acc7f54dfdb518a92b625f5a34c7c2d Author: Brad King <brad.k...@kitware.com> AuthorDate: Wed Oct 2 14:31:05 2019 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Oct 4 10:39:00 2019 -0400 Tests: Enable ConfigSources test on every configuration Revise the test itself to work in all configurations and verify that certain sources are only built by whatever configuration is tested. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index ed20b91..32b580b 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -451,8 +451,8 @@ if(BUILD_TESTING) ADD_TEST_MACRO(StagingPrefix StagingPrefix) ADD_TEST_MACRO(ImportedSameName ImportedSameName) ADD_TEST_MACRO(InterfaceLibrary InterfaceLibrary) - if (CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]") - set(ConfigSources_BUILD_OPTIONS -DCMAKE_BUILD_TYPE=Debug) + if(NOT _isMultiConfig) + set(ConfigSources_BUILD_OPTIONS -DCMAKE_BUILD_TYPE=$<CONFIGURATION>) ADD_TEST_MACRO(ConfigSources ConfigSources) endif() ADD_TEST_MACRO(SourcesProperty SourcesProperty) diff --git a/Tests/ConfigSources/CMakeLists.txt b/Tests/ConfigSources/CMakeLists.txt index 748aad8..f5dd276 100644 --- a/Tests/ConfigSources/CMakeLists.txt +++ b/Tests/ConfigSources/CMakeLists.txt @@ -1,17 +1,21 @@ - cmake_minimum_required(VERSION 3.0) - -project(ConfigSources) +project(ConfigSources CXX) add_library(iface INTERFACE) -set_property(TARGET iface PROPERTY INTERFACE_SOURCES +target_sources(iface INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/iface_src.cpp" "$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/iface_debug_src.cpp>" - "$<$<CONFIG:Release>:${CMAKE_CURRENT_SOURCE_DIR}/does_not_exist.cpp>" -) + "$<$<NOT:$<CONFIG:Debug>>:${CMAKE_CURRENT_SOURCE_DIR}/iface_other_src.cpp>" + "$<$<CONFIG:NotAConfig>:${CMAKE_CURRENT_SOURCE_DIR}/does_not_exist.cpp>" + ) +target_compile_definitions(iface INTERFACE + "$<$<CONFIG:Debug>:CFG_DEBUG>" + "$<$<NOT:$<CONFIG:Debug>>:CFG_OTHER>" + ) add_executable(ConfigSources - $<$<CONFIG:Debug>:main.cpp> - $<$<CONFIG:Release>:does_not_exist.cpp> -) + $<$<CONFIG:Debug>:main_debug.cpp> + $<$<NOT:$<CONFIG:Debug>>:main_other.cpp> + $<$<CONFIG:NotAConfig>:does_not_exist.cpp> + ) target_link_libraries(ConfigSources iface) diff --git a/Tests/ConfigSources/iface.h b/Tests/ConfigSources/iface.h new file mode 100644 index 0000000..810456c --- /dev/null +++ b/Tests/ConfigSources/iface.h @@ -0,0 +1,10 @@ + +int iface_src(); + +#ifdef CFG_DEBUG +int iface_debug(); +#endif + +#ifdef CFG_OTHER +int iface_other(); +#endif diff --git a/Tests/ConfigSources/iface_debug.h b/Tests/ConfigSources/iface_debug.h deleted file mode 100644 index a23d737..0000000 --- a/Tests/ConfigSources/iface_debug.h +++ /dev/null @@ -1,4 +0,0 @@ - -int iface_src(); - -int iface_debug(); diff --git a/Tests/ConfigSources/iface_debug_src.cpp b/Tests/ConfigSources/iface_debug_src.cpp index 63b22fc..010059f 100644 --- a/Tests/ConfigSources/iface_debug_src.cpp +++ b/Tests/ConfigSources/iface_debug_src.cpp @@ -1,5 +1,11 @@ +#ifndef CFG_DEBUG +# error "This source should only be compiled in a Debug configuration." +#endif +#ifdef CFG_OTHER +# error "This source should not be compiled in a non-Debug configuration." +#endif -#include "iface_debug.h" +#include "iface.h" int iface_debug() { diff --git a/Tests/ConfigSources/iface_other_src.cpp b/Tests/ConfigSources/iface_other_src.cpp new file mode 100644 index 0000000..8ffdfbb --- /dev/null +++ b/Tests/ConfigSources/iface_other_src.cpp @@ -0,0 +1,13 @@ +#ifndef CFG_OTHER +# error "This source should only be compiled in a non-Debug configuration." +#endif +#ifdef CFG_DEBUG +# error "This source should not be compiled in a Debug configuration." +#endif + +#include "iface.h" + +int iface_other() +{ + return 0; +} diff --git a/Tests/ConfigSources/main.cpp b/Tests/ConfigSources/main.cpp deleted file mode 100644 index 71af72f..0000000 --- a/Tests/ConfigSources/main.cpp +++ /dev/null @@ -1,7 +0,0 @@ - -#include "iface_debug.h" - -int main(int argc, char** argv) -{ - return iface_src() + iface_debug(); -} diff --git a/Tests/ConfigSources/main_debug.cpp b/Tests/ConfigSources/main_debug.cpp new file mode 100644 index 0000000..9b1e68a --- /dev/null +++ b/Tests/ConfigSources/main_debug.cpp @@ -0,0 +1,13 @@ +#ifndef CFG_DEBUG +# error "This source should only be compiled in a Debug configuration." +#endif +#ifdef CFG_OTHER +# error "This source should not be compiled in a non-Debug configuration." +#endif + +#include "iface.h" + +int main(int argc, char** argv) +{ + return iface_src() + iface_debug(); +} diff --git a/Tests/ConfigSources/main_other.cpp b/Tests/ConfigSources/main_other.cpp new file mode 100644 index 0000000..3184a19 --- /dev/null +++ b/Tests/ConfigSources/main_other.cpp @@ -0,0 +1,13 @@ +#ifndef CFG_OTHER +# error "This source should only be compiled in a non-Debug configuration." +#endif +#ifdef CFG_DEBUG +# error "This source should not be compiled in a Debug configuration." +#endif + +#include "iface.h" + +int main(int argc, char** argv) +{ + return iface_src() + iface_other(); +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3ded5b6da8cb10d855e36d4ea534222ba870d165 commit 3ded5b6da8cb10d855e36d4ea534222ba870d165 Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Oct 4 09:23:13 2019 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Oct 4 09:53:22 2019 -0400 install,export: Fix export of a genex following $<INSTALL_PREFIX> The relative path check added by commit 5838aba1aa (Export: Report error on relative include with genex., 2013-11-26, v3.0.0-rc1~285^2) was added one condition too early. If the value starts in `${_IMPORT_PREFIX}` (which comes from `$<INSTALL_PREFIX>`) then it is an absolute path. Fixes: #19791 diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index b968537..3d7eccc 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -216,6 +216,9 @@ static bool checkInterfaceDirs(const std::string& prepro, if (genexPos == 0) { continue; } + if (cmHasLiteralPrefix(li, "${_IMPORT_PREFIX}")) { + continue; + } MessageType messageType = MessageType::FATAL_ERROR; std::ostringstream e; if (genexPos != std::string::npos) { @@ -237,9 +240,6 @@ static bool checkInterfaceDirs(const std::string& prepro, hadFatalError = true; } } - if (cmHasLiteralPrefix(li, "${_IMPORT_PREFIX}")) { - continue; - } if (!cmSystemTools::FileIsFullPath(li)) { /* clang-format off */ e << "Target \"" << target->GetName() << "\" " << prop << diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index c6b7dbc..5cf04e8 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -313,6 +313,8 @@ install(FILES ) cmake_policy(POP) +cmake_policy(PUSH) +cmake_policy(SET CMP0041 NEW) add_library(testSharedLibDepends SHARED testSharedLibDepends.cpp) set_property(TARGET testSharedLibDepends APPEND PROPERTY INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}" @@ -329,9 +331,10 @@ install(FILES DESTINATION include/testSharedLibDepends ) set_property(TARGET testSharedLibDepends APPEND PROPERTY - INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/testSharedLibDepends>" + INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/$<1:include>/testSharedLibDepends>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>" ) +cmake_policy(POP) # LINK_PRIVATE because the LINK_INTERFACE_LIBRARIES is specified above. target_link_libraries(testSharedLibDepends LINK_PRIVATE testSharedLibRequired) ----------------------------------------------------------------------- Summary of changes: Help/generator/Ninja.rst | 13 ++++++++++--- Help/generator/Unix Makefiles.rst | 29 ++++++++++++++++++++++++++--- Source/cmExportFileGenerator.cxx | 6 +++--- Tests/CMakeLists.txt | 4 ++-- Tests/ConfigSources/CMakeLists.txt | 22 +++++++++++++--------- Tests/ConfigSources/iface.h | 10 ++++++++++ Tests/ConfigSources/iface_debug.h | 4 ---- Tests/ConfigSources/iface_debug_src.cpp | 8 +++++++- Tests/ConfigSources/iface_other_src.cpp | 13 +++++++++++++ Tests/ConfigSources/main.cpp | 7 ------- Tests/ConfigSources/main_debug.cpp | 13 +++++++++++++ Tests/ConfigSources/main_other.cpp | 13 +++++++++++++ Tests/ExportImport/Export/CMakeLists.txt | 5 ++++- 13 files changed, 114 insertions(+), 33 deletions(-) create mode 100644 Tests/ConfigSources/iface.h delete mode 100644 Tests/ConfigSources/iface_debug.h create mode 100644 Tests/ConfigSources/iface_other_src.cpp delete mode 100644 Tests/ConfigSources/main.cpp create mode 100644 Tests/ConfigSources/main_debug.cpp create mode 100644 Tests/ConfigSources/main_other.cpp hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits