Re: [cmake-developers] [PATCH] CPackRPM: Fix cross-building rpms

2015-02-03 Thread Rolf Eike Beer
  # CPACK_RPM_PACKAGE_ARCHITECTURE (optional)
 -if(CPACK_RPM_PACKAGE_ARCHITECTURE)
 +if(NOT CPACK_RPM_PACKAGE_ARCHITECTURE)
 +  execute_process(COMMAND uname -m
 +  WORKING_DIRECTORY ${WDIR}
 +  OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE)
 +endif()

You don't need to specify a working directory for uname. Also I assume that 
you want to use OUTPUT_STRIP_TRAILING_WHITESPACE to not have the trailing 
newline in the variable.

Greetings,

Eike

signature.asc
Description: This is a digitally signed message part.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [PATCH] CPackRPM: Fix cross-building rpms

2015-02-03 Thread Domen Vrankar
 Add the --target argument to rpmbuild
 Do not add a BuildArch variable to the spec file for arch specific packages
 BuildArch causes rpm building to fail except for noarch packages

I'm not too familiar with cross compilation problems so could you
please also provide a simple test case to help with patch review?

Thanks,
Domen
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] New module: CheckFortranCompilerFlag.cmake

2015-02-03 Thread Nicolas Bock
Hi Eike,

please find attached a patch based on 460f7bcb7d11e905ee025c9d9cc9629d597fa91b.

Thanks

nick


From a843ca01581ab85a07c36700b2474c722e9917fb Mon Sep 17 00:00:00 2001
From: Nicolas Bock nicolasb...@gmail.com
Date: Mon, 2 Feb 2015 17:07:04 -0700
Subject: [PATCH] New Module: CheckFortranCompilerFlags.cmake

This module is based on the existing CheckCCompilerFlags.cmake.
---
 Modules/CheckFortranCompilerFlag.cmake | 65 ++
 1 file changed, 65 insertions(+)
 create mode 100644 Modules/CheckFortranCompilerFlag.cmake

diff --git a/Modules/CheckFortranCompilerFlag.cmake
b/Modules/CheckFortranCompilerFlag.cmake
new file mode 100644
index 000..08aed07
--- /dev/null
+++ b/Modules/CheckFortranCompilerFlag.cmake
@@ -0,0 +1,65 @@
+#.rst:
+# CheckCCompilerFlag
+# --
+#
+# Check whether the Fortran compiler supports a given flag.
+#
+# CHECK_Fortran_COMPILER_FLAG(flag var)
+#
+# ::
+#
+#   flag - the compiler flag
+#   var  - variable to store the result
+#Will be created as an internal cache variable.
+#
+# This internally calls the check_fortran_source_compiles macro and
+# sets CMAKE_REQUIRED_DEFINITIONS to flag.  See help for
+# CheckFortranSourceCompiles for a listing of variables that can
+# otherwise modify the build.  The result only tells that the compiler
+# does not give an error message when it encounters the flag.  If the
+# flag has any effect or even a specific one is beyond the scope of
+# this module.
+
+#=
+# Copyright 2006-2011 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf neund...@kde.org
+# Copyright 2011 Matthias Kretz kr...@kde.org
+#
+# Distributed under the OSI-approved BSD License (the License);
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+include(CheckFortranSourceCompiles)
+include(CMakeCheckCompilerFlagCommonPatterns)
+
+macro (CHECK_Fortran_COMPILER_FLAG _FLAG _RESULT)
+   set(SAFE_CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
+   set(CMAKE_REQUIRED_DEFINITIONS ${_FLAG})
+
+   # Normalize locale during test compilation.
+   set(_CheckFortranCompilerFlag_LOCALE_VARS LC_ALL LC_MESSAGES LANG)
+   foreach(v ${_CheckFortranCompilerFlag_LOCALE_VARS})
+ set(_CheckFortranCompilerFlag_SAVED_${v} $ENV{${v}})
+ set(ENV{${v}} C)
+   endforeach()
+   
CHECK_COMPILER_FLAG_COMMON_PATTERNS(_CheckFortranCompilerFlag_COMMON_PATTERNS)
+   CHECK_Fortran_SOURCE_COMPILES(   program test\n   stop\n
 end program ${_RESULT}
+ # Some compilers do not fail with a bad flag
+ FAIL_REGEX command line option .* is valid for .* but not for C # GNU
+ ${_CheckFortranCompilerFlag_COMMON_PATTERNS}
+ )
+   foreach(v ${_CheckFortranCompilerFlag_LOCALE_VARS})
+ set(ENV{${v}} ${_CheckFortranCompilerFlag_SAVED_${v}})
+ unset(_CheckFortranCompilerFlag_SAVED_${v})
+   endforeach()
+   unset(_CheckFortranCompilerFlag_LOCALE_VARS)
+   unset(_CheckFortranCompilerFlag_COMMON_PATTERNS)
+
+   set (CMAKE_REQUIRED_DEFINITIONS ${SAFE_CMAKE_REQUIRED_DEFINITIONS})
+endmacro ()
-- 
2.0.5

On Sun, Feb 1, 2015 at 2:18 AM, Rolf Eike Beer e...@sf-mail.de wrote:
 Nicolas Bock wrote:
 Hi,

 please find attached for potential inclusion into CMake a new Module
 that tests Fortran compiler flags. It is a modified copy of the
 existing CheckCCompilerFlag.cmake module.

 Hi Nicolas,

 which version did you base this on? It looks like this is a version older than
 any 3.0.0-rc. Please take a look at the git version instead.

 Also I don't know if it makes sense to check for certain flags that look
 specific to C++. Which compilers did you use to test?

 Greetings,

 Eike
 --
 --

 Powered by www.kitware.com

 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ

 Kitware offers various services to support the CMake community. For more 
 information on each offering, please visit:

 CMake Support: http://cmake.org/cmake/help/support.html
 CMake Consulting: http://cmake.org/cmake/help/consulting.html
 CMake Training Courses: http://cmake.org/cmake/help/training.html

 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html

 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/mailman/listinfo/cmake-developers
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: 

Re: [cmake-developers] Generating Windows Phone project files

2015-02-03 Thread thefox xofeht
On Tue, Feb 3, 2015 at 4:56 PM, thefox xofeht the...@aspekt.fi wrote:
 I was trying to generate project files for Windows Phone 8, but hit a
 snag right away:

Well, as always, it helps to make a post like this since I realized
now what the problem was. I had ran cmake .. -G Visual Studio 12
2013 -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.0 in
the same directory unsuccessfully, and that was affecting my later
runs with CMAKE_SYSTEM_VERSION=8.1.

Sorry for the noise.

-K
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] Generating Windows Phone project files

