[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] 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

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] 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] 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

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 >

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] 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] 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] 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] 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] 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] does cmake scripts execute sequentially?

2017-10-28 Thread J Decker
On Sat, Oct 28, 2017 at 6:10 PM, Carlton Banks wrote: > > Den 29. okt. 2017 kl. 02.06 skrev J Decker : > > I recently added externaproject_add() to download a library, but since it > doesn't do the download until build, I had to put a conditional around the > second part

Re: [CMake] does cmake scripts execute sequentially?

2017-10-28 Thread J Decker
On Sat, Oct 28, 2017 at 6:15 PM, Craig Scott wrote: > > > On Sun, Oct 29, 2017 at 12:06 PM, J Decker wrote: > >> I recently added externaproject_add() to download a library, but since it >> doesn't do the download until build, I had to put a conditional around th

Re: [CMake] does cmake scripts execute sequentially?

2017-10-28 Thread J Decker
I recently added externaproject_add() to download a library, but since it doesn't do the download until build, I had to put a conditional around the second part of the cmake that used the libraries it produced so it would do a cmake configure/generate, cmake build, cmake configure/generate and a fi

[CMake] Silent crash on infinite recursion

2017-10-25 Thread J Decker
If a script recursively calls itself (ir indirectly causes a infinite recursion of includes) cmake silently exits, and does not tell why. I finally managed to get cmake --trace-expand --debug-output .. to show some useful information. --debug-output with --build causes cmake to try to run in confi

[CMake] externalproject_add install_dir doesn't work

2017-10-22 Thread J Decker
A smiple cmakelists like this. Without specifying the CMAKE_ARGS CMAKE_INSTALL_PREFIX this tries to install into c:\program files. - cmake_minimum_required(VERSION 3.6) include( ExternalProject ) ExternalProject_Add( external PREFIX ${CMAKE_BINARY_DIR}/tmpout SOURCE_DIR ${CMAKE_S

Re: [CMake] cmake buried in subdirectory?

2017-10-04 Thread J Decker
On Wed, Oct 4, 2017 at 6:22 PM, Randy Heiland wrote: > Thanks for the reply. In my case, I didn't even want the CMakeLists in the > top-level dir. I didn't want to contaminate my top-level dir with anything > related to CMake. This would avoid, for example, an accidental overwrite of > an existin

Re: [CMake] rebuild externalprojects

2017-09-21 Thread J Decker
Excellent that fixes my issues. It appears that I'll need to update my required to 3.1... 3.0 didn't have it. https://cmake.org/cmake/help/v3.1/module/ExternalProject.html > https://cmake.org/cmake/help/git-master/module/ExternalProject.html > > > On Thu, Sep 21, 2017 at 9:

[CMake] rebuild externalprojects

2017-09-21 Thread J Decker
how do I make sure that externalprojects get built if I change a source in one? -- 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 e

Re: [CMake] VC2015 and Windows 7 compatibility

2017-09-19 Thread J Decker
you can just install the runtime redistributuable for 2015... https://www.microsoft.com/en-us/download/details.aspx?id=48234 On Tue, Sep 19, 2017 at 9:57 AM, Elvis Stansvik < elvis.stans...@orexplore.com> wrote: > 2017-09-19 17:50 GMT+02:00 Gonzalo Garramuño : > > I compile on Windows 8.1. I

[CMake] Howto rerun ExternalProject Install

2017-09-18 Thread J Decker
I have quite a few sub-projects in this project. I had added a few projects on windows that statically linked to the runtime (to make the product more portable). I realized yesterday that it was causing the static runtime flags to be applied for all projects above it too (including the core libra

Re: [CMake] Changing the actual "src" directory where VS project and/or sln files are rooted

2017-09-16 Thread J Decker
On Sat, Sep 16, 2017 at 2:25 PM, Michael Powell wrote: > Hello, > > Sorry if this seems like a rookie/novice question. I'm not new to > CI/CD, however; this question may have been asked before, I don't > know. > > I'll preface with a little background. It's been a little while for me > using and

Re: [CMake] Replace default "make all" with "make help"

2017-08-02 Thread J Decker
On Wed, Aug 2, 2017 at 8:12 AM, DKLind wrote: > Is it possible to replace the default target of the "Unix Makefiles" > generated Makefile of 'all' with 'help'? By default, I mean when no target > is specified when invoking 'make', the 'all' target is assumed. Because cmake works with so many ta

Re: [CMake] What is the default build type?

2017-08-02 Thread J Decker
On Wed, Aug 2, 2017 at 8:55 AM, Marcus D. Hanwell < marcus.hanw...@kitware.com> wrote: > On Wed, Aug 2, 2017 at 3:03 AM, Bo Zhou wrote: > >> It depends on the Generator. >> >> To the Makefile, the actual type was controlled by the compiler options. >> If you don't specific any type, usually it me

Re: [CMake] What is the default build type?

2017-08-02 Thread J Decker
On Wed, Aug 2, 2017 at 11:50 AM, David Cole via CMake wrote: > Yes, your code is a good example Marcus. It was one of the previous > suggestions on this thread which had example code setting > CMAKE_CONFIGURATION_TYPES. > > I would recommend against setting this variable because in some places >

Re: [CMake] What is the default build type?

2017-08-01 Thread J Decker
I like having something like this defines CMAKE_BUILD_TYPE to be a droplist of choices... if( NOT CMAKE_CONFIGURATION_TYPES ) set( CMAKE_CONFIGURATION_TYPES debug release ) endif( NOT CMAKE_CONFIGURATION_TYPES ) set( CMAKE_BUILD_TYPE release CACHE STRING "Cached cmake build type" ) set

Re: [CMake] error on using cmake

2017-07-27 Thread J Decker
You need visual studio build tools... https://www.visualstudio.com/downloads/ way at the bottom of the page... Build Tools for Visual Studio 2017 or for 2015... https://www.microsoft.com/en-us/download/details.aspx?id= 48159 On Thu, Jul 27, 2017 at 11:20 PM, c <1026863...@qq.com> wrote: > Hello

Re: [CMake] Correct handling of absolute/relative installation paths

2017-07-27 Thread J Decker
It's also handy to get installation paths from GNUInstallDirs https://cmake.org/cmake/help/v3.4/module/GNUInstallDirs.html especially if you expect to install libs on linux which either go to lib or lib64. many things that install to windows just supply a standard base path (/program files/) and

Re: [CMake] Cannot get a 64-bit build of MySQL on a 64-bit Windows machine

2017-07-11 Thread J Decker
Alternatively you could use cmake-gui and on first generation in an empty directoy, a popup window appears allowing you to select the generator. mkdir build2 cd build2 cmake-gui .. then set the various flags in the gui. On Tue, Jul 11, 2017 at 3:13 AM, A.M. Sabuncu wrote: > Petr, > > Thank yo

Re: [CMake] Help on first cmake project

2017-07-07 Thread J Decker
On Thu, Jul 6, 2017 at 11:45 PM, Florian Lindner wrote: > Hello, > > coming from scons I want to take a look into cmake... > > My CMakeList.txt looks like: > > > cmake_minimum_required (VERSION 3.0) > project (ASTE) > > add_executable(readMesh readMesh.cpp) > > find_library(precice precice PATHS

Re: [CMake] CmakeLists chain cannot find source added with add_custom_command

2017-07-05 Thread J Decker
On Wed, Jul 5, 2017 at 4:05 AM, J Decker wrote: > Was more of a style thing... I had (from another project) a cmakelists > includable script that builds an amalgamation of sources (makes the > compilation much faster overall because it doesn't have to read megs of > headers fo

Re: [CMake] CmakeLists chain cannot find source added with add_custom_command

2017-07-05 Thread J Decker
enerating the file is the buildtree >> >- refering to the same file with another target in the same dir >> >- using absolute path in the sub2/add_executable >> > >> > nothing works. >> > it looks like a generated file cannot be referred outside the dir

Re: [CMake] CmakeLists chain cannot find source added with add_custom_command

2017-07-02 Thread J Decker
source? >> >> Could you give us us a toy example which shows the issue? >> >> Le 2 juil. 2017 04:32, "J Decker" a écrit : >> >> Known issue? Or just doesn't require a response? >> >> On Wed, Jun 28, 2017 at 6:05 AM, J Decker wrote: &

Re: [CMake] CmakeLists chain cannot find source added with add_custom_command

2017-07-01 Thread J Decker
Known issue? Or just doesn't require a response? On Wed, Jun 28, 2017 at 6:05 AM, J Decker wrote: > I have this chain of makefiles. It adds a custom rule to build a source > file, and then a subdirectory cannot reference that file. > > The first is added custom rule for M:/tm

[CMake] CmakeLists chain cannot find source added with add_custom_command

2017-06-28 Thread J Decker
I have this chain of makefiles. It adds a custom rule to build a source file, and then a subdirectory cannot reference that file. The first is added custom rule for M:/tmp/cmake-chain/sub/src/sack.c and then later cannot find M:/tmp/cmake-chain/sub/src/sack.c though it's really referencing it as

Re: [CMake] CMake with VS2015 C++ Build Tools and missing ucrtbased.dll

2017-03-10 Thread J Decker
or copy ucrtbased.dll into your program directory... ucrtbaseD.dll is the debug version, and is only installed with the compilers, and not just the windows kits(?). On Fri, Mar 10, 2017 at 8:47 AM, TT wrote: > I'm having the same problem with "missing" ucrtbased.dll even though it is > present

Re: [CMake] Intel C Generator for Cmake?

2017-02-15 Thread J Decker
Toolchain is probably what you want http://stackoverflow.com/questions/9129233/recommended-ways-to-use-cmake-with-icc-via-configuration-options https://cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F "cmake intel toochain" search. On Wed, Feb 15, 2017 at 6:42 AM, Thompson, KT

Re: [CMake] Proper way to support 64bit and 32bit builds

2016-10-29 Thread J Decker
I would think the find is using something like... so you'll need to adjust cmake_sizeof_void_p if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) DEFINE_DEFAULT( __64__ ON ) else( CMAKE_SIZEOF_VOID_P EQUAL 8 ) DEFINE_DEFAULT( __64__ OFF ) endif( CMAKE_SIZEOF_VOID_P EQUAL 8 ) SET( __64__ ${__64__} CACHE BO

Re: [CMake] is it worth using cmake to cross-compile for embedded arm device?

2016-10-19 Thread J Decker
to gcc you can pass --sysroot which will bias it's internal referenced includes and libraries On Wed, Oct 19, 2016 at 9:57 AM, Gunter, Walter E wrote: > The toolchain was a great suggestion. > > > > I am still having problems, but at least I know I am using the right > toolchain: > > Current

Re: [CMake] try_compile additional include FILES

2016-10-01 Thread J Decker
u know that you are on Windows and know all that, why do you want an > expensive check for it? > > HS > > > Am 30. September 2016 19:57:07 MESZ, schrieb J Decker : > >I've been playing with libressl; which has quite a few > >'check_function_exists' >

[CMake] try_compile additional include FILES

2016-09-30 Thread J Decker
I've been playing with libressl; which has quite a few 'check_function_exists' In particular 'check-function-exists( inet_pton HAVE_INET_PTON )' this is failing, because, directly, there is no 'inet_pton' in windows, but by including ws2tcpip.h there is a #define that changes it to InetPton[A/W]

Re: [CMake] Wrong version of cl.exe for x64

2016-08-22 Thread J Decker
On Mon, Aug 22, 2016 at 1:33 AM, Nils Gladitz wrote: > On 08/22/2016 10:28 AM, J Decker wrote: > > Maybe you need a diferent parameter to vcvarsall before running cmake > > https://msdn.microsoft.com/en-us/library/x4d2c09s.aspx > > > > How to: Enable a 64-Bit Visual

Re: [CMake] Wrong version of cl.exe for x64

2016-08-22 Thread J Decker
Maybe you need a diferent parameter to vcvarsall before running cmake https://msdn.microsoft.com/en-us/library/x4d2c09s.aspx On Mon, Aug 22, 2016 at 1:01 AM, Nils Gladitz wrote: > On 08/22/2016 09:27 AM, tonka tonka wrote: > > Hey, >> >> I have recently switched to cmake (instead of plain visua

Re: [CMake] howto retrigger check_function_exists

2016-08-18 Thread J Decker
_','_' #endif #define SIZE (sizeof(time_t)) char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[', ('0' + ((SIZE / 1)%10)), ('0' + ((SIZE / 1000

[CMake] howto retrigger check_function_exists

2016-08-18 Thread J Decker
I was trying to add some libraries for CMAKE_REQUIRED_LIBRARIES to be able to find more symbols, but changing that didn't cause the check_function-0exists to re-run; is there a shorter way to get it to re-run without deleting CMakeCache.txt? I'm not abject to manually editing files; I had tried to

Re: [CMake] Why is cmake deleting my files?

2016-08-05 Thread J Decker
On Fri, Aug 5, 2016 at 12:46 PM, J Decker wrote: > > > On Fri, Aug 5, 2016 at 11:59 AM, J Decker wrote: > >> I'm using "MinGW Makefiles" as a generator... >> >> >> When I change a cmakelists.txt file, a bunch of sources I specify to copy

Re: [CMake] Why is cmake deleting my files?

2016-08-05 Thread J Decker
On Fri, Aug 5, 2016 at 11:59 AM, J Decker wrote: > I'm using "MinGW Makefiles" as a generator... > > > When I change a cmakelists.txt file, a bunch of sources I specify to copy > from /.../.c to ${CMAKE_BINARY_DIR}/.../.cpp get deleted in binary by cmake. > >

[CMake] Why is cmake deleting my files?

2016-08-05 Thread J Decker
I'm using "MinGW Makefiles" as a generator... When I change a cmakelists.txt file, a bunch of sources I specify to copy from /.../.c to ${CMAKE_BINARY_DIR}/.../.cpp get deleted in binary by cmake. There are no rules in the makefiles for those files to depend on anything other than the original .

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

2016-07-12 Thread J Decker
On Tue, Jul 12, 2016 at 7:54 PM, Chaos Zhang wrote: > Hi, all, > > I was trying to compile my project using CMake, after CMake generated > Makefile. > I used `/usr/bin/time -v make` to make the Makefile, got the result: > 'Percent of CPU this job got: 96%'. > Then i used `/usr/bin/time -v make -

Re: [CMake] cmp0065

2016-07-06 Thread J Decker
M:/tmp/cmake_cmp0065/CMakeLists.txt(1): cmake_minimum_required(VERSION 3.0 ) M:/tmp/cmake_cmp0065/CMakeLists.txt(2): project(cmake-test ) M:/tmp/cmake_cmp0065/CMakeLists.txt(3): add_executable(myExe main.c ) M:/tmp/cmake_cmp0065/CMakeLists.txt(4): target_compile_definitions(myExe PRIVATE MY_DEF

[CMake] Fwd: cmp0065

2016-07-06 Thread J Decker
(probably breaks thread coherance; misreplied) -- Forwarded message -- From: J Decker Date: Wed, Jul 6, 2016 at 8:43 AM Subject: Re: [CMake] cmp0065 To: Johannes Zarl-Zierl On Wed, Jul 6, 2016 at 2:52 AM, Johannes Zarl-Zierl < johannes.zarl-zi...@jku.at> wrote: > H

[CMake] cmp0065

2016-07-05 Thread J Decker
https://cmake.org/cmake/help/v3.4/policy/CMP0065.html while I like the idea it suggests, I don't use the flags for -rdynamic so this is meaningless to me https://cmake.org/cmake/help/v3.4/prop_tgt/ENABLE_EXPORTS.html#prop_tgt:ENABLE_EXPORTS SET_PROPERTY(TARGET ${project} APPEND PROPERTY COMP

Re: [CMake] MinGW and sh.exe

2016-06-19 Thread J Decker
I was searching for 'cmake disable check sh.exe' which is not a problem (anymore?) If I do cmake -G "MinGW Makefiles" /some/path it complains; then the same command again succeeds; so it's not a problem... it only causes a stutter in startup; which is a problem; and the project builds and installs

Re: [CMake] Debug vs Release "install" area

2016-05-13 Thread J Decker
I meant to also add; when I first was porting my projects to cmake, I thought this was a thing I wanted to do also... turns out, it's just a lot easier to make 2 build trees and build one release and one debug and have the same output image exactly for both... then install one or the other for use

Re: [CMake] Debug vs Release "install" area

2016-05-13 Thread J Decker
there is also BUILD_TYPE (not CMAKE_BUILD_TYPE, which is the initial condition) that often gets translated into. BUILD_TYPE seems to get set to the current building configuration. http://cmake.limitpoint.com/installing-multiple-build-types-in-cmake-generated-visual-studio-projects-2/ https://cm

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

2016-04-25 Thread J Decker
On Apr 25, 2016 6:41 PM, "J. Caleb Wherry" wrote: > > (1) > > You typically want to define the entry point in the source itself. You can use the 'CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS' in CMake but you usually do something like this in the source: > > #ifdef WIN32 > #define PUBLIC_API __declspec(dllexp

  1   2   3   4   5   >