Re: [CMake] COMPONENT question

2016-10-31 Thread iosif neitzke
On 10/31/2016 11:42 AM, Dave Flogeras wrote: > Hi, are static libraries able to be added to a component? Yes! > > The following minimal example doesn't work as I expected: > > CMAKE_MINIMUM_REQUIRED( VERSION 3.0.0 ) > PROJECT( foo ) > > ADD_LIBRARY( foo foo.c ) > INSTALL( TARGETS foo ARCHIVE D

Re: [CMake] make_directory deprecated. What's the correct solution to generate directories at build time now?

2016-10-11 Thread iosif neitzke
I think only the cmake script command make_directory is deprecated, not the cmake command-line tool -E mode make_directory? On Tue, Oct 11, 2016 at 5:21 PM, Paulo Waelkens wrote: > Hello, > > to create a cmake directory at build time > (http://stackoverflow.com/questions/3702115/creating-a-direct

Re: [CMake] add_custom_command, POST_BUILD

2016-06-02 Thread iosif neitzke
On Thu, Jun 2, 2016 at 2:43 PM, Chuck Atkins wrote: > Could you just make the tests run in the post-build of the test? > > add_library(Foo Foo.cxx) > > add_executable(FooTest FooTest.cxx) > target_link_libraries(FooTest Foo) > > add_custom_command(TARGET FooTest POST_BUILD > COMMAND $ $ > ) > >

Re: [CMake] Visual Studio : can I add a references to a cmake generated vcxproj ?

2016-05-19 Thread iosif neitzke
We did on a regular basis during a transition period to hook up existing .vcproj files to a CMake generated solution as we were converting fully to CMake. I believe you can control what GUID gets generated by CMake by using target properties in your CMakeLists.txt file: https://stackoverflow.com/

Re: [CMake] Difference between PRIVATE and PUBLIC with target_link_libraries

2016-05-12 Thread iosif neitzke
her wrote: > On Thu, 12 May 2016 09:04:10 -0500 > iosif neitzke wrote: > >> target_include_directories(lib1 INTERFACE /tmp) means /tmp is >> propagated with lib1, but not used to build lib1. > > I know. Could you elaborate how this is related with lib3 PRIVATEly linking t

Re: [CMake] Difference between PRIVATE and PUBLIC with target_link_libraries

2016-05-12 Thread iosif neitzke
, May 12, 2016 at 9:26 AM, Patrick Boettcher wrote: > On Thu, 12 May 2016 09:20:10 -0500 > iosif neitzke wrote: > >> I'm sorry, I'm not sure I understand. In your example, there is >> target_link_libraries(lib3 PUBLIC lib1). It looks like lib2 has >> target_

Re: [CMake] Difference between PRIVATE and PUBLIC with target_link_libraries

2016-05-12 Thread iosif neitzke
ty of . PUBLIC and INTERFACE items will populate the INTERFACE_INCLUDE_DIRECTORIES property of ." https://cmake.org/cmake/help/v3.5/command/target_include_directories.html On Thu, May 12, 2016 at 8:59 AM, Patrick Boettcher wrote: > On Thu, 12 May 2016 08:47:33 -0500 > iosif neitzke wrote:

Re: [CMake] Difference between PRIVATE and PUBLIC with target_link_libraries

2016-05-12 Thread iosif neitzke
My reading of your examples: exe1 gets linked to lib2, and lib2/bin is included. exe1 probably won't link ultimately because lib2 may need symbols from lib1. Depends on the structure of the C code between lib2 and lib1. See John Lakos for further information on that. exe2 gets linked to lib3,

Re: [CMake] Difference between PRIVATE and PUBLIC with target_link_libraries

2016-05-11 Thread iosif neitzke
> When A links in B as PRIVATE, it is saying that A uses B in its > implementation, but B is not used in any part of A's public API. > When A links in B as INTERFACE, it is saying that A does not use B in its > implementation, but B is used in A's public API. > When A links in B as PUBLIC, it is

Re: [CMake] Difference between PRIVATE and PUBLIC with target_link_libraries

2016-05-11 Thread iosif neitzke
>> I *think* that these public/private rules behave a bit differently >> for static libraries than they do for shared ones. They do. Assuming main calls a() and b() defined in A_lib and B_lib respectively, for: add_library(A_lib STATIC a.c) add_library(B_lib STATIC b.c) target_link_libraries(A_li

Re: [CMake] How to deal with generated source files (w/ dependency tracking) for globs

2016-04-06 Thread iosif neitzke
I think it depends on when you want the output files from Nim generated and which files are the most frequently developed. If it is usually a one-time generation per clean development session, the simplest case, where the *.NIM source files are not the files most likely to be changed, I would think

Re: [CMake] include_external_msproject

2016-01-26 Thread iosif neitzke
No, I do not believe so. https://cmake.org/cmake/help/v3.4/command/include_external_msproject.html Keyword being 'project'. On Tue, Jan 26, 2016 at 8:43 AM, Lars wrote: > Appreciate some help understanding include_external_msproject. > Using Windows 7 and cmake 3.3 > > This is what has been don

Re: [CMake] Changing the the current generator in CMake GUI

2016-01-16 Thread iosif neitzke
http://reactiongifs.me/krysten-ritter-eyeroll/ -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMak

Re: [CMake] Imported libraries and cyclic dependencies

2016-01-07 Thread iosif neitzke
Which version of CMake are you using? On 01/07/2016 04:28 PM, Rainer Poisel wrote: Hi, I am having troubles with linking a bunch of imported libraries that have cyclic dependencies. This is what I am doing: 8<=== find_library(ESP8266_SDK_LIB_MAIN main ${ESP8266_SDK_BASE}/l

Re: [CMake] Feature request: expose curl to cmake -E

2015-12-19 Thread iosif neitzke
Mostly yes. On Sat, Dec 19, 2015 at 8:45 AM, Greg Marr wrote: > iosif neitzke wrote: >>On Fri, Dec 18, 2015 at 2:18 PM, Jakob van Bethlehem >> wrote: >>> Depending on what you precisely wish to achieve, maybe file(DOWNLOAD) >>> already fits your needs? >

Re: [CMake] Feature request: expose curl to cmake -E

2015-12-18 Thread iosif neitzke
On Fri, Dec 18, 2015 at 2:18 PM, Jakob van Bethlehem wrote: > Depending on what you precisely wish to achieve, maybe file(DOWNLOAD) already > fits your needs? > https://cmake.org/cmake/help/v3.1/command/file.html It does, generally, in the way that ExternalProject also fits, but I think would re

Re: [CMake] structured introduction to CMake?

2015-12-18 Thread iosif neitzke
some CMake introductory references: CMake's own Tutorial: https://cmake.org/cmake-tutorial/ (probably want to start here) Mastering CMake (by Kitware): http://www.amazon.com/Mastering-CMake-Ken-Martin/dp/1930934319/ref=sr_1_1?s=books&ie=UTF8&qid=1450465685&sr=1-1 Introduction to CMake: http://ww

[CMake] Feature request: expose curl to cmake -E

2015-12-18 Thread iosif neitzke
It would be nice to have curl as a platform-independent command like 'md5sum', 'tar', and 'compare_files'. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community.

Re: [CMake] Link errors - can I get more verbose messages?

2015-12-16 Thread iosif neitzke
If this [0] is the current code, I also could not get it to build on Xubuntu 15.10. FindPkgConfig.cmake failed with "package 'glfw3' not found" at line 506 (_pkg_check_modules_internal). Running pkg-config --modversion glfw3 returns 3.1.1. [0] https://github.com/openglsuperbible/sb7code On We

Re: [CMake] transitive dependencies (again)

2015-12-14 Thread iosif neitzke
If you can build Ada sources first, you might wish to make that a standalone project that is consumed downstream natively as an Imported Library. Do you generate the import library from a .def file, or via some other means? On Mon, Dec 14, 2015 at 9:59 AM, Tom Kacvinsky wrote: > Hi Petr, > > > O

Re: [CMake] organizing includes statements

2015-12-10 Thread iosif neitzke
I would think add_library( lib1 SHARED lib1/lib1.c ) target_include_directories( lib1 PUBLIC lib1/headers ) is simpler. Are the generator expressions needed for target export install commands, and is exporting targets at install preferred to add_subdirectory() ? On Thu, Dec 10, 2015 at 1:48 AM,

Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread iosif neitzke
Ah, okay, thanks. From cmake-gui the solution equivalent would be selecting the Ninja generator but specifying native compilers (cl.exe for this example) instead of using the default native compilers? -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http:

Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread iosif neitzke
Isn't this what Generator Toolset selection is for? ex. cmake -G Ninja -T v140 http://cmake.blogspot.com/2013/05/cmake-2811-available-for-download.html -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers v

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread iosif neitzke
What does output_required_files() [0] do, and is it applicable here? [0] https://cmake.org/cmake/help/v3.4/command/output_required_files.html On Mon, Nov 30, 2015 at 2:09 AM, Petr Kmoch wrote: > Hi Dan, > > you could look into the IMPLICIT_DEPENDS argument of add_custom_command: > https://cmake.

Re: [CMake] Ctest executable dll/so search path

2015-11-08 Thread Iosif Neitzke
A problem long-suffered on Windows and when lacking RPATH. Have seen approaches where DLL dependencies are POST_BUILD customed-command-copied-if-different into the executable directory, or gymnastics with add_test WORKING_DIRECTORY, or setting a test's ENVIRONMENT property. On Fri, Nov 6, 2015 at

Re: [CMake] add_dependencies being ignored for add_custom_command?

2015-10-31 Thread Iosif Neitzke
n 26.10.2015 12:51, Iosif Neitzke wrote: >> [...] >> add_library( somelib ${CMAKE_CURRENT_BINARY_DIR}/Header.hpp >> ${CMAKE_CURRENT_BINARY_DIR}/Header.cpp source.cpp ) > > ...add the generated files as to the target. > > That leads me to another question, though (ho

Re: [CMake] add_dependencies being ignored for add_custom_command?

2015-10-26 Thread Iosif Neitzke
On Mon, Oct 26, 2015 at 12:32 PM, Martin Braun wrote: > What exactly is a target? I thought if I do add_library(foo ${sources}), > then 'foo' is a target? You seem to suggest otherwise, which means I'm > misunderstanding some concepts. You are correct, "foo" is a target, but in one of your previo

Re: [CMake] add_dependencies being ignored for add_custom_command?

2015-10-23 Thread Iosif Neitzke
The command "add_dependencies" [0] only works on targets. See the CMake Tutorial for how to generate files as part of the build that later targets rely on. [1]. [0] https://cmake.org/cmake/help/v2.8.12/cmake.html#command:add_dependencies [1] https://cmake.org/cmake-tutorial/#s5 On Fri, Oct 23,

Re: [CMake] How to create a custom solution with Visual Studio 2010 generator?

2015-09-22 Thread Iosif Neitzke
Just as a point of information illustrating the opposite, we like using a CMakeList file for each target that contains a project() command where the name of the project is the name of the target. This is nice (for us) in that you get many .sln files generated from the larger source tree where you

Re: [CMake] Using add_subdirectory to manage project dependencies that aren't actually in a subdirectory

2015-09-18 Thread Iosif Neitzke
Why not just go one directory up? Add /path/to/CMakeLists.txt containing at least: add_subdirectory(A) add_subdirectory(B) https://github.com/toomuchatonce/cmake-examples/blob/master/staticlibs-add_subdir/CMakeLists.txt On Fri, Sep 18, 2015 at 5:42 PM, Joe wrote: > Hi. I was hoping to get som

Re: [CMake] CMake and Visual Studio multiconfig solution

2015-08-22 Thread Iosif Neitzke
DEBUG_POSTFIX? http://www.cmake.org/cmake/help/v3.3/prop_tgt/DEBUG_POSTFIX.html On Sat, Aug 22, 2015 at 12:11 PM, Mauro Ziliani wrote: > Hi all. > My name is mauro and i am a freelance programmer and I work different > platforms: windows and Linux. > I'm trying cmake 3.3.1 and I am in trouble to

Re: [CMake] [BUG] add_custom_command(TARGET ...) can't see in scope target

2015-08-04 Thread Iosif Neitzke
And: "A target created in the same directory (CMakeLists.txt file) that specifies any output of the custom command as a source file is given a rule to generate the file using the command at build time." http://www.cmake.org/cmake/help/v3.3/command/add_custom_command.html But it's not super clear

Re: [CMake] [BUG] add_custom_command(TARGET ...) can't see in scope target

2015-08-04 Thread Iosif Neitzke
"Dependencies listed with the DEPENDS argument may reference files and outputs of custom commands created with add_custom_command() in the same directory (CMakeLists.txt file)." http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command:add_custom_target On Tue, Aug 4, 2015 at 4:15 PM, Dan Liew w

Re: [CMake] CMAKE_COLOR_MAKEFILE

2015-06-09 Thread Iosif Neitzke
The CMake variable CMAKE_COLOR_MAKEFILE sets the preference to generate a colored Makefile at Configure time. At Build time, regardless if CMAKE_COLOR_MAKEFILE=ON, you can use 'make COLOR=0' to turn off Makefile color dynamically. Running through cmake with 'cmake --build -- COLOR=0' does the s

Re: [CMake] What is the purpose of INSTALL_DIR in ExternalProject_Add command?

2015-04-09 Thread Iosif Neitzke
Install Step The INSTALL_DIR is underneath the calling project’s binary directory. Use INSTALL_DIR to specify a different location. Note that in addition to setting INSTALL_DIR, you also have to pass -DCMAKE_INSTALL_PREFIX or --prefix to the CMake or configure command. It is not used automatically

Re: [CMake] How to build a target on install (only)?

2015-02-15 Thread Iosif Neitzke
For conditional file install, you could try something like "cmake -E copy_if_different". On Sun, Feb 15, 2015 at 1:59 PM, Paul Smith wrote: > On Sun, 2015-02-15 at 12:16 -0500, David Cole wrote: >> The easiest thing is probably to use the install(SCRIPT or >> install(CODE signature of the install

Re: [CMake] creating start menu items

2015-02-13 Thread Iosif Neitzke
Ah, very good. On Fri, Feb 13, 2015 at 3:27 PM, Nils Gladitz wrote: > On 13.02.2015 22:11, Iosif Neitzke wrote: >> >> As a side note, remember that CPACK_PACKAGE_EXECUTABLES is problematic >> in another way too; it requires listed executables to be installed to >> /b

Re: [CMake] creating start menu items

2015-02-13 Thread Iosif Neitzke
As a side note, remember that CPACK_PACKAGE_EXECUTABLES is problematic in another way too; it requires listed executables to be installed to /bin/. On Fri, Feb 13, 2015 at 1:56 AM, Nils Gladitz wrote: > On 02/13/2015 07:52 AM, Paul Anton Letnes wrote: >> >> I have been unable to come across any d

Re: [CMake] Setting CPACK_PACKAGE_FILE_NAME per COMPONENT

2015-01-30 Thread Iosif Neitzke
0, 2015 at 6:05 AM, Rob Harris wrote: > On 01/29/2015 11:24 PM, Iosif Neitzke wrote: >> >> Where for a single run of CPack, each component name produces a >> corresponding named .deb file or ...? > > Yes. Exactly. >> >> Have you tried using CPACK_PROJECT_CONFIG

Re: [CMake] Setting CPACK_PACKAGE_FILE_NAME per COMPONENT

2015-01-29 Thread Iosif Neitzke
Where for a single run of CPack, each component name produces a corresponding named .deb file or ...? Have you tried using CPACK_PROJECT_CONFIG_FILE [0]? This allows you to set a few options at packaging time which can change the final output package file name. [0] http://www.cmake.org/cmake/hel

Re: [CMake] add_executable question

2015-01-21 Thread Iosif Neitzke
set( PROJ_NAME Test01 ) file( GLOB ${PROJ_NAME}_SRC *.h *.cpp ) add_executable( ${PROJ_NAME} ${${PROJ_NAME}_SRC} ) On Thu, Jan 22, 2015 at 1:05 AM, Eric Noulard wrote: > > > 2015-01-22 3:41 GMT+01:00 Joshua Robinson : >> >> >> Greetings, >> >> Can I add a variable, was set before, to add_executa

Re: [CMake] Books on cmake

2014-12-09 Thread Iosif Neitzke
Pretty much. There is also the slim e-book Introduction to CMake [0]. [0] http://www.amazon.com/Introduction-CMake-Software-Tool-Book-ebook/dp/B00KE807Q0/ref=la_B00GPU8HLS_1_1?s=books&ie=UTF8&qid=1418153199&sr=1-1 On Tue, Dec 9, 2014 at 9:47 AM, Dan Kegel wrote: > Is "Mastering CMake" still th

Re: [CMake] CMake can't find Boost versions > 1.55

2014-11-19 Thread Iosif Neitzke
Seconded! On Wed, Nov 19, 2014 at 5:16 PM, Stephen Kelly wrote: > Robert Ramey wrote: > >> The module FindBoost is quite elaborate. Unfortunately it seems to depend >> upon searching for specific version numbers found in a list. This list >> only >> goes up to 1.55 so it can't find later versio

Re: [CMake] Generic XML output file of project heirarchy

2014-11-18 Thread Iosif Neitzke
How about parsing GraphViz files? On Tue, Nov 18, 2014 at 3:08 PM, Stephen Kelly wrote: > Michael Jackson wrote: > >> Yep, that is pretty much the discussion that I was wanting. Now, has there >> been any movement on any of the implementations? > > Nothing is reported beyond that thread. > > If y

Re: [CMake] What is the CMake equivalent for autotools "make dist" ?

2014-10-11 Thread Iosif Neitzke
With CPack enabled, "make help" will show all the valid targets. The "package_source" target should be one of those targets. A simple project on Linux built with "make package_source" gives me: ${CMAKE_BINARY_DIR}/_CPack_Packages/Linux-Source/{TZ,TGZ,TBZ2}/CPack_Example-0.1.1-Linux.tar.{bz2,gz,Z

Re: [CMake] Modify nsis command?

2014-09-20 Thread Iosif Neitzke
Which defines, for example? On Sat, Sep 20, 2014 at 11:45 AM, Richard Shaw wrote: > In my continued efforts to convert a project from autotools to CMake I've > gotten to the point of creating an NSIS package. > > I'm trying not to modify any existing source files and the current method > passes s

Re: [CMake] Should CPack command-line options -P and -R do more?

2014-09-11 Thread Iosif Neitzke
Or are these customizing CPack command line options mostly meant to be used with a CPACK_PROJECT_CONFIG_FILE? On Thu, Sep 11, 2014 at 9:07 AM, Iosif Neitzke wrote: > For a project that uses include(CPack) and produces > CPack_Example-0.1.1-Linux.sh when "cpack" is

[CMake] Should CPack command-line options -P and -R do more?

2014-09-11 Thread Iosif Neitzke
For a project that uses include(CPack) and produces CPack_Example-0.1.1-Linux.sh when "cpack" is run and produces CPack_Example-0.1.1-Linux.exe when "cpack -G NSIS" is run, am I remiss for thinking that cpack -G NSIS -P NEW_NAME -R 3.1.4 should produce "NEW_NAME-3.1.4-Linux.exe"? As always, than

Re: [CMake] Ctest building with Multiple Processors

2014-09-04 Thread Iosif Neitzke
Does ctest -j , or ctest --parallel behave differently? http://www.cmake.org/cmake/help/v3.0/manual/ctest.1.html On Wed, Sep 3, 2014 at 2:31 PM, Michael Jackson wrote: > I am exploring CTest/CDash with out project and I was trying to figure out > how to have CTest use all my cores for builds.

Re: [CMake] Spaces in a command

2014-07-25 Thread Iosif Neitzke
"If VERBATIM is given then all arguments to the commands will be escaped properly for the build tool so that the invoked command receives each argument unchanged. Note that one level of escapes is still used by the CMake language processor before add_custom_command even sees the arguments. Use of V

Re: [CMake] Mastering CMake book

2014-07-11 Thread Iosif Neitzke
The latest edition of Mastering CMake is 6th edition (September 13, 2013), covering versions of CMake up to and including 2.8.12. On Fri, Jul 11, 2014 at 8:34 AM, Petar Petrov wrote: > Hello, > just wondering how up to date is the "Mastering CMake"book. Does it > cover all 3.0 changes ? > > Greet

Re: [CMake] cmake project patterns / examples

2014-06-04 Thread Iosif Neitzke
imple >> examples. This very very quickly turns in to a 3k line top level >> CMakeLists.txt for even moderately sized projects. I would really >> discourage this one as "don't do it ever" because of the bad behaviours it >> builds early on. >> >> - Chu

Re: [CMake] cmake project patterns / examples

2014-06-03 Thread Iosif Neitzke
Great to see these examples with pros and cons. I believe the staticlibs-include example [0] pattern, though mentioned in Mastering CMake [1], generally is deprecated in favor of add_subdirectory with CMakeLists.txt at each level for self-contained projects. [0] https://github.com/toomuchatonce/

Re: [CMake] Define a subfolder for SWIG project

2014-05-19 Thread Iosif Neitzke
Assuming USE_FOLDERS is set [0], does set_property( TARGET test_swig PROPERTY FOLDER "PYTHON" ) work? [0] http://www.cmake.org/cmake/help/v2.8.12/cmake.html#prop_global:USE_FOLDERS On Fri, May 16, 2014 at 4:45 PM, Giumas wrote: > > Good morning, > > I am working for the first time with SWIG, I h

Re: [CMake] cmake - configuration roolback to default

2014-04-12 Thread Iosif Neitzke
Is this usage what you are describing? http://cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F On Sat, Apr 12, 2014 at 7:48 AM, wrote: > Hi, > > i want to change CMAKE_C_COMPILER and CMAKE_CXX_COMPILER to gcc-4.7 and > g++-4.7. But when i run cmake, the configuration rollback to d

Re: [CMake] CPack error : Problem checking NSIS version with command: "C:/NSIS/makensis.exe" /VERSION

2014-03-19 Thread Iosif Neitzke
Apparently NSIS 2.15 lacks a "v" in the version output string, which causes the regular expression used in cmCPackNSISGenerator [0] to fail. The "v" was added back to the version string in 2.16 [1], and presumably exists all the way through NSIS version 2.46. [0] https://github.com/Kitware/CMake

Re: [CMake] CPack error : Problem checking NSIS version with command: "C:/NSIS/makensis.exe" /VERSION

2014-03-19 Thread Iosif Neitzke
On both Windows 7 and Windows XP makensis.exe /VERSION seems to exit normally, but it must be a bad return value or regex failure: https://github.com/Kitware/CMake/blob/master/Source/CPack/cmCPackNSISGenerator.cxx#L437 -- Powered by www.kitware.com Please keep messages on-topic and check the CM

[CMake] CPack error : Problem checking NSIS version with command: "C:/NSIS/makensis.exe" /VERSION

2014-03-18 Thread Iosif Neitzke
When trying to run CPack with NSIS 2.15, i get: CPack error : Problem checking NSIS version with command: "C:/NSIS/makensis.exe" /VERSION Please check ./NSISOutput.log for errors CPack error : Cannot initialize the generator NSIS NSISOutput.log: # Run command: "C:/NSIS/makensis.exe" /VERSION #