[cmake-developers] CMake 2.8.11-rc3 ready for testing!

2013-04-19 Thread Robert Maynard
The CMake 2.8.11 release candidate continues. This is the last RC
unless a critical, must-fix issue is found. You can find the source
and binaries here:
http://www.cmake.org/files/v2.8/?C=M;O=D

Some of the notable changes in this release are:
- Introduced Target Usage Requirements
  - Targets can specify usage requirements for their consumers such as
include directories
and preprocessor definitions; previously only link dependencies
were supported
  - target_link_libraries(myexe yourlib) can now build myexe sources
with requirements specified
by yourlib
  - Added target_include_directories and target_compile_definitions
commands with
PUBLIC/PRIVATE/INTERFACE options
  - See design and development discussion at
http://community.kde.org/Frameworks/Epics/CMake_target_usage_requirements

- Introduced a Generator Toolset selection for VS = 10 and Xcode = 3
  - Tell the IDEs which compiler toolchain to use
  - ex. Use VS 9 tools under VS 10: -G “Visual Studio 10” -T “v90”
- Introduced ExternalData Module
- Keep source trees lightweight by storing data separately
- Reference data unambiguously from source tree by content hash
- Fetch on-demand during build from local or remote resources
- CMake: Sublime Text Generator added that supports both Make and Ninja
- CMake: Added support for Texas Instruments C6 and up compilers
- CMake: Improve OpenBSD support
- CMake: Support for Windows CE with VS 8 and 9 generators
- CPack: Added Support for 64bit NSIS
- CPack: Added WiX Package Generator
- ExternalProject: Will run git fetch less often
- FindBoost: Major overhaul of searching and result caching
- FindCUDA: Now has support for separable compilation
- FindQt4: Overall improvements to finding Qt and importing targets
- FindSquish: Added support for squish 4
- GetPrerequisites: Port to MinGW with objdump

The bug tracker change log page for this version is at:
http://public.kitware.com/Bug/changelog_page.php?version_id=103

Following is the complete list of changes in this rc since the
previous rc. Please try this
version of CMake on your projects and report any issues to the list or
the bug tracker. This
release candidate will become the final release for 2.8.11 unless a
serious issue is reported.

Changes in CMake 2.8.11-rc3 (since 2.8.11-rc2)
--
Brad King (1):
  get_filename_component: Document path components more clearly (#14091)

Rolf Eike Beer (1):
  try_compile: add missing fclose() to recently added error case

Stephen Kelly (1):
  Fix clearing of the INCLUDE_DIRECTORIES DIRECTORY property.
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] Copy dlls to release and debug folder

2013-04-19 Thread Lloyd
Thankyou Thomas, it works now... Another issue I was faced with the first
script is, it assumes that the dlls are in the lib folder of Qt (I think
you build qt from source). I have downloaded the prebuilt Qt library, in
that the dlls are in the bin folder. I modified the macro you have given,
as below...

MACRO(GetDLLs DEBUG_NAME RELEASE_NAME)

#Copy Debug dlls
LIST(APPEND ${DEBUG_NAME} ${QT_BINARY_DIR}/QtGuid4.dll)
...


On Thu, Apr 18, 2013 at 6:51 PM, Thomas Richard
thomas.rich...@imgtec.comwrote:

 Normally when you find the Qt4 package it selects some defaults libraries
 (and the QT_USE_FILE). But you have to specify some extra modules you may
 need before including the QT_USE_FILE. The QT_USE_FILE defines the
 dependencies and includes the folders you need.

 For example I have:

 find_package(Qt4 REQUIRED)

 # loads of crap about my libraries

 set (QT_USE_QTGUI TRUE)
 include(${QT_USE_FILE})

 set (SOURCES #with my sources)
 set (HEADERS # with my headers)
 set(HEADERS_MOC) # to define an empty variable
 QT4_WRAP_CPP(HEADERS_MOC ${HEADERS})

 add_executable(ParamGui ${SOURCES} ${HEADERS_MOC} ${HEADERS})
 set_source_files_properties(${HEADERS_MOC} PROPERTIES GENERATED TRUE)
 target_link_libraries(ParamGui ${QT_LIBRARIES})

 From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf
 Of Lloyd
 Sent: 18 April 2013 12:40
 To: Thomas Richard
 Cc: CMake ML
 Subject: Re: [CMake] Copy dlls to release and debug folder

 I assume that this is the recommended approach.

 I tried to use the script you have provided, the call GetQtDLLs(DEBUG_DLLS
 RELEASE_DLLS) is not populating any of the variables (DEBUG_DLLS or
 RELEASE_DLLS) with qt dll names. I am new to cmake, Am I missing something?


 Thanks,
   Lloyd

 On Thu, Apr 18, 2013 at 4:21 PM, Thomas Richard thomas.rich...@imgtec.com
 wrote:
 Hi Lloyd,

 Personally I copy the DLLs to the VS folder (so that the program can be
 run from visual studio) using the following script.
 It looks more complicated than it is.

 A macro is available to several of my projects to select which Qt module
 they use and create a list of dlls to copy.
 Then I simply choose where to copy the DLLs according to the generator.
 I also add them to the list of files to install.
 Finally the last line is to remove the command prompt opening.



 MACRO(GetQtDLLs DEBUG_NAME RELEASE_NAME)

 FOREACH(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF
 QTNSPLUGIN
QAXSERVER QAXCONTAINER QTDECLARATIVE QTSCRIPT QTSVG
 QTUITOOLS QTHELP
QTWEBKIT PHONON QTSCRIPTTOOLS QTMULTIMEDIA QTGUI QTTEST
 QTDBUS QTXML QTSQL
QTXMLPATTERNS QTNETWORK QTCORE)

 if (QT_USE_${module} OR QT_USE_${module}_DEPENDS)

 string(REPLACE .lib .dll QT_${module}_DLL
 ${QT_${module}_LIBRARY_DEBUG})
 set (${DEBUG_NAME} ${${DEBUG_NAME}} ${QT_${module}_DLL})

 string(REPLACE .lib .dll QT_${module}_DLL
 ${QT_${module}_LIBRARY_RELEASE})
 set (${RELEASE_NAME} ${${RELEASE_NAME}}
 ${QT_${module}_DLL})

 endif()

 ENDFOREACH(module)

 ENDMACRO()

 if (WIN32)
 GetQtDLLs(DEBUG_DLLS RELEASE_DLLS)

 if (${CMAKE_GENERATOR} MATCHES Visual Studio 11)
 # visual studio 12 expects the DLLs in the executable
 folder.
 # but not the resources!
 # can be changed into the environment property of the
 project to include the project's directory
 set (DLL_TO_DBG ${CMAKE_CURRENT_BINARY_DIR}/Debug)
 set (DLL_TO_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/Release)
 else()
 # for other version of visual studio the DLLs are expected
 into the project folder
 set (DLL_TO_DBG ${CMAKE_CURRENT_BINARY_DIR})
 set (DLL_TO_RELEASE ${CMAKE_CURRENT_BINARY_DIR})
 endif()

 foreach(dll ${DEBUG_DLLS})
 file(COPY ${dll} DESTINATION ${DLL_TO_DBG})
 endforeach()

 foreach(dll ${RELEASE_DLLS})
 file(COPY ${dll} DESTINATION ${DLL_TO_RELEASE})
 endforeach()

 install(FILES ${RELEASE_DLLS} DESTINATION
 ${INSTALL_FELIXPARAMGUI_PATH} CONFIGURATIONS Release)

 #
 # this is disabled for debug only (so signal/slots connect
 failures are seen)!
 #
 # this property is used to remove the prompt window when running
 the GUI from the explorer on WIN32
 # doesn't have effect on linux
 #
 set_target_properties(FelixParamGui PROPERTIES WIN32_EXECUTABLE
 ${FELIXPARAMGUI_WIN32EXE})
 endif()

 From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf
 Of Lloyd
 Sent: 18 April 2013 11:33
 To: CMake ML
 Subject: [CMake] Copy dlls to release and debug folder

 Hi,

 I was successful in creating and building a project using CMake on Windows
 (Visual Studio). After the build when I try to run the application it
 throws an error asking for the dlls of Qt (I know 

[CMake] Get path to release folder

2013-04-19 Thread Lloyd
Hi,

My project hierarchy is as shown below

Code  ;Root cmake file
Code/Src;Main Source code and the cmake file
Code/lib/reverse   ; Library source code and the cmake file

When I compile the project I get the outputs in these folder structure

BuildDir\src\Debug;Main executable
BuildDir\src\lib\reverse\Debug ; reverse.dll library directory

What is the right method to get the path to the library (reverse.dll)
directory? or can you please suggest a method to get this path in a
portable (crossplatform) way?

Thanks,
  Lloyd
--

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] Why does Project(name NONE) requires CMAKE_MAKE_PROGRAM?

2013-04-19 Thread Gregoire Aujay
Hello,

It seems that the Projetct(name NONE) macro requires the CMAKE_MAKE_PROGRAM to 
be defined.

This CMakelists will trigger a CMAKE_MAKE_PROGRAM not found, when trying to 
cross-compile with code sourcery toolchain which is using a non-trivial make 
program name:

cmake_minimum_required(VERSION 2.8)

Project(Foo NONE)

# Init my stuff
set(CMAKE_MAKE_PROGRAM cs-make.exe CACHE STRING make program FORCE)
enable_language( C )

# declare targets
add_library(foo STATIC bar.c)


Thanks,
Gregoire

I am using cmake 2.8.10 on win7 64

--

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] cpack changed binary file permission in 2.8.10

2013-04-19 Thread hce
Hi,

I have another wired situation when I run cpack -G RPM, the cpack changed
a binary file permission:

Original file in the build directory:

$ ls -l Robotic/Robotic-prefix/src/robotic/bin/CreateSystemObject

-rwxr-xr-x. 1 root root 15307640 Apr 19 12:01
Robotic/Robotic-prefix/src/robotic/bin/CreateSystemObject

After running cpack -G RPM:

$ ls -l
_CPack_Packages/el6.x86_64/RPM/robotic/usr/local/bin/CreateSystemObject

-rwxr--r--. 1 root root 15307640 Apr 19 16:22
_CPack_Packages/el6.x86_64/RPM/robotic/usr/local/bin/CreateSystemObject

The cpack changed binary file CreateSystemObject permission from
-rwxr-xr-x to -rwxr--r--, not sure why, but is there any way to force cpack
don't change the permission?

Thank you.

Kind regards,

j





--
View this message in context: 
http://cmake.3232098.n2.nabble.com/cpack-changed-binary-file-permission-in-2-8-10-tp7584105.html
Sent from the CMake mailing list archive at Nabble.com.
--

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] Using CMake GUI without any compiler

2013-04-19 Thread Jitesh . Butala
Hello,

As suggested by the forums I have tried searching the archives, but I have
not got an answer to my question. Hence, if this is a duplicate question, 
I
apologize in advance.

We have a team across multiple countries which use different versions of
Visual Studio and Eclipse. Hence, for us, CMake would be an ideal tool
through which we can work on projects concurrently. Currently, we are
manually creating the projects and then adding the code files which makes
the process tedious and risky (especially if one of us forgets to add a
setting etc.). But in order to check if the CMakeLists.txt has been 
created
properly, I would like to generate the projects for all the different
flavors of C / C++ compilers that we would like to support. Unfortunately, 
I
do not have all the flavors installed on my machine. Is it possible for me
to generate the projects without the CMake GUI complaining that I do not
have the compiler installed? An example of the error that I see is -

CMake Error: CMake was unable to find a build program corresponding to
Visual Studio 10.  CMAKE_MAKE_PROGRAM is not set.  You probably need to
select a different build tool.

Thanks,
Jitesh Butala
Sr. Design Engineer
ifm engineering Pvt. Ltd.
www.ifm.com--

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] Error in running tests

