Consider the following:
PROJECT(Mandatory)
SET(USING_SHAPE "" CACHE STRING "[Required] Shape config: Round or
Square")
SET_PROPERTY(CACHE USING_SHAPE PROPERTY STRINGS Round Square)
IF (NOT USING_SHAPE)
MESSAGE(FATAL_ERROR "'USING_SHAPE' variable is required but was not
set.
On 5/23/2012 4:45 PM, jrosensw wrote:
Hi Alexander,
I tried this already. However I'm not sure what a "clean build tree"
means. Maybe thats my problems. All I did was this:
CXX="/insure/g++" cmake .
But when I compiled I did not see a change. How do I get my tree to a
"clean state"
I'm trying to make a CMakeLists for libevent, and had a couple of
questions that would make it a bit cleaner:
- Other than using a macro to do { add_executable(...)
target_link_libraries(...) } is there a /clean/ way to make everything
in a subdirectory automatically link a given library?
-
I've spent all day trying to get a single precompiled header to work on
a series of targets within a rather complex project. I'll profess to a
fair amount of stabbing in the dark.
I came up with the following, but it doesn't bother building the PCH
until the *end* of the first target. And then
In order to maximize our ability to rebuild an exact copy of a previous
revision, our repository carries copies of numerous 3rd party libraries.
However, in most of their cases we are fairly selective about which
elements we build.
Downside: "make clean && make" winds up rebuilding all the da
On 2/23/2012 9:37 PM, John Drescher wrote:
You probably want to do some type of file GLOBBING for that
Here is an example of file globbing (along with its pitfalls):
http://www.cmake.org/pipermail/cmake/2010-September/039558.html
I am sorry. It does not look like the code to glob is there. I
So it's late, and suddenly I find I can't remember how to configure
cmake to compile any .xml file in a specific directory with an
xml-to-header script we have. More importantly, I can't think of the
right terms to find an answer, so I've spent a frustrating hour googling
to no end.
Is there
My CMakeLists uses the Subversion repository information in a couple of
places (it configures a file revision.h and it uses it for the CPack
package name).
The problem is that this variable is cached and retained until the cache
is rebuilt, instead of being calculated or evaluated per make. So
I have a script that generates a revision.h file, I've spent the morning
trying to figure out how to make it so that ... any time CMake rebuilds
any of the other targets, it starts by running the make-new-revision script.
The idea is, I use the script manually to upversion, but anytime I type
On 3/28/2010 5:14 AM, Fred Fred wrote:
This list seems not to be really active and I did not receive any help
since I posted this one week ago. BTW this issue has been open on
Mantis more than 3 months ago and seems still to be open! So is there
really anybody trying to help on cmake??
If the d
I would like the following [pseudo] CMake package to create a
"Solution.sln" in ${CMAKE_BINARY_DIR} and put the .vcproj files in
${CMAKE_BINARY_DIR}/${VCPROJ_DIR}
project (Solution)
add_library(library1 foo1.cpp)
# ...
add_library(library9 foo9.cpp)
add_executable(target1 ta
When you tell CMake under Linux to use ICC, there's no automatic
detection of the custom archiver and linker that ICC requires. The
following lines fix that, but would it be possible to add them to the
stock CMake files someplace so that using ICC becomes slightly more
transparent?
#
On 3/6/2010 8:04 PM, J Decker wrote:
there is a foreach() operator...
Well, thanks for trying, but what I actually want to know is how to add
something to all the current targets /automatically/ - as in without
specifying them by hand, and how to get the compiler flags etc of a
particular
On 3/6/2010 6:39 PM, Oliver Smith wrote:
I want to add a target (a gcc precompiled header) as a dependency for
every target so it'll get compiled with the flags for that particular
target, including altering the resulting file name.
I should say: /automatically/ add... I don't want t
I'm probably not using the right keywords on my search.
I want to add a target (a gcc precompiled header) as a dependency for
every target so it'll get compiled with the flags for that particular
target, including altering the resulting file name.
I did try looking at the precompiled header C
I have a CMake project with a number of targets, and a Lua wrapper
generated through tolua++ which is included by several of them, so that
it is compiled with the target-specific make flags per-target.
Global make flags: -O0 -ggdb3 -Wall -Werror ... etc
Target1 make flags: -DAS_DB_PROXY ...
Tar
Adding precompiled header support doesn't have to be a massive amount of
work.
Fundamentals:
1. Include the header in every source module,
2. Compile the header once for every target (so that compiler flags
match),
There are three possible build environments:
1. Full precompiled he
On systems that support it, I'm wanting to do the equivalent of:
$(CC) -pipe source1.cpp source2.cpp source3.cpp -fwhole-program
I can't figure out how to tell CMake to pass multiple sources to the
compiler at once.
(Using versions 2.6 and 2.8)
- Oliver
__
18 matches
Mail list logo