[CMake] CPack: How to add the Build Configuration Type to the created installer
I would like to generate installers for both a Release and a Debug build but have them be separate installers under Visual Studio. Currently when I build the PACKAGE project in my solution I get a nice installer with a name like: AIMRepresentation-2009.11.03-win64.exe which is generally fine but I was trying to figure out how to add -Debuge.exe at the end of the generated filename. I am sure it is probably some simple cpack variable but I am failing to find what I need. Thanks for any gentle pushes in the right direction. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio ___ 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: How to add the Build Configuration Type to the created installer
2009/11/5 Michael Jackson mike.jack...@bluequartz.net: I would like to generate installers for both a Release and a Debug build but have them be separate installers under Visual Studio. Currently when I build the PACKAGE project in my solution I get a nice installer with a name like: AIMRepresentation-2009.11.03-win64.exe which is generally fine but I was trying to figure out how to add -Debuge.exe at the end of the generated filename. I am sure it is probably some simple cpack variable but I am failing to find what I need. Did you try setting up CPACK_PACKAGE_FILE_NAME If this variable is not set [before you INCLUDE(CPack)] then is set to: ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME} see: http://www.cmake.org/Wiki/CMake:CPackConfiguration In order to get a may-be-complete list of CPack variables you may try: cmake --help-module CPack However I don't know if all CPack generator do honor the CPACK_PACKAGE_FILE_NAME usage. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org ___ 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] infinite loop when trying to change the compiler in CMakeLists.txt
2009/11/5 btho...@nexus.hu: Dear All, I am managing a CFD code where wish to set the CMAKE_C_COMPILER and CMAKE_CXX_COMPILER to openmpi wrappers. So far i was using cmake 2.4.7 and in the CMakeLists.txt the following lines were working perfectly: SET(CMAKE_C_COMPILER ${MPI_INSTALL_ROOT}/bin/mpicc ) SET(CMAKE_CXX_COMPILER ${MPI_INSTALL_ROOT}/bin/mpic++ ) You usually should not do it that way but let CMake discover them, from a typical command line: CC=/path/to/mpicc CXX=/path/to/mpic++ cmake /to/build/tree see: http://www.cmake.org/Wiki/CMake_Useful_Variables#Compilers_and_Tools -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org ___ 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: How to add the Build Configuration Type to thecreated installer
# Cpack section SET(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${VERSION}-win32-${CMAKE_BUILD_TYPE}) If you don't want the -release to show up on the release version, you could put an if statement above this that checks the build type and creates a variable (I call mine PACKAGE_POSTFIX) and you load that with what you want and substitute PACKAGE_POSTFIX for CMAKE_BUILD_TYPE above. -- Shane Dixon Linux Engineer Atmel Corporation -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Michael Jackson Sent: Thursday, November 05, 2009 12:32 PM To: cmake Mailing List Subject: [CMake] CPack: How to add the Build Configuration Type to thecreated installer I would like to generate installers for both a Release and a Debug build but have them be separate installers under Visual Studio. Currently when I build the PACKAGE project in my solution I get a nice installer with a name like: AIMRepresentation-2009.11.03-win64.exe which is generally fine but I was trying to figure out how to add -Debuge.exe at the end of the generated filename. I am sure it is probably some simple cpack variable but I am failing to find what I need. Thanks for any gentle pushes in the right direction. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] infinite loop when trying to change the compiler in CMakeLists.txt
Another way to deal with this is to set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER *before* the first project() command. You could do this in the main CMakeLists.txt file or in a separate CMake script file that you include before the project() command. In fact, this is what also happens when you do cross-compilation using a tool-chain file. The tool-chain file is being read as the very first file, before any CMakeLists.txt file is processed. I don't know if doing things this way is considered good practice, but I'm using it for our project to build with different compilers depending on the name of the build directory. Hope this helps, Marcel Loose. On Thu, 2009-11-05 at 11:36 -0700, Will Dicharry wrote: I think the best way to do that is with an initial cache via the -C flag to cmake. Then you can set the initial CMAKE_LANG_COMPILER option in a CMake file and start with that file. I currently don't do this, but I should. At the moment I am doing this wrong by using the CMAKE_TOOLCHAIN_FILE variable and setting up the MPI wrapper compilers in there. This is currently working for me, but it is the wrong way of doing it since the toolchain files should really only be used for cross compiling. -- Will On 11/05/2009 11:07 AM, btho...@nexus.hu wrote: Dear All, I am managing a CFD code where wish to set the CMAKE_C_COMPILER and CMAKE_CXX_COMPILER to openmpi wrappers. So far i was using cmake 2.4.7 and in the CMakeLists.txt the following lines were working perfectly: SET(CMAKE_C_COMPILER ${MPI_INSTALL_ROOT}/bin/mpicc ) SET(CMAKE_CXX_COMPILER ${MPI_INSTALL_ROOT}/bin/mpic++ ) Now that I changed to CMake 2.8.0 there is an infinite loop when trying to configure: n...@machine: ./deps/bin/cmake ../ -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done You have changed variables that require your cache to be deleted. Configure will be re-run and you may have to reset some variables. The following variables have changed: CMAKE_C_COMPILER= /usr/bin/gcc CMAKE_CXX_COMPILER= /usr/bin/c++ -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done You have changed variables that require your cache to be deleted. Configure will be re-run and you may have to reset some variables. The following variables have changed: CMAKE_C_COMPILER= /usr/bin/gcc CMAKE_CXX_COMPILER= /usr/bin/c++ ... and enters an infinite loop. If I set the compilers via command line arguments, its fine. But for easy-to-compile-by-the-users reason, I would like to set them in the CMakeLists.txt if possible. Can somebody help me out how to do this right? The machine: Ubuntu, openmpi 1.3.3 with system gcc 4.4.1 behind Thx: Th P.S.: I noted a bugfix in CMake 2.6.2 RC 2, may be connected: Fix infinite recursion bug with try-compile and change of compilers ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake