[Cmake-commits] CMake branch, master, updated. v3.8.1-1118-gd43eb3a
Kitware Robot
kwrobot at kitware.com
Wed May 10 09:35:03 EDT 2017
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 d43eb3aec2419284c8491b0f8334ca47d0a6e334 (commit)
via 882ef5f33f75b5315fe471a1b58a8c07c2b57dec (commit)
via 8c2a3691054d16d070abdf3be8f8b61cfa2170f8 (commit)
via 07e30f082c73fe9fbeadafb97ca479e03f46c9bb (commit)
via 32400110fe7ea1b624d19625b5ae606f5f47814d (commit)
via 776929b3c46ef593fc70cf792e0f4e99d6bc88b9 (commit)
via 9b541aaeaa16204c3bf158fa88244c9b8d3d7d80 (commit)
via 80ca9ac84b2a6b24e40306a9f8afedfe67511d30 (commit)
via ec5c6bc9bc9bd4e53f511f18cb2da569ea6508e2 (commit)
from 8a19ce47679580445a5ae291ecfbb3e88c8c6aeb (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=d43eb3aec2419284c8491b0f8334ca47d0a6e334
commit d43eb3aec2419284c8491b0f8334ca47d0a6e334
Merge: 882ef5f 776929b
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed May 10 13:27:04 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed May 10 09:27:10 2017 -0400
Merge topic 'vs-project-guid'
776929b3 VS: Fix .vcxproj ProjectGuid element case
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !817
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=882ef5f33f75b5315fe471a1b58a8c07c2b57dec
commit 882ef5f33f75b5315fe471a1b58a8c07c2b57dec
Merge: 8c2a369 9b541aa
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed May 10 13:26:05 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed May 10 09:26:10 2017 -0400
Merge topic 'test-lang-fix'
9b541aae TestFindOpenMP,MPI: Disable default languages
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !816
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c2a3691054d16d070abdf3be8f8b61cfa2170f8
commit 8c2a3691054d16d070abdf3be8f8b61cfa2170f8
Merge: 07e30f0 80ca9ac
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed May 10 13:25:43 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed May 10 09:25:47 2017 -0400
Merge topic 'findopenmp-new-search'
80ca9ac8 FindOpenMP: Cache compilation results
ec5c6bc9 FindOpenMP: Refine list of flags to try
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !815
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07e30f082c73fe9fbeadafb97ca479e03f46c9bb
commit 07e30f082c73fe9fbeadafb97ca479e03f46c9bb
Merge: 8a19ce4 3240011
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed May 10 13:25:03 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed May 10 09:25:07 2017 -0400
Merge topic 'doc-HEADER_FILE_ONLY-use-case'
32400110 Help: Document HEADER_FILE_ONLY use case
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !812
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=32400110fe7ea1b624d19625b5ae606f5f47814d
commit 32400110fe7ea1b624d19625b5ae606f5f47814d
Author: Roman Lebedev <lebedev.ri at gmail.com>
AuthorDate: Sun May 7 18:21:32 2017 +0300
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue May 9 11:46:29 2017 -0400
Help: Document HEADER_FILE_ONLY use case
Describe how to get sources into IDE project files.
diff --git a/Help/command/add_executable.rst b/Help/command/add_executable.rst
index 19ca658..c088796 100644
--- a/Help/command/add_executable.rst
+++ b/Help/command/add_executable.rst
@@ -40,6 +40,9 @@ the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
+See also :prop_sf:`HEADER_FILE_ONLY` on what to do if some sources are
+pre-processed, and you want to have the original sources reachable from
+within IDE.
--------------------------------------------------------------------------
diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst
index 3a76040..02788e3 100644
--- a/Help/command/add_library.rst
+++ b/Help/command/add_library.rst
@@ -59,6 +59,10 @@ the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
+See also :prop_sf:`HEADER_FILE_ONLY` on what to do if some sources are
+pre-processed, and you want to have the original sources reachable from
+within IDE.
+
Imported Libraries
^^^^^^^^^^^^^^^^^^
diff --git a/Help/prop_sf/HEADER_FILE_ONLY.rst b/Help/prop_sf/HEADER_FILE_ONLY.rst
index b4fb2db..71d62ae 100644
--- a/Help/prop_sf/HEADER_FILE_ONLY.rst
+++ b/Help/prop_sf/HEADER_FILE_ONLY.rst
@@ -7,3 +7,18 @@ A property on a source file that indicates if the source file is a
header file with no associated implementation. This is set
automatically based on the file extension and is used by CMake to
determine if certain dependency information should be computed.
+
+By setting this property to ``ON``, you can disable compilation of
+the given source file, even if it should be compiled because it is
+part of the library's/executable's sources.
+
+This is useful if you have some source files which you somehow
+pre-process, and then add these pre-processed sources via
+:command:`add_library` or :command:`add_executable`. Normally, in IDE,
+there would be no reference of the original sources, only of these
+pre-processed sources. So by setting this property for all the original
+source files to ``ON``, and then either calling :command:`add_library`
+or :command:`add_executable` while passing both the pre-processed
+sources and the original sources, or by using :command:`target_sources`
+to add original source files will do exactly what would one expect, i.e.
+the original source files would be visible in IDE, and will not be built.
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=776929b3c46ef593fc70cf792e0f4e99d6bc88b9
commit 776929b3c46ef593fc70cf792e0f4e99d6bc88b9
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue May 9 10:12:12 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue May 9 10:12:12 2017 -0400
VS: Fix .vcxproj ProjectGuid element case
The `.vcxproj` file format expects `ProjectGuid`, not `ProjectGUID`.
The latter is expected by `.vcproj` files from VS 2008, so this was
likely a typo when the VS 2010 generator was first introduced.
Fixes: #11968
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index ee9e47a..0e02b0a 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -647,9 +647,9 @@ bool cmGlobalVisualStudio10Generator::FindVCTargetsPath(cmMakefile* mf)
xw.EndElement(); // ItemGroup
xw.StartElement("PropertyGroup");
xw.Attribute("Label", "Globals");
- xw.StartElement("ProjectGUID");
+ xw.StartElement("ProjectGuid");
xw.Content("{F3FC6D86-508D-3FB1-96D2-995F08B142EC}");
- xw.EndElement(); // ProjectGUID
+ xw.EndElement(); // ProjectGuid
xw.StartElement("Keyword");
xw.Content("Win32Proj");
xw.EndElement(); // Keyword
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index c81ba7a..4fcf5dc 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -297,8 +297,8 @@ void cmVisualStudio10TargetGenerator::Generate()
this->WriteProjectConfigurations();
}
this->WriteString("<PropertyGroup Label=\"Globals\">\n", 1);
- this->WriteString("<ProjectGUID>", 2);
- (*this->BuildFileStream) << "{" << this->GUID << "}</ProjectGUID>\n";
+ this->WriteString("<ProjectGuid>", 2);
+ (*this->BuildFileStream) << "{" << this->GUID << "}</ProjectGuid>\n";
if (this->MSTools &&
this->GeneratorTarget->GetType() <= cmStateEnums::GLOBAL_TARGET) {
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9b541aaeaa16204c3bf158fa88244c9b8d3d7d80
commit 9b541aaeaa16204c3bf158fa88244c9b8d3d7d80
Author: Christian Pfeiffer <cpfeiffer at live.de>
AuthorDate: Mon May 8 21:43:01 2017 +0200
Commit: Christian Pfeiffer <cpfeiffer at live.de>
CommitDate: Mon May 8 21:43:01 2017 +0200
TestFindOpenMP,MPI: Disable default languages
diff --git a/Tests/FindMPI/Test/CMakeLists.txt b/Tests/FindMPI/Test/CMakeLists.txt
index 6f177f9..3910c25 100644
--- a/Tests/FindMPI/Test/CMakeLists.txt
+++ b/Tests/FindMPI/Test/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.8)
-project(TestFindMPI)
+project(TestFindMPI NONE)
include(CTest)
macro(source_code_mapper_helper LANG_NAME)
diff --git a/Tests/FindOpenMP/Test/CMakeLists.txt b/Tests/FindOpenMP/Test/CMakeLists.txt
index 6313ef6..2692947 100644
--- a/Tests/FindOpenMP/Test/CMakeLists.txt
+++ b/Tests/FindOpenMP/Test/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.8)
-project(TestFindOpenMP)
+project(TestFindOpenMP NONE)
include(CTest)
macro(source_code_mapper_helper LANG_NAME SRC_FILE_NAME)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80ca9ac84b2a6b24e40306a9f8afedfe67511d30
commit 80ca9ac84b2a6b24e40306a9f8afedfe67511d30
Author: Christian Pfeiffer <cpfeiffer at live.de>
AuthorDate: Mon May 8 18:52:48 2017 +0200
Commit: Christian Pfeiffer <cpfeiffer at live.de>
CommitDate: Mon May 8 18:52:48 2017 +0200
FindOpenMP: Cache compilation results
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index cb31a61..1093be0 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -157,7 +157,7 @@ endfunction()
include(${CMAKE_ROOT}/Modules/CMakeParseImplicitLinkInfo.cmake)
-function(_OPENMP_GET_FLAGS LANG OPENMP_FLAG_VAR OPENMP_LIB_NAMES_VAR)
+function(_OPENMP_GET_FLAGS LANG FLAG_MODE OPENMP_FLAG_VAR OPENMP_LIB_NAMES_VAR)
_OPENMP_FLAG_CANDIDATES("${LANG}")
_OPENMP_WRITE_SOURCE_FILE("${LANG}" "TEST_SOURCE" OpenMPTryFlag _OPENMP_TEST_SRC)
@@ -166,13 +166,13 @@ function(_OPENMP_GET_FLAGS LANG OPENMP_FLAG_VAR OPENMP_LIB_NAMES_VAR)
if(CMAKE_${LANG}_VERBOSE_FLAG)
string(APPEND OPENMP_FLAGS_TEST " ${CMAKE_${LANG}_VERBOSE_FLAG}")
endif()
- try_compile( OpenMP_TRY_COMPILE_RESULT ${CMAKE_BINARY_DIR} ${_OPENMP_TEST_SRC}
+ string(REGEX REPLACE "[-/=+]" "" OPENMP_PLAIN_FLAG "${OPENMP_FLAG}")
+ try_compile( OpenMP_COMPILE_RESULT_${FLAG_MODE}_${OPENMP_PLAIN_FLAG} ${CMAKE_BINARY_DIR} ${_OPENMP_TEST_SRC}
CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${OPENMP_FLAGS_TEST}"
OUTPUT_VARIABLE OpenMP_TRY_COMPILE_OUTPUT
)
- if(OpenMP_TRY_COMPILE_RESULT)
- unset(OpenMP_TRY_COMPILE_RESULT CACHE)
+ if(OpenMP_COMPILE_RESULT_${FLAG_MODE}_${OPENMP_PLAIN_FLAG})
set("${OPENMP_FLAG_VAR}" "${OPENMP_FLAG}" PARENT_SCOPE)
if(CMAKE_${LANG}_VERBOSE_FLAG)
@@ -224,7 +224,6 @@ function(_OPENMP_GET_FLAGS LANG OPENMP_FLAG_VAR OPENMP_LIB_NAMES_VAR)
endif()
set("${OPENMP_LIB_NAMES_VAR}" "NOTFOUND" PARENT_SCOPE)
set("${OPENMP_FLAG_VAR}" "NOTFOUND" PARENT_SCOPE)
- unset(OpenMP_TRY_COMPILE_RESULT CACHE)
endforeach()
endfunction()
@@ -270,19 +269,18 @@ function(_OPENMP_GET_SPEC_DATE LANG SPEC_DATE)
_OPENMP_WRITE_SOURCE_FILE("${LANG}" "CHECK_VERSION_SOURCE" OpenMPCheckVersion _OPENMP_TEST_SRC)
set(BIN_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindOpenMP/ompver_${LANG}.bin")
- try_compile(OpenMP_TRY_COMPILE_RESULT "${CMAKE_BINARY_DIR}" "${_OPENMP_TEST_SRC}"
+ string(REGEX REPLACE "[-/=+]" "" OPENMP_PLAIN_FLAG "${OPENMP_FLAG}")
+ try_compile(OpenMP_SPECTEST_${LANG}_${OPENMP_PLAIN_FLAG} "${CMAKE_BINARY_DIR}" "${_OPENMP_TEST_SRC}"
CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${OpenMP_${LANG}_FLAGS}"
COPY_FILE ${BIN_FILE})
- if(${OpenMP_TRY_COMPILE_RESULT})
+ if(${OpenMP_SPECTEST_${LANG}_${OPENMP_PLAIN_FLAG}})
file(STRINGS ${BIN_FILE} specstr LIMIT_COUNT 1 REGEX "INFO:OpenMP-date")
set(regex_spec_date ".*INFO:OpenMP-date\\[0*([^]]*)\\].*")
if("${specstr}" MATCHES "${regex_spec_date}")
set(${SPEC_DATE} "${CMAKE_MATCH_1}" PARENT_SCOPE)
endif()
endif()
-
- unset(OpenMP_TRY_COMPILE_RESULT CACHE)
endfunction()
macro(_OPENMP_SET_VERSION_BY_SPEC_DATE LANG)
@@ -323,7 +321,7 @@ foreach(LANG IN ITEMS C CXX)
if(CMAKE_${LANG}_COMPILER_LOADED)
if(NOT DEFINED OpenMP_${LANG}_FLAGS OR "${OpenMP_${LANG}_FLAGS}" STREQUAL "NOTFOUND"
OR NOT DEFINED OpenMP_${LANG}_LIB_NAMES OR "${OpenMP_${LANG}_LIB_NAMES}" STREQUAL "NOTFOUND")
- _OPENMP_GET_FLAGS("${LANG}" OpenMP_${LANG}_FLAGS_WORK OpenMP_${LANG}_LIB_NAMES_WORK)
+ _OPENMP_GET_FLAGS("${LANG}" "${LANG}" OpenMP_${LANG}_FLAGS_WORK OpenMP_${LANG}_LIB_NAMES_WORK)
endif()
set(OpenMP_${LANG}_FLAGS "${OpenMP_${LANG}_FLAGS_WORK}"
@@ -339,7 +337,7 @@ if(CMAKE_Fortran_COMPILER_LOADED)
OR NOT DEFINED OpenMP_Fortran_LIB_NAMES OR "${OpenMP_Fortran_LIB_NAMES}" STREQUAL "NOTFOUND"
OR NOT DEFINED OpenMP_Fortran_HAVE_OMPLIB_MODULE)
set(OpenMP_Fortran_INCLUDE_LINE "use omp_lib\n implicit none")
- _OPENMP_GET_FLAGS("Fortran" OpenMP_Fortran_FLAGS_WORK OpenMP_Fortran_LIB_NAMES_WORK)
+ _OPENMP_GET_FLAGS("Fortran" "FortranHeader" OpenMP_Fortran_FLAGS_WORK OpenMP_Fortran_LIB_NAMES_WORK)
if(OpenMP_Fortran_FLAGS_WORK)
set(OpenMP_Fortran_HAVE_OMPLIB_MODULE TRUE CACHE BOOL INTERNAL "")
endif()
@@ -355,7 +353,7 @@ if(CMAKE_Fortran_COMPILER_LOADED)
OR NOT DEFINED OpenMP_Fortran_LIB_NAMES OR "${OpenMP_Fortran_LIB_NAMES}" STREQUAL "NOTFOUND"
OR NOT DEFINED OpenMP_Fortran_HAVE_OMPLIB_HEADER)
set(OpenMP_Fortran_INCLUDE_LINE "implicit none\n include 'omp_lib.h'")
- _OPENMP_GET_FLAGS("Fortran" OpenMP_Fortran_FLAGS_WORK OpenMP_Fortran_LIB_NAMES_WORK)
+ _OPENMP_GET_FLAGS("Fortran" "FortranModule" OpenMP_Fortran_FLAGS_WORK OpenMP_Fortran_LIB_NAMES_WORK)
if(OpenMP_Fortran_FLAGS_WORK)
set(OpenMP_Fortran_HAVE_OMPLIB_HEADER TRUE CACHE BOOL INTERNAL "")
endif()
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec5c6bc9bc9bd4e53f511f18cb2da569ea6508e2
commit ec5c6bc9bc9bd4e53f511f18cb2da569ea6508e2
Author: Christian Pfeiffer <cpfeiffer at live.de>
AuthorDate: Mon May 8 18:26:17 2017 +0200
Commit: Christian Pfeiffer <cpfeiffer at live.de>
CommitDate: Mon May 8 18:26:17 2017 +0200
FindOpenMP: Refine list of flags to try
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index e7d9d5f..cb31a61 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -76,10 +76,10 @@ cmake_policy(SET CMP0057 NEW) # if IN_LIST
function(_OPENMP_FLAG_CANDIDATES LANG)
if(NOT OpenMP_${LANG}_FLAG)
- set(OpenMP_FLAG_CANDIDATES "")
+ unset(OpenMP_FLAG_CANDIDATES)
set(OMP_FLAG_GNU "-fopenmp")
- set(OMP_FLAG_Clang "-fopenmp=libomp" "-fopenmp=libiomp5")
+ set(OMP_FLAG_Clang "-fopenmp=libomp" "-fopenmp=libiomp5" "-fopenmp")
set(OMP_FLAG_HP "+Oopenmp")
if(WIN32)
set(OMP_FLAG_Intel "-Qopenmp")
@@ -92,16 +92,21 @@ function(_OPENMP_FLAG_CANDIDATES LANG)
set(OMP_FLAG_MIPSpro "-mp")
set(OMP_FLAG_MSVC "-openmp")
set(OMP_FLAG_PathScale "-openmp")
+ set(OMP_FLAG_NAG "-openmp")
+ set(OMP_FLAG_Absoft "-openmp")
set(OMP_FLAG_PGI "-mp")
set(OMP_FLAG_SunPro "-xopenmp")
set(OMP_FLAG_XL "-qsmp=omp")
# Cray compiles with OpenMP automatically
+ set(OMP_FLAG_Cray " ")
+ # If we know the correct flags, use those
if(DEFINED OMP_FLAG_${CMAKE_${LANG}_COMPILER_ID})
- list(APPEND OpenMP_FLAG_CANDIDATES "${OMP_FLAG_${CMAKE_${LANG}_COMPILER_ID}}")
+ set(OpenMP_FLAG_CANDIDATES "${OMP_FLAG_${CMAKE_${LANG}_COMPILER_ID}}")
+ # Fall back to reasonable default tries otherwise
+ else()
+ set(OpenMP_FLAG_CANDIDATES "-openmp" "-fopenmp" "-mp" " ")
endif()
-
- list(APPEND OpenMP_FLAG_CANDIDATES " ")
set(OpenMP_${LANG}_FLAG_CANDIDATES "${OpenMP_FLAG_CANDIDATES}" PARENT_SCOPE)
else()
set(OpenMP_${LANG}_FLAG_CANDIDATES "${OpenMP_${LANG}_FLAG}" PARENT_SCOPE)
-----------------------------------------------------------------------
Summary of changes:
Help/command/add_executable.rst | 3 +++
Help/command/add_library.rst | 4 +++
Help/prop_sf/HEADER_FILE_ONLY.rst | 15 +++++++++++
Modules/FindOpenMP.cmake | 37 +++++++++++++++-------------
Source/cmGlobalVisualStudio10Generator.cxx | 4 +--
Source/cmVisualStudio10TargetGenerator.cxx | 4 +--
Tests/FindMPI/Test/CMakeLists.txt | 2 +-
Tests/FindOpenMP/Test/CMakeLists.txt | 2 +-
8 files changed, 48 insertions(+), 23 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list