[CMake] Fwd: Setting Build properties for VS 2008
-- Forwarded message -- From: John Drescher dresche...@gmail.com Date: Thu, Mar 17, 2011 at 5:43 AM Subject: Re: [CMake] Setting Build properties for VS 2008 To: Dan Furtney dfurt...@cox.net On Wed, Mar 16, 2011 at 11:25 PM, Dan Furtney dfurt...@cox.net wrote: Is there a way for cmake to set the active build in a multi-project VS solution? Not directly. However you may be able to generate a .user file (xml based user settings file) without too much effort. John -- John M. Drescher ___ 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
Re: [CMake] Bug fix requests for the *next* release of CMake...
http://public.kitware.com/Bug/view.php?id=11206 John ___ 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
[CMake] Disable buffer security check in visual studio /GS-
After profiling my Visual Studio 2005 application I see that over 5% of the execution time in the Release build was spent doing buffer security checks. I found the following link for CMake support http://www.cmake.org/pipermail/cmake-commits/2008-March/003844.html however I do not understand what that buys me. There is no option that I can see in cmake-gui for disabling buffer security checks. I would expect I could add my own option for my application but that would not help itk or vtk. Thanks, John M. Drescher ___ 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
Re: [CMake] Disable buffer security check in visual studio /GS-
On Wed, Apr 20, 2011 at 12:55 PM, John Drescher dresche...@gmail.com wrote: After profiling my Visual Studio 2005 application I see that over 5% of the execution time in the Release build was spent doing buffer security checks. I found the following link for CMake support http://www.cmake.org/pipermail/cmake-commits/2008-March/003844.html I guess that is not the best link since its a patch to enable detecting 64 bit portability but it does show CMake identifies the option. John ___ 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
Re: [CMake] unscribe
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
Re: [CMake] manifest version mismatch with VS 2008 and InstallRequiredSystemLibraries
On Tue, May 3, 2011 at 11:43 AM, Tyler ty...@cryptio.net wrote: My project makes use of the CMake/CPack module InstallRequiredSystemLibraries to package Microsoft Visual C Runtime libraries with other build artifacts. Despite this and despite the presence of appropriate-looking files showing up in the installed image, my project does not run on XP and Vista machines unless the user installs the vcredist package from Microsoft. The VC runtime libraries provided by Microsoft and picked up by CMake/CPack have a manifest version of 9.0.30729.4148. I believe this version string refers to VS2008 SP1 + some hotfix. This seems reasonable since my Windows build machine is running VS2008 SP1 + some hotfix. However, all the binaries produced by the build system have the version sting 9.0.21022 embedded internally in a manifest. Are you sure that all the libraries and dlls you use in your project were compiled with VS2008 SP1 + some hotfix. I have in the past when I updated the compiler but forgot to clean build all of the dependencies (like Qt and VTK). John ___ 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
Re: [CMake] Testing and DLLs
I am curious whether there is a common way of dealing with unit tests when the actual project to be tested is a DLL? The issue I am facing is a common Windows issue where the required DLL is not found in the path. I tried to put all binaries in the same directory by modifying CMAKE_*_OUTPUT_DIRECTORY but that did not affect my tests (added via add_test). Another solution I can think of is running make INSTALL before running the tests but that feels like a strange approach since I typically want to test before installing. Its also not really possible to adapt the PATH environment variable - how could I possible guess where somebody is going to build my code!? So again, I am really curious if there is a well working solution. I now have a custom build script that generates a batch file that copies (using cmake commands) the required dlls into the Debug, Release, RelWithDebInfo folders for me for the few libraries that require dlls (Qt ). For ITK, VTK ... I use static libs so no need to copy these. option (GET_RUNTIME Create a target that will get the runtime ON) IF (GET_RUNTIME) SET (${PROJECT_NAME}_PACKAGING_RUNTIME ) SET (RUNTIME_BATCH_FILENAME ${PROJECT_BINARY_DIR}/GetRuntime.bat CACHE FILEPATH ${PROJECT_BINARY_DIR}/GetRuntime.bat) add_custom_target(GetRuntime ${RUNTIME_BATCH_FILENAME}) # macro( add_runtime_file BatchFileName RuntimeFile Configuration ) # Test if this is a valid configuration. STRING( REGEX MATCH ${Configuration} __MATCHED__ ${CMAKE_CONFIGURATION_TYPES}) if ( NOT ${__MATCHED__} STREQUAL ) IF (NOT EXISTS ${EXECUTABLE_OUTPUT_PATH}/${Configuration}) file( MAKE_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}/${Configuration} ) ENDIF (NOT EXISTS ${EXECUTABLE_OUTPUT_PATH}/${Configuration}) GET_FILENAME_COMPONENT( BatchFile ${BatchFileName} NAME_WE ) #The following will truncate the file on the first call to add_runtime_file. if ( NOT DEFINED __add_runtime_file_${BatchFile}__ ) set ( __add_runtime_file_${BatchFile}__ 1) file( WRITE ${BatchFileName} REM This file will copy the runtimes to the Debug and Release binary folders\n ) endif ( NOT DEFINED __add_runtime_file_${BatchFile}__) #The following line will add the entry in the batch file for copying the Runtime file to the folder ${PROJECT_BINARY_DIR}/${Configuration}/ file( APPEND ${BatchFileName} \${CMAKE_COMMAND}\ -E copy_if_different \${RuntimeFile}\ \${EXECUTABLE_OUTPUT_PATH}/${Configuration}/\\n ) endif( NOT ${__MATCHED__} STREQUAL ) endmacro( add_runtime_file ) # macro( add_runtime_file_for_packaging RuntimeFile ) SET( ${PROJECT_NAME}_PACKAGING_RUNTIME ${${PROJECT_NAME}_PACKAGING_RUNTIME} ${RuntimeFile} ) endmacro( add_runtime_file_for_packaging ) ENDIF(GET_RUNTIME) ___ 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
Re: [CMake] Testing and DLLs
On Wed, May 4, 2011 at 12:25 PM, Michael Jackson mike.jack...@bluequartz.net wrote: Funny, I did the same thing using pure CMake code because I couldn't figure out batch files. BTW, I started from your example of your macro to create my macro. Thanks. John ___ 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
Re: [CMake] How do you go about building the cmake-gui from source in 2.8.4?
Yeah, I figured that part out indirectly. I had to install the QT4 SDK to get the necessary bits, but rcc.exe (Windows XP, desktop component of QT) fails for no obvious reason. Did you build that from scratch using Visual Studio 2005 and not any other compiler or version? Here is what I posted on the QT installation/deployment forum about the problem: I’m trying to rebuild CMake-gui. Are you trying to modify it for some reason? I also do not see the need to rebuild it. I’ve gotten to the point where I downloaded and installed the QT4 SDK, configured CMake for VS 2005 and fired up the build, which failed when trying to run rcc.exe. When I try to run RCC.EXE directly from the command prompt, I get: The system cannot execute the specified program. When I try it from cygwin’s command prompt, I get: You should not mix cygwin building and visual studio building. What are you doing here? Permission Denied Firing up Dependency Walker, I get an error when opening rcc.exe: The side-by-side configuration information for “…desktop\qt\4.7.3\msvc2005\bin\RCC.EXE” contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001). This usually means you do not have the correct run times installed. Did you download the Visual Studio 2008 binary release. That will not work with Visual Studio 2005. You need to build Qt for your compiler. Which I tried with no joy. There are a couple of delay loaded dlls that aren’t present, IESHIMS and WER, but these appear to be more or less specific to Vista and don’t apply to XP (which is what I’m running on). So how do I get around this? Is this an SDK problem? or something really obscure in Windoze? I’m not primarily a Windows person so I’m not 100% on all the ins and outs here, but I would think that the RCC.EXE as installed by the QT4 SDK installer should at least start on XP. Any and all hints will be appreciated. Best, Dick Munroe Any clues? On 5/13/11 5:45 AM, cmake-requ...@cmake.org wrote: Message: 5 Date: Thu, 12 May 2011 16:43:04 -0600 From: clin...@elemtech.com clin...@elemtech.com Subject: Re: [CMake] How do you go about building the cmake-gui from source in 2.8.4? To:cmake@cmake.org Message-ID:20110512224256.a45c3129...@mta1.zcs.xmission.com Content-Type: text/plain; charset=utf-8 It is under Source/QtDialog and the cmake option has QtDialog in its name. Clint - Reply message - From: Dick Munroemun...@csworks.com Date: Thu, May 12, 2011 11:07 am Subject: [CMake] How do you go about building the cmake-gui from source in 2.8.4? To:cmake@cmake.org The title pretty much says it all. I can't find anything obvious in the source tree and I want to rebuild cmake-gui for windows. tia, Dick Munroe ___ 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 -- John M. Drescher ___ 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
Re: [CMake] Forcing CMake to never search install path
I've been struggling to find a way to prevent CMake from using CMAKE_INSTALL_PREFIX in any of its FIND_* routines. Generally speaking, stripping it out of CMAKE_SYSTEM_PREFIX_PATH seems to work, but we're still getting situations on Windows where it is finding old libraries from previous program installs. I've tried ensuring all of the CMAKE_SYSTEM_*_PATH variables are stripped, but that doesn't seem to make a difference. Is there a mechanism I can use to specify to CMake to NEVER search in a given path, excluding it from all FIND_* routine searches? It is very typical in our development process to have older builds installed and be building newer versions at the same time, so we really need a good solid way to make sure previously built libraries aren't picked up by FIND routines. Not that I have a solution however I too am looking to solve this problem. For me its not so much about INSTALL paths since I almost never run the INSTALL targets (at least not on projects that do not have different names for release and debug) on windows but it's more that a 32 bit build for Visual Studio 2005 will find the 64 bit Qt I built for Visual Studio 2010. I am thinking of looking into batch files and environment variables however I am not sure how many packages will use environment variables like ( ITK_DIR, VTK_DIR ...) John ___ 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
Re: [CMake] FindQt4.cmake to automatically include QT_USE_FILE?
If you don't care for the macros and want to set up the include-directories and defines yourself, no. Also, it is common to find_package(Qt4) in the top-level CMakeLists.txt file, but then include QT_USE_FILE only in specific subdirectories, where Qt is actually used. I have started doing that in my projects. It cuts down on the unnecessary includes for subprojects that do not need Qt. John ___ 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
Re: [CMake] Determine Installer Build Configuration in Visual Studio
I've managed to get an NSIS project up and running in VIsual Studio with CPack, but I can't figure out how to determine which configuration type is being built. Is it possible to write up a CMakeLists that will run through different conditionals based off of the Build Configuration Type selected in Visual Studio? If a user selects a Debug build I'd like to be able to tell the installer to be built with the Debug libraries instead of the Release. That is what it does. When debug is selected in Visual Studio and you build the PACKAGE project it will build this using debug libs. John ___ 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
[CMake] Dealing with down servers when using FindSubversion.cmake
I use code like the following to append a version to my applications based on the current svn rev. FIND_PACKAGE(Subversion) IF(Subversion_FOUND) Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project) MESSAGE(Current revision is ${Project_WC_REVISION}) Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project) MESSAGE(Last changed log is ${Project_LAST_CHANGED_LOG}) set (${PROJECT_NAME}_VERSION_PATCH ${${PROJECT_NAME}_VERSION_PATCH}.${Project_WC_REVISION}) ENDIF(Subversion_FOUND) The problem is if the server is down it prevented me from working since the failure to get a version ends up blocking the generate so I added an option to disable the appending if I disable the option: FIND_PACKAGE(Subversion) IF(Subversion_FOUND) OPTION(APPEND_SVN_REV Append subversion rev to application version ON) IF(APPEND_SVN_REV) Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project) MESSAGE(Current revision is ${Project_WC_REVISION}) Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project) MESSAGE(Last changed log is ${Project_LAST_CHANGED_LOG}) set (${PROJECT_NAME}_VERSION_PATCH ${${PROJECT_NAME}_VERSION_PATCH}.${Project_WC_REVISION}) ENDIF(APPEND_SVN_REV) ENDIF(Subversion_FOUND) Is there an easy way it can just cache result of these checks and if the server is down just use the cache instead of being fatal so I do not have to use the switch to turn off this when the server is down? -- John M. Drescher ___ 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
Re: [CMake] Dealing with down servers when using FindSubversion.cmake
On Mon, Jun 13, 2011 at 3:16 PM, Rolf Eike Beer e...@sf-mail.de wrote: Am Montag, 13. Juni 2011, 13:02:34 schrieb John Drescher: I use code like the following to append a version to my applications based on the current svn rev. FIND_PACKAGE(Subversion) IF(Subversion_FOUND) Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project) MESSAGE(Current revision is ${Project_WC_REVISION}) Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project) MESSAGE(Last changed log is ${Project_LAST_CHANGED_LOG}) set (${PROJECT_NAME}_VERSION_PATCH ${${PROJECT_NAME}_VERSION_PATCH}.${Project_WC_REVISION}) ENDIF(Subversion_FOUND) The problem is if the server is down it prevented me from working since the failure to get a version ends up blocking the generate so I added an option to disable the appending if I disable the option: I think your problem is not the version, but the log. The log is fetched from the server, the revisions of the files are stored inside the working copy and therefore are available offline, too. Just remove that log thing. Thanks, I will try that. I am trying to remember why I put the log part in there. I know it was nice to see the last commit in the cmake-gui but if that holds me up no reason for that.. John ___ 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
Re: [CMake] CMake 2.8.5-rc1 ready for testing!
On Wed, Jun 15, 2011 at 3:31 AM, Andrea Galeazzi galea...@korg.it wrote: I think it would be great if http://public.kitware.com/Bug/view.php?id=11258 could be fixed in 2.8.5. Without such a fix VS2010 will keep on being useless. Hmm. I have been using VS2010 for a few weeks (not primarily I use more than 1 compiler) and its certainly not useless. I have not experienced this bug yet however. John ___ 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
Re: [CMake] How does cmake find libraries?
[ 74%] Built target test_sethandler make[2]: *** No rule to make target `/usr/local/lib/libpng.dylib', needed by `tests/na/common/test_common'. Stop. make[1]: *** [tests/na/common/CMakeFiles/test_common.dir/all] Error 2 The obvious reason is that /usr/local/lib/libpng.dylib doesn't exist: arc:mbuild douglasl$ ls /usr/local/lib/ | grep png arc:mbuild douglasl$ But my cmake cache shows: LIBPNG_INCLUDE_DIR:PATH=/Library/Frameworks/Mono.framework/Headers LIBPNG_LIBRARY:FILEPATH=/usr/local/lib/libpng.dylib //ADVANCED property for variable: LIBPNG_INCLUDE_DIR LIBPNG_INCLUDE_DIR-ADVANCED:INTERNAL=1 //ADVANCED property for variable: LIBPNG_LIBRARY LIBPNG_LIBRARY-ADVANCED:INTERNAL=1 Can someone shed some light on how cmake is finding that module? Sounds like the machine config is broken, but I'm not sure exactly how to fix it. Does png.h exist in this folder /Library/Frameworks/Mono.framework/Headers John ___ 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
Re: [CMake] CMake Wiki spammed
On Thu, Jun 30, 2011 at 6:27 PM, Moreland, Kenneth kmo...@sandia.gov wrote: It looks like the CMake Wiki recently got spammed. I see several links were recently added that do not belong (head lice treatment?). Even more annoying, it looks like the spammer removed some links that do belong there. It's a mess. I was trying to back out of this but there are multiple SPAM edits in between a few good edits. Ahmed appears to have done most of the spamming. John ___ 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
Re: [CMake] CMake Wiki spammed
I think I fixed it. John On Thu, Jun 30, 2011 at 7:30 PM, David Cole david.c...@kitware.com wrote: I have forwarded this to our IT team... Hopefully it's not too hard to recover from for them. Thanks, David On Thu, Jun 30, 2011 at 7:24 PM, John Drescher dresche...@gmail.com wrote: On Thu, Jun 30, 2011 at 6:27 PM, Moreland, Kenneth kmo...@sandia.gov wrote: It looks like the CMake Wiki recently got spammed. I see several links were recently added that do not belong (head lice treatment?). Even more annoying, it looks like the spammer removed some links that do belong there. It's a mess. I was trying to back out of this but there are multiple SPAM edits in between a few good edits. Ahmed appears to have done most of the spamming. John ___ 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 -- John M. Drescher ___ 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
Re: [CMake] How to create a 64-bit Windows build of cmake?
On Mon, Aug 1, 2011 at 8:34 PM, John R. Cary c...@txcorp.com wrote: I believe I have followed what I have found on the web for building a Win64 version of CMake. I have downloaded the win32 version and used it to configure the cmake source. I used the Visual Studio 9 2008 Win64 generator. Last Friday I pulled in the cmake-git configured for 64 bit Visual Studio 2010 and generated. Opened the project it generated and built release. Then I built the package target and installed the package and I had a 64 bit version of cmake. Although with this said I have yet to see a reason to need CMake to be 64 bit except for the install location being Program Files instead of Program Files (x86). John ___ 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
Re: [CMake] How to create a 64-bit Windows build of cmake?
On Mon, Aug 1, 2011 at 10:02 PM, John R. Cary c...@txcorp.com wrote: On 8/1/11 7:04 PM, John Drescher wrote: On Mon, Aug 1, 2011 at 8:34 PM, John R. Caryc...@txcorp.com wrote: I believe I have followed what I have found on the web for building a Win64 version of CMake. I have downloaded the win32 version and used it to configure the cmake source. I used the Visual Studio 9 2008 Win64 generator. Last Friday I pulled in the cmake-git configured for 64 bit Visual Studio 2010 and generated. Thanks! I will try. I found http://www.vtk.org/Wiki/CMake/Git. So then I did: git clone git://cmake.org/cmake.git CMake cd CMake git checkout -b release origin/release Where do I find the cmake-git configured for 64 bit Visual Studio 2010? You need to use a 32 bit version of cmake to configure and generate. Open up cmake-gui, set the source folder to where you put the git. set the binary folder to a location you want to build cmake. Note: this should not be in the same folder as the source. Then configure. cmake will ask you to select the compiler. After this you want to build cmake-gui as well. There is a configuration option for that. Also cmake probably will not find Qt so you need to set the location of qmake to a 64 bit build of Qt. You will most likely have to build that since nokia does not supply 64 bit windows binaries. Then generate. This will create a visual studio project in the binary folder. John ___ 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
Re: [CMake] access absolute path of parent directory
I've been trying to access the parent directory by using CMakeLists.txt. However, the ../ or .. or /../ notations don't access said parent directory. Can you show a small example? I know this has worked for me. John ___ 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
[CMake] Fwd: access absolute path of parent directory
-- Forwarded message -- From: John Drescher dresche...@gmail.com Date: Tue, Aug 9, 2011 at 4:56 PM Subject: Re: [CMake] access absolute path of parent directory To: Vinay Raj Hampapur vinayraj.hampa...@gmail.com On Tue, Aug 9, 2011 at 4:24 PM, Vinay Raj Hampapur vinayraj.hampa...@gmail.com wrote: Sure. Here is what I have(I've tried it with double quotes as well): set(Bob /..) set(Dave ${Bob}/Dave) set(D_src ${Dave/Dave.cpp) ... and corresponding add executable command at which point the following error is produced: You are setting Bob to be the root folder of your system. Remove the / in your first set set(Bob ..) John -- John M. Drescher ___ 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
Re: [CMake] Fwd: [CMake 0012398]: IF infamous variable/string functionality fails to work with macro arguments
On Mon, Aug 15, 2011 at 11:26 AM, David Cole david.c...@kitware.com wrote: Thanks, Michael... I'll give this another week or so here on the mailing list (and in the bug tracker) to gather feedback. If I don't hear anything else, I'll consider changing some documentation to clarify the existing situation, but I don't see a reasonable way to accommodate this feature request *and* maintain backwards compatibility with existing real world uses of macro and if commands. I would like to see the documentation expanded to better explain the differences between a function and a macro. Before this discussion I have never used a function (did not understand what that gave me over a macro) however I have ran into this problem with using if statements in macros. John ___ 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
Re: [CMake] deploy VS2008 application
The application I deployed is a DEBUG version and I have include(InstallRequiredSystemLibraries) in my CMakeLists.txt. However, msvc(m/p/r)90.dll instead of msvc(m/p/r)90d.dll are copied to the destination folder. Any idea why this happened? Do you realize that it is a violation of your Visual Studio license to deploy debug libraries? John ___ 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
Re: [CMake] Why do jom/nmake generators require cl to build with mingw?
On Thu, Sep 15, 2011 at 8:08 AM, John R. Cary c...@txcorp.com wrote: I was trying to configure a project to use jom or name with the mingw compilers. I was configuring with cmake \ -DCMAKE_INSTALL_PREFIX:PATH=C:/winsame/volatile-mingw/txphysics-r1504-ser \ -DCMAKE_BUILD_TYPE:STRING=RELEASE \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \ -DCMAKE_INSTALL_ALWAYS:BOOL=TRUE \ -DCMAKE_COLOR_MAKEFILE:BOOL=FALSE \ -G 'NMake Makefiles' \ -DCMAKE_C_COMPILER:FILEPATH='mingw32-gcc' \ -DCMAKE_CXX_COMPILER:FILEPATH='mingw32-g++' \ -DCMAKE_Fortran_COMPILER:FILEPATH='mingw32-gfortran' \ C:/cygwin/home/user/vorpalall-mg/txphysics but got the warning, CMake Warning at CMakeLists.txt:10 (project): To use the NMake generator, cmake must be run from a shell that can use the compiler cl from the command line. This environment does not contain INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to work. and ultimately the error, CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeRCInformation.cmake:22 (GET_FILENAME_COMPONENT): get_filename_component called with incorrect number of arguments Call Stack (most recent call first): C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-GNU.cmake:60 (enable_language) C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-GNU-C.cmake:1 (include) C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:56 (INCLUDE) CMakeLists.txt:2 (PROJECT) So I did put cl in my path, and now it configures, but this seems strange. Is it necessary to still have cl when using mingw? I thought jom and nmake Generators were both for Visual Studio. John ___ 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
Re: [CMake] User generated header file
Do you want the user to manually add the header, or do you want cmake to create it? User will manually add it before compile, so Eric mentioned setting the GENERATED property to true, it works. The fact is it works the way you want, which is good, but beside that why would it be better for the user to face a failing build (because he forgot to create the file) than face a failing CMake run (because he forgot to create the file)? My question is can't you have CMake generate the header for the user instead of them supplying a file? Is it just defines in this header? John ___ 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
Re: [CMake] User generated header file
On Mon, Sep 19, 2011 at 14:13, John Drescher dresche...@gmail.com wrote: My question is can't you have CMake generate the header for the user instead of them supplying a file? Is it just defines in this header? It's basically user/site-specific defines that is based on user preferences and availability of libraries/devices on their Windows platform. At the moment for Windows Visual Studio users we force them to do this manually. To me this sounds like something that would be perfect to do with CMake options and some usage of find_libraray, maybe some environment variables to help out. However I do not mean to tell you how to configure your software.. John ___ 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
Re: [CMake] ExternalProject: avoiding rebuilds
On Sat, Sep 24, 2011 at 4:11 AM, Rolf Eike Beer e...@sf-mail.de wrote: Am Freitag, 23. September 2011, 16:26:46 schrieb Ben Medina: Hello all, I'm trying to adopt greater usage of ExternalProject in my project. One problem I'd like to resolve is spurious rebuilds of external projects. [...] This works great: building test first untars the CLAPACK source and builds it, as expected. However, if I rebuild test (i.e. in Visual Studio, right-click on test and rebuild), then the CLAPACK tarball get extracted *again*, and a full rebuild of CLAPACK happens. I'd expect that, unless the tarball is changed, a rebuild of the external project is a no-op. Is there a way to achieve my desired behavior? Yes, use the correct option. Rebuild means rebuild this target and all of it's dependencies. There is a different option, something like rebuild only this target. Just use this one. That may be difficult in practice. I mean I typically have 20 to 40 targets in my projects and sometimes I would want them all rebuilt. However I there is a batch build option in Visual Studio that can be used for that. In this case you check which targets you want built so you can click select all and then uncheck the external project. John -- 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
Re: [CMake] simple cmake example
On Fri, Oct 7, 2011 at 6:00 PM, Tim Coddington tim.codding...@rteamworks.com wrote: Hi I recently started working with open source code that uses cmake for build. I've been able to make do since most of the CMakeLists.txt files are provided or specific instructions are given. I'm about to embark on my first contribution to build a driver for an IMU and I want to build an example that is very similar to mine but it's been extracted from an existing code tree, i.e. current CMakeLists.txt files would port easily. I'm having problems constructing what should be a relatively straightforward CMakeLists.txt file for the extracted code that I want to run in isolation. I've been reading tutorials, etc but I don't seem to get it. Please consider taking my general C++ example described below and tell me what (exactly) the CMakeLists.txt should look. [Ubuntu 11.04, cmake 2.8.3, C++ code] Given: Top level directory proj/ and subdir proj/src The proj/ directory shall contain the parent CMakeLists.txt and proj/src shall contain a child CMakeLists.txt (if necessary/appropriate). The src/ directory contains these source related files: file1.h header only no associated cpp file file2.h header only file3.h file3.cpp file4.h file4.cpp main.cpp In addition to standard references, some of these files depend on external library which is found with the FIND_PACKAGE(MRPT REQUIRED hwdrivers slam) [note: these libraries come from Mobile Robot Programming Toolkit] Please tell me what the two (or one) CMakeLists.txt file(s) should contain in order to build this code. Something like the following: cmake_minimum_required(VERSION 2.8) PROJECT(MYProjectName) FIND_PACKAGE(MRPT REQUIRED hwdrivers slam) include(${MRPT_USE_FILE}) # Set your files and resources here SET(${PROJECT_NAME}_SRC ./src/file3.cpp ./src/file4.cpp ./src/main.cpp ) SET(${PROJECT_NAME}_HDR ./src/file1.h ./src/file2.h ./src/file3.h ./src/file4.h ) include_directories(src) ADD_EXECUTABLE( ${PROJECT_NAME} ${${PROJECT_NAME}_SRC} ${${PROJECT_NAME}_HDR}) TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${MRPT_LIBRARIES) -- 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
Re: [CMake] simple cmake example
On Fri, Oct 7, 2011 at 11:23 PM, Tim Coddington tim.codding...@rteamworks.com wrote: Thank you. After adapting your file ccmake complains about line 7: include(${MRPT_USE_FILE}) CMake Error at CMakeLists.txt:7 (include): include called with wrong number of arguments. Include only takes one file. How is MRPT_USE_FILE defined? Sorry. In the 2 minutes I spent on creating the example for you I did not look up the finder for MRPT but assumed it followed the standard that most other packages use. Do as Michael says for that.. John -- 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
Re: [CMake] Common CMake setup for several projects
On Fri, Oct 14, 2011 at 7:33 AM, Paul Hansen paul.hansen.n...@gmail.com wrote: Hi Is it possible to make a common CMake setup that can be used in several projects? The projects are independant but do use common libraries. Would be nice to set this up in one place and not in the CMakeLists.txt for each project. Can it be done preprocessor-like: #include /path/to/common/CMakeLists.txt Yes. include(/path/to/common/CMakeLists.txt) However I would change the name to something like the following: include(/path/to/common/InitilaizeProjects.cmake) or is the way to make a top CMakeLists.txt that uses add_subdirectory(project1) add_subdirectory(project2) or a third way? Thank you very much Paul -- 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 -- John M. Drescher -- 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
Re: [CMake] Solution directory support
On Mon, Oct 24, 2011 at 6:14 PM, Robert Dailey rcdai...@gmail.com wrote: Does CMake support the creation of solution directories yet? Also the ability to assign targets to solution directories would be essential. The main reason I would use them is to organize/hide CTest projects so that they don't double the list of projects in the solution (I have 120 projects right now, after tests I would have over 300 projects. I need to be able to stuff the 180 test projects in a solution directory to keep them out of the way) This is called Solution Folders. Add this to the top level CMakeLists.txt #Use solution folders. set_property(GLOBAL PROPERTY USE_FOLDERS ON) # Then in some target add this to put the target in the Development folder. set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Development) -- 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
Re: [CMake] Precompiled header support in Visual Studio?
On Tue, Oct 25, 2011 at 11:43 AM, Robert Dailey rcdai...@gmail.com wrote: Bumping this in hopes for some help! Your version is different than the stackoverflow example Line SET(Sources ${${SourcesVar}}) should be SET(Sources ${${source}}) since you renamed the SourcesVar parameter. John -- 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
Re: [CMake] Precompiled header support in Visual Studio?
On Tue, Oct 25, 2011 at 12:01 PM, John Drescher dresche...@gmail.com wrote: On Tue, Oct 25, 2011 at 11:43 AM, Robert Dailey rcdai...@gmail.com wrote: Bumping this in hopes for some help! Your version is different than the stackoverflow example Line SET(Sources ${${SourcesVar}}) should be SET(Sources ${${source}}) since you renamed the SourcesVar parameter. Also it looks the other parameters are renamed and need to be fixed. John M. Drescher -- 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
Re: [CMake] Setting Platform (Win32 or x64) for Visual Studio in CMake
On Wed, Oct 26, 2011 at 10:17 AM, Ludovic Hoyet lho...@gmail.com wrote: Just to know, is there a way to set the platform in the CMakeList? At the moment if I select VS_XXX if creates uses the Win32 platform, and the x64 is used if I select VS_XXX x64. I would like to set a variable to the default platform (no pb with that), and let the users modify if if they really want (therefore create a Win32 platform from VS_XXX x64 if that's what they want, from setting this variable)... Thanks You do this by setting the generator. I would not hardwire that in a CMakeLists.txt file. Instead if you want create a batch file that calls cmake.exe with the appropriate generator.. -- 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
Re: [CMake] cl is not able to compile -VS2010 C1060: compiler out of heap space
On Thu, Oct 27, 2011 at 8:35 AM, Nelis neliswill...@gmail.com wrote: Hi CMake 2.8.6, newly installed VS2010, previously VS2005 (dir renamed for now), XPSP3, swap space 5GB. Running configure freshly after the cache is deleted, on two different CMakeLists project files. CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE): The C compiler cl is not able to compile a simple test program. ... Run Build Command:C:\PROGRA~1\MICROS~2.0\Common7\IDE\devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec Microsoft (R) Visual Studio Version 10.0.40219.1. 1-- Build started: Project: cmTryCompileExec, Configuration: Debug Win32 -- 1 testCCompiler.c 1c1 : fatal error C1060: compiler is out of heap space == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped == CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:16 (PROJECT) The same little cmake test program compiles inside VS2010 IDE. The CMakeLists project file works on other PCs, but not mine. Could it be as a result of stuff from previous VS versions lying around? - cleaned out all environmental variables - renamed VS2005 directory to false name, so that paths to VS2005 won't work. I have 5 versions of Visual Studio installed on my 64 bit windows 7 box at work and CMake-2.6.1 still works with the versions of VS I tested (2008,2010) Did you rename VS2005 before or after you had this problem? Any idea where I can start to search for the solution? regards nelis -- View this message in context: http://cmake.3232098.n2.nabble.com/cl-is-not-able-to-compile-VS2010-C1060-compiler-out-of-heap-space-tp6936159p6936159.htm 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 -- John M. Drescher -- 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
Re: [CMake] cl is not able to compile -VS2010 C1060: compiler out of heap space
On Thu, Oct 27, 2011 at 8:52 AM, Nelis neliswill...@gmail.com wrote: Hi John I have 5 versions of Visual Studio installed on my 64 bit windows 7 box at work and CMake-2.6.1 still works with the versions of VS I tested (2008,2010) Did you rename VS2005 before or after you had this problem? Renamed VS2005 after finding the heap problem on building CMake project sln files, but outcome still the same before and after renaming. Working through the few CMake files after CMaking, I find no 'incorrect' path. Immediately after deleting cache, on configure, I find this: 1-- Build started: Project: cmTryCompileExec, Configuration: Debug Win32 -- 1 testCCompiler.c 1c1 : fatal error C1060: compiler is out of heap space when I configure again, but with cache intact, I find different warnings, same error: 1-- Build started: Project: cmTryCompileExec, Configuration: Debug Win32 -- 1cl : Command line warning D9035: option 'GZ' has been deprecated and will be removed in a future release 1cl : Command line warning D9036: use 'RTC1' instead of 'GZ' 1 testCCompiler.c 1c1 : fatal error C1060: compiler is out of heap space could it be attributable to VS2010 picking up some setting from VS2005 on install? Have you installed the VS2010 SP1 yet? If not please do so. There are a few serious compiler bugs that I have seen. Although I have not seen this one in my testing. John -- 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
Re: [CMake] cl is not able to compile -VS2010 C1060: compiler out of heap space
On Thu, Oct 27, 2011 at 9:10 AM, Nelis neliswill...@gmail.com wrote: Hi John Yes installed SP1 immediately after the base system. No other updates though. Strange behaviour that the clean cache compile should differ from the filled cache compile. BTW, thanks for your time. What generator are you selecting? John -- 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
Re: [CMake] Need a full list of reserved words
On Sun, Oct 30, 2011 at 3:14 PM, Robert Dailey rcdai...@gmail.com wrote: I'm trying to help the Notepad++ author update his list of keywords for CMake since it is pretty out of date, however I don't want to manually have to type up a list of all commands, variables, properties, and options/parameters. Is there a list of everything in the CMake source code someone can just paste here? I can then send that on to the Notepad++ developers to get the list updated. Thanks! You can do a cmake --help-command-list cmake --help-variable-list cmake --help-property-list to get this answer. John -- 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
Re: [CMake] VS2003 and reloading projects
I've been struggling with a real nuisance lately. When I run a build in VS2003 and my CMake scripts are out of date, it regenerates and then prompts me if I would like to stop the build reload the projects. Once I do that, my projects reload but for some reason their settings are still out of date. Either it didn't reload the actual projects that changed or this is a bug of some sort. In any case the only way I can get reliable behavior is to close VS2003 completely, run CMake on the outside, and then reopen my solution. I've read that this has been a constant struggle from the start for the CMake team, so just wondering if there are any workarounds tips. Thanks in advance. I like to close my projects in Visual Studio before making a change that requires a configure like adding several source files. Then I launch cmake to regenerate the solution from a configure.bat batch file I have generated in my projects build folder. John -- 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
Re: [CMake] VS2003 and reloading projects
That's fine dandy but I have a solution with 120+ projects that each have SCC bindings... that makes them load especially slow! I wish VS was smart enough to just reload the changed projects properly... :( I think also if you hit cancel on the CMake dialog. Then wait till the projects are all reloaded then click build you can avoid needing to close the solution. Perhaps also look at the settings for Documents detecting outside changes. John -- 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
Re: [CMake] Visual Studio 10 property pages for single source file gone with CMake 2.8.5 and 2.8.6
In order to work around http://public.kitware.com/Bug/view.php?id=12570 I think it should be sufficient to have a different drive *letter* when specifying where to build the binaries than the drive letter(s) of the path names of the source files. So I guess one might work around this issue by mapping a new drive letter to the build/bin directory, even while this directory might be located at the same physical drive as the source files. Right? You could also probably use the subst command to substitute the root drive. John -- 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
Re: [CMake] How to build ccmake.exe on Windows?
On Fri, Nov 11, 2011 at 3:24 PM, Robert Dailey rcdai...@gmail.com wrote: According to the root CMakeLists.txt in cmake, there is no way to do this on Windows. I'll probably have to build it through Cygwin itself, assuming UNIX is truthy when using Cygwin. # Use curses? IF (UNIX) # there is a bug in the Syllable libraries which makes linking ccmake fail, Alex IF(NOT ${CMAKE_SYSTEM_NAME} MATCHES syllable) SET(CURSES_NEED_NCURSES TRUE) FIND_PACKAGE(Curses QUIET) IF (CURSES_LIBRARY) OPTION(BUILD_CursesDialog Build the CMake Curses Dialog ccmake ON) ELSE (CURSES_LIBRARY) MESSAGE(Curses libraries were not found. Curses GUI for CMake will not be built.) SET(BUILD_CursesDialog 0) ENDIF (CURSES_LIBRARY) ELSE(NOT ${CMAKE_SYSTEM_NAME} MATCHES syllable) SET(BUILD_CursesDialog 0) ENDIF(NOT ${CMAKE_SYSTEM_NAME} MATCHES syllable) ELSE (UNIX) SET(BUILD_CursesDialog 0) ENDIF (UNIX) - Robert Dailey On Fri, Nov 11, 2011 at 2:21 PM, Robert Dailey rcdai...@gmail.com wrote: I'm using Cygwin with the MSVC toolchain and I need ccmake.exe. I can't use the one from the Cygwin package manager because it's older than the version I'm using. I'd like to build it myself through Visual Studio like I did with cmake and cmake-gui if possible. Any help? BTW, there is a cmake in cygwin setup. I believe it is recommended to use that instead of the windows cmake.exe John -- 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
Re: [CMake] QtCreator generator?
There should have been a *.sln file that you open.? Not for a Code Blocks -NMake Makefile project. John -- 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
Re: [CMake] Workflow of a collaborative project in Visual Studio+CMake
It basically comes down to the inconvenience of having to do that with Visual Studio being outweighed (considerably!) by the cross-platform benefits of CMake. (It does help that none of our developers use Windows as their primary development platform, so it only comes up when we make sure things are working on Windows...) I use Visual Studio 2010 daily for the last 6 months or so and the bug is not that difficult for me to work with at all. I do admit it is annoying when you get prompted 50 times to reload projects but most of the time it does not do that. I mean if you only add files to a single project it will not prompt you for the other 49. Now if I know the change will be big, I usually close the solution and run cmake externally from a script. John -- 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
Re: [CMake] Workflow of a collaborative project in Visual Studio+CMake
On Sat, Nov 12, 2011 at 11:08 AM, Bill Hoffman bill.hoff...@kitware.com wrote: On 11/12/2011 10:51 AM, John Drescher wrote: It basically comes down to the inconvenience of having to do that with Visual Studio being outweighed (considerably!) by the cross-platform benefits of CMake. (It does help that none of our developers use Windows as their primary development platform, so it only comes up when we make sure things are working on Windows...) I use Visual Studio 2010 daily for the last 6 months or so and the bug is not that difficult for me to work with at all. I do admit it is annoying when you get prompted 50 times to reload projects but most of the time it does not do that. I mean if you only add files to a single project it will not prompt you for the other 49. Now if I know the change will be big, I usually close the solution and run cmake externally from a script. Does this solution work for VS 2010: There is an out of cmake solution for this. http://vscommands.com/ [^] If you install the VSCommands plugin free version, it will fix the reload dialog to only ask once. I have not tried that. I will do so and report back in around 2 weeks. I am leaving for a vacation at 4:00 AM tomorrow and I do not think I will have any time to test this.. John -- 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
Re: [CMake] VC2010 Express crashing
Yes it is 100% reproducible. I don't know if telling someone to send reports to Microsoft and have them fix the problem is the most reasonable solution. Isn't it a Microsoft bug? I mean even if the sln file was somehow wrong Visual Studio should not crash when using it. John -- 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
Re: [CMake] Call to QTextStream(stdin) crashes the program built by CMake and Visual Studio
On Wed, Nov 23, 2011 at 8:53 AM, Yegor Derevenets yegor.dereven...@gmail.com wrote: Hi All, The following Qt program crashes with access violation when being built on Windows by Microsoft Visual Studio 2010 using cmake 2.8.6 and doesn't crash when being built using qmake: #include cstdio #include QTextStream int main(int argc, char *argv[]) { QTextStream qin(stdin, QIODevice::ReadOnly); return 0; } Expected behaviour would be that the program wouldn't crash in both cases. The example and generated configuration files are available in the archive: http://yegor.f1recat.com/cmake_vs_qmake.7z The Qt version used is 4.7.4. Arguments to configure were: -release -shared -no-webkit -nomake examples -nomake demos The problem seems to be remotely similar to this one (although in my case nobody must be trying to do static linking): https://bugreports.qt.nokia.com//browse/QTBUG-9272 Any ideas on what to look at next? Is there some other version of Qt installed on your system? Are you running release mode for your application? Remember debug mode for your application can will crash since you did not create a debug build of Qt and Microsoft debug and release configurations are not compatible. John -- 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
Re: [CMake] Don't export symbols but the one I want
On Wed, Nov 23, 2011 at 12:30 PM, Stephen Kelly steve...@gmail.com wrote: David Demelier wrote: Hello, I'm creating a library that use a lot of internal code (not static because it should be visible by other compilation units) so I would like to don't export any symbols but only the one I want. Usually you use __declspec(dllexport) for windows but on unix and gcc everything is exported and I don't know any portable way to disable this. Does CMake can handle this problem and export some symbols without using ten thousand of #ifdef #endif in C files? Cheers, See also cmake --help-command GenerateExportHeader in cmake 2.8.6. jmd0 work # cmake --help-command GenerateExportHeader cmake version 2.8.6 Argument generateexportheader to --help-command is not a CMake command. Use --help-command-list to see all commands. John -- 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
Re: [CMake] VS2005 and cmake
On Fri, Nov 25, 2011 at 3:55 AM, Tom Deblauwe tom.debla...@traficon.com wrote: Hello, Are you sure that is not some kind of extension or plugin that you are using? I don't think you can reload all the projects at once in VS2005? Best regards, Tom, CMake installs a visual studio macro that handles this. When there is a large change the macro should pop up in the GUI asking you ( I believe) if you want to continue building or cancel. In either case it should reload all projects. In the 3 to 4 years I have used CMake with visual studio (2005 and 2008) I have sometimes seen this fail and Visual Studio would prompt for reloading. John -- 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
Re: [CMake] parallel build using cmake --build?
On Fri, Nov 25, 2011 at 10:16 PM, Steve M. Robbins st...@sumost.ca wrote: Hi, To build VTK on our windows build server, I wrote a small batch script that invokes cmake --build. My developer machine is multicore; is there a way to get cmake --build to run multiple jobs? On windows, I use the following tool http://www.codeproject.com/KB/cpp/runjobs.aspx to build each configuration (Debug, Release, RelWithDebInfo ...) in parallel using separate calls to cmake --build. John -- 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
Re: [CMake] configuration of VTK 5.8 using cmake 2.6 on 64-bit windows 7
On Thu, Dec 8, 2011 at 10:51 PM, rakesh patil prakeshoffic...@gmail.com wrote: Hello, I want to compile VTK 5.8 for 64bit windows machine. I have cmake 2.6 for 32-bit windows. I downloaded vtk source code from www.vtk.org website. While configuring, I select Visual Studio 9(64) and continued configuration. Then I made following changes CMAKE_CXX_FLAGS = /D_WIN64 /D_WINDOWS (Default was /DWIN32 /D_WINDOWS) CMAKE_C_FLAGS = /D_WIN64 /D_WINDOWS (Default was /DWIN32 /D_WINDOWS) CMAKE_INSTALL_PREFIX = Appropriate path where lib, header and dll files will be saved VTK_DATA_ROOT = Path where vtk data resides. Now what i want to ask is that 1) Is it perfectly fine to use 32-bit version of cmake to compile 64bit version of VTK? Yes. I have done that dozens of times. 2) What effect will it be if WIN32 is replaced with _WIN64 in flags above? I can't answer that. I have never ever set _WIN64 for any of my 64 bit builds and I have been programming in 64 bit Visual Studio with cmake for over 2 years. John -- 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
Re: [CMake] CPack - Windows 7 x64
On Tue, Jan 3, 2012 at 8:05 PM, Nicholas Yue yue.nicho...@gmail.com wrote: Hi, I am building and installing full 64bit applications and libraries. When I package it up as an installer via NSIS, it installs to C:\Program Files (x86)\ What CPACK_ variables do I need to inform cpack that it should be installed in C:\Program Files\ I have had this problem for over a year (with CMake versions up to 2.8.7) although I have not spent much effort trying to fix it. Tomorrow I will try the fix from David and report if that fixes the issue for me. John -- 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
Re: [CMake] Visual Studio Generator: Unable to show property page for custom build tool
On Wed, Jan 4, 2012 at 4:30 PM, Michael Guerrero insom...@yahoo.com wrote: Hi, I’ve been experimenting with using Visual Studio’s “Custom Build Tool” per cpp file to perform some specialized operations. However, the property page is not visible (not editable) when I generate a project with cmake. To see what this looks like, see here: http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/496e301c-de2e-49bf-bbfa-ea8de335a0a5 . To reproduce: 1) Generate a c++ project for visual studio (I’m using vs2010) 2) Right click a .cpp file in the solution and go to properties 3) Under Configuration Properties/General, change “Item Type” to “Custom Build Tool” 4) Click Apply 5) Select Configuration Properties / Custom Build Tool / General I’ve attempted to hand edit the solution and project files to determine what is causing this but nothing I removed seemed to have any affect. Any ideas on how to fix this or where to look? A little off topic but even if this worked won't all settings you make get overwritten when CMake regenerates your project or are these stored in .user files or something else that CMake does not touch? John -- 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
Re: [CMake] Some issues with visual studio
On Sun, Jan 8, 2012 at 10:30 AM, Mateusz Loskot mate...@loskot.net wrote: On 8 January 2012 15:21, Renato Utsch renatout...@gmail.com wrote: Yes, but I want to be able to change with CMake, but if I can't do that, at least I want to be able to set the default to the Release version :X You have to understand there is difference between generators like makefiles and generators for projects for IDEs which allow to switch between build configurations from within IDE, like Visual Studio does. IMHO, CMAKE_BUILD_TYPE is irrelevant for IDEs like Visual Studio and valid workflow is equivalent to this: cmake -G Visual Studio 2010 msbuild myproj.sln /p:Configuration=Debug or load myproj.sln in VS IDE and change configuration there. Obviously, for makefiles, CMAKE_BUILD_TYPE is the way to go. An alternate way is cmake --build myprojectsbuildfolder --config myconfiguration for example: cmake --build X:/64bit/VC.100/Qt/StudyManager --config Debug John -- 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
Re: [CMake] Copying of 3rd party DLLs in a POST-BUILD step
2012/1/9 Hauke Heibel hauke.hei...@googlemail.com: Hi Michael, What I do is running a custom command which itself executes a CMake script. Usually similar to add_custom_command(TARGET CopyDlls COMMAND ${CMAKE_COMMAND} -DMSVC_BUILD_CONFIG_DIR=${CMAKE_CFG_INTDIR} -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} -P pathto/yourCopyDlls.cmake VERBATIM ) In the yourCopyDlls.cmake, you can GLOB your DLLs with or without the d postfix depending on MSVC_BUILD_CONFIG_DIR. You can now even copy additional files such as e.g. PDB files. Thanks for sharing this. I use cmake generate a batch file (using FILE(append ...) ) that calls cmake -E copy_if_different for each file. then add this as a custom target however your method looks much cleaner.. John -- 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
Re: [CMake] Copying of 3rd party DLLs in a POST-BUILD step
Awesome! Sometimes you just need to know what's already available to solve your problems in a very elegant way. I'll have a look at these bundles and probably switch to them instead of maintaining my own stuff! Same here. I have spent a few hours writing scripts that keep a list of necessary dlls. This approach is much cleaner. John -- 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
Re: [CMake] MSBuild and automatic project file regenation
On Mon, Jan 9, 2012 at 1:56 PM, Óscar Fuentes o...@wanadoo.es wrote: Michael Hertling mhertl...@online.de writes: On 01/09/2012 02:34 PM, David Cole wrote: No trick, but to avoid this, perhaps we should change the --build handler to run the cmake configure generate step before calling out to MSBuild. You can easily do this yourself from the command line by adopting the pattern: cmake . cmake --build . --config Release Fortunately my cmake scripts are simple enough so the extra invocation does not add much to the build. Thanks David. This is a good idea for a feature request. Not sure if we should just always do that by default and provide a way to turn off with a --no-regenerate, or vice-versa with a --please-generate-first ... :-) The effect of --no-regenerate would be the same as the current buggy behavior (MSBuild.exe uses outdated project files). IMHO the --please-generate-first is the right thing. One problem I have with doing this automatically in the --build command is I run in parallel builds for each configuration (using a program called RunJobs from codeproject.com): cmake --build X:/64Bit/VC.100/Qt/StudyManager --config RelWithDebInfo cmake --build X:/64Bit/VC.100/Qt/StudyManager --config Release cmake --build X:/64Bit/VC.100/Qt/StudyManager --config Debug for this I do the cmake X:/64Bit/VC.100/Qt/StudyManager step first then run the parallel jobs. I worry if --build forced a configure that parallel building like this could break. John -- 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
Re: [CMake] Copying of 3rd party DLLs in a POST-BUILD step
On Tue, Jan 10, 2012 at 3:17 PM, Ben Medina ben.med...@gmail.com wrote: I'd guess the performance of fixup_bundle will be a big pitfall if you're planning on doing this after every build. One other approach is not making it a post build step but a custom target that the user can build only when needed. This custom build step will copy the dlls like the post build step did. John -- 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
Re: [CMake] How to add CMake includes and libraries to Visual Studio Solution?
Where did you define your INCLUDE_DIRECTORIES? I also tried to set an absolute path instead of using the CMake list, same result. Nothing is set... For me this works as well. Define INCLUDE_DIRECTORIES anywhere above the ADD_EXECUTABLE or ADD_LIBRARY and visual studio will use it. -- John M. Drescher -- 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
Re: [CMake] How to add CMake includes and libraries to Visual Studio Solution?
On Mon, Jan 16, 2012 at 2:44 PM, hellho...@binary-revolution.org wrote: Hmm this is strange, INCLUDE_DIRECTORIES is used but no effect. I try to set: INCLUDE_DIRECTORIES(C:/binrev/development/boost/1.47/) But the additional directory entry of my MSVC solution holds only the default settings: $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include; Is there any chance that i could check if INCLUDE_DIRECORIES is set correctly by CMake? Maybe the settings are truncated by visual studio .. Is the project being regenerated and reloaded after the change? -- John M. Drescher -- 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
[CMake] Fwd: building libs and specifying addition folders
-- Forwarded message -- From: John Drescher dresche...@gmail.com Date: Thu, Jan 19, 2012 at 1:00 AM Subject: Re: [CMake] building libs and specifying addition folders To: Dev Guy devguy...@gmail.com On Wed, Jan 18, 2012 at 10:57 PM, Dev Guy devguy...@gmail.com wrote: Hi, I am relatively new to CMake and I've read the tutorial. However I have a few questions. 1. How can I declare a CMakeLists file to create a project to build a DLL or static lib ? I assume if I build a DLL on windows, it will build as a shared lib on Linux put SHARED in the add_library statement For more info than that type the following from a command prompt or shell: cmake --help-command add_library 2. If my main source folder has 2 sub-folders, one that only includes header files call is Include and another folder that contains source files call it Utils. How do I add declare them to my CMakeLists files so that both the header and addition source files are found and and compiled in the main source folder to build the final binary. add_subdirectory Again for help: cmake --help-command add_subdirectory John -- John M. Drescher -- 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
Re: [CMake] compiler flags visual studio
On Tue, Jan 24, 2012 at 8:33 AM, Tom Deblauwe tom.debla...@traficon.com wrote: Hello, What compiler flags do you need to enable if you want to use the possibility to have something like this in your code: char Image[width(), height()]; This worked before with my compiler(visual studio 2005) but not with the cmake generated project. It complains about expecting a constant expression. Anybody knows? No compiler flags support that. John -- 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
Re: [CMake] Visual Studio 2010 is crashing when building project
I am using CMake 2.8.7 and generating for VS2010. When I build any project, visual studio crashes. I think it might be because of ZERO_CHECK. I have not seen any Visual Studio 2010 crashes from cmake based projects and I have used VS2010 for over 1 year on 5 to 10 machines mostly in x64. I am using SP1 however since there is an optimization bug in the retail version that causes Qt applications (designer ..) to crash when compiled with Visual Studio 2010. With SP1 this crash goes away. John -- 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
Re: [CMake] Visual Studio 2010 is crashing when building project
Is it normal for the C++ project icon in the solution explorer to look like web projects? I see a globe around angle brackets in the small icon. No. I do not see that at all ever. John -- 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
Re: [CMake] 'Parallel' CMakeLists.txt?
This sounds like a job for distributed version control. In Git you could keep a branch with your CMakeLists.txt changes and keep merging from the main branch to keep up with the other changes. That is basically what I do when I make changes that I know will break the build. I create a new branch in subversion and work from there till I know it works and then merge the changes back to the trunk. John -- 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
Re: [CMake] CMAKE 2.8.5 - CMAKE_GENERATOR Bug?
On Thu, Feb 2, 2012 at 12:33 PM, Sarnath K - ERS, HCLTech k_sarn...@hcl.com wrote: All, I was trying to use the external project add feature to add a 32-bit VC++ project on a 64-bit parent build system. However, I ran into problems while compiling the 32-bit project. “devenv” used to complain “invalid solution configuration” I tried to explicitly set “CMAKE_BUILD_TYPE” using –D option as well as in the CMakeLists.txt. Nothing changed. However, when I enabled “CMAKE_VERBOSE_MAKEFILE”, I found that “CMAKE” was “not” passing the –G option correctly. Instead of passing cmake –G “Visual Studio 9 2008”, cmake was actually configuring the project as cmake “-G Visual Studio 9 2008” (Note that –G is inside the double-quote) When I isolate the build-step and build it manually using the correct syntax, everything works flawlessly. Specifying the generator via “CMAKE_ARGS” helps me compile. But CMAKE still appends the faulty –G syntax and hence is not producing the intended results for me. If this is indeed a bug, can some one tell me: 1. What is the temporary workaround for this? 2. If at all fixed, how long will it take the build to come out? I am not seeing this breakage. However you are 2 versions behind in cmake. John -- 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
[CMake] Fwd: Portable revision lookup?
-- Forwarded message -- From: John Drescher dresche...@gmail.com Date: Thu, Feb 2, 2012 at 4:36 PM Subject: Re: [CMake] Portable revision lookup? To: Oliver kfsone Smith osm...@playnet.com On Thu, Feb 2, 2012 at 4:10 PM, Oliver kfsone Smith osm...@playnet.com wrote: Right now I wrap my Linux-based build process with a script that features the line REVISION=`svn info ${SRC_PATH} | awk '/^Revision/ { print $2 }'` Which is neither OS or VCS portable. I'm trying to put together a CPack configuration to make the builds, and I'd like to name the resulting installer for the revision it was built from. Is there any kind of built-in mechanism I can use for this, or would I be best just using IFs and executing os-specific commands? (I'm not quite sure how I'm going to pluck the info out under Windows) I'm also wondering if there is a way to query other repository attributes - specifically the URL - I'd like to build installers named product.branch.revision.suffix e.g. my-client.baseline.57721.deb or my-server.branches.1.35.57804.tbz2 Any pointers? Cmake has support for pulling the svn and I believe git revs using cmake modules. Here is what I do for svn #- # If subversion is found append the svn rev to the patch version. # FIND_PACKAGE(Subversion) IF(Subversion_FOUND) OPTION(SVN_APPEND_REV Append subversion rev to application version ON) IF(SVN_APPEND_REV) Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project) MESSAGE(Current revision is ${Project_WC_REVISION}) OPTION(SVN_GET_LOG Get the SVN LOG OFF) if(SVN_GET_LOG) Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project) MESSAGE(Last changed log is ${Project_LAST_CHANGED_LOG}) endif(SVN_GET_LOG) set (${PROJECT_NAME}_VERSION_PATCH ${${PROJECT_NAME}_VERSION_PATCH}.${Project_WC_REVISION}) ENDIF(SVN_APPEND_REV) ENDIF(Subversion_FOUND) John -- John M. Drescher -- 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
Re: [CMake] What can cause cmake (2.8.4 and 7) to fail after upgrade of Visual Studio 10 Express to Professional? stackoverflow question. posting here
On Mon, Feb 13, 2012 at 12:15 AM, Nicky Perian nickyper...@gmail.com wrote: Solved by uninstalling all versions of Visual Studio and reinstalling Visual Studio 10 Professional. Although I have no idea why you had this problem, I have 5 versions of Visual Studio installed and I use cmake 2.8.7 with 3 of them without this issue. John -- 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
Re: [CMake] On WINDOWS, Is it Possible to build 64-bit and 32-bit Solutions in One Go?
On Thu, Feb 16, 2012 at 2:54 PM, Hashim Mir h...@rim.com wrote: Hi, This is what I am doing presently in order to compile both a 32-bit and a 64-bit version of my project: cmake.exe -G “Visual Studio 9 2008” #for x32 cmake.exe -G “Visual Studio 9 2008 Win64” #for x64 Is it possible to consolidate the two individual statements into one somehow, in order to compile both 32 and 64 bit configurations of my project files with one command? No. CMake does not allow this. Only 1 generator can exist for a solution. John -- 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
Re: [CMake] On WINDOWS, Is it Possible to build 64-bit and 32-bit Solutions in One Go?
On Thu, Feb 16, 2012 at 3:27 PM, John Drescher dresche...@gmail.com wrote: On Thu, Feb 16, 2012 at 2:54 PM, Hashim Mir h...@rim.com wrote: Hi, This is what I am doing presently in order to compile both a 32-bit and a 64-bit version of my project: cmake.exe -G “Visual Studio 9 2008” #for x32 cmake.exe -G “Visual Studio 9 2008 Win64” #for x64 Is it possible to consolidate the two individual statements into one somehow, in order to compile both 32 and 64 bit configurations of my project files with one command? No. CMake does not allow this. Only 1 generator can exist for a solution. And I mean in the same build folder tree. You can however make 2 build folder trees and use a batch file to have both build separately at the same time from the command prompt. John -- 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
Re: [CMake] Doesn't anyone know how to get precompiled headers working under CMake for Visual Studio 2010?
On Thu, Feb 16, 2012 at 7:39 PM, david_bjorn...@agilent.com wrote: My team has been using precompiled headers under CMake and Visual Studio 2008 for quite a while. Now we’ve switched to VS 2010, the cmake code we used to support precompiled headers is no longer working. The following is the code in question and we’re just using set_source_files_properties to add the appropreiate /Yc , /Yu and /FI flags. It appears, under VS 2010, the property manager is not accepting or over writing these settings. Doesn’t anyone know how to get precompiled headers working under CMake for Visual Studio 2010? IF(EXISTS ${pch_unity}) FILE(READ ${pch_unity} buffer) ENDIF(EXISTS ${pch_unity}) IF(NOT (${buffer} STREQUAL ${file_contents})) FILE(WRITE ${pch_unity} ${file_contents}) ENDIF(NOT (${buffer} STREQUAL ${file_contents})) SET_SOURCE_FILES_PROPERTIES(${pch_unity} PROPERTIES COMPILE_FLAGS /Yc\${pch_abs}\) ### # # Update properties of source files to use the precompiled header. # Additionally, force the inclusion of the precompiled header at beginning of each source file. # FOREACH(source_file ${srcFilesThatUsePCH} ) SET_SOURCE_FILES_PROPERTIES( ${source_file} PROPERTIES COMPILE_FLAGS /Yu\${pch_abs}\ /FI\${pch_abs}\ ) ENDFOREACH(source_file) ### # # Finally, update the source file collection to contain the precompiled header translation unit # SET(${FILES_VARIABLE_NAME} ${${FILES_VARIABLE_NAME}} ${pch_unity} PARENT_SCOPE) For me I use the same exact macro that I have used since VS 2005. Attached is the macro and here is an example library that uses the macro. SET( ${PROJECT_NAME}_SRCS ./src/smException.cxx ./src/smitkIndent.cxx ./src/smState.cxx ./src/smPropertyMap.cxx ./src/smOperation.cxx ./src/smPgmSettings.cxx ./src/smStringList.cxx ./src/smObject.cxx ./src/smAppBase.cxx ./src/smSpawnJob.cxx ./src/smLog.cxx ./src/smBIRADS7.cxx ./src/smErrorBase.cxx ) SET( ${PROJECT_NAME}_EXT_HDRS ./Include/smException.h ./Include/smitkIndent.h ./Include/smMacros.h ./Include/smPropertyMap.h ./Include/smOperation.h ./Include/smPgmSettings.h ./Include/smStringList.h ./Include/smConstants.h ./Include/smLog.h ./Include/smBIRADS7.h ./Include/smErrorBase.h ) SET( ${PROJECT_NAME}_MOC_HDRS ./Include/smState.h ./Include/smObject.h ./Include/smAppBase.h ./Include/smSpawnJob.h ) # some .ui files SET( ${PROJECT_NAME}_UIS ) # and finally an resource file SET( ${PROJECT_NAME}_RCS ) SET( ${PROJECT_NAME}_INT_HDRS ) #Add precompiled header support MSVC_PCH_SUPPORT(${PROJECT_NAME}) # this command will generate rules that will run rcc on all files from UPMC_LA_RCS # in result UPMC_LA_RC_SRCS variable will contain paths to files produced by rcc QT4_ADD_RESOURCES( ${PROJECT_NAME}_RC_SRCS ${${PROJECT_NAME}_RCS} ) # and finally this will run moc: QT4_WRAP_CPP( ${PROJECT_NAME}_MOC_SRCS ${${PROJECT_NAME}_MOC_HDRS} ) # this will run uic on .ui files: QT4_WRAP_UI( ${PROJECT_NAME}_UI_HDRS ${${PROJECT_NAME}_UIS} ) IF(BUILD_EXPERIMENTAL) add_subdirectory(Experimental) ENDIF(BUILD_EXPERIMENTAL) include_directories( ${PROJECT_BINARY_DIR} ${PROJECT_BINARY_DIR}/.. ${PROJECT_SOURCE_DIR}/Include ${STUDY_MANAGER_SRC}/Include ) add_library(${PROJECT_NAME} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_EXT_HDRS} ${${PROJECT_NAME}_MOC_HDRS} ${${PROJECT_NAME}_MOC_SRCS} ${${PROJECT_NAME}_INT_HDRS} ${${PROJECT_NAME}_UI_HDRS} ${${PROJECT_NAME}_RC_SRCS} ) John MSVCPCHSupport.cmake Description: Binary data -- 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
Re: [CMake] Generating CMake scripts from Visual Studio solutions projects?
Did you try the tool listed in the Wiki http://www.cmake.org/Wiki/CMake#Visual_Studio I would be interested in if you get any of these to work well with non trivial projects. When I last looked at some of these (probably 2+ years ago so things may have changed) they did not work well with my complex visual studio projects. John -- 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
Re: [CMake] Generating CMake scripts from Visual Studio solutions projects?
2+ years? That could easily end up like a Yugo vs. Porsche surprise ;) The original vcproj2cmake script was composed of 300 lines, and now the project is to the tune of around 4000 lines. I have a lot of 5 to 15 year old MFC code(applications, dlls, static libraries) that I would like to use this on. I could give it a test sometime next week. John -- 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
Re: [CMake] Cmake hangs on testing -- Check for working C compiler using: Visual Studio 10
Now I don't know what is happening. This is no longer working. Back to hanging up. I have never had this hang and I use visual studio 2010 SP1 daily for over a year with cmake. Now I am on cmake-2.8.7 however I have used probably every other 2.8 release as well. John -- 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
Re: [CMake] Cmake hangs on testing -- Check for working C compiler using: Visual Studio 10
On Sat, Feb 18, 2012 at 11:23 PM, Nicky Perian nickyper...@gmail.com wrote: Applied 5 additional microsoft updates related to sp1 and seems to by working. Need to follow my own advice and apply updates to exhaustion. I do have Microsoft Update running on all machines that I use CMake/VS 2010 and all of them are kept up to date. John -- 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
Re: [CMake] Shared intermediary files
On Mon, Feb 20, 2012 at 4:07 PM, Kevin Schmidt ke...@eyesopen.com wrote: Hello, I’m in the process of converting over a large, monolithic tree with many libraries from a custom build solution over to cmake. So far, we’ve loved it. I am wondering about others’ solutions to a problem we have encountered. We have more than a few cases of generated source files - for example, Qt moc files. These all get dumped into CMAKE_CURRENT_BINARY_DIR. Now, the libraries we have build both static shared, and have the same source files. In Visual Studio, this generates two projects in the solution. It seems that these do not share dependencies. Occasionally, this means that both libraries try to write to the generated source file at the same time, which generates a (false) build failure. What do others do? Am I misunderstanding something? I have my batch build script that calls cmake --build for each configuration build 2 times. This works for almost all cases. However when building VTK in parallel the generation of 1 unicode header usually fails. John -- 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
Re: [CMake] simplest possible NSIS package
Just to make you laugh I found the source of the problem. Apparently if you try to run an installer from a directory which is on a shared directory (with the virtualbox sharing) it just won't run :D Copying it somewhere else works perfectly, quite amazing issue. Thanks for reporting back. That was very puzzling to me since my NSIS builds have worked for a long time. John -- 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
Re: [CMake] [Insight-users] CMake configure insightapplications with FLTK
On Thu, Feb 23, 2012 at 6:19 PM, Yang, Jinzhong jinzhon...@gmail.com wrote: Hi All, I was trying to configure InsightApplications in CMake with USE_FLTK turned on, but I continuously got the error message: CMake Error at CMakeLists.txt:128 (INCLUDE): include called with wrong number of arguments. Include only takes one file. That means on line 128 you have an include( ${SomeCmakeVariable} ) and the cmake variable is blank. John -- 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
Re: [CMake] Is there a cookbook?
but my point here is that we really need a CMake CookBook or snippet repository. I always hit the FAQ first, but that /explains/ when what a coder tends to need in that frame of mind is a living example. Maybe some user committed examples in the wiki just like what has been done for the vtk and itk examples.. John -- 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
Re: [CMake] Can't generate Release build in Visual Studio 9
2. Do batch building. I do this option. Look at the cmake --build command Here is an example of this for one of my current projects (not exactly what I do but close enough): rem configure pushd . cd X:\64Bit\VC.100\Qt\StudyManager cmake X:/CMakeBased/Qt/StudyManager popd rem build the nsis package. cmake --build X:/64Bit/VC.100/Qt/StudyManager --config Release --target PACKAGE X:/64Bit/VC.100/Qt/StudyManager is the build folder containing the .sln CMakeCache.txt ... John -- 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
Re: [CMake] smarter shortcuts with NSIS
By the way, how do I see the actual paths NSI configuration that generates the final exe? It seems that if NSIS works the file used get all removed.. It does not get removed for me using Visual Studio 2010. All of the NSIS stuff exists in a _CPack_Packages folder inside of the build tree. John -- 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
Re: [CMake] smarter shortcuts with NSIS
Ah yes you're right, last time I checked I didn't see them.. Anyway my extra_commands don't appear anywhere in the nsi file, is that normal? I can't help with that part. I do add components also executables with shortcuts for my executables by setting the CPACK_PACKAGE_EXECUTABLES variable. However I never mess with changing the installation folders or creating shortcuts directly. -- John M. Drescher -- 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
Re: [CMake] CMake hidden files
I tried to install PV on Windows XP with MinGV, without any success. So I decided to go with Visual Studio 10 Express, installed it, selected it as a generator, etc But I get an error message, something like it seems that you try to build on VS with Qt built on MinGW. Ok, right, so I installed a pre-compiled Qt for Windows distribution, That should cause you problems. Qt must be compiled by the same compiler you use. And I believe the precompiled Qt was for vs2008. I have found, windows or linux, usually not a good idea to mix compiler versions. John ___ 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
Re: [CMake] Building multiple releases for a visual studio project
On Tue, Jun 8, 2010 at 2:52 PM, Torri, Stephen CIV NSWCDD, W15 stephen.to...@navy.mil wrote: I was wondering if it was possible to have a CMake project that builds a Microsoft Visual Studio Project produce an NSIS installer for each kind of build (e.g. debug, release, RelWithDebug). Right now I can build the project via Visual Studio for all the build types which is great. Now I would like to have one NSIS installer for each type. Is that possible? Copy the package then switch the build type in visual studio and then run package. The file overwrites the previous nsis package with the same name but I am pretty sure it builds for the current configuration. John ___ 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
Re: [CMake] [vtkusers] VTK 5.6.0 Cmake Errors
On Thu, Jun 17, 2010 at 3:16 PM, Scott Johnson scott.john...@neuwave.com wrote: On a whim I totally changed the path to a different drive and naming structure and tried again. I was able to fully configure and generate the solution. Even after I set the options I was originally trying. I'm not sure where it was picking up the invalid path, but it's gone now. Is this a network path without short filename support? John ___ 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
Re: [CMake] One last try
1. Is cmake supposed to support Visual Studio 2008 out of the box? Yes and it works well. I use this combination every day for the last 2 years. John ___ 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
Re: [CMake] One last try
On Mon, Jun 21, 2010 at 9:59 AM, Gerry Weaver ger...@compvia.com wrote: Hello All, Thank you for your replies. The cmake command fails when trying to compile the test file. It says it cannot find kernel32.lib. I can compile and link without cmake just fine. Any ideas? Thanks, -G Try running the build and cmake-gui inside a Visual Studio 2008 Command Prompt John ___ 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
Re: [CMake] Generating a combined x86 and x64 Visual Studio project
I have recently created a CMake project that I use to generate Visual Studio solutions/projects and it works perfectly with one exception. After generating a Visual Studio 9 2008 Win64 solution, the solution contains only the x64 build specification. Is it possible to have CMake add the win32 build specification to the same solution or must one generate separate 32-bit and 64-bit solutions/projects in different directories? I believe generating the solutions out of source with different build folders is the only good way at the moment. John ___ 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
Re: [CMake] Different configurations with Visual Studio
I see, thanks. I intend to write a Python script that adds the extra platform solution, because we really need that. Visual Studio and Code::Blocks project files are XML files, so it shouldn't be too hard. What is wrong with different build folders for each compiler / ide? John ___ 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
[CMake] Upgraded to cmake-2.8.2 on windows7 and now it will not work
I was using 2.8.1 and previous cmake versions for a long time without any problems. Also 2.8.2 works for the same project on 64 bin xp. CMake Error: CMake was unable to find a build program corresponding to Visual Studio 8 2005. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: Could not find cmake module file://Radimgws68/c$/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake CMake Error: Could not find cmake module file:X:/32Bit/VC.80/Qt/LungAnalysis/CMakeFiles/CMakeCCompiler.cmake CMake Error: Could not find cmake module file://Radimgws68/c$/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake CMake Error: Could not find cmake module file:X:/32Bit/VC.80/Qt/LungAnalysis/CMakeFiles/CMakeCXXCompiler.cmake CMake Error: Could not find cmake module file://Radimgws68/c$/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake CMake Error: Could not process cmake module file://Radimgws68/c$/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake CMake Error: Could not process cmake module file://Radimgws68/c$/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCXXInformation.cmake Configuring incomplete, errors occurred! -- John M. Drescher ___ 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
Re: [CMake] Upgraded to cmake-2.8.2 on windows7 and now it will not work
On Tue, Jul 6, 2010 at 12:50 PM, John Drescher dresche...@gmail.com wrote: I was using 2.8.1 and previous cmake versions for a long time without any problems. Also 2.8.2 works for the same project on 64 bin xp. CMake Error: CMake was unable to find a build program corresponding to Visual Studio 8 2005. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: Could not find cmake module file://Radimgws68/c$/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake CMake Error: Could not find cmake module file:X:/32Bit/VC.80/Qt/LungAnalysis/CMakeFiles/CMakeCCompiler.cmake CMake Error: Could not find cmake module file://Radimgws68/c$/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake CMake Error: Could not find cmake module file:X:/32Bit/VC.80/Qt/LungAnalysis/CMakeFiles/CMakeCXXCompiler.cmake CMake Error: Could not find cmake module file://Radimgws68/c$/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake CMake Error: Could not process cmake module file://Radimgws68/c$/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake CMake Error: Could not process cmake module file://Radimgws68/c$/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCXXInformation.cmake Configuring incomplete, errors occurred! -- Okay, this is weird. If I execute cmake-gui from C:\Program Files (x86)\CMake 2.8\bin it seems to work but the link on my desktop fails. I will look into this. John ___ 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
Re: [CMake] Building a Version Header
On Wed, Jul 7, 2010 at 9:44 PM, Clark Gaebel cg.wowus...@gmail.com wrote: I would like to generate file that looks something like this: // version.h #define VERSION v0.1-345-ga77ede8 where the version string is the result of running git describe --tags --dirty. How can I auto-generate this file, include it in my project, and have it regenerate as a pre-build event? You want to do that with configure_file The following is an example that grabs the subversion rev and puts that into a version header file. In CMakeLists.txt for the LungAnalysis project set (${PROJECT_NAME}_VERSION_MAJOR 0) set (${PROJECT_NAME}_VERSION_MINOR 25) set (${PROJECT_NAME}_VERSION_PATCH 3) FIND_PACKAGE(Subversion) IF(Subversion_FOUND) #Use the FindSubversion.cmake module to get the svn rev and append that to the patch version. Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project) MESSAGE(Current revision is ${Project_WC_REVISION}) Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project) MESSAGE(Last changed log is ${Project_LAST_CHANGED_LOG}) set (${PROJECT_NAME}_VERSION_PATCH ${${PROJECT_NAME}_VERSION_PATCH}.${Project_WC_REVISION}) ENDIF(Subversion_FOUND) configure_file ( ${PROJECT_SOURCE_DIR}/${PROJECT_NAME}Config.h.in ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.h ) LungAnalysisConfig.h.in: //The configured settings for the project #define LungAnalysis_VERSION_MAJOR @LungAnalysis_VERSION_MAJOR@ #define LungAnalysis_VERSION_MINOR @LungAnalysis_VERSION_MINOR@ #define LungAnalysis_VERSION_PATCH @LungAnalysis_VERSION_PATCH@ So then in the binary folder the LungAnalysisConfig.h will look like #define LungAnalysis_VERSION_MAJOR 0 #define LungAnalysis_VERSION_MINOR 25 #define LungAnalysis_VERSION_PATCH 3.903 for svn revision 903 John ___ 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
Re: [CMake] Building a Version Header
1) I'm using git I know. You have some work to do.. On top of the minor differences in what you want the FindGIt.cmake does not have that option to return the version so you need to adapt it to get the git version similar to the way the FindSubversion.cmake module does for subversion repositories. 2) If it outputs to the build directory, how do I refer to it? You can include files from your build folder in your project. Just add include_directories(${PROJECT_BINARY_DIR}) in your CMakeLists.txt then use the header as you would any other header in your project. John ___ 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
Re: [CMake] Building a Version Header
On Wed, Jul 7, 2010 at 10:59 PM, Clark Gaebel cg.wowus...@gmail.com wrote: Is there any way I can use the output from a command-line program (in this case, git describe --dirty) instead of using FindGit? I believe add_custom_command but I can not help with an example of that. John ___ 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
Re: [CMake] Building a Version Header
On Wed, Jul 7, 2010 at 11:04 PM, John Drescher dresche...@gmail.com wrote: On Wed, Jul 7, 2010 at 10:59 PM, Clark Gaebel cg.wowus...@gmail.com wrote: Is there any way I can use the output from a command-line program (in this case, git describe --dirty) instead of using FindGit? I believe add_custom_command but I can not help with an example of that. When looking at the source for FindSubversion.cmake this looks pretty easy to modify. I guess you can put the Macro code inside your CMakeLists.txt if you do not want to mess with Findgit.cmake. MACRO(Subversion_WC_INFO dir prefix) # the subversion commands should be executed with the C locale, otherwise # the message (which are parsed) may be translated, Alex SET(_Subversion_SAVED_LC_ALL $ENV{LC_ALL}) SET(ENV{LC_ALL} C) EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} --version WORKING_DIRECTORY ${dir} OUTPUT_VARIABLE Subversion_VERSION_SVN OUTPUT_STRIP_TRAILING_WHITESPACE) EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} info ${dir} OUTPUT_VARIABLE ${prefix}_WC_INFO ERROR_VARIABLE Subversion_svn_info_error RESULT_VARIABLE Subversion_svn_info_result OUTPUT_STRIP_TRAILING_WHITESPACE) IF(NOT ${Subversion_svn_info_result} EQUAL 0) MESSAGE(SEND_ERROR Command \${Subversion_SVN_EXECUTABLE} info ${dir}\ failed with output:\n${Subversion_svn_info_error}) ELSE(NOT ${Subversion_svn_info_result} EQUAL 0) STRING(REGEX REPLACE ^(.*\n)?svn, version ([.0-9]+).* \\2 Subversion_VERSION_SVN ${Subversion_VERSION_SVN}) STRING(REGEX REPLACE ^(.*\n)?URL: ([^\n]+).* \\2 ${prefix}_WC_URL ${${prefix}_WC_INFO}) STRING(REGEX REPLACE ^(.*\n)?Revision: ([^\n]+).* \\2 ${prefix}_WC_REVISION ${${prefix}_WC_INFO}) STRING(REGEX REPLACE ^(.*\n)?Last Changed Author: ([^\n]+).* \\2 ${prefix}_WC_LAST_CHANGED_AUTHOR ${${prefix}_WC_INFO}) STRING(REGEX REPLACE ^(.*\n)?Last Changed Rev: ([^\n]+).* \\2 ${prefix}_WC_LAST_CHANGED_REV ${${prefix}_WC_INFO}) STRING(REGEX REPLACE ^(.*\n)?Last Changed Date: ([^\n]+).* \\2 ${prefix}_WC_LAST_CHANGED_DATE ${${prefix}_WC_INFO}) ENDIF(NOT ${Subversion_svn_info_result} EQUAL 0) # restore the previous LC_ALL SET(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL}) ENDMACRO(Subversion_WC_INFO) All the work you need is in the EXECUTE_PROCESS. Replace the subversion commands with git commands and fixup the output. John ___ 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
Re: [CMake] Building a Version Header
On Wed, Jul 7, 2010 at 11:43 PM, Clark Gaebel cg.wowus...@gmail.com wrote: Okay, I've almost got it. How do I make configure_file generate something like... source: #cmakedefine VERSION Some thing like Version.h.in #define VERSION @PROJECT_VERSION@ Try to look at my first example for usage. John ___ 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
Re: [CMake] Building a Version Header
Nice. that works. I'm so sorry to be such a bother, but here's my output now... #define PROJECT_VERSION v0.1-345-ga77ede8-dirty Needless to say, that's bad :( How would I go about removing that trailing newline? STRING(REGEX REPLACE on the PROJECT_VERSION in your CMakeLists.txt there are examples of that command in the Macro I posted a few emails ago. If you get stuck I will try to figure that out. John ___ 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
Re: [CMake] Building a Version Header
On Wed, Jul 7, 2010 at 11:58 PM, John Drescher dresche...@gmail.com wrote: Nice. that works. I'm so sorry to be such a bother, but here's my output now... #define PROJECT_VERSION v0.1-345-ga77ede8-dirty Needless to say, that's bad :( How would I go about removing that trailing newline? Wait a minute did you use OUTPUT_STRIP_TRAILING_WHITESPACE in your EXECUTE_PROCESS ? John ___ 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
Re: [CMake] cmake 2.8.2 win32: invalid escape sequence when finding fortran compiler
On Wed, Jul 14, 2010 at 10:16 AM, Verweij, Arjen verwe...@tass-safe.com wrote: Hi, I’m trying a little F90 example on Windows with cmake. Apparently something is amiss, but I can’t find much on Google about it; at least not about this particular case. All I do is cmake ..\f90example and the following appears in my terminal: S:\mnt\usr3\people\verweija\buildcmake ..\f90example -- Building for: Visual Studio 7 .NET 2003 -- Check for working C compiler using: Visual Studio 7 .NET 2003 -- Check for working C compiler using: Visual Studio 7 .NET 2003 -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Visual Studio 7 .NET 2003 -- Check for working CXX compiler using: Visual Studio 7 .NET 2003 -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working Fortran compiler using: Visual Studio 7 .NET 2003 CMake Error at CMakeLists.txt:4 (SET): Syntax error in cmake code at S:/mnt/usr3/people/verweija/build/CMakeFiles/CMakeTmp/CMakeLists.txt:4 when parsing string C:\Program Invalid escape sequence \P CMake Error at CMakeLists.txt:4 (SET): Syntax error in cmake code at S:/mnt/usr3/people/verweija/build/CMakeFiles/CMakeTmp/CMakeLists.txt:4 when parsing string Files\VNI\CTT5.0\include\IA32 /fpe:3 /nologo ${COMPILE_DEFINITIONS} Invalid escape sequence \V CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Configuring incomplete, errors occurred! Please advise J You seem to have a path using \ instead of / John ___ 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