Re: [CMake] Support for building of OCaml software?
> How do you think about to extend configuration checks for OCaml compiler variants? What do you mean by OCaml compiler variants ? I only know this one : http://caml.inria.fr/download.en.html > Would you also like to check for the availability of any package manager? Do you mean OPAM, GODI... ? I don't see the relationship. Consider those scripts as a way to compile C, C++ and OCaml executables in one shot. If you need additional libraries, CMake will check if these libraries are installed but CMake will not install them for you. Regards, J. Bedouet On Wed, Apr 9, 2014 at 10:32 PM, SF Markus Elfring < elfr...@users.sourceforge.net> wrote: > > https://github.com/ocaml-cmake/ocaml-cmake > > I find your contribution very interesting. > > How do you think about to extend configuration checks for OCaml compiler > variants? > > Would you also like to check for the availability of any package manager? > > Regards, > Markus > -- 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://www.cmake.org/mailman/listinfo/cmake
[CMake] Mixing compilers
I have a large project, with multiple subdirectories. I'd like to use g++ on some folders and icc on others. What is the best way to accomplish this? Can it be done in one project? thanks, ~Bill -- 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMakeDetermineVSServicePack
On 04/10/2014 11:53 AM, Mourad Boufarguine wrote: > I have Update 4 (which is as old as Nov 12, 2013) I installed that, thanks. > I gave the patch a try, I had no more errors Great. I've applied the following changes to fix this: CMakeDetermineVSServicePack: Format documentation http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=101515b9 CMakeDetermineVSServicePack: Match versions more robustly http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=105658df CMakeDetermineVSServicePack: Add VS 11 update 4 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0de3f80 -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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Dependency resolution for "add_custom_command" calls?
On 2014-04-09 12:08, SF Markus Elfring wrote: I try to generate some files mainly by calls of the command "add_custom_command". One of them should start with the action to copy a source file into the build directory. But I wonder why this step is not written into a generated make file. I would appreciate your advices. CMake drops unused dependencies / rules from the generated build script. Do you have a target that depends on the output file? -- Matthew -- 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMakeDetermineVSServicePack
> > > > Microsoft (R) C/C++ Optimizing *Compiler Version 17.00.61030* for x64 > > That is a higher third component value than CMakeDetermineVSServicePack > has for vc110sp3 (17.00.60610.1). What service pack level is it? > > Microsoft talks about Updates rather than Service Packs for Visual Studio 2012. I have Update 4 (which is as old as Nov 12, 2013), so maybe we need to add a new vc110sp4 with a version of 17.00.61030. > >> Meanwhile, Eigen should be taught to use CMAKE__COMPILER_VERSION > > All I can do here is to let Eigen developers know of this issue. > > Yes. CMakeDetermineVSServicePack should not be used anymore. It > is not reliable or future-proof because it has to be taught about > every service pack's exact version number. > > > However, since CMakeDetermineVSServicePack is still shipped with > > CMake 3.0, it has to be fixed anyway. > > Yes, it looks like it needs to be taught to tolerate unknown service > pack levels without failing. Please try the attached patch. It is > not expected to find the right service pack for your (newer) version > but should prevent outright failure. > I gave the patch a try, I had no more errors, but indeed, it is not able to find the right service pack. > > Thanks, > -Brad > > Thanks for looking into this, Mourad -- 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMakeDetermineVSServicePack
On 04/10/2014 04:19 AM, Mourad Boufarguine wrote: > I just tried with CMake 2.8.12.2 and I confirm I had the same issue. Okay, then it is not a regression in 3.0 but still needs to be fixed. > Microsoft (R) C/C++ Optimizing *Compiler Version 17.00.61030* for x64 That is a higher third component value than CMakeDetermineVSServicePack has for vc110sp3 (17.00.60610.1). What service pack level is it? >> Meanwhile, Eigen should be taught to use CMAKE__COMPILER_VERSION > All I can do here is to let Eigen developers know of this issue. Yes. CMakeDetermineVSServicePack should not be used anymore. It is not reliable or future-proof because it has to be taught about every service pack's exact version number. > However, since CMakeDetermineVSServicePack is still shipped with > CMake 3.0, it has to be fixed anyway. Yes, it looks like it needs to be taught to tolerate unknown service pack levels without failing. Please try the attached patch. It is not expected to find the right service pack for your (newer) version but should prevent outright failure. Thanks, -Brad >From 64ee2a7d7e873d6c71aa23bb93c02acde2f2fc83 Mon Sep 17 00:00:00 2001 Message-Id: <64ee2a7d7e873d6c71aa23bb93c02acde2f2fc83.1397142703.git.brad.k...@kitware.com> From: Brad King Date: Thu, 10 Apr 2014 11:03:32 -0400 Subject: [PATCH] CMakeDetermineVSServicePack: Match versions more robustly Use the CMAKE_MATCH_* variables to simplify matching logic. Match either 3 or 4 version components. Do not fail when there are only three components available. --- Modules/CMakeDetermineVSServicePack.cmake | 38 ++- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/Modules/CMakeDetermineVSServicePack.cmake b/Modules/CMakeDetermineVSServicePack.cmake index 353aed6..69e3cd1 100644 --- a/Modules/CMakeDetermineVSServicePack.cmake +++ b/Modules/CMakeDetermineVSServicePack.cmake @@ -86,27 +86,14 @@ function(_DetermineVSServicePack_FastCheckVersionWithCompiler _SUCCESS_VAR _VER OUTPUT_QUIET ) - string(REGEX MATCH "Compiler Version [0-9]+.[0-9]+.[0-9]+.[0-9]+" -_cl_version "${_output}") - - if(_cl_version) -string(REGEX MATCHALL "[0-9]+" -_cl_version_list "${_cl_version}") -list(GET _cl_version_list 0 _major) -list(GET _cl_version_list 1 _minor) -list(GET _cl_version_list 2 _patch) -list(GET _cl_version_list 3 _tweak) - + if(_output MATCHES "Compiler Version (([0-9]+)\\.([0-9]+)\\.([0-9]+)(\\.([0-9]+))?)") +set(_cl_version ${CMAKE_MATCH_1}) +set(_major ${CMAKE_MATCH_2}) +set(_minor ${CMAKE_MATCH_3}) if("${_major}${_minor}" STREQUAL "${MSVC_VERSION}") - set(_cl_version ${_major}.${_minor}.${_patch}.${_tweak}) -else() - unset(_cl_version) -endif() - endif() - - if(_cl_version) set(${_SUCCESS_VAR} true PARENT_SCOPE) set(${_VERSION_VAR} ${_cl_version} PARENT_SCOPE) +endif() endif() endif() endfunction() @@ -127,20 +114,9 @@ function(_DetermineVSServicePack_CheckVersionWithTryCompile _SUCCESS_VAR _VERSI file(REMOVE "${CMAKE_BINARY_DIR}/return0.cc") -string(REGEX MATCH "Compiler Version [0-9]+.[0-9]+.[0-9]+.[0-9]+" - _cl_version "${_output}") - -if(_cl_version) - string(REGEX MATCHALL "[0-9]+" - _cl_version_list "${_cl_version}") - - list(GET _cl_version_list 0 _major) - list(GET _cl_version_list 1 _minor) - list(GET _cl_version_list 2 _patch) - list(GET _cl_version_list 3 _tweak) - +if(_output MATCHES "Compiler Version (([0-9]+)\\.([0-9]+)\\.([0-9]+)(\\.([0-9]+))?)") set(${_SUCCESS_VAR} true PARENT_SCOPE) - set(${_VERSION_VAR} ${_major}.${_minor}.${_patch}.${_tweak} PARENT_SCOPE) + set(${_VERSION_VAR} "${CMAKE_MATCH_1}" PARENT_SCOPE) endif() endfunction() -- 1.8.5.2 -- 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://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMakeDetermineVSServicePack (was: CMake 3.0-rc3 now ready for testing)
On 04/09/2014 07:39 AM, Mourad Boufarguine wrote: > > CMake Error at D:/Program Files > (x86)/CMake/share/cmake-3.0/Modules/CMakeDetermineVSServicePack.cmake:140 > (list): > > list index: 3 out of range (-3, 2) > [snip] > > content of the _cl_version variable and it gave me 17.00.61030 > > so there is no 4th component in the version number. > > Did this work with a previous version of CMake? It looks like this > problem has always existed but did not manifest because normally there > are four components in the output. > I just tried with CMake 2.8.12.2 and I confirm I had the same issue. > > Please print and report the content of "_output" so we can see why it > does not match as expected and fix the module accordingly. > Here is the content of the _output variable using CMake *2.8.12.2*: Change Dir: C:/temp/eigen-eigen-6b38706d90a9/build/CMakeFiles/CMakeTmp Run Build Command:C:\PROGRA~2\MICROS~3.0\Common7\IDE\devenv.comCMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec3971839849 Microsoft (R) Microsoft Visual Studio 2012 Version 11.0.61030.0. Copyright (C) Microsoft Corp. All rights reserved. 1>-- Build started: Project: cmTryCompileExec3971839849, Configuration: Debug x64 -- 1>Build started 4/10/2014 10:01:40 AM. 1>PrepareForBuild: 1> Creating directory "C:\temp\eigen-eigen-6b38706d90a9\build\CMakeFiles\CMakeTmp\Debug\". 1>InitializeBuildStatus: 1> Creating "cmTryCompileExec3971839849.dir\Debug\cmTryCompileExec3971839849.unsuccessfulbuild" because "AlwaysCreate" was specified. 1>ClCompile: 1> Microsoft (R) C/C++ Optimizing *Compiler Version 17.00.61030* for x64 1> Copyright (C) Microsoft Corporation. All rights reserved. 1> 1> cl /c /Zi /W4 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec3971839849.dir\Debug\\" /Fd"cmTryCompileExec3971839849.dir\Debug\vc110.pdb" /Gd /TP /wd4127 /wd4505 /wd4714 /errorReport:prompt "C:\temp\eigen-eigen-6b38706d90a9\build\return0.cc" 1> 1> return0.cc 1>Link: 1> cmTryCompileExec3971839849.vcxproj -> C:\temp\eigen-eigen-6b38706d90a9\build\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec3971839849.exe 1>FinalizeBuildStatus: 1> Deleting file "cmTryCompileExec3971839849.dir\Debug\cmTryCompileExec3971839849.unsuccessfulbuild". 1> Touching "cmTryCompileExec3971839849.dir\Debug\cmTryCompileExec3971839849.lastbuildstate". 1> 1>Build succeeded. 1> 1>Time Elapsed 00:00:00.28 == Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped == Here is the content of the _output variable using* CMake 3.0 RC3*: Change Dir: C:/temp/eigen-eigen-6b38706d90a9/build-cmake3/CMakeFiles/CMakeTmp Run Build Command:"C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe" "cmTryCompileExec197569480.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=11.0" Microsoft (R) Build Engine version 4.0.30319.17929 [Microsoft .NET Framework, version 4.0.30319.18063] Copyright (C) Microsoft Corporation. All rights reserved. Build started 4/10/2014 10:07:10 AM. Project "C:\temp\eigen-eigen-6b38706d90a9\build-cmake3\CMakeFiles\CMakeTmp\cmTryCompileExec197569480.vcxproj" on node 1 (default targets). PrepareForBuild: Creating directory "cmTryCompileExec197569480.dir\Debug\". Creating directory "C:\temp\eigen-eigen-6b38706d90a9\build-cmake3\CMakeFiles\CMakeTmp\Debug\". InitializeBuildStatus: Creating "cmTryCompileExec197569480.dir\Debug\cmTryCompileExec197569480.unsuccessfulbuild" because "AlwaysCreate" was specified. ClCompile: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\CL.exe /c /Zi /W4 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec197569480.dir\Debug\\" /Fd"cmTryCompileExec197569480.dir\Debug\vc110.pdb" /Gd /TP /wd4127 /wd4505 /wd4714 /errorReport:queue "C:\temp\eigen-eigen-6b38706d90a9\build-cmake3\return0.cc" Microsoft (R) C/C++ Optimizing *Compiler Version 17.00.61030* for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /Zi /W4 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTryCompileExec197569480.dir\Debug\\" /Fd"cmTryCompileExec197569480.dir\Debug\vc110.pdb" /Gd /TP /wd4127 /wd4505 /wd4714 /errorReport:queue "C:\temp\eigen-eigen-6b38706d90a9\build-cmake3\return0.cc" return0.cc Link: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\temp\eigen-eigen-6b38706d90a9\build-cmake3\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec197569480.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /m