[CMake] CMake, OpenBSD, and system libraries

2010-02-08 Thread Chuck Atkins
reference to `tld_check_lz' collect2: ld returned 1 exit status gmake[2]: *** [bin/DumpDocumentation] Error 1 gmake[1]: *** [Source/CMakeFiles/DumpDocumentation.dir/all] Error 2 Chuck Atkins RD Engineer Kitware, Inc. (518) 371-3971 x603 -- Mathematicians are tools for turning coffee grounds

Re: [CMake] FIND_LIBRARY in FindBoost finds wrong library

2010-03-19 Thread Chuck Atkins
/libboost_filesystem-mt.so /usr/local/lib/libboost_python-mt.so This mix and match is definitely not desired. It almost seems like if the BOOST_ROOT variable is set then that should get used exclusively as the search path and not just appended to the front. Thoughts? Chuck Atkins On Fri, Mar 19, 2010 at 7:12 AM

Re: [CMake] how can I filter compiler warnings?

2010-05-10 Thread Chuck Atkins
never could figure out a way to forcefully indicate the compiler that didn't break things. On 05/07/2010 12:47 PM, Chuck Atkins wrote: What exactly do you mean by filter? Do you want to suppress the warnings? On Fri, May 7, 2010 at 1:29 PM, Kevin Burge kevin.bu...@systemware.comwrote: I

Re: [CMake] how can I filter compiler warnings?

2010-05-10 Thread Chuck Atkins
at 11:06 AM, Kevin Burge kevin.bu...@systemware.comwrote: My apologies: Solaris (gcc 412), AIX (xlC 9), Windows (MSVC8 - i.e. Visual Studio 2005 w/ nmake), Linux (several different gcc releases) On 05/10/2010 10:04 AM, Chuck Atkins wrote: What compiler / platform are you using? On Mon

Re: [CMake] Linking error with VS2005

2010-05-21 Thread Chuck Atkins
libraries and dependencies as well as the project code it's self be built in the same Build Configuration (Debug or Release). Mixing the two will often give rise to problems such as these. Chuck Atkins -- Mathematicians are tools for turning coffee grounds into formulas., Paul Erdos On Fri, May

Re: [CMake] How to determine the compiler used outside of cmake

2013-05-03 Thread Chuck Atkins
Instead of overriding the compiler in the CMakeLists.txt to a specific compiler version, why not guide CMake's compiler detection from the outside and have CMake choose the one you want? For instance, since you're already using a wrapper to drive the CMAKe build, you could call cmake with cmake

Re: [CMake] install TARGETS given unknown argument EXPORT. with cmake 2.8.9

2014-02-18 Thread Chuck Atkins
Hi David, What does your install(...) line look like so we can try to help you debug the issue? - Chuck On Wed, Feb 12, 2014 at 4:09 PM, david.hag...@gmail.com wrote: I am trying to set up component registration as per http://www.cmake.org/Wiki/CMake/Tutorials/Packaging but when I run

Re: [CMake] install TARGETS given unknown argument EXPORT. with cmake 2.8.9

2014-02-21 Thread Chuck Atkins
David, Indeed it should. Thanks for catching that! I've updated the wiki page with the correct order of arguments. - Chuck On Fri, Feb 21, 2014 at 11:25 AM, david.hag...@gmail.com wrote: The order of arguments is wrong. Move the 'EXPORT foo-targets' to just after 'TARGETS foo'.

Re: [CMake] cmake project patterns / examples

2014-06-03 Thread Chuck Atkins
Just put all the build commands in the top level cmake file. Definitely an anti-pattern. As you mentioned, it definitely doesn't scale. The problem with even doing this for a simple project is that it builds this behavior for people trying to learn cmake through simple examples. This very very

Re: [CMake] Fails for Solaris

2014-07-16 Thread Chuck Atkins
Amos, I just tried on a Sun Blade 1500 running Solaris 10 8/11 with an UltraSPARC IIIi using SolarisStudio 12.2 and 12.3. Both were able to configure and build successfully using both the bootstrap, /path/to/source/bootstrap gmake, and and cmake, cmake /path/to/source gmake, so it can be done:

Re: [CMake] Fails for Solaris

2014-07-17 Thread Chuck Atkins
SolarisStudio. On Wed, Jul 16, 2014 at 10:20 AM, Chuck Atkins chuck.atk...@kitware.com wrote: Amos, I just tried on a Sun Blade 1500 running Solaris 10 8/11 with an UltraSPARC IIIi using SolarisStudio 12.2 and 12.3. Both were able to configure and build successfully using both the bootstrap

Re: [CMake] CMAKE changing Visual Studio Settings

2014-07-24 Thread Chuck Atkins
Hi Joseph, On Mon, Jul 21, 2014 at 4:51 PM, Joseph Rosensweig jrose...@gmail.com wrote: ... in my CMAKE I have places where I do things like if(CMAKE_BUILD_TYPE STREQUAL Debug) then do this else do that. This is the sort of logic best achieved through generator expressions. How to do it

Re: [CMake] How to set Look for CMakeDetermineLang.cmake here

2014-07-28 Thread Chuck Atkins
Hi David, You can add to the search path CMake uses by appending to the CMAKE_MODULE_PATH variable. In your case, you'll probably want to set it before the project command to make sure it's present for you're entire project. For example: In your project, you create CMake directory where you

Re: [CMake] Fwd: set_target_properties and language specific COMPILE_FLAGS

2014-08-01 Thread Chuck Atkins
Hi Nick, You could split your target in to two object libraries that combine into a singe real library: add_library(foo_f OBJECT ${FOO_F_SOURCES}) # set necessary compile flags specific to the Fortran components # on the foo_f target add_library(foo_c OBJECT ${FOO_C_SOURCES}) # set necessary

Re: [CMake] Help cmake First project

2014-08-04 Thread Chuck Atkins
Hi Rodrigo, It looks like you are probably missing some source files in your executable. Is protpred-Gromacs-NSGA2.c the only piece of code that gets built for the executable? If not, you'll need to make sure that all the necessary source files get either built into the executable or build as a

Re: [CMake] Help cmake First project

2014-08-13 Thread Chuck Atkins
Are these actually C++ files? If so then they should really have a C++ extension (like .cp or .cxx). It may be a good idea in general since other build tools may run in to the same sort of issue of assuming they are C files. A few other tips: first, by placing all your source files in a list

Re: [CMake] Switching between i386, i586 and i686

2014-08-26 Thread Chuck Atkins
Hi Amul, The -march flag doesn't automatically get set by CMake since it tends to be highly system specific; you'll need to explicitly add it to your CMAKE_{C,CXX,Fortran}_FLAGS variables if you want it used. The CMAKE_SYSTEM_PROCESSOR variable is usually used only for packaging to determine

Re: [CMake] Autotools-cmake: Are these checks really needed anymore?

2014-08-30 Thread Chuck Atkins
On Sat, Aug 30, 2014 at 10:30 AM, Rolf Eike Beer e...@sf-mail.de wrote: # Checks for typedefs, structures, and compiler characteristics. #AC_C_CONST #AC_C_INLINE ... #AC_TYPE_SIZE_T ... #AC_C_RESTRICT #AC_C_VOLATILE These should be generally safe to assume #AC_STRUCT_TM

Re: [CMake] Merge VS: Use full path to sources to allow deeper trees with VS = 10 fix to release

2014-09-01 Thread Chuck Atkins
The next major release will likely be CMake 3.1 -- and the fix you've found will be in that release automatically, as it will be based on 'master' when it is created. Related, it should also include support for extended length paths at the cmake level. This converts paths to the special

Re: [CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

2014-09-03 Thread Chuck Atkins
Hi Clark The expression inside the if statement has it's variables dereferenced before evaluating and the non-variables are treated as constant expressions. In this case, a resolves to b, b resolves to c, and c is not a variable so it's treated as the constant expression c. Thus if(a STREQUAL

Re: [CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

2014-09-04 Thread Chuck Atkins
But is there a way to check if the value of the variable a equals to b or c? Directly: if(a STREQUAL b OR a STREQUAL c) But its a bit clumsy. Better would be to match a regex: if(a MATCHES ^(b|c)$) -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at:

Re: [CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

2014-09-04 Thread Chuck Atkins
Command `if(a MATCHES ...)` has the same flaw: `if(variable|string MATCHES regex)`: .. set(MYSTRING B) set(A MYSTRING) if(${A} MATCHES ^MYSTRING$) # do *not* go here even A is MYSTRING (use *variable* MYSTRING) endif() This should work without dereferencing A, i.e.: if(A MATCHES

Re: [CMake] Ctest building with Multiple Processors

2014-09-05 Thread Chuck Atkins
Actually my interpretation of the manual says that the _tests_ will be run in parallel. What I want is the _Build_ to be run in parallel. Indeed that is just the parallel test execution. Parallel build is usually generator specific, controlled through CTEST_BUILD_FLAGS. For example: if

Re: [CMake] Ctest building with Multiple Processors

2014-09-05 Thread Chuck Atkins
software going also. Thanks Mike Jackson dream3d.bluequartz.net github.com/dream3d/dream3d On Sep 5, 2014, at 9:33 AM, Chuck Atkins chuck.atk...@kitware.com wrote: Actually my interpretation of the manual says that the _tests_ will be run in parallel. What I want is the _Build_

Re: [CMake] Link step more than once

2014-09-11 Thread Chuck Atkins
Sounds like what you want is an object library, http://www.cmake.org/Wiki/CMake/Tutorials/Object_Library: set(FOO_SOURCES Foo1.cxx Bar2.cxx FooBar3.cxx ) add_library(FooObjLib OBJECT ${FOO_SOURCES}) add_executable(A $TARGET_OBJECTS:FooObjLib) set_target_properties(A PROPERTIES LINK_FLAGS

Re: [CMake] FW: Parallel GNU make issue

2014-09-11 Thread Chuck Atkins
Hi Gary, Do you see either of these two warning messages show up: warning: -jN forced in submake: disabling jobserver mode. or warning: jobserver unavailable: using -j1. Add `+' to parent make rule. These warnings often accompany the forced serialization of a parallel make build, although

Re: [CMake] Specifying different compilers for subsets of a project

2014-10-16 Thread Chuck Atkins
Hi George, The obvious way to compile front-end tools is to create another directory, e.g., front-end-build and run cmake therein to re-configure and build with a front-end compiler. However, since only a relatively small subset of the files needs to be compiled for the front-end, it is

Re: [CMake] FIND_PATH() search custom path first

2014-11-04 Thread Chuck Atkins
Hi George, Jakub, NO_DEFAULT_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH The options specified are redundant. NO_DEFAULT_PATH implies the later 4. If you just specify NO_DEFAULT_PATH then only HINTS and user guess paths

Re: [CMake] find_package

2015-04-24 Thread Chuck Atkins
Hi Matt, 1) (... set boost_root ...) 2) FIND_PACKAGE(Boost 1.57 COMPONENTS log thread filesystem system) If you're using CMake = 3.0, then there's a Boost_NAMESPACE variable you can set that will cause the find module look for mangled library names line myboostnamespace_datetime instead of

Re: [CMake] Linking error after having found a package

2015-07-23 Thread Chuck Atkins
Hi Cedric, FIND_PACKAGE(BLAS) FIND_PACKAGE(LAPACK) # I should test with BLAS_FOUND and LAPACK_FOUND here but that's not the problem If they're actually required then you can skip the additional check by calling: FIND_PACKAGE(BLAS REQUIRED) FIND_PACKAGE(LAPACK REQUIRED) This will cause the

