Jan Peciva | 2 Jan 2009 11:46
Favicon

CPack and NSIS bug

Hi,

I started to use CPack for generating NSIS installers and I found it quite useful.
However, I reached a bug.

Since I need a kind of special Start Menu setup on Windows, I used
CPACK_NSIS_EXTRA_INSTALL_COMMANDS and
CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
to put direct NSIS code to generate my Start Menu.

So far, everything was ok, and I think, it is quite good idea to let people insert their own NSIS code to
customize the installation in every possible way.

But because I need some special installation performing file type associations, that actually need to
reflect current registry content and current associations, I am executing exe at this point. All people
would probably append the execute command to CPACK_NSIS_EXTRA_INSTALL_COMMANDS . And that is what I
have done. It is working without problem with one big exception:

When user ticks "Do not create shortcuts" to omit installation of Start Menu,
CPACK_NSIS_EXTRA_INSTALL_COMMANDS are completely omitted from execution. I expect, this is a bug,
because INSTALL_COMMANDS should be executed always (according the meaning of the name) and there should
be another variable, something like CPACK_NSIS_EXTRA_INSTALL_START_MENU, that will be executed or
not be executed, depending on ticking "Do not create shortcuts".

Thanks,
John

Strathmore University provides all-round education in an atmosphere of freedom and responsibility.

This email and any files transmitted with it are intended solely for use by the recipient(s) to whom it is
(Continue reading)

谢歆 | 3 Jan 2009 16:22
Picon

Does cmake support fortran lang with F extension?

hi,

I decide to use cmake for an old FORTAN program what consists a lot of
F extension source code and wrote a simple CMakelists.txt.
Hoever, the default setting did not seem to support F extension.

My cmakelists.txt is as follows:

cmake_minimum_required(VERSION 2.6)
project(testukmo)

include_directories(ukmorad/headers)
link_directories(ukmorad)

enable_language(Fortran)
add_executable(testukmo
  main.F
)

add_library(ukmoradlib STATIC ${ukmorad_SRCS})
target_link_libraries(testukmo ukmoradlib)

set(ukmorad_SRCS
  ${ukmorad_main_SRCS}
  ${ukmorad_ses_setup_SRCS}
  ${ukmorad_common_SRCS}
  ${ukmorad_ses_flux_calc_SRCS}
)

set(ukmorad_main_SRCS
(Continue reading)

Bill Hoffman | 3 Jan 2009 17:12
Favicon
Gravatar

Re: Does cmake support fortran lang with F extension?

谢歆 wrote:
> hi,
> 
> I decide to use cmake for an old FORTAN program what consists a lot of
> F extension source code and wrote a simple CMakelists.txt.
> Hoever, the default setting did not seem to support F extension.
> \

ukmorad_SRCS  has to be set BEFORE the add_library call.

> My cmakelists.txt is as follows:
> 
> cmake_minimum_required(VERSION 2.6)
> project(testukmo)
> 
> include_directories(ukmorad/headers)
> link_directories(ukmorad)
> 
> enable_language(Fortran)
> add_executable(testukmo
>   main.F
> )
> 
> add_library(ukmoradlib STATIC ${ukmorad_SRCS})
> target_link_libraries(testukmo ukmoradlib)
> 
> set(ukmorad_SRCS
>   ${ukmorad_main_SRCS}
>   ${ukmorad_ses_setup_SRCS}
>   ${ukmorad_common_SRCS}
(Continue reading)

Maik Beckmann | 3 Jan 2009 17:24

Re: Does cmake support fortran lang with F extension?

谢歆 schrieb am Samstag 03 Januar 2009 um 16:22:
> hi,
>
> I decide to use cmake for an old FORTAN program what consists a lot of
> F extension source code and wrote a simple CMakelists.txt.
> Hoever, the default setting did not seem to support F extension.

CMake support the F extension.

>
> And when I cmake, I got this error information:
[snip]
> You have called ADD_LIBRARY for library ukmoradlib without any
> source files. This typically indicates a problem with your CMakeLists.txt
> file
> -- Configuring done
> CMake Error: Cannot determine link language for target "ukmoradlib".
[snip]

The point is: 
"You have called ADD_LIBRARY for library ukmoradlib without any source files. 
This typically indicates a problem with your CMakeLists.txt file"

Your script above does
{{{
add_library(ukmoradlib STATIC ${ukmorad_SRCS})
..
set(ukmorad_SRCS
  ${ukmorad_main_SRCS}
  ${ukmorad_ses_setup_SRCS}
(Continue reading)

Tron Thomas | 3 Jan 2009 19:49
Picon

Mac OS X framework bundles don't end up in the specified build directory

I want to use CMake to configure a project so that all programs and  
libraries are built into the same directory.  So for a debug build of  
the project the directory might be something like ProjectName/build/ 
Debug.

This works fine for most targets.  However built Mac OS X framework  
bundles do not end up in this directory.  They end up in a  
subdirectory depending on where they were configured in the source code.

For example, if a framework was configured in ${CMAKE_SOURCE_DIR}/ 
ParentDirectory/FrameworkDirectory, the built framework will end up in  
ProjectName/build/ParentDirectory/FrameworkDirectory/Debug.

It is not at all clear frameworks bundles are treated this way and  
will end up in different location from all other built targets.

What can be done to place framework bundles in their desired location?
kafou nmento | 3 Jan 2009 23:48
Picon
Favicon

Release mode compilation

Hi all!
I'm wondering the way to build a simple project in release mode with CMake. All my trials lead to a debug build.
And the way to build a Qt app in release please.
 
Please, it is urgent for my boss.
 
Thanks to all in advance.

_______________________________________________
CMake mailing list
CMake@...
http://www.cmake.org/mailman/listinfo/cmake
Eric Noulard | 4 Jan 2009 00:34
Picon

Re: Release mode compilation

2009/1/3 kafou nmento <ngondorolf@...>:
> Hi all!
> I'm wondering the way to build a simple project in release mode with CMake.

SET(CMAKE_BUILD_TYPE "Release")

You may do it using CMake GUI or command line.

> All my trials lead to a debug build.

Did you search for this issue?
A somehow "blind" search for "release build with cmake"
gives me at least 2 valuable link in the first 4.

> And the way to build a Qt app in release please.

I don't know for that, Qt usage with cmake should follow the
CMAKE_BUILD_TYPE too.

> Please, it is urgent for my boss.

Personnally I think it's not a good reason for asking for
*free* answer to a visibly *paid* job.

Many people listening and answering the list are volunteer
you cannot ask for "business" urgency.

If you want to do so, I suggest you pay a CMake expert support.

--

-- 
Erk
Wilfried Holzke | 4 Jan 2009 22:14

install a demo program only if requestet

Hi,

How would I install a demo program only if the user requests this?
For example a feature from the "GNU build tools" like:

./configure --with-demo

thanks for help

regards

  W. Holzke
Werner Smekal | 4 Jan 2009 22:17
Picon
Favicon
Gravatar

Re: install a demo program only if requestet

Hi,

cmake -DWITH_DEMO=ON srcdir

in CMakeLists.txt:

if(WITH_DEMO)
    install( demo ....)
endif(WITH_DEMO)

HTH,
Werner

Wilfried Holzke wrote:
> Hi,
>
> How would I install a demo program only if the user requests this?
> For example a feature from the "GNU build tools" like:
>
> ./configure --with-demo
>
> thanks for help
>
> regards
>
>   W. Holzke
> _______________________________________________
> CMake mailing list
> CMake@...
> http://www.cmake.org/mailman/listinfo/cmake
>   

--

-- 
Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria
DVR-Nr: 0005886

email: smekal@...
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
       +43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499
Jeffrey Drake | 5 Jan 2009 06:32
Picon
Favicon

Unit Testing


I have been trying to figure out the easiest way to setup unit tests. I
have seen a unit testing framework called 'check' (some
documentation:
http://check.sourceforge.net/doc/check.html/Setting-Up-the-Money-Build.html#Setting-Up-the-Money-Build
) but the problem seems to be that its examples are all with automake. 

So what is the easiest way of doing automated unit tests with CMake? I
have looked at CTest, but I am not understanding it very well either. I
would need a very basic example to see how it works.

Any help is appreciated.
Jeff.

Gmane