[CMake] dates on web site

2015-08-23 Thread Dave Yost
Hi. To many people in the world, partly because you use periods, 03.12.2015 looks like December 3 10.09.2014 looks like Sept 10 whereas 2015-03.12 means March 12 to everyone. 2014-10-09 means Oct 9 to everyone I suggest you switch to ISO 8601 https://en.wikipedia.org/wiki/ISO_8601 for

Re: [CMake] output of add_custom_command as target in Makefile

2015-06-12 Thread Dave Yost
${CMAKE_CURRENT_SOURCE_DIR}/genFoo foo.cc ) add_custom_target(foo.cc DEPENDS ${CMAKE_BINARY_DIR}/foo.cc) add_executable (foo foo.cc) That should create a foo.cc target that you can run that will do the right thing. -- Glenn On 12 June 2015 at 14:20, Dave Yost d...@yost.com

Re: [CMake] output of add_custom_command as target in Makefile

2015-06-12 Thread Dave Yost
name, I have no idea, because it rarely makes sense to name them differently). Try simply “foo” or “custom-command-target”. You would never say “make foo.cpp”, not even in an ordinary GNU Make script. Feladó: Dave Yost mailto:d...@yost.com Elküldve: ‎péntek‎, ‎2015‎. ‎június‎ ‎12‎. ‎2‎:‎00

[CMake] output of add_custom_command as target in Makefile

2015-06-11 Thread Dave Yost
In this example, how do I get make foo.cc to work? 0 Thu 16:56:19 yost DaveBook ~/p/c++/cmake/custom-command-target 369 Z% bundle CMakeLists.txt genFoo #!/usr/bin/env unbundle # See http://yost.com/computers/bundle/ CMakeLists.txt cmake_minimum_required(VERSION 3.3.0)

Re: [CMake] getting a build parameter from a file

2015-06-09 Thread Dave Yost
depend on that file and you don't need a separate timestamp file. HTH, David C. On Tue, Jun 9, 2015 at 1:05 AM, Dave Yost d...@yost.com wrote: First, my cmake code does this: sets ${metals} from a cmake command-line argument compares the contents of ${metals} against the contents

[CMake] CMAKE_COLOR_MAKEFILE

2015-06-09 Thread Dave Yost
Hey, I love colors. But one of my users doesn’t. Why doesn’t this work? CMAKE_COLOR_MAKEFILE=OFF cmake .. If that worked, he could set it and forget it. Instead, he has to do this: cmake -DCMAKE_COLOR_MAKEFILE=OFF .. -- Powered by www.kitware.com Please keep messages on-topic and check the

[CMake] getting a build parameter from a file

2015-06-08 Thread Dave Yost
First, my cmake code does this: sets ${metals} from a cmake command-line argument compares the contents of ${metals} against the contents of a file to note whether the variable is being changed since the last run of cmake writes the new value to that file for next time call an

Re: [CMake] Not finding boost

2015-06-02 Thread Dave Yost
:43 PM, Dave Yost d...@yost.com wrote: Also, from what I can make of CMake.app/Contents/share/cmake-3.2/Modules/FindBoost.cmake findBoost looks in /sw/local/ which is a path from the old, old Fink package system for OS X. findBoost should also look in /usr/local (Homebrew

[CMake] Not finding boost

2015-06-01 Thread Dave Yost
The boost I want is not in a normal location, but: Boost's include dir is first in my CPATH. Boost's lib dir is first in my LD_LIBRARY_PATH. Why doesn't cmake 3.2.2 find it? I'm not being picky about the version. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake

Re: [CMake] no convenience target for generated files?

2015-06-01 Thread Dave Yost
... foo.s 0 Mon 19:44:35 yost DaveBook ~/p/c++/cmake/target-for-generate/build 262 Z% On 2015-04-08, at 8:05 PM, David Cole dlrd...@aol.com wrote: Does cd bar make help Tell you anything? On Wednesday, April 8, 2015, Dave Yost d...@yost.com mailto:d...@yost.com wrote

Re: [CMake] Not finding boost

2015-06-01 Thread Dave Yost
On 2015-06-01, at 2:28 PM, Dave Yost d...@yost.com wrote: The boost I want is not in a normal location, but: Boost's include dir is first in my CPATH. Boost's lib dir is first in my LD_LIBRARY_PATH. Why doesn't cmake 3.2.2 find it? I'm not being picky about the version. In other

Re: [CMake] Not finding boost

2015-06-01 Thread Dave Yost
) /opt/ (linux and others) On 2015-06-01, at 7:18 PM, Dave Yost d...@yost.com wrote: On 2015-06-01, at 2:28 PM, Dave Yost d...@yost.com mailto:d...@yost.com wrote: The boost I want is not in a normal location, but: Boost's include dir is first in my CPATH. Boost's lib dir

[CMake] avoiding unnecessary rebuilds

2015-04-11 Thread Dave Yost
Seems to me that it would be great if cmake could produce Makefiles that work like the proposal below. This approach can eliminate a lot of unnecessary downstream rebuilds. It is similar to how I imagine ccache https://ccache.samba.org/ works, but unlike ccache which is only for compiling

[CMake] no convenience target for generated files?

2015-04-08 Thread Dave Yost
I’m using add_custom_command to generate a file, “bar.cc”. It would be convenient if I could say make bar.cc or make bar/bar.cc but neither of these work, and I can’t see a target in the Makefiles that I can use. There is a way to make bar.cc.o, but not bar.cc 0 Wed 14:15:54 yost DaveBook

[CMake] commands

2015-04-07 Thread Dave Yost
Learning and understanding cmake would be a lot easier if the cmake-commands http://www.cmake.org/cmake/help/v3.2/manual/cmake-commands.7.html page would have two columns. On the left, the alphabetic listing, available now. On the right, commands grouped by category. Here’s a category: if

[CMake] nonstandard C++ source filename extension

2015-03-16 Thread Dave Yost
From what I can glean online, I’ve tried this: set_source_files_properties(foo.bar PROPERTIES LANGUAGE CXX) add_executable(foo foo.bar) set_target_properties(foo PROPERTIES LINKER_LANGUAGE CXX) but it doesn’t work. What am I missing? 0 Mon 20:16:15 yost 1181 Z% cat CMakeLists.txt

[CMake] make output two two streams: concise to stdout and verbose to a file

2015-03-06 Thread Dave Yost
When I do an ordinary make, it would be nice if in addition to the the concise output going to the screen, verbose output would go to a file in the root of the build folder. This way, after the fact I can see exactly what happened with the build I just did. If I have to build again with

[CMake] cmake picks a compiler

2015-03-03 Thread Dave Yost
Hi. In our CMakeLists.txt file we want to force the user to pick a c++ compiler explicitly, something like this: if (NOT DEFINED CMAKE_CXX_COMPILER) set(CMAKE_CXX_COMPILER $ENV{CXX}) if (NOT DEFINED CMAKE_CXX_COMPILER) message(FATAL_ERROR You must choose your compiler, in one of two

[CMake] finding boost

2015-03-03 Thread Dave Yost
Hi. I’m having trouble with the find_package documentation w.r.t. boost. I can’t divine how to get find_package to look for boost in various places it might be on the various systems where we do builds. I know boost looks in several places, but I need to add to that list. Boost might be in

[CMake] creating a DLL with an OpenCV dependency

2015-03-02 Thread Dave Yost
Hi. I can’t divine how to get find_package to look for boost in the various places it might be on the various systems where we do builds. Boost might be in any of these places /usr/local/include/boost /usr/local/boost/1.57.0/include /usr/local/boost/1.56.0/include etc.