Re: [CMake] Changes to CMAKE_CXX_FLAGS_RELEASE not reflected in GUI

2015-07-23 Thread Chuck Atkins
Is this the intended behavior? Yes. The GUI is essentially an editor for the CMake cache. These variables are persistent with global scope. As such, only the cache values are reflected in the GUI. When you set the CMAKE_CXX_FLAGS_RELEASE with this form of the set command, you are changing

Re: [CMake] linking hared libraries

2015-10-20 Thread Chuck Atkins
> > On Mon, Oct 19, 2015 at 8:43 PM, Owen Alanzo Hogarth > wrote: > > Also you said the PROJECT() should only be defined once, but shouldn't > each > > cmakelists.txt contain a project() or else cmake complains at me. > > > According to the last paragraph of: > >

Re: [CMake] No-op command?

2015-09-07 Thread Chuck Atkins
> > if(CMAKE_SYSTEM_NAME STREQUAL "Windows") >> else() >>... do something ... >> endif() >> > While you may need the empty if condition for something else, in this use case specifically you could just as easily avoid the empty conditional block and negate the expression with: if(NOT

Re: [CMake] CMake + MPI

2015-09-09 Thread Chuck Atkins
> > The only exception to that (which I am aware of) is if you are on a CRAY > system where the MPI (and BLAS and LAPACK) are baked into the compiler > wrappers (cc, ftn, etc). In those situations, you actually do not want to > run find_package(MPI) or it will throw errors. > Not true. The

Re: [CMake] Is there a way to disable adding extra libraries at the end of a link line?

2015-12-30 Thread Chuck Atkins
The error itself I believe is a side effect of CMake trying to operate assuming it's using normal Linux, which makes some assumptions regarding shared runtime libraries for libc, position independent code, etc. The default behaviour of the Cray compiler wrappers, however, is to create fully

Re: [CMake] add_custom_command, POST_BUILD

2016-06-02 Thread Chuck Atkins
Could you just make the tests run in the post-build of the test? add_library(Foo Foo.cxx) add_executable(FooTest FooTest.cxx) target_link_libraries(FooTest Foo) add_custom_command(TARGET FooTest POST_BUILD COMMAND $ $ ) That way the the test is run as part of it's build. - Chuck On Wed,

Re: [CMake] How do you handle recursive dependencies in CMake

2016-06-08 Thread Chuck Atkins
eated by all the different projects (I have actually > already seen this a lot). That is the case, because the FindFooBar.cmake > file is not provided by the FooBar project, unlike the FooBarConfig.cmake. > > Cheers, > Sven > > > On 06/08/2016 03:11 PM, Chuck Atkins wrote: > > T

Re: [CMake] How do you handle recursive dependencies in CMake

2016-06-08 Thread Chuck Atkins
The FooBarConfig.cmake is something that should be generated by FooBar's build. The reason you don't get absolute paths for the "libraries" from a package config file is that they're not actually libraries but imported targets. The imported target let's you treat "foo" as though it were a

Re: [CMake] Provide configuration settings for users

2016-06-14 Thread Chuck Atkins
Hi Cedric, It sounds like creating a package config file is exactly what you need. When installed, a user will be able to consume your project with "find_package(Foo)". That will locate and read the package config file which will create an imported target Foo::Foo. This imported target will

Re: [CMake] cpack ppc64le rhel7.2 CPACK_RPM_PACKAGE_ARCHITECTURE

2016-06-08 Thread Chuck Atkins
I was able to verify, btw, that Fedora 19 + Power8 outputs ppc64le for uname -m so I assume it works correctly on EL7 as well. Testead via an IBM machine hosted at the OSU Open Source Lab that we can access and use for testing. - Chuck On Wed, Jun 8, 2016 at 10:33 AM, M Kelly

Re: [CMake] No debugging symbols found when using -DCMAKE_BUILD_TYPE=Debug

2016-06-01 Thread Chuck Atkins
> >[eschnigma@manjaro build]$ cmake .. -DCMAKE_BUILD_TYPE:STRING="Debug" > -- The C compiler identification is unknown > -- The CXX compiler identification is unknown > This is definitely the reason for no debug symbols. If the compiler is unknown then CMake won't know the right flags to

Re: [CMake] No debugging symbols found when using -DCMAKE_BUILD_TYPE=Debug

2016-06-01 Thread Chuck Atkins
; > Version: > > > > [eschnigma@manjaro ~]$ g++ --version > g++ (GCC) 6.1.1 20160501 > Copyright (C) 2016 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PAR

Re: [CMake] How to hundle gcc link options(like whole-archive, --allow-multiple-definition) in CMake?

2016-05-31 Thread Chuck Atkins
Hi Chao, You want to let CMake to as much of the work for you as possible. You're still trying to explicitly pass the path to the library file to target_link_libraries. If you look at the line: target_link_library(exe1 "-Wl, --whole-archive ../sub_dir1/liblib1.a --no-whole-archive") there's

Re: [CMake] Finding libxml2 when building llvm/clang

2016-06-15 Thread Chuck Atkins
You could try to force libxml to be ignored by CMake so it will think it wasn't found and use the fallback configuration: cmake ... -DLIBXML2_LIBRARIES=IGNORE ... - Chuck On Tue, Jun 14, 2016 at 8:28 PM, Edward Diener < eldlistmaili...@tropicsoft.com> wrote: > Building llvm/clang from source

Re: [CMake] find_library

2016-01-14 Thread Chuck Atkins
Hi Vania, find_library(SYSC_LIB systemc PATHS "${SYSTEMC_PATH}" > PATH_SUFFIXES lib-linux64 lib64-linux lib64-linux64) > In this first call, SYSTEMC_PATH is being dereferenced as a CMake variable. This works because in your invocation of CMake: cmake -G "Unix Makefiles"

Re: [CMake] Toolchains and CMAKE_FORCE_C_COMPILER in 3.5

2016-02-09 Thread Chuck Atkins
Hi Thibault, Can you post your toolchain file? - Chuck On Tue, Feb 9, 2016 at 9:10 AM, Thibault Genessay wrote: > Hi, > > I'm a long time user of CMake (and huge fan of it) but newly registered on > this list, so please forgive me if I have missed something regarding the >

Re: [CMake] How to pass a configuration file to CMake?

2016-01-21 Thread Chuck Atkins
Hi Cedric, The option can be a bit confusing. The cache file you pass is actually a CMake script that sets cache variables, rather than the cache variables as seen in CMakeCache.txt. So you would actually want your cache file to contain: set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type

Re: [CMake] How to pass a configuration file to CMake?

2016-01-21 Thread Chuck Atkins
CMake strongly encourages the use of separate source and build directories (unlike autotools). So, try something like this: mkdir build cd build cmake -C /path/to/SuperCoolCacheFile.cmake /path/to/source - Chuck On Thu, Jan 21, 2016 at 10:10 AM, Cedric Doucet wrote:

Re: [CMake] CMake:question of the time when the command will happen in add_custom_command(...)

2016-04-22 Thread Chuck Atkins
Hi Chao, You can see this more clearly if you do a "make VERBOSE=1" : [chuck.atkins@hal9000 build]$ make VERBOSE=1 ... [ 50%] Building C object CMakeFiles/main.dir/main.c.o /usr/bin/cc -o CMakeFiles/main.dir/main.c.o -c /home/chuck.atkins/Code/tmp/source/main.c [100%] Linking C executable

Re: [CMake] How to link shared lib on windows (visual studio 2014).

2016-04-26 Thread Chuck Atkins
May others have mentioned the various different ways to address generating import libraries. One thing that will help with the "can't find .dll" issue is to change the default location that various components end up. With Windows shared libraries, you have both a runtime component (.dll) and a

Re: [CMake] project command not working, when used via macro (from an included file)

2016-04-27 Thread Chuck Atkins
great macros, such as > project_guarded > (see http://stackoverflow.com/a/33100078) > cannot be used everywhere, as a substitute for project. > > > > On Tue, Apr 26, 2016 at 8:04 PM, Chuck Atkins <chuck.atk...@kitware.com> > wrote: > >> ajneu, >> >&g

Re: [CMake] Is there a better way to retrieve content from a remote zip file?

2016-04-28 Thread Chuck Atkins
This looks well suited to ExternalProject. Just give it an empty configure and build steps and then have the install step perform the copy: include(ExternalProject) if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(3rdParty_SUBDIR x64) else() set(3rdParty_SUBDIR x86) endif() ExternalProject_Add(

Re: [CMake] project command not working, when used via macro (from an included file)

2016-04-26 Thread Chuck Atkins
ajneu, The call to project(...) needs to be explicit. See https://cmake.org/cmake/help/v3.5/command/project.html: The top-level CMakeLists.txt file for a project must contain a literal, direct call to the project()

Re: [CMake] How to use 'CMAKE_EXE_LINKER_FLAGS' correctly

2016-05-20 Thread Chuck Atkins
> -rpath RPATHs are automatically added by CMake to executables so they can use libraries from the build tree. > -whole-archive > whole-archive is definitely trickier since you shouldn't be applying it to the entire executable but instead wrapping individual libraries with it. Conveniently,

Re: [CMake] How to use 'CMAKE_EXE_LINKER_FLAGS' correctly

2016-05-23 Thread Chuck Atkins
AM, Chaos Zhang <zcsd2...@gmail.com> wrote: > Thanks a lot! `set(FOO_LIBRARY "-Wl,--whole-archive ${FOO_LIBRARY} > -Wl,--no-whole-archive")` worked when the content of ${FOO_LIBRARY} look > like `-Ldir -llib`, if just use lib name as the content of ${FOO_LIBRARY}, >

Re: [CMake] How to use 'CMAKE_EXE_LINKER_FLAGS' correctly

2016-05-20 Thread Chuck Atkins
Is there a reason to not use target_link_libraries here? For the purposes of your example there's no reason to be using CMAKE_EXE_LINKER_FLAGS. What are you actually trying to accomplish? Because there is almost certainly a better way to achieve your desired result than via

Re: [CMake] Idomatic cmake: Supporting gcc, icc, and clang with custom flags for each?

2016-05-17 Thread Chuck Atkins
Hi TCW, A typical approach for this is in the top level CMakeLists.txt to have: include(CompilerFlags) And then you can isolate the detection and specialization logic in a separate CompilerFlags.cmake: if(CMAKE_COMPILER_IS_GNUC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS" -extra --gcc-options")

Re: [CMake] Error if CMAKE_SYSTEM_NAME is placed wrongly

2016-05-18 Thread Chuck Atkins
> when I place set(CMAKE_SYSTEM_NAME Generic) after cmake_minimum_required() > and project() and set(VERSION_MAYOR/MINOR), > CMAKE_SYSTEM_NAME really shouldn't be in a CMakeLists.txt file at all. It should instead be in a stand alone toolchain file defining your various cross-compiling

Re: [CMake] [cmake-developers] [PATCH] FindBoost does not detect absence of header file

2016-05-11 Thread Chuck Atkins
I guess it doesn't really matter but for the libraries that don't have a single include header, should you be using these instead: - container/container_fwd.hpp - exception/all.hpp - filesystem.hpp - math_fwd.hpp (instead of math/quaternion.hpp) - system/config.hpp -

Re: [CMake] CMake: how to use 'for cyclic sentence' in command add_custom_command(...)

2016-04-19 Thread Chuck Atkins
Hi Chao, > I was using 'for cyclic sentence' in command add_custom_command(...), the > content of the CMakeLists.txt as below: > add_custom_command(TARGET temp_target > POST_BUILD > COMMAND for x in a b c\; >

Re: [CMake] How to add dependency relations between libs and executable

2016-04-19 Thread Chuck Atkins
> cmake, the old top layer project is proj_a, which at the same layer with > proj_b and proj_c, if I add an extra top layer as the root you mentioned, the generated make file structure will be changed, top layer make file will be root instead of proj_a. > > Is there any way to add the dependency

Re: [CMake] CMake: how to use 'for cyclic sentence' in command add_custom_command(...)

2016-04-19 Thread Chuck Atkins
me), $(file_name). Thanks again for your help, Chao Zhang 2016-04-19 22:20 GMT+08:00 Chuck Atkins <chuck.atk...@kitware.com>: > Hi Chao, > > >> I was using 'for cyclic sentence' in command add_custom_command(...), the >> content of the CMak

Re: [CMake] How to add dependency relations between libs and executable

2016-04-20 Thread Chuck Atkins
> So for this parallel project structure, an upper level cmakelist used to > organize and setup relationship with lib A, B, C right? > Correct. The top level CMakeLists.txt lets A B and C all build under a single configuration. One more question is, if use the upper level cmake list, lib_B ,

Re: [CMake] How to add dependency relations between libs and executable

2016-04-21 Thread Chuck Atkins
> in your proj_a example, when target_link_librairies invoke Lib B directly > which generated in another project b, how does proj_a recognize it > I think the reason is proj_a, b, c are all the sub directories of > project root, if no root layer, B can not be invoked in proj_a, right? > That's

Re: [CMake] CMake Reports Incorrect HDF5 Libraries on OS X after 3.6.0 Upgrade

2016-07-14 Thread Chuck Atkins
Hi Brennan, We also just got the Homebrew cmake formula updated to explicitly include the patch. See https://github.com/Homebrew/homebrew-core/pull/2968 - Chuck On Wed, Jul 13, 2016 at 11:10 PM, Breannan Smith wrote: > Rad, I can verify that the issue is resolved in

Re: [CMake] custom build

2016-07-29 Thread Chuck Atkins
Hi Lev, However, the target builds only if I explicitly say 'make foo_sqlite'. So > far > so good. Is there any way I can make it build if I just say 'make'? > See the add_custom_target documentation for the ALL option, https://cmake.org/cmake/help/v3.6/command/add_custom_target.html And,

Re: [CMake] FindLibXml2.cmake: rename "LIBXML2_DEFINITIONS"

2016-08-01 Thread Chuck Atkins
Hi Yaron, I think it should b renamed to "LIBXML2_COMPILE_FLAGS". > Xxx_DEFINITIONS is one of the standard variable names for a given FindXxx.cmake find module, see https://cmake.org/cmake/help/v3.6/manual/cmake-developer.7.html#standard-variable-names . > If u wish, I can submit a patch. >

Re: [CMake] Does Makefile generated by CMake support make -jN?

2016-07-13 Thread Chuck Atkins
> > Thanks for your analysis for me Andrew. I can't use "-j" options, i think > the reason is the project i dealed with is not parallel. Thus when i use "make > -jN", it couldn't work correctly every time. Obviously it caused by the > Makefile generated by CMake, so i wonder if there are some

Re: [CMake] Forcing linking compatability to old libc / libstdc++ (Linux)

2017-02-03 Thread Chuck Atkins
FWIW, we've moved to CentOS 6 for the binaries we package and distribute for ParaView. It's about the oldest widely deployed Linux distro that's still actively supported (EL5 is EOL'd and most deployments have long since moved to 6 or 7). it's binaries are compatible with virtually all current

Re: [CMake] cmake 3.7.2 centos 7 :: kwsys.testSystemTools (Failed)

2017-02-16 Thread Chuck Atkins
Hi Adrian, I'd suggest taking the issue up with the package maintainer. The upstream source for CMake 3.7.2 configures, builds, and passes all tests on EL7 so the problem seems to lie in how the RPM SPEC file is driving the build. -- Chuck Atkins Staff R Engineer, Scientific Computing

Re: [CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread Chuck Atkins
Hi YC, > cmake version on fedora 25: 3.6.2 > Fedora is specifically patching CMake in the RPM spec file to reduce the gcc flag from O3 to O2 so it's the distributuion's packaging making that change, not CMake itself. If you download and build the source from cmake.org then you'll get O3 as

Re: [CMake] [cmake-developers] how to use cmake3.7 for building fast code infedora 24

2017-02-16 Thread Chuck Atkins
you should need to do is source the setup script as I described here: source /opt/intel/bin/compilervars.sh intel64 > That should place the compilers in the search path for your current shell. -- Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. -- P

Re: [CMake] cmake 3.7.2 centos 7 :: kwsys.testSystemTools (Failed)

2017-02-15 Thread Chuck Atkins
l) = 247.03 sec [chuck.atkins@deepthought v3.7.2]$ What specific versionof EL7 are you running and which version of GCC? ------ Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www

Re: [CMake] latest cmake 3.6.1 building in AIX can not find symbol `.w32attrset`

2016-08-19 Thread Chuck Atkins
configuring your build, try adding -DCURSES_NCURSES_LIBRARY=IGNORE to prevent FindCurses from picking the wrong one. -- Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. On Fri, Aug 19, 2016 at 5:14 AM, Zeson Wu <westion...@gmail.com> wrote: > /usr/bin/g++-Wl,-bno

Re: [CMake] Correct way to use ARMCC (Files in Modules/Compiler/ARMCC*)

2016-09-30 Thread Chuck Atkins
> > 1. Toolchain needs to be in a separate file > Yes, that is certainly best practice and makes the rest of the cross-compiling infrastructure just work better. > 2. That file needs to be called before the project line of your > CMakeLists.txt > You actually shouldn't be "calling" it at

Re: [CMake] FindMPI

2016-11-28 Thread Chuck Atkins
the MPI wrappers. FindMPI will then interrogate the MPI wrappers to extract the appropriate include and link options. -- Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. On Mon, Nov 28, 2016 at 9:58 AM, Chuck Atkins <chuck.atk...@kitware.com> wrote: > Pass the

Re: [CMake] FindMPI

2016-11-28 Thread Chuck Atkins
Pass the following CMake options at configure time: -DMPI_C_COMPILER=/path/to/mpicc -DMPI_CXX_COMPILER=/path/to/mpiCC -DMPI_Fortran_COMPILER=/path/to/mpif90 -- Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. On Wed, Nov 23, 2016 at 6:05 PM, Zaak Beekman <zb

Re: [CMake] FindMPI

2016-11-28 Thread Chuck Atkins
Hi Zaak, Sorry for the first mail being so abrupt, I didn't mean to hit "send" so soon. > I took a look at the FindMPI CMake module, and it seems as though you can > set MPI_HOME to a list of directories to search. > That's also another way of doing it, which would probably be easier than

Re: [CMake] Building CMake without Curl

2016-11-02 Thread Chuck Atkins
. The default configuration of the ./bootstrap command should be using internal versions of all of CMake's dependencies. Is that causing problems for you? -- Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. On Wed, Nov 2, 2016 at 1:08 PM, Jayesh Badwaik <pub...@jayeshbadwaik

Re: [CMake] Building CMake without Curl

2016-11-03 Thread Chuck Atkins
++ Makefile processor on this system is: gmake g++ is GNU compiler g++ has setenv g++ has unsetenv g++ does not have environ in stdlib.h g++ has stl wstring - ... lots of compile output ... loading initial cache file /home/khq.kitware.com/chuck. atkins/Code/CMake

Re: [CMake] [SOLVED] RE: Crosscompilation woes

2016-10-11 Thread Chuck Atkins
that's exactly what you've done. Just confirming that yes that's a sane approach and that's how we do it to. -- Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. On Mon, Oct 10, 2016 at 9:56 AM, Robert Bielik <robert.bie...@dirac.com> wrote: > For referenc

Re: [CMake] OBJECT libraries and INTERFACE_SOURCES

2016-12-09 Thread Chuck Atkins
.: add_library(lib1-obj OBJECT $(CMAKE_CURRENT_SOURCE_DIR}/lib1.cpp). -- Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. On Fri, Dec 9, 2016 at 5:26 AM, Giovanni Funchal <g...@cloudnc.co.uk> wrote: > Hi, > > Apologies, the problem wasn't properly minimise

Re: [CMake] FindMPI

2016-12-01 Thread Chuck Atkins
> why does it not interrogate the MPI wrapper if set as FC or CC? > CC, CXX, and FC env vars are just used to initialize the CMAKE_{C,CXX,Fortran}_COMPILER variables wihch CMake will then use as the "regular" compilers for a given language. If those regular compilers already work with MPI then

Re: [CMake] FindMPI

2016-12-01 Thread Chuck Atkins
> > As far as enhancements to FindMPI go, It might be worthwhile to check if > FC, CC,CXX match any obvious MPI wrappers, and then set MPI__compiler > and select the MPI version from there: If the user set the compiler > explicitly to an MPI wrapper, that's likely the MPI they intend to use >

Re: [CMake] Duplicating a shared library and replacing target link libraries

2016-12-05 Thread Chuck Atkins
> > The library linking against "originalLibraryForward" has to be > compiled from the original sources too. Actually performing the linking step should be sufficient. Is there a way to accomplish that? > Object libraries are what you need here. See

Re: [CMake] Link to local glibc

2017-03-08 Thread Chuck Atkins
> > I'll try and see if I can compile a gcc 4.9.3 chain on the CentOS 5 > machine (I need C++11). > I'd suggest using the devtollset repo from https://people.centos.org/tru/devtools/devtools.repo > The docker container looks interesting but I haven't used it yet: does it > need some specific

Re: [CMake] Link to local glibc

2017-03-07 Thread Chuck Atkins
If you're using a newer Ubuntu environment, I'd suggest using a CentOS 5 docker container. Either that or the VM. - Chuck On Tue, Mar 7, 2017 at 1:53 PM, Marcel Loose wrote: > Hi Michele, > > This could become a painful exercise. You basically have two options: > 1) Treat it

Re: [CMake] CMAKE_SIZEOF_VOID_P question

2017-04-14 Thread Chuck Atkins
expected. ------ Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more informatio

Re: [CMake] Failed to build C++ source with CMakeLists.txt

2017-08-15 Thread Chuck Atkins
Hi Jupiter, Compiling the C compiler identification source file "CMakeCCompilerId.c" > failed. > Compiler: /usr/local/gcc/4.9.1/bin/gcc > Build flags: /usr/local/cppcms/1.1.0/include > It looks like you have an errant "/usr/local/cppcms/1.1.0/include" set in your CFLAGS environment variable, or

Re: [CMake] OBJECT libraries and working around lake of target_link_libraries

2017-07-17 Thread Chuck Atkins
Hi David, > Supporting OBJECT libraries in > target_link_libraries calls was mentioned mentioned right back here > https://cmake.org/pipermail/cmake-developers/2012-March/015422.html but > sadly seems still to be on the back burner. > It's not on the back burner! There has been progress on

Re: [CMake] CPack Multicore Usage

2017-07-21 Thread Chuck Atkins
> > In calls to cpack only one core is used if Makefiles are used. Is there > any option to enable multicore? > It depends on what your trying to achieve. Typically the bottleneck for CPack is in the compression step of the resulting tar (or rpm, etc.). In that case, CMake is limited by the

Re: [CMake] CPack Multicore Usage

2017-07-24 Thread Chuck Atkins
> > cause cpack does not "rebuild" the software again, it uses the compiled > software and just starts the "install" into its _CPack_Packages > subdirectories > Just running `cpack` does not. However, CMake does generate a "package" make target that is tied into your dependencies, so if instead

Re: [CMake] Unable to build cmoka project using cmake

2017-06-30 Thread Chuck Atkins
. -- Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. On Fri, Jun 30, 2017 at 1:17 PM, Rajesh Kumar <thisiz...@gmail.com> wrote: > Tried with cmake 3.8.2 version. Able to compile CMOCKA. > > Regards > Rajesh > > On Wed, Jun 21, 2017, 3:10 PM Rajesh Kumar <

Re: [CMake] Unable to build cmoka project using cmake

2017-06-21 Thread Chuck Atkins
Hi Rajesh, We would need more information to be useful: - What version of CMake are you using? - What compiler and version are you using? - What OS and version are you using? - Do you have separate source and build directories? - How are you running cmake? -- Chuck

Re: [CMake] Emacs cmake-mode indentation flaw

2017-06-02 Thread Chuck Atkins
(bar1 bar2 ) All of which have their justifications. -- Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. On Fri, Jun 2, 2017 at 1:57 AM, Frank Roland <theldo...@hotmail.com> wrote: > There is probably a faulty indentation implemented in cmake-mode

Re: [CMake] Different flags for compiling and linking with Fortran

2017-06-15 Thread Chuck Atkins
and C++ compilers are detected as Clang then I suspect it's rather old. They should also be detected as XL like the Fortran compiler. Do you get the same XL Fortran errors using a new version of CMake? -- Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. -- Powered by www.kitwar

Re: [CMake] setting rpath-link

2017-06-16 Thread Chuck Atkins
Hi Petros, This doesn't really answer your question but it may solve your problem a different way. I've fought this very same boost problem many times in the past. In my case it was needing to link against Matlab dev libraries, which in turn pulled their own private copy of boost in. I tried a

Re: [CMake] Bootstrap fails to detect C++11 compiler on AIX 7.1/XL C 13.1.3 toolset

2017-12-19 Thread Chuck Atkins
Hi Nathan, I am able to reproduce this error on our Dashboard machine; it should be working and clearly it's not at the moment. I will investigate... -- Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. On Tue, Dec 19, 2017 at 11:48 AM, Nathan Strong <gblues

Re: [CMake] Is there a way to obtain the current compiler standard flag?

2018-05-30 Thread Chuck Atkins
Hi Chris. Try using the the CMAKE_CXX${std}_STANDARD_COMPILE_OPTION variable. For example, the folowing piece of CMake code: cmake_minimum_required(VERSION 3.9) project(foo CXX) foreach(std IN ITEMS 98 11 14 17) message("C++${std} std flags: ${CMAKE_CXX${std}_STANDARD_COMPILE_OPTION}")

Re: [CMake] how to detect architecture ?

2018-01-19 Thread Chuck Atkins
printf("Library foo uses file %s\n", filename); return 0; } This will give you "libfoo.so" on Linux, "libfoo.dylib" on Apple, and " foo.dll" on Windows. -- Chuck Atkins Staff R Engineer, Scientific Computing Kitware, Inc. On Tue, Jan 9, 2018

  1   2   3   >