Asterion Daedalus | 1 Jul 2012 02:25
Picon
Favicon

MSVC++ IDE is licensed but CMAKE build appears to fail to pick up licence from command line

I have found an problem that appears in two open source projects I downloaded.  Both appear to balk because of a missing or expired VC++ licence.  This is despite the fact that the IDE is running with a licence.

MSN "help" simply claims it is a bug in CMAKE so I feel that I will be ping-ponging.  

Has anyone else come across, or more importantly solved the problem?  I am trying a re-install of MS VC++ at this moment as I am assuming it is the culprit because two CMAKE makes, from different authors, are having the same problem.


CMakeError as follows: ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Determining if the C compiler works failed with the following output:
Change Dir: C:/Development/SLAM/tinyslam/trunk/CMakeFiles/CMakeTmp

Run Build Command:c:\PROGRA~2\MICROS~1.0\Common7\IDE\devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec2590749267


Microsoft (R) Visual Studio Version 10.0.30319.1.

Copyright (C) Microsoft Corp. All rights reserved.



The evaluation period for Visual Studio Trial has ended.



The evaluation period for this product has ended.

Determining if the C compiler works failed with the following output:
Change Dir: C:/Development/SLAM/tinyslam/trunk/CMakeFiles/CMakeTmp

Run Build Command:c:\PROGRA~2\MICROS~1.0\Common7\IDE\devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec2387694939


Microsoft (R) Visual Studio Version 10.0.30319.1.

Copyright (C) Microsoft Corp. All rights reserved.



The evaluation period for Visual Studio Trial has ended.



The evaluation period for this product has ended.

Determining if the C compiler works failed with the following output:
Change Dir: C:/Development/SLAM/tinyslam/trunk/CMakeFiles/CMakeTmp

Run Build Command:c:\PROGRA~2\MICROS~1.0\Common7\IDE\devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec2133091021


Microsoft (R) Visual Studio Version 10.0.30319.1.

Copyright (C) Microsoft Corp. All rights reserved.



The evaluation period for Visual Studio Trial has ended.



The evaluation period for this product has ended.

Determining if the C compiler works failed with the following output:
Change Dir: C:/Development/SLAM/tinyslam/trunk/CMakeFiles/CMakeTmp

Run Build Command:c:\PROGRA~2\MICROS~1.0\Common7\IDE\devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec778085461


Microsoft (R) Visual Studio Version 10.0.30319.1.

Copyright (C) Microsoft Corp. All rights reserved.



The evaluation period for Visual Studio Trial has ended.



The evaluation period for this product has ended.

Determining if the C compiler works failed with the following output:
Change Dir: C:/Development/SLAM/tinyslam/trunk/CMakeFiles/CMakeTmp

Run Build Command:c:\PROGRA~2\MICROS~1.0\Common7\IDE\devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec3983230543


Microsoft (R) Visual Studio Version 10.0.30319.1.

Copyright (C) Microsoft Corp. All rights reserved.



The evaluation period for Visual Studio Trial has ended.



The evaluation period for this product has ended.

Determining if the C compiler works failed with the following output:
Change Dir: C:/Development/SLAM/tinyslam/trunk/CMakeFiles/CMakeTmp

Run Build Command:C:\PROGRA~2\MICROS~1.0\Common7\IDE\devenv.com" CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec2788015710
The system cannot find the file specified
Generator: execution of make failed. Make command was: C:\PROGRA~2\MICROS~1.0\Common7\IDE\devenv.com" CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec2788015710


Determining if the C compiler works failed with the following output:
Change Dir: C:/Development/SLAM/tinyslam/trunk/CMakeFiles/CMakeTmp

Run Build Command:c:\PROGRA~2\MICROS~1.0\Common7\IDE\devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec1460881942


Microsoft (R) Visual Studio Version 10.0.30319.1.

Copyright (C) Microsoft Corp. All rights reserved.



The evaluation period for Visual Studio Trial has ended.



The evaluation period for this product has ended.



--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Nicholas Yue | 1 Jul 2012 02:50
Picon

Re: MSVC++ IDE is licensed but CMAKE build appears to fail to pick up licence from command line

On 1/07/12 10:25 AM, Asterion Daedalus wrote:
I have found an problem that appears in two open source projects I downloaded.  Both appear to balk because of a missing or expired VC++ licence.  This is despite the fact that the IDE is running with a licence.

MSN "help" simply claims it is a bug in CMAKE so I feel that I will be ping-ponging.  

Has anyone else come across, or more importantly solved the problem?  I am trying a re-install of MS VC++ at this moment as I am assuming it is the culprit because two CMAKE makes, from different authors, are having the same problem.
I came across a similar problem in the past.

Do you have another installation of Visual Studio somewhere on your systems e.g. the Express edition or Visual Studio 2008 ?

I didn't get to the bottom of how the problem went away but we had Express installed and purchased the Professional version later and evaluated for the 30 days. Around the end of the evaluation period (last couple of days) is where the problem started even when we put in the proper license information. As I recall, it went away **after** the evaluation period as the software started using the purchased license.

As with Windows, rebooting may help.

HTH.

Regards
-- Nicholas Yue Graphics - RenderMan, Visualization, OpenGL, HDF5 Custom Dev - C++ porting, OSX, Linux, Windows Management - Recruitment, career management http://www.proceduralinsight.com/ http://au.linkedin.com/in/nicholasyue
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Nicholas Yue | 1 Jul 2012 04:27
Picon

CMake + Eclipse on OS X : OpenGL and GLUT headers

Hi,

     I am using CMake 2.8.8

     I have been generating Eclipse project and building my software 
successfully both on the command line and within Eclipse.

     However, when I open up my project in Eclipse, the indexer fails to 
find the necessary headers for OpenGL and GLUT

     Moreover, I noticed the following via ccmake

     GLUT_INCLUDE_DIR /System/Library/Frameworks/GLUT.framework/Headers
     OPENGL_INCLUDE_DIR /System/Library/Frameworks/OpenGL.framework

     Note the differences in the directory "Headers"

     Is there additional steps for the OS X platform so that code 
completion and C++ indexer works properly when using OpenGL and GLUT on 
OS X when generating Eclipse project files via CMake.

Regards

-- 
Nicholas Yue
Graphics - RenderMan, Visualization, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
Management - Recruitment, career management
http://www.proceduralinsight.com/
http://au.linkedin.com/in/nicholasyue

--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

hce | 2 Jul 2012 08:20
Picon

Why execute_process failed escape sequence \/?

Hi,

I can most of shell commands in execute_process(), but cmake failed at
following errors when I added "sed 's/^.\///g'" to execute_process():

Syntax error in cmake code, when parsing string 's/^.\///g', Invalid escape
sequence \/, Call Stack ...

But without the escape sequence \/, the shell command could not run, how can
I make the execute_process() run shell command with escape sequence \/ ?

Thank you.

--
View this message in context: http://cmake.3232098.n2.nabble.com/Why-execute-process-failed-escape-sequence-tp7580706.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Rolf Eike Beer | 2 Jul 2012 08:41
Picon

Re: Why execute_process failed escape sequence \/?

> Hi,
>
> I can most of shell commands in execute_process(), but cmake failed at
> following errors when I added "sed 's/^.\///g'" to execute_process():
>
> Syntax error in cmake code, when parsing string 's/^.\///g', Invalid
> escape
> sequence \/, Call Stack ...
>
> But without the escape sequence \/, the shell command could not run, how
> can
> I make the execute_process() run shell command with escape sequence \/ ?

You must escape the backslash, so it doesn't get stripped by the CMake
parser: 's/^.\\///g'

Bonus trick: you can avoid it altogether by just using a different
character as delimiter: 's,^./,,g'

Just wondering: do you want to work on some find output? Then you also
need to escape the ".".

Eike
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Sergio Vera | 2 Jul 2012 11:14
Gravatar

Minor flaw when compiling VMTK with CMAKE + Win32 + MinGW32

Hello all
By now, I'm used to specify manualy my CMAKE_RC_COMPILER when I build mingw projecs.

However, when building VMTK superbuild, even if I specify the CMAKE_RC_COMPILER variable in the cmake-gui, this value is not relayed to subprojects.
So in order to compile it I had to manually set

//RC compiler.
CMAKE_RC_COMPILER:FILEPATH=C:/<path-to>/windres.exe

in <build-dir>\VMTK-Build\CMakeCache.txt

I don't know if this is a problem with CMAKE or with VMTK scripts, but there seems to be some minor problem here that may be easily fixed.

--
Sergio Vera

 Alma IT Systems
 C/ Vilana, 4B, 4º 1ª
 08022 Barcelona
 T. (+34) 932 380 592
 www.alma3d.com
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Evgeny Startsev | 2 Jul 2012 12:25
Picon

Automatic rebuild of external projects

I am using external project module for cmake. Is there any way to rebuild local external project (from local directory), then its sources was changed? I have tried special DOWNLOAD_COMMAND or UPDATE_COMMAND, but this commands called only first time.

--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Yuri Timenkov | 2 Jul 2012 13:55
Picon

Re: Automatic rebuild of external projects

Hi,

It's possible with some modifications to ExternalProject.cmake:
http://public.kitware.com/Bug/view.php?id=12322

However it is not encouraged by CMake developers.

On Mon, Jul 2, 2012 at 2:25 PM, Evgeny Startsev
<exbluesbreaker@...> wrote:
> I am using external project module for cmake. Is there any way to rebuild
> local external project (from local directory), then its sources was changed?
> I have tried special DOWNLOAD_COMMAND or UPDATE_COMMAND, but this commands
> called only first time.
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

David Cole | 2 Jul 2012 14:13
Favicon
Gravatar

Re: Automatic rebuild of external projects

It's possible without modifying ExternalProject as well. One technique
we've adopted on several projects looks something like this:

  # After the ExternalProject_Add call for "myProject"
  ExternalProject_Add_Step(myProject forceconfigure
    COMMAND ${CMAKE_COMMAND} -E echo "Force configure of myProject"
    DEPENDEES update
    DEPENDERS configure
    ALWAYS 1)

Or, you can use "DEPENDEES configure DEPENDERS build" as a "forcebuild" step.

This is such a common request, that we will probably add
ALWAYS_CONFIGURE and ALWAYS_BUILD options to ExternalProject_Add in a
future version.

HTH,
David

On Mon, Jul 2, 2012 at 7:55 AM, Yuri Timenkov <yuri@...> wrote:
> Hi,
>
> It's possible with some modifications to ExternalProject.cmake:
> http://public.kitware.com/Bug/view.php?id=12322
>
> However it is not encouraged by CMake developers.
>
> On Mon, Jul 2, 2012 at 2:25 PM, Evgeny Startsev
> <exbluesbreaker@...> wrote:
>> I am using external project module for cmake. Is there any way to rebuild
>> local external project (from local directory), then its sources was changed?
>> I have tried special DOWNLOAD_COMMAND or UPDATE_COMMAND, but this commands
>> called only first time.
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Matthew Schuchard | 2 Jul 2012 16:22
Picon
Favicon

CMake 2.8.6 --> 2.8.8 New TryCompile Fails on GCC-GNAT Ada Linking

So I am back for more CMake fun in attempting to get it working with our 
massive and convoluted product.  I am now trying to use my office 
computer to configure and build our software, and am hitting an issue 
with the new TryCompile in CMake 2.8.8 (or possibly 2.8.7 if it was 
introduced then).

My machine is running RedHat 6 which has GNU44 as baseline (as opposed 
to earlier RHEL-5 which had GNU41 as baseline).  Fortran, C, and C++ are 
all working fine thus far with code changes I made, but I am hitting a 
snag with Ada and CMake 2.8.8.  We have a custom RPM made for CMake 
2.8.6 RHEL-5 which interacted well with GNAT41, but I yum installed 
CMake 2.8.8 and GCC-GNAT 4.4.6 and expected everything to still perform 
the same (I am naive sometimes).

I am pretty sure this issue is because of a code change made to the 
TryCompile behavior between CMake 2.8.6 and CMake 2.8.8.  TryCompile now 
creates unique directory names, i.e.

${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeFiles/cmTryCompileExec(RANDOMNUMBERSTRING).dir/(TRYCOMPILE 
OUTPUT FILES)
I used the --debug-trycompile argument during configuration to get some 
more information, and I see that the target name is being generated with 
the random number string.  This breaks both my custom Ada CMake 
toolchain and the freely available one on the internet because both have 
similar link statement methodologies (mine below):

"${CMAKE_Ada_BUILDER} <LINK_FLAGS> <TARGET_BASE>.adb -cargs <FLAGS> 
-bargs ${CMAKE_Ada_BIND_FLAGS} -largs <CMAKE_Ada_LINK_FLAGS> 
<LINK_LIBRARIES>"

This, of course, generates a link statement for TryCompile similar to 
the following:

/usr/bin/gnatmake   cmTryCompileExec162931069.adb -cargs  
-gnatec/path/to/gnat.adc   -g -Wall   -bargs  -largs  -rdynamic

which obviously fails since the file is named cmTryCompileExec.adb.  
This file is specified in my CMakeTestAdaCompiler.cmake via:

FILE(WRITE 
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmTryCompileExec.adb
     "with Ada.Text_IO;\n"
     "use Ada.Text_IO;\n"
     "procedure cmTryCompileExec is\n"
     "begin\n"
     "Put(\"Hello World\");\n"
     "end cmTryCompileExec;\n")

<OBJECTS> does not work because it appends a ".o" extension to the 
target.  There is no way of getting around this either because 
"SET(CMAKE_Ada_OUTPUT_EXTENSION .o)" and 
"SET(CMAKE_Ada_OUTPUT_EXTENSION_REPLACE 1)" are both needed in the 
compiler configuration input file. <TARGET> fails for the same reason as 
<TARGET_BASE>.

I could always try to force the Ada ABI and then it skips the 
compilation test (correct?), but i want to avoid that if at all possible.

So I basically need a way to block or strip off the random number string 
from the target, or revert CMake's TryCompile behavior to the method 
from 2.8.6.  Eventually we will be updating the CMake and Redhat 
versions we officially use, so I need to get Ada working with newer 
versions of GNAT and CMake.  If there is a clean way of fixing this that 
does not involve hacking off the number string, so much the better.

I am out of ideas at this point and would welcome virtually any 
suggestions.  The only feasible idea I can think of is to loop through 
the TryCompile directories and "sed" off the random number string from 
the link.txt files for Ada, which sounds really ugly, but still would 
probably work.  Thank you for your attention.
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Gmane