[cmake-developers] Antwort: Re: Non supported toolchain

2017-11-22 Thread oliver . zabel
Hi Alex, 

thanks for your answer.
1. is there some guide or at least some example?
2. Does this module needs to be in the offical build to be distributed or 
is there a possibility to distribute the modules locally?

Thanks!
Oli



Von:Alexander Neundorf 
An: cmake-developers@cmake.org
Datum:  22.11.2017 21:52
Betreff:Re: [cmake-developers] Non supported toolchain
Gesendet von:   "cmake-developers" 



On 2017 M11 22, Wed 10:37:00 CET oliver.za...@egoproducts.com wrote:
> Hi,
> 
> i know this is the dev mailing list, but i tried to solve my problem in
> the normal one (see here
> https://www.mail-archive.com/cmake@cmake.org/msg57862.html) with no
> success.
> 
> In Short: i have a toolchain for an microcontroller (renesas rx serjes)
> running on windows. I want to build my project with cmake and therefor
> wrote a toolchain file.
> The problem now is, that the compiler needs instead of "-I" for includes
> "-include=" and for defines "-define=". I found out that there seems to 
be
> internal variables CMAKE_INCLUDE_FLAG_C and CMAKE_DEFINE_FLAC_C but they
> don't seem to accesible from the toolchain file.
> 
> Is there any chance beside writing a new module for a compiler to get 
this
> toolchain running?

no, you probably need to write a module file for the compiler. This is 
actually 
not that complicated.

Alex

-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake-developers


-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake-developers

[Cmake-commits] CMake branch, master, updated. v3.10.0-399-ge1243a5

2017-11-22 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  e1243a50a759f797ee7f2d18ed08df1bc3dd0692 (commit)
  from  51ccfaacb88303bb2774cead91069e1c25888137 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e1243a50a759f797ee7f2d18ed08df1bc3dd0692
commit e1243a50a759f797ee7f2d18ed08df1bc3dd0692
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Thu Nov 23 00:01:05 2017 -0500
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Thu Nov 23 00:01:05 2017 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 01b42b1..383f46a 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 10)
-set(CMake_VERSION_PATCH 20171122)
+set(CMake_VERSION_PATCH 20171123)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [CMake] Antwort: Re: Re: Antwort: Antwort: Re:Antwort: Re: Toolchain with non-gcc argument format

2017-11-22 Thread Anders Lindgren
Hi!

One solution is to write a wrapper script in your favourite scripting
language (Ruby, Python etc) that pretend that it's a compiler. It could
recognise the -I option and start the RX compiler with the --include
option. It would not hurt to make it recognise other standard flags like
"-o" and "-c" in case the RX compiler doesn't support them either.

-- Anders

On Wed, Nov 22, 2017 at 10:33 AM,  wrote:

> Hi Eric,
>
> thanks a lot for your help! i'm going to try it on the dev mailing list.
>
> Cheers,
> Oliver
>
>
>
> Von:Eric Noulard 
> An:oliver.za...@egoproducts.com
> Kopie:CMake Mailinglist 
> Datum:22.11.2017 09:49
> Betreff:Re: Re: [CMake] Antwort: Antwort: Re:Antwort: Re:
> Toolchain with non-gcc argument format
> --
>
>
>
> Hi Olivier,
>
> Putting the list back.
> You may try developer list as well.
>
>
> 2017-11-22 9:02 GMT+01:00 <*oliver.za...@egoproducts.com*
> >:
> Hi,
>
> Is there really no way to override this var with a toolchain file? that
> seems somehow strange to me, since CMAKE is so configurable that i can't
> change "-I" to "-include="  what do i have to do?
>
>
> I'm sorry I'm a little short in time to investigate that with you at the
> moment and I hope some other people may step in.
> The var "CMAKE_INCLUDE_FLAG_C" is NOT a toolchain file variable and it
> won't end-up in the cache file.
> AFAIK It is **only** used in compiler detection, e.g. at early stage of
> project configuration when processing project(...)
> or enable_language(..)
>
> Adding new toolchain is not as flexible as adding a new **kind** of
> compiler.
> The knobs accessing for writing a toolchain are described here:
> *https://cmake.org/cmake/help/v3.10/manual/cmake-toolchains.7.html*
> 
>
> There you can see that:
> "Languages are enabled by the project() command. Language-specific
> built-in variables, such as CMAKE_CXX_COMPILER, CMAKE_CXX_COMPILER_ID etc
> are set by invoking the project() command."
>
> Unless I'm wrong the toolchain mechanism does not include the capability
> to change "-I" to "-include".
>
> Now adding a new "kind" of compiler, a.k.a. compiler ID, enables you to
> specify that include directive flag is " -include" (and many other things
> as well)
> Adding a new compiler ID requires to add files in
> /Modules/Compiler (see
> *https://github.com/Kitware/CMake/tree/master/Modules/Compiler*
> )
>
> as you can see it requires at least a couple of file to find a compiler
> and one file per supported language (C, CXX, etc...)
> in the C or CXX specific file you may use CMAKE_INCLUDE_FLAG_C and other
> variables:
>
> see e.g.:
> *https://github.com/Kitware/CMake/blob/master/Modules/Compiler/TI-C.cmake*
> 
>
>
> I did never add a new kind of compiler so I hope people with more
> knowlegde than me in this area will explain that part better than me.
>
> Eric
>
>
>
>
>
> 2017-11-16 9:44 GMT+01:00 <*oliver.za...@egoproducts.com*
> >:
> I did not find the CMAKE_INCLUDE_FLAG_C in the CMake cache - is it
> possible that this is somehow ignored?
>
> This variable is used by CMake **builtin compiler** discovery and
> configuration.
> The file are are put in "Modules/Compiler" there is one per-langage and
> per-compiler ID:
> *https://cmake.org/cmake/help/v3.7/variable/CMAKE_LANG_COMPILER_ID.html*
> 
>
> I don't know the exact processing order of this set of files.
>
> Toolchain files:
> *https://cmake.org/cmake/help/v3.7/manual/cmake-toolchains.7.html*
> 
> does not use or contain such variables.
>
> --
> Eric
>
>
>
>
> --
> Eric
>
>
> --
>
> 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 Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> 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:
> http://public.kitware.com/mailman/listinfo/cmake
>
-- 

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 Support: 

Re: [cmake-developers] Non supported toolchain

2017-11-22 Thread Alexander Neundorf
On 2017 M11 22, Wed 10:37:00 CET oliver.za...@egoproducts.com wrote:
> Hi,
> 
> i know this is the dev mailing list, but i tried to solve my problem in
> the normal one (see here
> https://www.mail-archive.com/cmake@cmake.org/msg57862.html) with no
> success.
> 
> In Short: i have a toolchain for an microcontroller (renesas rx serjes)
> running on windows. I want to build my project with cmake and therefor
> wrote a toolchain file.
> The problem now is, that the compiler needs instead of "-I" for includes
> "-include=" and for defines "-define=". I found out that there seems to be
> internal variables CMAKE_INCLUDE_FLAG_C and CMAKE_DEFINE_FLAC_C but they
> don't seem to accesible from the toolchain file.
> 
> Is there any chance beside writing a new module for a compiler to get this
> toolchain running?

no, you probably need to write a module file for the compiler. This is actually 
not that complicated.

Alex

-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] Compiler changes on voyager.sf-tec.de

2017-11-22 Thread Rolf Eike Beer
I will remove gcc 4.8 on voyager now. There will be a gcc 6.4 eventually as 
replacement.

Greetings,

Eike

signature.asc
Description: This is a digitally signed message part.
-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [CMake] Cannot seem to add include directory

2017-11-22 Thread Clément Gregoire
Well, that's the standard way to add include for msbuild projects, other
variables are meant to be used for the tool chain includes only

Le mer. 22 nov. 2017 à 20:04, Michael Powell  a
écrit :

> On Wed, Nov 22, 2017 at 1:45 PM, Michael Powell 
> wrote:
> > Hello,
> >
> > I have a couple of libraries added, one SHARED and the other STATIC,
> > for which I want to add include directories, but they are not adding.
>
> Oh, okay... So they are being added under "additional include
> directories". Or they seem to be...
>
> > I am trying the following:
> >
> > target_include_directories (${MY_PROJECT_NAME_SHARED} PUBLIC
> > "G:/Source/Boost.Installed/boost-1.65.1/include"
> > )
> >
> > Where MY_PROJECT_NAME_SHARED if my project name.
> >
> > I've also tried with the $, to no avail.
> >
> > I review my VS2015 project settings and I do not see any directories
> > changing after the solution reloads.
> >
> > Cheers,
> >
> > Michael Powell
> --
>
> 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 Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> 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:
> http://public.kitware.com/mailman/listinfo/cmake
>
-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Cannot seem to add include directory

2017-11-22 Thread Michael Powell
On Wed, Nov 22, 2017 at 1:45 PM, Michael Powell  wrote:
> Hello,
>
> I have a couple of libraries added, one SHARED and the other STATIC,
> for which I want to add include directories, but they are not adding.

Oh, okay... So they are being added under "additional include
directories". Or they seem to be...

> I am trying the following:
>
> target_include_directories (${MY_PROJECT_NAME_SHARED} PUBLIC
> "G:/Source/Boost.Installed/boost-1.65.1/include"
> )
>
> Where MY_PROJECT_NAME_SHARED if my project name.
>
> I've also tried with the $, to no avail.
>
> I review my VS2015 project settings and I do not see any directories
> changing after the solution reloads.
>
> Cheers,
>
> Michael Powell
-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Cannot seem to add include directory

2017-11-22 Thread Michael Powell
Hello,

I have a couple of libraries added, one SHARED and the other STATIC,
for which I want to add include directories, but they are not adding.

I am trying the following:

target_include_directories (${MY_PROJECT_NAME_SHARED} PUBLIC
"G:/Source/Boost.Installed/boost-1.65.1/include"
)

Where MY_PROJECT_NAME_SHARED if my project name.

I've also tried with the $, to no avail.

I review my VS2015 project settings and I do not see any directories
changing after the solution reloads.

Cheers,

Michael Powell
-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] spaces in generator strings troublesome (Michael Ellery)

2017-11-22 Thread Stefan . Waigand
Hi Michael Ellery

thank you for your reply.

> perhaps handle arguments as an array variable in bash - it?s a 
> slightly saner way to deal with args with spaces:
> 
> CMDLINE=(. -G"Unix Makefiles") && cmake "${CMDLINE[@]}?

Well i already got it working in bash when i wrote that. I have the 
parameters in a variable and i use eval to execute:
eval $CMAKE_EXECUTABLE $CMAKE_PARAMS_ALL

My point is not i cannot solve the problem. My point is, i like to 
simplify this in the future. 
The current solution is not nice - it is a workaround. It is more 
difficult to understand and maintain as it needs to be. And i am not the 
only one who has to deal with this problem. CMake uses spaces inside 
arguments where spaces are usually for separation of arguments. Do you 
agree?

Countless hours i spent debugging similar problems with paths like 
c:\Program Files. I know, one shouldn't use windows as development 
environment, but this is something we cannot change unfortunately. 
Since we force our developers to not install their perl, compilers etc. in 
such paths, things are much better.
I appreciate having the same in CMake.

Isn't it as simple as replacing all '_' by ' ' to support this and be 
backward compatible? Are there other reasons i do not see?

So i again like to kindly ask you to support (besides the established way) 
a command line like
cmake . -GUnix_Makefiles

Thank you,
Stefan-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Toolchain files and vcpkg

2017-11-22 Thread Máté Ferenc Nagy-Egri via CMake
Hi!

I’m trying to use packages (HPX specifically) installed with vcpkg, and 
according to its wiki, it is easiest to do so via the toolchain file provided 
by vcpkg.

Here’s is what I’m doing:

cd build
cmake -G „Ninja” -D CMAKE_BUILD_TYPE=Release -D 
CMAKE_TOOLCHAIN_FILE=C:/Users/nagy-/Source/Repos/vcpkg/scripts/buildsystems/vcpkg.cmake
 ..\

But it seems that CMake completely disregards the toolchain file, as if it 
weren’t even there. Same happens for Visual Studio generators, not just Ninja. 
Am I doing something wrong? Does anyone have a minimal working script with HPX 
installed through vcpkg?

Cheers,
Máté
-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Handling of generator expressions

2017-11-22 Thread Roberto Di Remigio
Dear Oleksii,
indeed it works! Thank you! I have opened an issue on the CMake repository:
https://gitlab.kitware.com/cmake/cmake/issues/17501
I think it could still be a bug, since target_compile_definitions and
target_link_libraries seem to evaluate the expression differently.
  All the best,
   Roberto

On Wed, Nov 22, 2017 at 11:40 AM, Oleksii Vilchanskyi <
oleksii.vilchans...@gmail.com> wrote:

> UPD. forgot to CC the mailing list
>
> Hi,
>
> I am also confused by this and decided to test it. I found a long thread
> from 2012
>  thread.html#16509>
> that discusses list expansion issues. It doesn't tell though whether the
> patch was mainlined.
>
> tldr; if you quote the whole genexpr, the list will expand properly.
> Below is the working code.
>
> --
> cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
>
> project(recipe-09 CXX)
>
> set(CMAKE_CXX_STANDARD 11)
> set(CMAKE_CXX_EXTENSIONS OFF)
> set(CMAKE_CXX_STANDARD_REQUIRED ON)
>
> list(APPEND CXX_BASIC_FLAGS "-g3" "-O1")
>
> include(CheckCXXCompilerFlag)
>
> set(ASAN_FLAGS "-fsanitize=address -fno-omit-frame-pointer")
> set(CMAKE_REQUIRED_FLAGS ${ASAN_FLAGS})
> check_cxx_compiler_flag(${ASAN_FLAGS} asan_works)
> unset(CMAKE_REQUIRED_FLAGS)
>
> add_executable(asan-example asan-example.cpp)
> string(REPLACE " " ";" _asan_flags ${ASAN_FLAGS})
> target_compile_options(asan-example
>   PUBLIC
> ${CXX_BASIC_FLAGS}
> $<$:${_asan_flags}>
>   )
> target_link_libraries(asan-example
>   PUBLIC
> "$<$:${_asan_flags}>" # <-- NOTE THIS
>   )
> --
>
> On 19.11.2017 19:16, Roberto Di Remigio wrote:
> > Hello,
> > I am trying to compile the following code snippet:
> >
> > int main(int argc, char ** argv) {
> >   int stack_array[100];
> >   stack_array[1] = 0;
> >   return stack_array[argc + 100]; // BOOM
> > }
> >
> > The followin CMakeLists.txt works fine, but you can notice that
> > target_compile_options takes a list, while target_link_libraries takes a
> > string. Always using the string will result in a compilation error,
> > because the compiler flags are passed quoted to the compiler. Always
> > using the list doesn't work either, because the generator expression is
> > evaluated as $<1:-fsanitize=address -fno-omit-frame-pointer> and then
> > passed as-is to the linker, which doesn't know what to do with it.
> > Is this supposed to be like this? If yes, what's the rationale?
> > Thanks in advance!
> >   Roberto
> >
> > cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
> >
> > project(recipe-09 CXX)
> >
> > set(CMAKE_CXX_STANDARD 11)
> > set(CMAKE_CXX_EXTENSIONS OFF)
> > set(CMAKE_CXX_STANDARD_REQUIRED ON)
> >
> > list(APPEND CXX_BASIC_FLAGS "-g3" "-O1")
> >
> > include(CheckCXXCompilerFlag)
> >
> > set(ASAN_FLAGS "-fsanitize=address -fno-omit-frame-pointer")
> > set(CMAKE_REQUIRED_FLAGS ${ASAN_FLAGS})
> > check_cxx_compiler_flag(${ASAN_FLAGS} asan_works)
> > unset(CMAKE_REQUIRED_FLAGS)
> >
> > add_executable(asan-example asan-example.cpp)
> > string(REPLACE " " ";" _asan_flags ${ASAN_FLAGS})
> > target_compile_options(asan-example
> >   PUBLIC
> > ${CXX_BASIC_FLAGS}
> > $<$:${_asan_flags}>
> >   )
> > target_link_libraries(asan-example
> >   PUBLIC
> > $<$:${ASAN_FLAGS}>
> >   )
> >
> >
>
> --
> Regards,
> Oleksii Vilchanskyi
> PGP:0x8D3A0E046BDE941F2A53867CE3FD952D48C0B338
>
>


-- 
Roberto Di Remigio
-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake

[Cmake-commits] CMake branch, master, updated. v3.10.0-398-g51ccfaa

2017-11-22 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  51ccfaacb88303bb2774cead91069e1c25888137 (commit)
   via  d18ff3a5c662a9f5d3b44236ea0084b154f32a9b (commit)
   via  16a93de0a81e913d71f86835b267516ea4875517 (commit)
  from  7dbeb3ac5c7e0985063a5473c98fdbee102f2a4d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51ccfaacb88303bb2774cead91069e1c25888137
commit 51ccfaacb88303bb2774cead91069e1c25888137
Merge: 7dbeb3a d18ff3a
Author: Craig Scott 
AuthorDate: Wed Nov 22 12:29:09 2017 +
Commit: Kitware Robot 
CommitDate: Wed Nov 22 07:29:33 2017 -0500

Merge topic 'WriteBasicConfigVersionFile_SameMinorVersion'

d18ff3a5 WriteBasicConfigVersionFile: Fix messages in ExactVersion tests
16a93de0 WriteBasicConfigVersionFile: Add SameMinorVersion COMPATIBILITY 
option

Acked-by: Kitware Robot 
Acked-by: Claudio 
Merge-request: !1507


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d18ff3a5c662a9f5d3b44236ea0084b154f32a9b
commit d18ff3a5c662a9f5d3b44236ea0084b154f32a9b
Author: Daniele E. Domenichelli 
AuthorDate: Tue Nov 21 10:09:15 2017 +0100
Commit: Daniele E. Domenichelli 
CommitDate: Tue Nov 21 10:09:15 2017 +0100

WriteBasicConfigVersionFile: Fix messages in ExactVersion tests

diff --git a/Tests/FindPackageTest/CMakeLists.txt 
b/Tests/FindPackageTest/CMakeLists.txt
index ae3f3a2..ac3df65 100644
--- a/Tests/FindPackageTest/CMakeLists.txt
+++ b/Tests/FindPackageTest/CMakeLists.txt
@@ -652,7 +652,7 @@ set(PACKAGE_VERSION_EXACT FALSE)
 set(PACKAGE_FIND_VERSION 2.3.4)
 include(${CMAKE_CURRENT_BINARY_DIR}/Bar123ConfigVersion.cmake)
 if(PACKAGE_VERSION_COMPATIBLE)
-  message(SEND_ERROR "Found Bar123 with version 1.2.3 (2.3.4 was requested) !")
+  message(SEND_ERROR "Found Bar123 with version 1.2.3.17 (2.3.4 was requested) 
!")
 endif()
 if(PACKAGE_VERSION_EXACT)
   message(SEND_ERROR "PACKAGE_VERSION_EXACT set, although it should not be !")
@@ -661,7 +661,7 @@ endif()
 set(PACKAGE_FIND_VERSION 1.2)
 include(${CMAKE_CURRENT_BINARY_DIR}/Bar123ConfigVersion.cmake)
 if(PACKAGE_VERSION_COMPATIBLE)
-  message(SEND_ERROR "Found Bar123 with version 1.2.3 (1.2 was requested) !")
+  message(SEND_ERROR "Found Bar123 with version 1.2.3.17 (1.2 was requested) 
!")
 endif()
 if(PACKAGE_VERSION_EXACT)
   message(SEND_ERROR "PACKAGE_VERSION_EXACT set, although it should not be !")
@@ -670,7 +670,7 @@ endif()
 set(PACKAGE_FIND_VERSION 1)
 include(${CMAKE_CURRENT_BINARY_DIR}/Bar123ConfigVersion.cmake)
 if(PACKAGE_VERSION_COMPATIBLE)
-  message(SEND_ERROR "Found Bar123 with version 1.2.3 (1 was requested) !")
+  message(SEND_ERROR "Found Bar123 with version 1.2.3.17 (1 was requested) !")
 endif()
 if(PACKAGE_VERSION_EXACT)
   message(SEND_ERROR "PACKAGE_VERSION_EXACT set, although it should not be !")
@@ -679,7 +679,7 @@ endif()
 set(PACKAGE_FIND_VERSION 1.2.3.4)
 include(${CMAKE_CURRENT_BINARY_DIR}/Bar123ConfigVersion.cmake)
 if(NOT PACKAGE_VERSION_COMPATIBLE)
-  message(SEND_ERROR "Did not find Bar123 with version 1.2.3 (1.2.3.4 was 
requested) !")
+  message(SEND_ERROR "Did not find Bar123 with version 1.2.3.17 (1.2.3.4 was 
requested) !")
 endif()
 if(PACKAGE_VERSION_EXACT)
   message(SEND_ERROR "PACKAGE_VERSION_EXACT set, although it should not be !")
@@ -690,7 +690,7 @@ set(PACKAGE_VERSION_EXACT FALSE)
 set(PACKAGE_VERSION_COMPATIBLE FALSE)
 include(${CMAKE_CURRENT_BINARY_DIR}/Bar123ConfigVersion.cmake)
 if(NOT PACKAGE_VERSION_COMPATIBLE)
-  message(SEND_ERROR "Did not find Bar123 with version 1.2.3 (1.2.3 was 
requested) !")
+  message(SEND_ERROR "Did not find Bar123 with version 1.2.3.17 (1.2.3 was 
requested) !")
 endif()
 if(PACKAGE_VERSION_EXACT)
   message(SEND_ERROR "PACKAGE_VERSION_EXACT set, although it should not be !")
@@ -701,7 +701,7 @@ set(PACKAGE_VERSION_EXACT FALSE)
 set(PACKAGE_VERSION_COMPATIBLE FALSE)
 include(${CMAKE_CURRENT_BINARY_DIR}/Bar123ConfigVersion.cmake)
 if(NOT PACKAGE_VERSION_COMPATIBLE)
-  message(SEND_ERROR "Did not find Bar123 with version 1.2.3 (1.2.3.17 was 
requested) !")
+  message(SEND_ERROR "Did not find Bar123 with version 1.2.3.17 (1.2.3.17 was 
requested) !")
 endif()
 if(NOT PACKAGE_VERSION_EXACT)
   message(SEND_ERROR "PACKAGE_VERSION_EXACT not set, although it should be !")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=16a93de0a81e913d71f86835b267516ea4875517
commit 16a93de0a81e913d71f86835b267516ea4875517
Author: Daniele E. Domenichelli 

Re: [cmake-developers] custom_command and compile_commands.json

2017-11-22 Thread Máté Ferenc Nagy-Egri via cmake-developers
Well, my impression was that it is generally for external tools to be aware of 
the build process, or the commands CMake executes.

compile_commands.json is how Microsofts C++ extension to Visual Studio Code 
fetches compiler definitions and include directories. See last paragraph of:

https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Getting%20started.md

The most feature complete LaTeX extension for VS Code is James Yus LaTeX 
Workshop

https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop

If I have a multi-language project (where CMake shines) that is end-to-end 
automated, such as the example found here:

https://github.com/Wigner-GPU-Lab/Teaching/tree/master/KutInf

(don’t heed git commit messages, Latex does work) which does:

1. Compiles a library
2. Compiles an executable that links to it
3. Runs the exe to get data
4. Invokes GnuPlot to create a diagram
5. Invokes LaTeX to create a doc with the diagram in it

The nice thing about it is, that if someone decides they need to alter the 
library, or just the exe, or just rename the plot axis… dependencies are 
tracked by CMake and building the doc target gets the job done with minimal 
effort. The C++ part of this works fine in VS Code, but I would like to make 
the LaTeX Workshop extension also aware of an external build system, much as 
how cpptools can be made aware of external magic.

In the end, I would like to be able to all the featues of LaTeX Workshop 
(linting, two-way navigation between resulting PDF & source .tex files (aka. 
SyncTeX), being able to display the result PDFs…) without having to do much 
more, other than authoring a decent CMakeLists.txt file and telling the 
extension where compile_commands.json is, much like as is the case with 
cpptools.


It is nice to have prime time support for Clang-tidy inside CMake, but hiding 
everything in the internals of CMake doesn’t help much with the tooling. Hope 
my use case was made clear enough.


Cheers,
Máté

Feladó: Brad King
Elküldve: 2017. november 21., kedd 16:00
Címzett: cmake-developers@cmake.org
Tárgy: Re: [cmake-developers] custom_command and compile_commands.json

On 11/21/2017 05:31 AM, Máté Ferenc Nagy-Egri via cmake-developers wrote:
> can we export custom commands into compile_commands.json?

The purpose of that file is to make compile commands available to
tools like clang-tidy.  Custom commands do not belong in it.
Its purpose has been largely superseded by first-class support
for running such tools along with the compiler, e.g.

https://cmake.org/cmake/help/v3.10/prop_tgt/LANG_CLANG_TIDY.html

It is also not produced by all generators.

> have the relevant Visual Studio Code extensions hook into
> ... LaTeX-Workshop extensino is not.

Please explain this use case.

-Brad
-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake-developers

-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [CMake] Using find_package() portably?

2017-11-22 Thread Johannes Zarl-Zierl
On Mittwoch, 22. November 2017 11:32:22 CET Carsten Fuchs wrote:
> That is, follow-up question: near the "..." above, we have got a target
> "libjpeg", but how do I get the variables JPEG_INCLUDES, JPEG_LIBRARIES
> etc. that `find_package(JPEG)` normally provides so that the last line
> with the `target_link_libraries()` works?
> I guess that defining them in `../ExtLibs/libjpeg/CMakeLists.txt` is wrong.

You've found an ugly corner in CMake ;-)

The problem in this specific case is that CMake ships with a FindJPEG module 
that does not define modern import libs, but uses the old way of defining 
_LIBRARIES and _INCLUDE_DIRS.
IMO this highlights one of the main problems with find modules: nobody really 
maintains them.

If JPEG had proper imported targets, your code could look like this:

find_package(JPEG)   # without "REQUIRED"

if (NOT JPEG_FOUND)
   ...
   # Proceed with the shipped copy of libjpeg:
   add_subdirectory(../ExtLibs/libjpeg ../ExtLibs/libjpeg)
endif()

target_link_libraries(main_program JPEG::JPEG)

You just have to make sure that your shipped libjpeg creates the proper 
namespaced target:
add_library(JPEG ...)
add_library(JPEG::JPEG ALIAS JPEG)

HTH,
  Johannes

-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Using find_package() portably?

2017-11-22 Thread Konstantin Tokarev


22.11.2017, 13:37, "Carsten Fuchs" :
> Hi all,
>
> thanks to you all for your replies!
>
> Concluding from your replies, it seems that the following approach for
> each external dependency implements a good(?) solution:
>
> find_package(JPEG) # without "REQUIRED"
>
> if (NOT JPEG_FOUND)
>  # Optionally, under Linux only:
>  # Stop with custom error message that explains how to install libjpeg.
>  # Or ask if alternatively the shipped library should be used.
>  # This complements the installation instructions in the user docs.
>  ... # TODO!
>
>  # Proceed with the shipped copy of libjpeg:
>  # Always under Windows

Note that there are package systems on Windows too, e.g. VCPKG or MSYS2.

Also there are a few packages which can be found by CMake by using registry
keys provided by their installers (not the case for libjpeg)


> and possibly under Linux as outlined above.
>  # Always in source code form, compiling here; not pre-made binaries.
>  # (This approach is my personal preference over the other options
>  # that have been suggested.)
>  add_subdirectory(../ExtLibs/libjpeg ../ExtLibs/libjpeg)
>
>  ... # see below
> endif()
>
> # How does this work in case `NOT JPEG_FOUND` above?
> target_link_libraries(main_program ${JPEG_LIBRARIES})
>
> That is, follow-up question: near the "..." above, we have got a target
> "libjpeg", but how do I get the variables JPEG_INCLUDES, JPEG_LIBRARIES
> etc. that `find_package(JPEG)` normally provides so that the last line
> with the `target_link_libraries()` works?
> I guess that defining them in `../ExtLibs/libjpeg/CMakeLists.txt` is wrong.
>
> It seems to me that the 2017 talks by Mathieu Roperts and Daniel Pfeifer
> (starting at slide 53, see especially slide 64 at
> https://www.slideshare.net/DanielPfeifer1/effective-cmake) suggest that
> this is how the modern, modular CMake is supposed to work?
>
> Best regards,
> Carsten
> --
>
> 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 Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> 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:
> http://public.kitware.com/mailman/listinfo/cmake

-- 
Regards,
Konstantin
-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Handling of generator expressions

2017-11-22 Thread Oleksii Vilchanskyi
UPD. forgot to CC the mailing list

Hi,

I am also confused by this and decided to test it. I found a long thread
from 2012

that discusses list expansion issues. It doesn't tell though whether the
patch was mainlined.

tldr; if you quote the whole genexpr, the list will expand properly.
Below is the working code.

--
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)

project(recipe-09 CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

list(APPEND CXX_BASIC_FLAGS "-g3" "-O1")

include(CheckCXXCompilerFlag)

set(ASAN_FLAGS "-fsanitize=address -fno-omit-frame-pointer")
set(CMAKE_REQUIRED_FLAGS ${ASAN_FLAGS})
check_cxx_compiler_flag(${ASAN_FLAGS} asan_works)
unset(CMAKE_REQUIRED_FLAGS)

add_executable(asan-example asan-example.cpp)
string(REPLACE " " ";" _asan_flags ${ASAN_FLAGS})
target_compile_options(asan-example
  PUBLIC
${CXX_BASIC_FLAGS}
$<$:${_asan_flags}>
  )
target_link_libraries(asan-example
  PUBLIC
"$<$:${_asan_flags}>" # <-- NOTE THIS
  )
--

On 19.11.2017 19:16, Roberto Di Remigio wrote:
> Hello,
> I am trying to compile the following code snippet:
> 
> int main(int argc, char ** argv) {
>   int stack_array[100];
>   stack_array[1] = 0;
>   return stack_array[argc + 100]; // BOOM
> }
> 
> The followin CMakeLists.txt works fine, but you can notice that
> target_compile_options takes a list, while target_link_libraries takes a
> string. Always using the string will result in a compilation error,
> because the compiler flags are passed quoted to the compiler. Always
> using the list doesn't work either, because the generator expression is
> evaluated as $<1:-fsanitize=address -fno-omit-frame-pointer> and then
> passed as-is to the linker, which doesn't know what to do with it.
> Is this supposed to be like this? If yes, what's the rationale?
> Thanks in advance!
>   Roberto
> 
> cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
> 
> project(recipe-09 CXX)
> 
> set(CMAKE_CXX_STANDARD 11)
> set(CMAKE_CXX_EXTENSIONS OFF)
> set(CMAKE_CXX_STANDARD_REQUIRED ON)
> 
> list(APPEND CXX_BASIC_FLAGS "-g3" "-O1")
> 
> include(CheckCXXCompilerFlag)
> 
> set(ASAN_FLAGS "-fsanitize=address -fno-omit-frame-pointer")
> set(CMAKE_REQUIRED_FLAGS ${ASAN_FLAGS})
> check_cxx_compiler_flag(${ASAN_FLAGS} asan_works)
> unset(CMAKE_REQUIRED_FLAGS)
> 
> add_executable(asan-example asan-example.cpp)
> string(REPLACE " " ";" _asan_flags ${ASAN_FLAGS})
> target_compile_options(asan-example
>   PUBLIC
>     ${CXX_BASIC_FLAGS}
>     $<$:${_asan_flags}>
>   )
> target_link_libraries(asan-example
>   PUBLIC
>     $<$:${ASAN_FLAGS}>
>   )
> 
> 

-- 
Regards,
Oleksii Vilchanskyi
PGP:0x8D3A0E046BDE941F2A53867CE3FD952D48C0B338



signature.asc
Description: OpenPGP digital signature
-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Using find_package() portably?

2017-11-22 Thread Carsten Fuchs

Hi all,

thanks to you all for your replies!

Concluding from your replies, it seems that the following approach for 
each external dependency implements a good(?) solution:



find_package(JPEG)   # without "REQUIRED"

if (NOT JPEG_FOUND)
# Optionally, under Linux only:
# Stop with custom error message that explains how to install libjpeg.
# Or ask if alternatively the shipped library should be used.
# This complements the installation instructions in the user docs.
...   # TODO!

# Proceed with the shipped copy of libjpeg:
# Always under Windows and possibly under Linux as outlined above.
# Always in source code form, compiling here; not pre-made binaries.
# (This approach is my personal preference over the other options
# that have been suggested.)
add_subdirectory(../ExtLibs/libjpeg ../ExtLibs/libjpeg)

...   # see below
endif()

# How does this work in case `NOT JPEG_FOUND` above?
target_link_libraries(main_program ${JPEG_LIBRARIES})


That is, follow-up question: near the "..." above, we have got a target 
"libjpeg", but how do I get the variables JPEG_INCLUDES, JPEG_LIBRARIES 
etc. that `find_package(JPEG)` normally provides so that the last line 
with the `target_link_libraries()` works?

I guess that defining them in `../ExtLibs/libjpeg/CMakeLists.txt` is wrong.

It seems to me that the 2017 talks by Mathieu Roperts and Daniel Pfeifer 
(starting at slide 53, see especially slide 64 at 
https://www.slideshare.net/DanielPfeifer1/effective-cmake) suggest that 
this is how the modern, modular CMake is supposed to work?


Best regards,
Carsten
--

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake


[cmake-developers] Non supported toolchain

2017-11-22 Thread oliver . zabel
Hi, 

i know this is the dev mailing list, but i tried to solve my problem in 
the normal one (see here 
https://www.mail-archive.com/cmake@cmake.org/msg57862.html) with no 
success.

In Short: i have a toolchain for an microcontroller (renesas rx serjes) 
running on windows. I want to build my project with cmake and therefor 
wrote a toolchain file.
The problem now is, that the compiler needs instead of "-I" for includes 
"-include=" and for defines "-define=". I found out that there seems to be 
internal variables CMAKE_INCLUDE_FLAG_C and CMAKE_DEFINE_FLAC_C but they 
don't seem to accesible from the toolchain file.

Is there any chance beside writing a new module for a compiler to get this 
toolchain running?

Thanks a lot and sorry for asking on the dev list!
Best regards, 

Oliver-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake-developers

[CMake] Antwort: Re: Re: Antwort: Antwort: Re:Antwort: Re: Toolchain with non-gcc argument format

2017-11-22 Thread oliver . zabel
Hi Eric, 

thanks a lot for your help! i'm going to try it on the dev mailing list.

Cheers, 
Oliver



Von:Eric Noulard 
An: oliver.za...@egoproducts.com
Kopie:  CMake Mailinglist 
Datum:  22.11.2017 09:49
Betreff:Re: Re: [CMake] Antwort: Antwort: Re:Antwort: Re: 
Toolchain with non-gcc argument format



Hi Olivier,

Putting the list back.
You may try developer list as well.


2017-11-22 9:02 GMT+01:00 :
Hi, 

Is there really no way to override this var with a toolchain file? that 
seems somehow strange to me, since CMAKE is so configurable that i can't 
change "-I" to "-include="  what do i have to do?


I'm sorry I'm a little short in time to investigate that with you at the 
moment and I hope some other people may step in.
The var "CMAKE_INCLUDE_FLAG_C" is NOT a toolchain file variable and it 
won't end-up in the cache file.
AFAIK It is **only** used in compiler detection, e.g. at early stage of 
project configuration when processing project(...)
or enable_language(..)

Adding new toolchain is not as flexible as adding a new **kind** of 
compiler.
The knobs accessing for writing a toolchain are described here:
https://cmake.org/cmake/help/v3.10/manual/cmake-toolchains.7.html

There you can see that:
"Languages are enabled by the project() command. Language-specific 
built-in variables, such as CMAKE_CXX_COMPILER, CMAKE_CXX_COMPILER_ID etc 
are set by invoking the project() command."

Unless I'm wrong the toolchain mechanism does not include the capability 
to change "-I" to "-include".

Now adding a new "kind" of compiler, a.k.a. compiler ID, enables you to 
specify that include directive flag is " -include" (and many other things 
as well)
Adding a new compiler ID requires to add files in 
/Modules/Compiler (see 
https://github.com/Kitware/CMake/tree/master/Modules/Compiler)

as you can see it requires at least a couple of file to find a compiler 
and one file per supported language (C, CXX, etc...)
in the C or CXX specific file you may use CMAKE_INCLUDE_FLAG_C and other 
variables:

see e.g.:
https://github.com/Kitware/CMake/blob/master/Modules/Compiler/TI-C.cmake 

I did never add a new kind of compiler so I hope people with more 
knowlegde than me in this area will explain that part better than me.

Eric

 



2017-11-16 9:44 GMT+01:00 : 
I did not find the CMAKE_INCLUDE_FLAG_C in the CMake cache - is it 
possible that this is somehow ignored? 

This variable is used by CMake **builtin compiler** discovery and 
configuration. 
The file are are put in "Modules/Compiler" there is one per-langage and 
per-compiler ID: 
https://cmake.org/cmake/help/v3.7/variable/CMAKE_LANG_COMPILER_ID.html 

I don't know the exact processing order of this set of files. 

Toolchain files: 
https://cmake.org/cmake/help/v3.7/manual/cmake-toolchains.7.html 
does not use or contain such variables. 

-- 
Eric 




-- 
Eric

-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Strange error with brand new CMake 4.10.0 - SOLVED

2017-11-22 Thread Cornelis Bockemühl
What a shame! Actually that error message comes from my own
CMakeLists.txt file - where I had so far only configured some settings
for Linux and not yet for MSVC...

This is indeed not any more the MT problem, but simply my own - so
please forget about my previous posting!

Regards, Cornelis

Am Mittwoch, den 22.11.2017, 09:56 +0100 schrieb Cornelis Bockemühl:
> > > > > Yesterday I had a problem with the CMake release candidate 4 for the
version 4.10.0 on Windows with MSVC 2015, and I realized by reading
the CMakeOutput.log that testing the Manifest Tool (MT) was failing.
And with a little Google I got the impression that this is now fixed
with the final release:
> 
> > https://gitlab.kitware.com/cmake/cmake/commit/2201ecec44adcc490c7481a
52a88d6543bc5dd7b
> 
> > > > > Now today seeing on the cmake.org website that the version 4.10.0 is
out I immediately downloaded and installed it. However the result is
a bit disappointing: Indeed the error message has gone from the
CMakeOutput.log file - but the Configure run still fails with the
same message:
> 
> CMake Error at CMakeLists.txt:32 (message):
>   MSVS not properly configured yet!
> 
> Now I am lost because I really do not know where to look further!
> 
> > > For the very moment, and in order to have a quick solution, I will
now probably simply downgrade to the previous version 3.9, but still
I wanted to report this problem to the experts!
> 
> Regards, Cornelis
-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Strange error with brand new CMake 4.10.0

2017-11-22 Thread Cornelis Bockemühl
Yesterday I had a problem with the CMake release candidate 4 for the
version 4.10.0 on Windows with MSVC 2015, and I realized by reading the
CMakeOutput.log that testing the Manifest Tool (MT) was failing. And
with a little Google I got the impression that this is now fixed with
the final release:

https://gitlab.kitware.com/cmake/cmake/commit/2201ecec44adcc490c7481a52
a88d6543bc5dd7b

Now today seeing on the cmake.org website that the version 4.10.0 is
out I immediately downloaded and installed it. However the result is a
bit disappointing: Indeed the error message has gone from the
CMakeOutput.log file - but the Configure run still fails with the same
message:

CMake Error at CMakeLists.txt:32 (message):
  MSVS not properly configured yet!

Now I am lost because I really do not know where to look further!

For the very moment, and in order to have a quick solution, I will now
probably simply downgrade to the previous version 3.9, but still I
wanted to report this problem to the experts!

Regards, Cornelis-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Antwort: Antwort: Re:Antwort: Re: Toolchain with non-gcc argument format

2017-11-22 Thread Eric Noulard
Hi Olivier,

Putting the list back.
You may try developer list as well.


2017-11-22 9:02 GMT+01:00 :

> Hi,
>
> Is there really no way to override this var with a toolchain file? that
> seems somehow strange to me, since CMAKE is so configurable that i can't
> change "-I" to "-include="  what do i have to do?



I'm sorry I'm a little short in time to investigate that with you at the
moment and I hope some other people may step in.
The var "CMAKE_INCLUDE_FLAG_C" is NOT a toolchain file variable and it
won't end-up in the cache file.
AFAIK It is **only** used in compiler detection, e.g. at early stage of
project configuration when processing project(...)
or enable_language(..)

Adding new toolchain is not as flexible as adding a new **kind** of
compiler.
The knobs accessing for writing a toolchain are described here:
https://cmake.org/cmake/help/v3.10/manual/cmake-toolchains.7.html

There you can see that:
"Languages are enabled by the project() command. Language-specific built-in
variables, such as CMAKE_CXX_COMPILER, CMAKE_CXX_COMPILER_ID etc are set by
invoking the project() command."

Unless I'm wrong the toolchain mechanism does not include the capability to
change "-I" to "-include".

Now adding a new "kind" of compiler, a.k.a. compiler ID, enables you to
specify that include directive flag is " -include" (and many other things
as well)
Adding a new compiler ID requires to add files in
/Modules/Compiler (see
https://github.com/Kitware/CMake/tree/master/Modules/Compiler)

as you can see it requires at least a couple of file to find a compiler and
one file per supported language (C, CXX, etc...)
in the C or CXX specific file you may use CMAKE_INCLUDE_FLAG_C and other
variables:

see e.g.:
https://github.com/Kitware/CMake/blob/master/Modules/Compiler/TI-C.cmake

I did never add a new kind of compiler so I hope people with more knowlegde
than me in this area will explain that part better than me.

Eric



>
>
>
> 2017-11-16 9:44 GMT+01:00 <*oliver.za...@egoproducts.com*
> >:
> I did not find the CMAKE_INCLUDE_FLAG_C in the CMake cache - is it
> possible that this is somehow ignored?
>
> This variable is used by CMake **builtin compiler** discovery and
> configuration.
> The file are are put in "Modules/Compiler" there is one per-langage and
> per-compiler ID:
> *https://cmake.org/cmake/help/v3.7/variable/CMAKE_LANG_COMPILER_ID.html*
> 
>
> I don't know the exact processing order of this set of files.
>
> Toolchain files:
> *https://cmake.org/cmake/help/v3.7/manual/cmake-toolchains.7.html*
> 
> does not use or contain such variables.
>
> --
> Eric
>
>


-- 
Eric
-- 

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 Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
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:
http://public.kitware.com/mailman/listinfo/cmake