Re: [CMake] CMake and FindBoost cannot set the library variables

2016-06-10 Thread Xi Shen
Thanks a lot man~ On Sat, Jun 11, 2016 at 3:04 AM Roger Leigh wrote: > On 10/06/2016 13:50, Xi Shen wrote: > > find_package(Boost REQUIRED COMPONENTS regex program_options) > > > > add_executable(winotify winotify.cpp) > > > > message(STATUS "xxx ${Boost_program_options_LIBRARY_DEBUG}") > > Tr

Re: [CMake] CMake and FindBoost cannot set the library variables

2016-06-10 Thread Roger Leigh
On 10/06/2016 13:50, Xi Shen wrote: find_package(Boost REQUIRED COMPONENTS regex program_options) add_executable(winotify winotify.cpp) message(STATUS "xxx ${Boost_program_options_LIBRARY_DEBUG}") Try Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG message(STATUS "xxx ${Boost_INCLUDE_DIR}") message(STA

Re: [CMake] how to compile single source file with debug options?

2016-06-10 Thread Gonzalo
El 10/06/16 a las 13:57, Sergey Spiridonov escribió: I do release build, but I want single source file to be compiled in debug mode, with "-O0 -DDEBUG" options instead of "-O3". Of course, without recompiling whole directory. Oh, I see. In perspective, Windows, for example, does not allow mix

Re: [CMake] execute_process, cmd /c and vcvarsall

2016-06-10 Thread Adam Rankin
Thank you Kristian, I will keep experimenting. David, I agree, and in my own project I have done it that way. However, I am attempting to fix the CUDA auto detection in OpenCV, and I am not sure if they would take kindly to adding .bat files for Windows only solutions (maybe they will, I haven'

Re: [CMake] how to compile single source file with debug options?

2016-06-10 Thread Sergey Spiridonov
Hi Gonzalo On 10/06/16 18:52, Gonzalo wrote: >> We have big project with lots of libraries and applications. We want to >> switch to cmake. Currently we use our own build system, which is derived >> from tmake. > Cmake handles all dependencies if you keep the CMakeFiles directory around. > If you

Re: [CMake] how to compile single source file with debug options?

2016-06-10 Thread Gonzalo
El 10/06/16 a las 09:05, Sergey Spiridonov escribió: Hello all, We have big project with lots of libraries and applications. We want to switch to cmake. Currently we use our own build system, which is derived from tmake. Cmake handles all dependencies if you keep the CMakeFiles directory arou

[CMake] v140_clang_3_7 generator and multi processor compilation

2016-06-10 Thread Luke.Mauldin
I am using Cmake 3.6.0 RC1 with Visual Studio 2015 and the Clang May 2016 update. When I create a simple C++ project with Visual Studio 2015 and change the toolset to v140_clang_3_7, I have the option to set Multi Processor Compilation to "Yes". When I do this, this setting is added in the .vc

[CMake] CMake and FindBoost cannot set the library variables

2016-06-10 Thread Xi Shen
Hi, I have a simple CMakeList.txt file: cmake_minimum_required (VERSION 3.0) project (winotify) set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) find_package(Boost REQUIRED COMPONENTS regex program_options) add_executable(winotify winotify.cpp) message(STATUS "xxx ${Boost_program_

[CMake] how to compile single source file with debug options?

2016-06-10 Thread Sergey Spiridonov
Hello all, We have big project with lots of libraries and applications. We want to switch to cmake. Currently we use our own build system, which is derived from tmake. To debug and fix our applications/libraries we often need to recompile single source file in a debug mode. With the our current b

Re: [CMake] execute_process, cmd /c and vcvarsall

2016-06-10 Thread David Cole via CMake
The easiest way to do what you want here is to make a standalone script (*.bat / *.cmd) that runs the commands you want and get it to work without CMake involvement at all, and then simply use execute_process to invoke that script. You can pass arguments to it if you need to communicate informatio

Re: [CMake] How do you handle recursive dependencies in CMake

2016-06-10 Thread Sven Baars
Hey Chuck, In ATargets.cmake it says add_library(a SHARED IMPORTED) and in BTargets.cmake it says add_library(b SHARED IMPORTED) However, if I build C it will say /usr/bin/ld: cannot find -la when I do find_package(B) target_link_libraries(c b) add_executable(main main.cpp)

Re: [CMake] Boost directories are not added to solution file

2016-06-10 Thread Petr Kmoch
Hi David. Probably something in your CMakeList is set up incorrectly. If you share that CMakeList, someone might be able to tell what. Petr On 10 June 2016 at 13:09, Xi Shen wrote: > I created a simple command line tool on Windows, using the Boost library. > I use the CMake tool to generate th

[CMake] Boost directories are not added to solution file

2016-06-10 Thread Xi Shen
I created a simple command line tool on Windows, using the Boost library. I use the CMake tool to generate the build file for MSBuild. I set the BOOST_INCLUDEDIR environment variable and CMake generated the build file without any error. However the solution cannot be built by MSBuild. It complain

Re: [CMake] execute_process, cmd /c and vcvarsall

2016-06-10 Thread Kristian
After some tries I found maybe a solution for you. In my small example, I had these lines, which are working: > set(HELLO1 "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat") > execute_process(COMMAND ${HELLO1} && msbuild /help WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")