[Cmake-commits] CMake branch, master, updated. v3.6.1-473-g99f5a32

2016-07-29 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  99f5a32c7ab6011ab826f11e4d48f018dfb758a6 (commit)
  from  db713223a85eb7140c7a6800e4de6173f3d4b326 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=99f5a32c7ab6011ab826f11e4d48f018dfb758a6
commit 99f5a32c7ab6011ab826f11e4d48f018dfb758a6
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Sat Jul 30 00:01:02 2016 -0400
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Sat Jul 30 00:01:02 2016 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 464e622..104add1 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 6)
-set(CMake_VERSION_PATCH 20160729)
+set(CMake_VERSION_PATCH 20160730)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[cmake-developers] FindProtobuf backward compatibility issue for PROTOBUF_IMPORT_DIRS

2016-07-29 Thread Konstantin Sinitsyn
After recent changes in FindProtobuf.cmake protobuf_generate_cpp doesn't
take into account PROTOBUF_IMPORT_DIRS (in upper case) anymore.

The issue was introduced by this change:
http://public.kitware.com/pipermail/cmake-developers/2016-March/027910.html
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7b09e7f

As far as I understand issue is caused by the fact that code that changes
uppercase to camelcase is executed only when we call find_package, but the
way it's sometimes used is

find_package(Protobuf REQUIRED)

set(PROTOBUF_IMPORT_DIRS ./includedir1)
protobuf_generate_cpp(SRCS1 HDRS1 PROTOS2)

set(PROTOBUF_IMPORT_DIRS ./includedir2)
protobuf_generate_cpp(SRCS2 HDRS2 PROTOS2)

set(PROTOBUF_IMPORT_DIRS ./includedir3)
protobuf_generate_cpp(SRCS3 HDRS3 PROTOS3)

But now protobuf_generate_cpp only looks at camel case variable.


Here's the patch to fix this:

diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
index c90a0a2..6c04de3 100644
--- a/Modules/FindProtobuf.cmake
+++ b/Modules/FindProtobuf.cmake
@@ -129,6 +129,10 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS)
 set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
   endif()

+  if(DEFINED PROTOBUF_IMPORT_DIRS AND NOT DEFINED Protobuf_IMPORT_DIRS)
+set(Protobuf_IMPORT_DIRS ${PROTOBUF_IMPORT_DIRS})
+  endif()
+
   if(DEFINED Protobuf_IMPORT_DIRS)
 foreach(DIR ${Protobuf_IMPORT_DIRS})
   get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
@@ -187,6 +191,10 @@ function(PROTOBUF_GENERATE_PYTHON SRCS)
 set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
   endif()

+  if(DEFINED PROTOBUF_IMPORT_DIRS AND NOT DEFINED Protobuf_IMPORT_DIRS)
+set(Protobuf_IMPORT_DIRS ${PROTOBUF_IMPORT_DIRS})
+  endif()
+
   if(DEFINED Protobuf_IMPORT_DIRS)
 foreach(DIR ${Protobuf_IMPORT_DIRS})
   get_filename_component(ABS_PATH ${DIR} ABSOLUTE)

~
Konstantin
-- 

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-developers

[cmake-developers] VS 2015, long command line in ResourceCompile invocation

2016-07-29 Thread Simon Richter
Hi,

I have a build that fails with

C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(1320,5):
warning MSB6002: Die Befehlszeile f�r die RC-Aufgabe ist zu lang. Bei
Befehlszeilen mit mehr als 32000 Zeichen treten h„ufig Fehler auf.
Versuchen Sie, die Befehlszeile zu k�rzen, indem Sie den Aufruf von RC
in mehrere Aufrufe mit weniger Parametern pro Aufruf unterteilen.
[C:\Jenkins\workspace\windows-oce-msvc-head\build\release\cpu\x86\label\windows\adm\cmake\TKOffset\TKOffset.vcxproj]

C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(1320,5):
error MSB6003: Die angegebene ausf�hrbare Datei der Aufgabe "rc.exe"
konnte nicht ausgef�hrt werden. Der Dateiname oder die Erweiterung ist
zu lang
[C:\Jenkins\workspace\windows-oce-msvc-head\build\release\cpu\x86\label\windows\adm\cmake\TKOffset\TKOffset.vcxproj]

The full build log is at

http://ci.kicad-pcb.org/job/windows-oce-msvc-head/build=release,cpu=x86,label=windows/6/consoleFull

Is there a way to make VS use a response file here?

   Simon



signature.asc
Description: OpenPGP digital signature
-- 

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-developers

[cmake-developers] [PATCH] Use full path for all source files in ninja build.

2016-07-29 Thread Chaoren Lin via cmake-developers
From: Chaoren Lin 

Relative paths are difficult for an IDE to parse the output of
a build error.
---
 Source/cmNinjaTargetGenerator.cxx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Source/cmNinjaTargetGenerator.cxx 
b/Source/cmNinjaTargetGenerator.cxx
index 855a243..7849c5e 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -529,8 +529,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
   cmSourceFile const* source, bool writeOrderDependsTargetForTarget)
 {
   std::string const language = source->GetLanguage();
-  std::string const sourceFileName =
-language == "RC" ? source->GetFullPath() : this->GetSourceFilePath(source);
+  std::string const sourceFileName = source->GetFullPath();
   std::string const objectDir =
 this->ConvertToNinjaPath(this->GeneratorTarget->GetSupportDirectory());
   std::string const objectFileName =
-- 
2.8.0.rc3.226.g39d4020

-- 

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-developers


[cmake-developers] [PATCH] Let CMake know that clang uses the GCC toolchain.

2016-07-29 Thread Chaoren Lin via cmake-developers
Clang on Windows uses the GCC toolchain, so we need to avoid using
backslashes for paths in response files.
---
 Source/cmGlobalNinjaGenerator.cxx | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Source/cmGlobalNinjaGenerator.cxx 
b/Source/cmGlobalNinjaGenerator.cxx
index 51175c7..776a44f 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -558,7 +558,12 @@ void cmGlobalNinjaGenerator::EnableLanguage(
   strcmp(mf->GetSafeDefinition("CMAKE_C_COMPILER_ID"), "GNU") == 0 ||
   strcmp(mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID"), "GNU") == 0 ||
   strcmp(mf->GetSafeDefinition("CMAKE_C_SIMULATE_ID"), "GNU") == 0 ||
-  strcmp(mf->GetSafeDefinition("CMAKE_CXX_SIMULATE_ID"), "GNU") == 0) {
+  strcmp(mf->GetSafeDefinition("CMAKE_CXX_SIMULATE_ID"), "GNU") == 0 ||
+  // Clang uses the GCC toolchain.
+  strcmp(mf->GetSafeDefinition("CMAKE_C_COMPILER_ID"), "Clang") == 0 ||
+  strcmp(mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID"), "Clang") == 0 ||
+  strcmp(mf->GetSafeDefinition("CMAKE_C_SIMULATE_ID"), "Clang") == 0 ||
+  strcmp(mf->GetSafeDefinition("CMAKE_CXX_SIMULATE_ID"), "Clang") == 0) {
 this->UsingGCCOnWindows = true;
   }
 #endif
-- 
2.8.0.rc3.226.g39d4020

-- 

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-developers


[cmake-developers] [ISSUE] Bump to 3.2 and continue...

2016-07-29 Thread Konstantin Podsvirov
Hello CMake developers,

I found bug:

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

I found it, but I do not want to deal with it ...

--
Regards,
Konstantin Podsvirov
-- 

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-developers


Re: [CMake] custom build

2016-07-29 Thread Chuck Atkins
Hi Lev,

However, the target builds only if I explicitly say 'make foo_sqlite'. So
> far
> so good. Is there any way I can make it build if I just say 'make'?
>

See the add_custom_target documentation for the ALL option,
https://cmake.org/cmake/help/v3.6/command/add_custom_target.html


And, there are more then one sqlite database to build, how can I make the
> rule to be generic? Can I say *.sql, *.sqlite?
>

The problem with using wild cards is that they won't be sensitive to make
detecting file changes.  For example, if you add a new file then CMake
won't automatically re-run because the *.sql statement hasn't changed.  You
should also be able to replace the separate custom_target and
custom_command with a single custom_target:

add_custom_target(foo ALL sqlite3 -init foo.sql foo.sqlite)

You could also wrap the call in a macro for convience:

macro(add_sqlite_target name)
  add_custom_target(${name} ALL sqlite3 -init
${CMAKE_CURRENT_SOURCE_DIR}/${name}.sql
${CMAKE_CURRENT_BINARY_DIR}/${name}.sqlite BYPRODUCTS
${CMAKE_CURRENT_BINARY_DIR}/${name}.sqlite SOURCES ${name}.sql)
endmacro()

add_sqlite_target(fooA)
add_sqlite_target(fooB)
add_sqlite_target(fooC)
add_sqlite_target(fooD)

Note the addition of BYPRODUCTS and SOURCES.  This adds additional
dependency information if you decided to either a) make other targets that
consume the database or b) have other targets that produce the source code.

- Chuck
-- 

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] CMakeRelink.dir fails on make package on Ninja

2016-07-29 Thread Konstantin Tokarev


29.07.2016, 17:36, "Gonzalo" :
> On Linux (Kubuntu 16.04) I am trying to pack my program (no cross
> compiling), and I am running into the following with the Ninja Generator
> and a custom library (that is also built in the project):
>
> [2/2] Run CPack packaging tool...
> CPack: Create package using DEB
> CPack: Install projects
> CPack: - Install project: Project
> CMake Error at
> /media/Linux/code/applications/mrViewer/BUILD/Linux-4.4.0-31-generic-64/Release/tmp/libACESclip/cmake_install.cmake:36
> (file):
>    file INSTALL cannot find
> "/media/Linux/code/applications/mrViewer/BUILD/Linux-4.4.0-31-generic-64/Release/tmp/libACESclip/CMakeFiles/CMakeRelink.dir/libACESclip.so.0.2.6".
> Call Stack (most recent call first):
> /media/Linux/code/applications/mrViewer/BUILD/Linux-4.4.0-31-generic-64/Release/tmp/cmake_install.cmake:37
> (include)
>
> CPack Error: Error when generating package: Project
> FAILED: cd
> /media/Linux/code/applications/mrViewer/BUILD/Linux-4.4.0-31-generic-64/Release/tmp
> && /usr/local/bin/cpack --config ./CPackConfig.cmake
> ninja: build stopped: subcommand failed.
>
> When run with -G 'Unix Makefiles' the packaging works. It is not a
> permissions problem.
>
> I am using the attached "mk" bash script to run the compilation.

I'm getting similar error with Ninja generator on a different project [1].
I'm using cmake 2.8.12.2 as shipped by Ubuntu 14.04.

Problem does not reproduce always, I haven't investigated yet if it is purely
random or reproduces in some particular conditions.

[1] https://github.com/annulen/webkit

>
> --
> Gonzalo Garramuño
> ggarr...@gmail.com
>
> ,--
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake

-- 
Regards,
Konstantin
-- 

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] CMakeRelink.dir fails on make package on Ninja

2016-07-29 Thread Gonzalo
On Linux (Kubuntu 16.04) I am trying to pack my program (no cross 
compiling), and I am running into the following with the Ninja Generator 
and a custom library (that is also built in the project):


[2/2] Run CPack packaging tool...
CPack: Create package using DEB
CPack: Install projects
CPack: - Install project: Project
CMake Error at 
/media/Linux/code/applications/mrViewer/BUILD/Linux-4.4.0-31-generic-64/Release/tmp/libACESclip/cmake_install.cmake:36 
(file):

  file INSTALL cannot find
"/media/Linux/code/applications/mrViewer/BUILD/Linux-4.4.0-31-generic-64/Release/tmp/libACESclip/CMakeFiles/CMakeRelink.dir/libACESclip.so.0.2.6".
Call Stack (most recent call first):
/media/Linux/code/applications/mrViewer/BUILD/Linux-4.4.0-31-generic-64/Release/tmp/cmake_install.cmake:37 
(include)



CPack Error: Error when generating package: Project
FAILED: cd 
/media/Linux/code/applications/mrViewer/BUILD/Linux-4.4.0-31-generic-64/Release/tmp 
&& /usr/local/bin/cpack --config ./CPackConfig.cmake

ninja: build stopped: subcommand failed.

When run with -G 'Unix Makefiles' the packaging works.  It is not a 
permissions problem.


I am using the attached "mk" bash script to run the compilation.



--
Gonzalo Garramuño
ggarr...@gmail.com

#!/bin/bash --norc


#
# Determine CPU architecture
#
KERNEL=`uname -s`

if [[ $KERNEL == CYGWIN* ]]; then
KERNEL=Windows
RELEASE=(`cmd /c 'ver'`)
RELEASE=${RELEASE[3]%.[0-9]*}
elif [[ $KERNEL == MINGW* ]]; then
RELEASE=(`cmd /c 'ver'`)
#RELEASE=${RELEASE[3]%.[0-9]*}
RELEASE=${RELEASE[3]/]/}
KERNEL=Windows
else
RELEASE=`uname -r`
fi


if [[ "$RELEASE" == "" ]]; then
$RELEASE=`cmd.exe /c 'ver'`
echo $RELEASE
echo "Could not determine OS version"
exit 1
fi

CMAKE_OPTS=${CMAKE_OPTS=""}

export CMAKE_NATIVE_ARCH=32
export CMAKE_BUILD_TYPE=Release
export OS_32_BITS=1
export OS_64_BITS=
export LDFLAGS=
export CXXFLAGS=

if [ $KERNEL == 'Windows' ]; then
arch=`wmic OS get OSArchitecture`
if [[ $arch == *64* ]]; then
CMAKE_NATIVE_ARCH=64
export OS_64_BITS=1
fi
else
arch=`uname -a`
fi

if [[ $arch == *x86_64* ]]; then
CMAKE_NATIVE_ARCH=64
export OS_64_BITS=1
else
if [[ $arch == *ia64* ]]; then
CMAKE_NATIVE_ARCH=64
export OS_64_BITS=1
unset  OS_32_BITS
fi
fi


export CMAKE_BUILD_ARCH=$CMAKE_NATIVE_ARCH

OS=$KERNEL-$RELEASE


usage()
{
cat <  use a different cmake generator (default: Ninja)

  debug|release|reldebug|small
  debug- build a debug build
  release  - build a release build (default)
  reldebug - build a release build with debug information
  small- build a small release build

  both|32|64
 Builds both 32/64 bit versions, 32-bit only, 
 64-bit only (default: $CMAKE_BUILD_ARCH)

  cache- Cleans all CMakeCache.txt files

  swig - Cleans all swig files

  clean- Cleans BUILD/$OS-$CMAKE_BUILD_ARCH/$CMAKE_BUILD_TYPE

  cmake- Runs cmake only.

EOF
exit 1
}

clean_cache()
{
if [ $CMAKE_BUILD_ARCH == 'Both' ]; then
CMAKE_BUILD_ARCH=32
clean_cache
CMAKE_BUILD_ARCH=64
clean_cache
CMAKE_BUILD_ARCH=Both
return
fi

builddir=BUILD/$OS-$CMAKE_BUILD_ARCH/$CMAKE_BUILD_TYPE
if [ ! -d $builddir ]; then
return
fi
echo
echo "Removing old cmake caches $builddir..."
echo
# Remove cache files
find $builddir -name CMakeCache.txt -exec rm {} \;
# Remove makefiles
find $builddir -name Makefile -exec rm {} \;
}


clean_swig() 
{
if [ $CMAKE_BUILD_ARCH == 'Both' ]; then
CMAKE_BUILD_ARCH=32
clean_swig
CMAKE_BUILD_ARCH=64
clean_swig
CMAKE_BUILD_ARCH=Both
return
fi

# Remove swig wrappers
builddir=BUILD/$OS-$CMAKE_BUILD_ARCH/$CMAKE_BUILD_TYPE
echo
echo "Removing old swig wrappers $builddir..."
echo
find $builddir -name '*_wrap.*' -exec rm {} \;
}

#
# Parse command-line options
#
clean=0
cache=0


if [[ $OS == Windows* ]]; then
cmake_generator=Ninja
#cmake_generator="NMake Makefiles"
else
cmake_generator=Ninja
fi

opts=''
RUN_MAKE=1
while [ $# -gt 0 ]; do
case $1 in
64)
shift
CMAKE_BUILD_ARCH=64
;;
32)
shift
CMAKE_BUILD_ARCH=32
;;
both)
shift
CMAKE_BUILD_ARCH='Both'
;;
cache)
shift
cache=1
;;
clean)
if [ -r CMakeLists.txt ]; then
shift
if [ -d BUILD ]; then
clean=1
fi
else
break
fi
;;
cmake)
shift
RUN_MAKE=0
;;
debug)
shift
export CMAKE_BUILD_TYPE=Debug
;;
release)
shift
export CMAKE_BUILD_TYPE=Release

Re: [CMake] custom build

2016-07-29 Thread Lev
On Fri, 29 Jul 2016 08:50:13 -0400
Guillaume Dumont  wrote:

> add_custom_command(OUTPUT foo.sqlite
> MAIN_DEPENDENCY
> foo.sql COMMAND "cat foo.sql |
> sqlite3 -batch foo.sqlite")
> 
> add_custom_target(foo_sqlite
> DEPENDS foo.sqlite)

Thanks, that helps.

It works somehow. Minor issue, that the double quotes is not necessary.

However, the target builds only if I explicitly say 'make foo_sqlite'. So far
so good. Is there any way I can make it build if I just say 'make'?

And, there are more then one sqlite database to build, how can I make the
rule to be generic? Can I say *.sql, *.sqlite?

Thanks,
Levente

-- 
73 de HA5OGL
Op.: Levente
-- 

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] custom build

2016-07-29 Thread Lev
On Fri, 29 Jul 2016 08:13:08 -0400
"Elizabeth A. Fischer"  wrote:

> Did you run "cmake" first before "make"?

Yes... thanks.

> Have you considered just using "make" instead?  The big benefits of
> CMake are:
>  1. Can find link dependencies, which might be in different places on
> different systems.
>  2. Adjust for the different command line options required by
> different compilers.
> 
> So far, I don't see either of those issues in your problem.  I would
> consider just using plain "make" here.

Yes, I considered that solution. Then I have to make the upper level
CMakeLists.txt/build system to run "make" in that directory, and
somehow make my global variables visible in that Makefile. Seems to be
harder than hacking the CMakeLists.txt.

And, I want to have a consistent build system.

Lev

-- 
73 de HA5OGL
Op.: Levente
-- 

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] custom build

2016-07-29 Thread Guillaume Dumont
As per CMake documentation your custom target should depend on the output
of the custom command. So it should look more like this:

add_custom_command(OUTPUT foo.sqlite
MAIN_DEPENDENCY foo.sql
COMMAND "cat foo.sql |
sqlite3 -batch foo.sqlite")

add_custom_target(foo_sqlite
DEPENDS foo.sqlite)

HTH

Guillaume

On Fri, Jul 29, 2016 at 6:45 AM, Lev  wrote:

> Dear cmake users,
>
>
> Could you please help me how to make cmake to produce a generic build
> system?
>
> What I want to do is running simple shell command on files. Namely, I want
> to
> generate sqlite database from a sql file. It all works from the command
> line,
> I just can't figure out how to make cmake to do the right thing.
>
> I started to do something like this:
>
> add_custom_target(foo.sqlite foo.sql)
>
> add_custom_command(OUTPUT foo.sqlite
> MAIN_DEPENDENCY foo.sql
> COMMAND "cat foo.sql |
> sqlite3 -batch foo.sqlite")
>
> but it doesn't do anything when I issue "make".
>
> Any help appreciated.
>
> Levente
>
> --
> 73 de HA5OGL
> Op.: Levente
> --
>
> 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
>



-- 
Guillaume Dumont
=
dumont.guilla...@gmail.com
-- 

Powered by www.kitware.com

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

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

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

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

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

[CMake] custom build

2016-07-29 Thread Lev
Dear cmake users,


Could you please help me how to make cmake to produce a generic build system?

What I want to do is running simple shell command on files. Namely, I want to
generate sqlite database from a sql file. It all works from the command line,
I just can't figure out how to make cmake to do the right thing.

I started to do something like this:

add_custom_target(foo.sqlite foo.sql)

add_custom_command(OUTPUT foo.sqlite
MAIN_DEPENDENCY foo.sql
COMMAND "cat foo.sql | sqlite3 
-batch foo.sqlite")

but it doesn't do anything when I issue "make".

Any help appreciated. 

Levente

-- 
73 de HA5OGL
Op.: Levente
-- 

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-developers] cmake -E capabilities [attempt 2]

2016-07-29 Thread Tobias Hunger
Hi Stephen,

thanks for taking the time to do such a thorough review!

I pushed an update that takes most of the feedback into account. Still at:

https://github.com/hunger/CMake/commits/cmake-capabilities

On Wed, Jul 27, 2016 at 1:11 AM, Stephen Kelly  wrote:
> Tobias Hunger wrote:
>
>> Did anyone find some time for a review yet?
>
> Hi Tobias,
>
> I had a look through this this evening. Thanks for working on this. The
> commit adding the functionality at the end looks much better after the extra
> generator refactoring.
>
> Here are some review notes:
>
> * That commit has a cmDefinitions include though that should be removed.

Gone.

> * There are also some methods that should be const

Added const to some of them:-) Hope I caught all.

> * and a whitespace change that should be squashed into the commit that
> introduces it

I used Utilities/Scripts/clang-format.bash to do the formatting, so
that should not be an issue. I just reran that on all commits. Maybe I
forgot it in a commit or something before.

> * The pretty-print flag should be removed. Aside from being a boolean trap,
> it creates a interface segregation principle violation. See eg

Removed, even though I find it really useful when testing cmake on
mac/windows. I do have all the small helper tools on Linux, but
usually not on windows/Mac.

> * The CMAKE_BUILD_WITH_CMAKE macro should be in cmcmd.cxx wrapping the
> capabilities handling:
>
> #if defined(CMAKE_BUILD_WITH_CMAKE)
> else if (args[1] == "capabilities") {
>   cmake cm;
>   std::cout << cm.ReportCapabilities();
>   return 0;
> }
> #endif

Why?

> That define should not be used in ReportCapabilities.

That define seems necessary to keep the bootstrap test running.

> * Splitting the 'CMake: Refactor ExtraGenerator registration' commit into
> multiple commits would make it more reviewable, and more bisectable in the
> future.

Sorry, this is what you will get from me: I have to start at some
place and meddle through till things work again. I have to back-track
often.

Basically I need to get some functionality implemented completely and
then test that. Only afterwards can I spend time on making the patches
pretty.

If that is not acceptable, then please feel free to do necessary
changes yourself.

> As it is, it is doing many different things, none of which are mentioned in
> the commit message, and some of which it probably shouldn't be doing.
>
> For example renaming GetExtraGeneratorName to
> GetExternalMakefileProjectGeneratorName is probably not needed. If you
> really want to do it, then it should be in its own commit with its own
> commit message which justifies the change. As it is, it adds noise to the
> big commit and makes it harder to review. Minimal is always better with
> commits which do refactoring like that.

I undid that change. That is one of the things that I originally
removed and then realized last minute that it is needed somehow. So I
added it, not realizing that I had removed similar functionality
earlier.

> A general good rule of thumb (which helps reviews, and makes things
> bisectable in the future) is to do one thing per commit.

I agree that this is the ideal we all should all strive for, but you
are not going to get that from me anytime soon. At least not in the
cmake codebase.

Best Regards,
Tobias
-- 

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-developers


[CMake] add_subdirectory with EXCLUDE_FROM_ALL and cmake --build (Visual Studio)

2016-07-29 Thread Mueller-Roemer, Johannes Sebastian
I just noticed the following issue:

If I do an add_subdirectory([...] EXCLUDE_FROM_ALL) and generate a VS (2015) 
solution, projects added in that subdirectory generate an entirely separate 
solution (and therefore do not appear in the main solution at all) in the 
corresponding binary dir subfolder. This causes a cmake -build 
${CMAKE_BINARY_DIR} to fail, unlike other generators. Is this intended 
behavior? It seems odd not to have the targets in the same solution at all

Johannes Mueller-Roemer

Fraunhofer-Institut für Graphische Datenverarbeitung IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-606  |  Fax +49 6151 155-139
johannes.mueller-roe...@igd.fraunhofer.de
 | www.igd.fraunhofer.de

-- 

Powered by www.kitware.com

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

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

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

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

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