2015-02-03 Thread thefox xofeht
Hi,

I was trying to generate project files for Windows Phone 8, but hit a
snag right away:


cmake .. -G Visual Studio 12 2013 -DCMAKE_SYSTEM_NAME=WindowsPhone 
-DCMAKE_SYSTEM_VERSION=8.1
CMake Error at CMakeLists.txt:5 (project):
  A Windows Phone component with CMake requires both the Windows Desktop SDK
  as well as the Windows Phone '8.0' SDK.  Please make sure that you have
  both installed


I'm able to compile a project generated from a Windows Phone 8.0
DirectX App template, so I believe I should have all the necessary
SDKs.

I looked around in the CMake code for a bit, and noticed that it's
looking for the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft
SDKs\WindowsPhone\v8.0. I don't have that. I do have
HKEY_CURRENT_USER\Software\Microsoft\Microsoft
SDKs\WindowsPhone\v8.0, though. And both v8.0 and v8.1
directories are visible in the directory C:\Program Files
(x86)\Microsoft SDKs\Windows Phone.

Using Windows 8.1, cmake version 3.1.20150114-gdb5583, Visual Studio 2013.

Any ideas?

-K
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CUDA as a compiler instead FindCUDA?

2015-02-03 Thread James Bigler
On Sat, Jan 17, 2015 at 8:13 AM, Adam Strzelecki o...@java.pl wrote:

 1. Support for dependency scanning.  If I change a header included by
 file.cu I want file.cu to be recompiled.  This is easy for makefiles,
 hard for anything else.


 .cu is superset of C++ so it should be pretty easy to get dependency
 scanning working same as for regular .cpp/.h files using CMake facilities.


CMake doesn't support dependency scanning for Visual Studio.

 2. In the past there have been bugs with nvcc, such as leaving a partially
 written output file during generation that failed, that FindCUDA has worked
 around.


 I don't see why we should care about that? If they still exist isn't it
 what NVIDIA partner bug report site is for?


It may not be my fault, but it's my problem.  If I can correct for problems
and help others not have to deal with those same problems, I'm going to do
that.  We all have to deal with imperfect tools, and not all of us can wait
for 1-2 years for bugs to be fixed.


 3. Host flags generally need to be propagated to the CUDA flags (I'll
 admit that this support in FindCUDA isn't perfect).


 You mean user-defined preprocessor definitions or compiler flags? Host
 compiler flags are picked up by nvcc from host compiler itself. Aside of
 that, CMake will insert -D definitions as well to any extra compiler.

 So you may only want to wrap CMAKE_CXX_FLAGS into CMAKE_CUDACXX_FLAGS
 using -Xcompiler which can be tricky, but I believe we can workaround that
 somehow.

 4. How do you support other targets besides cubin (obj), such as PTX?


 For what purpose? Debugging?


CUDA supports two usage APIs.  The runtime API that is used when you
compile your code to object files, and the driver API that compiles to PTX
or CUBIN and then loads that code into the driver directly.  FindCUDA
supports both.

 5. How would separable compilation work?  Especially since you can't
 easily replace the linker.


 Correct me if I am wrong, but we will still use platform linker.


You can't use the platform linker for separable compilation unless you also
produce intermediate linkage files.  In order to produce intermediate
linkage files you need all the object files compiled with separable linking
to be run through another tool that produces this intermedate link file
that will also need to be linked into the executable module.

 6. If you support PTX, can you use the output as input for other custom
 commands (I like to encode the PTX into strings compiled into C++ files
 using bin2c from CUDA).


 Again can you please elaborate more why would you like to handle PTX
 yourself if CUDA does it for you, i.e.:

 nvcc -arch sm_30 - makes .o contain native device code
 nvcc -arch compute_30 - makes .o contain ptx code compiled later by the
 driver itself

 This sounds like some custom behavior.


See my comment above regarding the driver versus runtime CUDA API.  Yes it
is different behavior, but I was able to accommodate both compilation
models with the same tool.  I would love for what you propose to work for
both compilation modes, so if it is possible I would like to design it in.
Otherwise it can't be a complete replacement for FindCUDA.

James
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake 0014317]: Configuration dependent install EXPORT

2015-02-03 Thread R . H .
Brad King brad.king@... writes:
 
 Steve,
 
 On 07/26/2013 04:43 AM, Mantis Bug Tracker wrote:
  http://www.cmake.org/Bug/view.php?id=14317 
 
 What do you think about adding generator expressions to install
 DESTINATION options.  In particular the $CONFIGURATION genex
 would be useful in this case.
 
 Thanks,
 -Brad


Generator expressions given to DESTINATION in the install() command
unfortunately are still not supported as of 3.1.1, e.g.

install(
 TARGETS mylib
 EXPORT mylib
 ARCHIVE DESTINATION lib/$CONFIG
)

Without this, I can't find any satisfiable solution installing archive and
runtime files for multi-configuration projects (VS) using the export
mechanism. Visual Studio users really suffer from this, as only one
configuration can be used.

Is there any chance this feature (genex) will be added? The ticket 0014317
(http://www.cmake.org/Bug/view.php?id=14317) is still open.



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] [CMake 0015387]: FindwxWidget.cmake can not find the wxWidgets framework installed by Mac Port

2015-02-03 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=15387 
== 
Reported By:Frédéric Wang
Assigned To:
== 
Project:CMake
Issue ID:   15387
Category:   Modules
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2015-02-03 07:01 EST
Last Modified:  2015-02-03 07:01 EST
== 
Summary:FindwxWidget.cmake can not find the wxWidgets
framework installed by Mac Port
Description: 
The problem is essentially the one described in this old post on 
https://forums.wxwidgets.org/viewtopic.php?f=19t=38338

The Mac Port package installs a wxWidgets framework into
/opt/local/Library/Frameworks/ but this one is not found by FindwxWidget.cmake.
This might be related to

http://www.cmake.org/Wiki/CMake:MacOSX_Frameworks
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2015-02-03 07:01 Frédéric Wang  New Issue
==

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] Fix for the default configuration for CMAKE_INSTALL_CONFIG_NAME

2015-02-03 Thread Brad King
On 02/02/2015 11:44 AM, Roman Wüger wrote:
 Attached is a patch to fix this issue.

Thanks.  Inspired by that Ben produced:

 install: Fix regression in default configuration selection
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dea42d92

Thanks,
-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] [CMake 0015388]: CTEST_GIT_UPDATE_CUSTOM is not handled by CTest.cmake

2015-02-03 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://www.cmake.org/Bug/view.php?id=15388 
== 
Reported By:Martin Beaudoin
Assigned To:
== 
Project:CMake
Issue ID:   15388
Category:   CMake
Reproducibility:always
Severity:   tweak
Priority:   normal
Status: new
== 
Date Submitted: 2015-02-03 12:55 EST
Last Modified:  2015-02-03 12:55 EST
== 
Summary:CTEST_GIT_UPDATE_CUSTOM is not handled by
CTest.cmake
Description: 
It would be nice to be able to use the option CTEST_GIT_UPDATE_CUSTOM  from a
CMakeLists.txt file.

Right now, only the GIT_UPDATE_OPTIONS option is handled by the module
CTest.cmake. 
The option CTEST_GIT_UPDATE_CUSTOM is basically ignored by the module
CTest.cmake.

So one has to modify the DartConfiguration.tcl directly in order to specify a
GITUpdateCustom entry prior to invoke make Nightly or make NightlyUpdate.

I am willing to work on/contribute a patch if you are interested by this useful
tweak.

Additional Information: 
The syntax one has to specify for the CTEST_GIT_UPDATE_CUSTOM option is also a
bit peculiar.

My Custom GIT Update command is simply : /usr/bin/git merge origin/master 

Still, here is the syntax one will need to use to set the proper value for
GITUpdateCustom in the DartConfiguration.tcl:

/usr/bin/git;merge;origin/master

I don't mind this compact syntax which is probably necessary in order to supply
a multi-token entry that will be recognized for the key/value syntax of the
DartConfiguration.tcl file. 

But if this information is ever taken from a CMakeLists.txt file, it would be
nice to support at this higher level a user-friendly syntax like this:

SET(CTEST_GIT_UPDATE_CUSTOM /usr/bin/git merge origin/master )
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2015-02-03 12:55 Martin BeaudoinNew Issue
==

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] Introduction and volunteering for the Matlab package

2015-02-03 Thread Brad King
On 01/28/2015 09:21 AM, Raffi Enficiaud wrote:
 I am wondering why I haven't zipped the patch before.
 
 Please find attached the patch addressing the issues you raised.

The reason it was so big is because you sent an entire patch
series containing your local development history.  Instead please
squash everything down to a single commit so git format-patch
generates a patch with only one commit.  I did this locally and
produced the attached patch from your changes, rebased on master
as of commit aec11372.  You could start a new branch from there,
git am the attached patch, edit files, use git commit --amend
to update it, and then git format-patch to send it back.

Please revise the commit message to summarize all the work done
by these changes.

In order to make the tests available only when enabled explicitly
on a machine with Matlab installed, please revise the test cases
to use the pattern used for FindJsonCpp.  Look for code refering
to CMake_TEST_FindJsonCpp for an example.  The same check can be
used in the RunCMake directory too.  Use -DCMake_TEST_FindMatlab=1
on the CMake command line locally to get the tests enabled for you.
Later we will expect you to run nightly testing for this since our
dashboard machines do not have Matlab.

Also, please rename:

 Tests/Module/Matlab2/ = Tests/FindMatlab/
 Tests/RunCMake/Matlab2/ = Tests/RunCMake/FindMatlab/

Thanks,
-Brad

From 250c78d0ed5637cb954e821284e999ceb0cfcd76 Mon Sep 17 00:00:00 2001
Message-Id: 250c78d0ed5637cb954e821284e999ceb0cfcd76.1422993185.git.brad.k...@kitware.com
From: Raffi Enficiaud raffi.enfici...@free.fr
Date: Tue, 3 Feb 2015 14:52:15 -0500
Subject: [PATCH] FindMatlab: Rewrite module and provide a usage API

---
 Modules/FindMatlab.cmake   | 1423 ++--
 Modules/MatlabTestsRedirect.cmake  |   80 ++
 Tests/CMakeLists.txt   |4 +
 Tests/Module/Matlab2/basic_checks/CMakeLists.txt   |   57 +
 Tests/Module/Matlab2/cmake_matlab_unit_tests1.m|   33 +
 Tests/Module/Matlab2/cmake_matlab_unit_tests2.m|6 +
 Tests/Module/Matlab2/cmake_matlab_unit_tests3.m|5 +
 .../Matlab2/cmake_matlab_unit_tests_timeout.m  |   15 +
 Tests/Module/Matlab2/help_text1.m.txt  |2 +
 Tests/Module/Matlab2/matlab_wrapper1.cpp   |   26 +
 .../Module/Matlab2/versions_checks/CMakeLists.txt  |   52 +
 Tests/RunCMake/CMakeLists.txt  |3 +
 Tests/RunCMake/Matlab2/CMakeLists.txt  |3 +
 Tests/RunCMake/Matlab2/MatlabTest1-result.txt  |1 +
 Tests/RunCMake/Matlab2/MatlabTest1-stderr.txt  |2 +
 Tests/RunCMake/Matlab2/MatlabTest1.cmake   |   22 +
 Tests/RunCMake/Matlab2/RunCMakeTest.cmake  |3 +
 Tests/RunCMake/Matlab2/cmake_matlab_unit_tests2.m  |6 +
 Tests/RunCMake/Matlab2/matlab_wrapper1.cpp |   26 +
 19 files changed, 1682 insertions(+), 87 deletions(-)
 create mode 100644 Modules/MatlabTestsRedirect.cmake
 create mode 100644 Tests/Module/Matlab2/basic_checks/CMakeLists.txt
 create mode 100644 Tests/Module/Matlab2/cmake_matlab_unit_tests1.m
 create mode 100644 Tests/Module/Matlab2/cmake_matlab_unit_tests2.m
 create mode 100644 Tests/Module/Matlab2/cmake_matlab_unit_tests3.m
 create mode 100644 Tests/Module/Matlab2/cmake_matlab_unit_tests_timeout.m
 create mode 100644 Tests/Module/Matlab2/help_text1.m.txt
 create mode 100644 Tests/Module/Matlab2/matlab_wrapper1.cpp
 create mode 100644 Tests/Module/Matlab2/versions_checks/CMakeLists.txt
 create mode 100644 Tests/RunCMake/Matlab2/CMakeLists.txt
 create mode 100644 Tests/RunCMake/Matlab2/MatlabTest1-result.txt
 create mode 100644 Tests/RunCMake/Matlab2/MatlabTest1-stderr.txt
 create mode 100644 Tests/RunCMake/Matlab2/MatlabTest1.cmake
 create mode 100644 Tests/RunCMake/Matlab2/RunCMakeTest.cmake
 create mode 100644 Tests/RunCMake/Matlab2/cmake_matlab_unit_tests2.m
 create mode 100644 Tests/RunCMake/Matlab2/matlab_wrapper1.cpp

diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 474556e..a821826 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -2,20 +2,201 @@
 # FindMatlab
 # --
 #
-# this module looks for Matlab
+# Finds Matlab installations and provides Matlab tools and libraries to cmake.
 #
-# Defines:
+# This package first intention is to find the libraries associated with Matlab
+# in order to be able to build Matlab extensions (mex files). It can also be
+# used:
 #
-# ::
+# * run specific commands in Matlab
+# * declare Matlab unit test
+# * retrieve various information from Matlab (mex extensions, versions and
+#   release queries, ...)
 #
-#   MATLAB_INCLUDE_DIR: include path for mex.h, engine.h
-#   MATLAB_LIBRARIES:   required libraries: libmex, etc
-#   MATLAB_MEX_LIBRARY: path to libmex.lib
-#   MATLAB_MX_LIBRARY:  path to libmx.lib
-#   MATLAB_ENG_LIBRARY: path to libeng.lib
+# The module supports the following components:
+#
+# * ``MX_LIBRARY`` and 

Re: [cmake-developers] Initial Attempt at Green Hill MULTI IDE Generator Support

2015-02-03 Thread Brad King
On 01/28/2015 10:51 PM, Geoffrey Viola wrote:
 I submitted some builds.
 I'm not sure why 9 fail.

Okay, let's get your builds submitting cleanly with no local changes first.
That way we can identify whether any of your changes cause the failures.

There are basic instructions for setting up a nightly build here:

 http://www.cmake.org/Wiki/CMake/Git/Dashboard

You can use Windows Task Scheduler to run a .bat file that calls ctest
with the dashboard script.

Once we get your submission to a clean state then we can continue looking
at the changes for the new generator and whether they cause any failures.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] Windows Store generated solution also containing win32 console app?

2015-02-03 Thread Brad King
On 01/29/2015 06:11 PM, Gilles Khouzam wrote:
 For applications you might not need the VS_WINRT_COMPONENT, but for
 libraries setting it vs not does have some differences.

Thanks, Gilles.  Robert, I think this means my suggestion of trying to
re-use VS_WINRT_COMPONENT for this was a bad idea.  Let's return to your
original suggestion of a separate option.  The proper name for the option
may depend on the discussion below.  Of course it needs to be an error
to enable both the new option and VS_WINRT_COMPONENT in the same target.

On 01/27/2015 02:58 PM, Robert Goulet wrote:
 the generator is essentially the same for both Win32 and WinRT

Is this true for only Store, or might all this work for Phone too?

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] Introduction and volunteering for the Matlab package

2015-02-03 Thread Raffi Enficiaud
Dear Brad,

Thanks for the feedback. I will implement your suggestions. 
I suppose there is some documentation on how to set up a night test server, but 
I could not find any. Would you please help me with this?

Regards,
Raffi Enficiaud



 On 03 Feb 2015, at 20:59, Brad King brad.k...@kitware.com wrote:
 
 In order to make the tests available only when enabled explicitly
 on a machine with Matlab installed, please revise the test cases
 to use the pattern used for FindJsonCpp.  Look for code refering
 to CMake_TEST_FindJsonCpp for an example.  The same check can be
 used in the RunCMake directory too.  Use -DCMake_TEST_FindMatlab=1
 on the CMake command line locally to get the tests enabled for you.
 Later we will expect you to run nightly testing for this since our
 dashboard machines do not have Matlab.
 
 Also, please rename:
 
 Tests/Module/Matlab2/ = Tests/FindMatlab/
 Tests/RunCMake/Matlab2/ = Tests/RunCMake/FindMatlab/
 
 Thanks,
 -Brad
 
 0001-FindMatlab-Rewrite-module-and-provide-a-usage-API.patch

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] New module: CheckFortranCompilerFlag.cmake

2015-02-03 Thread Brad King
On 02/03/2015 07:46 AM, Nicolas Bock wrote:
 please find attached a patch based on 
 460f7bcb7d11e905ee025c9d9cc9629d597fa91b.

Thanks.  Was this based on CheckCCompilerFlag from that version too?

On 02/01/2015 04:18 AM, Rolf Eike Beer wrote:
 Also I don't know if it makes sense to check for certain flags that look
 specific to C++. Which compilers did you use to test?

Agreed.  Do you have example failure messages from any compilers?

Local testing of GNU Fortran 4.9 shows that bad flags are rejected with
an error.  Do we need the pattern matches for any Fortran compilers?

 + # Some compilers do not fail with a bad flag
 + FAIL_REGEX command line option .* is valid for .* but not for C # GNU
 + ${_CheckFortranCompilerFlag_COMMON_PATTERNS}

Certainly the but not for C message will not show up from a
Fortran compiler.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] New module: CheckFortranCompilerFlag.cmake

2015-02-03 Thread Nicolas Bock
On Tue, Feb 3, 2015 at 1:18 PM, Brad King brad.k...@kitware.com wrote:
 On 02/03/2015 07:46 AM, Nicolas Bock wrote:
 please find attached a patch based on 
 460f7bcb7d11e905ee025c9d9cc9629d597fa91b.

 Thanks.  Was this based on CheckCCompilerFlag from that version too?

Yes.

 On 02/01/2015 04:18 AM, Rolf Eike Beer wrote:
 Also I don't know if it makes sense to check for certain flags that look
 specific to C++. Which compilers did you use to test?

 Agreed.  Do you have example failure messages from any compilers?

I will collect some.

 Local testing of GNU Fortran 4.9 shows that bad flags are rejected with
 an error.  Do we need the pattern matches for any Fortran compilers?
I have tested with gcc and Intel (ifort). Ifort gives out warnings for
illegal flags, stating that it will ignore them. In my (very basic)
testing the warning lead to test failure of the module, i.e.. it lead
to the correct behavior. I have access to PGI and possibly NAG's
compilers as well and will test whether error messages are caught.


 + # Some compilers do not fail with a bad flag
 + FAIL_REGEX command line option .* is valid for .* but not for C # GNU
 + ${_CheckFortranCompilerFlag_COMMON_PATTERNS}

 Certainly the but not for C message will not show up from a
 Fortran compiler.

Oops, yes good point.

 Thanks,
 -Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] msbuild VisualStudioEdition value (was: Fix for Windows Store warning APPX1901...)

2015-02-03 Thread Brad King
On 01/30/2015 10:35 AM, Robert Goulet wrote:
makeCommand.push_back(std::string(/p:VisualStudioVersion=)+
  this-GetIDEVersion());
 +
 +  // Normally this is only needed for Windows Store/Phone apps when building 
 from command-line.
 +  // Fixes warning APPX2102: : File 'VisualStudioEdition' is not found or is 
 not an executable file.
 +  makeCommand.push_back(std::string(/p:VisualStudioEdition=\)+
 +this-GetName()+
 +std::string(\));

Something like this may work, but the generator name will not always
be a valid value for VisualStudioEdition.  Somehow we have to look up
a correct value based on the current generator and what is installed
on the system.  Gilles, might you be able to help with this?

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] [CMake 0015386]: FindOpenSSL.cmake fails to find new version (1.0.2) of OpenSSL

2015-02-03 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=15386 
== 
Reported By:Karl Tarbe
Assigned To:
== 
Project:CMake
Issue ID:   15386
Category:   (No Category)
Reproducibility:always
Severity:   major
Priority:   urgent
Status: new
== 
Date Submitted: 2015-02-03 05:39 EST
Last Modified:  2015-02-03 05:39 EST
== 
Summary:FindOpenSSL.cmake fails to find new version (1.0.2)
of OpenSSL
Description: 
The version scheme changed, because of a major version upgrade of OpenSSL.

I believe the regex in FindOpenSSL.cmake fails.

CMake Error at /usr/share/cmake-3.0/Modules/FindOpenSSL.cmake:293 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:25 (FIND_PACKAGE)


CMake Error at /usr/share/cmake-3.0/Modules/FindOpenSSL.cmake:294 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:25 (FIND_PACKAGE)


CMake Error at /usr/share/cmake-3.0/Modules/FindOpenSSL.cmake:296 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:25 (FIND_PACKAGE)


CMake Error at /usr/share/cmake-3.0/Modules/FindOpenSSL.cmake:298 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:25 (FIND_PACKAGE)


Steps to Reproduce: 
Install OpenSSL 1.0.2

Use FIND_PACKAGE(OpenSSL REQUIRED)
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2015-02-03 05:39 Karl Tarbe New Issue
==

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] Windows Store generated solution also containing win32 console app?

2015-02-03 Thread Gilles Khouzam
Hi Robert,

I'm a little confused at how your scenario would work for the ARM architecture? 
If you're building a non-WinRT console app for the solution that needs to run, 
this is fine on x86, but how is that handled on ARM? It would not be built 
(since you can't really run it anyway) and it would not be able to run on the 
build machine since it would be the wrong architecture. If this is to be 
supported long term, it might make more sense to have a new target that is 
based on the build environment and not the target environment.


-Original Message-
From: Brad King [mailto:brad.k...@kitware.com] 
Sent: Tuesday, February 3, 2015 12:09
To: Gilles Khouzam; Robert Goulet
Cc: cmake-developers@cmake.org
Subject: Re: [cmake-developers] Windows Store generated solution also 
containing win32 console app?

On 01/29/2015 06:11 PM, Gilles Khouzam wrote:
 For applications you might not need the VS_WINRT_COMPONENT, but for 
 libraries setting it vs not does have some differences.

Thanks, Gilles.  Robert, I think this means my suggestion of trying to re-use 
VS_WINRT_COMPONENT for this was a bad idea.  Let's return to your original 
suggestion of a separate option.  The proper name for the option may depend on 
the discussion below.  Of course it needs to be an error to enable both the new 
option and VS_WINRT_COMPONENT in the same target.

On 01/27/2015 02:58 PM, Robert Goulet wrote:
 the generator is essentially the same for both Win32 and WinRT

Is this true for only Store, or might all this work for Phone too?

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] [CMake 0015385]: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT is set to CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT

2015-02-03 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://www.cmake.org/Bug/view.php?id=15385 
== 
Reported By:Gunnar Roth
Assigned To:
== 
Project:CMake
Issue ID:   15385
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2015-02-03 05:04 EST
Last Modified:  2015-02-03 05:04 EST
== 
Summary:CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT is set
to CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT
Description: 
in windows-MSVC.cmake 
you can find
set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT
${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
but that should probaly be 
set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT
${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT})

as it is also
set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT
${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})

== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2015-02-03 05:04 Gunnar RothNew Issue
==

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers