Re: [CMake] Release mode compilation

2009-01-03 Thread Eric Noulard
2009/1/3 kafou nmento :
> 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
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Release mode compilation

2009-01-03 Thread kafou nmento
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@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

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

2009-01-03 Thread Tron Thomas
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?

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Does cmake support fortran lang with F extension?

2009-01-03 Thread Maik Beckmann
谢歆 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}
  ${ukmorad_common_SRCS} 
  ${ukmorad_ses_flux_calc_SRCS
)
set(ukmorad_main_SRCS ..
}}}

This results in ${ukmorad_SRCS} being nothing when evaluated in:
add_library(ukmoradlib STATIC ${ukmorad_SRCS})

You have to set the variables _before_ you use them:
{{{
set(ukmorad_main_SRCS ..
..
set(ukmorad_SRCS
  ${ukmorad_main_SRCS}
  ${ukmorad_ses_setup_SRCS}
  ${ukmorad_common_SRCS} 
  ${ukmorad_ses_flux_calc_SRCS}
)
add_library(ukmoradlib STATIC ${ukmorad_SRCS})
}}}


> I have both Intel and PGI compilers in my computer. Cmake did find
> intel compiler. But my question is how I can change the
> cmake setting so that I can use PGI compiler?

set the FC environment variable.

HTH,
 -- Maik

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Does cmake support fortran lang with F extension?

2009-01-03 Thread Bill Hoffman

谢歆 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}
  ${ukmorad_ses_flux_calc_SRCS}



-Bill
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Does cmake support fortran lang with F extension?

2009-01-03 Thread 谢歆
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
  radctl_ukmo.F
  ses_lwdrv.F
  ses_setup.F
  ses_swdrv.F
)

set(ukmorad_ses_setup_SRCS
  ses_setup/ses_t_level.F
  ses_setup/ses_inter_pt.F
  ses_setup/ses_qsat_gill.F
  ses_setup/ses_calc_density.F
  ses_setup/ses_cld_point.F
  ses_setup/ses_volc_interp.F
  ses_setup/ses_ovlap_mix_max.F
  ses_setup/ses_aer_interp.F
  ses_setup/ses_ovlap_mix_ran.F
  ses_setup/ses_gen_aer_fields.F
  ses_setup/ses_moist_aerosol.F
)

set(ukmorad_common_SRCS
  common/ses_cld_geometry.F
  common/ses_whenflt.F
  common/ses_whenfle.F
  common/compj.F
  common/ses_locate.F
  common/ses_whenfgt.F
)

set(ukmorad_ses_flux_calc_SRCS
  ses_flux_calc/ses_assign_flux.F
  ses_flux_calc/ses_agu_flux_sw.F
  ses_flux_calc/ses_sur_prop.F
  ses_flux_calc/ses_total_flux.F
...
... more fortran source code
...
)
...
...
...
-

And when I cmake, I got this error information:

-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- The Fortran compiler identification is Intel
-- Check for working Fortran compiler: /opt/intel/fc/10.1.018/bin/ifort
-- Check for working Fortran compiler: /opt/intel/fc/10.1.018/bin/ifort -- works
-- Checking whether /opt/intel/fc/10.1.018/bin/ifort supports Fortran 90
-- Checking whether /opt/intel/fc/10.1.018/bin/ifort supports Fortran 90 -- yes
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".
-- Generating done
-- Build files have been written to: /home/xiexin/modeltest/testukmo

I have both Intel and PGI compilers in my computer. Cmake did find
intel compiler. But my question is how I can change the
cmake setting so that I can use PGI compiler?

Can anyone give a solution? Thank you very much!

Xie Xin
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake