[CMake] Alternative to `add_compile_options` in Toolchain Files

2019-03-26 Thread Jayesh Badwaik
Hi,

In https://gitlab.kitware.com/cmake/cmake/issues/19074, it was mentioned that 
instead of `add_compile_options`, `CMAKE_CXX_FLAGS_INIT` should be used. An 
issue with this is that `CMAKE_CXX_FLAGS_INIT` flags are propogated to the 
linker as well, wherein, the linker warns about `[-Wunused-command-line-
argument]` if those warnings are enabled. 

Is there an alternative to `CMAKE_CXX_FLAGS_INIT` which avoids these issues? 

Thanks

-- 
Best
Jayesh Badwaik
https://jayeshbadwaik.github.io



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


Re: [CMake] Replacing Compile Options for a Target

2016-12-07 Thread Jayesh Badwaik
On Wednesday, 7 December 2016 05:31:02 CET you wrote:
> There's no problem as the compiler will just use the last flag value.
> See an example at http://coliru.stacked-crooked.com/a/738fff0fcc2eb3c4.

Still, seems very ugly solution. Also doesn't work with multiple different 
flags. Better solution I have found is to create a static library from the 
header in a subdirectory and set CMAKE_CXX_FLAGS for that subdirectory only. 
This seems to be working and looks robust for all test cases I have 
encountered. 

-- 
Cheers
Jayesh Badwaik
https://www.jayeshbadwaik.in

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

[CMake] Replacing Compile Options for a Target

2016-12-06 Thread Jayesh Badwaik
Hi,

My global compile flags are specified with "std=c++14" in them. However, there 
is a third party header file which I want to compile in my code wherein I need 
to use a completely different set of compile flags starting with "-std=c++98". 

I have seen target_compile_options() but that seems to just add options to the 
already available global options.  What command should I use to assign a 
completely new set of flags from the scratch. 

-- 
Cheers
Jayesh Badwaik
https://www.jayeshbadwaik.in

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

Re: [CMake] Is there a default value for CMAKE_MODULE_PATH?

2016-11-09 Thread Jayesh Badwaik
All of these version work, but because of the various kinds of automated 
setups I use, the command line options seems the best compromise. 

However, I realized that I have a include file in my source code which is 
ignored from the source control since it is user/system dependent, and I have 
put my config there now. 

Thanks a lot for your help. 

-- 
Cheers
Jayesh Badwaik
https://www.jayeshbadwaik.in

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

[CMake] Is there a default value for CMAKE_MODULE_PATH?

2016-11-09 Thread Jayesh Badwaik
Hi,

TL;DR
Is there a default value for CMAKE_MODULE_PATH which allows me to use a module 
file from inside my PROJECT_SOURCE_DIR.

Context:
Over past few days, Boost has updated from version 1.61 to version 1.62. The 
latest version of CMake that I have (3.6.3) does not yet have the appropriate 
FindBoost.cmake and hence, issues warnings as shown in the postscript. 

As I see this is temporary, and there is a correct FindBoost.cmake in the git 
repository which works fine. So, I want to use this new module file till the 
time when the new version of CMake comes out and I won't have to use this 
special file anymore. 

All the solutions that I have found on internet require me to put a line 
setting the CMAKE_MODULE_PATH in my project source code. I don't want to do it 
since the change is supposed to be temporary anyway. So, I was wondering if 
there is a location inside the PROJECT_SOURCE_DIR which is scanned by default 
by cmake?

If there is no such location, I can live with the warnings for a little while, 
but I was just curious.


-- 
Cheers
Jayesh Badwaik
https://www.jayeshbadwaik.in

=
CMake Warnings
=
CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
  Imported targets not available for Boost version 106200
Call Stack (most recent call first):
  /usr/share/cmake-3.6/Modules/FindBoost.cmake:842 
(_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.6/Modules/FindBoost.cmake:1395 
(_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:48 (find_package)

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

[CMake] Building CMake without Curl

2016-11-02 Thread Jayesh Badwaik
Hi,

Is there a way to build CMake without curl? I am currently in an environment 
where I have no openssl-dev packages nor libcurl-dev packages. So, if I want 
to build CMake, I will need to build openssl-dev myself which I do not want to 
do. 

I can ask my sysadmin for the packages, but I was wondering if there is 
another method. A follow up question would be, if this is not possible, why is 
libcurl essential to Cmake? 


-- 
Cheers
Jayesh Badwaik
https://www.jayeshbadwaik.in

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