Re: [CMake] ctest, valgrind callgrind

2011-11-10 Thread Kelly Thompson
Arnaud,

I use valgrind with options using something like this:

  set( CTEST_MEMORYCHECK_COMMAND valgrind )
  set( CTEST_MEMORYCHECK_COMMAND_OPTIONS --tool=callgrind -v )

Let us know if that works.

-kt



 -Original Message-
 From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf
Of
 Arnaud Gelas
 Sent: Thursday, November 10, 2011 2:11 PM
 To: cmake@cmake.org
 Subject: [CMake] ctest, valgrind  callgrind
 
 Hi all,
 
 I am trying to use callgrind with ctest to profile some component of a
 project.
 
 I have tried replacing
 
  MEMORYCHECK_COMMAND/usr/bin/valgrind
 
 by
 
  MEMORYCHECK_COMMAND/usr/bin/valgrind --tool=callgrind -v
 
 
 When I run ctest -D ExperimentalMemCheck with the first configuration it
 works fine, when I try with the second one, I get:
 
 $ ctest -D ExperimentalMemCheck -R LevelSetsv4 -j12
 Site: snapper
 Build name: Linux-c++
 Memory check project /home/ajg23/GITROOT/BUILDITK
 Memory checker (MemoryCheckCommand) not set, or cannot find the
 specified program.
 Errors while running CTest
 
 I assume it'd work...
 
 Can someone explain to me why I get this message? one work around? or
 what would the right way to proceed?
 
 Thanks,
 Arnaud
 
 --
 
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] underscore mangling with blas and cmake

2011-10-24 Thread Kelly Thompson
Jack,

 

1. As Michael mentioned - ensure that you are linking to the BLAS
library:

 

find_package(BLAS REQUIRED)

add_executable( foo ${sources} )

target_link_library( foo ${BLAS_LIBRARIES} )

 

2. FYI - For the Makefile Generator, the object files are usually stored
in a subdirectory named 'CMakeFiles/target_name.dir'   You can run nm on
these *.o files to examine the name mangling.  When calling BLAS routines, I
normally need to append an underscore to the call from C++.

 

3. Eventually, you may want to consider using the
FortranCInterface.cmake module to determine the current name mangling
system.  You can use this information along with CPP macros to ensure that
your code ports to other compilers/platforms.

 

-kt

 

 

From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of
Jack Chessa
Sent: Sunday, October 23, 2011 9:25 PM
To: cmake@cmake.org
Subject: [CMake] underscore mangling with blas and cmake

 

I am new to cmake and have a question that I hope has a simple answer.  I am
building a simple C++ program that uses blas scopy.  I am using

 

find_package(BLAS REQUIRED)

 

to find blas on the system (OSX in this case), and the cmake step seems to
find it, but when I go to the make step I get the 

Undefined symbols:

  _scopy_, referenced from:

  _main in blas_ex.cpp.o

 

I usually can fix this with the -fleading-underscore or
-fnoleading-underscore or -Dadd_... but I am not really sure what is going
on in the cmake build or the Makefile that cmake creates.  I don't see any
.o files to nm on either.  So my question is what is the best way to deal
with underscore issues in cmake?  Does anyone have a simple example for
using cmake to build a c++ program with blas or lapack.

 

Thanks

 

Jack Chessa

Associate Professor

Department of Mechanical Engineering

University of Texas at El Paso

Email:jfche...@utep.edu

Office:A309

Voice: (915) 747-6900

Fax:(915) 747-5019

Web:   http://utminers.utep.edu/jfchessa/index.html

 

 

 

 

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] How to run tests in parallel?

2011-06-15 Thread Kelly Thompson
Dave,

I usually run 'ctest -j4' because it is easier to type than 'make test
ARGS=j4'.  

I think that 'make test ARGS=j4' will simply call ctest with '-j4' so the
commands should be equivalent.

-kt

 -Original Message-
 From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf
Of
 Dave Ohlsson
 Sent: Wednesday, June 15, 2011 6:01 AM
 To: cmake@cmake.org
 Subject: Re: [CMake] How to run tests in parallel?
 
 Just found the answer:
 
 make test ARGS=-j4
 
 Sorry for the spam...
 
 -- dave
 
 On Wed, Jun 15, 2011 at 2:55 PM, Dave Ohlsson dave.ohls...@gmail.com
 wrote:
  Hi,
 
  I am new to CMake.
 
  I have a project with a few tests. The tests are independent from each
  other (run in separate directories, etc.).
 
  In my project's CMakeLists.txt, I have:
 
     enable_testing()
     add_test(NAME test1 COMMAND some command 1)
     add_test(NAME test2 COMMAND some command 2)
     add_test(NAME test3 COMMAND some command 3)
 
  I can run the tests with this command (from the build directory):
 
     make test
 
  This command runs all the tests SERIALLY, and they all pass.
 
  Now, how could I run the tests IN PARALLEL?
 
  I tried this:
 
     make -j4 test
 
  and that:
 
     make -j 4 test
 
  but the tests are run serially also with these commands.
 
  Note that `make -j 4' builds the objects (.o files) in parallel
  without problems. I have this problem only with tests.
 
  I suppose I am missing something very obvious.
 
  I use Linux.
 
  -- dave
 ___
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] parallel ctest spawning too many threads

2011-04-21 Thread Kelly Thompson
David,

 

The project is not publicly available (sorry - nothing I can do about that).
This is also the reason I made fictitious test names.  I'm trying to
reproduce the issue by creating a standalone project that I can
redistribute.   Once that is done, I will post it.  

 

% ctest --version

ctest version 2.8.4

 

-kt

 

From: David Cole [mailto:david.c...@kitware.com] 
Sent: Thursday, April 21, 2011 6:34 AM
To: k...@lanl.gov
Cc: cmake@cmake.org
Subject: Re: [CMake] parallel ctest spawning too many threads

 

This is the first I've ever heard of it...

Cool bug!
  (that was just a wee bit of sarcasm accompanied by a wry smile...)

What version of ctest?

Is this a project that is publicly available, so that I can try to reproduce
it here and help these innocent coders...?


Thanks,
David



On Wed, Apr 20, 2011 at 6:35 PM, Kelly Thompson k...@lanl.gov wrote:

Fellow CMake users:

I'm having a problem with one of my projects when I run 'ctest -jN'.  The
problem is that after 70-90 tests, ctest decides to submit all of the
remaining tests at once (~200 tests worth).  For example (actual test names
replaced to protect the innocent :-)

% ctest -j16
Test project /var/tmp/foo
   Start 192: testA_2
   Start 191: testB_4
   Start 190: testC_3
   Start 189: testD_2
   Start 188: testE_4
 1/279 Test #189: testD_2 .   Passed
1.81 sec
   Start 187: testF_3
 2/279 Test #192: testA_2 .   Passed
2.98 sec
 3/279 Test #191: testB_4 .   Passed
2.81 sec
   Start 186: testG_2
   Start 185: testH_4
 4/279 Test #188: testE_4 .   Passed
2.81 sec
 5/279 Test #190: testC_3 .   Passed
2.92 sec
   Start 184: testI_3
   Start 183: testJ_2
 6/279 Test #187: testF_3 .   Passed
2.02 sec
   Start 182: testK_4
 7/279 Test #186: testG_2 .   Passed
2.44 sec

...

 82/279 Test #249: testZA_2    Passed
8.46 sec
 83/279 Test #245: testZB_2    Passed
3.12 sec
   Start 278: testZC_4
 84/279 Test #278: testZC_4    Passed
4.27 sec
   Start 266: testZD_4
   Start 263: testZE_4
   Start 275: testZF_4
   Start 270: testZG_4
   Start 269: testZH_4

# ...about 190 tests started all at the same time.

   Start  89: testZZA_1
   Start  88: testZZB_1
^C

These tests are running under mpirun (trailing number indicates number of
cores needed for the test) and so the total load on my machine jumps to
about 400!

My tests are registered using commands similar to this:

   add_test(
  NAMEtestA_4
  COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4
  ${MPIEXEC_POSTFLAGS}
  $TARGET_FILE:Ut_testA_4_exe
  )
   set_tests_properties( testA_4
  PROPERTIES PROCESSORS 4 )

Has anyone seen this 'many threads spawning' behavior for ctest (I couldn't
find anything in the bug tracker).  Is there a known resolution?



___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] parallel ctest spawning too many threads

2011-04-20 Thread Kelly Thompson
Fellow CMake users:

I'm having a problem with one of my projects when I run 'ctest -jN'.  The
problem is that after 70-90 tests, ctest decides to submit all of the
remaining tests at once (~200 tests worth).  For example (actual test names
replaced to protect the innocent :-)

% ctest -j16
Test project /var/tmp/foo
Start 192: testA_2
Start 191: testB_4
Start 190: testC_3
Start 189: testD_2
Start 188: testE_4
  1/279 Test #189: testD_2 .   Passed
1.81 sec
Start 187: testF_3
  2/279 Test #192: testA_2 .   Passed
2.98 sec
  3/279 Test #191: testB_4 .   Passed
2.81 sec
Start 186: testG_2
Start 185: testH_4
  4/279 Test #188: testE_4 .   Passed
2.81 sec
  5/279 Test #190: testC_3 .   Passed
2.92 sec
Start 184: testI_3
Start 183: testJ_2
  6/279 Test #187: testF_3 .   Passed
2.02 sec
Start 182: testK_4
  7/279 Test #186: testG_2 .   Passed
2.44 sec

...

 82/279 Test #249: testZA_2    Passed
8.46 sec
 83/279 Test #245: testZB_2    Passed
3.12 sec
Start 278: testZC_4
 84/279 Test #278: testZC_4    Passed
4.27 sec
Start 266: testZD_4
Start 263: testZE_4
Start 275: testZF_4
Start 270: testZG_4
Start 269: testZH_4

# ...about 190 tests started all at the same time.

Start  89: testZZA_1
Start  88: testZZB_1
^C

These tests are running under mpirun (trailing number indicates number of
cores needed for the test) and so the total load on my machine jumps to
about 400!

My tests are registered using commands similar to this:

add_test( 
   NAMEtestA_4
   COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4
   ${MPIEXEC_POSTFLAGS}
   $TARGET_FILE:Ut_testA_4_exe 
   )
set_tests_properties( testA_4
   PROPERTIES PROCESSORS 4 )

Has anyone seen this 'many threads spawning' behavior for ctest (I couldn't
find anything in the bug tracker).  Is there a known resolution?

Thank you,

-kt
-
Kelly (KT) Thompson
k...@lanl.gov
505.665.8090

Los Alamos National Laboratory
CCS-2, MS D409, TA-3/B-422/R-101


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Strange 2.8.4 memcheck result on CDash

2011-02-22 Thread Kelly Thompson
Allen,

 

We experienced something similar.  Unfortunately, I never diagnosed the
actual problem because I assumed that my ctest scripts were simply
out-of-date and I replaced them.  In particular, the ctest scripts that
produced broken memcheck output were trying to use the 'ctest
-DNightlyMemCheck' dashboard mode.  In my case, the log files had all of the
valgrind information, but the xml files were missing the valgrind output.

 

I replaced my ctest scripts with ones downloaded from the CTest Template
Script from our Dashboard's Client tab.  These new scripts use the
ctest_start(), ctest_configure(), ., ctest_memcheck(), etc. commands.  This
change (and possibly some new variables being set) appears to have fixed our
issues with valgrind output not showing up in the dashboard.

 

-kt

 

From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of
Allen D Byrne
Sent: Tuesday, February 22, 2011 7:48 AM
To: cmake@cmake.org
Subject: [CMake] Strange 2.8.4 memcheck result on CDash

 

The question is: Has anyone experienced problems with Dynamic Analysis
reports on CDash with the new cmake 2.8.4?

Our execution seemed to have produced the correct logs, yet on CDash the
report is 0 (ZERO). Looking at the output of the test it just shows one long
line of characters (no words) which seem like an encoded message? The only
change was a switch from 2.8.2 to 2.8.4. BTW, this was from a linux machine
using Valgrind.

Allen

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] How to list user-definable CMake variables

2010-09-28 Thread Kelly Thompson
Marcel,

We use a 'bootstrap' CMakeCache.txt file that has README-like full
documentation for each user settable variable.  This way a new developer can
copy the bootstrap CMakeCache.txt file to his/her build directory and edit
the file variable-by-variable before running cmake.

Something like:

# CMakeCache.txt - bootstrap file for new builds.

# Instructions.
# 1. Copy this file to your build directory as CMakeCache.txt.
# 2. Review and update all values in this file.
# 3. Environment must have $FC set to one of { ifort, gfortran or pathf90 }
# 4. From the build directory run 'cmake /full/path/to/source'

# Location where 'make install' will copy files to.
CMAKE_INSTALL_PREFIX:PATH=/full/path/to/target/directory

# CMAKE_BUILD_TYPE == { Release, Debug, RelWithDebInfo, MinSizeRel }
CMAKE_BUILD_TYPE:STRING=Release

# CMAKE_GENERATOR == { NMake Makefiles, Unix Makefiles, Visual Studio 9
2008, Visual Studio 9 2008 Win64 }
CMAKE_GENERATOR:STRING=Unix Makefiles

etc.

Maybe that is too clunky for you -- but has worked well for us.

-kt

 -Original Message-
 From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf
Of
 Eric Noulard
 Sent: Tuesday, September 28, 2010 3:12 AM
 To: Marcel Loose
 Cc: cmake@cmake.org; them...@gmail.com
 Subject: Re: [CMake] How to list user-definable CMake variables
 
 2010/9/28 Marcel Loose lo...@astron.nl:
 
  You may want to call your target help but it would conflict/override
  the cmake builtin help target
  (at least for makefile generator) which display the list of available
  target.
 
  This work AFTER cmake has been run. It could be run before as well
  using:
 
  cmake -DCMAKE_MODULE_PATH=/path/to/source --help-module HelpMe
 
  but this is awkward :-(
 
  Thanks Erk,
 
  I'll give it a thought. Your solution uses some nice CMake features, but
  I find it a bit awkward. It suffers from separation of code and
  documentation, though. That's always risky, since the two are likely to
  diverge.
 
 It is a little bit, but you can put in this custom cmake file
 (you may rename it to CustomizableOptions.cmake)
 any CMake *code* you want including the definition of OPTION or vars
 (using SET) etc...
 
 then in you CMakeLists.txt you can
 
 include(CustomizableOptions.cmake)
 
 and the header of the file contains the useful doc. for the
 concerned option/vars.
 
 then the code and it's doc stay together.
 
 
 
 
 --
 Erk
 Membre de l'April - « promouvoir et défendre le logiciel libre » -
 http://www.april.org
 ___
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] add_test and $(Configuration) with Visual Studio Generator

2010-07-21 Thread Kelly Thompson
Thanks Mike!

That work like a charm.   I'm not sure why I overlooked that portion of the
user manual.  Thanks for being patient.

-kt

 -Original Message-
 From: Michael Wild [mailto:them...@gmail.com]
 Sent: Tuesday, July 20, 2010 2:00 PM
 To: Kelly Thompson
 Cc: cmake@cmake.org
 Subject: Re: [CMake] add_test and $(Configuration) with Visual Studio
 Generator
 
 On 20. Jul, 2010, at 21:39 , Kelly Thompson wrote:
 
  Hi,
 
 
 
  I am having trouble with add_test and the MSVC macro $(Configuration)
when
 I
  generate project files for Visual Studio.  I am hoping someone on this
 list
  can provide a solution.
 
 
 
  Scenario:  (This is an outline of what I want to do.)
 
 
 
  1. Ceating a unit test via 'add_executable(unittest unittest.cc)'.
 
  2. Add a the test so that it runs under a script that takes the unit
  test's fully qualified path as an argument.  That is, I use 'add_test(
  myunittest c:\bin\mytestscript ${path_to_unittest}/unittest.exe )'
 
 
 
  So the question is: how do I define ${path_to_unittest}.  I was trying
to
  use 'get_target_property( unittest_loc unitttest LOCATION ),' but this
  provides a path that contains the Visual Studio Macro $(Configuration)
 which
  is not converted into 'Debug/Release/.' when I run the unit tests inside
 of
  visual studio.  Instead I get an error about the path not being found
 (i.e:
  'c:\myproj\test\$(Configuration)\unittest.exe not found').
 
 
 
 See http://cmake.org/cmake/help/cmake-2-8-docs.html#command:add_test.
 
 add_test(NAME myunittest COMMAND c:/bin/mytestscript
 $TARGET_FILE:unittest)
 
 should hopefully do what you need.
 
 
 
 
  Does anyone have an example of how to use add_test in the way that I am
  trying to use it?  I suppose I could create a custom command that runs a
  build time and does a find_file(.) but I think there must be a better
way.
 
 
 
  Thanks in advance,
 
 
 
  -kt
 
 Michael

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cmake generators on windows: nmake versus jom

2010-07-21 Thread Kelly Thompson
Hi Arjen,

 

This may be totally the wrong direction, but we have seen similar errors
that appear to be caused by resident programs that crawl the local
filesystem.  Desktop search engines (Microsoft or Google) or anti-virus
software may try to open your build files (including temporary files) for
indexing and have the side effect of locking CMake out.  You might try
disabling your antivirus or desktop search tools while running CMake.

 

-kt

 

From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of
Verweij, Arjen
Sent: Wednesday, July 21, 2010 8:32 AM
To: cmake@cmake.org
Subject: [CMake] cmake generators on windows: nmake versus jom

 

Hi,

 

I'm having trouble generating the Makefiles I want on Windows. I can't
generate Unix Makefiles because cmake fails to compile a simple program.
But also using generators that should be very much alike, NMake Makefiles
and NMake Makefiles JOM, the first will finish and the second will not.
This is on a fresh install (Virtual machine) with Ifort 8.1, MSVC++ 7.1 and
cmake 2.8.2, no specials.

 

Is it normal for generators to be this picky? Is there documentation on this
subject? While browsing email archives I've read that cmake assumes your
compiler works but I guess there's more going on under the hood than a mere
compilation check.

 

Thanks,

Arjen

 

 

NMake Makefiles:

-- Windows!

-- FLEXLM=Z:/projects/nastia_src/src/ext/flexlm/v11.6.1

-- ALSDK=Z:/projects/nastia_src/src/ext/alsdk/v10.0.0

-- FLEXLMARCH=i86_n3

-- The Fortran compiler identification is Intel

-- FIXME: altered Windows.cmake for debugging purposes.

-- Check for working Fortran compiler: E:/Program
Files/Intel/Fortran/compiler80/IA32/BIN/ifort.exe

-- Check for working Fortran compiler: E:/Program
Files/Intel/Fortran/compiler80/IA32/BIN/ifort.exe  -- works

-- Detecting Fortran compiler ABI info

-- Detecting Fortran compiler ABI info - done

-- Checking whether E:/Program
Files/Intel/Fortran/compiler80/IA32/BIN/ifort.exe supports Fortran 90

-- Checking whether E:/Program
Files/Intel/Fortran/compiler80/IA32/BIN/ifort.exe supports Fortran 90 -- yes

-- The C compiler identification is MSVC

-- Check for CL compiler version

-- Check for CL compiler version - 1310

-- Check if this is a free VC compiler

-- Check if this is a free VC compiler - no

-- Check for working C compiler: E:/Program Files/Microsoft Visual Studio
.NET 2003/Vc7/bin/cl.exe

-- Check for working C compiler: E:/Program Files/Microsoft Visual Studio
.NET 2003/Vc7/bin/cl.exe -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- The CXX compiler identification is MSVC

-- Check for working CXX compiler: E:/Program Files/Microsoft Visual Studio
.NET 2003/Vc7/bin/cl.exe

-- Check for working CXX compiler: E:/Program Files/Microsoft Visual Studio
.NET 2003/Vc7/bin/cl.exe -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Looking for C++ include iostream

-- Looking for C++ include iostream - found

-- Check for STD namespace

-- Check for STD namespace - found

-- Found FLEX: E:/UnxUtils/usr/local/wbin/flex.exe

-- Found BISON: E:/UnxUtils/usr/local/wbin/bison.exe

 

NMake Makefiles JOM

-- Windows!

-- FLEXLM=Z:/projects/nastia_src/src/ext/flexlm/v11.6.1

-- ALSDK=Z:/projects/nastia_src/src/ext/alsdk/v10.0.0

-- FLEXLMARCH=i86_n3

-- The Fortran compiler identification is Intel

-- FIXME: altered Windows.cmake for debugging purposes.

-- Check for working Fortran compiler: E:/Program
Files/Intel/Fortran/compiler80/IA32/BIN/ifort.exe

-- Check for working Fortran compiler: E:/Program
Files/Intel/Fortran/compiler80/IA32/BIN/ifort.exe  -- works

-- Detecting Fortran compiler ABI info

CMake Error: Could not COPY_FILE.

  OutputFile: ''

copyFile: 'E:/build/CMakeFiles/CMakeDetermineCompilerABI_Fortran.bin'

 

Unable to find executable for try_compile: tried
E:/build/CMakeFiles/CMakeTmp/cmTryCompileExec.exe and
E:/build/CMakeFiles/CMakeTmp/Debug

/cmTryCompileExec.exe and
E:/build/CMakeFiles/CMakeTmp/Development/cmTryCompileExec.exe.

 

-- Detecting Fortran compiler ABI info - done

CMake Error at
E:/cmake28/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake:40
(FILE):

  file STRINGS file

  E:/build/CMakeFiles/CMakeDetermineCompilerABI_Fortran.bin cannot be
read.

Call Stack (most recent call first):

  E:/cmake28/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:59
(CMAKE_DETERMINE_COMPILER_ABI)

  compilers.cmake:45 (enable_language)

  CMakeLists.txt:4 (include)

 

 

-- Checking whether E:/Program
Files/Intel/Fortran/compiler80/IA32/BIN/ifort.exe supports Fortran 90

-- Checking whether E:/Program
Files/Intel/Fortran/compiler80/IA32/BIN/ifort.exe supports Fortran 90 -- yes

-- The C compiler identification is MSVC

-- Check for CL compiler version

-- Check for CL compiler version - 1310

-- Check if this is a free VC compiler

-- Check if this is a free VC compiler - no

-- Check for working C compiler: 

[CMake] add_test and $(Configuration) with Visual Studio Generator

2010-07-20 Thread Kelly Thompson
Hi,

 

I am having trouble with add_test and the MSVC macro $(Configuration) when I
generate project files for Visual Studio.  I am hoping someone on this list
can provide a solution.

 

Scenario:  (This is an outline of what I want to do.)

 

1. Ceating a unit test via 'add_executable(unittest unittest.cc)'.

2. Add a the test so that it runs under a script that takes the unit
test's fully qualified path as an argument.  That is, I use 'add_test(
myunittest c:\bin\mytestscript ${path_to_unittest}/unittest.exe )'

 

So the question is: how do I define ${path_to_unittest}.  I was trying to
use 'get_target_property( unittest_loc unitttest LOCATION ),' but this
provides a path that contains the Visual Studio Macro $(Configuration) which
is not converted into 'Debug/Release/.' when I run the unit tests inside of
visual studio.  Instead I get an error about the path not being found (i.e:
'c:\myproj\test\$(Configuration)\unittest.exe not found').

 

Does anyone have an example of how to use add_test in the way that I am
trying to use it?  I suppose I could create a custom command that runs a
build time and does a find_file(.) but I think there must be a better way.

 

Thanks in advance,

 

-kt

 

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Fortran 90 module output directories, dependency analysis

2010-06-01 Thread Kelly Thompson
This can be done using a Fortran compile option.  For gfortran, add the
option -Mdir to CMAKE_Fortran_FLAGS.  

 -Original Message-
 From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf
Of
 Jed Brown
 Sent: Monday, May 31, 2010 5:41 AM
 To: cmake@cmake.org
 Subject: [CMake] Fortran 90 module output directories, dependency analysis
 
 Is there a way to specify where generated *.mod files will be placed?
 Something analogous to CMAKE_LIBRARY_OUTPUT_DIRECTORY?
 
 Also, I notice that if I delete a module file, the build fails (unlike
 everything else where it will be properly regenerated).  This is with a
 plain Makefile build, cmake-2.8.1, after a successful complete build:
 
 $ rm petscmat.mod
 $ make VERBOSE=1
 /usr/bin/cmake -H/home/jed/petsc -B/home/jed/petsc/ompi-complex-int64 --
 check-build-system CMakeFiles/Makefile.cmake 0
 /usr/bin/cmake -E cmake_progress_start /home/jed/petsc/ompi-complex-
 int64/CMakeFiles /home/jed/petsc/ompi-complex-
 int64/CMakeFiles/progress.marks
 make -f CMakeFiles/Makefile2 all
 make[1]: Entering directory `/home/jed/petsc/ompi-complex-int64'
 make -f CMakeFiles/petsc.dir/build.make CMakeFiles/petsc.dir/depend
 make[2]: Entering directory `/home/jed/petsc/ompi-complex-int64'
 cd /home/jed/petsc/ompi-complex-int64  /usr/bin/cmake -E cmake_depends
 Unix Makefiles /home/jed/petsc /home/jed/petsc /home/jed/petsc/ompi-
 complex-int64 /home/jed/petsc/ompi-complex-int64 /home/jed/petsc/ompi-
 complex-int64/CMakeFiles/petsc.dir/DependInfo.cmake --color=
 make[2]: Leaving directory `/home/jed/petsc/ompi-complex-int64'
 make -f CMakeFiles/petsc.dir/build.make CMakeFiles/petsc.dir/requires
 make[2]: Entering directory `/home/jed/petsc/ompi-complex-int64'
 make -f CMakeFiles/petsc.dir/build.make CMakeFiles/petsc.dir/src/sys/f90-
 mod/petscmod.F.o.provides.build
 make[3]: Entering directory `/home/jed/petsc/ompi-complex-int64'
 /usr/bin/cmake -E cmake_copy_f90_mod petscsys
 CMakeFiles/petsc.dir/petscsys.mod.stamp GNU
 /usr/bin/cmake -E cmake_copy_f90_mod petscsysdef
 CMakeFiles/petsc.dir/petscsysdef.mod.stamp GNU
 /usr/bin/cmake -E touch CMakeFiles/petsc.dir/src/sys/f90-
 mod/petscmod.F.o.provides.build
 make[3]: Leaving directory `/home/jed/petsc/ompi-complex-int64'
 make -f CMakeFiles/petsc.dir/build.make CMakeFiles/petsc.dir/src/vec/f90-
 mod/petscvecmod.F.o.provides.build
 make[3]: Entering directory `/home/jed/petsc/ompi-complex-int64'
 /usr/bin/cmake -E cmake_copy_f90_mod petscis
 CMakeFiles/petsc.dir/petscis.mod.stamp GNU
 /usr/bin/cmake -E cmake_copy_f90_mod petscisdef
 CMakeFiles/petsc.dir/petscisdef.mod.stamp GNU
 /usr/bin/cmake -E cmake_copy_f90_mod petscvec
 CMakeFiles/petsc.dir/petscvec.mod.stamp GNU
 /usr/bin/cmake -E cmake_copy_f90_mod petscvecdef
 CMakeFiles/petsc.dir/petscvecdef.mod.stamp GNU
 /usr/bin/cmake -E touch CMakeFiles/petsc.dir/src/vec/f90-
 mod/petscvecmod.F.o.provides.build
 make[3]: Leaving directory `/home/jed/petsc/ompi-complex-int64'
 make -f CMakeFiles/petsc.dir/build.make CMakeFiles/petsc.dir/src/mat/f90-
 mod/petscmatmod.F.o.provides.build
 make[3]: Entering directory `/home/jed/petsc/ompi-complex-int64'
 /usr/bin/cmake -E cmake_copy_f90_mod petscmat
 CMakeFiles/petsc.dir/petscmat.mod.stamp GNU
 Error copying Fortran module petscmat.  Tried PETSCMAT.mod and
 petscmat.mod.
 make[3]: *** [CMakeFiles/petsc.dir/src/mat/f90-
 mod/petscmatmod.F.o.provides.build] Error 1
 make[3]: Leaving directory `/home/jed/petsc/ompi-complex-int64'
 make[2]: ***
[CMakeFiles/petsc.dir/src/mat/f90-mod/petscmatmod.F.o.provides]
 Error 2
 make[2]: Leaving directory `/home/jed/petsc/ompi-complex-int64'
 make[1]: *** [CMakeFiles/petsc.dir/all] Error 2
 make[1]: Leaving directory `/home/jed/petsc/ompi-complex-int64'
 make: *** [all] Error 2
 
 
 Jed
 ___
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at:
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Fortran 90 module output directories, dependency analysis

2010-06-01 Thread Kelly Thompson
On Tuesday, June 01, 2010 at 11:48 AM, Brad King wrote:

 You can delete the object file the provides the module.
 
  Perhaps that scenario where
  module files are deleted independent of the object/libraries is
  artificial, but it's not really correct for the build to break if they
  are deleted.
 
 The problem is that the build system doesn't actually point directly
 at the .mod files so it doesn't know when they are missing.  I don't
 remember all details off the top of my head, but there are very good
 reasons that the build system doesn't see .mod files directly.
 
 Fixing this would require some kind of side-effect map.  At the start
 of each build the object file providing a missing module would need
 to be deleted.  We already have something similar for custom commands
 with multiple outputs, but a major distinction is that CMake knows
 what files are paired together at generation time.  Object-module
 mapping is not known until build time (during dependency scanning).

By using try_compile, you can determine how your FORTRAN compiler generates
modules files (i.e.: the object-module mapping).  Once this mapping is
determined, you can predict all of the module file names before compilation
begins.  I use this technique in my project to generate a list of expected
module files that should be 'installed.'  

I suppose that you could use this generated list of module files along with
CMake's add_custom_command, add_custom_target and/or add_dependencies
commands to force the build system to recheck the module files on each build
invocation.  That sounds like a lot of work.  For my small project I prefer
using 'make clean; make all' in place of tracking all of the module
dependencies.

-kt


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Installing compiled fortran *.mod files

2010-05-11 Thread Kelly Thompson
John,

 

I'm not aware of any 'out of the box' way to install .mod files.  Here's
what I did for my project:

 

First, I wrote a set of macros that would determine the how FC names module
files (evidently there is no standard naming scheme) by using the
try_compile() macro.Next, I created a macro that would take a list of
Fortran sources and return a list of 'predicted' module file names based on
the naming scheme discovered in step 1.  Once I had the list of module file
names, I could use the standard install() command to place them in the
correct target location.

 

BTW - I have seen the following naming schemes for module files:

 

! File:moduleSRCFILE.f90

module moduleNAME

  integer :: j

end module moduleNAME

 

can produce module files with any of the following names:

 

modulename.mod  # module name, all lower case

moduleNAME.mod  # module name, preserve case

MODULENAME.mod  # module name, all upper case

Modulename.mod  # module name, capitalize first letter

modulesrcfile.mod   # file name, all lowercase

Modulesrcfile.mod   # file name, capitalize first letter

moduleSRCFILE.mod   # file name, preserve case

MODULESRCFILE.mod   # file name, all caps

moduleNAME.o# module name, .o extension, preserve case

modulename.o# module name, .o extension, all lower case

MODULENAME.o# module name, .o extension, all upper case

 

In my experience, modern Fortran compilers (gfortran/Linux, ifort/Linux,
ifort/Windows) only use the first case (mod file is the name of the module,
all lower case).  

 

I have hope that someone on this list has a better answer for you because I
would really like to replace my not-ready-for-primetime macros.  However,
if anyone is curious, I can tar up my files and email them to you. 

 

-kt

 

From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of
Biddiscombe, John A.
Sent: Tuesday, May 11, 2010 5:54 AM
To: cmake@cmake.org
Subject: [CMake] Installing compiled fortran *.mod files

 

I can't seem to find a way of installing the compiled mod files from a mixed
fortran/C/C++ project (on windows and linux).

 

I can see all the mod files in ${CMAKE_Fortran_MODULE_DIRECTORY}, but
various attempts to install them after compilation fail.

 

My closest effort looks something like this

 

INSTALL (

CODE

EXECUTE_PROCESS (COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR}
${CMAKE_INSTALL_PREFIX}/fortran)

)

 

but cmake dies on make install with 

CMake Error: cmake version 2.8.0

6Usage: C:/Program Files/cmake-2.8.0/bin/cmake.exe -E [command] [arguments
...]

6Available commands: .lots of the usaul stuff.

 

Is there a way that works 'out of the box'

 

Thanks

 

JB

 

 

 

 

-- 

John Biddiscombe,email:biddisco @ cscs.ch

http://www.cscs.ch/

CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07

Via Cantonale, 6928 Manno, Switzerland  | Fax:  +41 (91) 610.82.82

 

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake