[CMake] How to declare a text file as CMakeLists.txt dependency

2012-04-03 Thread Gregor Jasny

Hello,

In my root project CMakeLists.txt file I'm using the file(STRINGS ...) 
command to read some version numbers from a text file. Now I'd like to 
declare this text file as a CMakeLists.txt dependency to re-trigger the 
CMake configuration step if a version number changes (Just like 
re-configuration is triggered if I touch any CMakeLists.txt file).


Is there an easy way to accomplish this?

Thanks,
Gregor
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] assembler support

2007-09-30 Thread Gregor Jasny
Hi,

2007/7/2, Alexander Neundorf <[EMAIL PROTECTED]>:
> since last week cmake cvs has basic support for assembler.
> Assembler is different from other languages in that it actually is no single
> language, but there are many different assembler languages.

thanks for your work in this area! I've started adding nasm support to
my project:

::
CMakeLists.txt
::
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
ENABLE_LANGUAGE(ASM-Nasm)
SET(CMAKE_ASM-Nasm_COMPILER_ARG1 -felf)
ADD_EXECUTABLE(test main.cpp bswap.asm)

::
CMake/CMakeASM-NasmInformation.cmake
::
SET(ASM_DIALECT "-Nasm")
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
INCLUDE(CMakeASMInformation)
SET(ASM_DIALECT)

::
CMake/CMakeDetermineASM-NasmCompiler.cmake
::
SET(ASM_DIALECT "-Nasm")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT nasm)
INCLUDE(CMakeDetermineASMCompiler)
SET(ASM_DIALECT)

::
CMake/CMakeTestASM-NasmCompiler.cmake
::
SET(ASM_DIALECT "-Nasm")
INCLUDE(CMakeTestASMCompiler)
SET(ASM_DIALECT)

I've got still a few questions:
* Object file type: Based on the target code platform, you need to
specify -felf32 (aka. -felf),
  -felf64, -fmacho, etc. as first argument. At the moment this is defined in my
  projects CMakeLists.txt. But I'd like to default to the current
project/file target.
* Generation of debug code: If the build type includes the generation of debug
  information, it would be nice adding '-g' to generate debug
information for assembly
  objects, too.
* Dependency tracking: I've no idea how cmake handles dependencies for
C/C++ at the
  moment, but it would be useful to provide this functionaltity for
assembly files, too.
  nasm can generate Makefile dependencies on stdout with the '-M' switch.

I'd be great to have (at least basic) support for nasm in the 2.5 release.

Thanks,
Gregor
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] TRY_COMPILE and CMAKE_C_FLAGS

2006-10-21 Thread Gregor Jasny

Hi,

I want to test if the current GNU compiler accept the -fopenmp flag.
In my cmake module I have the following test:

TRY_COMPILE( OPENMP_COMPILED
   ${CMAKE_BINARY_DIR}
   ${CMAKE_SOURCE_DIR}/cmake/Modules/CheckForOpenMP.c
   CMAKE_FLAGS -DCMAKE_C_FLAGS:STRING="-fopenmp"
   OUTPUT_VARIABLE OUTPUT
)

But the CMAKE_C_FLAGS setting is not propagated to the generated makefile:
[...]
/usr/bin/gcc   -o
CMakeFiles/cmTryCompileExec.dir/home/gjasny/src/parallel/cmake/Modules/CheckForOpenMP.o
 -c /home/gjasny/src/parallel/cmake/Modules/CheckForOpenMP.c
[...]
/usr/bin/gcc-fPIC
"CMakeFiles/cmTryCompileExec.dir/home/gjasny/src/parallel/cmake/Modules/CheckForOpenMP.o"
 -o cmTryCompileExec -rdynamic

I can set the CMAKE_C_FLAGS before the TRY_COMPILE but that seems a
little bit weird to me.

I've got three other questions:
1. Is it possible to change the C compiler and CFLAGS for a target? I
want to provide a macro like OPENMP_ADD_EXECUTABLE which sets the
compiler and cflags only for the target.

2. Is there a list of allowed / uses PROPERITES?

3. Is it possible to check the return value of a program executed by TRY_RUN?

Thanks for your support,
Gregor
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] How to handle find_package inter-dependencies

2014-03-10 Thread Gregor Jasny
Hello,

I wrote some FindXYZ modules that utilize FindPackageHandleStandardArgs
to find precompiled libraries. Now I have to "find" a library that
itself depends on another library and I wonder what's the recommended
way to do so?

I thought about nesting the find_package calls but then I have the
problem of forwarding options like REQUIRED from the outmost invocation.

Do you have any recommendations?

Thanks,
Gregor
-- 

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


Re: [CMake] How to handle find_package inter-dependencies

2014-05-19 Thread Gregor Jasny
Hello,

for reference:

On 10/03/14 20:53, Gregor Jasny wrote:
> I wrote some FindXYZ modules that utilize FindPackageHandleStandardArgs
> to find precompiled libraries. Now I have to "find" a library that
> itself depends on another library and I wonder what's the recommended
> way to do so?
> 
> I thought about nesting the find_package calls but then I have the
> problem of forwarding options like REQUIRED from the outmost invocation.

Just forward the quiet flags and nest the find_package calls:
https://gitorious.org/cmake/cmake/source/7246e635fe8312206b62a279b3c237d1cf584c83:Modules/FindPNG.cmake

-Gregor


-- 

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


[CMake] How to query the SYSTEM flag for directory property INCLUDE_DIRECTORIES

2014-06-15 Thread Gregor Jasny
Hello,

while working on -isystem support for cotire I did not find a way to
query the "SYSTEM" flag on the INCLUDE_DIRECTORIES directory property.

Did I miss something or was this omitted intentionally?

Thanks,
Gregor
-- 

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] Get Visual Studio target Arch

2014-09-08 Thread Gregor Jasny
On 06/09/14 16:02, Alexey Petruchik wrote:
> I want to use different library folders for x64/x86/arm architectures.
> Cmake has different generators for each arch: "Visual Studio 12
> 2013", "Visual Studio 12 2013 ARM", "Visual Studio 12 2013 Win64". Is there
> any cmake var to get visual studio target arch? CMAKE_SYSTEM_PROCESSOR is
> always AMD64 for me no matter what generator I'm using.

All the already available stuff in cmake is not sufficient. Especially
if you start to cross compile.

I use the pre-defined C/C++ preprocessor symbols for that:

include(CheckSymbolExists)

if(WIN32)
  check_symbol_exists("_M_AMD64" "" RTC_ARCH_X64)
  if(NOT RTC_ARCH_X64)
check_symbol_exists("_M_IX86" "" RTC_ARCH_X86)
  endif(NOT RTC_ARCH_X64)
  # add check for arm here
  # see http://msdn.microsoft.com/en-us/library/b0084kay.aspx
else(WIN32)
  check_symbol_exists("__i386__" "" RTC_ARCH_X86)
  check_symbol_exists("__x86_64__" "" RTC_ARCH_X64)
  check_symbol_exists("__arm__" "" RTC_ARCH_ARM)
endif(WIN32)

Now you could write:

if(RTC_ARCH_X64)
  set(MY_LIB_DIR x64)
elseif(RTC_ARCH_X86)
  set(MY_LIB_DIR x86)
elseif(RTC_ARCH_ARM)
  set(MY_LIB_DIR x86)
else()
  message(FATAL_ERROR "Unknown architecture")
endif()

I hope this helps.

Thanks,
Gregor
-- 

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 generator's use of explicitFileType vs lastKnownFileType

2014-12-19 Thread Gregor Jasny
Hi,

On 18/12/14 23:59, Radu Margarint wrote:
> I hope I'm asking this in correct place. I have recently been running
> into some issues using the xcode project files generated though cmake,
> and I have traced them down to PBXFileReference nodes using
> explicitFileType attributes (vs lastKnownFileType).

Real Xcode adds includeInIndex = 0; to some entries; CMake does not. Did
you consider this attribute in your investigation?

Thanks,
Gregor

-- 

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.1 unable to detect AppleClang when cross-compiling for iOS

2014-12-19 Thread Gregor Jasny
Hello,

On 16/12/14 23:23, Parag Chandra wrote:
> 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.

The symptom is that building the XCTest binary fails because code
signing for XCTest bundles is mandatory with Xcode 6.1.1 and iOS SDK 8.1.

This is caused by the CMakeDetermineCompilerId.cmake module which
insists in actually linking something with the compiler used. And with
iOS 8.1 everything the gets linked must be also code signed.

I'm able to configure the attachment of bug 15214 properly if I add the
following line to the CMake invocation:

-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="iPhone Developer"
(I also have a valid signing key in place)

Hope this helps,
Gregor
-- 

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] Specify 32-bit compilation to Clang

2015-01-19 Thread Gregor Jasny
Hello Robert,

On 19/01/15 20:42, Robert Dailey wrote:
> I'm running CMake 3.1 on Mint 64-bit OS. I need to generate an Eclipse
> project using Ninja that uses Clang to build a 32-bit application.
> 
> When I do this:
> 
> add_definitions("-m32")
> 
> For some reason my code is not able to include STL headers (files not
> found). Any reason for this? Is there a more proper way to specify
> 32-bit compilation so STL include paths are set?

You could try setting this two variables at configure time:
-DCMAKE_C_COMPILER_ARG1=-m32 -DCMAKE_CXX_COMPILER_ARG1=-m32

Hope this helps,
Gregpor
-- 

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 generator ignores shared library made of object libraries

2015-03-09 Thread Gregor Jasny

Hello Pere,

On 09/03/15 12:59, Pere Mato Vila wrote:

   I am using cmake version 3.1.3 on MacOSX 10.10.2. I want to build a
SHARED  library made exclusively of OBJECT libraries. This works well
with the Makefile generator but fails with the Xcode generator.

   To reproduce the problem is very simple:
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)

add_library(FooObjs OBJECT foo.cxx)
add_library(Foo SHARED $)
add_executable(FooMain main.cxx)
target_link_libraries(FooMain Foo)


The library libFoo.dylib is never build. I can bypass the problem by
adding a dummy.cxx file to the SHARED library, but I am not convinced
this is the right solution.


It looks like you did everything right:

From http://www.cmake.org/cmake/help/v3.1/command/add_library.html

Some native build systems may not like targets that have only object files, so 
consider adding at least one real source file to any target that references 
$.


Thanks,
Gregor
--

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] Correct way to set machos-min-version in Cmake 3.2.1

2015-03-18 Thread Gregor Jasny
Hello,

On 18/03/15 06:08, James Turner wrote:
> I’d imagine this is a FAQ, but I’ve Googled without success. Apologies if the 
> answer is out there.
> 
> With Cmake 3.2.1, some behaviour seems to have changed, in the handling of 
> CMAKE_OSX_DEPLOYMENT_TARGET.
> 
> I am trying to build using the 10.9 SDK, but with macosx-min-version set to 
> 10.7 (I need to code-sign on 10.9 for Gatekeeper v2).
> 
> Previously I was doing:
> 
>   set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
> 
> And this would cause cmake to set:
> 
>-mmacosx-version-min=10.7
> 
> As of 3.2.1, setting CMAKE_OSX_DEPLOYMENT_TARGET to 10.7 fail (with newest 
> Xcode) because there is no 10.7 SDK. So I changed my CMake files to do:
> 
>   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7”)
> 
> This works but unfortunately CMake i.s explicitly setting the flag too, so I 
> end up with both value in my CXXFLAGS:
> 
>   -mmacosx-version-min=10.9
>   -mmacosx-version-min=10.7
> 
> What is the correct way to request this now, such that the flag is only 
> generated once? 

As far as I remember if you don't set a SDK CMake tries to use the
min-version as such. So in your case you could try:
-DCMAKE_OSX_SYSROOT=macosx -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7

If you set CMAKE_OSX_SYSROOT to macosx it will use the latest one.
Otherwise you could also specify a version like macosx10.9.

Hope that helps,
Gregor
-- 

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] Detecting -m32 build target on 64-bit host

2015-04-24 Thread Gregor Jasny
Hi,

On 23/04/15 16:54, Mateusz Loskot wrote:
> Surprisingly, I'm having trouble to figure out how to determine,
> that in Linux 64-bit OS, I'm building a project with -m32 specified.
> IOW, any CMake variable or macro to tell me target architecture
> of a build that is being configured is 32 or 64 bit?

Does this help?

include(CheckSymbolExists)

if(WIN32)
  check_symbol_exists("_M_AMD64" "" RTC_ARCH_X64)
  if(NOT RTC_ARCH_X64)
check_symbol_exists("_M_IX86" "" RTC_ARCH_X86)
  endif(NOT RTC_ARCH_X64)
  # add check for arm here
  # see http://msdn.microsoft.com/en-us/library/b0084kay.aspx
else(WIN32)
  check_symbol_exists("__i386__" "" RTC_ARCH_X86)
  check_symbol_exists("__x86_64__" "" RTC_ARCH_X64)
  check_symbol_exists("__arm__" "" RTC_ARCH_ARM)
endif(WIN32)


-Gregor
-- 

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] Apple Metal Support in Xcode?

2015-04-29 Thread Gregor Jasny

Hello,

On 29/04/15 01:25, Marek Vojtko (Firaxis) wrote:

My questions:
1) Is there anything I can do right now (with CMake 3.2.2.) that would make 
Xcode handle .metal files correctly?
2) Are there plans to support .metal files via CMake and if so, how far along 
are they?


Does the XCODE_EXPLICIT_FILE_TYPE attribute help you?
http://www.cmake.org/cmake/help/v3.2/prop_sf/XCODE_EXPLICIT_FILE_TYPE.html

Maybe you could create a minimal example project and file a wishlist bug?

Thanks,
Gregor
--

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 build cmake to have http support?

2015-11-15 Thread Gregor Jasny
Hello,

On 14/11/15 20:23, Cedric Doucet wrote:
> I managed to compile cmake such that it support https by the past, but I 
> can't remember how I did it. 
> I remember I installed openssl and pass some flags to cmake. 
> 
> Could anyone remember me how to do it? 

HTTPS support worked for me after passing --system-curl to configure.

Thanks,
Gregor
-- 

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 absolute paths with gcc, __FILE__ , and logging

2013-01-04 Thread Gregor Jasny
Hello Willy,

On 1/4/13 4:58 PM, Willy Lambert wrote:
> I am trying to convert an existing project from Manual Makefiles to
> Cmake for building it.
> We have a logger that rely on the __FILE__ define to say which file is
> "writing" into the log but this is broken by the CMake default
> behavior using absolute paths.
> So I wonder if there is any way to have the file name in the code to
> be able to log "Error : line XXX in file.cpp".

This is somewhat hackish and should be surrounded by a check for the
Makefile generator:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__FILENAME__='\"$(subst
${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")

Thanks,
Gregor

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Check for defined preprocessor symbol

2013-02-17 Thread Gregor Jasny
Hello,

I need a function to check for existing preprocessor symbols.
Something like

CHECK_C_PREPROCESSOR_SYMBOL_EXISTS("__i386__", X86)
CHECK_C_PREPROCESSOR_SYMBOL_EXISTS("__x86_64__", X64)

I guess a hack would be to (ab)use CHECK_TYPE_SIZE for this, but is the
a more elegant solution?

Thanks,
Gregor
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Problems with auto-generated sources

2013-10-01 Thread Gregor Jasny

Hello,

On 9/30/13 7:19 PM, Williams, Norman K wrote:


cmake_minimum_required(VERSION 2.8)
project(Test)

add_custom_command(OUTPUT file.c
 COMMAND echo "GENERATING FILE"
 COMMAND ${CMAKE_COMMAND} -E remove file.c
 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/org.c
file.c
 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/org.c
   )
add_library(LibFile file.c)

add_executable(test1 test.c)
target_link_libraries(test1 LibFile)

add_executable(test2 test.c)
target_link_libraries(test2 LibFile)





Please try to add these two lines:

add_dependencies(test1 LibFile)
add_dependencies(test2 LibFile)

This helped to solve my dependencies problem.

Thanks,
Gregor

--

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


Re: [CMake] [ANNOUNCE] CMake 3.5.0-rc3 is now ready!

2016-02-24 Thread Gregor Jasny via CMake

Hello,

I discovered that the Visual Studio 2015 Generator does not work with 
v120 toolsets (#15986) and consider that major issue.


As far as I see this is related to the debug information setting from 
#15894.


Thanks,
Gregor
--

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] check_cxx_compiler_flag fails silently for complex compiler paths

2016-02-26 Thread Gregor Jasny via CMake
Hello,

On 26/02/16 00:00, Andrew Hundt wrote:
> I believe check_cxx_compiler_flags is failing due to a long/complicated
> compiler path.
> 
> Specifically my compiler is set to:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
> 
> CMake version: 3.4.3
> 
> Full trace output in gist where you can see lines warning of regex failure:
> https://gist.github.com/ahundt/88ce65bcc3c268acdd94
> 
> 
> Here is the code snippet that fails:
> 
> include(CheckCXXCompilerFlag)
>> check_cxx_compiler_flag(-std=c++11 COMPILER_SUPPORTS_CXX11)
>> check_cxx_compiler_flag(-std=c++0x COMPILER_SUPPORTS_CXX0X)
>> message(STATUS << set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBT_USE_DOUBLE_PRECISION -Wall")
> # Unused warnings
> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wuninitialized -Winit-self 
> -Wunused-function -Wunused-label -Wunused-variable -Wunused-but-set-variable 
> -Wunused-but-set-parameter")
> # Additional warnings
> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Warray-bounds -Wtype-limits 
> -Wreturn-type -Wsequence-point -Wparentheses -Wmissing-braces 
> -Wchar-subscripts -Wswitch -Wwrite-strings -Wenum-compare -Wempty-body 
> -Wlogical-op")

Those cause clang to emit a warning about unknown warnings:

>  clang -c -DBT_USE_DOUBLE_PRECISION -Wall -Wuninitialized -Winit-self 
> -Wunused-function -Wunused-label -Wunused-variable -Wunused-but-set-variable 
> -Wunused-but-set-parameter -Warray-bounds -Wtype-limits -Wreturn-type 
> -Wsequence-point -Wparentheses -Wmissing-braces -Wchar-subscripts -Wswitch 
> -Wwrite-strings -Wenum-compare -Wempty-body foo.cpp
> warning: unknown warning option '-Wunused-but-set-variable'; did you mean
>   '-Wunused-const-variable'? [-Wunknown-warning-option]
> warning: unknown warning option '-Wunused-but-set-parameter'; did you mean
>   '-Wunused-parameter'? [-Wunknown-warning-option]
> 2 warnings generated.

Those warnings are interpreted by check_cxx_compiler_flag as failure
(this is the regex you observed [1]) which leads to a negative setting
of the variable.

I see three possible solutions:

1) Move the check before touching the CMAKE_CXX_FLAGS.
2) Require a more modern CMake (3.3) and set
  CMAKE_CXX_STANDARD to 11
  CMAKE_CXX_STANDARD_REQUIRED to TRUE
3) Use modern CMake with target compile features:
  https://cmake.org/cmake/help/v3.3/manual/cmake-compile-features.7.html

Thanks,
Gregor

[1]
https://github.com/Kitware/CMake/blob/master/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake#L25


-- 

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_SIZEOF_VOID_P is unset when building libgit2 on Windows

2016-03-25 Thread Gregor Jasny via CMake
On 25/03/16 22:11, Sebastian Schuberth wrote:
> I also just realized CMAKE_C_ABI_COMPILER is set to FALSE in
> CMakeCCompiler.cmake. Looking at CMakeError.log was a good hint. I
> found:
> 
> ---8<---
> Building C object CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj
> 
> C:/Ruby-DevKit/mingw/bin/gcc.exe-fPIC-o
> CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj   -c "C:/Program
> Files (x86)/CMake/share/cmake-3.5/Modules/CMakeCCompilerABI.c"
> 
> /usr/bin/sh: -c: line 0: syntax error near unexpected token `('
> /usr/bin/sh: -c: line 0: `C:/Ruby-DevKit/mingw/bin/gcc.exe-fPIC
> -o CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj   -c \C:/Program
> Files (x86)/CMake/share/cmake-3.5/Modules/CMakeCCompilerABI.c\'
> CMakeFiles/cmTC_c0166.dir/build.make:65: recipe for target
> 'CMakeFiles/cmTC_c0166.dir/CMakeCCompilerABI.c.obj' failed
> ---8<---

To unblock you until the problem is sorted out you might want to install
a 64bit version of cmake which should not have the problematic (x86) in
the path (or you choose a custom install location).

http://ifw.podsvirov.pro/cmake/files/v3.5/

Hope that helps,
Gregor

-- 

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] EFFECTIVE_PLATFORM_NAME not expanded in TARGET_* generator expressions on iOS

2016-03-30 Thread Gregor Jasny via CMake

Hello,

I fear you're one of the first users of the XCtest feature :)

On 21/03/16 13:42, Vladimír Vondruš wrote:

Hello,

I came across this problem when trying to use XCTest macros ( 
https://cmake.org/cmake/help/latest/module/FindXCTest.html ) on iOS. When 
compiling for OSX, ctest properly executes all test cases, but when targeting 
iOS or iOS simulator, all the test cases fail similarly to the following:

 25: Test command: /Applications/Xcode.app/Contents/Developer/usr/bin/xctest 
"/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTestRunner.xctest/../.."
 25: Environment variables:
 25:  
DYLD_FRAMEWORK_PATH=/Users/mosra/Code/corrade/build-ioss/src/Corrade/Utility/Test/Debug${EFFECTIVE_PLATFORM_NAME}/UtilityTypeTraitsTest.framework/..
 25: Test timeout computed to be: 9.99988e+06
 25: 2016-03-21 12:41:38.799 xctest[31113:31078264] The bundle “Test” 
couldn’t be loaded because its executable couldn’t be located. Try reinstalling 
the bundle.
 25/28 Test #25: UtilityTypeTraitsTest ...***Failed0.04 sec

As you can see, the `${EFFECTIVE_PLATFORM_NAME}` is not being expanded to 
`-iphonesimulator` and thus the file is not found. The problem is that the 
`$` generator expression does not expand the 
variable. On the other hand, installation works without an issue, because the 
`cmake_install.cmake` scripts do additional round of variable expansion that 
(accidentally?) fixes this. The relevant part of the CMake source is here: 
https://github.com/Kitware/CMake/blob/cd569b962dbeaa7ea718021c16582cddd158df3a/Source/cmGeneratorTarget.cxx#L5063

 From the source it looks like the generator is just putting the 
"${EFFECTIVE_PLATFORM_NAME}" output and hopes that someone later expands it. 
That's the case with install scripts (so they work), but not with generator expressions. 
The `TARGET_LINKER_FILE_DIR` is not the only affected, the problem is the same for all 
`TARGET_*` generator expressions.

Currently I'm working around this by partially hardcoding the path, but that's 
far from ideal and I would like to avoid that:

 if(CMAKE_OSX_SYSROOT MATCHES "iPhoneOS")
 set(platform_name "-iphoneos")
 elseif(CMAKE_OSX_SYSROOT MATCHES "iPhoneSimulator")
 set(platform_name "-iphonesimulator")
 endif()
 set(target_linker_file_dir 
${CMAKE_CURRENT_BINARY_DIR}/$${platform_name}/${target}.xctest)

Is there any way to fix this directly in CMake? Also the above workaround works 
only when targeting single SDK and not when having single generated project for 
both the device and the simulator.


Could you please send me a minimal example and a command line how you 
invoke CMake?


Thanks,
Gregor
--

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] OBJECT Libraries with Xcode Generator

2016-04-06 Thread Gregor Jasny via CMake
On 06/04/16 20:32, Matthew Keeler wrote:
>  
> I think I ran into a bug but I am wondering if anyone has seen it an worked 
> around.
> 
> I have a source structure like the following (this is a contrived small 
> example to illustrate the problem):  
> 
> - CMakeLists.txt  
> - main.c
> - lib
>- CMakeLists.txt
>- x.c
>- x.h
>- alt1
>   - x.c
>   - x.h
>- alt2
>   - x.c
>   - x.h
> 
> CMakeLists.txt:
> 
>cmake_minimum_required(VERSION 3.5)
>project(example)
>add_subdirectory(lib)
>include_directories(lib)
>add_executable(main main.c $)
> 
> 
> main.c:
> 
>#include "x.h"
>
>int main()
>{
>   return example_func();
>}
> 
> lib/CMakeLists.txt:
> 
>option(ALT1 "ALT1" ON)
>option(ALT2 "ALT2" ON)
>set(SOURCES x.c)
>if ( ALT1 )
>   add_definitions(-DALT1)
>   list(APPEND SOURCES alt1/x.c)
>elseif ( ALT2 )
>   add_definitions(-DALT2)
>   list(APPEND SOURCES alt2/x.c)
>else ()
>message(FATAL_ERROR "No alt defined")
>endif()
>add_library(example OBJECT ${SOURCES})
> 
> lib/x.h:
> 
>#ifndef X_H
>#define X_H
>int example_func();
>#endif
> 
> lib/x.c:
> 
> #include "x.h"
> #ifdef ALT2
> #include "alt2/x.h"
> #else
> #include "alt1/x.h"
> #endif
> int example_func()
> {
>   return call_example_func();
> }
> 
> 
> lib/alt1/x.h:
> 
>#ifndef ALT1_X_H
>#define ALT1_X_H
>int alt1_example_func();
>#define call_example_func() alt1_example_func()
>#endif
> 
> 
> lib/alt1/x.c:
> 
>int alt1_example_func()
>{
>   return 1;
>}
> 
> lib/alt2/x.h:
> 
>#ifndef ALT2_X_H
>#define ALT2_X_H
>int alt2_example_func();
>#define call_example_func() alt2_example_func()
>#endif
> 
> 
> lib/alt2/x.c:
> 
>int alt2_example_func()
>{
>   return 2;
>}
> 
> 
> 
> Now if I run cmake using the makefile generator and then run make, all is 
> well and everything is built and runs as expected. If I use the Xcode 
> generator I get the following errors:
> 
> clang: error: no such file or directory: ‘ directory>/lib/example.build/Debug/example.build/Objects-normal/x86_64/x.o’
> 
> Within the directory  directory>/lib/example.build/Debug/example.build/Objects-normal/x86_64 there 
> is in fact no x.o. Instead there are two files, x-8171277E06B93FB2.o and 
> x-FA155118579B6D7E.o. So it looks like for the XCode generators sources 
> intermediate object files for a single CMakeLists.txt are stored within a 
> single directory. And in this case the sources have the same name so the 
> x-.o names are used instead. However the $ generator 
> expression seems to be referencing an incorrect name. Is there any workaround 
> so that for the Xcode generator it will not store all the build artifacts in 
> a single directory and not use the object file name with the unique id in it 
> and secondly where is the proper place to file a bug for this.

Thank you for the minimal example. Please file a bug in the bug tracker.

Thanks,
Gregor

-- 

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 generator results in a project file without optimization

2016-05-09 Thread Gregor Jasny via CMake
On 02/05/16 11:16, Siyuan Ren wrote:
> I have CMake 3.5.2.
> 
> I write a simple CMakeLists.txt like the below
> 
> ```
> project(mytest)
> add_executable(mytest test.cpp)
> ```
> 
> Then generate the Xcode project file with `cmake -G Xcode .`. Open the
> project file in Xcode, and I found the optimization level on all kinds
> of build, including "Debug", "Release", "RelWithDebInfo",
> "MinSizeRel", to be "None (-O0)".
> 
> Do I do something wrong? Or CMake Xcode generator cannot even handle
> the simplest project right?

Works for me:
xcodebuild -showBuildSettings -target mytest -configuration Release|grep
OPTIMI
GCC_OPTIMIZATION_LEVEL = 3


Which version of Xcode do you use?
-- 

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 generator results in a project file without optimization

2016-05-10 Thread Gregor Jasny via CMake
On 10/05/16 01:52, Siyuan Ren wrote:
> Version 7.3.1 (7D1014)

Could you please share your build and source directory with me?

-- 

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-developers] CLang error when building iOS bundle

2016-05-11 Thread Gregor Jasny via CMake
Hello,

On 11/05/16 21:22, Roman Wüger wrote:
> I got the following error when linking the iOS bundle:
> 
> clang: error: cannot specify -o when generating multiple output files
> 
> I didn’t found anything about the error in the internet, so maybe someone
> has already solved such error?
> 
> Does any one have a hint what could be wrong?

I cannot see any suspicious things, either (besides that -arch armv7 is
listed twice). I would suggest you create a new user on the machine and
try there. Or you could remove ~/Library/Developer/Xcode/DerivedData first.

Thanks,
Gregor
-- 

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 include third-party Framework headers directories as system directories in XCode for avoiding their warning

2016-05-11 Thread Gregor Jasny via CMake
Hello,

On 11/05/16 09:25, Attila Krasznahorkay wrote:
> I'm a bit surprised by this. I had to explicitly tell CMake not to treat 
> includes coming from imported targets as system includes. Using this variable:
> 
> https://cmake.org/cmake/help/v3.0/variable/CMAKE_NO_SYSTEM_FROM_IMPORTED.html
> https://cmake.org/cmake/help/v3.0/prop_tgt/NO_SYSTEM_FROM_IMPORTED.html
> 
> So I think this is in general a MacOS specific issue. I remember reading 
> about such issues a while ago. That CMake would not recognise that MacOS X's 
> clang would accept the -isystem argument out of the box.

This is a known bug: http://public.kitware.com/Bug/view.php?id=15687
Please look there for possible work-arounds.

Thanks,
Gregor

-- 

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] Logical block opening error

2016-07-03 Thread Gregor Jasny via CMake

Hello,

an editor with syntax highlighting and indention support would have 
helped here.


On 04/07/16 01:26, Sambeet Panigrahi wrote:

  IF(NOT NOT_BUILD_SHARED )
  ADD_LIBRARY(orocos-rtt-mqueue-${OROCOS_TARGET}_dynamic SHARED ${CPPS})
  TARGET_LINK_LIBRARIES(orocos-rtt-mqueue-${OROCOS_TARGET}_dynamic
orocos-rtt-${OROCOS_TARGET}_dynamic
${MQ_LIBRARIES} ${Boost_SERIALIZATION_LIBRARY}
)
  SET_TARGET_PROPERTIES( orocos-rtt-mqueue-${OROCOS_TARGET}_dynamic
PROPERTIES
  DEFINE_SYMBOL "RTT_MQ_DLL_EXPORT"
  OUTPUT_NAME orocos-rtt-mqueue-${OROCOS_TARGET}
  CLEAN_DIRECT_OUTPUT 1
  LINK_FLAGS "${MQ_LDFLAGS} ${CMAKE_LD_FLAGS}"
  COMPILE_DEFINITIONS "${OROCOS-RTT_DEFINITIONS}"
  SOVERSION "${RTT_VERSION_MAJOR}.${RTT_VERSION_MINOR}"
  VERSION "${RTT_VERSION}"


The SET_TARGET_PROPERTIES lacks a closing )


ENDIF(NOT NOT_BUILD_SHARED )


Thanks,
Gregor
--

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 generator and .metal shader files

2016-07-26 Thread Gregor Jasny via CMake
Hello,

On 22/07/16 23:07, Victor Rykov wrote:
> After adding a .metal file to a target via add_executable the metal file
> does not get pushed to the generated project`s Compile Sources queue and
> subsequently does not compile during project build unless I add the file to
> the queue manually from Xcode, I`ve tried setting compile flags on the
> .metal file as I`ve seen people mention that it works:
> 
> set(MetalTriangle_SHADERS Shaders.metal)
> 
> set_source_files_properties(${MetalTriangle_SHADERS} PROPERTIES
> COMPILE_FLAGS "-fno-fast-math")
> 
> 
> but unfortunately it did not help, is there any workaround to this problem?

Does it help to set the source files LANGUAGE property to C or C++ via
https://cmake.org/cmake/help/v3.6/prop_sf/LANGUAGE.html ?

Thanks,
Gregor
-- 

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_OSX_DEPLOYMENT_TARGET vs CMAKE_OSX_SYSROOT

2016-09-23 Thread Gregor Jasny via CMake
On 21/09/2016 10:54, James Turner wrote:
> 
>> On 20 Sep 2016, at 16:00, Braden McDaniel  wrote:
>>
>> When setting CMAKE_OSX_SYSROOT to the unversioned directory name (using 
>> Xcode 8, as it happens) and setting CMAKE_OSX_DEPLOYMENT_TARGET, I get this 
>> error:
>>
>>
>> -- The CXX compiler identification is AppleClang 8.0.0.838
>> CMake Error at 
>> /Applications/CMake.app/Contents/share/cmake-3.6/Modules/Platform/Darwin.cmake:76
>>  (message):
>> CMAKE_OSX_DEPLOYMENT_TARGET is '10.10' but CMAKE_OSX_SYSROOT:
>>
>> "/Applications/Xcode-8.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
>>
>> is not set to a MacOSX SDK with a recognized version. Either set
>> CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to
>> empty.
>> Call Stack (most recent call first):
>> /Applications/CMake.app/Contents/share/cmake-3.6/Modules/CMakeSystemSpecificInformation.cmake:36
>>  (include)
>> CMakeLists.txt:37 (project)
>>
>>
>> I'm able to suppress the error by using the versioned (symlink) directory; 
>> but isn't the premise of this error message invalid? As I understand it, 
>> since Xcode 7 (or perhaps earlier?), there is no requirement that the 
>> deployment target match the SDK version.
> 
> I’m seeing a similar error when setting CMAKE_OSX_DEPLOYMENT_TARGET to 10.7 
> with XCode 8, and leaving CMAKE_OSX_SYSROOT unset. I’m couldn’t identify 
> where (from  Modules/Platform/Darwin.cmake) the detected value of 
> _CMAKE_OSX_SYSROOT is computed. (I don’t wish to explicitly set it)

Could you please file a bug report and CC me? I'll try to submit a patch
next week but would appreciate a reminder :)

In my projects and toolchain files I always used xcrun to query for the
SDK path:

$ xcrun --sdk macosx --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk

The xcrun approach has the advantage that it respects the DEVELOPER_DIR
environment variable and thus works with different Xcode installations.

Thanks,
Gregor

-- 

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_OSX_DEPLOYMENT_TARGET vs CMAKE_OSX_SYSROOT

2016-09-25 Thread Gregor Jasny via CMake
On 23/09/2016 22:35, Gregor Jasny wrote:
> On 21/09/2016 10:54, James Turner wrote:
>>
>>> On 20 Sep 2016, at 16:00, Braden McDaniel  wrote:
>>>
>>> When setting CMAKE_OSX_SYSROOT to the unversioned directory name (using 
>>> Xcode 8, as it happens) and setting CMAKE_OSX_DEPLOYMENT_TARGET, I get this 
>>> error:
>>>
>>>
>>> -- The CXX compiler identification is AppleClang 8.0.0.838
>>> CMake Error at 
>>> /Applications/CMake.app/Contents/share/cmake-3.6/Modules/Platform/Darwin.cmake:76
>>>  (message):
>>> CMAKE_OSX_DEPLOYMENT_TARGET is '10.10' but CMAKE_OSX_SYSROOT:
>>>
>>> "/Applications/Xcode-8.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
>>>
>>> is not set to a MacOSX SDK with a recognized version. Either set
>>> CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to
>>> empty.
>>> Call Stack (most recent call first):
>>> /Applications/CMake.app/Contents/share/cmake-3.6/Modules/CMakeSystemSpecificInformation.cmake:36
>>>  (include)
>>> CMakeLists.txt:37 (project)
>>>
>>>
>>> I'm able to suppress the error by using the versioned (symlink) directory; 
>>> but isn't the premise of this error message invalid? As I understand it, 
>>> since Xcode 7 (or perhaps earlier?), there is no requirement that the 
>>> deployment target match the SDK version.

The deployment target gives you backwards compatibility back to the
specified version. In your example the binary should be runnable on
macOS 10.10 and later even that you used a newer SDK. That way you have
access to the latest SDK features which you could use after a thorough
check at runtime.

>> I’m seeing a similar error when setting CMAKE_OSX_DEPLOYMENT_TARGET to 10.7 
>> with XCode 8, and leaving CMAKE_OSX_SYSROOT unset. I’m couldn’t identify 
>> where (from  Modules/Platform/Darwin.cmake) the detected value of 
>> _CMAKE_OSX_SYSROOT is computed. (I don’t wish to explicitly set it)

Will be fixed, too.

> Could you please file a bug report and CC me? I'll try to submit a patch
> next week but would appreciate a reminder :)

I filed https://gitlab.kitware.com/cmake/cmake/issues/16323 and will
push a fix soon.

-- 

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.6 and OSX

2016-10-31 Thread Gregor Jasny via CMake
Hello Robert,

On 29/10/2016 22:03, Robert Ramey wrote:
> I've just "upgraded" to version 3.6 of CMake.  I'm using Xcode with the
> clang compiler.  Now when I'm trying to configure a project I'm getting:
> 
> The C compiler identification is unknown
> The CXX compiler identification is unknown
> CMake Error at CMakeLists.txt:14 (project):
>   No CMAKE_C_COMPILER could be found.
> CMake Error at CMakeLists.txt:14 (project):
>   No CMAKE_CXX_COMPILER could be found.
> 
> What do I have to do to make this work?

Have a look into /CMakeFiles/CMakeOutput.log and
CMakeError.log. There should be an error visible. Most often someone
forgets to accept the Xcode license. The resulting output leads to CMake
errors.

Thanks,
Gregor
-- 

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.6 and OSX

2016-11-04 Thread Gregor Jasny via CMake
Hello,

On 02/11/2016 06:01, Robert Ramey wrote:
> Here is what I'm seeing:
> 
> a) it looks like CMake is looking for boost_filesystem rather than
> libboost as I expect. (same for system).
> 
> b) even if I tweak findBoost to force the system to look for libboost...
> it still fails
> 
> b) If I follow the suggestion and set BOOST_ROOT to the boost root, it
> still doesn't work.  The BOOST_ROOT variable is discarded when I invoke
> "Configure"
> 
> So again, any suggestions you can offer will be appreciated.

It looks like you use a self-compiled boost library. I never did that
but used homebrew instead. If you download the precompiled tarball from
boost, does it work? (I'm asking because I see a 'Debug' in one of your
paths).

The next thing I would do is to run opensnoop and look what files CMake
tries to access() / open() / stat(). Maybe that gives you a hint.

Hope this helps,
Gregor
-- 

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] v3.7.0 - archive_cryptor_private.h - compile error

2016-11-26 Thread Gregor Jasny via CMake
Hello,

On 25/11/2016 19:25, Nathan Sizemore wrote:
> I receive the following when building:
> 
> [ 40%] Building C object
> Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o
> In file included from
> /home/nathan/development/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor.c:32:0:
> /home/nathan/development/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:107:17:
> error: field ‘ctx’ has incomplete type
>   EVP_CIPHER_CTX ctx;

You are using the embedded copy of libarchive. I would suggest you
install the Debian CMake package build dependencies:

  apt-get build-dep cmake

so that you use the system libraries instead of the embedded ones.
Hopefully this will resolve your issue.

Thanks,
Gregor
-- 

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] v3.7.0 - archive_cryptor_private.h - compile error

2016-11-26 Thread Gregor Jasny via CMake
On 26/11/2016 10:03, Hendrik Sattler wrote:
> I assume that maybe he tries to build with openssl 1.1

You're right. I assumed that "Debian GNU/Linux 8" does not contain
OpenSSL 1.1 but either the Debian version or OpenSSL version on Nathans
system is wrong.

> Am 26. November 2016 09:29:14 MEZ, schrieb Gregor Jasny via CMake 
> :
>> Hello,
>>
>> On 25/11/2016 19:25, Nathan Sizemore wrote:
>>> I receive the following when building:
>>>
>>> [ 40%] Building C object
>>>
>> Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o
>>> In file included from
>>>
>> /home/nathan/development/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor.c:32:0:
>>>
>> /home/nathan/development/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:107:17:
>>> error: field ‘ctx’ has incomplete type
>>>   EVP_CIPHER_CTX ctx;
>>
>> You are using the embedded copy of libarchive. I would suggest you
>> install the Debian CMake package build dependencies:
>>
>>  apt-get build-dep cmake
>>
>> so that you use the system libraries instead of the embedded ones.
>> Hopefully this will resolve your issue.

I reproduced the error on my Debian Sid machine, filed a bug against
CMake (https://gitlab.kitware.com/cmake/cmake/issues/16459) only to
discover that Brad King already filed a PR against upstream libarchive.

The following should solve Nathans problem:

apt-get build-dep cmake
apt-get install librhash-dev
cd <>
mkdir _build
cd _build
../bootstrap --system-libs
make

See:
https://anonscm.debian.org/cgit/pkg-cmake/cmake.git/tree/debian/rules#n43

Debians libarchive does not use OpenSSL but nettle instead so the
OpenSSL incompatibility does not show up.

Thanks,
Gregor
-- 

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] A trouble in using cmake for xcode

2016-12-03 Thread Gregor Jasny via CMake
Hello,

On 01/12/2016 07:02, wy39666...@163.com wrote:
> I have a trouble in using cmake.I try to find a way to resolve that for a 
> long time, but finally get no results. I attempt to create an ios application 
> imessage extension by cmake but i can't find a suitable command. So i contact 
> you for some suggestion. Look forward for your favourable reply. Thanks very 
> much!


Do you mean something like the "iMessage Application" in the Xcode
project generation wizard?

Thanks,
Gregor
-- 

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] A trouble in using cmake for xcode

2016-12-03 Thread Gregor Jasny via CMake
On 03/12/2016 15:07, wy39666...@163.com wrote:
>>> I have a trouble in using cmake.I try to find a way to resolve that for a 
>>> long time, but finally get no results. I attempt to create an ios 
>>> application imessage extension by cmake but i can't find a suitable 
>>> command. So i contact you for some suggestion. Look forward for your 
>>> favourable reply. Thanks very much!

>> Do you mean something like the "iMessage Application" in the Xcode
>> project generation wizard?

> Yes, It is.  Can you give me some suggestion. Thanks for your reply. 

I need to extend CMake to be able to set an arbitrary product type for
the bundle. In your case:

productType = "com.apple.product-type.application.messages";
productType = "com.apple.product-type.app-extension.messages";

Please give me some days to implement the behavior. Can you point me to
an already existing extension (maybe on GitHub) and tell me how to test
them in simulator?

Thanks,
Gregor

-- 

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] A trouble in using cmake for xcode

2016-12-03 Thread Gregor Jasny via CMake
On 03/12/2016 19:46, Gregor Jasny wrote:
> On 03/12/2016 15:07, wy39666...@163.com wrote:
>>>> I have a trouble in using cmake.I try to find a way to resolve that for a 
>>>> long time, but finally get no results. I attempt to create an ios 
>>>> application imessage extension by cmake but i can't find a suitable 
>>>> command. So i contact you for some suggestion. Look forward for your 
>>>> favourable reply. Thanks very much!
> 
>>> Do you mean something like the "iMessage Application" in the Xcode
>>> project generation wizard?
> 
>> Yes, It is.  Can you give me some suggestion. Thanks for your reply. 
> 
> I need to extend CMake to be able to set an arbitrary product type for
> the bundle. In your case:
> 
> productType = "com.apple.product-type.application.messages";
> productType = "com.apple.product-type.app-extension.messages";

I filed a preliminary merge request:
https://gitlab.kitware.com/cmake/cmake/merge_requests/310


-- 

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] MSVC15 variable available for Visual Studio 2017

2017-01-11 Thread Gregor Jasny via CMake

Hello,

I wonder if there is a reason why no MSVC15 variable is available for 
Visual Studio 2017? I'm using those MSVCxx variables and 
CMAKE_GENERATOR_TOOLSET to detect the active toolset:



  # Visual Studio 2008
  if((MSVC90 AND "${CMAKE_GENERATOR_TOOLSET}" STREQUAL "") OR (CMAKE_GENERATOR_TOOLSET 
MATCHES "v90"))
set(COL_BUILD_TOOLCHAIN)
  elseif((MSVC11 AND "${CMAKE_GENERATOR_TOOLSET}" STREQUAL "") OR 
(CMAKE_GENERATOR_TOOLSET MATCHES "^v110.*"))
set(COL_BUILD_TOOLCHAIN _v110)
  elseif((MSVC12 AND "${CMAKE_GENERATOR_TOOLSET}" STREQUAL "") OR 
(CMAKE_GENERATOR_TOOLSET MATCHES "^v120.*"))
set(COL_BUILD_TOOLCHAIN _v120)
  elseif((MSVC14 AND "${CMAKE_GENERATOR_TOOLSET}" STREQUAL "") OR 
(CMAKE_GENERATOR_TOOLSET MATCHES "^v140.*"))
set(COL_BUILD_TOOLCHAIN _v140)
  else()
message(FATAL_ERROR "Unknown Visual Studio version (${MSVC_VERSION}) or 
generator toolset (${CMAKE_GENERATOR_TOOLSET})")
  endif()


If I now select the Visual Studio 2017 compiler but omit the toolset on 
the command line, the CMAKE_GENERATOR_TOOLSET is empty and MSVC15 is not 
set. I wonder how I could detect the v141(_xp) toolset?




Thanks,
Gregor
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Using XCODE_PRODUCT_TYPE to make kexts

2017-01-16 Thread Gregor Jasny via CMake

Hello,

On 16/01/2017 15:43, Harry Mallon wrote:

Sorry look like it is not in the release build yet.


correct, please use a recent nightly:

https://cmake.org/files/dev/?C=M;O=D

Maybe you could report back if the attribute works for you.

Thanks,
Gregor
--

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] Mac OS. Cmake changes it's behaviout when building framework for iOS simulator

2017-02-03 Thread Gregor Jasny via CMake

Hello,

On 02/02/2017 16:15, Сергей Бойцов wrote:

Hello.
I'm looking for some help cause i have faced a really strange problem
with building frameworks on Mac OS
So i have:

Mac OS X : el captain
Xcode 8.0
CMake 3.3.2 [1],
CMake 3.4.5 [2],
CMake 3.5-3.6 [3]



CMake [1] produced correct framework
CMake [2] produced incorrect Version folder that points to C but no C
folder is produced
CMake [3] produced no Version folder at all


In contrast to macOS bundles the iOS ones have a more flattened 
structure without Version links:


https://developer.apple.com/library/content/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/1123i-CH101-SW1

See also https://cmake.org/Bug/view.php?id=15833

So the CMake 3.5/3.6 behavior is the desired one. CMake versions before 
were buggy in that regard.


Thanks,
Gregor
--

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] Missing 'undefined dynamic_lookup' flag

2017-03-12 Thread Gregor Jasny via CMake
Hello,

On 3/10/17 12:31 AM, Cedric Doucet wrote:
> Actually, I should not modify CMAKE_CXX_COMPILER_FLAGS. 
> It seems that the problem comes from the variable 
> CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS which only contains ' -bundle 
> -Wl,-headerpad_max_install_names' but not ' -undefined dynamic_lookup'. 

Please try:

TARGET_LINK_LIBRARIES(main "-undefined dynamic_lookup")

Thanks,
Gregor
-- 

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] Missing 'undefined dynamic_lookup' flag

2017-03-12 Thread Gregor Jasny via CMake
On 3/12/17 6:45 PM, Gregor Jasny wrote:
> On 3/10/17 12:31 AM, Cedric Doucet wrote:
>> Actually, I should not modify CMAKE_CXX_COMPILER_FLAGS. 
>> It seems that the problem comes from the variable 
>> CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS which only contains ' -bundle 
>> -Wl,-headerpad_max_install_names' but not ' -undefined dynamic_lookup'. 
> 
> Please try:
> 
> TARGET_LINK_LIBRARIES(main "-undefined dynamic_lookup")

Meh. main should have been module. You could also try to add it to
CMAKE_SHARED_LINKER_FLAGS.

Thanks,
Gregor

-- 

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] Multiple ELSE() clauses

2017-03-20 Thread Gregor Jasny via CMake

Hello,

On 20/03/2017 12:09, Sergey Zakharchenko wrote:

Rolf,

2017-03-20 14:06 GMT+03:00 Rolf Eike Beer :

https://gitlab.kitware.com/cmake/cmake/issues/14335


Since the issue is marked "easy" and it's over 3 years old, I assume
nobody cares? OK then.


I can try to fix it. I hope we don't need a new policy for that.

Thanks,
Gregor
--

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] Multiple ELSE() clauses

2017-03-20 Thread Gregor Jasny via CMake
On 3/20/17 12:09 PM, Sergey Zakharchenko wrote:
> Rolf,
> 
> 2017-03-20 14:06 GMT+03:00 Rolf Eike Beer :
>> https://gitlab.kitware.com/cmake/cmake/issues/14335
> 
> Since the issue is marked "easy" and it's over 3 years old, I assume
> nobody cares? OK then.

https://gitlab.kitware.com/cmake/cmake/merge_requests/594


-- 

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] ZERO_CHECK generation and Xcode

2017-03-29 Thread Gregor Jasny via CMake
Hi Steven,

On 3/29/17 5:24 PM, Steven Velez wrote:
> If I understand correctly the purpose of the ZERO_CHECK target is to update
> the generated project files when necessary.
> 
> That's fine, but I have noticed on Xcode (8.2) that when ZERO_CHECK runs
> and updates the project, it causes the xcode build to abort.
> Unfortunately, it seems this build abort happens before the xcode project
> regeneration has a chance to complete and update/touch
> CMakeFiles/cmake.check_cache, so once the target is out of date, it pretty
> much stays that way, and the builds are always (or least frequently)
> subsequently aborted because of an update to generated project files.
> 
> If I go in to the terminal and manually execute "make -f ReRunCMake.make"
> then the process completes and the ZERO_CHECK target is good, and it does
> not run any more.
> 
> Is there any known way to deal with this other than by specifying
> CMAKE_SUPRRESS_REGENERATION:BOOL=YES ?

Could you please file a bug about this? I'll take a look during the 3.9
development cycle. Do you have a rather large or small project?

Thanks,
Gregor

-- 

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] ZERO_CHECK generation and Xcode

2017-03-29 Thread Gregor Jasny via CMake
On 3/29/17 10:15 PM, Steven Velez wrote:
> I do have a pretty large project with around 142 targets.
> 
> Another characteristic of note, and which I noticed while investigating
> this is that our project suffers from
> https://gitlab.kitware.com/cmake/cmake/issues/14297, and I think it is
> because we have "project" declarations underneath the top-level... so
> ZERO_CHECK builds concurrently with other targets.

Oh boy. Thanks for pointing this out.

> I did create an xcode scheme that builds a smaller set of targets (6), and
> made sure that they all depended on ZERO_CHECK, and then ZERO_CHECK ran by
> itself, and it appeared that after a single test, it did manage to complete
> updating so that it did not run on subsequent invocations.

I'll have a look.
-- 

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 duplicate filename issue?

2017-06-26 Thread Gregor Jasny via CMake
Hello,

On 6/26/17 8:12 PM, Watson, Andre wrote:
> We're currently migrating a huge internal system over to CMake, and we're 
> nearing completion, but have run into an issue with the generated Xcode 
> projects.  We build this system on Windows, Linux, and Mac (both makefile and 
> Xcode).  On all systems, we have a third party directory that has a couple of 
> duplicate source names within a single CMakeLists.txt file.  On Windows, 
> Linux, and makefile Mac, our projects all generate, build, and link 
> successfully.  However, on Xcode Mac, our project builds, but fails to link.  
> On further inspection, the duplicate filenames are being generated into the 
> intermediate build directories as filenames such as 
> attributes-78663048C12E97C.o and attributes-FA2B54357D684A6E.o.  The linker, 
> however, is looking for attributes.o.  It appears that the compiling process 
> is recognizing the duplicate naming and adding on the hex string (the non 
> duplicate .o's do not have these strings), but that these new filenames are 
> not being passed to the linker.  Is this is
  an Xcode option that I am missing, or this something occurring within the 
CMake project generation that is causing is mismatch?

could you please try to create a minimal example and file a bug report?
I'll have a look then.

Thanks,
Gregor


-- 

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 refer to *.so files in Android NDK?

2017-06-26 Thread Gregor Jasny via CMake
On 6/22/17 4:01 PM, Robert Dailey wrote:
> In my toolchain file for Android NDK, I specify the following *.so
> paths manually:
> 
> set( ANDROID_PREBUILT_LIBRARIES
> 
> ${CMAKE_ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_shared.so
> ${CMAKE_ANDROID_NDK}/platforms/android-15/arch-x86/usr/lib/libz.so
> )
> 
> However, I'd like a better way to find these files: I already
> configure CMake 3.8 using built-in Android support. It's able to
> configure my toolchain just fine. Can I leverage some built-in
> functionality to get the path to these files? I'm worried with the way
> it is, if I change the other variables that the paths won't be valid
> anymore and I'll have to update them manually again.

I would suggest that you dump all cmake variables and have a look what's
matching your paths:

get_cmake_property(_variableNames VARIABLES)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()

Hope that helps!

Cheers,
Gregor
-- 

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] string MATCHALL

2017-10-24 Thread Gregor Jasny via CMake
In case it helps: the GUI can contains a regex explorer where you can play
with rexexes. But beware: there are some corner cases around quoting
special things.

I'd suggest to use if( ... MATCHES ...) And read the match from
the CMAKE_MATCH_ variables.


On Oct 24, 2017 11:16, "Edoardo Pasca"  wrote:

Dear all,

I'm trying to determine the active conda environment (name and path) at
cmake runtime.

To do that I issue the command
conda env list, which yields lines with the active environment highlighted
with an asterisk: something similar to this:

env1   /path/to/env1
env2   / path/to/env2
env3   *  /path/to/env3

It is a perfect task for a match of REGEX but I cannot get it right and I
defaulted to using brute force to achieve my goal.

My brute force method is
1) splitting the lines by replacing \n with ;
2) now that I have a LIST (or I think that is a list) I can run a foreach
to see if line-by-line I match the following string(REGEX MATCHALL
"(.+)[*](.+)" match ${line})

Now, I'd expect to find in ${match} a list with the captured strings, i.e.
env3;/path/to/env3. However that's not the case ${match} contains the whole
line. So now I REPLACE "*" with ";" and now I have a almost LIST. Actually
I do this:

string(REPLACE "*" ";" ENV_DIR ${match})
list (APPEND cc "")
foreach(conda ${ENV_DIR})
 string(STRIP ${conda} stripped)
 list(APPEND cc ${stripped})
endforeach()

Finally I've got my list ${cc} with the name and path of the environment as
first and second element.

The question is, how would I use MATCHALL to achieve my goal (if possible)?

for the record I attach here the whole script.

Thanks for your help

Edo


execute_process(COMMAND "conda" "env" "list"
OUTPUT_VARIABLE _CONDA_ENVS
RESULT_VARIABLE _CONDA_RESULT
ERROR_VARIABLE _CONDA_ERR)
if(NOT _CONDA_RESULT)
string(REPLACE "\n" ";" ENV_LIST ${_CONDA_ENVS})
foreach(line ${ENV_LIST})
  string(REGEX MATCHALL "(.+)[*](.+)" match ${line})
  if (NOT ${match} EQUAL "")
string(REPLACE "*" ";" ENV_DIR ${match})
list (APPEND cc "")
foreach(conda ${ENV_DIR})
  string(STRIP ${conda} stripped)
   list(APPEND cc ${stripped})
endforeach()
list(LENGTH cc Ns)
if (${Ns} EQUAL 2)
  list(GET cc 0 CONDA_ENVIRONMENT)
  list(GET cc 1 CONDA_ENVIRONMENT_PATH)
endif()
  endif()
endforeach()
else()
message(FATAL_ERROR "ERROR with conda command " ${_CONDA_ERR})
endif()


-- 
Edo
I know you think you understand what you thought I said, but I'm not sure
you realize that what you heard is not what I meant (prob. Alan Greenspan)
:wq

--

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/opensou
rce/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 update for older PPC7

2018-06-23 Thread Gregor Jasny via CMake
Hello,

On 6/20/18 3:10 AM, A. Sanchez via CMake wrote:
> Hello. I have been trying to get a good version of CMake for my PS3 cluster 
> running linux. But everything I try to compile needs CMake 3.0 or higher? Is 
> there any way to update from CMAKE 2.4. Right now I am running Fedora 9, 
> since PPC is sort of out of date, but I can run Debian Jessie if the system 
> needs to be up to date.

I believe you have two options:
1) Use debian Jessie backports which will give you CMake 3.6:

https://packages.debian.org/search?keywords=cmake&searchon=names§ion=all&suite=jessie-backports

2) Compile it yourself. CMake is self-contained so compilation should be
relatively easy. Please note that latest versions depend on a C++11
compatible toolchain. There is a boostrap script to compile CMake
without CMake and break the dependency cycle.

Hope that helps,
Gregor
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] How do I set an Xcode property on the global/root project?

2015-06-14 Thread Gregor Jasny via CMake
Hi Eric,

On 14/06/15 14:38, Eric Wing wrote:
> I have been successful at setting Xcode properties on specific targets
> with CMake via:
> 
> set_property (TARGET ${TARGET} PROPERTY
> XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE})
> 
> But I have been unable to set properties on the global/root project.
> Is there a way to do this?

The excellent CMake documentation has the answer. The XCODE_ATTRIBUTE
help page here:
http://www.cmake.org/cmake/help/v3.2/prop_tgt/XCODE_ATTRIBUTE_an-attribute.html

Would have pointed you to CMAKE_XCODE_ATTRIBUTE
> http://www.cmake.org/cmake/help/v3.2/variable/CMAKE_XCODE_ATTRIBUTE_an-attribute.html

Hope that helps,
Gregor
-- 

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_COLOR_MAKEFILE

2015-06-14 Thread Gregor Jasny via CMake
On 10/06/15 04:17, Dave Yost wrote:
> Hey, I love colors. But one of my users doesn’t.

You could try the Ninja generator instead of Makefile. It much often
faster, as verbose as necessary, and black'n'white.

Thanks,
Gregor
-- 

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 project generation failed

2015-06-16 Thread Gregor Jasny via CMake
Hello,

I applied some fixes to what becomes CMake 3.3. could you please test
the release candidate?

On 16/06/15 16:27, Michael Jackson wrote:
> Running OS X 10.8.5 with Xcode 5.1.1 and Cmake 3.2.x and 3.3.RC and neither 
> generate a Xcode project file that can be opened by Xcode. We get valid Ninja 
> and Makefile projects for our project. I was wondering if anyone else has 
> seen this issue. Not sure if there is something in our project that is 
> hanging up CMake.

Could you share your project.pbxproj file (if don't want to share it
here you could also mail it to me directly).

Thanks,
Gregor
-- 

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 project generation failed

2015-06-16 Thread Gregor Jasny via CMake
On 16/06/15 21:27, Gregor Jasny wrote:
> Hello,
> 
> I applied some fixes to what becomes CMake 3.3. could you please test
> the release candidate?

Sorry, somehow overlooked the statement about RC in your mail.

> On 16/06/15 16:27, Michael Jackson wrote:
>> Running OS X 10.8.5 with Xcode 5.1.1 and Cmake 3.2.x and 3.3.RC and neither 
>> generate a Xcode project file that can be opened by Xcode. We get valid 
>> Ninja and Makefile projects for our project. I was wondering if anyone else 
>> has seen this issue. Not sure if there is something in our project that is 
>> hanging up CMake.
> 
> Could you share your project.pbxproj file (if don't want to share it
> here you could also mail it to me directly).

-- 

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 project generation failed

2015-06-17 Thread Gregor Jasny via CMake
On 17/06/15 16:29, Michael Jackson wrote:
> Just to follow up with this issue in case anyone else has issues with Xcode 
> here is what happened. Thanks to Gregor for taking a look at the generated 
> project file he was able to identify an issue where there were file paths in 
> the form of "//" inside the project file. They specifically showed in the 
> form of: /* // */. This was enough to throw the Xcode parser and send Xcode 
> into the spin-of-death. The root cause of the issue is that I had a cmake 
> variable that held all my source files. In that list was a file path, where 
> the path was completely created through cmake variables,
> 
> set(FOO_FILE "${SomethingLib_path}/${SOME_HEADER_PATH})
> 
> but neither of those variables had been defined for this project. (Copy paste 
> mistake). This resulted in the cmake variable (FOO_FILE from above) being 
> empty but still included as a source in the add_library() call. Fixing the 
> cmake variables fixed the Xcode generation issue.

I will create a topic branch with a fixed Xcode generator.

Thanks,
Gregor

-- 

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] Create space delimited string with $ genex

2015-07-08 Thread Gregor Jasny via CMake
Hello,

in my build process I need to call a compiler like tool with the same
include directories as a certain target.

I tried the following:


cmake_minimum_required(VERSION 3.2)
project(cmake-genex C)
add_library(dummy dummy.c foo.c)
target_include_directories(dummy PUBLIC foo bar)

set(prop "$")
set(lst "$<$:-I$>")

add_custom_command(OUTPUT foo.c
  COMMAND echo ${lst}
)

Unfortunately this results in an escaped space before the -I :
echo -I/Users/gjasny/src/cmake-genex/foo\
-I/Users/gjasny/src/cmake-genex/bar

Is there a way to convince CMake not to escape the space? It looks like
whatever I do, the generator expression is handled like a single string.

Thanks,
Gregor
-- 

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 iOS application + framework link error

2015-08-20 Thread Gregor Jasny via CMake

Hi David,

On 04/05/15 20:12, David Hirvonen wrote:

Thanks for the response.  I've moved to a more standard *nix layout for
all platforms, and will rely on a post-build step to create my framework
(for now).  If I find a fix, I'll be sure to share it here.


On Wed, Apr 29, 2015 at 5:22 AM, Eric Wing mailto:ewmail...@gmail.com>> wrote:

On 4/25/15, David Hirvonen mailto:dhirvo...@elucideye.com>> wrote:
> I'm hitting a link error when linking an iOS application with an 
internally
> created framework/library using the the CMake Xcode generator and an iOS
> toolchain.  I've put together a minimal CMakeLists.txt example here:
>
>https://github.com/headupinclouds/cmake_framework_test/


With the ios-app-bundle-layout topic [1] branch I successfully compiled 
your test:



Touch _builds/ios/Debug-iphoneos/testa.app
cd /Users/gjasny/src/cmake_framework_test
export 
PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/gjasny/src/cmake/_build/bin:/Users/gjasny/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"
/usr/bin/touch -c 
/Users/gjasny/src/cmake_framework_test/_builds/ios/Debug-iphoneos/testa.app

ProcessProductPackaging 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/Entitlements.plist
 _builds/ios/tf.build/Debug-iphoneos/testa.build/testa.app.xcent
cd /Users/gjasny/src/cmake_framework_test
export 
PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/gjasny/src/cmake/_build/bin:/Users/gjasny/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"
builtin-productPackagingUtility 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/Entitlements.plist
 -entitlements -format xml -o 
/Users/gjasny/src/cmake_framework_test/_builds/ios/tf.build/Debug-iphoneos/testa.build/testa.app.xcent

CodeSign _builds/ios/Debug-iphoneos/testa.app
cd /Users/gjasny/src/cmake_framework_test
export 
CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export 
PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/gjasny/src/cmake/_build/bin:/Users/gjasny/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"

Signing Identity: "iPhone Developer: Gregor Jasny (V73ULL766M)"
Provisioning Profile: "iOSTeam Provisioning Profile: *"
  (34a9855a-c998-49e6-b12e-91f5fe28079a)

/usr/bin/codesign --force --sign A8CFBE1BA1116F2E590774A39ED25D7E8DFC5344 
--entitlements 
/Users/gjasny/src/cmake_framework_test/_builds/ios/tf.build/Debug-iphoneos/testa.build/testa.app.xcent
 /Users/gjasny/src/cmake_framework_test/_builds/ios/Debug-iphoneos/testa.app

** BUILD SUCCEEDED **

library path:  _builds/ios/Debug-iphoneos/TF.framework/TF
_builds/ios/Debug-iphoneos/TF.framework.dSYM/Contents/Resources/DWARF/TF


Thanks,
Gregor


[1] 
http://www.cmake.org/gitweb?p=stage/cmake.git;a=shortlog;h=refs/heads/ios-app-bundle-layout



--

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_include_directories SYSTEM adds -isystem to Clang, but not GCC

2015-08-20 Thread Gregor Jasny via CMake

Hello,

On 17/08/15 01:01, digitalriptide wrote:

When I add SYSTEM to target_include_directories, for example using
target_include_directories( my_target SYSTEM PUBLIC ${MY_LIBRARIES} )
in Clang, CMake prepends -isystem to the relavent -I/my/library/path
type flags. With GCC, however, I see no -isystem added.

For reference, this is CMake 3.2.3 on OS X with Apple LLVM version 6.0
and GCC 5 provided via MacPorts.

Should SYSTEM add -isystem with GCC?


this is a know bug: http://www.cmake.org/Bug/view.php?id=15687

I plan to work on it during the next days so that it may be fixed with 
CMake 3.4.


Thanks,
Gregor
--

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 do that w/o LOCATION property of a target...

2015-09-05 Thread Gregor Jasny via CMake
On 05/09/15 08:22, Alex Turbov wrote:
> Hi,
> 
> in my project I have `add_executable()`. after that, in a current binary
> dir I need to render a `*.cmake` script (via `configure_file()`) to be
> running from `add_test()` (as `cmake -P`) which should start just the
> compiled executable via `execute_process()` and capture its output (to be
> processed by followed commands)...
> 
> the problem is: how to render an absolute path to the compiled executable
> inside the generated `*.cmake` script ??
> 0) access to LOCATION target property is prohibited from CMakeLists.txt, so
> I can't set it into a generated script
> 1) generator expressions don't work w/ `configure_file()`

If you use the add_test(NAME  COMMAND ) signature you can
use generator expressions.

You could pass the executable directory as a parameter to the script:

add_test(NAME myTest COMMAND ${CMAKE_COMMAND}
-DMY_EXECUATABLE=$ -P my_script.cmake)

In the script use ${MY_EXECUATABLE}.

Hope this helps,
Gregor

-- 

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] Writing find packages

2015-09-05 Thread Gregor Jasny via CMake
Hello,

On 03/09/15 23:15, Robert Dailey wrote:
> How recent is this documentation?
> http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries#Writing_find_modules
> 
> It seems rather old. What is the modern way of doing this?

The cmake-developer help page has a section about modules:
http://www.cmake.org/cmake/help/latest/manual/cmake-developer.7.html#find-modules

Or you use an existing module as boilerplate code. Maybe you could look
at FindZLIB.cmake or any other module which uses add_library(...
IMPORTED ...)

Thanks,
Gregor
-- 

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] FindGit.cmake proposal

2015-09-14 Thread Gregor Jasny via CMake
Hello,

On 10/09/15 16:34, Daniel Wirtz wrote:
> i've now quite often encountered the need to access basic git
> information about the source tree from within cmake.
> i've attached the current FindGit.cmake module shipped with CMake
> enhanced by two functions: getGitRevision and getGitBranch.
> if you fancy the idea of having this included, feel free to include any
> part of it in future releases.

Very helpful. ARAIR functions declared inside modules should be prefixed
by the module name. So your functions should become

git_get_xyz()

Please also properly document your function
(add a .. command:: ):

http://www.cmake.org/cmake/help/v3.3/manual/cmake-developer.7.html#help

If you need assistance, I'm glad to help.

Thanks,
Gregor


-- 

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-developers] Xcode build settings and BullseyeCoverage

2015-10-10 Thread Gregor Jasny via CMake
Hello,

On 09/10/15 17:51, Roman Wüger wrote:
> I’m trying to configure and build a project with the “Xcode” generator and
> the bullseye coverage tool.
> 
> Without the bullseye coverage tool it works fine but if I want to use it I
> had to do the following workaround:
> http://www.bullseye.com/help/tool-xcode.html

IMHO this workaround is way to hackish for a paid tool. The proper thing
for Bullseye would be to provide a touchless way of intercepting all
compiler invocations like for example Fortify or Coverity provides. You
would be able to call it like this:

  $ bullseye xcodebuild

It would trace compiler invocations from xcodebuild and all childs.

> And I got the following error:
> 
>  
> 
> -- The C compiler identification is unknown
> 
> -- The CXX compiler identification is unknown
> 
> CMake Error at CMakeLists.txt:3 (project):
> 
>   No CMAKE_C_COMPILER could be found.

> Is there also a way to set generator specific things during configure time?
> 
> At the moment it is only possible with the build command: “cmake -build . --
> PLATFORM_DEVELOPER_BIN_DIR=PointToSomething” which sets the build settings
> for Xcode

I have not tested it, but maybe you could add
   -DCMAKE_C_COMPILER=$(xcrun -find clang) -DCMAKE_CXX_COMPILER=$(xcrun
-find clang++)

to the cmake command line at configuration time.

Thanks,
Gregor
-- 

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] Known issues with Xcode 6.x and CMake

2015-10-19 Thread Gregor Jasny via CMake

Hello,

On 17/10/15 18:28, Michael Jackson wrote:

Are there any known issues with Xcode 6.4 and CMake 3.3.x? I ask because in our 
project when we generate the Xcode project we end up with 2 or 3 executables 
listed in the drop down combo box. We also end up with lots of duplicate 
targets in the Xcode project. And the first time I open an Xcode project I have 
to click the “autocreate schemes” button about 30 times (I counted). We have 
127 targets in our project currently.

Has anyone seen anything like this or have any comments? This is with Xcode 6.4 
on OS X 10.10.5.


We also have projects which trigger the "Autocreate?" dialog but so far 
I did not notice the behavior you described.


Does this also happen after a complete re-configure with deleted build 
directory?


Thanks,
Gregor
--

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] Greediness of kwsys regex

2015-11-02 Thread Gregor Jasny via CMake

Hello,

Today I stumbled across funny behavior of string(REGEX REPLACE:

This one would lead to an empty match:

string(REGEX REPLACE "(.*)" "\\1Proxy.cpp" _out "IConnectionCallback")


This one would match whole "IConnectionCallback"

string(REGEX REPLACE "(.+)" "\\1Proxy.cpp" _out "IConnectionCallback")


Principle of least surprise makes me expect that both variants (* vs. +) 
either contain the full string or the minimal set: empty for *, first 
character for +.


Could someone please explain what's going on here?

Thanks,
Gregor
--

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_include_directories SYSTEM adds -isystem to Clang, but not GCC

2015-11-20 Thread Gregor Jasny via CMake

On 15/11/15 21:13, digitalriptide wrote:

Did this fix make it into 3.4? After upgrading to 3.4, GCC still seems
to lack -isystem flags on OS X. Is there anything extra I need to do?


It should be fixed for the Makefile and Ninja generators but not Xcode.
My proposed fix broke older Xcode versions so that I had to revert it 
back. I did not find time to pick this up again.


Thanks,
Gregor
--

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_include_directories SYSTEM adds -isystem to Clang, but not GCC

2015-12-09 Thread Gregor Jasny via CMake
On 08/12/15 20:21, digitalriptide wrote:
> Thank you Gregor! I have tried the Makefile generator, but on OS X -isystem
> still seems to be missing with GCC. The -isystem flag appears with Clang,
> however. I have installed CMake 3.4.1 and GCC 5.3.0, both through MacPorts.
> I can provide a sample project, if that would help.

Please file a bug report and attach your test case. That way it does not
get lost.

Thanks,
Gregor

-- 

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] Add support for cross compiling to VxWorks

2016-01-01 Thread Gregor Jasny via CMake
Hello,

please have a look at some other toolchain file like the BlackBerry one:
> https://github.com/blackberry/OGRE/blob/master/src/CMake/toolchain/blackberry.toolchain.cmake

On 30/12/15 21:38, Kuhl, Brian wrote:
> I'm trying to add support for VxWorks to CMake. 
> My current dilemma is that the Compiler ID link test is failing because my 
> library link path isn't being used, and libraries aren't being found. 
> I've set the library path in all the obvious places ( or so I thought,) what 
> setting am I missing?

I guess you should set these variables:

> # Find the Target environment 
> set( CMAKE_FIND_ROOT_PATH "${CMAKE_SOURCE_DIR}" "${BLACKBERRY_TARGET_ROOT}"  
> "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )

> # Search for libraries and includes in the ndk toolchain
> set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
> set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
> set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )

Hope that helps,
Gregor
-- 

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] Adding definitions to compile one file ?

2016-01-21 Thread Gregor Jasny via CMake

Hi,

On 21/01/16 15:14, Vania Joloboff wrote:

Hi

I want to add two definitions to compile one specific files
in addition to the global definitions.
I have the following problem. If I use

set_source_files_properties(source.cpp
PROPERTIES
COMPILE_DEFINITIONS VAR1=${MY_VAR1} VAR2=${MY_VAR2} )

then I get error message incorrect number of arguments for
set_source_files_properties

If I put
set_source_files_properties(source.cpp
PROPERTIES COMPILE_DEFINITIONS "VAR1=${MY_VAR1} VAR2=${MY_VAR2}" )


Try to delimit the two definitions by a ; to create a list.

Alternatively set property should do the trick:
https://cmake.org/cmake/help/v3.2/command/set_property.html

set_property(SOURCE source.cpp PROPERTY COMPILE_DEFINITIONS 
VAR1=${MY_VAR1} VAR2=${MY_VAR2})


With set_property you also have the option to specify APPEND or 
APPEND_STRING.


Thanks,
Gregor
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Using ccache with Xcode generator

2016-02-01 Thread Gregor Jasny via CMake
Hello,

On 01/02/16 04:52, Craig Scott wrote:
> After a bit of experimenting, it seems that getting ccache working with the
> Xcode generator isn't so straightforward. For Ninja and Unix Makefiles, the
> RULE_LAUNCH_COMPILE global property nicely gives us the behaviour we want,
> but this doesn't work for Xcode. Under the constraint that we can't modify
> the build machines (meaning we can't assume ccache symlinks have been set
> up for the clang compiler set), is there a way to coax CMake to use ccache
> with Xcode? I know I could write a wrapper script to explicitly invoke
> ccache, but this seems like something CMake should be able to do without
> having to resort to that. Any suggestions?

I guess you will have to modify the SDK within Xcode to be able to
override the compiler for the SDK.

As far as I remember Bullseye has the same problem to solve:
http://www.bullseye.com/help/tool-xcode.html
Maybe you can have a look there.

Thanks,
Gregor
-- 

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] Drop support for older Xcode versions?

2016-02-06 Thread Gregor Jasny via CMake
Hello,

I'd like to get your feedback on deprecating or dropping support for
older Xcode versions. During changes on the Xcode generator it gets
harder and harder to test against old and very old Xcode versions like 3
and 4.

Are there still users around for these versions of Xcode?

PS: I'm talking here about the Xcode generator which creates Xcode
projects, not the Makefile or Ninja generator.

Thanks,
Gregor
-- 

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] The Xcode generator and ASM_NASM support

2018-10-03 Thread Gregor Jasny via CMake

Hello,


On 10/3/18 6:08 PM, Tom Finegan via CMake wrote:

I'm trying to get rid of some local CMake scripting for building assembly
with nasm and yasm, but I'm running into a problem with the Xcode generator.

For the make and ninja generators, everything is fine-- nasm and yasm are
both working as expected.

The same is not true for Xcode. When building a target that includes
assembly files Xcode outputs the warnings like the following during its
"Check dependencies" step:

warning: no rule to process file  of type sourcecode for
architecture x86_64


If the Xcode included nasm and the default Xcode flags are good enough 
for you you might get away with:


set_source_files_properties(${yasm_file} PROPERTIES
  XCODE_EXPLICIT_FILE_TYPE "sourcecode.nasm")

Otherwise I had to create a add_custom_command for every file and 
pointed to a shell script that based on all architectures found in ARCHS 
ran yasm and in the end called lipo to create the final fat .o file.


Hope that helps,
-Gregor
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake Project Generation Speedup

2019-03-21 Thread Gregor Jasny via CMake

Hello,

On 17.11.16 17:15, Damian wrote:
We are still in the process of switching our large Make-based build to 
CMake. One of the issues we're running into is the time it takes to 
reparse and regenerate the CMake project (whether ninja, VS, or make) 
after touching any CMake file. To give you an idea, we have about 1000 
targets and that takes a good 2 min for CMake to rerun.


Are there any plans to speed this up?


CMake VisualStudio and Xcode generator generates one solution / 
xcodeproj per project() commmand. Due to the shared vcxproj files this 
is not too expensive for Visual Studio. But for Xcode it is. You can 
disable that behavior by specifying


  -DCMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY=ON

on the command line.

Thanks,
-Gregor
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Fwd: CMAKE_HOST_SYSTEM_NAME is empty

2019-04-28 Thread Gregor Jasny via CMake

Hello,

On 25.04.19 09:29, Orban, Laszlo wrote:
Please help me an issue I'm facing with CMAKE_HOST_SYSTEM_NAME on 
FreeBSD 10.3. It gives back empty string, if I read it before the 
'project(...)'.
As far as I understood, CMAKE_SYSTEM_NAME can be used only after the 
'project(...)' call, but CMAKE_HOST_SYSTEM_NAME should simply give back 

>

Additional info:

$ cmake --version
cmake version 3.4.1


In CMake 3.9.0 and later I made CMAKE_HOST_SYSTEM_NAME available in 
scritping context (which should also make it available prior to a 
project() call).


Change:
https://gitlab.kitware.com/cmake/cmake/merge_requests/499

Could you please re-try with latest CMake?

Thanks,
Gregor

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Why is the binary md5sum value different?

2019-05-17 Thread Gregor Jasny via CMake

On 17.05.19 02:53, Gelryun wrote:

I write MakefileList.txt like this.


include_directories(${COMMINC_DIR} ${DBINC_DIR} ./)
link_directories(${DBLIB_DIR} ${COMMLIB_DIR})

set(DBUSERID withdb/ufdb)
PREPROCESS_ORACLE_FILES(ACK_db.pc ${DBUSERID} "${DBINC_DIR};${COMMINC_DIR}")

set(ACK_P_SRCS
 ACK_db.c ACK_p.c)

set(ACK_C_SRCS
 ACK_db.c ACK_c.c)

add_executable(ACK_p ${ACK_P_SRCS})
add_executable(ACK_c ${ACK_C_SRCS})
...
When I install it, the md5sum value of the binaries there is different.

Why is the binary md5sum value different?


This is probably due to rpaths being re-written (see 
https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling).


You could use 
https://manpages.debian.org/testing/diffoscope/diffoscope.1.en.html to 
find out differences between two binaries.


Thanks,
Gregor
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] optional parameters in add_custom_target?

2019-05-20 Thread Gregor Jasny via CMake

Hello,

On 20.05.19 16:01, hex wrote:

What means command1 [args1...]]? Or, should this read

*add_custom_target(Name [ALL] [COMMAND command1 [args1...]]**
**   [COMMAND command2 [args2...] ...]*


I believe this is due to backward compatibility (pre 2.6) reasons so 
that you could still write:


add_custom_target(sometarget /bin/true)

Thanks,
Gregor
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake