Follow this wiki:
http://www.itk.org/Wiki/CMake/Examples#Check_operating_system
There say:
> IF(WIN32)
>...do something...
> ELSE(WIN32)
>...do something else...
> ENDIF(WIN32)
>
> or:
>
> IF(CMAKE_SYSTEM_NAME STREQUAL Linux)
>
>
As I know:
if (APPLE)
...
endif()
is not enough.
For no
Thanks to all for the feedback / suggestions.
I did edit the wiki -- feel free to revise my submission or extend with
your own. I linked to this thread on there, as well.
http://www.itk.org/Wiki/CMake/Examples#Check_if_environment_variable_is_set
On Fri, Sep 14, 2012 at 4:43 PM, Bogdan Cristea
On 9/14/2012 4:57 PM, David Doria wrote:
I found and used the MSYS generator, and after adding msys/bin to PATH,
it worked as I expected. I also found that with the MinGW generator, it
worked properly by running 'mingw32-make' rather than just 'make'. I am
still confused as to why it didn't compl
On Fri, Sep 14, 2012 at 1:34 PM, David Doria wrote:
> I am trying to build ITK using MinGW. (I'm writing some guides on how to
> build ITK with different toolchains).
>
> Here is what I've come up with so far:
> http://www.itk.org/Wiki/ITK/Configuring_and_Building/MinGW
>
> Up until this point, e
On Friday 14 September 2012 16:26:10 you wrote:
> On Fri, Sep 14, 2012 at 4:17 PM, Bogdan Cristea wrote:
> > On Friday 14 September 2012 16:13:16 Davis Ford wrote:
> >> if("$ENV{FOO_HOME}" MATCHES "")
> >>
> >>message("You must set FOO_HOME")
> >>return()
> >>
> >> endif()
> >
> > Try s
I do this all the time in my config files and I have found that best way to do
it is to do this:
if(NOT ENV{FOO_HOME})
message(FATAL_ERROR "Could not find FOO_HOME environment variable")
endif(NOT ENV{FOO_HOME}))
One thing to note is that if the environment variable points to a path on the
sy
On Fri, Sep 14, 2012 at 4:17 PM, Bogdan Cristea wrote:
> On Friday 14 September 2012 16:13:16 Davis Ford wrote:
>> if("$ENV{FOO_HOME}" MATCHES "")
>>message("You must set FOO_HOME")
>>return()
>> endif()
>
> Try something like this
>
> if(NOT ENV{FOO_HOME})
> message("etc")
> endif()
>
> -
On Friday 14 September 2012 16:13:16 Davis Ford wrote:
> if("$ENV{FOO_HOME}" MATCHES "")
>message("You must set FOO_HOME")
>return()
> endif()
Try something like this
if(NOT ENV{FOO_HOME})
message("etc")
endif()
--
Bogdan
--
Powered by www.kitware.com
Visit other Kitware open-source
Hi, I'm new to CMake -- trying to do something relatively simple. Not
having much luck -- I've scoured the docs/wiki, but searching the manual
http://cmake.org/cmake/help/v2.8.9/cmake.html in the browser results in a
million hits for a search string.
I just want to test if an environment variable
Hello All,
Does anyone know offhand if it is possible to nest @VAR@s? For example, can I
do something like this:
@@PROJECT_NAME@_VERSION_MAJOR@
What I would like for this to do is to first replace @PROJECT_NAME@ with the
name of the project, something like Foo for instance. Then the second
re
Hello All,
Does anyone know of a workaround (besides not caching the variable) to caching
a variable that has multiple lines of text in it? It seems as though the CMake
cache does not support the use of multi-line variables in it, is this true? Is
there no workaround for this other than to just
I am trying to build ITK using MinGW. (I'm writing some guides on how to
build ITK with different toolchains).
Here is what I've come up with so far:
http://www.itk.org/Wiki/ITK/Configuring_and_Building/MinGW
Up until this point, everything seems to go smoothly (configure and
generate complete su
On Fri, Sep 14, 2012 at 11:56 AM, David Cole wrote:
> Run cmake-gui FROM the target environment, just like you run cmake...
>
> i.e. : type "cmake-gui" in the cmd prompt that has your stuff set up
> in it. Don't just launch it from a short-cut unless you're using the
> "Visual Studio *" generator
Run cmake-gui FROM the target environment, just like you run cmake...
i.e. : type "cmake-gui" in the cmd prompt that has your stuff set up
in it. Don't just launch it from a short-cut unless you're using the
"Visual Studio *" generators. Those do not need any special
environment. Many of the makef
When using Visual Studio 10 as the generator from the CMake GUI, it
complains that it can't find 'cl' ("To use the NMake generator, cmake must
be run from a shell that can use the compiler cl from the command line.")
It works if I use:
cmake -G "NMake Makefiles"
from the VS command line, so I'm a
A bit hackish but maybe
set(CMAKE_REQUIRED_DEFINITIONS "-x objective-c")
before your check_c_source_compiles call would help (at least with gcc;
I'm not really familiar with objective c itself).
Nils
On 09/14/2012 10:28 AM, Doug wrote:
Small query:
Checking for the presence of cocoa like th
Small query:
Checking for the presence of cocoa like this fails:
check_c_source_compiles("
#import
int main (int argc, char** argv) {}" HAVE_VIDEO_COCOA)
Because compiling blah.c with that content fails, where compiling
blah.m with that content passes.
What's the right way
I have project with name "DocumentLibrary" that depends on external project
with name "PrinterLibrary".
#add external project
ExternalProject_add(PrinterLibrary
SVN_REPOSITORY ${svnPath}
PREFIX
${CMAKE_CURRENT_BINARY_DIR}/dependecies-sources/ Pri
18 matches
Mail list logo