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 b74962d8989428c3f94b602662f9dcdd1f4e5cfd (commit) via edfeeba34785599fdce39a16bc65cc2023a0cd90 (commit) via 9d1bc0a918d0e3b97a3669e11d0d6ce6710af3b0 (commit) via a08154d493a08f1fc1473038f897eb5468a8f79b (commit) via 59b3e78451a1b19b95f7cb40fbd19454ace7f483 (commit) via 6a9fe250a7a56f98d6af081ca172cfc28d127206 (commit) via cb694f8cd65dfb4e73fedcfa04f92c8be7a2bcf6 (commit) from f6b20179aa21ee6997879d3d0fb3288e79a4b58f (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=b74962d8989428c3f94b602662f9dcdd1f4e5cfd commit b74962d8989428c3f94b602662f9dcdd1f4e5cfd Merge: edfeeba cb694f8 Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Jul 6 13:43:17 2018 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Fri Jul 6 09:43:23 2018 -0400 Merge topic 'vsnasm-quoting' cb694f8cd6 VS: Properly quote arguments in nasm.xml Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !2179 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=edfeeba34785599fdce39a16bc65cc2023a0cd90 commit edfeeba34785599fdce39a16bc65cc2023a0cd90 Merge: 9d1bc0a 59b3e78 Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Jul 6 13:42:25 2018 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Fri Jul 6 09:42:31 2018 -0400 Merge topic 'FindCURL-per-config' 59b3e78451 FindCURL: Find debug and release variants separately 6a9fe250a7 FindCURL: Improve CURL::libcurl property code layout Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !1940 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9d1bc0a918d0e3b97a3669e11d0d6ce6710af3b0 commit 9d1bc0a918d0e3b97a3669e11d0d6ce6710af3b0 Merge: f6b2017 a08154d Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Jul 6 13:41:18 2018 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Fri Jul 6 09:41:24 2018 -0400 Merge topic 'list-command-insert' a08154d493 list: Allow inserting at the end of a list Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !2181 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a08154d493a08f1fc1473038f897eb5468a8f79b commit a08154d493a08f1fc1473038f897eb5468a8f79b Author: Daniel Chabrowski <dantezstu...@gmail.com> AuthorDate: Sun Jul 1 18:30:21 2018 +0200 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Jul 5 13:53:49 2018 -0400 list: Allow inserting at the end of a list Fixes: #18069 diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index ba0c843..d7de2fa 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -289,12 +289,10 @@ bool cmListCommand::HandleInsertCommand(std::vector<std::string> const& args) if (item < 0) { item = static_cast<int>(nitem) + item; } - if (item < 0 || nitem <= static_cast<size_t>(item)) { + if (item < 0 || nitem < static_cast<size_t>(item)) { std::ostringstream str; str << "index: " << item << " out of range (-" << varArgsExpanded.size() - << ", " - << (varArgsExpanded.empty() ? 0 : (varArgsExpanded.size() - 1)) - << ")"; + << ", " << varArgsExpanded.size() << ")"; this->SetError(str.str()); return false; } diff --git a/Tests/CMakeTests/ListTest.cmake.in b/Tests/CMakeTests/ListTest.cmake.in index 76f5e4f..f517e64 100644 --- a/Tests/CMakeTests/ListTest.cmake.in +++ b/Tests/CMakeTests/ListTest.cmake.in @@ -53,6 +53,10 @@ set(result andy brad) list(INSERT result -1 bill ken) TEST("INSERT result -1 bill ken" "andy;bill;ken;brad") +set(result andy brad) +list(INSERT result 2 bill ken) +TEST("INSERT result 2 bill ken" "andy;brad;bill;ken") + set(result andy bill brad ken bob) list(REMOVE_ITEM result bob) TEST("REMOVE_ITEM result bob" "andy;bill;brad;ken") diff --git a/Tests/RunCMake/list/INSERT-InvalidIndex-stderr.txt b/Tests/RunCMake/list/INSERT-InvalidIndex-stderr.txt index 6e15c0b..9b9c5e0 100644 --- a/Tests/RunCMake/list/INSERT-InvalidIndex-stderr.txt +++ b/Tests/RunCMake/list/INSERT-InvalidIndex-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at INSERT-InvalidIndex.cmake:2 \(list\): - list index: 3 out of range \(-3, 2\) + list index: 4 out of range \(-3, 3\) Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/INSERT-InvalidIndex.cmake b/Tests/RunCMake/list/INSERT-InvalidIndex.cmake index 4103d97..12ac114 100644 --- a/Tests/RunCMake/list/INSERT-InvalidIndex.cmake +++ b/Tests/RunCMake/list/INSERT-InvalidIndex.cmake @@ -1,2 +1,2 @@ set(mylist alpha bravo charlie) -list(INSERT mylist 3 delta) +list(INSERT mylist 4 delta) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=59b3e78451a1b19b95f7cb40fbd19454ace7f483 commit 59b3e78451a1b19b95f7cb40fbd19454ace7f483 Author: Hiroshi Miura <miur...@linux.com> AuthorDate: Thu Jun 28 02:02:54 2018 +0900 Commit: Brad King <brad.k...@kitware.com> CommitDate: Tue Jul 3 13:40:49 2018 -0400 FindCURL: Find debug and release variants separately Fixes: #17887 diff --git a/Help/release/dev/FindCURL-per-config.rst b/Help/release/dev/FindCURL-per-config.rst new file mode 100644 index 0000000..5ba1425 --- /dev/null +++ b/Help/release/dev/FindCURL-per-config.rst @@ -0,0 +1,5 @@ +FindCURL-per-config +------------------- + +* The :module:`FindCURL` module learned to find debug and release variants + separately. diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake index 0bd47f7..60ddf7b 100644 --- a/Modules/FindCURL.cmake +++ b/Modules/FindCURL.cmake @@ -34,17 +34,29 @@ find_path(CURL_INCLUDE_DIR NAMES curl/curl.h) mark_as_advanced(CURL_INCLUDE_DIR) -# Look for the library (sorted from most current/relevant entry to least). -find_library(CURL_LIBRARY NAMES - curl - # Windows MSVC prebuilts: - curllib - libcurl_imp - curllib_static - # Windows older "Win32 - MSVC" prebuilts (libcurl.lib, e.g. libcurl-7.15.5-win32-msvc.zip): - libcurl -) -mark_as_advanced(CURL_LIBRARY) +if(NOT CURL_LIBRARY) + # Look for the library (sorted from most current/relevant entry to least). + find_library(CURL_LIBRARY_RELEASE NAMES + curl + # Windows MSVC prebuilts: + curllib + libcurl_imp + curllib_static + # Windows older "Win32 - MSVC" prebuilts (libcurl.lib, e.g. libcurl-7.15.5-win32-msvc.zip): + libcurl + ) + mark_as_advanced(CURL_LIBRARY_RELEASE) + + find_library(CURL_LIBRARY_DEBUG NAMES + # Windows MSVC CMake builds in debug configuration on vcpkg: + libcurl-d_imp + libcurl-d + ) + mark_as_advanced(CURL_LIBRARY_DEBUG) + + include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + select_library_configurations(CURL) +endif() if(CURL_INCLUDE_DIR) foreach(_curl_version_header curlver.h curl.h) @@ -71,7 +83,25 @@ if(CURL_FOUND) add_library(CURL::libcurl UNKNOWN IMPORTED) set_target_properties(CURL::libcurl PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIRS}") - set_property(TARGET CURL::libcurl PROPERTY - IMPORTED_LOCATION "${CURL_LIBRARY}") + + if(EXISTS "${CURL_LIBRARY}") + set_target_properties(CURL::libcurl PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${CURL_LIBRARY}") + endif() + if(CURL_LIBRARY_RELEASE) + set_property(TARGET CURL::libcurl APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(CURL::libcurl PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION_RELEASE "${CURL_LIBRARY_RELEASE}") + endif() + if(CURL_LIBRARY_DEBUG) + set_property(TARGET CURL::libcurl APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(CURL::libcurl PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION_DEBUG "${CURL_LIBRARY_DEBUG}") + endif() endif() endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a9fe250a7a56f98d6af081ca172cfc28d127206 commit 6a9fe250a7a56f98d6af081ca172cfc28d127206 Author: Hiroshi Miura <miur...@linux.com> AuthorDate: Thu Jun 28 02:02:54 2018 +0900 Commit: Brad King <brad.k...@kitware.com> CommitDate: Tue Jul 3 13:31:48 2018 -0400 FindCURL: Improve CURL::libcurl property code layout diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake index a549765..0bd47f7 100644 --- a/Modules/FindCURL.cmake +++ b/Modules/FindCURL.cmake @@ -69,7 +69,9 @@ if(CURL_FOUND) if(NOT TARGET CURL::libcurl) add_library(CURL::libcurl UNKNOWN IMPORTED) - set_target_properties(CURL::libcurl PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIRS}") - set_property(TARGET CURL::libcurl APPEND PROPERTY IMPORTED_LOCATION "${CURL_LIBRARY}") + set_target_properties(CURL::libcurl PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIRS}") + set_property(TARGET CURL::libcurl PROPERTY + IMPORTED_LOCATION "${CURL_LIBRARY}") endif() endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cb694f8cd65dfb4e73fedcfa04f92c8be7a2bcf6 commit cb694f8cd65dfb4e73fedcfa04f92c8be7a2bcf6 Author: David Benjamin <david...@google.com> AuthorDate: Fri Jun 29 15:54:42 2018 -0400 Commit: David Benjamin <david...@google.com> CommitDate: Mon Jul 2 18:50:12 2018 -0400 VS: Properly quote arguments in nasm.xml Most arguments were quoted, but some weren't, causing problems if the arguments contained whitespace. In particular, the _STL_EXTRA_DISABLED_WARNINGS value takes spaces and CMake's NASM support applies all add_definitions lines to NASM. The -D flag is missing quotes, so projects using NASM and setting _STL_EXTRA_DISABLED_WARNINGS break in the Visual Studio generator. Likewise, the -o flag is missing quotes, which means filenames with spaces do not work. (The -U flag is unlikely to need quotes, but include them for consistency.) Extend the existing VSNASM test to cover these cases. diff --git a/Templates/MSBuild/nasm.xml b/Templates/MSBuild/nasm.xml index 92f8548..a5dcdd5 100644 --- a/Templates/MSBuild/nasm.xml +++ b/Templates/MSBuild/nasm.xml @@ -36,7 +36,7 @@ <DataSource Persistence="ProjectFile" ItemType="NASM" SourceType="Item"/> </StringProperty.DataSource> </StringProperty> - <StringProperty Name="OutputFormat" Category="Assembler Options" HelpUrl="http://www.nasm.us/doc/" DisplayName="Output File Name" Description="Specify Output Filename.-o [value]" Switch="-o [value]"/> + <StringProperty Name="OutputFormat" Category="Assembler Options" HelpUrl="http://www.nasm.us/doc/" DisplayName="Output File Name" Description="Specify Output Filename.-o [value]" Switch="-o "[value]""/> <BoolProperty Name="tasmmode" Category="Advanced" HelpUrl="http://www.nasm.us/doc/" DisplayName="SciTech TASM compatible mode" Description="assemble in SciTech TASM compatible mode" Switch="-t"/> <EnumProperty Name="Outputswitch" Category="Assembler Options" HelpUrl="http://www.nasm.us/doc/" DisplayName="Output Switch" Description="Select the type of output format required. Linking Should be disabled for ELF and Binary ,else error will popup"> <EnumValue Name="0" DisplayName="Object File win32" Switch="-fwin32"/> @@ -48,8 +48,8 @@ <BoolProperty Name="GenerateDebugInformation" Category="Assembler Options" DisplayName="Generate Debug Information" Description="Generates Debug Information. (-g)" HelpUrl="http://www.nasm.us/doc/" Switch="-g"/> <StringListProperty Name="ErrorReporting" Category="Advanced" HelpUrl="http://www.nasm.us/doc/" DisplayName="Redirect Error Messages to File" Description="Drops the error Message on specified device" Switch="-Z "[value]""/> <StringListProperty Name="IncludePaths" Category="General" DisplayName="Include Paths" Description="Sets path for include file. (-I[path])" HelpUrl="http://www.nasm.us/doc/" Switch="-I"[value]""/> - <StringListProperty Name="PreprocessorDefinitions" Category="Preprocessor" HelpUrl="http://www.nasm.us/doc/" DisplayName="Preprocessor Definitions" Description="Defines a text macro with the given name. (-D[symbol])" Switch="-D[value]"/> - <StringListProperty Name="UndefinePreprocessorDefinitions" Category="Preprocessor" HelpUrl="http://www.nasm.us/doc/" DisplayName="Undefine Preprocessor Definitions" Description="Undefines a text macro with the given name. (-U[symbol])" Switch="-U[value]"/> + <StringListProperty Name="PreprocessorDefinitions" Category="Preprocessor" HelpUrl="http://www.nasm.us/doc/" DisplayName="Preprocessor Definitions" Description="Defines a text macro with the given name. (-D[symbol])" Switch="-D"[value]""/> + <StringListProperty Name="UndefinePreprocessorDefinitions" Category="Preprocessor" HelpUrl="http://www.nasm.us/doc/" DisplayName="Undefine Preprocessor Definitions" Description="Undefines a text macro with the given name. (-U[symbol])" Switch="-U"[value]""/> <EnumProperty Name="ErrorReportingFormat" Category="Advanced" HelpUrl="http://www.nasm.us/doc/" DisplayName="Error Reporting Format" Description="Select the error reporting format ie. GNU or VC"> <EnumValue Name="0" DisplayName="-Xgnu GNU format: Default format" Switch="-Xgnu"/> <EnumValue Name="1" DisplayName="-Xvc Style used by Microsoft Visual C++" Switch="-Xvc"/> diff --git a/Tests/VSNASM/CMakeLists.txt b/Tests/VSNASM/CMakeLists.txt index c2e29df..821d022 100644 --- a/Tests/VSNASM/CMakeLists.txt +++ b/Tests/VSNASM/CMakeLists.txt @@ -1,10 +1,20 @@ cmake_minimum_required(VERSION 2.8.12) project(VSNASM C ASM_NASM) + if(CMAKE_SIZEOF_VOID_P EQUAL 8) add_definitions(-DTESTx64) string(APPEND CMAKE_ASM_NASM_FLAGS " -DTEST2x64") else() add_definitions(-DTESTi386) endif() + +# Test quoting for definitions with spaces. +add_definitions("-DEAX_COMMA_SPACE_ZERO=eax, 0") + +# Test quoting for file names with spaces. The file is generated because CMake +# itself cannot have files with spaces. +file(READ bar.asm BAR_ASM_CONTENTS) +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/bar baz.asm" "${BAR_ASM_CONTENTS}") + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) -add_executable(VSNASM main.c foo.asm) +add_executable(VSNASM main.c foo.asm "${CMAKE_CURRENT_BINARY_DIR}/bar baz.asm") diff --git a/Tests/VSNASM/bar.asm b/Tests/VSNASM/bar.asm new file mode 100644 index 0000000..b486d82 --- /dev/null +++ b/Tests/VSNASM/bar.asm @@ -0,0 +1,13 @@ +section .text +%ifdef TEST2x64 +global bar +%else +global _bar +%endif +%ifdef TESTx64 +bar: +%else +_bar: +%endif + mov EAX_COMMA_SPACE_ZERO + ret diff --git a/Tests/VSNASM/include/foo-proc.asm b/Tests/VSNASM/include/foo-proc.asm index 450a791..eb5bb2b 100644 --- a/Tests/VSNASM/include/foo-proc.asm +++ b/Tests/VSNASM/include/foo-proc.asm @@ -3,5 +3,5 @@ foo: %else _foo: %endif - mov eax, 0 + mov EAX_COMMA_SPACE_ZERO ret diff --git a/Tests/VSNASM/main.c b/Tests/VSNASM/main.c index 18ddb78..b1401b6 100644 --- a/Tests/VSNASM/main.c +++ b/Tests/VSNASM/main.c @@ -1,5 +1,6 @@ extern int foo(void); +extern int bar(void); int main(void) { - return foo(); + return foo() + bar(); } ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindCURL-per-config.rst | 5 ++ Modules/FindCURL.cmake | 58 +++++++++++++++++----- Source/cmListCommand.cxx | 6 +-- Templates/MSBuild/nasm.xml | 6 +-- Tests/CMakeTests/ListTest.cmake.in | 4 ++ Tests/RunCMake/list/INSERT-InvalidIndex-stderr.txt | 2 +- Tests/RunCMake/list/INSERT-InvalidIndex.cmake | 2 +- Tests/VSNASM/CMakeLists.txt | 12 ++++- Tests/VSNASM/bar.asm | 13 +++++ Tests/VSNASM/include/foo-proc.asm | 2 +- Tests/VSNASM/main.c | 3 +- 11 files changed, 88 insertions(+), 25 deletions(-) create mode 100644 Help/release/dev/FindCURL-per-config.rst create mode 100644 Tests/VSNASM/bar.asm hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits