Re: [CMake] Cmake and Visual Studio platforms
> If CMake developers say that the code is simply not structured like that, or > it is too much work to rewrite these parts (and a few others that might > depend on it), then I leave this subject be and not bother again with it. David led the CMake development for 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] Cmake and Visual Studio platforms
On Fri, Mar 1, 2013 at 10:52 AM, John Drescher wrote: >> If CMake developers say that the code is simply not structured like that, or >> it is too much work to rewrite these parts (and a few others that might >> depend on it), then I leave this subject be and not bother again with it. > > David led the CMake development for years. http://www.kitware.com/blog/home/user/9 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] Check for working C compiler using: Visual Studio 10 -- broken
On Tue, Mar 5, 2013 at 10:58 AM, David Cole wrote: > Is your VS 2010 up to date with respect to available service packs? > I was going to ask that because Visual Studio 2010 RTM has a nasty optimizer bug that caused me some pain in the past. SP1 fixed that 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] Build several targets using cmake --build
> I use cmake 2.8.10 on windows. > > > > I would like to build several targets with cmake --build so the > underlying build tool to do parallel jobs. > > > > Currently it only seems to be possible to build one target at a time, using > --target . > (http://www.cmake.org/cmake/help/v2.8.10/cmake.html#opt:--builddir) > > > > Can someone tell me how I could achieve that with current cmake version? > > I execute more than 1 cmake --build at the same time on windows. I actually do this in a program called runjobs http://www.codeproject.com/Articles/25810/Run-All-Jobs-at-Once-Utility 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 avoid having /D _MBCS ?
On Thu, Mar 21, 2013 at 10:20 AM, Martin Koller wrote: > In my win project, when I use the visual studio generator (64bit), I always > get the /D _MBCS flag in the compiler options > (started with msbuild). > When I generate Makefiles with the same project (JOM NMakefiles), _MBCS is > not defined. > I do not want to have it defined. How can I avoid it and still using vcxproj > files ? > -- I would use remove_definitions(-D_MBCS) x:\x64\VC.110>cmake --help-command remove_definitions cmake version 2.8.10.2 remove_definitions Removes -D define flags added by add_definitions. remove_definitions(-DFOO -DBAR ...) Removes flags (added by add_definitions) from the compiler command line for sources in the current directory and below. 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] compiling examples using Xcode
> I already have CMake 2.8.1 installed. Sorry for not specifying that earlier. > I also have installed the GIT repository version of VTK. > If CMake is not found then it is either not properly installed or not in your path. 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] "Cannot restore timestamp" error on Windows
> I installed it and it ran one time and I didn't see the error, but it's > intermittent so that's not definitive. Unfortunately one of my cmake > files failed (later on; this is a cmake file from a smaller > sub-project): > > CMake Error at CMakeLists.txt:190 (TARGET_LINK_LIBRARIES): > Error evaluating generator expression: > > > $:php5ts_debug>,INTERFACE_INCLUDE_DIRECTORIES> > > $ expression requires a non-empty target > name. > > I have to back out the upgrade until I can figure out what this error > means: there's no reference to INTERFACE_INCLUDE_DIRECTORIES anywhere in > my CMakeLists.txt and this project is not one I'm familiar with. > I have seen this as well with the 2.8.11-rc releases. I am not exactly what causes 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] QT, CMake and ITK
> Here it is: > #--- > project(test) > > cmake_minimum_required(VERSION 2.4.0) > > find_package(Qt4 REQUIRED) > > SET(qtproject_UIS mainwindow.ui) > > QT4_WRAP_UI(qtproject_UIS_H ${qtproject_UIS}) > > include_directories(${CMAKE_CURRENT_BINARY_DIR}) > > add_executable(test ${qtproject_SRCS} ${qtproject_UIS_H}) > #--- You have no source files 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] 2.8.11-rc3 generator expression error (was: "Cannot restore timestamp" error on Windows)
> The purpose of -rc releases is for people to try them and report back > any regressions for building their projects. John, did you report > this anywhere earlier that we missed? > I did not. Sorry. I wanted to try to better track down the cause. I initially thought it was based on having more than 1 project() but I believe I also got that after removing all but the main project() in my application. This happened over the weekend and I had no further time to test 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] QT, CMake and ITK
> project(test) > > cmake_minimum_required(VERSION 2.4.0) > > find_package(Qt4 REQUIRED) > > SET(qtproject_UIS mainwindow.ui) > > QT4_WRAP_UI(qtproject_UIS_H ${qtproject_UIS}) > > include_directories(${CMAKE_ > CURRENT_BINARY_DIR}) > > add_executable(test ${qtproject_SRCS} ${qtproject_UIS_H} main.cpp) > > TARGET_LINK_LIBRARIES(test ITKCommon ITKIO ITKBasicFilters) > Okay, I was wrong about not having any source files. I see main.cpp being a source file even though ${qtproject_SRCS} is not populated. Also if you are going to use ITK then you need to use a finder for that 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] QT, CMake and ITK
On Wed, Apr 24, 2013 at 2:06 PM, Jean-Christophe Fillion-Robin wrote: > > Hi, > > What about adding: find_package(ITK REQUIRED) > > If you use ITKv4, you could change: > TARGET_LINK_LIBRARIES(test ITKCommon ITKIO ITKBasicFilters) > into > TARGET_LINK_LIBRARIES(test ${ITK_LIBRARIES}) > > As a best practice, you could use lower case for the CMake function and > command. > Qt needs to be in the TARGET_LINK_LIBRARIES as well. TARGET_LINK_LIBRARIES(test ${ITK_LIBRARIES} ${QT_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] QT, CMake and ITK
> I just did what you said, but still getting the same error message... That is expected. The problem you just mentioned is not a linking problem. You are missing several includes in your CMakeLists.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] QT, CMake and ITK
> I put all the folders in the CMakeLists.txt, but still not working... > > TARGET_LINK_LIBRARIES(test ITKCommon ITKIO ITKBasicFilters ITKAlgorithms > ITKNumerics ITKSpatialObjetcs ITKReview ITKPatented ${QT_LIBRARIES}) > Again the missing header files problem has nothing at all to do with linking. Please put that back to TARGET_LINK_LIBRARIES(test ${ITK_LIBRARIES} ${QT_LIBRARIES} ) > Can you give me an example, please? Is there a way to simplify all this > process? You are missing include(${ITK_USE_FILE}) and include(${QT_USE_FILE}) before your add_executable() However you seriously need to look at some more recent CMake tutorials and documentation. There are tons of examples on the vtk wiki. 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] QT, CMake and ITK
On Wed, Apr 24, 2013 at 3:13 PM, Gabriel Santiago wrote: > I did it, but still not working... Getting the same error message as before. > Are you using very old versions of Qt, ITK and CMake? I ask because of this line cmake_minimum_required(VERSION 2.4.0) The current version of CMake is 2.8.10.2 I normally put cmake_minimum_required(VERSION 2.8) in all of my projects since 2.8.0 was released in September of 2009. 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] QT, CMake and ITK
On Wed, Apr 24, 2013 at 3:31 PM, Gabriel Santiago wrote: > Actually my CMake is 2.8.7, ITK is 3.20.1 and QT is the latest... > I believe this file should work. Although I really do not have any more time to help if it does not. project(test) cmake_minimum_required(VERSION 2.8 FATAL_ERROR) find_package(Qt4 REQUIRED) include(${QT_USE_FILE}) find_package(ITK REQUIRED) include( ${ITK_USE_FILE} ) set( qtproject_SRCS main.cpp) set(qtproject_UIS mainwindow.ui) QT4_WRAP_UI(qtproject_UIS_H ${qtproject_UIS}) include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_executable(test ${qtproject_SRCS} ${qtproject_UIS_H}) TARGET_LINK_LIBRARIES(test ${ITK_LIBRARIES} ${QT_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] MSVC10 redistributable issue
On Thu, May 2, 2013 at 3:35 PM, Laszlo Papp wrote: > Hi, > > I tried to install the following redistributable package after seeing the > issue below, but it did not help, not even after a reboot. > > Got a clue? It looks like you were not supposed to install the redistributable but to put it somewhere and tell cmake-gui where it was then hit generate. 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] custom NSIS installer
> It states that... > > "To start work on a custom NSIS script, simply create a file (or copy) into > your module path (e.g. CPACK_MODULE_PATH) called NSIS.template.in." > > Checking the cmake documentation, there is no predefined variable named > "CPACK_MODULE_PATH". > > I could find a "NSIS.template.in." in the cmake's (main cmake install > directory) modules directory. I believe cmake would not ask me to modify > this file, as each project's nsis template requirement would be different. > > could you please let me know the correct location where I should create the > template file? > > Thanks, > Lloyd Use List append to append your local module path to the CMAKE_MODULE_PATH then put your custom NSIS.template.in in that folder LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/Modules) So in my project root I have the following folder: CMake\Modules and it contains my customized NSIS.template.in 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 64 bit project with: mingw32, Qt and VTK
> Qt 4.5.0 or greater not found. Please check the QT_QMAKE_EXECUTABLE > variable. Did you follow the above advice? I mean go in cmake-gui and make sure this variable contains the path to the qmake executable. 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] Multiple versions of ITK in one build?
On Tue, May 28, 2013 at 10:16 AM, Zamir Khan wrote: > We have a project where multiple modules rely on ITK. Most modules have been > upgraded to ITK 4.31, but one still relies on ITK 3.20 and it would take a > significant effort to upgrade it. In the meantime, is there a way for us to > keep these modules under a single top-level CMake and have them use their > respective versions of ITK? > > We thought we could just try to overwrite the ITK_DIR variable in the > appropriate place, but our first naive implementation of this did not work. > > Just wondering if someone has done this and whether it is possible (before > we dive deeper). > On windows I have several completely separate build trees with their own environment. This way I can build for different compiler versions, 32/64 bit and different versions of libraries like this. Inside the root of each build tree there is a link to the appropriate Visual Studio command prompt that has its default folder set to the build tree root. Also in the root there is a batch file that sets quite a few _DIR environment variables to help cmake find the correct compiled libraries. This has worked well for the 5 or so years that I have done it this way. I do not use INSTALL targets so none of the binaries end up in Program Files. 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] Target Properties FOLDER not working?
On Thu, May 30, 2013 at 1:53 PM, Michael Jackson wrote: > I am trying to group some of my targets for my Visual Studio users and I am > using the following code: > > # > add_executable(StructArrayTest ${DREAM3DTest_SOURCE_DIR}/StructArrayTest.cpp) > target_link_libraries(StructArrayTest EbsdLib MXA DREAM3DLib) > SET_TARGET_PROPERTIES (StructArrayTest PROPERTIES FOLDER Test) > > I have about 30 of those. What I am expecting to see in the Visual Studio > 2010 solution is a Folder called "Test" with all my test projects listed in > that but I just see everything at the top level. Is there something else that > I need to call to enable this? > > Windows 7 x64 with Visual Studio 2010 SP1 Professional. > Did you enable solution folders globally in the top level CMakeLists.txt? #Use solution folders. set_property(GLOBAL PROPERTY USE_FOLDERS ON) 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] [#RIT-489-15815]: Re: Visual Studio 10 compiler identification unknown
> Any idea who has subscribed pir...@teamspeakusa.com to this list? > I have seen this spam on multiple email lists not just cmake. This is getting very annoying. John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Visual Studio 10 compiler identification unknown
> Configuration of VTK with cmake-gui was ok. Don't know how it was fixed. > > Does it help if I send the output of the minimal test case? > I suspect deleting the cache in cmake-gui then running cmake-gui from the windows shortcut will break it again. BTW, I usually run cmake-gui from a visual studio command prompt. The reason for this is I use more than visual studio compiler and also use 32 and 64 bit in different build trees so I have command prompts with different environment variables set that help cmake to find the correct libraries for the build tree that I am currently using. John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] [vtkusers] Problems building Vtk on Windows 7
> > Deleting cache and reconfiguring doesn't help... I get the same errors > repeatedly! Why does it say that it can't recognize the C and CXX > compilers? Do you think I should try with some vanilla Visual Studio 12 as > opposed to the "Ultimate" I got from MS? > > > Wait a minute. You said Visual Studio 12. Do you have the prerelease of Visual Studio 2013? John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] [vtkusers] Problems building Vtk on Windows 7
On Fri, Oct 4, 2013 at 10:34 AM, John Drescher wrote: > > Deleting cache and reconfiguring doesn't help... I get the same errors >> repeatedly! Why does it say that it can't recognize the C and CXX >> compilers? Do you think I should try with some vanilla Visual Studio 12 as >> opposed to the "Ultimate" I got from MS? >> >> >> > Wait a minute. You said Visual Studio 12. Do you have the prerelease of > Visual Studio 2013? > I ask that because the correct generator for Visual Studio 2012 is Visual Studio 11. John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Forwarding parameters to cmake through cmake-gui
> +1 for updating cmake-gui to work equally to ccmake > > But my opinion regarding CMAKE_MODULE_PATH is different. The problem is that > alot of the default find-modules don't work because the dependency is not in > the location where the find-module expects it. Currently there are only two > workarounds: > - Change the find-module directly so it works in the local environment > - Change the CMakeLists.txt of the project - which is bad because it's just > a LOCAL problem and the CMakeLists should be mostly independent of the > environment. > > With the command-line option it's possible to setup a custom cmake-gui batch > file once per computer which sets e.g. the CMAKE_MODULE_PATH to a directory > with customized find modules. If one doesn't want to use custom find modules > that's fine too but I think everyone should have the option to place > dependent libraries wherever she/he wants. > For these kind of things I use environment variables in my CMakeLists.txt. If the environment variable is set I use it. If not I use the default behavior. John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake fails on Win7 x64 with VS 2012
On Sat, Dec 28, 2013 at 8:35 AM, Ansis Māliņš wrote: > The minimal CMakeLists.txt with content > > CMAKE_MINIMUM_REQUIRED(VERSION 2.8) > PROJECT(CMakeTest) > > on CMake 2.8.12.1 on Windows 7 64 bit with Visual Studio 2012 produces the > result > > CMake Error at C:/Program Files (x86)/CMake > 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:446 > (execute_process): > execute_process given COMMAND argument with no value. > Call Stack (most recent call first): > C:/Program Files (x86)/CMake > 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:48 > (CMAKE_DETERMINE_COMPILER_ID_VENDOR) > C:/Program Files (x86)/CMake > 2.8/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:131 > (CMAKE_DETERMINE_COMPILER_ID) > CMakeLists.txt:2 (PROJECT) > > > The C compiler identification is unknown > CMake Error at C:/Program Files (x86)/CMake > 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:446 > (execute_process): > execute_process given COMMAND argument with no value. > Call Stack (most recent call first): > C:/Program Files (x86)/CMake > 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:48 > (CMAKE_DETERMINE_COMPILER_ID_VENDOR) > C:/Program Files (x86)/CMake > 2.8/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:127 > (CMAKE_DETERMINE_COMPILER_ID) > CMakeLists.txt:2 (PROJECT) > > > The CXX compiler identification is unknown > Configuring incomplete, errors occurred! > > What do? > Did you use the correct generator? Remember that Visual Studio 2012 is Visual Studio 11 not Visual Studio 12. John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake fails on Win7 x64 with VS 2012
On Sat, Dec 28, 2013 at 9:05 AM, Ansis Māliņš wrote: > Yes, I'm using Visual Studio 11 (aka 2012) generator. Did you try running cmake-gui from a Visual Studio 2012 x64 Command Prompt so that the compiler environment variables are set? John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Fwd: Visual Studio command line from CMake
> Why not just write your own batch ('buildit.bat') file that does: > >call vcvarsall.bat >nmake > > (or whatever the command to build in the VS command prompt is...) > > And then your command to build is: > >C:/full/path/to/buildit.bat > > It's presumably in a Windows-specific chunk of your CMakeLists anyway, so > that should work fairly simply. I think the part of problem would be figuring out what vcvarsall.bat to run especially if you have more than 1 version of Visual Studio. John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Linking Error with Visual Studio 2013 x64
Is there some option to export automatically some methods without using __declspec(dllexport)? >> >> No. There are workarounds like in >> http://stackoverflow.com/questions/225432/export-all-symbols-when-creating-a-dll >> but it's too much work. >> Basically you want to define a macro that resolves to >> __declspec(dllexport) when building the DLL and to nothing when only using >> libraries headers. > CMake module GenerateExportHeader can help a little with this. John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Are the [Project name]_SOURCE_DIR variables stored in the cache ?
> I thought they probably were. My question was really if the behaviour that > results from that was desirable. I can't see any reason why they should be > cached as they aren't user configurable variables. Would it break anything > badly if they were not stored in the cache ? It would result in more > consistent behaviour IMHO. > Executing cmake . would fail in the bin folder if it had no way to know where the source folder is. John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Are the [Project name]_SOURCE_DIR variables stored in the cache ?
On Thu, May 1, 2014 at 1:54 PM, Glenn Coombs wrote: > What I am saying is that project("foo") should internally execute the > equivalent of set(foo_SOURCE_DIR "/path/to/source") rather than set(foo > "/path/to/source" CACHE STRING). That way it would fail on every run if you > referenced a project source directory variable before you had done the > add_subdirectory() for that project. Currently in that situation it fails > the first time you run cmake but works as expected on subsequent runs of > cmake, which I think is odd behaviour. > I am saying making this change to not cache the source folder would break cmake binfolder and cmake --build buildfolder and several other commands that have worked this way for years. John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Are the [Project name]_SOURCE_DIR variables stored in the cache ?
On Thu, May 1, 2014 at 2:16 PM, Matthew Woehlke wrote: > On 2014-05-01 13:35, John Drescher wrote: >>> >>> I thought they probably were. My question was really if the behaviour >>> that >>> results from that was desirable. I can't see any reason why they should >>> be >>> cached as they aren't user configurable variables. Would it break >>> anything >>> badly if they were not stored in the cache ? It would result in more >>> consistent behaviour IMHO. >>> >> >> Executing >> >> cmake . >> >> would fail in the bin folder if it had no way to know where the source >> folder is. > > > If CMAKE_BINARY_DIR were not cached, yes. But I don't think not caching that > is being suggested. It's not clear to me why the *per-project* flavors need > to be cached? > I see now. Sorry for the noise.. John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Question of using cmake in Windows
> Ok, run cmake -G "MinGW Makefiles" > -DCMAKE_C_COMPILER=/c/mingw-w64-4.9.0/mingw64/bin > I got this error: > CMake Error: the source directory does not appear to contain > CMakeLists.txt > > What I am missing? > You are not passing the folder of the source. John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Changing the the current generator in CMake GUI
On Fri, Jul 11, 2014 at 10:33 AM, Edward Diener wrote: > Shouldn't there be a way to change the current generator in the CMake GUI ? > It seems like I can only do this if I choose a new "Where to build the > binaries" path. But what if I just want to change the current generator to > something else using the current outpath path ? > You can also do this if you reset the cache in cmake-gui. John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] CMAKE changing Visual Studio Settings
> So CMAKE can't control the options int he *.user files I guess :-\? Would a > potential workaround be to find a command line tool that can edit these and > run it as a post-build script? CMake gives you the functionality needed to edit these via your own script. I mean reading and writing files replacing text. John -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] VTK compiling problem with CMake
Did you try runing cmake-gui from a VisualStudio 2010 x64 command prompt? John On Tue, Sep 23, 2014 at 1:08 PM, lanhz wrote: > Hi, > > I'm trying use CMake to build VTK, but got error as below. I searched the > internet and tried many ways suggested, but they didn't work. The OS is > Windows 7 with Visual Studio 2010 Pro (up to date). I don't know how to > solve. I'll appreciate your help. > > Error info from CMake-gui > - > The C compiler identification is MSVC 16.0.30319.1 > The CXX compiler identification is MSVC 16.0.30319.1 > Check for working C compiler using: Visual Studio 10 Win64 > Check for working C compiler using: Visual Studio 10 Win64 -- broken > CMake Error at C:/Program Files (x86)/CMake > 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): > The C compiler "C:/Program Files (x86)/Microsoft Visual Studio > 10.0/VC/bin/x86_amd64/cl.exe" is not able to compile a simple test program. > > It fails with the following output: > > Change Dir: C:/Code/VTK-bin/CMakeFiles/CMakeTmp > > Run Build Command:C:\PROGRA~2\MICROS~2.0\Common7\IDE\devenv.com > CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec696148031 > > > Microsoft (R) Visual Studio Version 10.0.30319.1. > > > Copyright (C) Microsoft Corp. All rights reserved. > > > 1>-- Build started: Project: cmTryCompileExec696148031, Configuration: > Debug x64 -- > > > 1>Build started 9/10/2014 1:31:13 PM. > > > 1>PrepareForBuild: > > > 1> Creating directory "C:\Code\VTK-bin\CMakeFiles\CMakeTmp\Debug\". > > > 1>InitializeBuildStatus: > > > 1> Creating > "cmTryCompileExec696148031.dir\Debug\cmTryCompileExec696148031.unsuccessfulbuild" > because "AlwaysCreate" was specified. > > > 1>ClCompile: > > > 1> Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64 > > > 1> Copyright (C) Microsoft Corporation. All rights reserved. > > > 1> > > > 1> cl /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D > "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise > /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec696148031.dir\Debug\\" > /Fd"cmTryCompileExec696148031.dir\Debug\vc100.pdb" /Gd /TC > /errorReport:prompt testCCompiler.c > > > 1> > > > 1> testCCompiler.c > > > 1>LINK : fatal error LNK1123: failure during conversion to COFF: file > invalid or corrupt > > > 1> > > > 1>Build FAILED. > > > 1> > > > 1>Time Elapsed 00:00:00.26 > > > == 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:28 (project) > Configuring incomplete, errors occurred! > See also "C:/Code/VTK-bin/CMakeFiles/CMakeOutput.log". > See also "C:/Code/VTK-bin/CMakeFiles/CMakeError.log". > > > Best > Lan > > > > -- > View this message in context: > http://cmake.3232098.n2.nabble.com/VTK-compiling-problem-with-CMake-tp7588569.html > Sent from the CMake mailing list archive at Nabble.com. > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake -- John M. Drescher -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake