[CMake] static runtime libraries for executables
Is it planned to add the subj feature in cmake ? It might looks like add_executable(test STATIC test.cpp) -- Best regards, Alexander mailto:[EMAIL PROTECTED] ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Is it possible to make a directory of tests dependent on RUN_TESTS target?
Hello, cmake. When I build RUN_TESTS, is just executes tests if it were built and reports error if there were no tests built. Is it possible to build tests executing RUN_TESTS? -- Best regards, Alexander mailto:[EMAIL PROTECTED] ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] How to make a target dependent on RUN_TESTS ?
subj ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] RE: Is it possible to link against libraries, built
Alexander Ivash wrote: Hello, cmake. Is the subj is possible? I have two cmake-managed projects: the library and tests. And this tests need to be linked against the library. How can I get such result? (Of course I can place tests and library into the same cmakelists.txt, but I think there will be a lot of tests and I don't want to pollute library+examples+tools solution with tests, that is whyI created different project for tests) Have you considered instead 'ADD_SUBDIRECTORY(tests EXCLUDE_FROM_ALL)'? Then you can have one project, but the tests aren't built by default. Thank you! It seems really what I want! The only question now is how to make RUN_TESTS target dependant on all tests. -- Matthew ...yzarc gniog ylwols era uoY -- ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake End of CMake Digest, Vol 38, Issue 16 * ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Is it possible to link against libraries, built in another cmakelists.txt ?
Is the subj is possible? I have two cmake-managed projects: the library and tests. And this tests need to be linked against the library. How can I ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] strange error: The system cannot find the path specified.
Hello, cmake. I have cmakelists.txt which contain something like the following: project(myLib) add_library(myLib ...) subdirs(examples) From this project I generate msvs2005 solution and unix-makefile for diab cross-compiler. When I build msvs2005 solution - all is ok, but for diab makefile I see the only myLib compiles. Here is a part of output: make[2]: Entering directory `D:/projects/myLib/build/eclipse/diab' Linking CXX executable testSimplePainting.out cd D:/projects/myLib/build/eclipse/diab/tests/unittests/Painting D:/Cmak e/bin/cmake.exe -P CMakeFiles/testSimplePainting.dir/cmake_clean_target.cmake The system cannot find the path specified. make[2]: *** [tests/unittests/Painting/testSimplePainting.out] Error 1 make[2]: Leaving directory `D:/projects/myLib/build/eclipse/diab' make[1]: *** [tests/unittests/Painting/CMakeFiles/testSimplePainting.dir/all] Er ror 2 make[1]: Leaving directory `D:/projects/myLib/build/eclipse/diab' make: *** [all] Error 2 Where I am wrong ? -- Best regards, Alexander mailto:[EMAIL PROTECTED] ___ CMake mailing list [EMAIL PROTECTED] http://www.cmake.org/mailman/listinfo/cmake
[CMake] Re: CMake Digest, Vol 35, Issue 29
Thank you for reply!.. I tried your way of passing -D options and see the same errors. The following sample from cmakelists.txt causes termination of cmake on win32. I run cmake -D CROSSCOMPILE=TRUE -D TOOL=diab -D CPU=SimNT -D UGL_INCLUDE=D:/WindRiver/components/windml-4.0/h -D VXWORKS_INCLUDE=D:/WindRiver/vxworks-6.1/target/h -G Unix Makefiles ../../../ if(DEFINED CROSSCOMPILE) set(ENV{PATH} $ENV{PATH};${WIND_RIVER_DIAB_DIR}) set(ENV{PATH} $ENV{PATH};${WIND_RIVER_DIR}/vxworks-6.1/host/x86-win32/bin) set(CMAKE_MAKE_PROGRAM make) set(CMAKE_CXX_COMPILER dcc) #set(CMAKE_COMPILER_IS_GNUCXX 1) set(CMAKE_C_COMPILER dcc) set(CMAKE_AR ar) elseif(DEFINED CROSSCOMPILE) endif(DEFINED CROSSCOMPILE) What I'm doing wrong? From my Linux/Unix perspective, it looks like you may have a syntax error in the way you are specifying your -D options with spaces. The following syntax for the -D options cmake -DCROSSCOMPILE=True ... ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] cmake exception
What do you mean by termination? Does cmake crash? Yes. Here some exception deatails: AppName: cmake.exe AppVer: 0.0.0.0 ModName: msvcr80d.dll ModVer: 8.0.50727.762Offset: 0003b130 I tried your command line and it did not crash. The problem was not in command line. After changed the sample a bit - exception disappeared! Here is working variant: #if(DEFINED CROSSCOMPILE) set(ENV{PATH} $ENV{PATH};${WIND_RIVER_DIAB_DIR}) set(ENV{PATH} $ENV{PATH};${WIND_RIVER_DIR}/vxworks-6.1/host/x86-win32/bin) set(CMAKE_MAKE_PROGRAM make CACHE STRING ) set(CMAKE_CXX_COMPILER dcc CACHE STRING ) #set(CMAKE_COMPILER_IS_GNUCXX 1 CACHE STRING ) set(CMAKE_C_COMPILER dcc CACHE STRING ) set(CMAKE_AR ar CACHE STRING ) #elseif(DEFINED CROSSCOMPILE) However, the set(ENV) stuff you have may not be exactly what you want. It will only set environment variables at CMake time, and not at make time. I just need to set custom tool chain if CROSSCOMPILE defined. I thought that in such a way I can define compiler, linker etc and at the compile time they will be used with a full absolute path. If I wrong how to acquire what I want ? Alexander Ivash wrote: Hello, cmake. The following sample from cmakelists.txt causes termination of cmake on win32. I run cmake -D CROSSCOMPILE=TRUE -D TOOL=diab -D CPU=SimNT -D UGL_INCLUDE=D:/WindRiver/components/windml-4.0/h -D VXWORKS_INCLUDE=D:/WindRiver/vxworks-6.1/target/h -G Unix Makefiles ../../../ if(DEFINED CROSSCOMPILE) set(ENV{PATH} $ENV{PATH};${WIND_RIVER_DIAB_DIR}) set(ENV{PATH} $ENV{PATH};${WIND_RIVER_DIR}/vxworks-6.1/host/x86-win32/bin) set(CMAKE_MAKE_PROGRAM make) set(CMAKE_CXX_COMPILER dcc) #set(CMAKE_COMPILER_IS_GNUCXX 1) set(CMAKE_C_COMPILER dcc) set(CMAKE_AR ar) elseif(DEFINED CROSSCOMPILE) endif(DEFINED CROSSCOMPILE) What I'm doing wrong? What do you mean by termination? Does cmake crash? I tried your command line and it did not crash. However, the set(ENV) stuff you have may not be exactly what you want. It will only set environment variables at CMake time, and not at make time. -Bill -- Best regards, Alexander mailto:[EMAIL PROTECTED] ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] cmake exception
Hello, cmake-request. You wrote 16 марта 2007 г., 15:22:41: Alexander Ivash wrote: What do you mean by termination? Does cmake crash? Yes. Here some exception deatails: AppName: cmake.exe AppVer: 0.0.0.0 ModName: msvcr80d.dll ModVer: 8.0.50727.762Offset: 0003b130 Can you build a debug version of cmake and get a call stack, or send a complete example that shows the problem. Also, what version of cmake is this, and did you build it yourself? Does the release from www.cmake.org work? I've attached buggy project. Just use eclipse_build_cache.bat file. I use version from cvs with commented check on debug, release, minSizRel and RelWithDebInfo in file cmGlobalVisualStudio7Generator.cxx, string ~176 (for support debug_unicode and release_unicode configurations in visual studio 2005). I didn't tested release version because my project needs custom build configurations, which can't be generated with unpatched cmake. You need to set cmake variables and not ENV variables. Your environment must be set outside of cmake for this to work. You have to remember once cmake is done running it creates build files that are used by some other program (make or devenv). It is no longer running and does not have anything to do with the environment. Thank you. I will try! -Bill -- Best regards, Alexander mailto:[EMAIL PROTECTED] ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] cmake exception
Hello, cmake. The following sample from cmakelists.txt causes termination of cmake on win32. I run cmake -D CROSSCOMPILE=TRUE -D TOOL=diab -D CPU=SimNT -D UGL_INCLUDE=D:/WindRiver/components/windml-4.0/h -D VXWORKS_INCLUDE=D:/WindRiver/vxworks-6.1/target/h -G Unix Makefiles ../../../ if(DEFINED CROSSCOMPILE) set(ENV{PATH} $ENV{PATH};${WIND_RIVER_DIAB_DIR}) set(ENV{PATH} $ENV{PATH};${WIND_RIVER_DIR}/vxworks-6.1/host/x86-win32/bin) set(CMAKE_MAKE_PROGRAM make) set(CMAKE_CXX_COMPILER dcc) #set(CMAKE_COMPILER_IS_GNUCXX 1) set(CMAKE_C_COMPILER dcc) set(CMAKE_AR ar) elseif(DEFINED CROSSCOMPILE) endif(DEFINED CROSSCOMPILE) What I'm doing wrong? -- Best regards, Alexander mailto:[EMAIL PROTECTED] ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Questions on CMAKE_CONFIGURATION_TYPES
Hello, cmake. I need to make a project with 4 configuration types: Debug, Release, Debug_Unicode and Release_Unicode. As I was told Visual Studio 8 2005 generator can't handle configurations other than Debug, Release, MinSizRel and RelWithDebugInfo. (When I tried to set my 4 configurations with the command set(CMAKE_CONFIGURATION_TYPES Debug Release Debug_Unicode Release_Unicode CACHE TYPE INTERNAL FORCE ) , I got the next response: CMake Error: Invalid configuration type in CMAKE_CONFIGURATION_TYPES: Debug_Unic ode (Valid types are Debug,Release,MinSizeRel,RelWithDebInfo) CMake Error: Invalid configuration type in CMAKE_CONFIGURATION_TYPES: Release_Un icode (Valid types are Debug,Release,MinSizeRel,RelWithDebInfo) ) After I commented this check ( if(config == Debug || config == Release || config == MinSizeRel || config == RelWithDebInfo) ) in the cmGlobalVisualStudio7Generator.cxx file - errors disappeared and I got exactly the same project type (I mean with 4 custom configurations) that I wanted in Visual Studio 8. 1. For what purpose this check is? Is it bug or feature? The hack above works for me but is it scheduled to implement more clean way of adding custom build configurations to VisualStudio generators? But there is another problem - now if I create project for nmake (use nmake generator) then I can't install my target because CMAKE_INSTALL_CONFIG_NAME gets value Debug Release Debug_Unicode Release_Unicode instead of CMAKE_BUILD_TYPE value. So I decided to do the following check: if(MSVC_IDE) set(CMAKE_CONFIGURATION_TYPES Debug Release Debug_Unicode Release_Unicode CACHE TYPE INTERNAL FORCE ) endif(MSVC_IDE) But it doesn't work! It seems never be true! Is it bug or feature again? How to distinguish nmake generator from msvc8 ? -- Best regards, Alexander mailto:[EMAIL PROTECTED] ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re[2]: [CMake] reusable cmakecache.txt
Hello, Bill. You wrote 26 ôåâðàëÿ 2007 ã., 19:26:44: Alexander Ivash wrote: Hello, cmake. I have 2 compilers: gnu and diab. Cmake can't find them so I have to run cmakesetup and enter path for them every time I need to prepare new project for compilation. Is it possible to keep gnu related path in gnu.cmake and diab related in diab.cmake and later do something like this: cmake -G Unix Makefiles -gnu.cmake ? I thought -C option exists for this purposes, but it seems that -C just set path to CMakeLists.txt. It will be very cool if the written above is possible. CXX and CC environment variables can be set prior to running cmake if it can not find your compiler. -Bill Due to -D option? But it seems a bit unconvenient to type every time cmake -D CMAKE_AR:FILEPATH=D:/WindRiver/diab/5.2.3.0/WIN32/bin/dar.exe -D CMAKE_CXX_COMPILER:FILEPATH=D:/WindRiver/diab/5.2.3.0/WIN32/bin/dcc.exe -D CMAKE_C_COMPILER:FILEPATH=D:/WindRiver/diab/5.2.3.0/WIN32/bin/dcc.exe -D CMAKE_MAKE_PROGRAM:FILEPATH=D:/WindRiver/vxworks-6.1/host/x86-win32/bin/make.exe -G Unix Makefiles each time when I need to generate CmakeCache for project. If there would be a feature to use template cmake cache as a prototype for creating working cmake cache... Or I something misunderstand ? -- Best regards, Alexander mailto:[EMAIL PROTECTED] ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] cmake and crosscompiling
Hello, cmake. Another pair of stupid questions. 1. Can you give me any tips on subj? 2. How to change c++ object and library files extensions? I compile unix makefile-based project from eclipse under win32 so cmake think my current platform is win32. And it makes c++ output is obj and libraries are lib. But I need o instead of obj and out instead of lib. I've tried to set CMAKE_CXX_OUTPUT_EXTENSION to o or even UNIX to TRUE but has no succeed. And I still can't find how to change library extension. :( -- Best regards, Alexander mailto:[EMAIL PROTECTED] ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] (no subject)
Hello, cmake. Is it possible to use cmake with eclipse for c++ projects ? -- Best regards, Alexander mailto:[EMAIL PROTECTED] ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake