[CMake] Automate cleaning after CMAKE_DISABLE_IN_SOURCE_BUILD

2012-07-16 Thread Ateljevich, Eli
Hi everyone, My CMakeLists.txt uses the undocumented features: set(CMAKE_DISABLE_SOURCE_CHANGES ON) set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) The first one prevents in-source builds as expected (even in 2.6, which I wasn't expecting). I find this very useful. I'm not sure about the second one.

[CMake] Paired values in an iterable data structure like map or tuple

2012-07-13 Thread Ateljevich, Eli
Hi, I have a series of tests I would like to perform, some of which are serial and some of which are mpi and should use np processors. I would further prefer to be able to process this as a list of paired values. The following is nothing but pseudocode, but it attempts to convey the idea. The

[CMake] anyone get create_test_sourcelist to work with fortran?

2012-07-11 Thread Ateljevich, Eli
Hi, I attempted to use create_test_sourcelist with a Fortran routines using the recipe from the cmake book. The CMakeLists.txt and fortran file are given below. The test *.cpp file is generated correctly, but the linker gives me this: cd /home/eli/work/selfe_trunk/build/unittest/Hydro

[CMake] Running ctest tests from the test source directory

2012-07-10 Thread Ateljevich, Eli
Hi all, I am doing an out-of-source build in a directory called /build. I have a test directory /examples that has some input to be run with the projects main driver: /proj /build /bin driver.exe /example1 /example2 /example /example1 ...some files

Re: [CMake] Running ctest tests from the test source directory

2012-07-10 Thread Ateljevich, Eli
Thanks. Embarrassed, but happy. -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Rolf Eike Beer Sent: Monday, July 09, 2012 11:52 PM To: cmake@cmake.org Subject: Re: [CMake] Running ctest tests from the test source directory Ateljevich, Eli

[CMake] CMAKE_RUNTIME_OUTPUT_DIRECTORY cannot be overridden?

2012-07-10 Thread Ateljevich, Eli
My expectation from the documentation was that runtime output directories are initialized to CMAKE_RUNTIME_OUTPUT_DIRECTORY, but I took that to mean they could be overridden. In the code below I attempt to set the RUNTIME_OUTPUT_DIRECTORY property to ${CMAKE_CURRENT_BINARY_DIR} for some

[CMake] How can I mimic a second CMAKE_RUNTIME_OUTPUT_DIRECTORY for the tests?

2012-07-09 Thread Ateljevich, Eli
My source and tests are stored separately in a quasi-parallel arrangement: /proj /build /bin # CMAKE_RUNTIME_OUTPUT_DIRECTORY /mod1 # Build directory /mod2 /test /mod1 /mod2 /src # source /mod1 /mod2 /test #

[CMake] Identifying whether NetCDF is one library or several

2012-07-06 Thread Ateljevich, Eli
Hi - A couple years ago, the NetCDF crew separated out their Fortran library, producing netcdf for the C API and the Fortran netcdff with an extra f. At one point in the history the number of libraries was an option, so that a given version could be built either way. The problem for me is that

[CMake] cmake 2.6 and 2.8 find different fortran compilers with MPI?

2012-07-02 Thread Ateljevich, Eli
Hi, I wonder if anyone can help me get a consistent Fortran build out of 2.6 and 2.8.8. I am using CMake 2.6 and 2.8, trying to come up with a compatible build. I had to rob some items from 2.8 to find things like MPI correctly and I have set the policies such that I believe they both use the

Re: [CMake] cmake 2.6 and 2.8 find different fortran compilers with MPI?

2012-07-02 Thread Ateljevich, Eli
Thanks Tim. We do have the module system set up including the compiler, so I’ll make sure it defines FC. From: Tim Gallagher [mailto:tim.gallag...@gatech.edu] Sent: Monday, July 02, 2012 2:59 PM To: Ateljevich, Eli Cc: CMake List Subject: Re: [CMake] cmake 2.6 and 2.8 find different fortran

Re: [CMake] Using the -C option to cmake

2012-06-29 Thread Ateljevich, Eli
The mechanics of this are not due to -C but scope issues. I would not advocate overstepping the defined behavior of -C, but learning the reasons why your function did not work was informative for me as a new user. The -C option and init-cache act the way they do because of the way SET works

[CMake] Cache dumping utility to create a -C initial cache?

2012-06-29 Thread Ateljevich, Eli
Hi everyone, One difficulty I tend to have backing up my cache is that it is long and not in the same format as initial-cache, a point I raised in a previous post. When blowing away the cache and reconfiguring it is not convenient to back up what is lost and do a round-trip back to cmake. One

Re: [CMake] cache behaviour

2012-06-27 Thread Ateljevich, Eli
Hello Eric, I am a relative beginner with cmake, but I have done a lot of experimenting to try to figure out the relative precedence of things with the cache. At the very least I will bump your topic and get a real answer. On my setup (2.6), the -D option seems to trump other initialization.

Re: [CMake] Using MPI and non-MPI compiler in the same cmake project?

2012-06-26 Thread Ateljevich, Eli
Thanks, Tim, This is very clear and complete and makes sense. Don't change the compiler. Do: find_package(MPI REQUIRED) add_definitions(${MPI_Fortran_COMPILE_FLAGS}) include_directories(${MPI_Fortran_INCLUDE_DIRS}) link_directories(${MPI_Fortran_LIBRARY_DIRS})

Re: [CMake] Python version specification in FindPythonInterp is ignored

2012-06-26 Thread Ateljevich, Eli
From: Andreas Pakulat [ap...@gmx.de] Sent: Monday, June 25, 2012 2:35 PM To: Ateljevich, Eli Cc: cmake@cmake.org Subject: Re: [CMake] Python version specification in FindPythonInterp is ignored Hi, On Mon, Jun 25, 2012 at 11:20 PM, Ateljevich, Eli e

[CMake] User vs Project vs Cmake vs Target flags; CMAKE_USER_MAKE_RULES_OVERRIDE vs -C

2012-06-26 Thread Ateljevich, Eli
I know this is a kind of a big scope for a question, but it shadows a lot of customization issues I have seen in many other topics. To recap an earlier posting, I mentioned that I wanted to allow the user to add some custom definitions in a more persistent way than the cache. Ben Morgan

Re: [CMake] Python version specification in FindPythonInterp is ignored

2012-06-26 Thread Ateljevich, Eli
This would be great, at least it would improve my experience in two ways: 1) it would make sure that the library and interpreter are compatible and 2) it would make the library automatically locatable. I agree I can use CMAKE_PREFIX_PATH to solve my immediate problem, though.

Re: [CMake] FindHDF5.cmake configuration -- finds regular, can't find HL

2012-06-25 Thread Ateljevich, Eli
. To really fix this right, we would need to change the logic to search all the components. From: Tim Gallagher [mailto:tim.gallag...@gatech.edu] Sent: Saturday, June 23, 2012 1:00 PM To: Ateljevich, Eli Cc: cmake@cmake.org Subject: Re: [CMake] FindHDF5.cmake configuration -- finds regular, can't find

[CMake] Python version specification in FindPythonInterp is ignored

2012-06-25 Thread Ateljevich, Eli
Hi, I am working with cmake 2.6 but have grabbed FindPythonInterp.cmake and its dependencies from 2.8.8. From what I can tell, this version is touted as having resolved most issues with specifying the python version. Our OS has a python 2.4 called python installed in /usr/bin. There is another

Re: [CMake] Python version specification in FindPythonInterp is ignored

2012-06-25 Thread Ateljevich, Eli
give to help it find the version I want? I am on linux, by the way. Most of what I see there seems to be for Windows. Any clues? Eli From: Ateljevich, Eli Sent: Monday, June 25, 2012 1:54 PM To: Ateljevich, Eli; cmake@cmake.org Subject: RE: Python version specification in FindPythonInterp

[CMake] Using MPI and non-MPI compiler in the same cmake project?

2012-06-25 Thread Ateljevich, Eli
Hi all, My project is mostly built with Fortran that uses mpif90 as a wrapper. I use find_package(MPI REQUIRED) to locate f90mpi and then change set the CMAKE_Fortran_COMPILER to ${MPI_Fortran_COMPILER}. This seemed to work fine until started wrapping up some utilities that do not need to be

[CMake] FindHDF5.cmake configuration -- finds regular, can't find HL

2012-06-23 Thread Ateljevich, Eli
Hi all, I am supporting cmake version 2.6. I have included the latest FindHDF5.cmake file I could find in my distro ... except for one dependency that needed to be added, this seems to work fine. When I try to find_package(HDF5 COMPONENTS ... ) it works for the C (and Fortran) component but

Re: [CMake] Text user configuration (features, flags) that is more persistent than cache?

2012-06-22 Thread Ateljevich, Eli
than cache? Hi Eli, On 21 June 2012 21:25, Ateljevich, Eli e...@water.ca.govmailto:e...@water.ca.gov wrote: Hi, I was wondering if there is a best practice for providing a file for user configuration decisions (options, unique flags) that will be more persistent than the cache? I have

[CMake] local and system installs that include python and shell scripts

2012-06-22 Thread Ateljevich, Eli
Hi again, My project is set up so that the compiled targets naturally get output to a structure that looks like a development mode installation: /myproj /build /bin /lib /include This is convenient for some users ... it is the sort of code people tinker with, and I think a

[CMake] Text user configuration (features, flags) that is more persistent than cache?

2012-06-21 Thread Ateljevich, Eli
Hi, I was wondering if there is a best practice for providing a file for user configuration decisions (options, unique flags) that will be more persistent than the cache? I have a project where a dozen or two algorithmic decisions have to be made. I find that this is just enough that cache

Re: [CMake] Include directory issue ... -I are not separated?

2012-06-21 Thread Ateljevich, Eli
to getting the project up and running. Eli -Original Message- From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Wednesday, June 20, 2012 11:36 PM To: Ateljevich, Eli Cc: cmake@cmake.org Subject: Re: [CMake] Include directory issue ... -I are not separated? 2012/6/21 Ateljevich, Eli

Re: [CMake] Include directory issue ... -I are not separated?

2012-06-20 Thread Ateljevich, Eli
recommend? Where does the reference to Hydro even come from? Thanks! -Original Message- From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Tuesday, June 19, 2012 10:57 PM To: Ateljevich, Eli Cc: cmake@cmake.org Subject: Re: [CMake] Include directory issue ... -I are not separated

Re: [CMake] Include directory issue ... -I are not separated?

2012-06-20 Thread Ateljevich, Eli
! -Original Message- From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Tuesday, June 19, 2012 10:57 PM To: Ateljevich, Eli Cc: cmake@cmake.org Subject: Re: [CMake] Include directory issue ... -I are not separated? 2012/6/20 Ateljevich, Eli e...@water.ca.gov: Hi everone. I am getting

Re: [CMake] Include directory issue ... -I are not separated?

2012-06-20 Thread Ateljevich, Eli
/include -c /home/eli/work/selfe_cmake/src/Hydro/sflux_9c.F90 -Original Message- From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Wednesday, June 20, 2012 9:58 AM To: Ateljevich, Eli Cc: cmake@cmake.org Subject: Re: [CMake] Include directory issue ... -I are not separated

Re: [CMake] Include directory issue ... -I are not separated?

2012-06-20 Thread Ateljevich, Eli
as-is, but when I put in environment variables the project build path is being prepended to it. Can I disable this? Thanks, Eli -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Ateljevich, Eli Sent: Wednesday, June 20, 2012 11:06 AM To: Eric Noulard

Re: [CMake] Include directory issue ... -I are not separated?

2012-06-20 Thread Ateljevich, Eli
-Original Message- From: Ateljevich, Eli Sent: Wednesday, June 20, 2012 3:05 PM To: Ateljevich, Eli; Eric Noulard Cc: cmake@cmake.org Subject: RE: [CMake] Include directory issue ... -I are not separated? Eric I have improved my envvar usage a bit further, I hope, by saying include_directories

[CMake] Include directory issue ... -I are not separated?

2012-06-19 Thread Ateljevich, Eli
Hi everone. I am getting a funny include flag and I wonder if anyone can help. The project is in Fortran (though I don't think this matters) and the structure can be distilled to: /myproj /build /src /Hydro I do the build in /build in linux using cmake -DCMAKE_Fortran_COMPILER