Re: [CMake] symstore

2011-05-23 Thread Alexey Livshits
In my project there is a call to symstore.exe in build script. Sure
you can add a target, but its not necessary imho.

2011/5/22 Paul Harris :
> Hi,
> http://www.stackhash.com/blog/post/Setting-up-a-Symbol-Server.aspx
> I read this blog and thought it would be great to have cmake generate a
> "SYMSTORE" project in addition to the "INSTALL" project, which would add the
> pdb files to the symstore area.
> I googled and haven't heard anything about it anywhere else, in relation to
> cmake.
> How do cmake users manage debugging minidumps from users?
> thanks
> 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
>



-- 
BG,
Alexey
___
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] DLL and EXE with same base name: clash in VS.

2011-04-07 Thread Alexey Livshits
> CMake uses prefix+base+".pdb" to generate the PDB file name, however I
> didn't dig deep enough to find out what `base' is, just that it is
> obtained with cmTarget::GetName(). Whether that refers to the target
> name or the OUTPUT_NAME, I couldn't find out easily, so you'll have to
> experiment ;-)

You're right :o
-- 
BG,
Alexey
___
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] DLL and EXE with same base name: clash in VS.

2011-04-06 Thread Alexey Livshits
> We have a clang.exe and a clang.dll. While building, VS creates
> clang.pdb (for the executable) and clang.pdb (for the dll) which
> obviously is not right. Is there a way to tell VS to use a different
> name for the PDB?

You can use different project name for exe and set the output name via
OUTPUT_NAME property.
-- 
BG,
Alexey
___
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] Visual Studio 6 generator and relative source file path

2011-03-30 Thread Alexey Livshits
I've already posted the question about different targets with the same
name. I'm trying to change my project's cmake configuration towards it
like this (this is a very simplicated example):

|-- foo
| cmake_foo1
|--- CMakeLists.txt
| cmake_foo2
|--- CMakeLists.txt
|
| bar.cpp
| CMakeLists.txt
| foo.cpp
| foo.rc

cmake_foo1/CMakeLists.txt:
add_library(foo1 ../bar.cpp ../foo.cpp ../foo.rc)

cmake_foo2/CMakeLists.txt ist similar.

I've got the wrong intermediate path for foo.cpp and foo.rc, because
CMake thinks, its the same filename, so it must generate the output in
different dirs.
I've got the cmake source code and tried to debug. I've found out,
that the function cmLocalVisualStudioGenerator::CountObjectNames
calculates object file name wrong. It adds "obj" regardless source
file type. It must be
-
objectName += this->GlobalGenerator->GetLanguageOutputExtension(*sf)
-
instead.

I think, its a easy fix.
-- 
BG,
Alexey
___
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 library configurations with the same output name

2011-03-07 Thread Alexey Livshits
> Usually there are 2 ways: 1) put them into separate directories (like Debug
> and Release), probably specifying different output directories  or 2) use
> different file names, say adding suffixes like D, or d8.
> BTW, what's the point to have different configurations in the same workspace
> (do you really still use VC6?) in different projects? Usually for Visual
> Studio configuration is coded into output directory path using macros like
> $(Configuration), so resulting binaries are put into different dirs. And you
> have to build twise to get all configurations.
> Why do they required to have the same name? May be you're trying to solve
> wrong problem?

I don't need a new configuration like debug or release, but multiple
versions of our software. Same names for targets is a must.
CMake build process already works fine, I just try to optimize it.
Yes, I have to use VC6, because of legacy code.

-- 
BG,
Alexey
___
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 library configurations with the same output name

2011-03-04 Thread Alexey Livshits
> I am not a Visual Studio user so I may be missing your point here
> but why having foo_1 and foo_2 ending up in the same workspace is a problem?
>
> As long as the lib/dll end up in separate dirs (using *_OUTPUT_DIRECTORY).

Workspaces become too large, so I would like make'em smaller.

> Should work too.

Any other possibility?

Thank you.
-- 
BG,
Alexey
___
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 library configurations with the same output name

2011-03-04 Thread Alexey Livshits
> You can definition two different library target
> and use OUTPUT_NAME property to adjust the name
>
> add_library(foo1 ${foo_source})
> set_target_properties(foo1 PROPERTIES
>                                       OUTPUT_NAME foo)
>
> add_library(foo2 ${foo_source})
> set_target_properties(foo2 PROPERTIES
>                                       OUTPUT_NAME foo)
>
> You probably want to adjust COMPILE_FLAGS and/or LINK_FLAGS
> for each target as well.

That's what I already do. I also set different *_OUTPUT_DIRECTORY to
avoid collisions. The problem is, I cannot define different PROJECTs,
so foo_1 and foo_2 are in the same VS workspace.

> If you intend to build those librarie during the same build then
> you'll have to define those targets in separate directories
> (with shared source are shared).

So?

foo
|
|- foo_1
   |- CMakelists.txt
|- foo_2
   |- CMakelists.txt
|
|- foo.cpp

-- 
BG,
Alexey
___
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] Multiple library configurations with the same output name

2011-03-03 Thread Alexey Livshits
Hello CMakers,
suppose I've got a library foo with tow configurations: foo_1 and
foo_2. Both versions should have the same output name: foo. The
problem is, the output directory for both ist the same, so the second
will overwrite the first.
What's the best way to organize it?

-- 
BG,
Alexey
___
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] Out-of-source build and access to data

2011-01-26 Thread Alexey Livshits
You can install target and data and then run your program.

2011/1/26, Benjamin Kurz :
> Hello everyone,
>
> Currently I'm using cmake for building my c++/Qt project.
> The source directory structure looks like this:
> Project
> |_ src
> |_ include
> |_ data
>
>
> Currently I run cmake from the source directory, having an in-source-build.
> Now I want to be able to have a complete seperate build folder.
> It compiles fine and it runs ok, unless I need access to a file in the
> data folder.
> Currently I access files like this: filepath = "./data/file1"
> But data is of course not available in the build directory.
> So I copied the files during the cmake process, which also works fine.
>
> But when I run the program I get an exception because the file is not found.
> I tried a lot of possibilities:
> filepath = "../data/file1"
> filepath = "data/file1"
> filepath = "file1"
>
> but nothing seems to work.
>
> The executable is on the top directory in the build directory.
> The filepath is defined and used in a class in ./src directory.
>
> I am not sure how to fix this or which path to use?!
>
> Any advice is appreciated.
>
> Thanks
>
> Benjamin
> ___
> 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
>


-- 
BG,
Alexey
___
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] Customize dependencies scanned by CMake

2011-01-17 Thread Alexey Livshits
It looks that precompiled headers should help here.

2011/1/17 David Cole :
> See this command:
> http://cmake.org/cmake/help/cmake-2-8-docs.html#command:include_regular_expression
>
> If you can match many of the "header files that rarely, if ever, change"
> with a regular expression based on directory and file name patterns, then
> you can reduce the number of entries in the generated makefiles
> significantly.
>
>
> HTH,
> David
>
>
> On Sat, Jan 15, 2011 at 7:57 AM, Dieter Oberkofler
>  wrote:
>>
>> I'm using CMake 2.8.3 using makefiles for the OSX and Windows platform.
>>
>> I very much like CMake but unfortunately the build performance
>> consistently
>> causes some problems.
>>
>> And the main performance problem is the absolutely correct but painfully
>> slow dependency checking.
>> In a large (Qt/C++) project a single source file has over 1500 include
>> dependencies summing up to a "depend.make" file with several million
>> lines.
>> Almost all (typically 99%) of the include dependencies are not needed in
>> real life because they come from Qt or other static frameworks but
>> dramatically slow down the build process.
>>
>> I do know that CMake offers the /fast option but this removes all
>> dependencies and although it is 3-5 times faster, manually "optimizing"
>> the
>> content of "depend.make" makes the build up to 20 times faster.
>> Why is the /fast option not (at least) as fast as a manually "optimized"
>> "depend.make"?
>>
>> Is there a way to:
>> - customize what includes should be parsed?
>> - exclude dependency trees?
>> - limit the recursion level?
>>
>> or any other option to solve this problem?
>>
>> Thank you!
>>
>>
>> ___
>> 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
>



-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
> Thing is, you can't *rely* on DESTDIR *not* being used by the user of
> your project. If a user shoots himself in the foot, that's his fault,
> but when designing your test architecture you IMHO shouldn't make the
> use of DESTDIR impossible. I'm sure Debian/Ubuntu/the/whole/zoo would
> object to that...

That's right. I don't want to rely on DESTDIR. That's the problem, not
a solution. Otherwise I could use CMAKE_INSTALL_PREFIX and I would be
fine.
-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
> Why can't you just set CMAKE_INSTALL_PREFIX to some path that you know and
> then reference that from your tests that run the installed version?

I thought about it, but I'd like to keep it independent of some known
path. If you mean, there is no other way, I should give them a try.

> DESTDIR will never work on Windows with drive letters in the way:
> (for example, if DESTDIR=D:\, and your install rules install some component
> to an absolute path, say C:\Program Files\Whatever, then the resulting
> attempt would go to "D:\C:\Pro..." which is obviously non-sensical.)
> DESTDIR simply does not mix with Windows drive letters, so there always has
> to be another way to attack the problem when Windows is a consideration.
> Since Windows is always a consideration for the vast majority of CMake-based
> projects, DESTDIR is typically avoided as a general technique (except as
> guarded by appropriate if(NOT WIN32) usage...)
>
> Does that help?

This is sick :( I use DESTDIR to keep on disk multiple versions of the software.
Thank you for your help.

-- 
BG,
Alexey
___
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 assign version numbers from a source header to CMake variables?

2011-01-12 Thread Alexey Livshits
> Which software licence does belong to your approach?

I don't know :)

-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
> Well, if you don't want any help fixing the real problem, then the
> answer is simple: CMake can't possibly give you that information because
> of DESTDIR.

Thank you.

> So, go and fix your project.

I wish I could, but its not so simple. If you have an idea, just let me know.

-- 
BG,
Alexey
___
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 assign version numbers from a source header to CMake variables?

2011-01-12 Thread Alexey Livshits
Here is the code:

find_file(myproject_BUILD_NUMBER_FILE_FOUND myproject_build_number.txt
PATHS ${myproject_SOURCE_DIR})

if(${myproject_BUILD_NUMBER_FILE_FOUND} MATCHES "NOTFOUND")
set(myproject_CURRENT_BUILD_NUM 1)
else()
file(READ ${myproject_SOURCE_DIR}/myproject_build_number.txt 
OLD_BUILD_NUM)
if(BUILD_VERSION)
math(EXPR myproject_CURRENT_BUILD_NUM "${OLD_BUILD_NUM} + 1")
file(WRITE ${myproject_SOURCE_DIR}/myproject_build_number.txt
"${myproject_CURRENT_BUILD_NUM}")
else()  
set(myproject_CURRENT_BUILD_NUM ${OLD_BUILD_NUM})
endif() 
endif()

configure_file(${myproject_SOURCE_DIR}/version/myproject_version.h.in
${myproject_SOURCE_DIR}/version/myproject_version.h @ONLY)


-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
As I mentioned above, there are targets foo1 and foo2, build from foo
sources, and the output name has to be foo. This is the conflict. The
test depends from foo1 and bar2.

> If you don't explain the problem more clearly, people won't be able to
> help you; particularly because I suspect that you are asking the wrong
> question...

Well, my question was very clear imho, I just wanted to know, how to
determine the path. In fact I'm looking for a better approach how to
organize my project, but this is not the point here.

-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
> If the two "version" are needed you may build them in a single build.
>...
> but may be I'm missing something about your "2 versions"?
That's what I already do. The problem is, libv1 and libv2 should be
called libv.

> Alternatively, may be you can decide that your needed
> "temporary" install will always be in a fixed location relative to the
> build tree:
>
> ${CMAKE_BINARY_DIR}/tempinstall/
> then you always know where are installed the lib, executable etc...

Looks dirty, but this could be the solution :) Thank you.
-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
> Yes, make the tests run without installation. To give more advice, we'd
> need to know more about those "dependencies". Are they other
> executables? Data files? Libraries?

Well, if I could do that, I wouldn't ask ;)
I have 2 versions, which are built from the same sources. So I have to
have 2 different output directories. Some shared libraries are built
only for one version, but needed for both. CMake install process helps
perfectly here.
Some tests require shared libraries from both versions. So I created
the new install component for tests, but I cannot address them for
CTest.
-- 
BG,
Alexey
___
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 assign version numbers from a source header to CMake variables?

2011-01-12 Thread Alexey Livshits
2011/1/12 SF Markus Elfring :
> Hello,
>
> I would like the add the CMake approach for software generation to a
> project. My project example supports also other build tools.
> This has got consequences on the way how informations like version numbers
> are shared between these approaches.
>
> The CMake tutorial describes components for the desired solution (in the
> section "Adding a Version Number and Configured Header File").
> http://cmake.org/cmake/help/cmake_tutorial.html
>
> I imagine to add a specific header file that will contain the shared data in
> the format of the source programming language. This will be a few C/C++
> preprocessor definitions.
> Now I would like to know how to get these informations into CMake variables
> for further reuse. I would appreciate your advices.
>
> Regards,
> Markus

Hello Markus,
I use a simple text file with the build number, which is tracked under
VCS. During the build I parse it, generate my version header, increase
the number, save it to the file and check it in. Maybe this could be
helpful for you.
-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
> What do you want to do?

I have some tests, which cannot be run without installation because of
dependencies. So I need to specify the install path to add_test. Is
there a better approach?

-- 
BG,
Alexey
___
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] Path to installed target

2011-01-12 Thread Alexey Livshits
Hello,
how can I determine the path to installed target? The problem is, if I
set DESTDIR for example "D:\", I the install path becomes
"D:\Programme\", so I cannot use DESTDIR to determine
the path.

-- 
BG,
Alexey
___
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