Re: [CMake] issues with static linking and Intel compiler on Crays

2014-11-20 Thread Thompson, KT
Mark, I also have had a lot of difficulty using cmake in the Cray computing environment (Cray XE6). My team has given up on autodetection of the build environment. Instead we use cmake in a cross compiling environment (http://www.cmake.org/Wiki/CMake_Cross_Compiling), where we manually

Re: [CMake] Generated files?

2015-01-29 Thread Thompson, KT
Hi Chris, Why not use a foreach loop? Something like this… add_executable(myprog myprog.cpp) set( files file001 fiile002 …) foreach( file in files) add_custom_command(OUTPUT ${file}.out COMMAND /bin/cp ${CMAKE_CURRENT_SOURCE_DIR}/${file}.in . COMMAND myprog ${file}.in

Re: [CMake] Any way to append CMAKE_INSTALL_PREFIX with CMAKE_CFG_INTDIR?

2015-03-24 Thread Thompson, KT
That solution works for me. Thanks for your help! -Original Message- From: David Cole [mailto:dlrd...@aol.com] Sent: Tuesday, March 24, 2015 12:23 PM To: Thompson, KT Cc: cmake@cmake.org Subject: Re: [CMake] Any way to append CMAKE_INSTALL_PREFIX with CMAKE_CFG_INTDIR? An install

[CMake] Any way to append CMAKE_INSTALL_PREFIX with CMAKE_CFG_INTDIR?

2015-03-24 Thread Thompson, KT
Hi, For build tools like Visual Studio or Xcode, I would like to have CMAKE_INSTALL_PREFIX end with the build configuration type (Release, Debug, etc.) I tried to append CMAKE_INSTALL_PREFIX with ${CMAKE_CFG_INTDIR} or $CONFIG but those approaches didn’t work (The install directory had was a

Re: [CMake] Cray wrappers and Intel compilers

2015-05-05 Thread Thompson, KT
Lucas, When using CMake on our Cray environments (XE6, Intel compilers under the Cray wrappers), I do the following: 1. Create CMakeCache.txt in the build directory with these contents: CMAKE_SYSTEM_NAME:STRING=Catamount CMAKE_C_COMPILER:FILEPATH=cc CMAKE_CXX_COMPILER:FILEPATH=CC

Re: [CMake] [cmake-developers] Virtual folders in Visual studio get expanded on reload

2015-06-02 Thread Thompson, KT
Roman, I have the same complaint. My project has about 300 targets arranged in two dozen folders. I use the collapse all button in Visual Studio's Solution Explorer window (looks like a stack of 3 squares in VS2013). kt -Original Message- From: cmake-developers

Re: [CMake] Setting CXX_STANDARD 11 Enables GNU Extensions

2015-07-04 Thread Thompson, KT
Try setting CMAKE_CXX_EXTENSIONS this to OFF. http://www.cmake.org/cmake/help/v3.2/prop_tgt/CXX_EXTENSIONS.html#prop_tgt:CXX_EXTENSIONS From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Scott Aron Bloom Sent: Saturday, July 04, 2015 1:17 AM To: digitalriptide; cmake@cmake.org Subject:

[CMake] looking for help with "ctest_drop_method scp"

2015-11-06 Thread Thompson, KT
Hi, I am looking for information or examples on using CTEST_DROP_METHOD “scp”. I am aware of the documentation at (1) https://cmake.org/Wiki/CMake/Testing_With_CTest and (2) https://cmake.org/Wiki/CTest:Submission_Issues I support a test system that does not have http(s) access to the outside

Re: [CMake] oversubscribing OpenMPI in tests

2016-06-16 Thread Thompson, KT
Zaak, I use ‘execute_process (${MPIEXEC} --version)’ and match the output to a string (Open MPI, ALPS, MPICH). This isn’t the most elegant solution, but it seems fairly robust. -kt From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Zaak Beekman Sent: Thursday, June 16, 2016 9:14 AM

Re: [CMake] FORTRAN name mangling

2016-01-11 Thread Thompson, KT
"bind(c)" is a part of the Fortran 2003 standard. Any compiler that claims to support this standard should work for you. I use Intel Fortran on Linux (v13-16) with bind(c) w/o issue. FWIW - I also use the Portland Group (12+) and IBM Fortran (v14) compilers this way. -kt -Original

Re: [CMake] FORTRAN name mangling

2016-01-11 Thread Thompson, KT
11, 2016 12:11 PM To: Thompson, KT <k...@lanl.gov> Cc: cmake@cmake.org Subject: Re: [CMake] FORTRAN name mangling So if I require Fortran 2003 for our fortran codes then this whole “fortran name-mangling” thing becomes a moot point, i.e. I do not have to actually worry about it at all f

[CMake] cmake 3.5.0-rc1 Error copying Fortran module

2016-02-04 Thread Thompson, KT
In my mixed C++/Fortran Makefile-based project, I am encountering the following error with RC1 of CMake-3.5.0: Entering directory `/projects/foo/build/d' /var/tmp/cmake-install/bin/cmake -E cmake_copy_f90_mod myf90file src/dir1/dir2/CMakeFiles/Lib_FC_f90sub.dir/myf90file.mod.stamp Intel Error

Re: [CMake] cmake 3.5.0-rc1 Error copying Fortran module

2016-02-05 Thread Thompson, KT
Brad, I want to confirm that your patch below fixed the issue that I reported. Thank you! -kt -Original Message- From: Brad King [mailto:brad.k...@kitware.com] Sent: Friday, February 05, 2016 7:32 AM To: Thompson, KT <k...@lanl.gov> Cc: cmake@cmake.org; Stephen Kelly

Re: [CMake] CMake 3.5.0-rc1 install is missing dependencies

2016-02-04 Thread Thompson, KT
LL pointer (0x0) that is dereferenced in the next line (stack location #5) tgt->GetPolicyStatusCMP0022() This is causing the segfault. -kt -Original Message- From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Thompson, KT Sent: Wednesday, February 03, 2016 12:00 PM To: Bra

Re: [CMake] CMake 3.5.0-rc1 crash (was: CMake 3.5.0-rc1 install is missing dependencies)

2016-02-04 Thread Thompson, KT
Your patch fixes the problem I was seeing. Thank you, -kt -Original Message- From: Brad King [mailto:brad.k...@kitware.com] Sent: Thursday, February 04, 2016 10:57 AM To: Thompson, KT <k...@lanl.gov> Cc: cmake@cmake.org; Stephen Kelly <steve...@gmail.com> Subject: Re: [

[CMake] CMake 3.5.0-rc1 install is missing dependencies

2016-02-03 Thread Thompson, KT
I downloaded cmake 3.5.0-rc1 to try it out. The Windows installation doesn’t appear to provide all the required dependencies. ‘cmake-gui’ will not launch and provides the error “Qt5Widgets.dll is missing form your computer.” Do I need to install a specific Qt runtime before installing cmake

Re: [CMake] CMake 3.5.0-rc1 install is missing dependencies

2016-02-03 Thread Thompson, KT
: Wednesday, February 03, 2016 11:42 AM To: Thompson, KT <k...@lanl.gov> Cc: cmake@cmake.org Subject: Re: [CMake] CMake 3.5.0-rc1 install is missing dependencies On 02/03/2016 11:19 AM, Thompson, KT wrote: > On RHEL 6.7, I extracted the prebuilt x86_64 binaries from the > downloaded

[CMake] Errors from CDash

2017-02-15 Thread Thompson, KT
When I run php5 autoRemoveBuilds.php all for my cdash 2.2.3 installation, I see the following errors (and old builds are not removed): removing builds for all -- removing old buildids for projectid: 2 PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean g8 PHP

Re: [CMake] Intel C Generator for Cmake?

2017-02-15 Thread Thompson, KT
Tony, I don’t have access to the Intel compiler on Windows to try this out. However, in an old post I found, it was suggested that you can use cmake’s “-T” option to select the Intel compiler when the generator is “Visual Studio”. For example: -T"Intel C++ Compiler XE 13.0" Ref:

[CMake] Problem with VS2017 and CMakeGNUtoMS_lib.bat.in (cmake-3.8-rc2)

2017-03-07 Thread Thompson, KT
Hi, I use the CMakeAddFortranSubdirectory feature in one of my projects. This appears to be broken under Visual Studio 2017 Community Edition RC because CMake\share\cmake-3.8\Modules\Platform\GNUtoMS_lib.bat.in generates a batch file that contains: call "C:\Program Files (x86)\Microsoft

[CMake] FW: Visual Studio 2017

2017-09-15 Thread Thompson, KT
Randy, Miroslav's recommendation should work. To expand on his response, here are the commands that I use with VS2017 to allow cmake to run from the command line: - Start cmd session (should also work via powershell) - To import VS17's command line environment run "C:\Program Files

[CMake] CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE

2017-11-29 Thread Thompson, KT
Hi, I'm trying to limit the amount of data that is uploaded to my CDash server by setting set( CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "30" ) set( CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE "1024" ) # bytes (1 kB) set( CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "1024" ) # bytes (1 kB) in

Re: [CMake] CDash calendar button no longer works?

2018-01-19 Thread Thompson, KT
or any other change that I can see). -kt From: Zack Galbreath [mailto:zack.galbre...@kitware.com] Sent: Friday, January 19, 2018 7:24 AM To: Thompson, KT <k...@lanl.gov> Cc: cmake@cmake.org Subject: Re: [CMake] CDash calendar button no longer works? On Wed, Jan 17, 2018 at 4:02 PM,

[CMake] CDash calendar button no longer works?

2018-01-17 Thread Thompson, KT
Hi, The 'calendar' button in our CDash installation (v. 2.5.0) stopped working recently (no changes to our CDash installation and only regular security patches to the web server). Everything else works fine. Does anyone have any ideas on how to diagnose why my calendar no longer works? BTW

Re: [CMake] libc++ usage in CMake with Clang?

2018-08-20 Thread Thompson, KT
I'm also interested in the answer to Robert's question. I've been using set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -stdlib=libc++") but it seems like there should be a more elegant approach. -tk -Original Message- From: CMake On Behalf Of Robert Dailey Sent: Monday, August 20, 2018

Re: [CMake] CheckSymbolExists / CheckCXXSymbolExists

2018-09-07 Thread Thompson, KT
Kevin, I use something like this: # Is HOST_NAME_MAX available? include( CheckSymbolExists ) check_symbol_exists( HOST_NAME_MAX “unistd.h winsock2.h” HAVE_HOST_NAME_MAX ) -kt From: CMake On Behalf Of K. Ebrahimp. Sent: Friday, September 7, 2018 6:07 AM To: cmake@cmake.org Subject: [CMake]

[CMake] CMake misidentifies xlc++ as Clang

2018-03-07 Thread Thompson, KT
Hi, I am using cmake-3.9.4 on a power9 system with CXX=xlc++ (IBM XL C++) and CMake is misidentifying the compiler as "clang". % uname -a Linux cn2021 4.11.0-44.4.1.el7a.ppc64le #1 SMP Sat Dec 9 02:17:51 EST 2017 ppc64le ppc64le ppc64le GNU/Linux % echo $CXX xlc++ % $CXX --version IBM XL

Re: [CMake] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Thompson, KT
Michael, I agree heartily with your frustration concerning how CMake handles compiler flags -- especially when the FLAG strings seen in cmake-gui don't match the baseline flags used by the build. I use a heavy handed, old-fashioned approach to solve this problem. I ignore all of CMake's

[cmake-developers] Proposed patch for FindMPI.cmake (Intel MPI)

2014-10-30 Thread Thompson, KT
Please find below a proposed patch that addresses this bug: http://public.kitware.com/Bug/view.php?id=15182 (FindMPI.cmake fails to properly detect Intel MPI 5.0.1). Because the return code is unreliable for the Intel MPI compile wrappers (e.g.: 'mpiicpc -showme:compile'), the output text

[cmake-developers] Volunteering to maintain a new module: FindGSL.cmake

2014-12-02 Thread Thompson, KT
Hi, I have been using CMake for about 7 years now and I maintain several modules in my local projects. I am new to the cmake-developers list and I am offering a new module, FindGSL.cmake, and offering to maintain it. I have maintained and used this module for about 4 years supporting various

Re: [cmake-developers] Volunteering to maintain a new module: FindGSL.cmake

2014-12-02 Thread Thompson, KT
Brad, Thank you very much for the constructive comments concerning my submitted FindGSL.cmake module. I believe I have addressed nearly all of your concerns in the version shown below. I have two comments that may be useful: 1. The command add_library(GSL::gsl UNKOWN IMPORTED) generates

Re: [cmake-developers] Volunteering to maintain a new module: FindGSL.cmake

2014-12-09 Thread Thompson, KT
Stephen Kelly wrote: This looks like it needs a suffix. GSL_CONFIG_EXECUTABLE would seem appropriate. # Windows with dlls, but only Release libraries. set_target_properties( GSL::gslcblas PROPERTIES IMPORTED_LOCATION ${GSL_CBLAS_LIBRARY_DLL} This should be

Re: [cmake-developers] FindMPI take 2

2014-12-09 Thread Thompson, KT
Brad King wrote: 0002-first-try-to-see-if-what-user-provided-produces-an-m.patch The check for whether the CMAKE_LANG_COMPILER is already a MPI compiler requires a try_compile. Is there some other way to check to see if there is any chance before the full test? I have been looking into

Re: [cmake-developers] FindMPI take 2

2014-12-11 Thread Thompson, KT
Alin Elena wrote: In addition to that I have noticed that in the interrogate function we never check that we can actually generate a binary with the findings, shall we have a try_mpi_compile at the end of interrogate function? In general, I think this is a good idea because I have

Re: [cmake-developers] Volunteering to maintain a new module: FindGSL.cmake

2014-12-16 Thread Thompson, KT
Brad, I made the changes that you suggested wrt removing trailing whitespace and removing variables from the cache. I also reverted a recent change by replacing GSL_CONFIG_EXECUTABLE with GSL_CONFIG to remain consistent with the naming conventions of PkgConfig.cmake. The updated FindGSL.cmake

[cmake-developers] Proposed change to behavior of find_program

2014-12-19 Thread Thompson, KT
CMake developers, I am proposing a small change to SystemTools.cxx to address a problem I have on multiple systems. I need find_program to return the path to an executable file that is not marked with the read permission bit, but is marked with the execute bit (e.g.: chmod 111 file). On

Re: [cmake-developers] Proposed change to behavior of find_program

2014-12-19 Thread Thompson, KT
).c_str()) != INVALID_FILE_ATTRIBUTES); #else - return access(filename.c_str(), R_OK) == 0; + return access(filename.c_str(), R_OK) == 0 || access(filename.c_str(), X_OK) == 0; #endif } From: cmake-developers [mailto:cmake-developers-boun...@cmake.org] On Behalf Of Thompson, KT Sent

Re: [CMake] How to produce a -config.cmake file

2018-09-27 Thread Thompson, KT via CMake
Matthieu, I think are asking about the CMakePackageConfigHelpers CMake module (https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html) that defines the macro 'configure_package_config_file'. You can probably find several tutorials or examples by searching github or

Re: [CMake] How to specify gfortran in an MSVC project

2019-01-13 Thread Thompson, KT via CMake
Hi Stephen, I am also interested in Kitware's response to your question. I don't use Qt Creator, but I help maintain several projects that use Visual Studio and MinGW gfortran via the CMakeAddFortranSubdirectory feature. This feature is somewhat limited and not really maintained (in my

Re: [CMake] Multiple occurrences of a library on linux (ldd)

2019-02-14 Thread Thompson, KT via CMake
Thiago, I haven’t see the double entry pattern that you mention below. However, you might want to tell CMake to embed a BUILD_RPATH in your libraries. This should get around the issue of manually setting LD_LIBRARY_PATH.