[CMake] target_compile_features no known features for CXX compiler for clang 9.0

2018-03-20 Thread Rick Mann
Trying to build Ceres, I'm running into an issue in which CMake 3.11.0-rc3 
doesn't seem to recognize the clang that comes with the latest Xcode (Version 
9.2 (9C40b)). Googling turns up similar, but old results, that seem to suggest 
one needs to update CMake. But -rc4 is the only more recent version, and its 
release notes don't say anything about this.

CMake Error at cmake/AddCeresCXX11RequirementsToTarget.cmake:70 
(target_compile_features):
  target_compile_features no known features for CXX compiler

  "Clang"

  version 9.0.0.939.


Any suggestions? Thanks.


-- 
Rick Mann
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] CTest extra tests

2018-03-20 Thread Adam Getchell


> On Mar 20, 2018, at 9:45 AM, Bill Hoffman  wrote:
> 
> Must be coming from some macro, cmake does not automatically add any tests.  
> You could run cmake --trace and look at the output and find out where the 
> add_test call is coming from.

Thanks, that was it!

The create_single_source_cgal_program() macro was the culprit.

Thanks for the pointer to cmake --trace


> 
> On Sun, Mar 18, 2018 at 5:39 PM, Adam Getchell  > wrote:
> Hello all,
> 
> I’m running into unexpected behavior when using CTest.
> 
> First, I define the list of tests that I want to run in my CMakeLists.txt:
> 
> https://github.com/acgetchell/CDT-plusplus/blob/develop/CMakeLists.txt#L151 
> 
> 
> However, it generates two extra tests:
> 
> ┌─[adam][hapkido][±][develop {1} ✓][~/CDT-plusplus/build]
> └─▪ ctest -N
> Test project /Users/adam/CDT-plusplus/build
>   Test  #1: cdt-gv
>   Test  #2: build_target_cdt-gv
>   Test  #3: CDT-Usage
>   Test  #4: CDT-3Donly
>   Test  #5: CDT-Simplices
>   Test  #6: CDT-Timeslices
>   Test  #7: CDT-3Dtriangle
>   Test  #8: CDT-MinimalS3
>   Test  #9: CDT-S3Runs
>   Test #10: CDT-unit-tests
> 
> Total Tests: 10
> 
> I’d like to get rid of these first two autogenerated tests, because #1 fails. 
> Where/how are these being generated/defined?
> 
> I’m aware that I can just filter using ctest -E, but I’d like to make it easy 
> for the other contributors (and my CI) by making `ctest` just work.
> 
> Thanks for any pointers.
> 
> Cheers,
> Adam
> -- 
> Adam Getchell
> https://keybase.io/adamgetchell 
> 
> --
> 
> 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:
> https://cmake.org/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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] [proposal] Support for modern CMake

2018-03-20 Thread Mateusz Loskot
On 20 March 2018 at 21:52, Alexander Neundorf  wrote:
> On 2018 M03 20, Tue 21:14:30 CET Mateusz Loskot wrote:
> ...
>> Why I can not write:
>>
>> target_use(app Boost::system Boost::filesystem)
>>
>> or
>>
>> target_use_targets(app Boost::system Boost::filesystem)
>>
>> and, actually read and understand what I'm doing?
>>
>> (If you're now typing "why don't you create a custom macro wrapper"
>> response, please don't!)
>>
>> How nicely it would fit into the concept of CMake member functions
>> presented by Daniel [1] (@17:25 min), wouldn't it?
>>
>>
>> Disclaimer: Originally, the idea came from Colby Pike [2] who suggested [3]
>> use_targets(app Boost::system)
>
> Not sure, I guess I was earlier ;-)

Alex, please accept my apologies.
I should have used s/Originally/I've learned about/ :)

> You may want to have a look at
> https://cmake.org/pipermail/cmake-developers/2012-December/017561.html
> and the following discussion.

I'm eager to have a look, thank you.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] [proposal] Support for modern CMake

2018-03-20 Thread Alexander Neundorf
On 2018 M03 20, Tue 21:14:30 CET Mateusz Loskot wrote:
...
> Why I can not write:
> 
> target_use(app Boost::system Boost::filesystem)
> 
> or
> 
> target_use_targets(app Boost::system Boost::filesystem)
> 
> and, actually read and understand what I'm doing?
> 
> (If you're now typing "why don't you create a custom macro wrapper"
> response, please don't!)
> 
> How nicely it would fit into the concept of CMake member functions
> presented by Daniel [1] (@17:25 min), wouldn't it?
> 
> 
> Disclaimer: Originally, the idea came from Colby Pike [2] who suggested [3]
> use_targets(app Boost::system)

Not sure, I guess I was earlier ;-)
You may want to have a look at 
https://cmake.org/pipermail/cmake-developers/2012-December/017561.html
and the following discussion.

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:
https://cmake.org/mailman/listinfo/cmake


[CMake] [proposal] Support for modern CMake

2018-03-20 Thread Mateusz Loskot
Hi,

I've used CMake for a 10+ years now.
I'm not a newbie, but I still discover CMake awesomeness as well as its traps.
Now, I'm trying to catch up with the modern CMake party and
I obviously watched the famous Daniel Pfeifer's lecture [1] (I'm late, I know!)

I asked a simple question on #cmake at cpplang.slack.com:

Given

add_executable(app app.cpp)
target_link_libraries(app PRIVATE Boost::filesystem)

Is that correct to expect the myapp target is also configured with
all the corresponding ***include*** directories (ie. Boost headers location)?

Or, do I need to call anything else, like:

target_include_directories(app PRIVATE Boost::boost)

Then, I realised that the current CMake API is does not follow its own evolution
that happened recently leaving lots of room for semantical ambiguity.


In the 'old school' CMake, I would write:

target_link_libraries(app ${Boost_LIBRARIES})
target_include_directories(app ${Boost_INCLUDE_DIRS})

All is clear and explicit.

In the modern CMake, I write:

target_link_libraries(app Boost::system)

Is all equally clear here? No!

Why CMake does not follow its own evolution and does not
update its API with **new** commands to support the modern CMake?

Why I can not write:

target_use(app Boost::system Boost::filesystem)

or

target_use_targets(app Boost::system Boost::filesystem)

and, actually read and understand what I'm doing?

(If you're now typing "why don't you create a custom macro wrapper"
response, please don't!)

How nicely it would fit into the concept of CMake member functions
presented by Daniel [1] (@17:25 min), wouldn't it?


Disclaimer: Originally, the idea came from Colby Pike [2] who suggested [3]
use_targets(app Boost::system)
and I just renamed it to fit in the Daniel's concept of looking at CMake API
as OOP, that is OOP like in C in GTK+ :), of course.


[1] https://twitter.com/mloskot/status/973914895287713793
[2] https://github.com/vector-of-bool/vscode-cmake-tools
[3] https://cpplang.slack.com/archives/C5Y2GDECX/p152122705490

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] CTest extra tests

2018-03-20 Thread Bill Hoffman
Must be coming from some macro, cmake does not automatically add any
tests.  You could run cmake --trace and look at the output and find out
where the add_test call is coming from.

On Sun, Mar 18, 2018 at 5:39 PM, Adam Getchell 
wrote:

> Hello all,
>
> I’m running into unexpected behavior when using CTest.
>
> First, I define the list of tests that I want to run in my CMakeLists.txt:
>
> https://github.com/acgetchell/CDT-plusplus/blob/develop/
> CMakeLists.txt#L151
>
> However, it generates two extra tests:
>
> ┌─[*adam*][hapkido][*±*][develop {1} *✓*][~/CDT-plusplus/build]
> └─▪ ctest -N
> Test project /Users/adam/CDT-plusplus/build
>   Test  #1: cdt-gv
>   Test  #2: build_target_cdt-gv
>   Test  #3: CDT-Usage
>   Test  #4: CDT-3Donly
>   Test  #5: CDT-Simplices
>   Test  #6: CDT-Timeslices
>   Test  #7: CDT-3Dtriangle
>   Test  #8: CDT-MinimalS3
>   Test  #9: CDT-S3Runs
>   Test #10: CDT-unit-tests
>
> Total Tests: 10
>
> I’d like to get rid of these first two autogenerated tests, because #1
> fails. Where/how are these being generated/defined?
>
> I’m aware that I can just filter using ctest -E, but I’d like to make it
> easy for the other contributors (and my CI) by making `ctest` just work.
>
> Thanks for any pointers.
>
> Cheers,
> Adam
> --
> Adam Getchell
> https://keybase.io/adamgetchell
>
>
> --
>
> 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:
> https://cmake.org/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:
https://cmake.org/mailman/listinfo/cmake


[CMake] file(TO_NATIVE_PATH ... ) and cross-compiling

2018-03-20 Thread Miroslav Keš
Hi!

I have question concerning the file(TO_NATIVE_PATH ...) behavior. The 
documentation says:

"The TO_NATIVE_PATH mode converts a cmake-style  into a native path with 
platform-specific slashes (\ on Windows and / elsewhere)."

... but it doesn't say if the decision is made based on the CMAKE_SYSTEM_NAME 
or the CMAKE_HOST_SYSTEM_NAME.

I have a project that builds the code for multiple platforms. The conversion 
works OK when building for Linux on Linux host or when building for Windows on 
a Windows host.
But if I cross-compile on a Windows for a non-Windows platform, the 
file(TO_NATIVE_PATH ...) converts paths to the target "non Windows" platform 
convention.

Is this the expected behavior?

I was going to use it when calling external programs on the build host (e.g. to 
generate Doxygen config file from a template using configure_file() ).
But it doesn't work because of the target host path convention output.

Thanks.

Mira
-- 

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:
https://cmake.org/mailman/listinfo/cmake