Re: [CMake] [EXTERNAL]: Linker flags on all except a couple of programs

2017-01-13 Thread Parag Chandra
Have you tried the various string commands?

https://cmake.org/cmake/help/v3.7/command/string.html

I’ve done something similar to replace default linker flags with ones of my own 
choosing. I bet you could use something like string(REGEX REPLACE …) to 
essentially remove the unwanted linker flags in each of the 5 projects that 
needs it. You might even be able to do this once, in a separate .cmake file, as 
either a function or macro, and then simply include() that .cmake file in each 
of the 5 projects for better maintenance.

 

Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309
 

On 1/12/17, 12:49 AM, "CMake on behalf of Paul Smith"  wrote:

I have a CMake-based build that creates about 170 binaries (most of them
are individual unit test programs).

I have set the CMAKE_EXE_LINKER_FLAGS to a set of flags I wanted on all
the binaries.

Now it turns out that I need to remove, or not set, one specific flag on
a small number (like 5) of these binaries, but I still want it set on
all the others.  Unfortunately for this flag there's no "turn it off"
extra flag I can add to the end of the list of flags: I have to actually
remove the flag itself.

What's the cleanest/simplest way to accomplish this?  I don't really
want to modify my cmake files to add an explicit set_target_property()
to all 165 binaries that I _do_ want to have this flag set on, just so I
can avoid calling it on the 5 binaries I don't.  I want to add something
particular to the 5 "oddball" binaries, instead, to override these
values.

But I can't seem to come up with a way to remove a flag from a global
list like this, just for one (or a few) targets.


Any hints?
-- 

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] [EXTERNAL]: Up to date iOS instructions

2017-01-09 Thread Parag Chandra
Hi Harry,

I’m not sure about any official instructions, but here’s how I’m doing it:

# Adapted from https://code.google.com/p/ios-cmake/

# Standard settings
set (CMAKE_SYSTEM_NAME Darwin)
set (CMAKE_SYSTEM_VERSION 1)
set (UNIX True)
set (APPLE True)
set (IOS True)

# Required as of cmake 2.8.10
set (CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment 
target for iOS" FORCE)

# Figure out where Xcode is installed
execute_process (COMMAND "xcode-select" "--print-path" OUTPUT_VARIABLE 
CMAKE_XCODE_ROOT OUTPUT_STRIP_TRAILING_WHITESPACE)
set (CMAKE_XCODE_ROOT ${CMAKE_XCODE_ROOT} CACHE PATH "Location of Xcode. 
Normally auto-detected via 'xcode-select', but can be overridden")

# Skip the platform compiler checks for cross compiling
set (CMAKE_CXX_COMPILER_WORKS TRUE)
set (CMAKE_C_COMPILER_WORKS TRUE)

# Setup iOS platform unless specified manually with DEVICE_OR_SIMULATOR
if (NOT DEFINED DEVICE_OR_SIMULATOR)
set (DEVICE_OR_SIMULATOR "OS")
endif ()
set (DEVICE_OR_SIMULATOR ${DEVICE_OR_SIMULATOR} CACHE STRING "Set to 
'Simulator' (for simulators), or 'OS' (for devices)")

# Check the platform selection and setup for developer root
if (NOT((${DEVICE_OR_SIMULATOR} STREQUAL "OS") OR (${DEVICE_OR_SIMULATOR} 
STREQUAL "Simulator")))
message (FATAL_ERROR "Unsupported DEVICE_OR_SIMULATOR value selected. 
Please choose 'OS' or 'Simulator'")
endif ()

set (CMAKE_IOS_DEVELOPER_ROOT 
"${CMAKE_XCODE_ROOT}/Platforms/iPhone${DEVICE_OR_SIMULATOR}.platform/Developer")

# Find and use the most recent iOS sdk unless specified manually with 
CMAKE_IOS_SDK_ROOT
if (NOT DEFINED CMAKE_IOS_SDK_ROOT)
file (GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*")
if (_CMAKE_IOS_SDKS)
list (SORT _CMAKE_IOS_SDKS)
list (REVERSE _CMAKE_IOS_SDKS)
list (GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT)
else ()
message (FATAL_ERROR "No iOS SDK's found in default search path 
${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS 
SDK.")
endif ()
message (STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")
endif ()
set (CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Location of the 
selected iOS SDK")

set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")

# Set the sysroot default to the most recent SDK
# If we're generating Xcode projects, the keyword "iphoneos" is all that's 
needed; otherwise
# we need to specify the complete path
if (${CMAKE_GENERATOR} STREQUAL "Xcode")
set (CMAKE_OSX_SYSROOT "iphoneos")
else ()
# set (CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for 
iOS support")
# Actually, just fail - we haven't yet done the work to support any 
generator except Xcode for iOS
message (FATAL_ERROR "Only the Xcode generator is supported at this time. 
Be sure to specify '-GXcode' on the cmd line.")
endif ()

# Set the find root to the iOS developer roots and to user defined paths
set (CMAKE_FIND_ROOT_PATH 
"${CMAKE_XCODE_ROOT}/Toolchains/XcodeDefault.xctoolchain/usr/bin" 
${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} CACHE 
string  "iOS find search path root")

# default to searching for frameworks first
set (CMAKE_FIND_FRAMEWORK FIRST)

# set up the default search directories for frameworks
set (CMAKE_SYSTEM_FRAMEWORK_PATH
${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks
${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks
${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks
)





Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309




From: CMake  on behalf of Harry Mallon 

Date: Monday, January 9, 2017 at 6:54 AM
To: "cmake@cmake.org" 
Subject: [EXTERNAL]: [CMake] Up to date iOS instructions

Hello,

Are there any up to date instructions for doing iOS builds? There are load of 
tutorials going back many years on Google. I am using something based on this 
https://github.com/cristeab/ios-cmake as a toolchain file currently but I am 
seeing the ${EFFECTIVE_PLATFORM_NAME} generator expression problem mentioned 
here last year (https://cmake.org/pipermail/cmake/2016-March/063113.html). I 
have heard something about CMAKE_OSX_SYSROOT = iphoneos and maybe 
CMAKE_IOS_INSTALL_COMBINED?

Yours,
Harry

Harry Mallon

CODEX | Software Engineer

60 Poland Street | London | England | W1F 7NT

E ha...@codexdigital.com<mailto:ha...@codexdigital.com> | T +44 203 7000 
989

Website<http://codex.online> | Facebook<https://www.facebook.com/codexdigital> 
| Twitter<http://twitter.com/codexdigital>

[http://codex.online

Re: [CMake] [EXTERNAL]: To include external libraries using Cmake

2017-01-04 Thread Parag Chandra
Hi there,

If I’m not mistaken, when a library cannot be found, the value of the variable 
“ARMADILLO” will be set to “ARMADILLO-NOTFOUND”. So I think you need to adjust 
your test to:

IF (${ARMADILLO} STREQUAL “ARMADILLO-NOTFOUND”)
  # do what you want
ENDIF ()

The following links in the doc may be helpful:

https://cmake.org/cmake/help/v3.7/command/find_library.html
https://cmake.org/cmake/help/v3.7/command/if.html

Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309




From: CMake  on behalf of aishwarya selvaraj 

Date: Wednesday, January 4, 2017 at 12:29 PM
To: cmake 
Subject: [EXTERNAL]: [CMake] To include external libraries using Cmake

Hi ,
I'm using Cmake to create binary files as it can give a way to build my  
application that will successfully compile on different platforms .
I use :
Linux -14.04
Cmake - 2.8.12

My .cpp code is called TSM_CODE_V3.cpp.It<http://tsm_code_v3.cpp.it/> depends 
on two external library files .1) armadillo 2) sndfile .
I scripted a CmakeLists.txt as follows :

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
PROJECT(TSM2)

FIND_LIBRARY(ARMADILLO armadillo)
MESSAGE(STATUS "Armadillo Library location: " ${ARMADILLO})

IF (NOT ARMADILLO_FOUND)
include(ExternalProject)
MESSAGE(STATUS "Armadillo not found in the system ,Trying to install 
armadillo...")
ExternalProject_Add(armadillo
  URL https://github.com/lsolanka/armadillo/archive/master.zip
  PREFIX ${CMAKE_CURRENT_BINARY_DIR}/armadillo-latest)
ENDIF()

FIND_LIBRARY(SNDFILE sndfile)
MESSAGE(STATUS "Sndfile Library location: " ${SNDFILE})

IF (NOT SNDFILE_FOUND)
include(ExternalProject)
MESSAGE(STATUS "Armadillo not found in the system ,Trying to install 
libsndfile...")
ExternalProject_Add(sndfile
  URL https://github.com/erikd/libsndfile/archive/master.zip
  PREFIX ${CMAKE_CURRENT_BINARY_DIR}/sndfile-latest)
ENDIF()

ADD_EXECUTABLE(tsm ${PROJECT_SOURCE_DIR}/src/TSM_CODE_V3.cpp)
TARGET_LINK_LIBRARIES(tsm ${ARMADILLO} ${SNDFILE})

I made use of ExternalProject_add to download the external libraries from the 
specified link address ,but when I try to compile the CmakeLists.txt , it 
throws an error of saying library not found .Basically , the external library 
is not downloaded from the specified link .

I'm not  sure where am I going wrong here .
Can anyone help me out ?
Hoping to hear from you..

--
Regards,
Aishwarya Selvaraj
-- 

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] [EXTERNAL]: Policy to forbid linking with non-cmake-targets

2016-12-12 Thread Parag Chandra
Not sure if there is a policy for what you want, but I’ve accomplished 
something similar via a macro that I use to link my libraries. It looks 
something like this:

macro (LinkOnlyIfLibraryIsTarget linkTarget)
foreach (nextLibrary ${ARGN})
if (TARGET ${nextLibrary})
target_link_libraries (${linkTarget} ${nextLibrary})
else
message (FATAL_ERROR "${nextLibrary} was not defined as 
a CMake target")
endif ()
endforeach ()
endmacro()

So instead of calling target_link_libraries() directly, I invoke this macro 
with similar syntax:

LinkOnlyIfLibraryIsTarget(executableName library1 library2 library3)

Hope this helps.
 

Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309
 

On 12/12/16, 7:10 AM, "CMake on behalf of Patrick Boettcher" 
 wrote:

Hi list,

is there a policy which can be enabled to forbid calling 

  target_link_libraries(foo bar)

where bar is _not_ a known cmake target?

Right now, if 'bar' is not a cmake-target cmake tries to link with
-lbar (on linux). Can I inhibit this behavior in any way?

I'd prefer cmake telling me that this target is unknown rather than
receiving a link error at the end of the build-process.

Thanks,
--
Patrick.

-- 

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] [EXTERNAL]: Errors with cmake for VS2105 (update 3) + clang + nmake

2016-11-28 Thread Parag Chandra
I’m not sure if the toolset parameter will have any effect if you’re *not* also 
going to output vcxproj files, but can you try “v140_clang_c2” as the toolset? 
 

Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309
 

On 11/24/16, 8:20 AM, "CMake on behalf of Peter Jansen" 
 wrote:

Hi Parag,

Thanks for your feedback. 

The instructions you are referring to are for this cmake command :

   cmake -G"Visual Studio 14 2015" -T"LLVM-vs2014" ..

But in my case I'd like (1) to use the MS VS 2015 "Nmake Makefiles" as -G
option, and (2) the MS VS 2015 (update 3) included "clang" (which is version
3.8.0) compiler, referred to as Clang/C2 (i.e. using the MS VS 2015 linker
etc., NOT the Clang/LLVM system)
.
I have been trying to find information whether an appropriate -T option is
available for this, but was unsuccessful at this.

Any continued support with this would be appreciated.

Thanks,

Peter




--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Errors-with-cmake-for-VS2105-update-3-clang-nmake-tp7594637p7594651.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

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] [EXTERNAL]: Errors with cmake for VS2105 (update 3) + clang + nmake

2016-11-21 Thread Parag Chandra
Hi Peter,

Seems like CMake is continuing to pass cmd line args that are only suitable for 
the default msvc compiler, which clang is treating as invalid paths. You need 
to override more than just the C_COMPILER. Try the instructions here:

http://stackoverflow.com/questions/38171878/how-do-i-tell-cmake-to-use-clang-on-windows

 

Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309
 

On 11/21/16, 12:33 PM, "CMake on behalf of Peter Jansen" 
 wrote:

I am trying to use cmake to generate a "Nmake Makefiles" project in a 
Windows
10 VS2015 (update 3) environment using the VS2015 clang compiler (which is
the MS Clang/C2 compiler, version 3.8.0), but in doing so receive these
errors :

C:\Qsync\Source\Hello_World_C\build\clang_x64_nmake>cmake -G "NMake
Makefiles" ..\.. -DCMAKE_C_COMPILER:FILEPATH="C:\Program Files
(x86)\Microsoft Visual Studio 14.0\VC\ClangC2\bin\amd64\clang.exe"
-DCMAKE_CXX_COMPILER:FILEPATH="C:\Program Files (x86)\Microsoft Visual
Studio 14.0\VC\ClangC2\bin\amd64\clang.exe"
-- The C compiler identification is Clang 3.8.0
-- The CXX compiler identification is Clang 3.8.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/ClangC2/bin/amd64/clang.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/ClangC2/bin/amd64/clang.exe -- b
roken
CMake Error at C:/Program
Files/CMake/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake:51 (message):
  The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
  14.0/VC/ClangC2/bin/amd64/clang.exe" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir:
C:/Qsync/Source/Hello_World_C/build/clang_x64_nmake/CMakeFiles/CMakeTmp



  Run Build Command:"nmake" "/NOLOGO" "cmTC_6a3b7\fast"

"C:\Program Files (x86)\Microsoft Visual Studio
  14.0\VC\BIN\amd64\nmake.exe" -f CMakeFiles\cmTC_6a3b7.dir\build.make
  /nologo -L CMakeFiles\cmTC_6a3b7.dir\build

  Building C object CMakeFiles/cmTC_6a3b7.dir/testCCompiler.c.obj

C:\PROGRA~2\MICROS~1.0\VC\ClangC2\bin\amd64\clang.exe
  @C:\Users\Peter\AppData\Local\Temp\nm1768.tmp

  clang.exe: error: no such file or directory: '/nologo'

  clang.exe: error: no such file or directory: '/DWIN32'

  clang.exe: error: no such file or directory: '/D_WINDOWS'

  clang.exe: error: no such file or directory: '/W3'

  clang.exe: error: no such file or directory: '/D_DEBUG'

  clang.exe: error: no such file or directory: '/MDd'

  clang.exe: error: no such file or directory: '/Zi'

  clang.exe: error: no such file or directory: '/Ob0'

  clang.exe: error: no such file or directory: '/Od'

  clang.exe: error: no such file or directory: '/RTC1'

  clang.exe: error: no such file or directory:
  '/FoCMakeFiles\cmTC_6a3b7.dir\testCCompiler.c.obj'

  clang.exe: error: no such file or directory: '/FdCMakeFiles\cmTC_6a3b7.dir
  -c'

  NMAKE : fatal error U1077:
  'C:\PROGRA~2\MICROS~1.0\VC\ClangC2\bin\amd64\clang.exe' : return code
  '0x1'

  Stop.

  NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio
  14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'

  Stop.





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:1 (project)


-- Configuring incomplete, errors occurred!
See also

"C:/Qsync/Source/Hello_World_C/build/clang_x64_nmake/CMakeFiles/CMakeOutput.log".
See also

"C:/Qsync/Source/Hello_World_C/build/clang_x64_nmake/CMakeFiles/CMakeError.log".



I might be doing something wrong, as I am quite new to cmake, although I got
the above clang to work for a regular "Visual Studio 15 Win64" generated
project (Hello_World.c  , i.e. the minimal C program). Or is this a known
problem or not even supported combination with nmake ?

Any help will be very much appreciated.

Peter Jansen



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Errors-with-cmake-for-VS2105-update-3-clang-nmake-tp7594637.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wi

Re: [CMake] [EXTERNAL]: CMake and Code Signing in XCode 8 for iOS projects

2016-11-21 Thread Parag Chandra
Hi Frank,

I got curious about this myself, and it looks like the checkbox alters the 
following in the .pbxproj:

TargetAttributes = {
2BA1B86D1DE33AA300073B96 = {
CreatedOnToolsVersion = 8.1;
ProvisioningStyle = Manual;
};
};


With it  checked, “ProvisioningStyle = Automatic”. To the best of my knowledge, 
XCODE_ATTRIBUTE_* can only be used for items that show up with a corresponding 
“Declaration” field when viewed in Xcode’s Quick Help pane, e.g. “ARCHS” can be 
set via XCODE_ATTRIBUTE_ARCHS.

I had a similar problem targeting NaCl with the Visual Studio generator – there 
was a property in the .vcxproj file that I couldn’t access directly from CMake. 
I ended up writing a simple Python script to massage the generated vcxproj in 
order to give me the desired end result. Not a great solution, but it’s worked 
out pretty well for me because in practice I don’t run CMake directly on the 
cmd line. I drive it from a Gradle script which feeds it all the necessary cmd 
line args I need, so I just tacked on this bit of Python to the end of my 
Gradle script.

Hope this helps.

Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309
 

On 11/19/16, 3:56 PM, "CMake on behalf of Frank"  wrote:

Hi all,

CMake was able to configure automatic code signing for XCode <=7 and iOS 
projects with a target property setting like

set_target_properties(app PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY 
"PROPER IDENTIFIER")

XCode 8 changed the signing process. It now is required that the option 
"Automatically manage signing" in the project settings "General tab -> 
Signing" is checked. If I check this options manually for a cmake 
generated project, signing works well. But I did not find a way to 
enable this option from the cmake project by default. Can this be done 
for cmake (>=3.7.0)?

Thanks for any help,
Frank
-- 

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] [EXTERNAL]: Re: CMake integration in Gradle (Android Studio)

2016-10-31 Thread Parag Chandra
Presumably you’ve tried this?

https://developer.android.com/studio/projects/add-native-code.html

Keep in mind that this is going to use Google’s cross-toolchain file, which may 
be incompatible with what you already have.

 

Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309
 

On 10/27/16, 5:48 PM, "CMake on behalf of Robert Dailey" 
 wrote:

I'm at a bit of a loss on finding more information. Can anyone at
least confirm that this isn't a reliable place to find the answers I'm
looking for? Does anyone have real experience with android + gradle +
cmake integration and can provide some pointers?

On Tue, Oct 25, 2016 at 8:48 AM, Robert Dailey  
wrote:
> I'm not sure if the CMake mailing lists are the right place to ask
> this question but I thought I'd ask just in case someone has gone down
> this path or has experience with what Google/Gradle is actually trying
> to accomplish with what seems to be a hand-built version of CMake with
> custom patches that are not in upstream repositories.
>
> Prior to switching to Android Studio / Gradle, I was using Eclipse /
> Ant. The way I did CMake integration was not really integration at
> all: I generated Ninja build scripts using CMake and implemented
> custom targets to run "ant release" after all the C++ projects were
> built. I made sure that CMake copied relevant *.so files to
> appropriate directories in the Ant structure so they are packaged with
> built APKs. That's how I did my Android development.
>
> Now that I'm integrating CMake into Gradle, first annoyance I noticed
> is that I can't use CMake 3.7 (or any external installation of CMake)
> with Android Studio. It requires a version of CMake installed through
> SDK Manager. This means I can't use the new Android toolchain
> functionality built into CMake 3.7 (sad face). But this is something I
> can work around...
>
> Next I found out that stuff I'm setting in my CMake scripts, such as
> CPP flags like `-std=c++14` and `-fexceptions` was not being applied.
> For whatever reason, Gradle is overriding these from the command line
> (I'm guessing?). So this requires me to duplicate the toolchain /
> compiler flag setup I already do in my CMake scripts now in the Gradle
> build scripts. This seems completely unnecessary and a maintenance
> burden.
>
> What I was expecting Gradle to do was essentially provide me some
> toolchain file so that CMake can find the compiler and linker to use
> and then the rest would be determined by CMake itself.
>
> Is there a way I can tell Gradle to not take so much control over
> compiler flags? I want my CMake scripts to do this. I can't imagine
> they had a good reason to do this. What have others done in this
> situation with their own Gradle + CMake integration? Looking for
> advice here, since information is sparse, especially since the Android
> Studio 2.2 CMake integration is relatively new stuff.
-- 

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] [EXTERNAL]: FindProtobuf in specified dirs

2016-10-25 Thread Parag Chandra
I just pulled down the latest source, ran CMake on it, and then ran ccmake to 
view the options available. Mine shows several SPHINX-related options, and 
since SPHINX_EXECUTABLE could not be found, all the other SPHINX options have 
been set to OFF. Can you verify the same on your end? It seems to me that if no 
SPHINX output formats are enabled, then doc generation should be skipped.



Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309




From: Homero Cardoso de Almeida 
Date: Tuesday, October 25, 2016 at 11:10 AM
To: Parag Chandra , "cmake@cmake.org" 
Subject: Re: [EXTERNAL]: [CMake] FindProtobuf in specified dirs

That did not work. Even though I set the BUILD_DOCUMENTATION flag in the 
debian/rules script, I cannot get it to skip doc build. Or maybe I'm writing in 
the wrong folder, I don't know. :(


Em ter, 25 de out de 2016 às 11:35, Parag Chandra 
mailto:pa...@ionicsecurity.com>> escreveu:
This is a shot in the dark, but if I remember correctly, building CMake 
requires a separate version of CMake in order to bootstrap itself. So when you 
run ccmake (or cmake-gui) to configure the new version of CMake you’re trying 
to build, there might be some Boolean option in there that will disable doc 
generation completely.



Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309




From: Homero Cardoso de Almeida 
mailto:homero...@gmail.com>>
Date: Tuesday, October 25, 2016 at 9:28 AM

To: Parag Chandra mailto:pa...@ionicsecurity.com>>, 
"cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: Re: [EXTERNAL]: [CMake] FindProtobuf in specified dirs

Actually, I'm trying to compile cmake 3.0.2 now.

I did exactly that for protobuffers, and it compiled file. It's just the 
package config file that still requires 2.8.12 and I'm not sure of the 
consequences of changing that. So I'm trying to build 3.0.2 on squeeze now, and 
having a hard time building the docs because of sphinx. If I could skip the 
docs, that would be fantastic.

Thanks,
Homero

Em ter, 25 de out de 2016 às 11:23, Parag Chandra 
mailto:pa...@ionicsecurity.com>> escreveu:
I actually haven’t ever tried to build protobuffers myself, so I can’t comment 
on its doc generation or sphinx dependency. Sorry if this seems obvious, but 
have you tried modifying protobuffer’s CMakeLists.txt file so that it uses the 
same 2.8.9 CMake you are using? 2.8.12 may not be that far off from 2.8.9; it 
just might be the version of CMake they happened to download at the time, 
rather than a hard requirement on it.



Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309




From: Homero Cardoso de Almeida 
mailto:homero...@gmail.com>>
Date: Tuesday, October 25, 2016 at 8:06 AM
To: Parag Chandra mailto:pa...@ionicsecurity.com>>, 
"cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: Re: [EXTERNAL]: [CMake] FindProtobuf in specified dirs

Thanks for your help.

I was able to download and compile protobuffers 2.7 using cmake, however the 
cmake config for protobuffers is fixed for 2.8.12, while I need it to work with 
cmake 2.8.9 as it's going to run in system frozen in Debian Squeeze (Squeeze 
actually defaults on cmake 2.8.2 and I got it to install 2.8.9 from Wheezy).

Currently I'm trying to create a debian package from cmake 3.0.2 on squeeze, 
but I'm having a hard time due to dependencies on sphinx. Do you have any ideas 
on how to circumvent the doc generation?

Thanks and regards,
Homero.

Em qui, 20 de out de 2016 às 17:05, Parag Chandra 
mailto:pa...@ionicsecurity.com>> escreveu:
I believe the protobuf-config.cmake.in<http://protobuf-config.cmake.in> 
generates a protobuf-config.cmake file once you actually use CMake to build 
protobuf itself.



Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309




From: CMake mailto:cmake-boun...@cmake.org>> on behalf 
of Homero Cardoso de Almeida mailto:homero...@gmail.com>>
Date: Thursday, October 20, 2016 at 2:56 PM
To: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: [EXTERNAL]: [CMake] FindProtobuf in specified dirs

Hello,

I'm working on enhancing the build process in my company by using CMake, and 
I'm having trouble to have it find the Google Protocol Buffers binary and 
libraries in a specific directory in my workspace.

Due to several reasons, we cannot install protobuffers directly in our 
environment, so I have it download and unpack a zip file with the protobuffer 
library and header files in a directory in my home f

Re: [CMake] [EXTERNAL]: CMake integration in Gradle (Android Studio)

2016-10-25 Thread Parag Chandra
Hi Robert,

I’ve been struggling with the same thing. My cross-platform build already uses 
a combination of CMake and Gradle, which enables IDE integration on all 
supported platforms except Android. When I started this project about 3 years 
ago, there weren’t any real options for native code development on Android 
inside an IDE, so I initially went down the same Ant/Eclipse path as you, 
running separate commands to build the native portions via CMake and putting 
the .so files into the right place so Eclipse would find them. Even managed to 
get debugging to work with a little coaxing.

Fast forward a couple of years and Google has completely abandoned Ant+Eclipse, 
so my custom workflow is now outdated. There is now also an explosion of 
options for working with C++ code on Android, including:

• A first-party plug-in for Visual Studio from Microsoft;
• VisualGDB;
• WinGDB;
• Gradle’s own C/C++ support via its Native Build System;
• Google’s own CMake support via Android Studio
• JetBrains CLion

I spoke to a few people at Google when I was at I/O this year, and I got the 
general impression that CMake+Gradle+Android Studio is only going to work if 
you’re targeting Android exclusively. If you want to continue targeting 
multiple platforms, you’re still kind of on your own, and your experience with 
their custom version of CMake supports that impression.

I haven’t had time to explore all of the options I listed above to try to 
figure out which would provide the best workflow, but my general sense is that 
Android Studio needs to continue to treat your CMake build as a black box. 
Fortunately, there are a lot of extension points with the Gradle-based build 
that underpins all Android Studio projects, so you can effectively create 
pre-build steps that will essentially cmake –build your native code and drop 
the .so files into the right place, before proceeding with the managed code 
Android toolchain. From there, it should be possible to attach Android Studio’s 
managed code and native code debuggers to your running app, to concurrently 
debug both sides.

At this point, I’ve probably strayed too far from the intent of this mailing 
list, but I’m happy to discuss further with you offline.

 

Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309
 

On 10/25/16, 9:48 AM, "CMake on behalf of Robert Dailey" 
 wrote:

I'm not sure if the CMake mailing lists are the right place to ask
this question but I thought I'd ask just in case someone has gone down
this path or has experience with what Google/Gradle is actually trying
to accomplish with what seems to be a hand-built version of CMake with
custom patches that are not in upstream repositories.

Prior to switching to Android Studio / Gradle, I was using Eclipse /
Ant. The way I did CMake integration was not really integration at
all: I generated Ninja build scripts using CMake and implemented
custom targets to run "ant release" after all the C++ projects were
built. I made sure that CMake copied relevant *.so files to
appropriate directories in the Ant structure so they are packaged with
built APKs. That's how I did my Android development.

Now that I'm integrating CMake into Gradle, first annoyance I noticed
is that I can't use CMake 3.7 (or any external installation of CMake)
with Android Studio. It requires a version of CMake installed through
SDK Manager. This means I can't use the new Android toolchain
functionality built into CMake 3.7 (sad face). But this is something I
can work around...

Next I found out that stuff I'm setting in my CMake scripts, such as
CPP flags like `-std=c++14` and `-fexceptions` was not being applied.
For whatever reason, Gradle is overriding these from the command line
(I'm guessing?). So this requires me to duplicate the toolchain /
compiler flag setup I already do in my CMake scripts now in the Gradle
build scripts. This seems completely unnecessary and a maintenance
burden.

What I was expecting Gradle to do was essentially provide me some
toolchain file so that CMake can find the compiler and linker to use
and then the rest would be determined by CMake itself.

Is there a way I can tell Gradle to not take so much control over
compiler flags? I want my CMake scripts to do this. I can't imagine
they had a good reason to do this. What have others done in this
situation with their own Gradle + CMake integration? Looking for
advice here, since information is sparse, especially since the Android
Studio 2.2 CMake integration is relatively new stuff.
-- 

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 vario

Re: [CMake] [EXTERNAL]: FindProtobuf in specified dirs

2016-10-25 Thread Parag Chandra
I actually haven’t ever tried to build protobuffers myself, so I can’t comment 
on its doc generation or sphinx dependency. Sorry if this seems obvious, but 
have you tried modifying protobuffer’s CMakeLists.txt file so that it uses the 
same 2.8.9 CMake you are using? 2.8.12 may not be that far off from 2.8.9; it 
just might be the version of CMake they happened to download at the time, 
rather than a hard requirement on it.



Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309




From: Homero Cardoso de Almeida 
Date: Tuesday, October 25, 2016 at 8:06 AM
To: Parag Chandra , "cmake@cmake.org" 
Subject: Re: [EXTERNAL]: [CMake] FindProtobuf in specified dirs

Thanks for your help.

I was able to download and compile protobuffers 2.7 using cmake, however the 
cmake config for protobuffers is fixed for 2.8.12, while I need it to work with 
cmake 2.8.9 as it's going to run in system frozen in Debian Squeeze (Squeeze 
actually defaults on cmake 2.8.2 and I got it to install 2.8.9 from Wheezy).

Currently I'm trying to create a debian package from cmake 3.0.2 on squeeze, 
but I'm having a hard time due to dependencies on sphinx. Do you have any ideas 
on how to circumvent the doc generation?

Thanks and regards,
Homero.

Em qui, 20 de out de 2016 às 17:05, Parag Chandra 
mailto:pa...@ionicsecurity.com>> escreveu:
I believe the protobuf-config.cmake.in<http://protobuf-config.cmake.in> 
generates a protobuf-config.cmake file once you actually use CMake to build 
protobuf itself.



Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309




From: CMake mailto:cmake-boun...@cmake.org>> on behalf 
of Homero Cardoso de Almeida mailto:homero...@gmail.com>>
Date: Thursday, October 20, 2016 at 2:56 PM
To: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: [EXTERNAL]: [CMake] FindProtobuf in specified dirs

Hello,

I'm working on enhancing the build process in my company by using CMake, and 
I'm having trouble to have it find the Google Protocol Buffers binary and 
libraries in a specific directory in my workspace.

Due to several reasons, we cannot install protobuffers directly in our 
environment, so I have it download and unpack a zip file with the protobuffer 
library and header files in a directory in my home folder. However, when I use 
the find_package directive giving said folder as a hint it complains that it 
could not find a protobuf-config.cmake file and fails. I couldn't find any such 
file anywhere, the only thing coming close is a 
"protobuf-config.cmake.in<http://protobuf-config.cmake.in>" in the protobuf 
source tree and I don't know if I can use that.

Do I have to provide my own protobuf-config.cmake file, or I'm using it 
completely wrong?

We are frozen in protocol buffers 2.4.1. I guess we can upgrade to 2.7.0, but 
we can't use 3.0.x.

Thanks,
Homero.
-- 

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] [EXTERNAL]: FindProtobuf in specified dirs

2016-10-25 Thread Parag Chandra
This is a shot in the dark, but if I remember correctly, building CMake 
requires a separate version of CMake in order to bootstrap itself. So when you 
run ccmake (or cmake-gui) to configure the new version of CMake you’re trying 
to build, there might be some Boolean option in there that will disable doc 
generation completely.



Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309




From: Homero Cardoso de Almeida 
Date: Tuesday, October 25, 2016 at 9:28 AM
To: Parag Chandra , "cmake@cmake.org" 
Subject: Re: [EXTERNAL]: [CMake] FindProtobuf in specified dirs

Actually, I'm trying to compile cmake 3.0.2 now.

I did exactly that for protobuffers, and it compiled file. It's just the 
package config file that still requires 2.8.12 and I'm not sure of the 
consequences of changing that. So I'm trying to build 3.0.2 on squeeze now, and 
having a hard time building the docs because of sphinx. If I could skip the 
docs, that would be fantastic.

Thanks,
Homero

Em ter, 25 de out de 2016 às 11:23, Parag Chandra 
mailto:pa...@ionicsecurity.com>> escreveu:
I actually haven’t ever tried to build protobuffers myself, so I can’t comment 
on its doc generation or sphinx dependency. Sorry if this seems obvious, but 
have you tried modifying protobuffer’s CMakeLists.txt file so that it uses the 
same 2.8.9 CMake you are using? 2.8.12 may not be that far off from 2.8.9; it 
just might be the version of CMake they happened to download at the time, 
rather than a hard requirement on it.



Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309




From: Homero Cardoso de Almeida 
mailto:homero...@gmail.com>>
Date: Tuesday, October 25, 2016 at 8:06 AM
To: Parag Chandra mailto:pa...@ionicsecurity.com>>, 
"cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: Re: [EXTERNAL]: [CMake] FindProtobuf in specified dirs

Thanks for your help.

I was able to download and compile protobuffers 2.7 using cmake, however the 
cmake config for protobuffers is fixed for 2.8.12, while I need it to work with 
cmake 2.8.9 as it's going to run in system frozen in Debian Squeeze (Squeeze 
actually defaults on cmake 2.8.2 and I got it to install 2.8.9 from Wheezy).

Currently I'm trying to create a debian package from cmake 3.0.2 on squeeze, 
but I'm having a hard time due to dependencies on sphinx. Do you have any ideas 
on how to circumvent the doc generation?

Thanks and regards,
Homero.

Em qui, 20 de out de 2016 às 17:05, Parag Chandra 
mailto:pa...@ionicsecurity.com>> escreveu:
I believe the protobuf-config.cmake.in<http://protobuf-config.cmake.in> 
generates a protobuf-config.cmake file once you actually use CMake to build 
protobuf itself.



Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309




From: CMake mailto:cmake-boun...@cmake.org>> on behalf 
of Homero Cardoso de Almeida mailto:homero...@gmail.com>>
Date: Thursday, October 20, 2016 at 2:56 PM
To: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: [EXTERNAL]: [CMake] FindProtobuf in specified dirs

Hello,

I'm working on enhancing the build process in my company by using CMake, and 
I'm having trouble to have it find the Google Protocol Buffers binary and 
libraries in a specific directory in my workspace.

Due to several reasons, we cannot install protobuffers directly in our 
environment, so I have it download and unpack a zip file with the protobuffer 
library and header files in a directory in my home folder. However, when I use 
the find_package directive giving said folder as a hint it complains that it 
could not find a protobuf-config.cmake file and fails. I couldn't find any such 
file anywhere, the only thing coming close is a 
"protobuf-config.cmake.in<http://protobuf-config.cmake.in>" in the protobuf 
source tree and I don't know if I can use that.

Do I have to provide my own protobuf-config.cmake file, or I'm using it 
completely wrong?

We are frozen in protocol buffers 2.4.1. I guess we can upgrade to 2.7.0, but 
we can't use 3.0.x.

Thanks,
Homero.
-- 

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] [EXTERNAL]: FindProtobuf in specified dirs

2016-10-20 Thread Parag Chandra
I believe the protobuf-config.cmake.in generates a protobuf-config.cmake file 
once you actually use CMake to build protobuf itself.



Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309




From: CMake  on behalf of Homero Cardoso de Almeida 

Date: Thursday, October 20, 2016 at 2:56 PM
To: "cmake@cmake.org" 
Subject: [EXTERNAL]: [CMake] FindProtobuf in specified dirs

Hello,

I'm working on enhancing the build process in my company by using CMake, and 
I'm having trouble to have it find the Google Protocol Buffers binary and 
libraries in a specific directory in my workspace.

Due to several reasons, we cannot install protobuffers directly in our 
environment, so I have it download and unpack a zip file with the protobuffer 
library and header files in a directory in my home folder. However, when I use 
the find_package directive giving said folder as a hint it complains that it 
could not find a protobuf-config.cmake file and fails. I couldn't find any such 
file anywhere, the only thing coming close is a 
"protobuf-config.cmake.in<http://protobuf-config.cmake.in>" in the protobuf 
source tree and I don't know if I can use that.

Do I have to provide my own protobuf-config.cmake file, or I'm using it 
completely wrong?

We are frozen in protocol buffers 2.4.1. I guess we can upgrade to 2.7.0, but 
we can't use 3.0.x.

Thanks,
Homero.
-- 

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] [EXTERNAL]: Visual Studio generator, cross-compiling

2016-10-18 Thread Parag Chandra
Hi Andy,

My build supports several operating systems, including NaCl. The way I solved 
this problem, essentially, is every place you would normally call 
target_link_libraries, you replace it with a call to 
LinkPossiblyPrebuiltLibraries, which is a macro I have defined like this:

macro (LinkPossiblyPrebuiltLibraries artifactName)
foreach (nextLibrary ${ARGN})
if (NACL AND (CMAKE_GENERATOR MATCHES "Visual Studio.*"))
# CMake spits out -l, which throws off 
clang++ and results in
# libraries that can't be found. So instead we explicitly add 
-l and
# -L${LIBS_DIR}
set_property (TARGET ${artifactName} APPEND_STRING PROPERTY 
LINK_FLAGS " -l${nextLibrary}")
get_target_property (IsImported ${artifactName} "IMPORTED")
else ()
target_link_libraries (${artifactName} ${nextLibrary})
endif ()
endforeach ()
endmacro ()

Then separately I add in the link directory:

if (CMAKE_GENERATOR MATCHES "Visual Studio.*")
link_directories ("${LIBS_DIR}/$(Configuration)/${CpuArchSubdir}")
else ()
link_directories ("${NACL_SDK_ROOT}/lib/pnacl/${CMAKE_BUILD_TYPE}")
endif ()

There may very well be some mistakes in there, because I’ve simplified some 
things that aren’t pertinent to this discussion. I should also point out that I 
gave up on the Visual Studio NaCl toolchain somewhere around the pepper_35 
days, because it became apparent that Google wasn’t putting much effort into 
keeping it a going concern when the equivalent Linux/MacOSX toolchains worked 
just fine. I guess things have improved since then?



Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309




From: CMake  on behalf of Andy Yelland 

Date: Tuesday, October 18, 2016 at 1:56 PM
To: "cmake@cmake.org" 
Subject: [EXTERNAL]: [CMake] Visual Studio generator, cross-compiling

Hi there

I am trying to coax a Cmake generation of a Visual Studio project of our 
cross-platform product, that includes the PNaCl platform.  The MSBuild setup 
for PNaCl is a little bit fussy, and does not like the relative pathnames in 
, that get produced when the product has 
target_link_libraries setup between the static libraries in the product.  For 
the sake of this mail I'll call the library project 'LibProject', which as it's 
based on unix toolchain, will get the static lib created as libLibProject.a.  
To be used as a command-line on the PNaCl cross-compiler, then it needs to get 
translated to -lLibProject  (without the lib prefix, or the .a suffix).

So going into the Visual Studio generator for the EXE project, at present are 
the relative paths (will use Debug for this example):  
../LibProject/Debug/libLibProject.a  which gets added to the 
 tag in the .vcxproj

To make the PNaCl MSBuild extension work, then instead it needs to be:

  *   LibProject
  *   
../LibProject/Debug

I am well aware that these get set by the cmake functions: 
target_link_libraries() and link_directories(), so feel this ought to be 
possible by Cmake script.

What I'm struggling with, is finding *a place* where I can:

  *   Query all the libraries that have become dependent on a target (the input 
to the Generator).  As target_link_libraries cascade, so my EXE project does 
not know about all of its leaf libraries, so I'm not really sure if there is a 
target property with ALL the dependent static library projects)
  *   Adjust this list, stripping: path, 'lib' and '.a'
  *   Inserting link_directories (or the equivalent, presuming it's some target 
property now), corresponding to the relative paths that were stripped in the 
step above

All of this would need to happen, after we've finished setting up the target, 
but before the generator.  Ideally this would be something I defined in the 
ToolChain folder - but I can't think of any kind of callback in the CMake 
system.

I'm open to other suggestions, about how to setup this visual studio 
cross-compile.  While PNaCl + MSDev may be rare, I feel that cross-compiling 
for other unix systems with -l and -L library and path command-lines ought to 
have been done before with Visual Studio generators.

Thanks in advance



Andy
-- 

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] [EXTERNAL]: Re: Xcode generator problems

2016-08-23 Thread Parag Chandra
Hi Robert,

We have a similar requirement, so I basically run “ar -x” to explode all of the 
static libraries into their constituent pieces, and then run “ar cr" to 
recombine them into one monolithic static library. This is done via Gradle, 
after it runs CMake to build the static libraries in the first place. Probably 
not the answer you’re looking for, but I’m sure you can write a custom 
post-build step in CMake to do the same.
 

Parag Chandra
Technical Lead, Mobile Team
Mobile: +1.919.824.1410

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309
 

On 8/23/16, 3:30 AM, "CMake on behalf of Robert Bielik" 
 wrote:

I just realized this is in error, issue is closed.

But I still have the need to combine several static libraries into ONE 
static library.

There seems to be descriptions of solutions to this, but they are rather 
convoluted, so is there an "easy" way of doing:

add_library(foo STATIC )
add_library(bar STATIC )
add_library(baz STATIC )
target_link_libraries(baz foo bar)

with baz containing ALL libraries ?

Regards
/Robert


>-Original Message-
>From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Robert Bielik
>Sent: den 23 augusti 2016 08:26
>To: cmake@cmake.org
>Subject: [CMake] Xcode generator problems
>
>Hi all,
>
>I just opened https://gitlab.kitware.com/cmake/cmake/issues/16260, anyone
>have ideas how to work around it ? Or if it is fixed in latest & greatest 
CMake ?
>
>Regards
>/Robert
>--
>
>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


-- 

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] CMake not finding boost headers

2015-12-07 Thread Parag Chandra
The reason is that ONLY really does mean: “only look in the 
CMAKE_FIND_ROOT_PATH, and don’t look anywhere else”. This can be useful when 
cross-compiling, as it ensures that you can strictly control the location(s) 
where system headers are found, and not accidentally find them on the host 
system. It would be bad if, e.g., you were trying to target an embedded device 
and CMake and/or the compiler used the system headers from your host Linux 
machine.

Having said that, I disabled the ONLY option when I cross-compile for iOS and 
Android, as I found it too limiting. I have cross-compiled dependencies 
(including Boost) in locations outside of the CMAKE_FIND_ROOT_PATH, and I 
didn’t want to relocate them all inside CMAKE_FIND_ROOT_PATH to satisfy the 
ONLY option.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: CMake mailto:cmake-boun...@cmake.org>> on behalf 
of Zac Bergquist mailto:zbergquis...@gmail.com>>
Date: Monday, December 7, 2015 at 1:56 PM
To: Cmake Mailing List mailto:cmake@cmake.org>>
Subject: Re: [CMake] CMake not finding boost headers

It turns out I missed some important information.  I am cross compiling, and my 
toolchain file sets CMAKE_FIND_ROOT_PATH_MODE_INCLUDE to ONLY. If I change ONLY 
to BOTH, CMake succesfully locates the Boost headers.

I'm not sure if this is the correct solution though.  Why would setting this to 
ONLY prevent CMake from searching outside CMAKE_FIND_ROOT_PATH?

On Mon, Dec 7, 2015 at 1:44 PM, Zac Bergquist 
mailto:zbergquis...@gmail.com>> wrote:
I'm stuck on what seems like a rather simple problem.

I've got this in my CMakeLists.txt

set(BOOST_INCLUDEDIR ${CMAKE_CURRENT_LIST_DIR}/boost_1_59_0)
set(Boost_DEBUG 1)
find_package(Boost 1.59.0 EXACT REQUIRED)

The boost_1_59_0 I'm pointing it to contains the Boost source straight from the 
1.59.0 release.

I've tried both CMake 3.3.1 and 3.4.1.  When I run CMake, I get the "Unable to 
find the Boost header files" error.  Here's some of the debug output:

-- [ FindBoost.cmake:551 ] _boost_TEST_VERSIONS = 1.59.0;1.59
-- [ FindBoost.cmake:553 ] Boost_USE_MULTITHREADED = TRUE
-- [ FindBoost.cmake:555 ] Boost_USE_STATIC_LIBS =
-- [ FindBoost.cmake:557 ] Boost_USE_STATIC_RUNTIME =
-- [ FindBoost.cmake:559 ] Boost_ADDITIONAL_VERSIONS =
-- [ FindBoost.cmake:561 ] Boost_NO_SYSTEM_PATHS =
-- [ FindBoost.cmake:613 ] Declared as CMake or Environmental Variables:
-- [ FindBoost.cmake:615 ]   BOOST_ROOT =
-- [ FindBoost.cmake:617 ]   BOOST_INCLUDEDIR = 
/home/user/thirdparty/boost_1_59_0
-- [ FindBoost.cmake:619 ]   BOOST_LIBRARYDIR =
-- [ FindBoost.cmake:621 ] _boost_TEST_VERSIONS = 1.59.0;1.59
-- [ FindBoost.cmake:690 ] Include debugging info:
-- [ FindBoost.cmake:692 ]   _boost_INCLUDE_SEARCH_DIRS = 
/home/user/thirdparty/boost_1_59_0;PATHS;C:/boost/include;C:/boost;/sw/local/include
-- [ FindBoost.cmake:694 ]   _boost_PATH_SUFFIXES = 
boost-1_59_0;boost_1_59_0;boost/boost-1_59_0;boost/boost_1_59_0;boost-1_59;boost_1_59;boost/boost-1_59;boost/boost_1_59

So I see that the FindBoost module picked up my BOOST_INCLUDEDIR hint.  I 
looked at the source for the FindBoost module, and it comes down to:

find_path(NAMES boost/config.hpp ...).

The file exists exactly where CMake says it's looking.

$ ls -l /home/user/thirdparty/boost_1_59_0/boost/config.hpp
-r--r--r-- 1 user user 2188 Nov 30 16:20 
/home/user/thirdparty/boost_1_59_0/boost/config.hpp

Yet CMake is still setting Boost_INCLUDE_DIR-NOTFOUND.

I have tried removing boost_1_59_0 from my BOOST_INCLUDEDIR hint (since I saw 
that portion of the path in the suffixes, but it doesn't help).  The only way I 
am able to get CMake to locate the boost headers is to install them into a 
global location like /usr/local/include (which I'd like to avoid).


-- 

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] print a message during a specific build target

2015-11-24 Thread Parag Chandra
The if() statements are executed when CMake runs, because you’re basically 
adding logic to the “meta-build” process that generates your build system; not 
the build system itself. Maybe you can use “add_custom_target” to create 
targets which do nothing but print the desired message, and then use 
“add_dependencies” to tie these targets back to your original ones? So 
something like:

add_custom_target(“test_print” …)
add_dependencies(test test_print)




Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com> 

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309













On 11/24/15, 12:04 AM, "CMake on behalf of Christopher Sean Morrison" 
 wrote:

>
>Hi,
>
>I’m trying to print a message for a particular build target and am a bit 
>stuck.  I found that the IF statement has a TARGET keyword that should 
>truthfully match for a particular build target, but it doesn’t seem to be 
>working at least the way I’m trying to use it and would expect it to work.  
>Snippet in question in a top-level CMakeLists.txt file looks like this:
>
>if (TARGET check)
>  message(“special note about CHECK target…”)
>elseif (TARGET test)
>  message(“different note about TEST target…”)
>endif (TARGET check)
>
>Now what happens is that the CHECK message is printed … during cmake(!).  What 
>I’m trying to achieve is only have those messages printed during≈ “make check” 
>and “make test”, etc.  Ideally, I want to be able to inject a message before 
>any target actions are taken and possibly after.
>
>I see in the docs that I can set COMMENT during add_custom_target(check …) and 
>that should print my message before any target actions, but how can I get a 
>similar message printed during ‘test’ or ‘all’ or some other implicit target?  
>Is there a better or more general way?  Thanks for your assistance.
>
>Cheers!
>Sean
>
>-- 
>
>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] Visual Studio Cross Compile

2015-11-02 Thread Parag Chandra
Hi Michael,

Meant to reply sooner. As Nils pointed out, Visual Studio isn’t quite as 
flexible with cross-compilation as some other build systems. Having said that, 
it is indeed possible to cross-compile with Visual Studio, but there has to be 
a cross toolchain compatible with the IDE. Some examples of this include:

Google’s Native Client - I have successfully targeted this environment with 
Visual Studio 2010 and Cmake;

Windows Phone 8.1/10 - Have targeted this as well. While you may be thinking 
“that’s just another flavor of Windows”, it is nevertheless cross-compiling for 
ARM;

Several options for Android development:
Nvidia Tegra Studio;
Visual Studio 2015 - Microsoft now offers first-party support within VS 2015;
VS-Android;

Commercial/paid add-ons that seem to support arbitrary GCC toolchains:
Visual GDB - This one may be your best bet for what you are trying to 
accomplish. Supports Linux, Android, Raspberry Pi, etc. out of the box, and 
they claim to have an extensibility model to add your own platforms;
WinGDB - similarly seems to support the GNU toolchain directly.

Anyway, hopefully you get the idea. It is possible, but out of the box, you’re 
only going to be able to target Windows Phone and Android.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com> 

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309













On 10/29/15, 10:21 AM, "CMake on behalf of Michael Jaentsch" 
 wrote:

>Hi all,
>
>I have a question concerning Cross Compiling with CMake on Windows. I 
>would like to use Visual Studio but this is not a must. What I do is, I 
>setup a project for Cross Compiling on Linux and it works fine. Now I 
>want to transfer to Windows, so I set up a toolchain file which sets the 
>following variables:
>CMAKE_SYSTEM_NAME
>CMAKE_SYSTEM_PROCESSOR
>CMAKE_FIND_ROOT_PATH
>CMAKE_C_COMPILER
>CMAKE_CXX_COMPILER
>
>and some more stuff. Then I run my cmake gui (I tried 3.2 and 3.4rc2) 
>on Windows and tell it to generate a project for Visual Studio 10 and to 
>use the toolchain file. However, the output shows that it is trying to 
>use the Visual Studio compiler and then subsequently the build fails 
>because of some unkown compiler flags.
>
>So my question is: Is it even possible to do what I'm trying to do? Can 
>I cross compile with Visual Studio or do I have to use a different 
>generator? All I found in the documentation is that it is possible to 
>cross compile with a toolchain file...
>
>Cheers
>Michael
>
>
>-- 
>Technische Universität München
>Michael Jäntsch
>Fakultät für Informatik
>Robotics and Embedded Systems
>Parkring 13
>85748 Garching bei München
>michael.jaent...@in.tum.de
>www6.in.tum.de
>-- 
>
>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] jom and cmake

2015-10-05 Thread Parag Chandra
If I’m not mistaken, anything you place after a ‘—‘ (that’s two dash 
characters) will be passed directly to the underlying build tool that cmake is 
driving. See here:

https://cmake.org/cmake/help/v3.3/manual/cmake.1.html



Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: CMake on behalf of Tom Kacvinsky
Date: Monday, October 5, 2015 at 11:09 AM
To: "cmake@cmake.org<mailto:cmake@cmake.org>"
Subject: [CMake] jom and cmake

We are using "JOM Makefiles NMakefiles" as our generator.  Everything is fine, 
but every now and again I need to investigate the temporary files tha jom 
produces.  I can do this by using the /KEEPTEMPFILES option to jom, but where I 
am stymied is how to configure cmake so that when jom is invoked when cmake is 
invoked with --build, jom gets this option.

Does anyone here know how to do this?

Thanks,

Tom
-- 

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] Port from Debian to Windows: Include files not found

2015-09-18 Thread Parag Chandra
That is interesting. I’m used to seeing “-I/header/search/path”, but in this 
case it’s doing “—include_path=/header/search/path”; I guess you’re using some 
specialized compiler toolchain. So if I understand you correctly, if you were 
to manually edit the command that you pasted such that it had the necessary 
include paths in it and manually re-run it, then the command would succeed? 
Maybe you need to explicitly set the supported LANGUAGES in your project() 
command so that it includes both assembly and C?


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: Randy Turner
Date: Friday, September 18, 2015 at 2:01 PM
To: Parag Chandra
Cc: "cmake@cmake.org<mailto:cmake@cmake.org>"
Subject: Re: [CMake] Port from Debian to Windows: Include files not found

Awesome suggestion. I'm surprised that I hadn't yet tried that. I sent the 
output to a file and included the relevant portion below. I'm not the most 
familiar with parsing the output of makefiles, but it seems to only be using 
the include_paths for the first assembly object and not any of the subsequent c 
objects. I feel like there is something really obvious that I'm missing.

[  6%] Building ASM object CMakeFiles/timer1.dir/os/vecs_timer1.asm.obj
c:\ti\ccsv6\tools\compiler\c6000_7.4.15\bin\cl6x.exe  --compile_only 
--asm_file=C:\Users\aec_user-14\Documents\Repos\OperatingSystem\os\vecs_timer1.asm
  
--include_path=C:\Users\aec_user-14\Documents\Repos\OperatingSystem\C6xCSL\include
 
--include_path=C:\Users\aec_user-14\Documents\Repos\OperatingSystem\C6xCSL\lib_3x
 --include_path=c:\ti\ccsv6\tools\compiler\c6000_7.4.15\include 
--include_path=c:\ti\ccsv6\tools\compiler\c6000_7.4.15\lib 
--include_path=C:\Users\aec_user-14\Documents\Repos\OperatingSystem\udp_ip 
--include_path=C:\Users\aec_user-14\Documents\Repos\OperatingSystem 
--include_path=C:\Users\aec_user-14\Documents\Repos\OperatingSystem\os 
--include_path=C:\Users\aec_user-14\Documents\Repos\OperatingSystem\sys 
--include_path=C:\Users\aec_user-14\Documents\Repos\OperatingSystem\utilities   
 -g --define="_DEBUG" --define="CHIP_6713" --define="RUNTEST" 
--output_file=CMakeFiles\timer1.dir\os\vecs_timer1.asm.obj
[ 13%] Building C object CMakeFiles/timer1.dir/os/Arinc.c.obj
c:\ti\ccsv6\tools\compiler\c6000_7.4.15\bin\cl6x.exe  --compile_only 
--c_file=C:\Users\aec_user-14\Documents\Repos\OperatingSystem\os\Arinc.c  
-mv6710 --abi=coffabi --quiet --diag_wrap=off 
@CMakeFiles/timer1.dir/includes_C.rsp   -g --define="_DEBUG" 
--define="CHIP_6713" --define="RUNTEST" 
--output_file=CMakeFiles\timer1.dir\os\Arinc.c.obj

>> Compilation failure

On Fri, Sep 18, 2015 at 1:26 PM, Parag Chandra 
mailto:pa...@ionicsecurity.com>> wrote:
As a diagnostic measure, can you try running in verbose mode, ala:

make VERBOSE=1

That will dump out the exact command lines that are being used, so you can see 
the search paths.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: CMake on behalf of Randy Turner
Date: Friday, September 18, 2015 at 1:22 PM
To: "cmake@cmake.org<mailto:cmake@cmake.org>"
Subject: [CMake] Port from Debian to Windows: Include files not found

I am having trouble building a Code Composer Studio project with CMake. 
Executing from the same directory in Linux compiles successfully, but in Linux 
it fails to find any included files that aren't in the same directory as the .c 
file that it's building. I can provide a relative path to help it move on, but 
it will just fail to find the files referenced by that one.

The very first #include of the project is  which is located in the 
compiler's install files. As shown in my StackOVerflow question about this 
issue 
(http://stackoverflow.com/questions/32591626/cmake-header-files-cannot-be-opened)
 I can confirm that the files are in the directory that is included in the 
CMakeLists.txt file and can be found while CMake is executing, but fail to be 
located by make. I am using MinGW's make, and using the commands make and 
mingw32-make both ellicit the same result, "fatal error: could not open source 
file "stdbool.h" (no directories in search list)."

Is there something that I'm missing here? Is something else necessary beyond 
using INCLUDE_DIRECTORIES for all of the directories in the project?

-- 

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 of

Re: [CMake] Port from Debian to Windows: Include files not found

2015-09-18 Thread Parag Chandra
As a diagnostic measure, can you try running in verbose mode, ala:

make VERBOSE=1

That will dump out the exact command lines that are being used, so you can see 
the search paths.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: CMake on behalf of Randy Turner
Date: Friday, September 18, 2015 at 1:22 PM
To: "cmake@cmake.org<mailto:cmake@cmake.org>"
Subject: [CMake] Port from Debian to Windows: Include files not found

I am having trouble building a Code Composer Studio project with CMake. 
Executing from the same directory in Linux compiles successfully, but in Linux 
it fails to find any included files that aren't in the same directory as the .c 
file that it's building. I can provide a relative path to help it move on, but 
it will just fail to find the files referenced by that one.

The very first #include of the project is  which is located in the 
compiler's install files. As shown in my StackOVerflow question about this 
issue 
(http://stackoverflow.com/questions/32591626/cmake-header-files-cannot-be-opened)
 I can confirm that the files are in the directory that is included in the 
CMakeLists.txt file and can be found while CMake is executing, but fail to be 
located by make. I am using MinGW's make, and using the commands make and 
mingw32-make both ellicit the same result, "fatal error: could not open source 
file "stdbool.h" (no directories in search list)."

Is there something that I'm missing here? Is something else necessary beyond 
using INCLUDE_DIRECTORIES for all of the directories in the project?
-- 

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] Fwd: Expected behaviour for Tests/VSWinStorePhone

2015-09-09 Thread Parag Chandra
Hi Pierre,

For the ARM version, I believe you will need to specify the CPU architecture 
explicitly, because CMake is not going to generate a “fat”/multi-arch solution 
in the manner that it does for Xcode. What I do for WinPhone is to pass 
arguments like this:

-DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1 –G”Visual Studio 12 
2013” -DCMAKE_GENERATOR_PLATFORM=ARM

Hope this helps.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: CMake on behalf of Pierre Wilmot
Date: Wednesday, September 9, 2015 at 3:49 AM
To: "cmake@cmake.org<mailto:cmake@cmake.org>"
Subject: [CMake] Fwd: Expected behaviour for Tests/VSWinStorePhone



Hi everyone,

I’m trying to generate a Windows Phone 8.1 project from CMake, I was expecting 
the Tests/VSWinStorePhone folder to be a good template to start with, but I’m a 
bit confused with the result I get.

I was expecting to get pretty much the same result as a project created with 
the Visual studio “DirectX and XAML App (Windows Phone)”. That means a project 
displaying cubes that I could just run on my Windows Phone device by pressing 
run on device.

Instead I’m getting a project with no ARM configuration, only Win32 which is 
surprising, because as far as I know, there only ARM device available on the 
market.
If I build the project, I get an exe throwing an error on launch

“This application can only run in the context of an app container”. (started 
from exe)
OR
“In order to debug this project, you must consume it from an application 
project that creates a package and is marked as the Startup Project” (started 
from Visual Studio)

As the Project name is “VSWinStorePhone”, I was expecting the created solution 
to be ready for Windows Phone deployment, but it’s not.

Is that the expected behaviour ?
If so, where can I find a good CMakeList template to create a Windows Phone 8.1 
app ?

Setup Info:

Running on Windows 8 x64
With Visual Studio Professional 2013 Version 12.0.31101.00 Update 4
Used cmake 3.3.1-win32-x86
With the file of Tests/VSWinStorePhone from the current github master branch

Ran command from Desktop/CMAKEOUT :
..\cmake-3.3.1-win32-x86\bin\cmake.exe ..\Cmake-master\Test\VSWinStrorePhone

Best regards,
Pierre



-- 

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] How to add to CMAKE_C_FLAGS during cache priming?

2015-08-25 Thread Parag Chandra
Hi Philip,

I think I had a similar problem a while back. You basically need to 
initialize CMake’s cache values the first time you run it to create a new 
build system. So something like this:

cmake -C InitialCacheValues.cmake

And then your InitialCacheValues.cmake would contain the extra stuff you 
need to prime the cache with. For example, I do something like this to add 
additional configurations:

set (CMAKE_CONFIGURATION_TYPES 
Debug;Release;RelWithDebInfo;MinSizeRel;Debug_RTLDLL;Release_RTLDLL;RelWith
DebInfo_RTLDLL;MinSizeRel_RTLDLL CACHE INTERNAL "Configuration types" 
FORCE)
foreach (cfg "DEBUG" "RELEASE" "MINSIZEREL" "RELWITHDEBINFO")
  foreach (flag "CXX" "C" "EXE_LINKER" "MODULE_LINKER" "SHARED_LINKER" 
"STATIC_LINKER")
set (CMAKE_${flag}_FLAGS_${cfg}_RTLDLL ${CMAKE_${flag}_FLAGS_${cfg}} 
CACHE STRING "${flag} flags for ${cfg}_RTLDLL" FORCE)
  endforeach ()
endforeach ()


Here you can see that I essentially copy all the important flags from 
existing configurations that CMake is already going to create, and then 
later on in my CMakeLists I adjust them as needed.

Hope this helps.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com> 

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309














On 8/25/15, 2:30 PM, "Philip Semanchuk"  wrote:

>Hi there,
>I'm relatively new to CMake. I'm trying to build a 3rd party library 
>under Windows. (The 3rd party library happens to be an old-ish version 
>of ITK.) I want to add a compile flag (/bigobj) during the cache priming 
>step, but I can't figure out how to do it. Either my changes get 
>ignored, or I overwrite the default flags completely which is not what I 
>want either. I just want to add my flag to the default flags for all 
>compile steps.
>
>Here's what I'm doing: I have a file called prime_cache.cmake, and I 
>invoke CMake like so:
>cmake -C prime_cache.cmake ..\the_source_code
>
>prime_cache.cmake contains this:
>set(COMPILE_FLAGS  /bigobj)
>set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_FLAGS}" CACHE STRING "")
>set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS}" CACHE STRING "")
>
>When CMake is done, CMakeLists.txt contains this:
>CMAKE_C_FLAGS:STRING= /bigobj
>
>But I want this:
>CMAKE_C_FLAGS:STRING= /bigobj /DWIN32 /D_WINDOWS /W3
>
>I've also tried modifying CMAKE_C_FLAGS_INIT, but that didn't affect 
>CMAKE_C_FLAGS.
>
>I realize that I can hand-edit CMakeCache.txt to get the flags I want, 
>but this is a small part of a much larger process and hand-editing is 
>tedious and error-prone so I want to avoid it if possible.
>
>I'm using CMake 2.8.12.2 and would prefer to continue using this version 
>even though it's not current.
>
>Thanks for a great tool,
>Philip
>
>-- 
>
>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] Imported libraries and cross platform target names

2015-08-18 Thread Parag Chandra
You just specify the “basename” of the library, so something like this:

find_library (timer NAMES timer PATHS your/library/directory)
target_link_libraries(test timer)

And Cmake takes care of the rest. It’s even easier if “timer” is also part of 
the same CMake-generated build system. In that case, the find_library isn’t 
even needed.

Things do get a little more complicated when you want to distinguish between 
release/debug variants of the same library. For that you can use the DEBUG and 
OPTIMIZED keywords of target_link_libraries().


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: , "Anthony (CDS)" 
mailto:anthony.r.e...@controlsdata.com>>
Date: Tuesday, August 18, 2015 at 2:29 PM
To: "CMake@cmake.org<mailto:CMake@cmake.org>" 
mailto:CMake@cmake.org>>
Subject: [CMake] Imported libraries and cross platform target names

Given that add_library() produces a unique filename per platform (the “actual 
file name of the library built is constructed based on conventions of the 
native platform (such as lib.a or.lib”), how does one add the 
library to the final application without having to deal with the filename 
difference?  In other words, I’ve got one library that, by default, produces 
‘libtest.a’ on Linux and ‘test.lib’ on Windows.  How can I add this imported 
library into the final application in a cross platform manner?  I know I can 
specify two different imported locations (see below), but it seems odd to me 
that Cmake – the cross-platform build env generator – doesn’t have a better 
native way of dealing with this….

The snippet below will work, but just seems wrong given the nature of what 
CMake is intended to do…is there a better way that I’m missing?!  If not, can I 
request that a future release of Cmake handle platform naming convention 
difference internally when invoking ADD_LIBRARY with the IMPORTED tag set?  Ok 
so, to be fair, Cmake can be used to cross compile and that certainly 
complicates my feature request but, when not cross compiling, CMake knows what 
platform it’s being executed on so it should be able to resolve static archive 
platform decorations internally.

ADD_LIBRARY(testSTATICIMPORTED)
if(WIN32)
   SET_PROPERTY(TARGETtestPROPERTYIMPORTED_LOCATION ${LIB_D}/timer.lib)
endif()
if(UNIX)
   SET_PROPERTY(TARGETtest PROPERTYIMPORTED_LOCATION ${LIB_D}/libtimer.a)
endif()

Thanks in advance,
Anthony Ette
Control Systems Engineer

Rolls-Royce Controls and Data Services
7661 N Perimeter Rd
Indianapolis, IN 46241
tel: +1 (317) 230-6943
mob: +1 (317) 864-7975
email: anthony.r.e...@controlsdata.com<mailto:anthony.r.e...@controlsdata.com>

This e-mail (including attachments) contains contents owned by Rolls-Royce plc 
and its subsidiaries, affiliated companies or customers and covered by the laws 
of England and Wales, Brazil, US, or Canada (federal, state or provincial). The 
information contained in this email is intended to be confidential, may be 
legally privileged and subject to export controls which may restrict the access 
to and transfer of the information. If you are not the intended recipient, you 
are hereby notified that any retention, dissemination, distribution, 
interception or copying of this communication is strictly prohibited and may 
subject you to further legal action. Reply to the sender if you received this 
email by accident, and then delete the email and any attachments.
-- 

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] Imported libraries and cross platform target names

2015-08-18 Thread Parag Chandra
Yes, very similar. When I set out to convert our existing build system, which 
consists of many individual .sln and .vcxproj files, I got a requirement that 
the developers do not all want to work out of the same “uber” Xcode 
workspace/VS solution that contains all of the projects. They want to continue 
working with solutions that contain only the library of interest plus its 
associated test project. So when a developer runs CMake, a dependency like 
“timer” may refer to another CMake-generated project within the current build 
system, or it may refer to an already-built/downloaded dependency of the same 
name.

Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: , "Anthony (CDS)" 
mailto:anthony.r.e...@controlsdata.com>>
Date: Tuesday, August 18, 2015 at 2:59 PM
To: Parag Chandra mailto:pa...@ionicsecurity.com>>, 
"CMake@cmake.org<mailto:CMake@cmake.org>" 
mailto:CMake@cmake.org>>
Subject: RE: [CMake] Imported libraries and cross platform target names

Thank you, I will take a look at find_library.  The static libraries are ones 
we build in-house but in a separate CMake-generated build system.  The reason 
we use a separate build system is because our common library code is used by 
all applications and, as such, is on a separate development cycle than the 
applications themselves.  In other words, while there may be advantages to 
combining them, I don’t think it would really make sense in our case….any 
thoughts?  Are you in a similar situation?

Anthony Ette
Control Systems Engineer

Rolls-Royce Controls and Data Services
7661 N Perimeter Rd
Indianapolis, IN 46241
tel: +1 (317) 230-6943
mob: +1 (317) 864-7975
email: anthony.r.e...@controlsdata.com<mailto:anthony.r.e...@controlsdata.com>

From: Parag Chandra [mailto:pa...@ionicsecurity.com]
Sent: Tuesday, August 18, 2015 2:45 PM
To: Ette, Anthony (CDS); CMake@cmake.org<mailto:CMake@cmake.org>
Subject: Re: [CMake] Imported libraries and cross platform target names

You just specify the “basename” of the library, so something like this:

find_library (timer NAMES timer PATHS your/library/directory)
target_link_libraries(test timer)

And Cmake takes care of the rest. It’s even easier if “timer” is also part of 
the same CMake-generated build system. In that case, the find_library isn’t 
even needed.

Things do get a little more complicated when you want to distinguish between 
release/debug variants of the same library. For that you can use the DEBUG and 
OPTIMIZED keywords of target_link_libraries().


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309



From: , "Anthony (CDS)" 
mailto:anthony.r.e...@controlsdata.com>>
Date: Tuesday, August 18, 2015 at 2:29 PM
To: "CMake@cmake.org<mailto:CMake@cmake.org>" 
mailto:CMake@cmake.org>>
Subject: [CMake] Imported libraries and cross platform target names

Given that add_library() produces a unique filename per platform (the “actual 
file name of the library built is constructed based on conventions of the 
native platform (such as lib.a or.lib”), how does one add the 
library to the final application without having to deal with the filename 
difference?  In other words, I’ve got one library that, by default, produces 
‘libtest.a’ on Linux and ‘test.lib’ on Windows.  How can I add this imported 
library into the final application in a cross platform manner?  I know I can 
specify two different imported locations (see below), but it seems odd to me 
that Cmake – the cross-platform build env generator – doesn’t have a better 
native way of dealing with this….

The snippet below will work, but just seems wrong given the nature of what 
CMake is intended to do…is there a better way that I’m missing?!  If not, can I 
request that a future release of Cmake handle platform naming convention 
difference internally when invoking ADD_LIBRARY with the IMPORTED tag set?  Ok 
so, to be fair, Cmake can be used to cross compile and that certainly 
complicates my feature request but, when not cross compiling, CMake knows what 
platform it’s being executed on so it should be able to resolve static archive 
platform decorations internally.

ADD_LIBRARY(testSTATICIMPORTED)
if(WIN32)
   SET_PROPERTY(TARGETtestPROPERTYIMPORTED_LOCATION ${LIB_D}/timer.lib)
endif()
if(UNIX)
   SET_PROPERTY(TARGETtestPROPERTYIMPORTED_LOCATION ${LIB_D}/libtimer.a)
endif()

Thanks in advance,
Anthony Ette
Control Systems Engineer

Rolls-Royce Controls and Data Services
7661 N Perimeter Rd
Indianapolis, IN 46241
tel: +1 (317) 230-6943
mob: +1 (317) 864-7975
email: anthony.r.e...@controlsdata.com<mailto:ant

[CMake] Generating Windows 10 universal project?

2015-08-13 Thread Parag Chandra
Hi,

I’m trying to generate a static library project that targets the Windows 10 
Universal App platform. I found the following post on SO:

http://stackoverflow.com/questions/31857315/how-can-i-use-cmake-to-generate-windows-10-universal-project

However, specifying -DCMAKE_SYSTEM_VERSION=10.0 (or none at all), yields the 
following error:

CMake Error at CMakeLists.txt:5 (project):
  Visual Studio 14 2015 supports Windows Store '8.0' and '8.1', but not
  '10.0'.  Check CMAKE_SYSTEM_VERSION.

Is this supported yet?

Thanks,


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309










-- 

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] Visual Studio solution folders with 1 item in them

2015-07-23 Thread Parag Chandra
Couldn’t you use the source_group() command to do this? That is how I 
arbitrarily group my source files into folders within Visual Studio.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: Andrei Porumb mailto:anpor...@microsoft.com>>
Date: Wednesday, July 22, 2015 at 11:27 PM
To: J Decker mailto:d3c...@gmail.com>>
Cc: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: Re: [CMake] Visual Studio solution folders with 1 item in them

What you are suggesting will  add some previously build targets to the solution 
inside a solution folder. What I want is to simply have a file inside a 
solution folder.

Best Regards,
Andrei Porumb

"a skhizein equals to 1 software rename/dev cycle"

From: J Decker [mailto:d3c...@gmail.com]
Sent: Wednesday, July 22, 2015 7:13 PM
To: Andrei Porumb mailto:anpor...@microsoft.com>>
Cc: cmake@cmake.org<mailto:cmake@cmake.org>
Subject: Re: [CMake] Visual Studio solution folders with 1 item in them

globally set

set_property(GLOBAL PROPERTY USE_FOLDERS On)


SET_TARGET_PROPERTIES( PROPERTIES
  FOLDER "folder name"
)




On Wed, Jul 22, 2015 at 3:04 PM, Andrei Porumb 
mailto:anpor...@microsoft.com>> wrote:
Hello CMake,

Thank you for everything so far!

I am migrating some cross platform projects to CMake. Naturally 
our devs (myself included) like things to look "in a certain way". And if 
"certain way" can be produced by CMake then adoption is smoothened.

That being said, this is the issue at hand. How can I instruct 
CMake to produce some harmless Visual Studio solution folders having some 
non-target items in them? (I know how to insert targets under Visual Studio 
solution folders, but I need simple files). Like in the picture below. Notice 
that "Specs" solution folder contains 3 items, a text file, a bitmap and a 
sequenceDiagram, none of which are CMake targets.

[cid:image001.png@01D0C4BC.639FFEF0]

Any help is greatly appreciated.

Best Regards,
Andrei Porumb

"a skhizein equals to 1 software rename/dev cycle"


--

Powered by www.kitware.com<http://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 add target-level dependencies to non-existent target

2015-06-30 Thread Parag Chandra
I’ve run into similar problems, but I think this is by design: CMake isn’t 
going to let you do anything to a target until that target exists. For me, it 
was pretty straightforward to adjust my CMakeLists to satisfy the requirement.

If you don’t want to split apart your macro, one thing you might try is 
checking for the existence of the target inside your macro, and then creating 
it if it doesn’t. Something like:

IF (NOT TARGET targetName)
ADD_LIBRARY(targetName ${sources} ${sources_no_pch} ${headers})
ENDIF ()

You would need additional parameters in your macro, which could make this 
pretty messy.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: Glenn Coombs mailto:glenn.coo...@gmail.com>>
Reply-To: "glenn.coo...@gmail.com<mailto:glenn.coo...@gmail.com>" 
mailto:glenn.coo...@gmail.com>>
Date: Tuesday, June 30, 2015 at 9:16 AM
To: cmake Mailing List mailto:cmake@cmake.org>>
Subject: [CMake] Cannot add target-level dependencies to non-existent target

I am getting the error in the subject.  The code I have looks like this:

if (PRE_COMPILED_HEADERS_FOUND)
ADD_PRECOMPILED_HEADER(${header_pch} ${source_pch} sources systemc)
endif()

add_library(systemc ${sources} ${sources_no_pch} ${headers})

where the call to add_dependency is in the ADD_PRECOMPILED_HEADER macro and is 
adding a dependency on the systemc target about to be created on the next line. 
 I could split the macro into 2 and call one before the add_library and one 
after the add_library but that is rather messy.

At the point I try to add the dependency the target does not exist, but it is 
added shortly after.  Is this the way CMake is supposed to behave or should it 
only cause an error if the target doesn't exist at generate time ?

--
Glenn
-- 

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] Visual Studio Project System Extensibilty

2015-06-09 Thread Parag Chandra
Somewhat related: CLion, the new C/C++ IDE from JetBrains, uses CMake directly 
as its project system:

https://www.jetbrains.com/clion/

Not free, but also cross-platform.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: Nagy-Egri Máté Ferenc via CMake mailto:cmake@cmake.org>>
Reply-To: Nagy-Egri Máté Ferenc mailto:csiga.b...@aol.com>>
Date: Tuesday, June 9, 2015 at 1:32 PM
To: David Golub mailto:golu...@gmail.com>>, 'Alexey 
Petruchik' mailto:alexey.petruc...@gmail.com>>, 
"cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: Re: [CMake] Visual Studio Project System Extensibilty

I’m curious too, but I think that it would be easier to use a fixed format for 
project representation, such as the suggested CPS, and have it generate a CMake 
file if an update is needed.

CMake generally lacks any kind of structure, users are generally free to roam 
about the script language. Qt Creator is doing a similar thing. You have a .pro 
file that is maintained by the IDE, and this .pro file is translated to a QMake 
script, which then translates to a native build system. Such a project could 
start off impementing the translation from CPS to a strictly formatted, 
auto-generated CMake script that only covers the features of the IDE. Once that 
is done, the next few steps can be taken to extend it’s capabilities by adding 
new switches, levers and buttons to the Properties section of the 
Solution/Project entities.

While it does not strictly relate, I would suggest people take a visit here:

http://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7752684-add-cmake-support

Visual Studio Code is a promising new IDE that is completely cross-platform and 
already has pilot support for brand new stuff, such as Rust language support. 
It is a new IDE (that currently looks more like a code editor, as far as C++ is 
concerned), and user input greatly influences the course of action from the 
developers POV. The last patch issued took 2 months and adds ~300 bug fixes and 
feature requests, most originating from uservoice.com.

Please take a moment and up-vote CMake support. Most likely on all platform it 
would rely on the newly open-sourced MSBuild system.

Nontheless, it would be a great win for CMake, if an IDE picked up GUI editing 
of projects that translate to CMake automatically. Either by Visual Studio Code 
picking up support, or if someone took the time and implemented CMake project 
for old-school VS through CPS.

Cheers,
Máté

ps.: David, great job on the VS Add-In for CMake. We love it!

Feladó: David Golub<mailto:golu...@gmail.com>
Elküldve: ‎hétfő‎, ‎2015‎. ‎június‎ ‎8‎. ‎0‎:‎27
Címzett: 'Alexey Petruchik'<mailto:alexey.petruc...@gmail.com>, 
cmake@cmake.org<mailto:cmake@cmake.org>

Probably doable but still a lot of work.  It took me about a year over my 
nights and weekends to implement CMake Tools for Visual Studio, which provides 
syntax highlighting and IntelliSense for CMake but no project system (yet).

From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Alexey Petruchik
Sent: Sunday, June 07, 2015 1:45 PM
To: cmake@cmake.org<mailto:cmake@cmake.org>
Subject: [CMake] Visual Studio Project System Extensibilty

Microsoft recently announced Project System Extensibility in Visual Studio 2015.

http://blogs.msdn.com/b/visualstudio/archive/2015/06/02/introducing-the-project-system-extensibility-sdk-preview.aspx

Just curious if this can be used to let Visual Studio directly open CMake 
projects?

-- 

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] Where do all the extra clang flags come from in Xcode?

2015-05-18 Thread Parag Chandra
This is just a guess, but I think the reason you’re seeing all these extra 
warnings enabled/disabled when you use Xcode is that Xcode is going to, by 
default, enable many of these warnings when you create a new project, and 
CMake isn’t doing anything special to alter those in order to match up 
with the Makefiles it generates. In other words, these flags might very 
well be the same ones you’d see if you were to manually create an Xcode 
project via its wizards.

So in reference to your last question, I don’t think you’re going to be 
able to just ‘whitelist’ the flags you want enabled. You’ll also have to 
take stock of the default flags Xcode enables and ‘blacklist’ those.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com> 

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309














On 5/18/15, 1:20 PM, "Paul Smith"  wrote:

>On Mon, 2015-05-18 at 12:32 +0200, Ruslan Baratov via CMake wrote:
>> This table tells you what attribute you need to set to disable/enable
>> specific warning.
>
>I see, so these are CMake attributes?  That wasn't clear to me.  I
>thought they were attributes of Xcode.
>
>I guess my basic question is, why are all these extra flags to disable
>and enable various warnings set in the Xcode generator?  I expected it
>would work like the makefile generator, where if you don't set any flags
>in CMakeLists.txt then you don't get any warnings enabled (or explicitly
>disabled).  It surprises me that when I take the same CMakeLists.txt
>file and use a Makefile generator and an Xcode generator, I get very
>different compile lines.
>
>And secondarily, is there any way to get the Xcode generator to work
>like the Makefile generator, where only the warning flags I explicitly
>defined in my CMakeLists.txt file are added to the compile/link lines
>and no others?
>
>-- 
>
>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] Set Visual Studio parameters not supported directly by CMake

2015-05-05 Thread Parag Chandra
I asked about this a while back; I think it comes up repeatedly. The short 
answer seems to be that this is not supported, by design, so I have simply 
taken to post-processing the generated solutions with Python/Gradle 
scripts. Not ideal, but it has been working well enough for me.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com> 

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309














On 5/5/15, 2:39 PM, "Max Savenkov"  wrote:

>Is there any way to set a parameter of a Visual Studio project that is
>not directly supported by a CMake property or keyword?
>
>This is especially important for the new platforms in Visual Studio,
>like Android or Emscripten. There are a lot of fields I'd like to set,
>like "Debuggable" flag, "JAR Dependencies" etc., but so far, CMake
>doesn't know about them.
>
>It would help, if CMake could do some post-processing on generated
>project files, or would support adding property sheets to projects
>(I'd be able to configure a property sheet and add it to project with
>all the necessary settings).
>
>But maybe I'm missing something? It's just that I try to move away
>from writing Android makefiles by hand to generating Tegra Nsight
>projects for them, but right now I have to set 4 or 5 settings by hand
>after each CMakeLists.txt change, because there is no way to set them
>from 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
-- 

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] VS 2015 RC and Android projects

2015-05-03 Thread Parag Chandra
I'm very interested in this capability myself. Although I have not yet tried 
it, I believe you will want to take advantage of a relatively new feature in 
CMake described here:

http://public.kitware.com/Bug/view.php?id=14673

This seemingly innocuous change opens up CMake to pretty much any platform that 
Visual Studio can support. Since 3.1, I've been using it to generate solutions 
for both Windows Phone and Native Client. So my guess is you would use some 
combination of CMAKE_GENERATOR_PLATFORM and CMAKE_SYSTEM_NAME to select the new 
Android toolchain.

I'm having some trouble with my Windows VMs at the moment, so if you try it our 
yourself, I would be very interested in hearing your results.

Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: Yakov S mailto:sumy...@gmail.com>>
Date: Sunday, May 3, 2015 at 12:02 PM
To: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: [CMake] VS 2015 RC and Android projects


Recently Microsoft announced, that Visual Studio 2015 will support Android 
platform. It actually already works in vs 2015 RC, available for download. It's 
possible to create new project and debug it on device or emulator.  Anybody 
knows, how to adapt existing cmake project for it or it's not yet available?
-- 

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] CMake, Android, and Eclipse ADT Integration

2015-05-01 Thread Parag Chandra
Yes, that’s pretty much the workflow I’m implementing, with the exception
that Gradle drives everything, including CMake; not the other way around.
Gradle is, in my opinion, somewhat more general purpose than CMake, which
is laser-focused on dealing with native code, so I have structured our
multi-platform builds (Android included) in a layered approach:

1. At the lowest level, developers get the IDE projects that they’re used
to working with, so that their development workflows are largely
unaffected.
2. CMake scripts to generate the various *native-code* build systems - in
other words, I only use it for producing Visual Studio projects, Xcode
workspaces, and Makefiles that are needed to work with C/C++/Obj-C/Obj-C++
code. I still create Eclipse/IntelliJ projects by hand.
3. At the highest level, Gradle scripts to orchestrate the entire workflow

This yields a common set of high-level Gradle targets, e.g. ‘clean’,
‘build’, ‘package’, ‘test’, that any developer/continuous integration
system can execute to produce artifacts for the seven different platforms
we’re targeting.

Getting back to Android specifically - Android Studio seems to use Gradle
scripts directly, so I don’t think it's a bifurcated approach like we had
in Eclipse, where the Ant scripts were completely independent of the
Eclipse projects and had to be maintained separately. These Gradle scripts
are very flexible, so while Android Studio itself doesn’t directly support
C++ with the usual notions of debugging/IntelliSense/etc., you can still
specify your native dependencies in the Gradle scripts, and when you build
from Android Studio, it will pick them up and package them appropriately
before deployment. Here’s a related link:

http://www.shaneenishry.com/blog/2014/08/17/ndk-with-android-studio/


Once you get a good workflow with Android Studio in place, you should be
able to simply hit “Debug” from the IDE, which will build/deploy your
application and seamlessly attach its debugger to the Java side of your
code. When you hit a breakpoint on the Java side, your application will
pause and you will be able to manually attach a second debugger from
Visual Studio, to the native side of your code. This is what I did with
Eclipse, and what I still do when I debug JNI on Mac OSX, but replace
Visual Studio with Xcode. Now you can concurrently debug both sides of JNI.

Hope this helps.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











On 5/1/15, 10:37 AM, "Robert Dailey"  wrote:

>Honestly I hadn't set any expectations for the response I was going to
>get here. Your response is surprisingly hopeful IMHO.
>
>So basically the goal is to treat C++ completely separate from Java
>from a development, workflow, and build system perspective. In other
>words, if we need to debug native code, we use Visual Studio + GDB
>toolchain of sorts, all controlled and generated by CMake?
>
>And for the Java side, we switch over to Android Studio? Also
>launching on device or emulator, we initiate that from Android Studio
>as well I imagine (simply to deploy the APK to the device, not really
>for debugging). This won't be controlled by CMake at all.
>
>I guess this means the only missing piece is how the Gradle scripts
>find the *.so files from native code so it can be packaged up in the
>APK. I assume this means a post-build event on the CMake side for
>shared library targets that copies the files to
>"libs/armeabi/libfoo.so"? Or is that not the way to do it anymore with
>gradle? I have only used the ant + ndkbuild method, so I'm not sure
>how things would change. But it seems like the general direction is
>this:
>
>1. Check out source code
>2. Generate native project with CMake + android toolchain
>3. Build the native libraries with the project generated by CMake
>4. The build completes by installing all *.so files to corresponding
>paths in the source tree so Gradle/Android Studio can find them
>5. Open Android Studio & build everything
>6. Deploy to device
>
>Does this sound about right?
>
>On Thu, Apr 30, 2015 at 10:11 PM, Parag Chandra 
>wrote:
>> Hi Robert,
>>
>> This will be a bit long-winded, so bear with me. I¹m also
>>cross-compiling
>> for Android with CMake, and am currently using Eclipse ADT for much of
>>my
>> development. I have tried hard to make Eclipse work for both the Java
>>and
>> the C++ portions of my libraries and applications, but gave up after a
>>few
>> months when it became apparent that Eclipse¹s support for Android¹s C++
>> toolchain is horribly broken. Essentially, I got it to work for brief
>> periods of time, with concurrent Java/C++ debugging, but then Eclipse
>> would in

Re: [CMake] find_library while cross compiling?

2015-05-01 Thread Parag Chandra
Yes, you need to set them in the toolchain file - at least, that is how I
did it for NaCl.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











On 5/1/15, 10:29 AM, "Robert Dailey"  wrote:

>Should I override these variables in the android toolchain file?
>
>On Thu, Apr 30, 2015 at 9:43 PM, Parag Chandra 
>wrote:
>> Hi Robert,
>>
>> I encountered a similar problem when I was cross-compiling for NaCl on
>> Windows. You need to set various CMake variables that explicitly
>>override
>> things like the library suffix/prefix. For example, in my case I needed
>>to
>> set the following:
>>
>> set (CMAKE_STATIC_LIBRARY_PREFIX "lib")
>> set (CMAKE_STATIC_LIBRARY_SUFFIX ".a")
>> set (CMAKE_EXECUTABLE_SUFFIX ".pexe" CACHE STRING "" FORCE)
>> set (CMAKE_SHARED_LIBRARY_PREFIX "lib")
>> set (CMAKE_SHARED_LIBRARY_SUFFIX ".so")
>>
>> Hope this helps.
>>
>>
>>
>>
>> Parag Chandra
>> Senior Software Engineer, Mobile Team
>> Mobile: +1.919.824.1410
>>
>>  <https://ionic.com>
>>
>> Ionic Security Inc.
>> 1170 Peachtree St. NE STE 400, Atlanta, GA 30309
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On 4/30/15, 4:34 PM, "Robert Dailey"  wrote:
>>
>>>I'm on Windows and I am cross compiling for Android NDK. I use
>>>find_library() with PATHS to hunt down some libssl.a files, plus a few
>>>others.
>>>
>>>However, find_library() says it can't find them. I'm assuming this is
>>>because I'm on Windows and it doesn't recognize *.a files as a valid
>>>library on that platform. Is there a way to make CMake search
>>>libraries based on the platform the target is being compiled for?
>>>--
>>>
>>>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] CMake, Android, and Eclipse ADT Integration

2015-04-30 Thread Parag Chandra
Hi Robert,

This will be a bit long-winded, so bear with me. I¹m also cross-compiling
for Android with CMake, and am currently using Eclipse ADT for much of my
development. I have tried hard to make Eclipse work for both the Java and
the C++ portions of my libraries and applications, but gave up after a few
months when it became apparent that Eclipse¹s support for Android¹s C++
toolchain is horribly broken. Essentially, I got it to work for brief
periods of time, with concurrent Java/C++ debugging, but then Eclipse
would inexplicably forget all of the library/include paths, display
thousands of red squiggles all over my code, and then refuse to launch my
application. The only Œsolution¹ was to completely strip the project of
its C++ nature, add it back in, and then reconfigure all the
library/include paths, at which point everything would work again for a
few hours or a couple of days. Add to this the fact that Google has
officially deprecated Ant+Eclipse in favor of IntelliJ+Gradle, and it¹s
become clear that my time will be better spent migrating to Android Studio.

Of course, Android Studio has absolutely no support for C/C++ at the
moment, but at least it won¹t get in the way like Eclipse did. So I think
a near-term solution is to use Android Studio for all of the Java code, in
conjunction with one of several different Visual Studio-based offerings
for all the C++ code:

Visual Studio 2015
WinGDB
VisualGDB
Android++

Somewhere around the CMake 3.1 timeframe, they introduced a small feature
that enables the Visual Studio generator to support any arbitrary
cross-toolchain, instead of just a few hardcoded ones. I¹ve been using
this to generate VS solutions that target Native Client as well as Windows
Phone. Although I haven¹t yet had a chance to play around with any of the
offerings I mentioned previously, I believe you will be able to use this
same feature to target Android, after you have installed one of these
plug-ins in Visual Studio.

Probably not the answer you wanted to hear, but I thought I would share my
experience and hopefully save you some trouble.

Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











On 4/30/15, 4:46 PM, "Robert Dailey"  wrote:

>On Wed, Mar 11, 2015 at 11:42 AM, Robert Dailey
> wrote:
>> I am implementing support for Android in my CMake scripts by using
>> custom commands to invoke 'ant' to build the final APK. If I do it
>> this way, and I generate for eclipse, how can I make sure it will
>> integrate with the ADT plugin?
>>
>> Basically I want to be able to right-click my project in Eclipse
>> (generated by CMake) and "Run as Android Application" and have it
>> deploy to the device. What is required to make this happen?
>>
>> Also any idea how debugging will be impacted?
>>
>> Thanks.
>
>No help or advice on this?
>-- 
>
>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] find_library while cross compiling?

2015-04-30 Thread Parag Chandra
Hi Robert,

I encountered a similar problem when I was cross-compiling for NaCl on
Windows. You need to set various CMake variables that explicitly override
things like the library suffix/prefix. For example, in my case I needed to
set the following:

set (CMAKE_STATIC_LIBRARY_PREFIX "lib")
set (CMAKE_STATIC_LIBRARY_SUFFIX ".a")
set (CMAKE_EXECUTABLE_SUFFIX ".pexe" CACHE STRING "" FORCE)
set (CMAKE_SHARED_LIBRARY_PREFIX "lib")
set (CMAKE_SHARED_LIBRARY_SUFFIX ".so")

Hope this helps.




Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











On 4/30/15, 4:34 PM, "Robert Dailey"  wrote:

>I'm on Windows and I am cross compiling for Android NDK. I use
>find_library() with PATHS to hunt down some libssl.a files, plus a few
>others.
>
>However, find_library() says it can't find them. I'm assuming this is
>because I'm on Windows and it doesn't recognize *.a files as a valid
>library on that platform. Is there a way to make CMake search
>libraries based on the platform the target is being compiled for?
>-- 
>
>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] No CMAKE_CXX_COMPILER could be found

2015-04-17 Thread Parag Chandra
Hi Jon,

I can't really explain why, but I've seen the same problem on a colleague's Mac 
as well. On my machine, it works just fine, but to get it working across all of 
our Macs, I find I need to explicitly define the compilers by passing these 
arguments to CMake on the command line:

-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++

Hope this works for you too.

Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: Jon Hodgson 
mailto:jonhodgson.devli...@googlemail.com>>
Date: Friday, April 17, 2015 at 8:44 AM
To: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: [CMake] No CMAKE_CXX_COMPILER could be found

HI,

Running OSX Snow Leopard, XCode 5.1.1

Command line tools installed.

If I type
clang --version
at the command line I get version 5.1


CMake 3.2.2

The first lines of outpuit I get are

The CXX compiler identification is AppleClang 5.1.0.5030040
The C compiler identification is AppleClang 5.1.0.5030040

But then it bombs out at the line

PROJECT(${PROJECT_NAME} CXX C)

with the error

No CMAKE_CXX_COMPILER could be found

CMake 2.8.11 doesn't bomb out at that point (but does later due to the fact hat 
this CMakelist.txt file uses functionality that has changed).

Anybody got any idea what is going on?

cheers

Jon
-- 

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] iOS multi-arch library target and xcodebuild

2015-04-02 Thread Parag Chandra
Jason,

I¹ll have to get back to you on that. The problem is the snippets I¹m
referring to are part of a much larger build system I¹ve created for Mac,
Windows, Linux, iOS, Android, Windows Phone, and Native Client, and so you
would likely need a lot of other supporting files to make sense of them.
I¹ll have to check with management to see if I could share those. In the
meantime, here is what I hope is a small block of CMake code that will get
you started creating the ³universal-³ targets I mentioned previously:


add_custom_target("universal-${artifactName}"
  COMMAND ${CMAKE_COMMAND} -E make_directory
"${CMAKE_CURRENT_BINARY_DIR}/$(CONFIGURATION)-universal"
  COMMAND lipo -create -output
"${CMAKE_CURRENT_BINARY_DIR}/$(CONFIGURATION)-universal/${destFile}"
"${CMAKE_CURRENT_BINARY_DIR}/$(CONFIGURATION)-iphoneos/${destFile}"

"${CMAKE_CURRENT_BINARY_DIR}/$(CONFIGURATION)-iphonesimulator/${destFile}"
)

The next line shows you how to set the Xcode variables:

set_target_properties (${artifactName} PROPERTIES
XCODE_ATTRIBUTE_MY_BUILD_ONLY_ACTIVE_ARCH ³YES²)

set_target_properties (${artifactName} PROPERTIES
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "\${MY_BUILD_ONLY_ACTIVE_ARCH}²)


If you look at the generated Xcode project after executing those two
lines, you will notice that the ³Build Active Architecture Only² setting
in the Build Settings view will be set to the value ³Yes -
${MY_BUILD_ONLY_ACTIVE_ARCH}², which tells you that the setting is taking
its value from another variable. Now that it is a variable, you can
override this behavior simply by passing ³MY_BUILD_ONLY_ACTIVE_ARCH=NO² to
xcodebuild when you run it on the command line.

Hope this helps.

Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











On 4/2/15, 12:02 PM, "Jason Cooper"  wrote:

>Parag,
>
>On Thu, Apr 02, 2015 at 02:32:13PM +, Parag Chandra wrote:
>> No idea if they have plans to merge any toolchain files directly into
>> CMake. Even if they did, cross-compiling is still a process that
>>requires
>> explicitly overriding your host computer?s native toolchain, so it?s not
>> something that CMake will sort of do for you automatically - you?re
>>still
>> going to have to feed it the toolchain.cmake.
>
>Ok, misunderstanding on my part.  Thanks for clearing that up.
>
>> With respect to universal binaries, I have setup my CMake-generated
>>Xcode
>> projects to build them conditionally. The route I have taken is:
>> 
>> 1) Set ?Build Active Architecture Only? to an Xcode variable that I
>> default to ?Yes? from CMake. This way, when developers are actively
>> working inside Xcode, they don?t waste time unnecessarily building for
>>CPU
>> architectures they?re not going to use.
>> 
>> 2) When building from the command line, this Xcode variable is set to
>> ?No?, so that we get a pair of quasi-universal binaries - one containing
>> x86 + x86_64 for the simulator, and another that contains armv7 +
>>armv7s +
>> arm64 for devices. This seems to be a limitation of Xcode, or at least I
>> couldn?t figure out how to force it to generate a single binary with
>>all 5
>> CPU archs.
>> 
>> 3) To work around this, my CMakeLists add custom ?universal-? targets
>> that, when run, lipo together the pair of sort-of-universal binaries
>>into
>> a truly universal binary. Once again, these ?universal-? targets only
>>get
>> executed when building from the command line.
>
>Would you mind sharing the relevant file(s)?
>
>> I think you?re going to face a much more difficult challenge if you
>>decide
>> to discard Xcode and go with Unix Makefiles for iOS. The toolchain file
>>I
>> pointed you to did not work well with the Makefile generator, at least
>>in
>> my limited experience. Plus, you would be discarding one of the biggest
>> advantages of CMake in my view: the ability to work inside of popular
>>IDEs
>> with intellisense, debuggers, profilers, etc.
>
>Well, from my end, I'm build an automated system, so I won't be using the
>IDE.
>I'll be providing binaries (static/shared libs) for the devs to use.
>
>Whichever method gets me there reliably that I don't have to fiddle with
>too
>often will work.
>
>I'm only working with cmake because the upstream project uses cmake and I
>hope
>to have my changes incorporated into mainline.  Other upstream projects
>use
>Makefiles, so I'll not push cmake on them.
>
>thx,
>
>Jason.

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the 

Re: [CMake] iOS multi-arch library target and xcodebuild

2015-04-02 Thread Parag Chandra
No idea if they have plans to merge any toolchain files directly into
CMake. Even if they did, cross-compiling is still a process that requires
explicitly overriding your host computer¹s native toolchain, so it¹s not
something that CMake will sort of do for you automatically - you¹re still
going to have to feed it the toolchain.cmake.

With respect to universal binaries, I have setup my CMake-generated Xcode
projects to build them conditionally. The route I have taken is:

1) Set ³Build Active Architecture Only² to an Xcode variable that I
default to ³Yes² from CMake. This way, when developers are actively
working inside Xcode, they don¹t waste time unnecessarily building for CPU
architectures they¹re not going to use.

2) When building from the command line, this Xcode variable is set to
³No², so that we get a pair of quasi-universal binaries - one containing
x86 + x86_64 for the simulator, and another that contains armv7 + armv7s +
arm64 for devices. This seems to be a limitation of Xcode, or at least I
couldn¹t figure out how to force it to generate a single binary with all 5
CPU archs.

3) To work around this, my CMakeLists add custom ³universal-³ targets
that, when run, lipo together the pair of sort-of-universal binaries into
a truly universal binary. Once again, these ³universal-³ targets only get
executed when building from the command line.

I think you¹re going to face a much more difficult challenge if you decide
to discard Xcode and go with Unix Makefiles for iOS. The toolchain file I
pointed you to did not work well with the Makefile generator, at least in
my limited experience. Plus, you would be discarding one of the biggest
advantages of CMake in my view: the ability to work inside of popular IDEs
with intellisense, debuggers, profilers, etc.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











On 4/2/15, 8:15 AM, "Jason Cooper"  wrote:

>Parag,
>
>On Wed, Apr 01, 2015 at 05:43:25PM +, Parag Chandra wrote:
>> You need to cross-compile in order to target iOS, but if I?m reading
>>your
>> command line correctly, you are merely instructing CMake to generate an
>> Xcode build system for the host OS, which is naturally going to produce
>>a
>> project that targets Mac OSX.
>
>I never said I was on the *right* path. ;-)
>
>> The normal way to cross-compile with CMake is to feed it a toolchain
>>file,
>> via the CMAKE_TOOLCHAIN_FILE cmd line option. You may want to take a
>>look at
>> the following project to get an iOS toolchain file from which to start:
>> 
>> https://code.google.com/p/ios-cmake/source/browse/toolchain/iOS.cmake
>
>Ok, I had run into that before, but reasoned that the presence of
>Tests/iOSNavApp/ meant there was now a way to accomplish my goal without
>having to add what essentially looks like a cmake module.
>
>Is there a plan to merge the above into cmake as a module?
>
>> You can of course do something similar for Android:
>> 
>> 
>>https://github.com/taka-no-me/android-cmake/blob/master/android.toolchain
>>.cmake
>
>Ah, thanks for the heads up.  I'll need that later.
>
>Back to the iOS.cmake.  I was able to get it to successfully build the
>library dylib by adding the following lines to the same file:
>
># don't need code-signing on libs
>set(CMAKE_MACOSX_BUNDLE YES)
>set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
>
>It's only armv7, so not universal.  But I can use lipo to work around
>that.
>
>This all seems rather complicated and fragile, though.  I wonder if it
>might be simpler to have cmake generate standard Unix Makefiles and then
>use a modified version of the openssl build script.
>
>thx,
>
>Jason.

-- 

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] iOS multi-arch library target and xcodebuild

2015-04-01 Thread Parag Chandra
Hi Jason,

You need to cross-compile in order to target iOS, but if I¹m reading your
command line correctly, you are merely instructing CMake to generate an
Xcode build system for the host OS, which is naturally going to produce a
project that targets Mac OSX. The normal way to cross-compile with CMake
is to feed it a toolchain file, via the CMAKE_TOOLCHAIN_FILE cmd line
option. You may want to take a look at the following project to get an iOS
toolchain file from which to start:

https://code.google.com/p/ios-cmake/source/browse/toolchain/iOS.cmake


You can of course do something similar for Android:

https://github.com/taka-no-me/android-cmake/blob/master/android.toolchain.c
make


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











On 4/1/15, 12:58 PM, "Jason Cooper"  wrote:

>All,
>
>I'm in a situation I largely dislike.  :-)  Executing a project with two
>large
>unknowns.  The unknowns are cmake and xcode.
>
>I'm attempting to automate building the dylib's (and .so once I start on
>Android) for yajl:
>
>  https://github.com/lloyd/yajl.git
>
>My goal is to run a cron job that pulls the latest git repo, builds the
>project, runs tests, and makes the binary library available for the devs
>of the larger projects.  My inspiration is this openssl build script:
>
>  https://gist.github.com/foozmeat/5154962
>
>I've looked at the rather old example, Tests/iOSNavApp/ in the cmake
>repo. I've also read everything I could find with $SEARCH_ENGINE.  Using
>the attached patch, I can do the following in yajl:
>
>$ mkdir build.ios
>$ cd build.ios
>$ cmake -GXcode ..
>$ xcodebuild -target yajl-ios -configuration Debug
>
>The build is successful, but:
>
>$ file yajl-2.1.1/lib/Debug/libyajl.2.1.1.dylib
>yajl-2.1.1/lib/Debug/libyajl.2.1.1.dylib: Mach-O 64-bit dynamically
>linked shared library x86_64
>
>My goal is to have the multi-arch lib for armv7, arm64, and x86_64 (iOS
>and simulator).  Could anyone offer some insight into what I'm doing
>wrong?
>
>thx,
>
>Jason.
>
>FYI: this is based on a commit I haven't pushed upstream yet.  It
>changes the .gitignore to match /build* instead of /build/.
>
>-->8--
>diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
>index 99cf9e955258..340ffa800a98 100644
>--- a/src/CMakeLists.txt
>+++ b/src/CMakeLists.txt
>@@ -39,6 +39,31 @@ ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS})
> 
> ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS})
> 
>+ADD_CUSTOM_TARGET(yajl_s-ios DEPENDS yajl_s)
>+
>+ADD_CUSTOM_TARGET(yajl-ios DEPENDS yajl)
>+
>+set_target_properties(
>+  yajl-ios
>+  PROPERTIES
>+  XCODE_ATTRIBUTE_PRODUCT_NAME
>+  "libYaJL"
>+  XCODE_ATTRIBUTE_WRAPPER_EXTENSION
>+  "xctest"
>+  XCODE_ATTRIBUTE_BUNDLE_IDENTIFIER
>+  "com.github.lloyd.yajl"
>+)
>+set_target_properties(
>+  yajl-ios
>+  PROPERTIES
>+  XCODE_ATTRIBUTE_PRODUCT_NAME[variant=Debug]
>+  "libYaJL-Dbg"
>+  XCODE_ATTRIBUTE_WRAPPER_EXTENSION[variant=Debug]
>+  "xctest"
>+  XCODE_ATTRIBUTE_BUNDLE_IDENTIFIER[variant=Debug]
>+  "com.github.lloyd.yajl.debug"
>+)
>+
>  setup shared library version number
> SET_TARGET_PROPERTIES(yajl PROPERTIES
>   DEFINE_SYMBOL YAJL_SHARED
>@@ -50,6 +75,9 @@ IF(APPLE)
>   MESSAGE("INSTALL_NAME_DIR: ${CMAKE_INSTALL_PREFIX}/lib")
>   SET_TARGET_PROPERTIES(yajl PROPERTIES
> INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
>+  set(CMAKE_OSX_SYSROOT iphoneos8.1)
>+  set(CMAKE_OSX_ARCHITECTURES "armv7;arm64;x86_64")
>+  set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")
> ENDIF(APPLE)
> 
>  build up an sdk as a post build step
>-- 
>
>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 

Re: [CMake] compile flags per configuration in 3.2?

2015-03-23 Thread Parag Chandra
In that case, you may want to play around with COMPILE_OPTIONS, which is 
target-specific, and generator expressions:

http://www.cmake.org/cmake/help/v3.1/prop_tgt/COMPILE_OPTIONS.html
http://www.cmake.org/cmake/help/v3.1/manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)

One of the generator expressions available to you is the current configuration, 
so you may be able to conditionally add specific flags for each configuration.


Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: "Dr. Sören Textor" 
mailto:soeren.tex...@ditec-gmbh.de>>
Organization: DiTEC GmbH
Date: Monday, March 23, 2015 at 9:11 AM
To: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: Re: [CMake] compile flags per configuration in 3.2?

No, you are dealing with the global flag.

But that's not the way I want to go, because I have several targets and need 
serveral compile flags for each target

Am 23.03.2015 um 14:03 schrieb Parag Chandra:
Have you looked at CMAKE__FLAGS_, e.g.

http://www.cmake.org/cmake/help/v3.1/variable/CMAKE_LANG_FLAGS_DEBUG.html

I've been using these for exactly the purpose you describe.




Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: "Dr. Sören Textor" 
mailto:soeren.tex...@ditec-gmbh.de>>
Organization: DiTEC GmbH
Date: Monday, March 23, 2015 at 8:39 AM
To: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: [CMake] compile flags per configuration in 3.2?

Hello
Since cmake 2.0 I would like to have the possibilty to add compile flags for 
certain configurations.

For linker flags it runs very well with set_targer_properties and 
LINK_FLAGS_. But that doesn't wokr for the compile flags.

Exits a possibility in 3.2 meanwhile?

Best regards,
SirAnn



--
Dr.-Ing. Sören Textor
Softwareentwicklung

phone | +49 6221 31698 225

fax | +49 6221 31698 399

email | s.tex...@ditec-gmbh.de<mailto:s.tex...@ditec-gmbh.de>

web | http://www.ditec-gmbh.de




DiTEC Dr. Siegfried Kahlich & Dierk Langer GmbH

Im Breitspiel 19 | 69126 Heidelberg | Germany

Handelsregister | Mannheim | HRB 341229

Dieses Dokument ist vertraulich zu behandeln. Die Weitergabe, sowie 
Vervielfältigung, Verwertung und Mitteilung seines Inhalts ist nur mit unserer 
ausdrücklichen Genehmigung gestattet. Alle Rechte vorbehalten, insbesondere für 
den Fall der Schutzrechtsanmeldung.

This document has to be treated confidentially. Its contents are not to be 
passed on, duplicated, exploited or disclosed without our express permission. 
All rights reserved, especially the right to apply for protective rights.
-- 

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] compile flags per configuration in 3.2?

2015-03-23 Thread Parag Chandra
Have you looked at CMAKE__FLAGS_, e.g.

http://www.cmake.org/cmake/help/v3.1/variable/CMAKE_LANG_FLAGS_DEBUG.html

I've been using these for exactly the purpose you describe.




Parag Chandra
Senior Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: "Dr. Sören Textor" 
mailto:soeren.tex...@ditec-gmbh.de>>
Organization: DiTEC GmbH
Date: Monday, March 23, 2015 at 8:39 AM
To: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: [CMake] compile flags per configuration in 3.2?

Hello
Since cmake 2.0 I would like to have the possibilty to add compile flags for 
certain configurations.

For linker flags it runs very well with set_targer_properties and 
LINK_FLAGS_. But that doesn't wokr for the compile flags.

Exits a possibility in 3.2 meanwhile?

Best regards,
SirAnn


-- 

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] Cmake error when adding Boost library

2015-02-20 Thread Parag Chandra
Hi Daniel,

I had some trouble with this myself a while back. You may want to refer to the 
Boost module documentation for some help:

http://www.cmake.org/cmake/help/v3.1/module/FindBoost.html

There are some additional flags you can set which will help CMake locate Boost 
for you; I'm sorry I don't remember exactly which ones I set to locate it on 
Windows. In the end though, I needed to locate boost for many operating 
systems, so I compiled boost with system layout into individual 
configuration/architecture/operating system subdirectories, and then using the 
generic 'find_library' command.


Parag Chandra
Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: Daniel Sáez mailto:danst...@gmail.com>>
Date: Friday, February 20, 2015 at 11:31 AM
To: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: [CMake] Cmake error when adding Boost library


Hello,

I am trying to add Boost library to my project using the CMakeLists.txt in the 
follwing way:

set(BOOST_INCLUDEDIR "C:/boost_1_57_0")set(BOOST_LIBRARYDIR 
"C:/boost_1_57_0/stage/lib")

find_package(Boost 1.57.0 COMPONENTS filesystem)
include_directories(${Boost_INCLUDE_DIRS})
add_executable(test test.cpp)
target_link_libraries(test ${Boost_LIBRARIES})

However, I get the followng error: LINK : fatal error LNK1104: cannot open file 
'libboost_filesystem-vc120-mt-1_57.lib'

libboost_filesystem-vc120-mt-1_57.lib is located in the stage/lib folder, so I 
don't know what is going on. I am compiling with Visual Studio 2013.

Any thoughts?

Thank you,

Daniel
-- 

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] Error in Cmake Installation

2015-02-10 Thread Parag Chandra
Try running:

sudo make install

Instead.


On Feb 10, 2015, at 7:45 AM, Gunjan Gautam 
mailto:gunjan.gemin...@gmail.com>> wrote:

Hi All,

While installing cmake using below option, I am facing the error in step 3.

Step1:  ./bootstarp
Step2: make
step: make install

Error after step 3:
CMake Error at cmake_install.cmake:36 (file): file INSTALL cannot set 
permissions on
  "/usr/local/doc/cmake-3.1/Copyright.txt"

How to overcome this issue ?



--
Best Regards,
Gunjan
--

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] Any way to set the "productType" in a CMake-generated Xcode project?

2015-02-04 Thread Parag Chandra
One of the guys I work with figured out the following:

set_property(TARGET ${TargetName} PROPERTY XCODE_ATTRIBUTE_WRAPPER_EXTENSION 
"xctest")

Which will indeed cause the generated project to have the correct productType. 
Things seem to be working now, but the info.plist file that is generated needs 
to be modified to more closely align with what Xcode spits out for a unit test 
project. We've been playing with the MACOSX_BUNDLE_INFO_PLIST property to 
specify a template:

set (MACOSX_BUNDLE_INFO_PLIST "/Users/blah/Desktop/MacOSXBundleInfo.plist.in")

However, renaming that plist.in file so that it no longer exists results in no 
errors from CMake, so it seems that our template is being completely ignored. 
Is this a bug?


Parag Chandra
Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: Parag Chandra mailto:pa...@ionicsecurity.com>>
Date: Wednesday, February 4, 2015 at 1:55 PM
To: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: [CMake] Any way to set the "productType" in a CMake-generated Xcode 
project?

Hi,

I'm trying to generate a unit-test project for iOS via CMake using the 
following commands:

add_library (${TargetName} MODULE ${SourceFiles} ${HeaderFiles})
set_property(TARGET ${TargetName} PROPERTY BUNDLE True)

I've been able to adjust all the required settings save the most important one, 
which is the "productType" entry inside the PBXNativeTarget section of the 
generated Xcode project. This needs to be 
"com.apple.product-type.bundle.unit-test", but CMake sets it to 
"com.apple.product-type.bundle".

Is there any way to alter this value?

Thanks,


Parag Chandra
Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309










-- 

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] Any way to set the "productType" in a CMake-generated Xcode project?

2015-02-04 Thread Parag Chandra
Hi,

I'm trying to generate a unit-test project for iOS via CMake using the 
following commands:

add_library (${TargetName} MODULE ${SourceFiles} ${HeaderFiles})
set_property(TARGET ${TargetName} PROPERTY BUNDLE True)

I've been able to adjust all the required settings save the most important one, 
which is the "productType" entry inside the PBXNativeTarget section of the 
generated Xcode project. This needs to be 
"com.apple.product-type.bundle.unit-test", but CMake sets it to 
"com.apple.product-type.bundle".

Is there any way to alter this value?

Thanks,


Parag Chandra
Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309










-- 

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] Xcode does not link against frameworks

2015-01-26 Thread Parag Chandra
Hi Daniel,

I've just been using:

target_link_libraries (TargetName "-framework IOKit")

Which has been working perfectly for me. Then again, I am only trying to add 
frameworks that are part of the OS. I haven't yet tried building my own 
frameworks and linking those in.

Parag Chandra
Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 400, Atlanta, GA 30309











From: Daniel Kollmann mailto:danko...@mail.de>>
Date: Sunday, January 25, 2015 at 7:43 AM
To: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: Re: [CMake] Xcode does not link against frameworks

I took a closer look at the problem and while as I said the libraries are 
correctly found, when I look at the project file, I see this:

OTHER_LDFLAGS = " -Wl,-search_paths_first -Wl,-headerpad_max_install_names  
-framework Accelerate -framework Accelerate -framework Accelerate -framework 
Accelerate -framework Accelerate -framework Accelerate -framework Accelerate 
-framework Accelerate -framework Accelerate -framework Accelerate -framework 
Accelerate -framework Accelerate -framework Accelerate -framework Accelerate

My calls to the function look like this:

add_framework(${target} Accelerate)
add_framework(${target} AudioToolbox)
add_framework(${target} Carbon)
add_framework(${target} Cocoa)
add_framework(${target} CoreAudio)
add_framework(${target} CoreFoundation)
add_framework(${target} CoreMIDI)
add_framework(${target} DiscRecording)
add_framework(${target} IOKit)
add_framework(${target} OpenGL)
add_framework(${target} QTKit)
add_framework(${target} QuartzCore)
add_framework(${target} QuickTime)
add_framework(${target} WebKit)

Shouldn't ${found} be locally inside the function and is it not safe to call 
target_link_libraries several times?

Thanks for any advice
Dan


Von: Daniel Kollmann mailto:danko...@mail.de>>
Datum: Samstag, 24. Januar 2015 12:25
An: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Betreff: Xcode does not link against frameworks

Hello,

I add my required frameworks through this function of mine:

function(add_framework target framework)
if(APPLE)
find_library(found ${framework})

if(${found} STREQUAL "${framework}-NOTFOUND")
message(FATAL_ERROR "ERROR: ${framework} not found 
(${CMAKE_OSX_SYSROOT})")
endif()

#message("Found framework ${found}")

target_link_libraries(${target} ${found})
endif()
endfunction()

The framework is correctly found and added but still Xcode does neither list 
the frameworks as a build phase nor link against them. All symbols appear as 
missing.

Maybe there is another step required to include the framework for Xcode.

I am using Cmake 3.1.1

Thanks for the help
Dan
-- 

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] Help with Policy CMP0026 (disallow LOCATION target property)

2014-12-23 Thread Parag Chandra
Have you tried the CMake variables LIBRARY_OUTPUT_PATH and
EXECUTABLE_OUTPUT_PATH? I¹ve been using them to accomplish much the same
thing.


Parag Chandra
Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 2285, Atlanta, GA 30309











On 12/23/14, 4:06 PM, "Paul Smith"  wrote:

>Hi all.  I need a pointer or two.
>
>In my environment I need to have my executables and binaries copied to
>another location; this has to happen as part of the default "all"
>target: it can't be required to run "install" for example (we use the
>"install" rule for a "real" install step, for one thing).
>
>What I was doing with 2.8.12 was creating a custom target "stage_"
>with a prerequisite of target , which had a custom command that
>copied .  To do this I need to run get_property(pth TARGET 
>PROPERTY LOCATION) so I know where the target file is living, and then I
>use "cmake -E copy ${pth} ${DESTDIR}" to copy it to the right place.
>
>In 3.x this use is deprecated and I wonder what to do instead.
>
>If I add a POST_BUILD custom command directly to target  which
>copies the file then I can use $> in my COMMAND script
>and that works...
>
>Except, if someone deletes the copy of the file without touching
>anything else, it doesn't get recopied (because cmake doesn't know about
>the copy and so doesn't realize something is wrong).
>
>I need this to be recopied because we have a habit of just deleting the
>entire destination directory and re-running the build to make a fresh
>copy without changing anything else.
>
>I've thought about many ways to do this, but I can't seem to get around
>the fact that generator expressions like $ are only
>available within the commands of the target.
>
>Help?
>Thx!
>
>-- 
>
>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


[CMake] CMake 3.1 unable to detect AppleClang when cross-compiling for iOS

2014-12-16 Thread Parag Chandra
This problem seems related to some others:

http://www.cmake.org/Bug/view.php?id=15237
http://www.cmake.org/Bug/view.php?id=15214

Basically, my colleague gets the following errors when he tries to run CMake on 
a project that I created:


-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in :
  No CMAKE_C_COMPILER could be found.



CMake Error in :
  No CMAKE_CXX_COMPILER could be found.


However, I don't encounter this error on my machine - CMake correctly detects 
AppleClang for both C and C++. We are both using the same Xcode (6.1.1), both 
on OSX 10.9. As a workaround, he is passing -DCMAKE_C_COMPILER=clang and 
-DCMAKE_CXX_COMPILER=clang++ on the command line, which still results in the 
"compiler identification is unknown" messages, but enables CMake to still 
successfully generate the Xcode project. We've tried both 3.1rc2 and 3.1rc3. 
Does anyone have any ideas?

Thanks,


Parag Chandra
Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 2285, Atlanta, GA 30309










-- 

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

2014-12-15 Thread Parag Chandra
This page from the documentation might help:

http://www.cmake.org/cmake/help/v3.1/manual/cmake-variables.7.html


One in particular that may be useful for you to test is
CMAKE__COMPILER_ID:

http://www.cmake.org/cmake/help/v3.1/variable/CMAKE_LANG_COMPILER_ID.html


Note that it does state it¹s not guaranteed to be defined, so you¹ll have
to experiment.

Regards,


Parag Chandra
Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 2285, Atlanta, GA 30309











On 12/15/14, 11:16 AM, "Petr Bena"  wrote:

>Hi,
>
>Is it possible to set a compiler flags only if compiler is MinGW (that
>means these flags wouldn't be set on MSVC).
>
>if (WIN32) matches both compilers obviously. Thanks
>-- 
>
>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] Target 'copy-construction'/'fork'

2014-12-11 Thread Parag Chandra
I¹m not aware of any means to clone a target, but for what you are
describing, custom configurations will work better. For the specific use
case you mention below, start by seeding the new configurations like this:

set (CMAKE_CONFIGURATION_TYPES
Debug;Release;RelWithDebInfo;MinSizeRel;Debug_Clone;Release_Clone;RelWithDe
bInfo_Clone;MinSizeRel_Clone CACHE INTERNAL "Configuration types" FORCE)
foreach (cfg "DEBUG" "RELEASE" "MINSIZEREL" "RELWITHDEBINFO")
  foreach (flag "CXX" "C" "EXE_LINKER" "MODULE_LINKER" "SHARED_LINKER"
"STATIC_LINKER")
set (CMAKE_${flag}_FLAGS_${cfg}_Clone ${CMAKE_${flag}_FLAGS_${cfg}}
CACHE STRING "${flag} flags for ${cfg}_Clone" FORCE)
  endforeach ()
endforeach ()

So you essentially start with a clone of the default configurations that
CMake gives you. Then you can adjust the new configurations as you see
fit. The following block will adjust all the _Clone configurations to link
with /MT rather than the default /MD:


foreach (cfg "DEBUG" "RELEASE" "MINSIZEREL" "RELWITHDEBINFO")
  foreach (flag_var CMAKE_C_FLAGS_${cfg}_Clone
CMAKE_CXX_FLAGS_${cfg}_Clone)
if (${flag_var} MATCHES "/MD")
  string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endif ()
  endforeach ()
endforeach ()


Hope this helps.


Parag Chandra
Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 2285, Atlanta, GA 30309











On 12/10/14, 8:58 AM, "Domagoj Saric" 
wrote:

>Hi,
>
>Given a target named Foo, is there a simple/builtin way to create a copy
>of that 
>target named Bar so that it retains all the properties of Foo but can be
>independently changed from that point onward i.e. is there a way for
>CMake 
>targets to follow the semantics of standard C++ objects with
>copy-constructors..?
>This would be useful for creating targets which are essentially the same
>but 
>differ only in a few properties (e.g. creating /MD and /MT versions of a
>MSVC 
>DLL)...
>
>
>-- 
>Domagoj Saric
>Software Architect
>www.LittleEndian.com
>-- 
>
>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] Including another CMakeLists project

2014-12-10 Thread Parag Chandra
I think you may want to try the add_subdirectory() command instead of
include(), if you truly have multiple projects that are being built by
CMake. The name suggests that it would only work with a hierarchical
directory structure, but that is not the case - you can specify absolute
paths if necessary.

On the other hand, if you need to use include() to add shared logic across
build scripts (but not actual entire projects), then it¹s helpful to think
of include() as analogous to the #include directive. I¹ve found that I
needed to condition guard the included file, something like this:

if (NOT (DEFINED Foo_cmake))
set (Foo_cmake TRUE)
# Add shared logic below, then end with:
endif ()

Hope this helps.


Parag Chandra
Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 2285, Atlanta, GA 30309











On 12/10/14, 9:42 AM, "Petr Bena"  wrote:

>I have 3 projects, all using cmake. When I run cmake on each of them
>and separately build them, it's all fine.
>
>When I use include() on these 2 cmake files in 1 of them, so that I
>could run only 1 cmake and then build them all using 1 make, it fails.
>
>I believe that these 3 cmakes are colliding with each other, is there
>a way to run it isolated?
>-- 
>
>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] CMake Vs 2012 Express 64bit

2014-12-10 Thread Parag Chandra
Not sure, but I believe that is a limitation of the Express edition
itself; not a problem with CMake per se. You may want to try the
just-released VS 2013 Community Edition instead. If you insist on using
2012 Express, perhaps this link may be of help:

http://www.kobashicomputing.com/64-bit-c-development-under-visual-studio-20
12-express



Parag Chandra
Software Engineer, Mobile Team
Mobile: +1.919.824.1410

 <https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 2285, Atlanta, GA 30309











On 12/10/14, 9:03 AM, "Micha Renner"  wrote:

>Hi all,
>
>is there a way that CMake create solution files for 64-bit targets?
>(Visual Studio 2012  Express)
>
>Greetings
>Michael
>
>
>-- 
>
>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


[CMake] Looking for a way to post-process Visual Studio projects generated by CMake

2014-11-21 Thread Parag Chandra
I've been using the RC builds of CMake 3.1 to generate Visual Studio projects 
for Native Client. I have things working pretty well with a few workarounds, 
but I'm still having one problem that I can't figure out a solution to. I am 
targeting the PNaCl environment of Native Client, and by default, Google's 
project system for Visual Studio will perform a very expensive translation step 
to convert the final .pexe executable file into architecture-specific .nexe 
files, one each for x86, x86_64, and ARM. There are project settings to disable 
this translation step, but these options do not seem to translate into any 
compiler/linker flags that I can see. Instead, XML nodes are added to the 
resultant .vcxproj file when you disable the translation.

My question is if there is a way to post-process the .vcxproj file that CMake 
generates in order to add these additional XML nodes? The naïve thing I tried 
first is to just run a script to make the modifications, but of course the next 
time CMake runs it will regenerate the project file and wipe out these changes.

Regards,

Parag Chandra
-- 

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] CMake 3.x not respecting IMPORTED_LOCATION_ properties

2014-11-18 Thread Parag Chandra
I figured it out, and it's a case-sensitivity issue. I have named my 
configuration "Custom", so I was expecting the corresponding property to be 
IMPORTED_LOCATION_Custom, but in fact CMake is expecting 
IMPORTED_LOCATION_CUSTOM. So it's an easy fix on my part.


Parag Chandra
Software Engineer, Mobile Team
Mobile: +1.919.824.1410

[https://www.ionicsecurity.com/IonicSigHz.png]<https://ionic.com>

Ionic Security Inc.
1170 Peachtree St. NE STE 2285, Atlanta, GA 30309











From: Parag Chandra mailto:pa...@ionicsecurity.com>>
Date: Monday, November 17, 2014 at 2:43 PM
To: "cmake@cmake.org<mailto:cmake@cmake.org>" 
mailto:cmake@cmake.org>>
Subject: CMake 3.x not respecting IMPORTED_LOCATION_ properties

Hello,

Until recently, I was making use of the 'debug' and 'optimized' keywords to 
select the config-specific versions of external dependencies to link in, i.e. 
if I wanted to link Bar into Foo, I would use:

target_link_libraries (Foo DEBUG ${Bar_Debug} OPTIMIZED ${Bar_Release})

Now I have added my own custom configuration to CMAKE_CONFIGURATION_TYPES, 
let's call it "Custom", and I want Foo, when built in Custom config, to link 
against the Custom variant of Bar. I did some reading and came across IMPORTED 
targets, which seem designed for this purpose, so I added new lines like the 
following:

add_library (Bar STATIC IMPORTED GLOBAL)
set_property (TARGET Bar PROPERTY IMPORTED_LOCATION_DEBUG 
"/path/to/Debug/Bar.lib")
set_property (TARGET Bar PROPERTY IMPORTED_LOCATION_RELEASE 
"/path/to/Release/Bar.lib")
set_property (TARGET Bar PROPERTY IMPORTED_LOCATION_CUSTOM 
"/path/to/Custom/Bar.lib")
target_link_libraries (Foo Bar)

However, when I open the generated Visual Studio project, I see "Bar-NOTFOUND" 
in the linker inputs. If I add the line:

set_property (TARGET Bar PROPERTY IMPORTED_LOCATION "/path/to/Release/Bar.lib")

Then the linker inputs are resolved correctly, but of course all of my 
configurations of Foo are now going to link against the same Release 
configuration of Bar.

Is this a bug, or am I simply not using this feature correctly? I tried both 
3.0.1 and 3.1rc2 on Windows.

Thanks,

Parag Chandra

-- 

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] CMake 3.x not respecting IMPORTED_LOCATION_ properties

2014-11-17 Thread Parag Chandra
Hello,

Until recently, I was making use of the 'debug' and 'optimized' keywords to 
select the config-specific versions of external dependencies to link in, i.e. 
if I wanted to link Bar into Foo, I would use:

target_link_libraries (Foo DEBUG ${Bar_Debug} OPTIMIZED ${Bar_Release})

Now I have added my own custom configuration to CMAKE_CONFIGURATION_TYPES, 
let's call it "Custom", and I want Foo, when built in Custom config, to link 
against the Custom variant of Bar. I did some reading and came across IMPORTED 
targets, which seem designed for this purpose, so I added new lines like the 
following:

add_library (Bar STATIC IMPORTED GLOBAL)
set_property (TARGET Bar PROPERTY IMPORTED_LOCATION_DEBUG 
"/path/to/Debug/Bar.lib")
set_property (TARGET Bar PROPERTY IMPORTED_LOCATION_RELEASE 
"/path/to/Release/Bar.lib")
set_property (TARGET Bar PROPERTY IMPORTED_LOCATION_CUSTOM 
"/path/to/Custom/Bar.lib")
target_link_libraries (Foo Bar)

However, when I open the generated Visual Studio project, I see "Bar-NOTFOUND" 
in the linker inputs. If I add the line:

set_property (TARGET Bar PROPERTY IMPORTED_LOCATION "/path/to/Release/Bar.lib")

Then the linker inputs are resolved correctly, but of course all of my 
configurations of Foo are now going to link against the same Release 
configuration of Bar.

Is this a bug, or am I simply not using this feature correctly? I tried both 
3.0.1 and 3.1rc2 on Windows.

Thanks,

Parag Chandra

-- 

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