Re: [CMake] Function for visibility definitions

2010-02-10 Thread Hilton Medeiros
Wow, now you got me. That is why I love discussions. Thanks for your insight, now I (my hard-as-rock head) can understand why this is not feasible. As a side note I think this should be in a list, maybe in the wiki, to advise others no to do this. A list of 'do not even think about this'. I'm sor

Re: [CMake] Function for visibility definitions

2010-02-10 Thread Mike Jackson
And what happens when a project wants to use my library? That project must now use Cmake and your macro. What if a project downstream can not use Cmake to define those macros? What then? Mike Jackson On Feb 11, 2010, at 2:04, Hilton Medeiros wrote: Hello Christian, thanks for the inte

Re: [CMake] Function for visibility definitions

2010-02-10 Thread Hilton Medeiros
Hello Christian, thanks for the interest, let me explain: ## In your CMake file you could to do this: ... include (VisibilityDefinitions) add_visibility_definitions(PREFIX PROJECT) ... ## // In your project source, this: ... class PROJECT_EXPORTS ExampleClass {...}; ... // It is really simple,

Re: [CMake] Function for visibility definitions

2010-02-10 Thread Christian Ehrlicher
Hilton Medeiros schrieb: > Thanks for pointing that mistake, I fixed it. > > About g++: g++ is gcc with -lstdc++ > > What is wrong with a simple CMake file? > I know what is good about it, if CMake had it built in > neither me nor any CMake user would need to write neither a simple > header file

Re: [CMake] Function for visibility definitions

2010-02-10 Thread Hilton Medeiros
Thanks for pointing that mistake, I fixed it. About g++: g++ is gcc with -lstdc++ What is wrong with a simple CMake file? I know what is good about it, if CMake had it built in neither me nor any CMake user would need to write neither a simple header file nor a simple CMake file. Kind regards, H

Re: [CMake] How to avoid continuous download while using ExternalProjects

2010-02-10 Thread Philip Lowman
On Wed, Feb 10, 2010 at 11:37 AM, David Cole wrote: > If anybody has other ideas to share downloads between "Release" and "Debug" > configurations, or other ways to avoid "unnecessary" downloads better, or > other ideas for any ExternalProject improvement, I'm all ears. :-) Caching for source tar

Re: [CMake] How to find the DLL's a a required package searched with FIND_PACKAGE()?

2010-02-10 Thread Ryan Pavlik
You can use configure_file to create the .vcproj.user files that contain the debug-time environment variables (including path) - but that doesn't solve the build-time issue. You might copy the dll to the build directory in a PRE_BUILD custom command. Ryan On Wed, Feb 10, 2010 at 6:20 PM, David Co

Re: [CMake] How to find the DLL's a a required package searched with FIND_PACKAGE()?

2010-02-10 Thread David Cole
On Wed, Feb 10, 2010 at 7:16 PM, Alan W. Irwin wrote: > On 2010-02-10 23:41+0100 Gabriel Petrovay wrote: > > Hi, >> >> We are using CMake 2.6. For Windows we need the DLL's of the required >> libraries for two reasons given below. >> >> Take for example LibXml.dll which is required by our project

Re: [CMake] How to find the DLL's a a required package searched with FIND_PACKAGE()?

2010-02-10 Thread Alan W. Irwin
On 2010-02-10 23:41+0100 Gabriel Petrovay wrote: Hi, We are using CMake 2.6. For Windows we need the DLL's of the required libraries for two reasons given below. Take for example LibXml.dll which is required by our project in order to run on Windows. One can build and link our project successf

Re: [CMake] How to find the DLL's a a required package searched with FIND_PACKAGE()?

2010-02-10 Thread Ryan Pavlik
Well, it would be good to improve all the applicable find modules to provide LIBXML2_RUNTIME_LIBRARY and LIBXML2_RUNTIME_LIBRARY_DIRS, as mentioned in the readme.txt in the modules folder. This is what I am doing with my own modules - you might consider copying the FindLibXML2.cmake file to your p

[CMake] How to find the DLL's a a required package searched with FIND_PACKAGE()?

2010-02-10 Thread Gabriel Petrovay
Hi, We are using CMake 2.6. For Windows we need the DLL's of the required libraries for two reasons given below. Take for example LibXml.dll which is required by our project in order to run on Windows. One can build and link our project successfully because the FindLibXml2.cmake provides: # LIBX

Re: [CMake] Function for visibility definitions

2010-02-10 Thread Hendrik Sattler
Am Mittwoch 10 Februar 2010 19:46:57 schrieb Hilton Medeiros: > macro (check_gcc_visibility) > include (CheckCXXCompilerFlag) > check_cxx_compiler_flag(-fvisibility=hidden GCC_SUPPORTS_VISIBILITY) > endmacro() This macro does not check if gcc supports visibility but g++ instead. > functio

Re: [CMake] adding extra target to CMakeLists.txt

2010-02-10 Thread Tyler Roscoe
On Wed, Feb 10, 2010 at 09:08:50PM +0100, Olaf Peter wrote: > How can I add an extra lint/syntax check target for my executable, like: > > check-syntax: > c++ -o /dev/null ${CXX_FLAGS} ${CXX_DEFINES} -S ${MY_PROJECT_SOURCES} > .PHONY: check-syntax You'll want to look at add_custom_command()

[CMake] adding extra target to CMakeLists.txt

2010-02-10 Thread Olaf Peter
How can I add an extra lint/syntax check target for my executable, like: check-syntax: c++ -o /dev/null ${CXX_FLAGS} ${CXX_DEFINES} -S ${MY_PROJECT_SOURCES} .PHONY: check-syntax to make created Makefile?? thanks, Olaf ___ Powered by www.kitwar

[CMake] Function for visibility definitions

2010-02-10 Thread Hilton Medeiros
Hello, I made a simple cmake module that defines a function to create the visibility definitions discussed in an earlier post about DEFINE_SYMBOL that some users (including me) get confused over. In case someone come here looking for it, I pushed it here: http://gitorious.org/ferric-cmake-stuff/m

Re: [CMake] [CMAKE] PROJECT command and CMAKE_SYSTEM_NAME

2010-02-10 Thread Bill Hoffman
Martin Guillon wrote: Wow I didn't know about CMAke inserting the project thingy!!! Ok now let me explain a little more. We want to simplify our Cmakelists and make macros to help our users. Now thanks to you we figured out the source of the problem. This is the CMakeLists we want SET (CMAKE_

Re: [CMake] [CMAKE] PROJECT command and CMAKE_SYSTEM_NAME

2010-02-10 Thread Martin Guillon
Wow I didn't know about CMAke inserting the project thingy!!! Ok now let me explain a little more. We want to simplify our Cmakelists and make macros to help our users. Now thanks to you we figured out the source of the problem. This is the CMakeLists we want SET (CMAKE_USER_MAKE_RULES_OVERRIDE

Re: [CMake] How to avoid continuous download while using ExternalProjects

2010-02-10 Thread Luigi Calori
David Cole wrote: If you want to trigger a "rebuild" of any given step (and later steps) for an ExternalProject, simply open up the project folder in Visual Studio, so you can see the list of steps. Right click on the step you want to re-do and tell Visual Studio to "compile" the step. With c

Re: [CMake] How to avoid continuous download while using ExternalProjects

2010-02-10 Thread David Cole
If you want to trigger a "rebuild" of any given step (and later steps) for an ExternalProject, simply open up the project folder in Visual Studio, so you can see the list of steps. Right click on the step you want to re-do and tell Visual Studio to "compile" the step. With custom build steps, "com

Re: [CMake] [CMAKE] PROJECT command and CMAKE_SYSTEM_NAME

2010-02-10 Thread Bill Hoffman
Tyler Roscoe wrote: On Wed, Feb 10, 2010 at 04:54:47PM +0100, Martin Guillon wrote: Let s say we have a very simple CMakeLists.txt Like that cmake_minimum_required(VERSION 2.6) MESSAGE (STATUS "The system is \"${CMAKE_SYSTEM_NAME}\"") Now as is the CMakelists works fine. The problem appears w

Re: [CMake] [CMAKE] PROJECT command and CMAKE_SYSTEM_NAME

2010-02-10 Thread Tyler Roscoe
On Wed, Feb 10, 2010 at 04:54:47PM +0100, Martin Guillon wrote: > Let s say we have a very simple CMakeLists.txt Like that > > cmake_minimum_required(VERSION 2.6) > MESSAGE (STATUS "The system is \"${CMAKE_SYSTEM_NAME}\"") > > Now as is the CMakelists works fine. > > The problem appears when we

[CMake] [CMAKE] PROJECT command and CMAKE_SYSTEM_NAME

2010-02-10 Thread Martin Guillon
Hi, We just found out something really weird about the command PROJECT. Let s say we have a very simple CMakeLists.txt Like that cmake_minimum_required(VERSION 2.6) MESSAGE (STATUS "The system is \"${CMAKE_SYSTEM_NAME}\"") Now as is the CMakelists works fine. The problem appears when we add a

Re: [CMake] How to findXXX libraries with debug suffix

2010-02-10 Thread Will Dicharry
Responses in line... Philip Lowman wrote: On Tue, Feb 9, 2010 at 11:15 AM, Will Dicharry wrote: Mike Jackson wrote: Here is one I wrote for Expat: --8< # - Find expat # Find the native EXPAT headers and libraries. # # EXPAT_INCLUDE_DIRS -

Re: [CMake] How to avoid continuous download while using ExternalProjects

2010-02-10 Thread Michael Wild
On 10. Feb, 2010, at 15:37 , Luigi Calori wrote: > > Hi Michael: > > They are more or less something like: > > > ExternalProject_Add( > ${PACKAGE} > SOURCE_DIR ${BASE_SOURCE}/${PACKAGE}/src > BINARY_DIR ${BASE_BUILD}/${PACKAGE}/build > INSTALL_DIR ${CMAKE_INSTALL_PREFIX} I don't thin

Re: [CMake] How to avoid continuous download while using ExternalProjects

2010-02-10 Thread Luigi Calori
Hi Michael: They are more or less something like: ExternalProject_Add( ${PACKAGE} SOURCE_DIR ${BASE_SOURCE}/${PACKAGE}/src BINARY_DIR ${BASE_BUILD}/${PACKAGE}/build INSTALL_DIR ${CMAKE_INSTALL_PREFIX} URL http://www.zlib.net/zlib-1.2.3.tar.gz PATCH_COMMAND ${CMAKE_COMMAND} -E

Re: [CMake] How to avoid continuous download while using ExternalProjects

2010-02-10 Thread Michael Wild
On 10. Feb, 2010, at 14:57 , Luigi Calori wrote: > I' m trying to develop a project for building several lib dependencies using > ExternalProjectAdd > > Is there a way to avoid re-download of upstream tar.gz while developing > config flags? > > ANY examples of ExternalProjectAdd would REALLY

[CMake] How to avoid continuous download while using ExternalProjects

2010-02-10 Thread Luigi Calori
I' m trying to develop a project for building several lib dependencies using ExternalProjectAdd Is there a way to avoid re-download of upstream tar.gz while developing config flags? ANY examples of ExternalProjectAdd would REALLY welcome Thanks in advance. Luigi __