[CMake] Windows build behavior change

2020-03-06 Thread J Decker
I'm building this new windows system... I installed the latest cmake I'm attempting to build this project with visual studio 1) it couldn't find an assembler until I put gcc in the path (i'm not sure what part is requiring assembly I'll dig into that later) I added NASM to the path, and that didn'

Re: [CMake] building cmake without the bootstrap step

2019-12-12 Thread René J . V . Bertin
Never mind, this tweak to the bootstrap script should take care of anything not directly obvious. Could do with an automated test of the installed version but the accepted version range is so large that doesn't seem to be the trouble. ``` if [ -x ${cmake_prefix_dir}/bin/cmake ] ;then # use the

Re: [CMake] building cmake without the bootstrap step

2019-12-12 Thread René J . V . Bertin
On Thursday December 12 2019 09:36:03 Kyle Edwards wrote: >If you want to skip bootstrapping, you can use a pre-existing CMake >binary for your system to build the new CMake. > >This mailing list is deprecated. Please head over to Discourse for >further discussion: OK, thanks. To finish things up

[CMake] building cmake without the bootstrap step

2019-12-12 Thread René J . V . Bertin
Hi, If I understand correctly, configuring CMake for building means bootstrapping a basic version of itself which is then run on the included CMakeLists.txt file. That takes a lot of time (comparatively) which begs the question if there's a more-of-less official way to skip the bootstrap and ju

Re: [CMake] Missing dll on program startup - a way automate it?

2019-11-21 Thread J Decker
Can also add install rules so you get an INSTALL target, and then you can just build that, and everything will end up in the right place. On Thu, Nov 21, 2019 at 3:56 AM Fred Baksik wrote: > Adding the relevant directories to PATH in the debugger or build > environment should allow them to be f

[CMake] MSVC Version Location for VisualStudio Install

2019-11-12 Thread J. Caleb Wherry
All, I have been adding support for VS2019 to our build and ran into some CMake code that was hard coded for a specific version related to MSVC. Specifically, it is the folder under the VS install dir with version like "14.23.28105". It is in the path for where the compiler is found but I can't fi

Re: [CMake] ExternalProject_Add Visual Studio build Install Target

2019-10-20 Thread J Decker
On Sat, Aug 31, 2019 at 9:56 PM J Decker wrote: > Why does it seem I'm the only one with this problem? > This is an external CMakeLists.txt that fails. cmake_minimum_required(VERSION 3.15) set_property(GLOBAL PROPERTY USE_FOLDERS On) project( B ) include( Exte

Re: [CMake] How to make a hierarchical application using CMake?

2019-10-14 Thread J Decker
In the build directory, the build rules are generally like the would be in the source too... so you can just go into src/libwhatever and do 'make' in that branch. like if your target was visual studio or some IDE, you could click on a single project to build, and it would of course check and build

Re: [CMake] ?==?utf-8?q? Looking for an explanation: What exactly means "install" in cmake language?

2019-10-07 Thread J Decker
A note - INSTALL( FILES ) is only good for data files, if you have scripts that have executable permissions using INSTALL( PROGRAMS ) will get execute flag set too. On Mon, Oct 7, 2019 at 7:49 AM Cornelis Bockemühl wrote: > Thanks to both you and J Decker: I would say that this is still

Re: [CMake] Looking for an explanation: What exactly means "install" in cmake language?

2019-10-07 Thread J Decker
Install steps are done with `cmake --build . --target install` (or --target INSTALL on some generators) It's done after the build is complete, if the build step fails, it will not install. (Install depends on build automatically) The install steps can also be used by --target package - which you

Re: [CMake] Single library with both shared and static binaries

2019-09-26 Thread J Decker
I ended up using external_project() because unless you also copy the source files, each source file each only gets one set of flags... so if you have different compile options (the config file I suppose) the sources will only build with one or the other. If you copy all of the sources to the CMAKE

Re: [CMake] ExternalProject_Add Visual Studio build Install Target

2019-08-31 Thread J Decker
bInfo\InterShell.Service.exe .. (completes successfully ) On Thu, Apr 25, 2019 at 1:27 AM J Decker wrote: > I've had to make this modification the last few versions... > > cmake/share/cmake-3.14/Modules/ExternalProject.cmake > > line 1870 from > > if(step

Re: [CMake] How to specify VS2017 compilers when on VS2019

2019-08-16 Thread J Decker
can just specify the 2017 generator, 2019 will load an build it just fine. If 2017 is still opening when you double-click a solution, change your default handler for .sln files to 2019. Again, 2019 can build projects as is for 2017, 2015, etc... On Fri, Aug 16, 2019 at 11:19 AM Michael Jackson <

[CMake] Cmake Path Please

2019-07-30 Thread J Decker
THere's (some) error messages that don't include the full path of the CMakeLists.txt, so I don't know what 'top level' is. It would be nice if CMakeLists.txt had the full ${CMAKE_SOURCE_DIR} (?) prepended to it. This is built as an external project of another top level project, which itself is bu

Re: [CMake] GHS - specify cpu option to CMake generator?

2019-07-23 Thread Geoffroy J
9 at 02:13, frodak17 wrote: > > On Fri, Jul 19, 2019 at 2:52 PM Geoffroy J > wrote: > >> Hello >> >> i have tried today to build a library using CMake Green Hills MULTI >> generator. >> >> It seemed to work quite well, but i end up not being able

Re: [CMake] add my own language-name using standard functions

2019-07-19 Thread J. Caleb Wherry
Also, I would not suggest using the Java language support as reference as it is not a first class supported language. As you said, it defines custom functions and macros to do everything. I would suggest you look at the C# support as it is a first class language (meaning: you can add it to your pr

[CMake] GHS - specify cpu option to CMake generator?

2019-07-19 Thread Geoffroy J
Hello i have tried today to build a library using CMake Green Hills MULTI generator. It seemed to work quite well, but i end up not being able to configure the "-cpu" option for gbuild, which i need to set to "cortexa7". I've went through the CMake code, i think something similar to variable GHS

Re: [CMake] how to set current source directory relative to external project

2019-07-09 Thread J Decker
On Tue, Jul 9, 2019 at 1:24 PM hex wrote: > On 09/07/2019 18:25, J Decker wrote: > > > On Tue, Jul 9, 2019 at 9:38 AM hex wrote: > >> >> I think the better solution now is to make it relative to build directory >> and force out of source builds. >> >

Re: [CMake] how to set current source directory relative to external project

2019-07-09 Thread J Decker
On Tue, Jul 9, 2019 at 9:38 AM hex wrote: > thank you J Decker for your reply. > > > Your suggestion does work but I want to preserve standalone use of the > project, meaning that I want a reference to CMake source root directory. > > Assuming there is only 1 hierarchy

Re: [CMake] how to set current source directory relative to external project

2019-07-09 Thread J Decker
On Tue, Jul 9, 2019 at 5:35 AM hex wrote: > hello CMake community, > > > I am experimenting with external projects. I have some files in an > external project which are generated in `${CMAKE_SOURCE_DIR}`. > > > When I add the external project, however, it is using > `${CMAKE_SOURCE_DIR}` of the e

Re: [CMake] CMake is Converting lists to strings

2019-06-12 Thread J Decker
I know... just need to rebuild a new list... something like set( _ALL_INCLUDES ) foreach( INC ${ALL_INCLUDES}) string(REPLACE "../" "" INC ${INC}) LIST( APPEND _ALL_INCLUDES ${INC} ) endforeach( INC ) set( ALL_INCLUDES ${_ALL_INCLUDES}) On Wed, Jun 12, 2019

[CMake] CMake is Converting lists to strings

2019-06-12 Thread J Decker
I'm collecting sources and includes into a parent scope variable, and then attempting to use that variable to reference the right sources. Sources get added to the list as ../(theirpath)/(source) so in the parent level I can simply replace "../" with "" and then they are relative in the right place

Re: [CMake] Question about getting git branch name.

2019-06-08 Thread J Decker
On Sat, Jun 8, 2019 at 3:25 PM Steven Truppe wrote: > Hi everyone, > > i want to have code lines like: > > #define BUILD_VERSION > > and the BUILD_VERSION should be the name of the actual branch the code > was compiled with, this way i can create a branch for each version and > name it like 0.1 s

Re: [CMake] ALL_BUILD with msbuild

2019-05-13 Thread J. Caleb Wherry
om the documentation, it sounds like we > really do want to build the ALL_BUILD target, but I'm not sure how to get > the ZERO_CHECK project to properly build with msbuild. I can probably use > EXCLUDE_FROM_DEFAULT_BUILD as a workaround in the meantime, though. > > On Mon, May 13, 2019

Re: [CMake] ALL_BUILD with msbuild

2019-05-13 Thread J. Caleb Wherry
I do not specify the project name when running my main build, I call msbuild like you do in #2. How do you exclude things from ‘all’? I’ve actually ran into issues with VS and how pressing “Build” in the IDE and running on the command line do different things. This comes down to 2 target propertie

Re: [CMake] MSVC: How to configure manifest settings?

2019-05-02 Thread J Decker
Depends on your generator. It can be as simple as including the .manifest in your sources list. Otherwise you may have to make an extra mt.exe invokation... https://github.com/d3x0r/SACK/blob/master/src/utils/service/CMakeLists.txt#L42-L53 On Thu, May 2, 2019 at 12:48 AM Fredrik Orderud wrote:

[CMake] ExternalProject_Add Visual Studio build Install Target

2019-04-25 Thread J Decker
I've had to make this modification the last few versions... cmake/share/cmake-3.14/Modules/ExternalProject.cmake line 1870 from if(step STREQUAL "INSTALL") list(APPEND args --target install) endif() to if(step STREQUAL "INSTALL") list(APPEND args --target INST

[CMake] Add Custom Command after strip

2019-04-22 Thread J Decker
I'm trying to use MingW64-x86 to compile this project. I'm using MingW Makefiles as the generator. Some of the executable files need 'mt.exe' run to add a manifest to them (on windows). The MT.exe breaks the .exe for strip such that it says 'file has been truncated' and the build stops. Strip is

Re: [CMake] Make Visual Studio stop on error

2019-04-12 Thread J Decker
well you can just ctrl-break and stop it. a lot of times changing things doesn't cause everything to rebuild, so while fixing that small nuisance ... ya nevermind. On Fri, Apr 12, 2019 at 2:06 PM Rob Boehne wrote: > Thank you! > > But wow, I’m shocked that it can’t do this. It’s surprising that

Re: [CMake] 3.14.1 Issue with external project?

2019-04-07 Thread J Decker
> > Sorry it's probably a user error. > > -- 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 information on each offering, please visit: CMake Sup

[CMake] 3.14.1 Issue with external project?

2019-04-07 Thread J Decker
Under linux, I recently updated everything, and now have cmake 3.14.1. It's failing to build a project which has external projects with external projects itself... I'm not sure what a simple case is that fails. The previous version that worked was 3.13.4 (3.12.4 also) On Windows I was using cmak

[CMake] De-duplication with generator expressions

2019-03-28 Thread Wilke, Jeremiah J via CMake
I am passing several LLVM/Clang passes, which means I need arguments not de-duplicated: -Xtemplight -profiler -Xtemplight -ignore-system Otherwise I would get templight++ -Xtemplight -profiler -ignore-system which crashes. The SHELL: trick works in some cases. However, I also have scenari

Re: [CMake] CMake Project Generation Speedup

2019-03-20 Thread J. Caleb Wherry
I was also surprised when "cmake --trace" gave 0 information related to the generate step. I assume this is expected behavior? Oh and: CMake: 3.13.4 Visual Studio 2017 15.9.9 Win7 -Caleb On Wed, Mar 20, 2019 at 4:53 PM J. Caleb Wherry wrote: > Did anything ever come of this?

Re: [CMake] CMake Project Generation Speedup

2019-03-20 Thread J. Caleb Wherry
www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake -- J. Caleb Wherry *Scientific Software Engineer* <http://www.calebwherry.com> http://www.calebwherry.com +1 (615) 708-5651 calebwhe...@gmail.

[CMake] cmake and high-dpi support on Mac

2019-03-13 Thread René J . V . Bertin
Hi, CMake had hardcoded default support for high-dpi screens in the applications it generated for Apple's desktop OS at some point, but that was removed very quickly in 286c75f7f034c5fdcd43bcb755da74d09c809642. It is my understanding that you don't actually need to set the high-dpi key explici

[CMake] CMAKE_AR/NM/RANLIB require full path?!

2019-02-20 Thread René J . V . Bertin
Hi, I just got some build failures when changes to my build scripts led to configuring with -DCMAKE_AR=ar (RANLIB=ranlib, etc). The documentation isn't explicit on what these parameters expect so I assumed that it should be fine to set them to a command name, as with CMAKE__COMPILER. Wrong! C

Re: [CMake] CMake Dependence on C: drive?

2019-02-19 Thread J. Caleb Wherry
Seems strange. Just yesterday I pulled down 3.13.4 and had no issues. I check cmake into our repo so it gets invoked on an assortment of different drives. I do the same thing you do and just change our bat config file to point to the new cmake binary. Never had any issues. I am running on Win7 but

Re: [CMake] [EXTERNAL] Re: Linking to boost on OS X 10.12

2019-02-06 Thread Stephens, J. Adam via CMake
libraries because their install names do not contain @rpath. Thanks for the suggestion. -- J. Adam Stephens, Ph.D. Dakota Support Analyst https://dakota.sandia.gov/ Optimization and UQ Sandia National Laboratories Albuquerque, NM From: Juan Sanchez Date: Tuesday, February 5, 2019 at 3:37 PM To

Re: [CMake] [EXTERNAL] Re: Linking to boost on OS X 10.12

2019-02-06 Thread Stephens, J. Adam via CMake
of a mechanism in CMake that would allow us to run install_name_tool on our executables as a final step in the build process? Thanks again for your help. Adam -- J. Adam Stephens, Ph.D. Dakota Support Analyst https://dakota.sandia.gov/ Optimization and UQ Sandia National Laboratories Albuquerqu

Re: [CMake] [EXTERNAL] Re: Linking to boost on OS X 10.12

2019-02-05 Thread Stephens, J. Adam via CMake
at 2:25 PM Stephens, J. Adam via CMake wrote: > > Hello, > > > > The project I work on links to several shared boost libraries. After our organization disallowed use of OS X 10.11 and we upgraded our built/test slave to 10.12, we encountered a problem w

[CMake] Linking to boost on OS X 10.12

2019-02-05 Thread Stephens, J. Adam via CMake
names that look like @rpath/libboost_foo.dylib in the build tree executables, I think the linker will still be unable to find them. What is the best (or least bad) way to fix this? Thanks! Adam -- J. Adam Stephens, Ph.D. Dakota Support Analyst https://dakota.sandia.gov/ Optimization and UQ

Re: [CMake] Concurrency issues with copy_if_different

2018-12-08 Thread J. Caleb Wherry
write wrappers around creating targets then you can do extra book keeping when a target is create. In this case, you just add another depends on the custom target that copies the dependent libs. -Caleb On Sat, Dec 8, 2018 at 7:14 PM Olivier Croquette wrote: > On 2018-7-12 15:16, J. Caleb Whe

[CMake] Supporting imported targets with and without namespaces

2018-12-06 Thread Wilke, Jeremiah J via CMake
We are cleaning up the cmake in our project. Targets are not currently exported with namespaces, but ideally should be. However, we have enough users based on the old cmake that we don’t want to require people to use the namespaced target (for a while). I couldn’t find recommendations on this i

Re: [CMake] support for -fsyntax-only (and generating Qt/KDE's auto-generated content)

2018-10-09 Thread René J . V . Bertin
Sylvain Joubert wrote: > My use case is for static analysis builds. For example, my CI setup has > multiple of them including cppcheck, clang-tidy and iwyu through the > CMake integration. And since I'd like to keep separate builds for each > of them this requires 3 full build whose results I don'

[CMake] support for -fsyntax-only (and generating Qt/KDE's auto-generated content)

2018-10-09 Thread René J . V . Bertin
Hi, Apologies, longish post ahead. I've tried to present my idea and the thought train leading up to it as succinctly as possible. Hope I at least strike a chord! Clang and GCC have long supported an option that makes them stop after the syntax-verification stage: -fsyntax-only . This has the

Re: [CMake] Why does CMake 3.9.0 open VS2017 when targeting 2013 after installing 2017... sigh.

2018-10-01 Thread J. Caleb Wherry
The Visual C++ team sheds a little more light on this: https://blogs.msdn.microsoft.com/vcblog/2018/10/01/cuda-10-is-now-available-with-support-for-the-latest-visual-studio-2017-versions/ Glad they listened to the community and worked with NVIDIA to make this work. We’ve been holding off migrati

Re: [CMake] Warning when building static & shared library (DLL) on Windows

2018-09-30 Thread J Decker
On Sun, Sep 30, 2018 at 3:12 AM Kim Walisch wrote: > Hi, > > I have recently found out about CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS which > allows > to easily build a shared library i.e. DLL on Windows. It works great and > it is an awesome > feature however I have run into a warning on Windows (using

Re: [CMake] How to duplicate a source file and rename it

2018-09-21 Thread J Decker
On Fri, Sep 21, 2018 at 3:29 PM J Decker wrote: > > > On Fri, Sep 21, 2018 at 3:24 PM Ke Gao wrote: > >> Thanks. I forgot to say my CMakeList.txt is not located together with the >> source files. So I used the following, it seems not working: >&

Re: [CMake] How to duplicate a source file and rename it

2018-09-21 Thread J Decker
... NOt sure why it wouldn't work unless current_source_dir isn't what you think it is. I actually copy mine into COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SOURCE} ${CMAKE_BINARY_DIR}/${BASENAME} (basename is the path part of the ${SOURCE}) > >

Re: [CMake] How to duplicate a source file and rename it

2018-09-21 Thread J Decker
On Fri, Sep 21, 2018 at 3:00 PM Ke Gao wrote: > Hi, > > In a project, I need to first duplicate a source file and rename it. For > example, I want to change "file.c" to "aaa_file.c", and after compiling, I > will delete it. This is similar to using "cp file.c aaa_file.c". How to > easily do this

Re: [CMake] How to have Visual Studio 15 2017 actually use a 64 bit toolchain.

2018-09-21 Thread J Decker
> Studio 14.0/VC/bin/amd64/cl.exe > -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual > Studio 14.0/VC/bin/amd64/cl.exe -- works > > > _____ > Mike Jackson mike.jack...@bluequartz.net &

Re: [CMake] How to have Visual Studio 15 2017 actually use a 64 bit toolchain.

2018-09-21 Thread J Decker
"C:/tools/unix/cmake/bin/cmake.exe" -G "Visual Studio 15 2016 Win64" -T "v140" .. C:\tools\unix\cmake\bin\cmake.exe --build . --config "Debug" --target "INSTALL" On Fri, Sep 21, 2018 at 8:26 AM Michael Jackson wrote: > So I tried using "-DCMAKE_GENERATOR_TOOLSET=x64" while configuring a clean >

[CMake] SOVERSION and Mac library id in shared library made from assembly files

2018-09-11 Thread René J . V . Bertin
Hi, I have a little project that creates a shared library from a pair of assembly files. I've been trying to follow examples such that the generated library - has versioning (libFastCompression.1.dylib on Mac or libFastCompression.so.1 on Linux) - has the full path as its ID on Mac I get this

Re: [CMake] cmake prebuilt binaries won't work if bin folder is renamed.

2018-09-05 Thread J Decker
You will need to rename the directory containing bin; the share folder scripts is often very dependant on the bin (or vice versa) ... better to just keep like 'cmake' and then 'cmake-3.xx' directories containing the whole cmake package... On Tue, Sep 4, 2018 at 11:47 PM Vinitha wrote: > Hi, > I

Re: [CMake] Project referring to CSharp project generates incorrectly?

2018-08-16 Thread J. Caleb Wherry
# targets as that is a specific notion to open native libs with dlopen(). That ticket even hints at only allowing specific target types, possible module was just overlooked? -Caleb On Thu, Aug 16, 2018 at 6:55 PM J. Caleb Wherry wrote: > FWIW: I do almost this exact thing currently and have no iss

Re: [CMake] Project referring to CSharp project generates incorrectly?

2018-08-16 Thread J. Caleb Wherry
FWIW: I do almost this exact thing currently and have no issues (even mix in Managed C++ wrappers around naive code). The only difference is that I don’t compile any C# modules, only Shared libs. Not sure if that could be a problem or not. I’m using CMake 3.11 and VS 2015. -Caleb On Thu, Aug 16,

Re: [CMake] Why does CMake 3.9.0 open VS2017 when targeting 2013 after installing 2017... sigh.

2018-08-16 Thread J Decker
On Thu, Aug 16, 2018 at 9:18 AM Brian Davis wrote: > > > On Wed, Aug 15, 2018 at 11:58 AM, Robert Maynard < > robert.mayn...@kitware.com> wrote: > >> The MSVC / CUDA support recently has been very challenging to keep track >> of. In general CUDA will only support a single patch release of MSVC, a

Re: [CMake] Expected behaviour of #cmakedefine

2018-08-15 Thread J. Caleb Wherry
I suppose it all depends on if there are situations where you don’t want those variables set? To me, it doesn’t make sense to ever not have version numbers set so I would use #define. -Caleb On Wed, Aug 15, 2018 at 8:32 AM Ian Cullen wrote: > Hi, > > I'm trying to create a header file containin

Re: [CMake] Why does CMake 3.9.0 open VS2017 when targeting 2013 after installing 2017... sigh.

2018-08-14 Thread J Decker
Visual studio 2017 is able to keep old project types and build them as is... so it is using the 2013 tools even though loaded in the 2017 IDE. I noticed this because the command line build tools are 2015, so if I configure a project for node; it gets built as 2015, and the visual studio project whe

Re: [CMake] Add Windows library dependency

2018-07-27 Thread J Decker
should just be add_executable( whatever_target secur32 ) On Fri, Jul 27, 2018 at 8:05 PM Theodore Hall wrote: > Greetings, > > I'm building a project that depends on a Windows library -- Secur32.Lib -- > that is included in the regular library search path but is not one of the > specific librar

Re: [CMake] Fwd: GLOB_RECURSE

2018-07-25 Thread J. Caleb Wherry
Latest CMake documentation can be found here: https://cmake.org/cmake/help/latest/ Searching for GLOB_RECURSE there leads to this page: https://cmake.org/cmake/help/latest/command/file.html Which is the command you are using. Docs for the command and option you are using are here: https://cmak

Re: [CMake] Concurrency issues with copy_if_different

2018-07-12 Thread J. Caleb Wherry
Had the same problem and went with #2 -Caleb On Thu, Jul 12, 2018 at 1:58 AM Olivier Croquette wrote: > Hello, > > in one of our projects, we use copy_if_different to copy some DLLs > required by the runtime. It's called as post-build action. The problem > is that several targets want to copy t

Re: [CMake] Cannot prevent import library from being created with VS generator

2018-07-09 Thread J. Caleb Wherry
I’m also interested in this. Side note 1: Things like this eventually lead me to have a post process (a python script) on all my VS project files to “fix” any issues like this. If I can’t figure out a way to do something specific in a VS project, I just add it to my post process until I eventually

Re: [CMake] wix msi csharp dotnet project type

2018-07-09 Thread J. Caleb Wherry
ke.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > https://cmake.org/mailman/listinfo/cmake > -- J. Caleb Wherry *Scientific Software Engineer* <http://ww

Re: [CMake] CMakeLists.txt in different place than source

2018-06-13 Thread J Decker
On Wed, Jun 13, 2018 at 9:46 PM Andrew White wrote: > J Decker wrote: > > You can define a variable to define the base of the sources > > set( SOURCE_ROOT /some/path ) > > > > could be set relative to the current cmake path per cmake that uses those > >

Re: [CMake] CMakeLists.txt in different place than source

2018-06-13 Thread J Decker
On Tue, Jun 12, 2018 at 7:22 PM Andrew White wrote: > I have a situation where I want my CMakeLists.txt in a different place > than my source. > > e.g.: > > /some/path/project/CMakeLists.txt > /other/path/source/src/a.c > /other/path/source/include/a.h > > Is there an easy way to say "process th

Re: [CMake] losing CMakeCache.txt after changing the compiler...

2018-06-07 Thread René J . V . Bertin
Marc CHEVRIER wrote: > If you have multiple compilers or even multiple versions of a compiler, by > managing carefully environment variables (i.e. PATH variable for example) > by using some bash functions, you can easily ensure to use always the > correct compiler for each build environment. That

Re: [CMake] losing CMakeCache.txt after changing the compiler...

2018-06-06 Thread René J . V . Bertin
Marc CHEVRIER wrote: > You can easily avoid this bad experience by using different builds > environments : one per compiler ! You mean one build directory per compiler? That can be very disk-expensive, and it doesn't solve the issue (e.g. you clone an environment and then change the compiler -

[CMake] losing CMakeCache.txt after changing the compiler...

2018-06-02 Thread René J . V . Bertin
Hi, This happened once too often for me: I apply successive tweaks to a CMakeCache file, reinvoke make (or ninja) and then at some point lose everything because I forgot that changing the compiler is a "lethal" operation. Why does cmake have to throw away the entire cache file when something ch

Re: [CMake] How to update librarian section of project properties for a visual studio project using cmake?

2018-05-15 Thread J. Caleb Wherry
gt; CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > https://cmake.org/mailman/listinfo/cmake > > -- J. Caleb Wher

Re: [CMake] How to update librarian section of project properties for a visual studio project using cmake?

2018-05-15 Thread J. Caleb Wherry
tml > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > https://cmake.org/mailman/listinfo/cmake > > -- J. Caleb

Re: [CMake] include restbed in my project

2018-05-09 Thread J Decker
gested but I was able to get it working based on this > https://github.com/josesj/rest-json-cpp-boilerplate > > It uses find_package and etc. ... maybe a little overkill, I don't know. > But at least I got off the ground. :) > > On Sat, May 5, 2018 at 12:09 PM J Decker wrote:

Re: [CMake] include restbed in my project

2018-05-05 Thread J Decker
for such things I often include the sources in my tree and just 'add_subdirectory( "extra/restbed" )' it's cleaner to do a external project rule... which can download/checkout sources and then build those and the output is findable by other projects just by referencing the targets. https://cmake.or

Re: [CMake] PreprocessToFile

2018-05-05 Thread J Decker
from the project. So; unless you want it ENABLED correct behavior should be to not write it (which, like I said, cmake already does (or rather doesn't do)) > = > > > > > false > > > > > > false > > > > > > = > > Am

Re: [CMake] PreprocessToFile

2018-05-05 Thread J Decker
On Sat, May 5, 2018 at 7:02 AM, Kristian wrote: > Hi, > > I have a Visual Studio 2015 Solution with some C++ projects in it. I > try to generate the same solution and the projects with CMake. Now, > there is a part, where I do not know how to solve this. > > In a vcxproj file, there is something

Re: [CMake] Multiple "projects" one directory

2018-04-27 Thread J Decker
You can solve this by treating those local projects as external projects; then they can be built with independant flags include( ExternalProject ) https://github.com/d3x0r/SACK/blob/master/CMakeLists.txt#L1769 ExternalProject_Add( ppc_portable SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/makefiles

Re: [CMake] define addition search path for .cmake files

2018-02-17 Thread J. Caleb Wherry
https://cmake.org/cmake/help/latest/variable/CMAKE_MODULE_PATH.html#variable:CMAKE_MODULE_PATH Should do the trick. Set it before you call project, not sure if it works after that or not. -Caleb On Sat, Feb 17, 2018 at 7:47 AM wrote: > > > Hi! > > So, I have separate installation (root) path f

Re: [CMake] How to add files to Visual Studio 'Utility' project

2018-02-02 Thread J. Caleb Wherry
d=7835 > > May be this is a plain feature request that should be properly written > based on history and current usage. > Typically I think that anyone would want to add any file to IDE project > display. > > > 2018-02-02 14:57 GMT+01:00 J. Caleb Wherry : > >> Ye

Re: [CMake] How to add files to Visual Studio 'Utility' project

2018-02-02 Thread J. Caleb Wherry
s implies that the target was created by one the > commands add_library or add_executable. > > > > > > *From: *CMake on behalf of "J. Caleb Wherry" < > calebwhe...@gmail.com> > *Date: *Thursday 1 February 2018 at 19:30 > *To: *CMake ML > *Su

Re: [CMake] CMake + mdvc + --build + jenkins

2018-02-01 Thread J. Caleb Wherry
> > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > https://cmake.org/mailman/listinfo/cmake > > -- J. Caleb Wherry *Scientific Software Engineer* <http://www.calebwherry.com>

[CMake] How to add files to Visual Studio 'Utility' project

2018-02-01 Thread J. Caleb Wherry
Hello! I am having trouble with a generated VS project that I hope is either a bug or has an easy fix... When using UseJava, the add_jar function, and Visual Studio 2015, a VS 'Utility' project is created. I then want to add additional non-compiled files to this project so I try to use target_sou

Re: [CMake] Relaying all command line arguments from SuperBuild to ExternalProject_Add

2018-01-31 Thread J Decker
(platfrom defines is a variable suitable for like ADD_DEFINITIONS( ${PLATFORM_DEFINES} ) string( REPLACE ";" " " PLATFORM_DEFINES_ARG "${PLATFORM_DEFINES}" ) ExternalProject_Add( target CMAKE_ARGS -DPLATFORM_DEFINES=${PLATFORM_DEFINES_ARG} .. ) and in the target cmakelists

Re: [CMake] Hard to do if in Macro

2018-01-30 Thread J Decker
f(0) > test(OFF) -> if(OFF) > > CMake macros have a lot of specific and potentially weird/counterintuitive > behaviour. In general, you should always write your commands as functions > and only resort to macros if you explicitly need their specific behaviour. > > Petr &

[CMake] Hard to do if in Macro

2018-01-30 Thread J Decker
Why do I have to do if( ${M__ANDROID__} EQUAL 1 OR ${M__ANDROID__} STREQUAL "ON") endif( ${M__ANDROID__} EQUAL 1 OR ${M__ANDROID__} STREQUAL "ON") in a macro like... -- set( __ANDROID__ 1 ) macro( test __ANDROID__ ) if( ${__ANDROID__} EQUAL 1 OR ${__ANDROID__} STREQUAL "O

Re: [CMake] Recommandation for macOS framework install rules

2018-01-17 Thread J Decker
It's not entirely related other than Mac I had to test if( __COMPILER_GNU AND NOT CMAKE_COMPILER_IS_GNUCC ) instead of just CMAKE_COMPILER_IS_GNUCC (which was unset) __COMPILER_GNU was found after doing a dump... I suppose there's some modern way I'm supposed to test GCC that works on all

Re: [CMake] How can I create a C executable and C++ library from the same source

2018-01-17 Thread J Decker
No. CMake tracks each source file name exactly once. If you set properties on it, it will be treated that way always. Have to make a copy of the source to cpp... copies to cmake_binary_dir/ plusplus_file_dup is the resulting list ( https://github.com/d3x0r/SACK/blob/master/CMakeLists.txt#L655 )

Re: [CMake] Making sure dependent projects are up-to-date

2018-01-13 Thread J Decker
maybehttps://cmake.org/cmake/help/v3.2/module/ExternalProject.html BUILD_ALWAYS 1No stamp file, build step always runs On Fri, Jan 12, 2018 at 7:41 PM, Saad Khattak wrote: > Hi, > > Let's say I have several CMake enabled libraries that have their own > respective build directories and have been

Re: [CMake] Source file property INCLUDE_DIRECTORIES

2018-01-12 Thread J Decker
see > !1596 <https://gitlab.kitware.com/cmake/cmake/merge_requests/1596>). > > > Okay :) Glad someone is on it. Will also work for set_property( SOURCE ... APPEND PROPERTY INCLUDE_DIRECTORIES ) ? > > > *From: *CMake on behalf of J Decker < > d3c...@gmail.com> > *Date:

[CMake] Source file property INCLUDE_DIRECTORIES

2018-01-12 Thread J Decker
Why can't I set INCLUDE_DIRECTORIES for a source file? https://cmake.org/cmake/help/v3.0/manual/cmake-properties.7.html I can probably use COMPILE_FLAGS ; but how to guarantee that -I is the proper option for every compiler? -- Powered by www.kitware.com Please keep messages on-topic and check

Re: [CMake] how to detect architecture ?

2018-01-09 Thread J Decker
On Tue, Jan 9, 2018 at 6:57 AM, Franck Houssen wrote: > Is there a way to detect architecture ? > > Seems there is nothing simple since these old threads : > https://stackoverflow.com/questions/11944060/how-to- > detect-target-architecture-using-cmake/12024211#12024211 > https://stackoverflow.com

Re: [CMake] configure_file: escaping (single) quotes

2018-01-09 Thread J Decker
On Tue, Jan 9, 2018 at 1:29 AM, J Decker wrote: > > > On Tue, Jan 9, 2018 at 1:24 AM, Franck Houssen > wrote: > >> Hello, >> >> I need configure_file to produce a bash file containing this line: >> VAR="${VAR//*'*#*'*/}" >> &g

Re: [CMake] configure_file: escaping (single) quotes

2018-01-09 Thread J Decker
On Tue, Jan 9, 2018 at 1:24 AM, Franck Houssen wrote: > Hello, > > I need configure_file to produce a bash file containing this line: > VAR="${VAR//*'*#*'*/}" > > maybe VAR="$" "{VAR//*'*#*'*/}" > I tried without success VAR="${VAR//*'*#*'*/}" and VAR="${VAR//*\'*#*\'*/}" > with and without ES

Re: [CMake] CMake: using dlopen

2018-01-08 Thread J Decker
On Mon, Jan 8, 2018 at 1:50 AM, Franck Houssen wrote: > And so, if I have an executable (add_executable), the default thing to do > is to use target_link_libraries(mylib PRIVATE ...). Not PUBLIC (as I do). > Correct ? > Yes, unless you have plugins that then back-ljnk against that executable. (a

Re: [CMake] CMake: using dlopen

2018-01-08 Thread J Decker
On Mon, Jan 8, 2018 at 1:41 AM, Franck Houssen wrote: > > > - Mail original - > > De: "Rainer Poisel" > > À: "Franck Houssen" > > Envoyé: Dimanche 7 Janvier 2018 19:34:21 > > Objet: Re: [CMake] CMake: using dlopen > > > > Hi, > > > > On Sun, Jan 7, 2018 at 7:13 PM, Franck Houssen > > w

Re: [CMake] CMake: using dlopen

2018-01-06 Thread J Decker
ds it as a -L option to be searched with standard library functions. On Sat, Jan 6, 2018 at 8:41 AM, Franck Houssen wrote: > > -- > > *De: *"J Decker" > *À: *"Franck Houssen" > *Cc: *"CMake Mail List" > *Envoyé: *Sa

Re: [CMake] CMake: using dlopen

2018-01-06 Thread J Decker
probably just need target_link_libraries( dl ) On Sat, Jan 6, 2018 at 6:34 AM, Franck Houssen wrote: > Hello, > > I have an executable that needs dlopen. > > Googled this a bit: seems (surprisingly) there is no FindDLUtils ?!.. > Correct ? If so, why is this ? > My understanding is that I need

Re: [CMake] MinGW Compilers on Windows

2017-12-15 Thread J Decker
On Fri, Dec 15, 2017 at 7:39 AM, Kevan Hashemi wrote: > Dear Alan, > > Thank you for your encouragement to use the "MinGW Makefiles" generator on > Windows, and for pointing out the mingw32-make alternative to just "make" > in MSYS. > > So if you are further interested in the "MinGW Makefiles" ge

Re: [CMake] SWIG_ADD_LIBRARY Documentation?

2017-12-09 Thread J. Caleb Wherry
ers -- and sorry for > dropping the mailing list. > > It seems very foreign to me to load a static library at runtime -- oh well. > > How is 'MODULE' different from 'SHARED' ? > > Rob > > > On Sat, Dec 9, 2017 at 11:08 AM, J. Caleb Wherry &

Re: [CMake] SWIG_ADD_LIBRARY Documentation?

2017-12-09 Thread J. Caleb Wherry
ference of these choices? > > Rob > > > > > On Sat, Dec 9, 2017 at 9:43 AM, J. Caleb Wherry > wrote: > > USE_BUILD_SHARED_LIB literally means use whatever is set by > > BUILD_SHARED_LIBS. Typically, this is the preferred method for either > > building a st

Re: [CMake] SWIG_ADD_LIBRARY Documentation?

2017-12-09 Thread J. Caleb Wherry
USE_BUILD_SHARED_LIB literally means use whatever is set by BUILD_SHARED_LIBS. Typically, this is the preferred method for either building a static or shared lib since the user can control what they want/need. You don’t have to specify the type of lib to build when calling add_library, it uses shar

  1   2   3   4   5   6   7   8   9   10   >