2013-04-19 Thread Lloyd
Thanks again. Setting the WORKING_DIRECTORY worked for me...


On Mon, Apr 15, 2013 at 5:17 PM, Petr Kmoch petr.km...@gmail.com wrote:

 It's good the second signature works; I believe there's hardly ever use
 for using the first one, anyway.

 As for the DLLs, would it help if you set the WORKING_DIRECTORY parameter
 in add_test(), and/or set the PATH env. variable using the test's property
 ENVIRONMENT?

 On Unix systems, the path issues should be handled by RPATH/RUNPATH.

 Petr


 On Mon, Apr 15, 2013 at 10:58 AM, Lloyd lloydkl.t...@gmail.com wrote:




 On Mon, Apr 15, 2013 at 12:10 PM, Petr Kmoch petr.km...@gmail.comwrote:

 The errors VS spews out aren't really useful. However, if you go to
 ${CMAKE_BINARY_DIR}/Testing/Temporary, there are log files. LastTest.log
 should tell you a bit more.

 Can you also try/report on my second question? (2. Does it work if you
 use the enhanced signature of add_test? I mean 'add_test(NAME Test COMMAND
 test_rev)')


 Sorry, I missed the important point you suggested try. Yes, When I tried
 the 'add_test(NAME Test COMMAND test_rev)') format, it works.

 To make it work I had to manually copy the boost test library (dll) as
 well as the my libraries dll to the root of build folder. What is the
 approach used by professional developers? I tried looking at the cmake
 file of VTK, but it contains only MAKE_DIRECTORY and ADD_SUBDIRECTORY
 commands!

 Thanks
   Lloyd





  Petr


 On Mon, Apr 15, 2013 at 6:43 AM, Lloyd lloydkl.t...@gmail.com wrote:


 On Fri, Apr 12, 2013 at 5:00 PM, Lloyd lloydkl.t...@gmail.com wrote:

 of course... This is the source of my test cmake file

 #Cmake file of Tests
 cmake_minimum_required (VERSION 2.6)

 SET(TST_SRC test_rev.cpp test_runner.cpp)

 FIND_PACKAGE(Boost REQUIRED COMPONENTS unit_test_framework)

 INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}../../src/lib/reverse)
 ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK)
 ADD_EXECUTABLE(test_rev ${TST_SRC})
 TARGET_LINK_LIBRARIES(test_rev ${Boost_LIBRARIES})
 TARGET_LINK_LIBRARIES(test_rev Reverse)



 As a temporary solution to this I have copied the test executable and
 its dependent dlls to the root folder of the build directory. When I run
 RUN_TETS project in Visual Studio, it throws me some other error like


 -- Build started: Project: RUN_TESTS, Configuration: Debug Win32
 --
   Test project E:/CMakeDemo/BuildDir
   Start 1: Test
   1/1 Test #1: Test .***Failed0.16 sec

   0% tests passed, 1 tests failed out of 1

   Total Test time (real) =   2.42 sec

   The following tests FAILED:
 1 - Test (Failed)
   Errors while running CTest
 C:\Program
 Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
 MSB3073: The command setlocal
 C:\Program
 Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
 MSB3073: C:\Program Files\CMake 2.8\bin\ctest.exe
 --force-new-ctest-process -C Debug
 C:\Program
 Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
 MSB3073: if %errorlevel% neq 0 goto :cmEnd
 C:\Program
 Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
 MSB3073: :cmEnd
 C:\Program
 Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
 MSB3073: endlocal  call :cmErrorLevel %errorlevel%  goto :cmDone
 C:\Program
 Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
 MSB3073: :cmErrorLevel
 C:\Program
 Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
 MSB3073: exit /b %1
 C:\Program
 Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
 MSB3073: :cmDone
 C:\Program
 Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
 MSB3073: if %errorlevel% neq 0 goto :VCEnd
 C:\Program
 Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error
 MSB3073: :VCEnd exited with code 8.
  Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
 ==

 I cannot interpret these errors, can you please give some hint?

 Thanks,
   Lloyd






 On Fri, Apr 12, 2013 at 4:55 PM, Petr Kmoch petr.km...@gmail.comwrote:

 1. Can you post tests/CMakeLists.txt (or at least the parts relevant
 to creating test_rev)?

 2. Does it work if you use the enhanced signature of add_test? I mean
 'add_test(NAME Test COMMAND test_rev)'

 Petr


 On Fri, Apr 12, 2013 at 1:18 PM, Lloyd lloydkl.t...@gmail.comwrote:

 Yes I built the test and it is in

 E:\CMakeDemo\BuildDir\tests\Debug\test_rev.exe

 I don't know the right way to locate this test executable for cmake

 Thanks,
   Lloyd



 On Fri, Apr 12, 2013 at 4:42 PM, Petr Kmoch petr.km...@gmail.comwrote:

 Hi Lloyd.

 Do you actually have a target (executable) named test_rev? And
 have you built it before running RUN_TESTS? RUN_TEST (or its Makefile
 equivalent 'make test') doesn't automatically build the test 
 executables
 before running them.

 Petr


 On 

[CMake] CMake 2.8.11-rc3 ready for testing!

2013-04-19 Thread Robert Maynard
The CMake 2.8.11 release candidate continues. This is the last RC
unless a critical, must-fix issue is found. You can find the source
and binaries here:
http://www.cmake.org/files/v2.8/?C=M;O=D

Some of the notable changes in this release are:
- Introduced Target Usage Requirements
  - Targets can specify usage requirements for their consumers such as
include directories
and preprocessor definitions; previously only link dependencies
were supported
  - target_link_libraries(myexe yourlib) can now build myexe sources
with requirements specified
by yourlib
  - Added target_include_directories and target_compile_definitions
commands with
PUBLIC/PRIVATE/INTERFACE options
  - See design and development discussion at
http://community.kde.org/Frameworks/Epics/CMake_target_usage_requirements

- Introduced a Generator Toolset selection for VS = 10 and Xcode = 3
  - Tell the IDEs which compiler toolchain to use
  - ex. Use VS 9 tools under VS 10: -G “Visual Studio 10” -T “v90”
- Introduced ExternalData Module
- Keep source trees lightweight by storing data separately
- Reference data unambiguously from source tree by content hash
- Fetch on-demand during build from local or remote resources
- CMake: Sublime Text Generator added that supports both Make and Ninja
- CMake: Added support for Texas Instruments C6 and up compilers
- CMake: Improve OpenBSD support
- CMake: Support for Windows CE with VS 8 and 9 generators
- CPack: Added Support for 64bit NSIS
- CPack: Added WiX Package Generator
- ExternalProject: Will run git fetch less often
- FindBoost: Major overhaul of searching and result caching
- FindCUDA: Now has support for separable compilation
- FindQt4: Overall improvements to finding Qt and importing targets
- FindSquish: Added support for squish 4
- GetPrerequisites: Port to MinGW with objdump

The bug tracker change log page for this version is at:
http://public.kitware.com/Bug/changelog_page.php?version_id=103

Following is the complete list of changes in this rc since the
previous rc. Please try this
version of CMake on your projects and report any issues to the list or
the bug tracker. This
release candidate will become the final release for 2.8.11 unless a
serious issue is reported.

Changes in CMake 2.8.11-rc3 (since 2.8.11-rc2)
--
Brad King (1):
  get_filename_component: Document path components more clearly (#14091)

Rolf Eike Beer (1):
  try_compile: add missing fclose() to recently added error case

Stephen Kelly (1):
  Fix clearing of the INCLUDE_DIRECTORIES DIRECTORY property.
--

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 changed binary file permission in 2.8.10

2013-04-19 Thread Eric Noulard
2013/4/19 hce jupiter@gmail.com:
 Hi,

 I have another wired situation when I run cpack -G RPM, the cpack changed
 a binary file permission:

 Original file in the build directory:

 $ ls -l Robotic/Robotic-prefix/src/robotic/bin/CreateSystemObject

 -rwxr-xr-x. 1 root root 15307640 Apr 19 12:01
 Robotic/Robotic-prefix/src/robotic/bin/CreateSystemObject

 After running cpack -G RPM:

 $ ls -l
 _CPack_Packages/el6.x86_64/RPM/robotic/usr/local/bin/CreateSystemObject

 -rwxr--r--. 1 root root 15307640 Apr 19 16:22
 _CPack_Packages/el6.x86_64/RPM/robotic/usr/local/bin/CreateSystemObject

 The cpack changed binary file CreateSystemObject permission from
 -rwxr-xr-x to -rwxr--r--, not sure why, but is there any way to force cpack
 don't change the permission?

Did you specify PERMISSION in your install(...) statement for this target?
If not please do so, cpack shall respect what make  install does which
may be different from the permission you get in the build tree which
only comes from the umask of the user doing the build.

If the problem persist please file a bug report.
You may probably able to fix the right using
CPACK_RPM_USER_FILELIST which can override generated spec file list
for one (or several) file.

By the way you seem to be compiling+building+package being root,
is it really the case?
I would really suggest NOT to do that,
building whould really be done a normal user.

Packaging may require fakeroot,
Real install (rpm or make install at system-wide location) needs root privilege.
Otherwise being root for doing normal user stuff is looking for trouble.


 Thank you.

 Kind regards,




--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.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] Using CMake GUI without any compiler

2013-04-19 Thread Bill Hoffman

On 4/19/2013 7:20 AM, jitesh.but...@ifm.com wrote:

I would like to generate the projects for all the different
flavors of C / C++ compilers that we would like to support.
Unfortunately, I
do not have all the flavors installed on my machine. Is it possible for me
to generate the projects without the CMake GUI complaining that I do not
have the compiler installed? An example of the error that I see is -

CMake Error: CMake was unable to find a build program corresponding to
Visual Studio 10.  CMAKE_MAKE_PROGRAM is not set.  You probably need to
select a different build tool.
No that is not possible with CMake.  The end users must run CMake on 
each system where you want to do a build.  CMake must be installed as 
well as the compiler tool chain being used.


http://www.cmake.org/Wiki/CMake_FAQ#Why_does_CMake_use_full_paths.2C_or_can_I_copy_my_build_tree.3F

-Bill




--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoff...@kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
--

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] is it possible to download CMake modules at configure time?

2013-04-19 Thread radovan bast

dear Jean-Christophe,

indeed the approach you demostrated works for me!
this is exactly what i needed.
thank you again!

(i am sorry for coming back to you so late;
was too busy with other things)

best regards,
  radovan


On Sat, 13 Apr 2013 12:24:02 +0200, Jean-Christophe Fillion-Robin  
jchris.filli...@kitware.com wrote:



Hi Radovan,
Did you manage to make use and/or generalize the code I pointed you?
Thanks
Jc

--
Sent from my mobile device
On Apr 6, 2013 10:29 AM, radovan bast rado...@bast.fr wrote:


dear Jean-Christophe,
wonderful! thank you very much.
i will test it out.
best regards,
  radovan


On Fri, 05 Apr 2013 18:13:52 +0200, Jean-Christophe Fillion-Robin 
jchris.filli...@kitware.com wrote:

 Hi Radovan,


This is possible. You could look at the approach we consider in CTK.
See
https://github.com/commontk/**CTK/compare/**
00694c9f8a0da6ee28fb079902e6a8**c3ec428058...**
891aa5443b110cc7e6aa0ec1339aad**4b2c83ef9dhttps://github.com/commontk/CTK/compare/00694c9f8a0da6ee28fb079902e6a8c3ec428058...891aa5443b110cc7e6aa0ec1339aad4b2c83ef9d

Hth
Jc


On Fri, Apr 5, 2013 at 12:03 PM, radovan bast 
radovan.b...@irsamc.ups-tlse.**fr radovan.b...@irsamc.ups-tlse.fr
wrote:

 dear CMake developers and users,


first of all, a big thanks for the CMake developers
for a great product! we like CMake a lot.

we are extensively using CMake external project support
in combination with Git submodules in a number of larger
projects and that works nicely.

my question is: could i do something similar with CMake
modules? is it possible to start with a minimal core
CMakeLists.txt which would fetch other CMake modules from an
external public (Git) repository
and use them to configure the project?

the motivation for this is that we have several projects
with rather complex CMake infrastructures. the projects
are independent, live on different repositories, but the
CMake infrastructures are to a large extent overlapping.
currently we synchronize the CMake code between these projects
manually but this is not great and there is the risk that
the codes will diverge, that wheels will be reinvented,
and that improvements are not communicated between the projects.
this could be avoided if the CMake code was not explicitly
present but fetched from a repository which would also
enforce (or encourage) communicating all improvements
to the same place. everything that is generic and not project
specific would go into that external repo, only project specific
things would be kept in the minimal core CMakeLists.txt.

i will appreciate any pointers and suggestions
on how i could implement such a scheme.

thanks and best regards,
  radovan
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/**
opensource/opensource.htmlhtt**p://www.kitware.com/**
opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html


Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQhttp://www.cmake.org/Wiki/**CMake_FAQ
http://www.cmake.**org/Wiki/CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ


Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmakehttp://www.cmake.org/mailman/**listinfo/cmake
http://www.**cmake.org/mailman/listinfo/**cmakehttp://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] is it possible to download CMake modules at configure time?

2013-04-19 Thread Jean-Christophe Fillion-Robin
Hi Radovan,

That is good news :) Do you think you could share the CMake code you ended
up created. May be could generalize the solution to create a re-usable
module.

Thanks
Jc


On Fri, Apr 19, 2013 at 12:23 PM, radovan bast 
radovan.b...@irsamc.ups-tlse.fr wrote:

 dear Jean-Christophe,

 indeed the approach you demostrated works for me!
 this is exactly what i needed.
 thank you again!

 (i am sorry for coming back to you so late;
 was too busy with other things)

 best regards,
   radovan



 On Sat, 13 Apr 2013 12:24:02 +0200, Jean-Christophe Fillion-Robin 
 jchris.filli...@kitware.com wrote:

  Hi Radovan,
 Did you manage to make use and/or generalize the code I pointed you?
 Thanks
 Jc

 --
 Sent from my mobile device
 On Apr 6, 2013 10:29 AM, radovan bast rado...@bast.fr wrote:

  dear Jean-Christophe,
 wonderful! thank you very much.
 i will test it out.
 best regards,
   radovan


 On Fri, 05 Apr 2013 18:13:52 +0200, Jean-Christophe Fillion-Robin 
 jchris.filli...@kitware.com wrote:

  Hi Radovan,


 This is possible. You could look at the approach we consider in CTK.
 See
 https://github.com/commontk/CTK/compare/**https://github.com/commontk/**CTK/compare/**
 00694c9f8a0da6ee28fb079902e6a8c3ec428058...**
 891aa5443b110cc7e6aa0ec1339aad4b2c83ef9dhttps://github.**
 com/commontk/CTK/compare/**00694c9f8a0da6ee28fb079902e6a8**
 c3ec428058...**891aa5443b110cc7e6aa0ec1339aad**4b2c83ef9dhttps://github.com/commontk/CTK/compare/00694c9f8a0da6ee28fb079902e6a8c3ec428058...891aa5443b110cc7e6aa0ec1339aad4b2c83ef9d
 


 Hth
 Jc


 On Fri, Apr 5, 2013 at 12:03 PM, radovan bast 
 radovan.b...@irsamc.ups-tlse.fr 
 radovan.b...@irsamc.ups-tlse.**frradovan.b...@irsamc.ups-tlse.fr
 

 wrote:

  dear CMake developers and users,


 first of all, a big thanks for the CMake developers
 for a great product! we like CMake a lot.

 we are extensively using CMake external project support
 in combination with Git submodules in a number of larger
 projects and that works nicely.

 my question is: could i do something similar with CMake
 modules? is it possible to start with a minimal core
 CMakeLists.txt which would fetch other CMake modules from an
 external public (Git) repository
 and use them to configure the project?

 the motivation for this is that we have several projects
 with rather complex CMake infrastructures. the projects
 are independent, live on different repositories, but the
 CMake infrastructures are to a large extent overlapping.
 currently we synchronize the CMake code between these projects
 manually but this is not great and there is the risk that
 the codes will diverge, that wheels will be reinvented,
 and that improvements are not communicated between the projects.
 this could be avoided if the CMake code was not explicitly
 present but fetched from a repository which would also
 enforce (or encourage) communicating all improvements
 to the same place. everything that is generic and not project
 specific would go into that external repo, only project specific
 things would be kept in the minimal core CMakeLists.txt.

 i will appreciate any pointers and suggestions
 on how i could implement such a scheme.

 thanks and best regards,
   radovan
 --

 Powered by www.kitware.com

 Visit other Kitware open-source projects at http://www.kitware.com/**
 opensource/opensource.html**htt**p://www.kitware.com/**

 opensource/opensource.htmlhtt**p://www.kitware.com/**
 opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html
 
 

 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ
 http://www.cmake.**org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/**CMake_FAQ
 
 http://www.cmake.**org/Wiki/**CMake_FAQhttp://www.cmake.**
 org/Wiki/CMake_FAQ http://www.cmake.org/Wiki/CMake_FAQ

 

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/**listinfo/cmakehttp://www.cmake.org/mailman/listinfo/cmake
 http://www.**cmake.org/mailman/**listinfo/**cmakehttp://www.cmake.org/mailman/**listinfo/cmake
 
 http://www.**cmake.org/**mailman/listinfo/**cmakehttp://cmake.org/mailman/listinfo/**cmake
 http:**//www.cmake.org/mailman/**listinfo/cmakehttp://www.cmake.org/mailman/listinfo/cmake
 




-- 
+1 919 869 8849
--

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] is it possible to download CMake modules at configure time?

2013-04-19 Thread radovan bast

dear Jean-Christophe,

absolutely. it will take a bit of time until
we finetune things but the plan is to have and share an open
source repository (probably on github) that will provide
generic plug-n-play CMake infrastructure for projects that require  
Fortran, C, and C++,

as well as MPI/OpenMP, BLAS, and LAPACK. the focus
is on scientific computing but i will try to keep things
general and generic also for other projects.

best greetings,
  radovan


On Fri, 19 Apr 2013 18:45:04 +0200, Jean-Christophe Fillion-Robin  
jchris.filli...@kitware.com wrote:



Hi Radovan,

That is good news :) Do you think you could share the CMake code you  
ended

up created. May be could generalize the solution to create a re-usable
module.

Thanks
Jc


On Fri, Apr 19, 2013 at 12:23 PM, radovan bast 
radovan.b...@irsamc.ups-tlse.fr wrote:


dear Jean-Christophe,

indeed the approach you demostrated works for me!
this is exactly what i needed.
thank you again!

(i am sorry for coming back to you so late;
was too busy with other things)

best regards,
  radovan



On Sat, 13 Apr 2013 12:24:02 +0200, Jean-Christophe Fillion-Robin 
jchris.filli...@kitware.com wrote:

 Hi Radovan,

Did you manage to make use and/or generalize the code I pointed you?
Thanks
Jc

--
Sent from my mobile device
On Apr 6, 2013 10:29 AM, radovan bast rado...@bast.fr wrote:

 dear Jean-Christophe,

wonderful! thank you very much.
i will test it out.
best regards,
  radovan


On Fri, 05 Apr 2013 18:13:52 +0200, Jean-Christophe Fillion-Robin 
jchris.filli...@kitware.com wrote:

 Hi Radovan,



This is possible. You could look at the approach we consider in CTK.
See
https://github.com/commontk/CTK/compare/**https://github.com/commontk/**CTK/compare/**
00694c9f8a0da6ee28fb079902e6a8c3ec428058...**
891aa5443b110cc7e6aa0ec1339aad4b2c83ef9dhttps://github.**
com/commontk/CTK/compare/**00694c9f8a0da6ee28fb079902e6a8**
c3ec428058...**891aa5443b110cc7e6aa0ec1339aad**4b2c83ef9dhttps://github.com/commontk/CTK/compare/00694c9f8a0da6ee28fb079902e6a8c3ec428058...891aa5443b110cc7e6aa0ec1339aad4b2c83ef9d



Hth
Jc


On Fri, Apr 5, 2013 at 12:03 PM, radovan bast 
radovan.b...@irsamc.ups-tlse.fr  
radovan.b...@irsamc.ups-tlse.**frradovan.b...@irsamc.ups-tlse.fr



wrote:

 dear CMake developers and users,



first of all, a big thanks for the CMake developers
for a great product! we like CMake a lot.

we are extensively using CMake external project support
in combination with Git submodules in a number of larger
projects and that works nicely.

my question is: could i do something similar with CMake
modules? is it possible to start with a minimal core
CMakeLists.txt which would fetch other CMake modules from an
external public (Git) repository
and use them to configure the project?

the motivation for this is that we have several projects
with rather complex CMake infrastructures. the projects
are independent, live on different repositories, but the
CMake infrastructures are to a large extent overlapping.
currently we synchronize the CMake code between these projects
manually but this is not great and there is the risk that
the codes will diverge, that wheels will be reinvented,
and that improvements are not communicated between the projects.
this could be avoided if the CMake code was not explicitly
present but fetched from a repository which would also
enforce (or encourage) communicating all improvements
to the same place. everything that is generic and not project
specific would go into that external repo, only project specific
things would be kept in the minimal core CMakeLists.txt.

i will appreciate any pointers and suggestions
on how i could implement such a scheme.

thanks and best regards,
  radovan
--

Powered by www.kitware.com

Visit other Kitware open-source projects at  
http://www.kitware.com/**

opensource/opensource.html**htt**p://www.kitware.com/**

opensource/opensource.htmlhtt**p://www.kitware.com/**
opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html



Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ
http://www.cmake.**org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/**CMake_FAQ

http://www.cmake.**org/Wiki/**CMake_FAQhttp://www.cmake.**
org/Wiki/CMake_FAQ http://www.cmake.org/Wiki/CMake_FAQ



Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/**listinfo/cmakehttp://www.cmake.org/mailman/listinfo/cmake
http://www.**cmake.org/mailman/**listinfo/**cmakehttp://www.cmake.org/mailman/**listinfo/cmake

http://www.**cmake.org/**mailman/listinfo/**cmakehttp://cmake.org/mailman/listinfo/**cmake
http:**//www.cmake.org/mailman/**listinfo/cmakehttp://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: 

Re: [CMake] is it possible to download CMake modules at configure time?

2013-04-19 Thread Jean-Christophe Fillion-Robin
Hi,

That is awesome.  May be the most generic component could be hosted on the
http://github.com/commontk ? We are also trying to make
generic component allowing to easily build application relying on multiple
project.

The idea would be to provide a drop-in CMake module (named CMakeSuperBuild
?) allowing to very very easily leverage External project. We would also
have a repository of existing external project definition that could easily
be re-used.

This new module would also provide the helper to make packaging and MAcOSx
bundling easier.

Thanks
Jc



On Fri, Apr 19, 2013 at 1:04 PM, radovan bast 
radovan.b...@irsamc.ups-tlse.fr wrote:

 dear Jean-Christophe,

 absolutely. it will take a bit of time until
 we finetune things but the plan is to have and share an open
 source repository (probably on github) that will provide
 generic plug-n-play CMake infrastructure for projects that require
 Fortran, C, and C++,
 as well as MPI/OpenMP, BLAS, and LAPACK. the focus
 is on scientific computing but i will try to keep things
 general and generic also for other projects.

 best greetings,
   radovan



 On Fri, 19 Apr 2013 18:45:04 +0200, Jean-Christophe Fillion-Robin 
 jchris.filli...@kitware.com wrote:

  Hi Radovan,

 That is good news :) Do you think you could share the CMake code you ended
 up created. May be could generalize the solution to create a re-usable
 module.

 Thanks
 Jc


 On Fri, Apr 19, 2013 at 12:23 PM, radovan bast 
 radovan.b...@irsamc.ups-tlse.**fr radovan.b...@irsamc.ups-tlse.fr
 wrote:

  dear Jean-Christophe,

 indeed the approach you demostrated works for me!
 this is exactly what i needed.
 thank you again!

 (i am sorry for coming back to you so late;
 was too busy with other things)

 best regards,
   radovan



 On Sat, 13 Apr 2013 12:24:02 +0200, Jean-Christophe Fillion-Robin 
 jchris.filli...@kitware.com wrote:

  Hi Radovan,

 Did you manage to make use and/or generalize the code I pointed you?
 Thanks
 Jc

 --
 Sent from my mobile device
 On Apr 6, 2013 10:29 AM, radovan bast rado...@bast.fr wrote:

  dear Jean-Christophe,

 wonderful! thank you very much.
 i will test it out.
 best regards,
   radovan


 On Fri, 05 Apr 2013 18:13:52 +0200, Jean-Christophe Fillion-Robin 
 jchris.filli...@kitware.com wrote:

  Hi Radovan,


 This is possible. You could look at the approach we consider in CTK.
 See
 https://github.com/commontk/**CTK/compare/**https://github.com/commontk/CTK/compare/**
 https://**github.com/commontk/**CTK/**compare/**https://github.com/commontk/**CTK/compare/**
 
 00694c9f8a0da6ee28fb079902e6a8**c3ec428058...**
 891aa5443b110cc7e6aa0ec1339aad**4b2c83ef9dhttps://github.
 com/commontk/CTK/compare/00694c9f8a0da6ee28fb079902e6a8
 c3ec428058...891aa5443b110cc7e6aa0ec1339aad4b2c83ef9d
 https://github.**com/commontk/CTK/compare/**
 00694c9f8a0da6ee28fb079902e6a8**c3ec428058...**
 891aa5443b110cc7e6aa0ec1339aad**4b2c83ef9dhttps://github.com/commontk/CTK/compare/00694c9f8a0da6ee28fb079902e6a8c3ec428058...891aa5443b110cc7e6aa0ec1339aad4b2c83ef9d
 

 


 Hth
 Jc


 On Fri, Apr 5, 2013 at 12:03 PM, radovan bast 
 radovan.b...@irsamc.ups-tlse.**fr radovan.b...@irsamc.ups-tlse.*
 ***frradovan.b...@irsamc.ups-**tlse.frradovan.b...@irsamc.ups-tlse.fr
 

 

 wrote:

  dear CMake developers and users,


 first of all, a big thanks for the CMake developers
 for a great product! we like CMake a lot.

 we are extensively using CMake external project support
 in combination with Git submodules in a number of larger
 projects and that works nicely.

 my question is: could i do something similar with CMake
 modules? is it possible to start with a minimal core
 CMakeLists.txt which would fetch other CMake modules from an
 external public (Git) repository
 and use them to configure the project?

 the motivation for this is that we have several projects
 with rather complex CMake infrastructures. the projects
 are independent, live on different repositories, but the
 CMake infrastructures are to a large extent overlapping.
 currently we synchronize the CMake code between these projects
 manually but this is not great and there is the risk that
 the codes will diverge, that wheels will be reinvented,
 and that improvements are not communicated between the projects.
 this could be avoided if the CMake code was not explicitly
 present but fetched from a repository which would also
 enforce (or encourage) communicating all improvements
 to the same place. everything that is generic and not project
 specific would go into that external repo, only project specific
 things would be kept in the minimal core CMakeLists.txt.

 i will appreciate any pointers and suggestions
 on how i could implement such a scheme.

 thanks and best regards,
   radovan
 --

 Powered by www.kitware.com

 Visit other Kitware open-source projects at
 http://www.kitware.com/**
 opensource/opensource.htmlhtt**p://www.kitware.com/**


 

Re: [CMake] Why does Project(name NONE) requires CMAKE_MAKE_PROGRAM?

2013-04-19 Thread Alexander Neundorf
On Friday 19 April 2013, Gregoire Aujay wrote:
 Hello,
 
 It seems that the Projetct(name NONE) macro requires the CMAKE_MAKE_PROGRAM
 to be defined.

in usual setups this is not a problem.

 This CMakelists will trigger a CMAKE_MAKE_PROGRAM not found, when trying to
 cross-compile with code sourcery toolchain which is using a non-trivial
 make program name:
 
 cmake_minimum_required(VERSION 2.8)
 
 Project(Foo NONE)
 
 # Init my stuff
 set(CMAKE_MAKE_PROGRAM cs-make.exe CACHE STRING make program FORCE)

You should be able to set that in the toolchain file.
Alternatively, cs-make could be added to to CMakeUnixFindMake.cmake.
Is cs-make (I guess code sourcery make) in some way special or more or less 
or normal make compiled by them, which can be used like any other make ?

Alex
--

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] Binary directory on different drive

2013-04-19 Thread Robert Dailey
I am invoking CMake like this on Windows:

Working directory is: C:\work\build
Directory containing source  root level CMakeLists.txt file: Y:\

So I invoke like this:

C:\work\build cmake -G NMake Makefiles Y:\

When I do this, any subdirectories I traverse inside Y:\ do not appear
under their proper binary directory. Example, let's say I do
add_subdirectory to step into library, which is at path Y:\library.
The binary directory will be:

C:\work\buildlibrary

Instead of:
C:\work\build\library

The slash between build and library is missing. Any reason for
this? It doesn't do it if the source  binary directories are on the
same drive letter.
--

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] copy_if_different on build

2013-04-19 Thread Matthew Woehlke

On 2013-04-17 12:41, Skippy VonDrake wrote:

Thought I understood this - but alas my implementation is wrong.

Here's my test case with a top-level cmake file and 3 subdirectories:
'src', 'bin' and 'outdir'.

Top level CMakeLists.txt
cmake_minimum_required (VERSION 2.8)
project (copyFile)
set (TARGETNAME fooCopy)
set (TARGETDEST ${PROJECT_SOURCE_DIR}/bin)
add_subdirectory (src)

src/CMakeLists.txt
add_executable (${TARGETNAME}   main.cpp)
set (input  ${CMAKE_CURRENT_SOURCE_DIR}/bin/config.cfg)
set (output ${CMAKE_CURRENT_SOURCE_DIR}/outdir/config.cfg)

add_dependencies(${TARGETNAME}  ${output})

add_custom_command(
OUTPUT ${output}
DEPENDS ${input}
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${input} ${output}
)

install (TARGETS ${TARGETNAME} DESTINATION ${TARGETDEST})

The config file (config.cfg) is just some text and cpp file is just a
hello world
example.

Since the config file is not source included as a dependency in the
add_executable command, I assume my problem is making the target
properly depend on it? Specifically ${TARGETNAME} should depend
on ${output}?


Hmm... yes, I'm not sure if add_dependencies can be used to add a file 
dependency to a target (the documentation only talks about adding other 
targets as dependencies).


Usually things like configured files are used as source files, i.e. as 
inputs to add_executable, etc.


If for some reason that doesn't work, I believe you can make your 
executable dependent on a custom target, which in turn depends on the 
output file from your custom command. IOW:


add_custom_command(OUTPUT out DEPENDS in COMMAND stuff)
add_executable(exe sources)
add_custom_target(exe_config DEPENDS out)
add_dependencies(exe exe_config)


If you only have one custom command, you can probably use 
add_custom_target to run the command instead, i.e.:


add_custom_target(exe_config DEPENDS in COMMAND stuff)
add_executable(exe sources)
add_dependencies(exe exe_config)


Hope that helps,

--
Matthew

--

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 changed binary file permission in 2.8.10

2013-04-19 Thread hce
Eric Noulard wrote
 2013/4/19 hce lt;

 jupiter.hce@

 gt;:
 Hi,

 I have another wired situation when I run cpack -G RPM, the cpack
 changed
 a binary file permission:

 Original file in the build directory:

 $ ls -l Robotic/Robotic-prefix/src/robotic/bin/CreateSystemObject

 -rwxr-xr-x. 1 root root 15307640 Apr 19 12:01
 Robotic/Robotic-prefix/src/robotic/bin/CreateSystemObject

 After running cpack -G RPM:

 $ ls -l
 _CPack_Packages/el6.x86_64/RPM/robotic/usr/local/bin/CreateSystemObject

 -rwxr--r--. 1 root root 15307640 Apr 19 16:22
 _CPack_Packages/el6.x86_64/RPM/robotic/usr/local/bin/CreateSystemObject

 The cpack changed binary file CreateSystemObject permission from
 -rwxr-xr-x to -rwxr--r--, not sure why, but is there any way to force
 cpack
 don't change the permission?
 
 Did you specify PERMISSION in your install(...) statement for this target?
 If not please do so, cpack shall respect what make  install does which
 may be different from the permission you get in the build tree which
 only comes from the umask of the user doing the build.

I did not use install statement, the binary files in bin directory were
copied directly to the Build directory at
Robotic/Robotic-prefix/src/robotic/bin, at that point all files permission
were correct.


Eric Noulard wrote
 If the problem persist please file a bug report.
 You may probably able to fix the right using
 CPACK_RPM_USER_FILELIST which can override generated spec file list
 for one (or several) file.

I think it could be a cpack bug and I'll file a bug report. I'll try the
CPACK_RPM_USER_FILELIST for the time being.


Eric Noulard wrote
 By the way you seem to be compiling+building+package being root,
 is it really the case?
 I would really suggest NOT to do that,
 building whould really be done a normal user.
 
 Packaging may require fakeroot,
 Real install (rpm or make install at system-wide location) needs root
 privilege.
 Otherwise being root for doing normal user stuff is looking for trouble.

I have tried bout could not figure out how to avoid to use root to build
packages where installation directory in system /usr/local/. I tried to
build and package software in fakeroot /tmp/fakeroot/application, and to
install the rpm int /usr/local/application. Then software generated
libraries and the fakeroot was added to appconfig.pc. If I misintepreted how
to use the fakeroot, could you please give me some examples of how to use
fakeroot correctly. 

Thank you Eric.

Kind regards.

jupiter




--
View this message in context: 
http://cmake.3232098.n2.nabble.com/cpack-changed-binary-file-permission-in-2-8-10-tp7584105p7584119.html
Sent from the CMake mailing list archive at Nabble.com.
--

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-commits] CMake branch, master, updated. v2.8.10.2-1000-g50e9680

2013-04-19 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project CMake.

The branch, master has been updated
   via  50e96802d2ad81f69d72dc87de80eee74d7a8dc9 (commit)
  from  e6c3595fde100b62f021ddb253b81fe3ecc9328b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=50e96802d2ad81f69d72dc87de80eee74d7a8dc9
commit 50e96802d2ad81f69d72dc87de80eee74d7a8dc9
Author: Kitware Robot kwro...@kitware.com
AuthorDate: Sat Apr 20 00:01:03 2013 -0400
Commit: Kitware Robot kwro...@kitware.com
CommitDate: Sat Apr 20 00:01:03 2013 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 5e01b6d..81684e7 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -2,5 +2,5 @@
 set(CMake_VERSION_MAJOR 2)
 set(CMake_VERSION_MINOR 8)
 set(CMake_VERSION_PATCH 10)
-set(CMake_VERSION_TWEAK 20130419)
+set(CMake_VERSION_TWEAK 20130420)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits