Re: [cmake-developers] ninja generator does NOT use absolute paths at rules?

2019-08-17 Thread Claus Klein
There is a workaround about this issue:

Create the binary_dir (build) outside the source_dir!
Than every path to source files are absolute ;-)

i.e.:
clausklein$ make -n check
mkdir -p ../.build-samples-Debug
cd ../.build-samples-Debug && cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug 
-DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON 
-DCMAKE_CXX_COMPILER=/opt/local/bin/clang++ 
/Users/clausklein/Workspace/cpp/samples
ln -sf 
/Users/clausklein/Workspace/cpp/samples/../.build-samples-Debug/compile_commands.json
 .
run-clang-tidy.py -header-filter='/Users/clausklein/Workspace/cpp/samples/.*' 
-checks='-*,misc-*,boost-*,cert-*,-misc-unused-parameters' | tee 
run-clang-tidy.log 2>&1
egrep '\b(warning|error):' run-clang-tidy.log | perl -pe 's/(^.*) 
(warning|error):/\2/' | sort -u
clausklein$ 


-Claus

> Am 23.07.2019 um 13:03 schrieb Brad King :
> 
> On 7/22/19 4:47 PM, Claus Klein wrote:
>> Than I realized , the ninja.rules files contains NO absolute paths
>> to target source and header files.
> 
> Historically the Ninja ecosystem encourages use of relative paths.
> There is an issue for this in CMake:
> 
>  https://gitlab.kitware.com/cmake/cmake/issues/13894#note_233789
> 
> and fixing it correctly depends on fixing another issue in Ninja:
> 
>  https://github.com/ninja-build/ninja/issues/1251
> 
> -Brad

-- 

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


[cmake-developers] ninja generator does NOT use absolute paths at rules?

2019-07-22 Thread Claus Klein
Hi,

I found it strange, the clang-tidy warnings contains only relative paths to 
header files?

Than I realized , the ninja.rules files contains NO absolute paths to target 
source and header files.

Is this a BUG or a desired feature?

// regards
Claus

--- compile_commands.json.make.gen  2019-07-22 22:21:44.0 +0200
+++ compile_commands.json.ninja.gen 2019-07-22 22:19:23.0 +0200
@@ -1,82 +1,97 @@
 [
 {
   "directory": "/Users/clausklein/Workspace/cpp/spdlog/build",
-  "command": "/opt/local/bin/clang++  -DSPDLOG_COMPILED_LIB 
-I/Users/clausklein/Workspace/cpp/spdlog/include  -O3 -DNDEBUG   -Wall -Wextra 
-Wconversion -pedantic -Werror -Wfatal-errors -std=c++11 -o 
CMakeFiles/spdlog.dir/src/spdlog.cpp.o -c 
/Users/clausklein/Workspace/cpp/spdlog/src/spdlog.cpp",
+  "command": "/opt/local/bin/clang++  -DSPDLOG_COMPILED_LIB -I../include  -O3 
-DNDEBUG   -Wall -Wextra -Wconversion -pedantic -Werror -Wfatal-errors 
-std=c++11 -o CMakeFiles/spdlog.dir/src/spdlog.cpp.o -c 
/Users/clausklein/Workspace/cpp/spdlog/src/spdlog.cpp",
   "file": "/Users/clausklein/Workspace/cpp/spdlog/src/spdlog.cpp"
 },
+

Claus-MBP:spdlog clausklein$ make setup
mkdir -p build
ln -sf scripts/.clang-format .
ln -sf scripts/.clang-tidy .
cd build && cmake -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON 
-DCMAKE_CXX_COMPILER=/opt/local/bin/clang++ ..
-- use ccache
-- The CXX compiler identification is Clang 7.0.1
-- Check for working CXX compiler: /opt/local/bin/clang++
-- Check for working CXX compiler: /opt/local/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build spdlog: 1.4.0
-- spdlog include path: /Users/clausklein/Workspace/cpp/spdlog/include
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Build type: Release
-- Generating examples
-- Generating tests
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'libsystemd'
--   No package 'libsystemd' found
-- Generating install
-- Configuring done
-- Generating done
-- Build files have been written to: 
/Users/clausklein/Workspace/cpp/spdlog/build
touch .configure
ln -sf /Users/clausklein/Workspace/cpp/spdlog/build/compile_commands.json .

Claus-MBP:spdlog clausklein$ grep -w include build/build.ninja | sort -u
  INCLUDES = -I../include
include rules.ninja
Claus-MBP:spdlog clausklein$ cmake --version
cmake version 3.14.5

CMake suite maintained and supported by Kitware (kitware.com/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:
https://cmake.org/mailman/listinfo/cmake-developers


[cmake-developers] How to get cmake to install pdb files for targets too?

2018-03-20 Thread Claus Klein

Hi, I am wondering why pdb file are not installed with a library target in MS 
VS2017 generated projects when building the Debug config variant?

Is this relay necessary:

install(FILES $ DESTINATION bin OPTIONAL)
see too 
https://stackoverflow.com/questions/40860435/how-to-get-cmake-to-install-pdb-files-for-targets
 



Why ist that install command not enough:

install(TARGETS example
EXPORT ExampleTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)


With regards
Claus-- 

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


[cmake-developers] Platform/MINGW64_NT-6.1: can't bootstrap cmake

2018-03-05 Thread Claus Klein
Hi,
I have problems to build cmake  an msys2.
It can be found at http://www.msys2.org.

With regards
Claus

Avoid ctest truncation of output: CTEST_FULL_OUTPUT

=== MAIN VARIABLES

CMAKE_STATIC_LIBRARY_PREFIX == "lib"
CMAKE_STATIC_LIBRARY_SUFFIX == ".a"
CMAKE_SHARED_LIBRARY_PREFIX == "lib"
CMAKE_SHARED_LIBRARY_SUFFIX == ".so"
CMAKE_SHARED_MODULE_PREFIX == "lib"
CMAKE_SHARED_MODULE_SUFFIX == ".so"


CMAKE_DL_LIBS == "dl"
CMAKE_LIBRARY_PATH_FLAG == "-L"
CMAKE_LINK_LIBRARY_FLAG == "-l"
CMAKE_SKIP_RPATH == "NO"
CMAKE_SYSTEM_INFO_FILE == "Platform/MINGW64_NT-6.1"
CMAKE_SYSTEM_NAME == "MINGW64_NT-6.1"
CMAKE_SYSTEM == "MINGW64_NT-6.1-2.9.0(0.318/5/3)"
CMAKE_CXX_COMPILER == "/usr/bin/CC.exe"
CMAKE_C_COMPILER == "/usr/bin/cc.exe"
CMAKE_COMPILER_IS_GNUCC == "1"
CMAKE_COMPILER_IS_GNUCXX == "1"

// C shared library flag
CMAKE_SHARED_LIBRARY_C_FLAGS == "-fPIC"
CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS == "-shared"
CMAKE_SHARED_LIBRARY_LINK_FLAGS == ""
CMAKE_SHARED_LIBRARY_RUNTIME_FLAG == ""
CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP == ""
CMAKE_SHARED_LIBRARY_LINK_STATIC_C_FLAGS == ""
CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_C_FLAGS == ""

// C shared module flags
CMAKE_SHARED_MODULE_C_FLAGS  == "-fPIC"
CMAKE_SHARED_MODULE_CREATE_C_FLAGS == "-shared"
CMAKE_SHARED_MODULE_LINK_STATIC_C_FLAGS == ""
CMAKE_SHARED_MODULE_LINK_DYNAMIC_C_FLAGS == ""

// C exe flags
CMAKE_EXE_LINK_STATIC_C_FLAGS == ""
CMAKE_EXE_LINK_DYNAMIC_C_FLAGS == ""

// CXX shared library flags
CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS == "-shared"
CMAKE_SHARED_LIBRARY_CXX_FLAGS == "-fPIC"
CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS == ""
CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG == ""
CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP == ""
CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS == ""
CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS == ""

// CXX shared module flags
CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS == "-shared"
CMAKE_SHARED_MODULE_CXX_FLAGS == "-fPIC"
CMAKE_SHARED_MODULE_LINK_STATIC_CXX_FLAGS == ""
CMAKE_SHARED_MODULE_LINK_DYNAMIC_CXX_FLAGS == ""

// CXX exe flags
CMAKE_EXE_LINK_STATIC_CXX_FLAGS == ""
CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS == ""

CMAKE_USER_MAKE_RULES_OVERRIDE == ""
CMAKE_VERBOSE_MAKEFILE == "FALSE"
CMAKE_BUILD_TYPE == ""
CMAKE_CXX_FLAGS == ""
CMAKE_CXX_FLAGS_DEBUG == "-g"
CMAKE_CXX_FLAGS_MINSIZEREL == "-Os -DNDEBUG"
CMAKE_CXX_FLAGS_RELEASE == "-O3 -DNDEBUG"
CMAKE_CXX_FLAGS_RELWITHDEBINFO == "-O2 -g -DNDEBUG"

CMAKE_C_FLAGS == ""
CMAKE_C_FLAGS_DEBUG == "-g"
CMAKE_C_FLAGS_MINSIZEREL == "-Os -DNDEBUG"
CMAKE_C_FLAGS_RELEASE == "-O3 -DNDEBUG"
CMAKE_C_FLAGS_RELWITHDEBINFO == "-O2 -g -DNDEBUG"

// build rules
CMAKE_CXX_CREATE_SHARED_LIBRARY == " 
   
  -o 
  "
CMAKE_CXX_CREATE_SHARED_MODULE == " 
   
  -o 
  "
CMAKE_C_CREATE_SHARED_LIBRARY == " 
   
  -o  
 "
CMAKE_C_CREATE_SHARED_MODULE == " 
   
  -o  
 "
CMAKE_CXX_CREATE_STATIC_LIBRARY == ""
CMAKE_C_CREATE_STATIC_LIBRARY == ""
CMAKE_CXX_COMPILE_OBJECT == " 
-o  -c "
CMAKE_C_COMPILE_OBJECT == "-o 
   -c "
CMAKE_C_LINK_EXECUTABLE == "   
   -o  "
CMAKE_CXX_LINK_EXECUTABLE == "   
-o  "

=
=== VARIABLES
=
CMAKE_AR "/usr/bin/ar.exe"
CMAKE_AR "/usr/bin/ar.exe"
CMAKE_BASE_NAME "g++"
CMAKE_BINARY_DIR "/e/workspace/tps/__cmake_systeminformation"
CMAKE_BUILD_TOOL "/usr/bin/make.exe"
CMAKE_BUILD_TYPE ""
CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert"
CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11"
CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11"
CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes"
CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90"
CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90"
CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros"
CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99"
CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99"
CMAKE_CFG_INTDIR "."
CMAKE_COLOR_MAKEFILE "ON"
CMAKE_COMMAND "/usr/bin/cmake.exe"
CMAKE_COMPILER_IS_GNUCC "1"
CMAKE_COMPILER_IS_GNUCXX "1"
CMAKE_COMPILER_IS_MSYS "1"
CMAKE_CPACK_COMMAND "/usr/bin/cpack.exe"
CMAKE_CROSSCOMPILING "FALSE"
CMAKE_CTEST_COMMAND "/usr/bin/ctest.exe"
CMAKE_CURRENT_BINARY_DIR "/e/workspace/tps/__cmake_systeminformation"
CMAKE_CURRENT_LIST_DIR "/e/workspace/tps/__cmake_systeminformation"
CMAKE_CURRENT_LIST_FILE 
"/e/workspace/tps/__cmake_systeminformation/CMakeLists.txt"
CMAKE_CURRENT_SOURCE_DIR "/e/workspace/tps/__cmake_systeminformation"
CMAKE_CXX11_COMPILE_FEATURES 

Re: [cmake-developers] why includes the Ninja decency contents sytemheader too?

2018-02-06 Thread Claus Klein
Yes, it should be configurable via one option flag.

The cmake user can control it but it is not well documented and different to 
configure depending on compiler and generator used:

#for ninja generator:
set(CMAKE_DEPFILE_FLAGS_CXX "-MMD -MT  -MF " CACHE STRING 
"dependency flag" FORCE)

# for makefile generator:
option(CMAKE_DEPENDS_IN_PROJECT_ONLY „do NOT use system header dependencies“ ON)

###

But I am still wondering why different default behaviors in Nina and Makefile 
generators?

Claus

> Am 06.02.2018 um 13:22 schrieb Brad King :
> 
> Some people want system headers checked for $reasons, and others
> don't want them checked for $other_reasons.  The only way to satisfy
> both groups is to make it an option.
> 
> The internal `CMAKE_DEPFILE_FLAGS_${lang}` table of flags used for this
> would need to be extended with `CMAKE_DEPFILE_NOSYSTEM_FLAGS_${lang}`
> alternatives.  Some option would need to be introduced to choose.
> 
> -Brad

-- 

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


[cmake-developers] why includes the Ninja decency contents sytemheader too?

2018-02-06 Thread Claus Klein
I’m wondering about the different dependency strategies between ‚Unix Makefiles’ and Nina generator.IMHO: This make ninja slower without much user benefit!-Clausfind . -name depend.make | xargs cat# CMAKE generated file: DO NOT EDIT!# Generated by "Unix Makefiles" Generator, CMake Version 3.10CMakeFiles/BindToDevice.dir/BindToDevice.c.o: ../BindToDevice.c# CMAKE generated file: DO NOT EDIT!# Generated by "Unix Makefiles" Generator, CMake Version 3.10CMakeFiles/InnerClassIdiom.dir/InnerClassIdiom.cpp.o: ../InnerClassIdiom.cpp# CMAKE generated file: DO NOT EDIT!# Generated by "Unix Makefiles" Generator, CMake Version 3.10CMakeFiles/testFileAppend.dir/tests/testFileAppend.c.o: ../tests/testFileAppend.c#Claus-MBP:build clausklein$ ninja -t depsCMakeFiles/testFileAppend.dir/tests/testFileAppend.c.o: #deps 98, deps mtime 1517904010 (VALID)    ../tests/testFileAppend.c    /usr/include/sys/stat.h    /usr/include/sys/_types.h    /usr/include/sys/cdefs.h    /usr/include/sys/_symbol_aliasing.h    /usr/include/sys/_posix_availability.h    /usr/include/machine/_types.h    /usr/include/i386/_types.h    /usr/include/sys/_pthread/_pthread_types.h    /usr/include/Availability.h    /usr/include/AvailabilityInternal.h# ….quote from ninja list:On Thu, Nov 30, 2017 at 12:09:55 -0800, Evan Martin wrote:That CMake change is interesting.  While it's true that it is more correctto check the state of the system headers, it's also true that to be fullycorrect here you need a completely hermetic build.  If CMake doesn't alsocheck the compiler binary as well as any shared libraries that the compilerbinary uses, then I think using this extra flag only serves to make ninjaslower without much user benefit.The mentioned issue is here:   https://cmake.org/Bug/view.php?id=14914It was done for feature parity with the Makefiles generators. They useCMake's scanning logic rather than exact dependencies like Ninja (forvarious reasons).--Ben

dependencies.log
Description: Binary data

-- 

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


Re: [cmake-developers] Cannot control the name of dependfile set in Ninja generator

2018-01-27 Thread Claus Klein
Hi Chris,

done, but:
commit 4f48fef4 

 is not allowed because the following files are not formatted according to the 
'clang-format-3.8' check: Source/cmNinjaTargetGenerator.cxx. Post a comment 
ending in the line Do: reformat to rewrite the MR source branch automatically.

I have no clang-format?

Only xcode installed.

Claus

> Am 27.01.2018 um 22:23 schrieb Christian Pfeiffer :
> 
> That GitHub repository is a read-only mirror of the GitLab, where all the 
> work takes place:https://gitlab.kitware.com/cmake/cmake 
>  . Please 
> seehttps://gitlab.kitware.com/cmake/cmake/blob/master/CONTRIBUTING.rst 
>  on how 
> to submit merge requests.
>  
> Chris

-- 

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


Re: [cmake-developers] Cannot control the name of dependfile set in Ninja generator

2018-01-27 Thread Claus Klein
Hi Brad,

I have prepared a patch which works vor cpp files fine.

But I have no idea why not for c files?

see https://github.com/Kitware/CMake/pull/318

Claus

> Am 19.01.2018 um 15:07 schrieb Brad King :
> 
> * Extend the Ninja generator with settings to tell it about the above
>  names.

-- 

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


[cmake-developers] Cannot control the name of dependfile set in Ninja generator

2018-01-18 Thread Claus Klein
Hi all,
I have problems to send and see this mail at the list? Please can you check 
what goes wrong?
There was a mail with this issue a view years ago, but without a real result:
https://cmake.org/pipermail/cmake/2014-October/058963.html 
<https://cmake.org/pipermail/cmake/2014-October/058963.html>
quote:
-
Ninja generator sets the name to objectpath.d
cmGlobalNinjaGenerator::EncodeDepfileSpace(objectFileName + ".d");

WindRiver sets the dep file name to objectDir/SourceName.d, so the ".obj" in 
"DEP_FILE = path/BaseName.c.obj.d" must be removed
Armcc just uses base name in the same directory as the command runs, 
"BaseName.d".  -depend_dir= can be used to control the directory for C but not 
asm.

The workaround is to patch the generated build.ninja

A proper solution is using new variables similar to above. (Just examples, not 
figured out  etc)

WindRiver (not added to CMake):
SET (CMAKE___DEPFILE_PATTERN 
/.d )

Armcc (RVDS patch exists for CMake):
SET (CMAKE_DEPFILE_FLAGS_C -depend_dir= --depend_format=unix)
SET (CMAKE_C_ARMCC_DEPFILE_PATTERN /.d )
SET (CMAKE_DEPFILE_FLAGS_ASM --depend_format=unix)
SET (CMAKE_ASM_ARMCC_DEPFILE_PATTERN .d )

Note:  is replaced in CMAKE_C_ARMCC_DEPFILE_PATTERN (but adding a 
semicolon), but not  (as that is evaluated after FLAGS/DEFINES) so 
it is a little more than just add new variables.
The workaround for armcc could therefore not use CMAKE_DEPFILE_FLAGS_C, the 
-depend_dir flag was added to normal FLAGS
———-

I have the same problem with a GHS compiler. We can’t control the name of the 
generated *.d file while compile step.
My questions are:

1.) Is ist possible to change the object or/and the dependency file name 
generated for ninja?

2.) Why generates cmake the objectname as sourcefilename.{c,cpp}.obj?

I would expect to build the name as GNU make do, something like that:
DEP:=$(SRC:.cpp=.d)
OBJ:=$(SRC:.cpp=.obj)

Claus Klein




-- 

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


[cmake-developers] Cannot control the name of dependfile set in Ninja generator

2018-01-18 Thread Claus Klein
Hi all,
there was a mail with this issues a view years ago, but without a result:
https://cmake.org/pipermail/cmake/2014-October/058963.html 
<https://cmake.org/pipermail/cmake/2014-October/058963.html>
quote:
-
Ninja generator sets the name to objectpath.d
cmGlobalNinjaGenerator::EncodeDepfileSpace(objectFileName + ".d");

WindRiver sets the dep file name to objectDir/SourceName.d, so the ".obj" in 
"DEP_FILE = path/BaseName.c.obj.d" must be removed
Armcc just uses base name in the same directory as the command runs, 
"BaseName.d".  -depend_dir= can be used to control the directory for C but not 
asm.

The workaround is to patch the generated build.ninja

A proper solution is using new variables similar to above. (Just examples, not 
figured out  etc)

WindRiver (not added to CMake):
SET (CMAKE___DEPFILE_PATTERN 
/.d )

Armcc (RVDS patch exists for CMake):
SET (CMAKE_DEPFILE_FLAGS_C -depend_dir= --depend_format=unix)
SET (CMAKE_C_ARMCC_DEPFILE_PATTERN /.d )
SET (CMAKE_DEPFILE_FLAGS_ASM --depend_format=unix)
SET (CMAKE_ASM_ARMCC_DEPFILE_PATTERN .d )

Note:  is replaced in CMAKE_C_ARMCC_DEPFILE_PATTERN (but adding a 
semicolon), but not  (as that is evaluated after FLAGS/DEFINES) so 
it is a little more than just add new variables.
The workaround for armcc could therefore not use CMAKE_DEPFILE_FLAGS_C, the 
-depend_dir flag was added to normal FLAGS
———-

I have the same problem with a GHS compiler. We can’t control the name of the 
generated *.d file while compile step.
My questions are:

1.) Is ist possible to change the object or/and the dependency file name 
generated for ninja?

2.) Why generates cmake the objectname as sourcefilename.{c,cpp}.obj?

I would expect to build the name as GNU make do, something like that:
DEP:=$(SRC:.cpp=.d)
OBJ:=$(SRC:.cpp=.obj)

Claus Klein




-- 

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


[cmake-developers] Cannot control the name of dependfile set in Ninja generator

2018-01-17 Thread Claus Klein
Hi all,
there was mail with this issues a view years ago:
https://cmake.org/pipermail/cmake/2014-October/058963.html
quote:
-
Ninja generator sets the name to objectpath.d
cmGlobalNinjaGenerator::EncodeDepfileSpace(objectFileName + ".d");

WindRiver sets the dep file name to objectDir/SourceName.d, so the ".obj" in 
"DEP_FILE = path/BaseName.c.obj.d" must be removed
Armcc just uses base name in the same directory as the command runs, 
"BaseName.d".  -depend_dir= can be used to control the directory for C but not 
asm.

The workaround is to patch the generated build.ninja

A proper solution is using new variables similar to above. (Just examples, not 
figured out  etc)

WindRiver (not added to CMake):
SET (CMAKE___DEPFILE_PATTERN 
/.d )

Armcc (RVDS patch exists for CMake):
SET (CMAKE_DEPFILE_FLAGS_C -depend_dir= --depend_format=unix)
SET (CMAKE_C_ARMCC_DEPFILE_PATTERN /.d )
SET (CMAKE_DEPFILE_FLAGS_ASM --depend_format=unix)
SET (CMAKE_ASM_ARMCC_DEPFILE_PATTERN .d )

Note:  is replaced in CMAKE_C_ARMCC_DEPFILE_PATTERN (but adding a 
semicolon), but not  (as that is evaluated after FLAGS/DEFINES) so 
it is a little more than just add new variables.
The workaround for armcc could therefore not use CMAKE_DEPFILE_FLAGS_C, the 
-depend_dir flag was added to normal FLAGS
———-

I have a same problem with a GHS compiler. We can’t control the name of the 
generated *.d file while compile step.
My questions are:

1.) Is ist possible to change the object or/and the dependency file name 
generated for ninja?

2.) Why generates cmake the objectname as sourcefilename.{c,cpp}.obj?

I would expect as in make something like that:
DEP:=$(SRC:.cpp=.d)
OBJ:=$(SRC:.cpp=.obj)

Claus Klein




-- 

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


[cmake-developers] how does target_compile_features() test the c++11 conformance?

2017-06-29 Thread Claus Klein
Hi,

I am using cmake V3.8.2 and VS 2013 and work with a c++11 library.

Wenn I use this, no error message is seen:

 target_compile_features(${targetname} PRIVATE cxx_std_11) # OK


But wenn I use this most features are missing:

target_compile_features(${targetname} PRIVATE
   cxx_contextual_conversions  # OK
   cxx_final   # OK
   cxx_override# OK
   cxx_variadic_templates  # OK

   #FIXME: missing features at MS VS12 2013:

   cxx_aggregate_default_initializers
   cxx_attribute_deprecated
   cxx_binary_literals
   cxx_constexpr
   cxx_decltype_auto
   cxx_decltype_incomplete_return_types
   cxx_defaulted_move_initializers
   cxx_digit_separators
   cxx_generic_lambdas
   cxx_lambda_init_captures
   cxx_noexcept
   cxx_relaxed_constexpr
   cxx_return_type_deduction
   cxx_variable_templates
 )

with regards
Claus

-- 

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] add_custom_commad build error with ninja generator

2014-04-09 Thread Claus Klein
Hi all,

I have problems with the following cmake build script:

find_program(CCP_EXECUTABLE cpp REQUIRED HINTS /opt/local/bin)
find_program(ASN1C_EXECUTABLE asn1c REQUIRED HINTS /opt/local/bin)

if(ASN1C_EXECUTABLE AND CCP_EXECUTABLE)
   set(ASN1C_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})

### collect the list of generated source
###TBD### aux_source_directory(${ASN1C_OUTPUT_DIR} ASN1_SOURCES)
### message(„${ASN1_SOURCES}“)
set(ASN1_SOURCES converter-sample.c pdu_collection.c)


### Add a target with no output so it will always be built.
add_custom_target(regen
COMMAND ${CCP_EXECUTABLE} -undef -P
-include ${CMAKE_CURRENT_SOURCE_DIR}/CertificateProfile.asn1
${CMAKE_CURRENT_SOURCE_DIR}/EncryptedBsc.asn1 
_sample.asn1
WORKING_DIRECTORY ${ASN1C_OUTPUT_DIR}
VERBATIM)


### adding a custom command to produce an output.
add_custom_target(OUTPUT ${ASN1_SOURCES}
COMMAND ${ASN1C_EXECUTABLE} -S 
${CMAKE_CURRENT_SOURCE_DIR}/../../skeletons
-pdu=all ${ASN1C_OUTPUT_DIR}/_sample.asn1
COMMAND astyle *.c *.h
DEPENDS ${ASN1C_OUTPUT_DIR}/_sample.asn1
WORKING_DIRECTORY ${ASN1C_OUTPUT_DIR}
VERBATIM)

set_property(DIRECTORY APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES ${ASN1C_OUTPUT_DIR}/_sample.asn1 
${ASN1_SOURCES})


# Tell CMake to build a library from this source files
add_library(sample-asn1 ${ASN1_SOURCES})

message (asn1c found, use target regen to generate code again)
endif()

My intention is to create a dependency tree from the library to the asn1 file.
The source file list should be dynamic because it will be changed when the asn1 
specification is changed.

The OUTPUT parameter is generated to illegal shell syntax.

I would expect that the library is rebuild after build target ‚regen'.
This is not the case, so I manually start the build the target ‚OUTPUT’.

But than I get the following error while build:

Claus-MacBook-Pro:build clausklein$ ninja OUTPUT
[1/1] cd 
/Users/clausklein/Workspace/c/asn1c/examples/Certificate/buil.../c/asn1c/examples/Certificate/build/_sample.asn1
  astyle *.c *.h
FAILED: cd /Users/clausklein/Workspace/c/asn1c/examples/Certificate/build  
converter-sample.c pdu_collection.c  /opt/local/bin/asn1c -S 
/Users/clausklein/Workspace/c/asn1c/examples/Certificate/../../skeletons 
-pdu=all 
/Users/clausklein/Workspace/c/asn1c/examples/Certificate/build/_sample.asn1  
astyle *.c *.h
/bin/sh: converter-sample.c: command not found
ninja: build stopped: subcommand failed.
Claus-MacBook-Pro:build clausklein$ 


too find the target name „OUTPUT“ strange:

Claus-MacBook-Pro:build clausklein$ ninja help
[1/1] All primary targets available:
OUTPUT: phony
edit_cache: phony
install: phony
install/local: phony
install/strip: phony
list_install_components: phony
rebuild_cache: phony
regen: phony
converter-sample: phony
libsample-asn1.a: phony
sample: phony
sample-asn1: phony
build.ninja: RERUN_CMAKE
clean: CLEAN
help: HELP
Claus-MacBook-Pro:build clausklein$ 

/usr/bin/cmake --version
cmake version 3.0.0-rc3


Any help would be welcome

Claus


signature.asc
Description: Message signed with OpenPGP using GPGMail
-- 

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/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake] Bug fix requests for the *next* release of CMake...

2012-08-12 Thread Claus Klein

I would like if this Bug Report is not longer on backlog:

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

I have uploaded a patch ready for integration.

Claus

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake] ADD_DEPENDENCIES() and NonExisitngDependent is NOT an error?

2012-08-08 Thread Claus Klein

Hi David,

I have prepared a new patch for master which works fine now.

claus-kleins-macbook-pro:CmakeBuildDir clausklein$ bin/cmake --help- 
policy CMP0019

cmake version 2.8.8.20120628-g01d97-dirty
  CMP0019
   add_dependencies(target-name depend-target1 depend-target2 ...)
   Dependent targets must all exist.

   In CMake 2.8.10 and above this policy determines whether or  
not the
   case is an error.  The OLD behavior for this policy is to  
silently
   ignore the problem.  The NEW behavior for this policy is to  
report an

   error.

   This policy was introduced in CMake version 2.8.10.  CMake  
version
   2.8.8.20120628-g01d97-dirty warns when the policy is not set  
and uses
   OLD behavior.  Use the cmake_policy command to set it to OLD  
or NEW

   explicitly.

Claus



prepareCheckForDependingTargetThatDoesNotExistNowButWillBeAddedLater.patch
Description: Binary data




On 27.07.2012, at 20:59, David Cole wrote:


I will have no problem getting it into CMake 'master' immediately
after the 2.8.9 release is final.


P.S. for which date is the release planed?


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake] ADD_DEPENDENCIES() and NonExisitngDependent is NOT an error?

2012-07-27 Thread Claus Klein

Update,

new patch with policy handling uploaded.
http://public.kitware.com/Bug/view.php?id=9188

Not sure if all is right, but as a basis for integration...

Claus

On 26.07.2012, at 23:25, Claus Klein wrote:


Thanks David,

here is my patch, I have tested it today which ninja Experimental



--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake] ADD_DEPENDENCIES() and NonExisitngDependent is NOT an error?

2012-07-27 Thread Claus Klein

Third try ...

I have a Problem to really break the generation if the target does not  
exist:


claus-kleins-macbook-pro:build clausklein$ /Users/clausklein/Downloads/ 
CmakeBuildDir/bin/cmake -G Ninja ..

-- Configuring done
CMake Error:
Policy CMP0019 is not set: add_dependencies() Dependent targets must  
all exist.  Run cmake --help-policy CMP0019 for policy details.  Use  
the cmake_policy command to set the policy and suppress this warning.
ftpcpp: Adding dependency to non-existent target:  
target_that_does_not_exist_now_but_will_be_added_later


-- Generating done
-- Build files have been written to: /Users/clausklein/Workspace/cpp/ 
ftplibpp-2.0.2/build

claus-kleins-macbook-pro:build clausklein$


Can anyone please help?

Thanks in advance
Best Regards
Claus

On 27.07.2012, at 12:24, Claus Klein wrote:


new patch with policy handling uploaded.
http://public.kitware.com/Bug/view.php?id=9188

Not sure if all is right, but as a basis for integration...



--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake] ADD_DEPENDENCIES() and NonExisitngDependent is NOT an error?

2012-07-26 Thread Claus Klein
Thanks David,here is my patch, I have tested it today which "ninjaExperimental"There should be a test too ...It would be nice if it could fixed before next release.Claus

checkForExistingDependencyTarget.patch
Description: Binary data
On 26.07.2012, at 18:18, David Cole wrote:The gory details are here:http://public.kitware.com/Bug/view.php?id=9188It's well known, and in the backlog, but nobody is currently activelyworking on fixing it to the best of my knowledge.Sorry,David--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

[cmake-developers] Experimental BuildDepends test passed, but does not work?

2012-07-21 Thread Claus Klein

I can not understand the output, for me this test does not work.

Change Dir: /Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ 
BuildDepends/Project


Run Build Command:/usr/local/bin/ninja
[1/14] Building CXX object CMakeFiles/foo.dir/foo.cxx.o
[2/14] Generating zot_custom.hxx
[3/14] Generating zot.hxx
[4/14] Building CXX object CMakeFiles/zot.dir/zot.cxx.o
[5/14] Building CXX object CMakeFiles/zot.dir/zot_macro_dir.cxx.o
[6/14] Linking CXX static library libfoolib.a
[7/14] Building CXX object CMakeFiles/generator.dir/generator.cxx.o
[8/14] Building CXX object CMakeFiles/zot.dir/zot_macro_tgt.cxx.o
[9/14] Linking CXX executable zot
[10/14] Linking CXX executable gen
[11/14] Generating noregen.h
[12/14] Generating regen.h
[13/14] Building CXX object CMakeFiles/bar.dir/bar.cxx.o
[14/14] Linking CXX executable bar

Running /Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ 
BuildDepends/Project/bar

Run result: 0 Output: foo 
Worked!
Running /Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ 
BuildDepends/Project/zot
Run result: 0 Output: [zot] [zot_custom] [zot_macro_dir]  
[zot_macro_tgt] 

Worked!
Waiting 3 seconds...
Modifying Project/foo.cxx
Building project second time
Output from second build:
Change Dir: /Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ 
BuildDepends/Project


Run Build Command:/usr/local/bin/ninja
ninja: no work to do.   


Running /Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ 
BuildDepends/Project/bar

Run result: 0 Output: foo changed 
Worked!
Running /Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ 
BuildDepends/Project/zot
Run result: 0 Output: [zot changed] [zot_custom changed]  
[zot_macro_dir changed] [zot_macro_tgt changed] 

Worked!
Configuring
Configuring done
Generating
Generating done
Build files have been written to: /Users/clausklein/Downloads/ 
CmakeNinjaBuildDir/Tests/BuildDepends

 End CMake output ==
Change Dir: /Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ 
BuildDepends


Run Clean Command:/opt/local/bin/ninja -t clean
Cleaning... 0 files.

Run Build Command:/opt/local/bin/ninja
ninja: no work to do.

see:
http://open.cdash.org/testDetails.php?test=154196743build=2456799

Can anyone please help?

Thanks in advance
Best Regards

Claus

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] Why not disable the Unix Makefiles generator for Darwin?

2012-07-18 Thread Claus Klein

I am happy to see it works now and Ninja is eanabled and Mac

Thanks to all

Claus

  CMakeLists.txt Revision:  
52160bf68f2d3b948efda5a7a64642e7e0969d9e by Peter Kümmel
Ninja: enable ninja on Mac so all Mac CDash-builds are  
tested, cleanup later



On 14.07.2012, at 19:40, Nicolas Desprès wrote:


I am almost ready to push a branch fixing all the failing tests on
Darwin with Ninja. So it is coming soon.

Cheers,
Nico


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] cmake selftest use different compiler and binutils as configured on Darwin

2012-07-17 Thread Claus Klein

done

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

Thanks for help
Claus

On 17.07.2012, at 02:07, Richard Wackerbarth wrote:

RE: The arch test, et.al. You should file a bug against CMake if a  
test is failing only because the compiler does/does not produce the  
same results as a compiler supplied by Apple. CMake tests should  
reflect the capabilities of the compiler under test and not the  
capabilities of some other compiler that might be used on the  
platform.


Where such a difference affects the end user, CMake should provide a  
mechanism to distinguish between two such compilers.  That does not  
imply that there needs to be a single construct which makes the  
distinction, simply that there is some combination of CMake  
instructions which does so.


Richard



--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] cmake selftest use different compiler and binutils as configured on Darwin

2012-07-16 Thread Claus Klein

David,

Thanks for help, it works just with Makefile generator.

With Ninja I have to look what happens. something goes still wrong.

You may see http://open.cdash.org/viewTest.php?onlyfailedbuildid=2445267
my first working results.

With this 3 failed tests I have a problem:

They should not run at my environment, because I do not use the Apple  
gcc, it does not support -arch options.


So this tests fail always.

How could I this prevent to run this test?

P.S. There are build warnings too.

Claus

On 16.07.2012, at 00:02, David Cole wrote:


Driving that script with ctest -S should submit a dashboard for you.
If you want to use ninja, then you have to build a ctest/cmake that
has ninja support in it and use that one to drive the script. Let us
know if you have any more questions about this.

Thanks for volunteering for some dashboard submissions!


Hope this helps,
David


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

[cmake-developers] patch to fix the X11 test on Darwin with gcc-4.7

2012-07-15 Thread Claus Klein
I have prepared a small patch to fix the X11 test.This prevents errors like this:http://open.cdash.org/testDetails.php?test=153601982build=2442103

TestsX11HelloWorldX11.patch
Description: Binary data
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

[cmake-developers] ExperimentalUpdate fails (missing remote name or URL)

2012-07-15 Thread Claus Klein

/opt/local/bin/gmake ExperimentalUpdate
   Site: claus-kleins-macbook-pro.local
   Build name: Darwin-i386-apple-darwin9-g++-mp-4.7
   Updating the repository: /Users/clausklein/Downloads/cmake
   Use GIT repository type
   Old revision of repository is:  
3bbba2ab2e6a733db6e0949fb5636a6ab9f59649
   New revision of repository is:  
3bbba2ab2e6a733db6e0949fb5636a6ab9f59649

   Gathering version information (one . per revision):

   Update command failed: /opt/local/bin/git fetch
Built target ExperimentalUpdate


That is my configuration:
claus-kleins-macbook-pro:cmake clausklein$ git remote -v
master  git://cmake.org/cmake.git (fetch)
master  git://cmake.org/cmake.git (push)

claus-kleins-macbook-pro:cmake clausklein$ git fetch
fatal: No remote repository specified.  Please, specify either a URL  
or a

remote name from which new revisions should be fetched.

claus-kleins-macbook-pro:cmake clausklein$ git fetch master -v
From git://cmake.org/cmake
 = [up to date]  dashboard  - master/dashboard
 = [up to date]  hooks  - master/hooks
 = [up to date]  maint  - master/maint
 = [up to date]  master - master/master
 = [up to date]  next   - master/next
 = [up to date]  nightly- master/nightly
 = [up to date]  nightly-master - master/nightly-master
 = [up to date]  release- master/release
claus-kleins-macbook-pro:cmake clausklein$

What is wrong?

Claus
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] ExperimentalUpdate fails (missing remote name or URL)

2012-07-15 Thread Claus Klein

This helps:

git remote add origin  git://cmake.org/cmake.git

On 15.07.2012, at 18:21, Claus Klein wrote:


What is wrong?


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake selftest use different compiler and binutils as configured on Darwin

2012-07-15 Thread Claus Klein

Richard,

It is not clear to me how to setup a nightly build.

I prefer a Clean build.
I would setup simply a new working every night at /var/tmp:

mkdir nightly  nightly
git clone git://cmake.org/cmake.git
git remote add origin  git://cmake.org/cmake.git
git checkout -b nightly remotes/origin/nightly
mkdir build  cmake build  cmake ..  make Nightly
rm -rf *


Or an incremental build:
I have to setup a cmake build dir only once and update it every night  
with make:


claus-kleins-macbook-pro:CmakeMakeBuildDir clausklein$ make help |  
grep Nightly

... Nightly
... NightlyBuild
... NightlyConfigure
... NightlyCoverage
... NightlyMemCheck
... NightlyMemoryCheck
... NightlyStart
... NightlySubmit
... NightlyTest
... NightlyUpdate


Which one is right?

Claus


On 14.07.2012, at 15:31, Richard Wackerbarth wrote:

If you need help with the other parts, I can dig out the pieces  
tonight and send them to you. Let me know where you need help.


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake selftest use different compiler and binutils as configured on Darwin

2012-07-15 Thread Claus Klein

Can anyone please help?

Thanks in advance
Best Regards
Claus

On 09.07.2012, at 18:52, Claus Klein wrote:



Perhaps I must set a different CMAKE_SYSTEM_NAME, but which one?

#FIXME   -DCMAKE_SYSTEM_NAME=Darwin-GNU \
 -DCMAKE_C_COMPILER=/opt/local/libexec/ccache/gcc \
 -DCMAKE_CXX_COMPILER=/opt/local/libexec/ccache/g++ \

IMO it is a use case like cross compiling!
I need a chance to control what happens.




None of the cmake nighly test use my configured compiler!

claus-kleins-macbook-pro:CmakeNinjaBuildDir clausklein$ find . -type f  
-name CMakeCache.txt -print0 | xargs -0 grep CMAKE_CXX_COMPILER: |  
grep  mp-4.7
./CMakeCache.txt:CMAKE_CXX_COMPILER:FILEPATH=/opt/local/bin/i386-apple- 
darwin9-g++-mp-4.7
claus-kleins-macbook-pro:CmakeNinjaBuildDir clausklein$ find . -type f  
-name CMakeCache.txt -print0 | xargs -0 grep CMAKE_CXX_COMPILER: |  
grep  -v mp-4.7 | wc -l

190
claus-kleins-macbook-pro:CmakeNinjaBuildDir clausklein$


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] cmake selftest use different compiler and binutils as configured on Darwin

2012-07-14 Thread Claus Klein

Hi Richard,

it would be nice if you may setup a nightly build on darwin with  
current MacPorts gcc-4.7 like this:


claus-kleins-macbook-pro:CmakeMakeBuildDir clausklein$ i386-apple- 
darwin9-gcc-4.7.1 --version

i386-apple-darwin9-gcc-4.7.1 (MacPorts gcc47 4.7.1_1) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.

And make sure, that this generator and tools are used while cmake  
selftest!


As a first try, it would be help to use the Makefile generator, later  
you may add or change to Ninja generator.


export CC=/opt/local/bin/i386-apple-darwin9-gcc-mp-4.7
export CXX=/opt/local/bin/i386-apple-darwin9-g++-mp-4.7
export MAKECOMMAND=/opt/local/bin/gmake

# configure
/opt/local/bin/cmake -G Unix Makefiles - 
DCMAKE_TEST_GENERATOR:STRING=Unix Makefiles \
-DCMAKE_TEST_MAKEPROGRAM:FILEPATH=${MAKECOMMAND} - 
DCMAKE_ENABLE_NINJA:BOOL=ON \

-DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} \
-DCMAKE_LINKER:FILEPATH=/opt/local/bin/ld \
-DCMAKE_AR:FILEPATH=/opt/local/bin/i386-apple-darwin9-gcc-ar- 
mp-4.7 \
-DCMAKE_RANLIB:FILEPATH=/opt/local/bin/i386-apple-darwin9-gcc- 
ranlib-mp-4.7 \

-DMAKECOMMAND:STRING=${MAKECOMMAND} \
-DCMAKE_FIND_ROOT_PATH=/opt/local/libexec/gcc/i386-apple- 
darwin9/4.7.1/;/opt/local/bin \

\
-DBUILD_CursesDialog:BOOL=ON -DBUILD_QtDialog:BOOL=OFF \
../cmake


gmake Experimental
...

That is my current result:
96% tests passed, 10 tests failed out of 246

Label Time Summary:
Label1=   0.13 sec
Label2=   0.13 sec

Total Test time (real) = 1304.76 sec

The following tests FAILED:
 62 - Architecture (Failed)
 90 - BuildDepends (Failed)
 93 - CPackComponents (Failed)
 98 - CPackComponentsForAll-DragNDrop-default (Failed)
 99 - CPackComponentsForAll-DragNDrop-OnePackPerGroup (Failed)
100 - CPackComponentsForAll-DragNDrop-IgnoreGroup (Failed)
101 - CPackComponentsForAll-DragNDrop-AllInOne (Failed)
139 - ObjC++ (Failed)
140 - BundleGeneratorTest (Failed)
246 - CMake.CheckSourceTree (Failed)
Performing coverage
 Cannot find any coverage files. Ignoring Coverage request.
Submit files (using http)
   Using HTTP submit method
   Drop site:http://www.cdash.org/CDash/submit.php?project=CMake
   Uploaded: /Users/clausklein/Downloads/CmakeMakeBuildDir/Testing/ 
20120714-1043/Build.xml
   Uploaded: /Users/clausklein/Downloads/CmakeMakeBuildDir/Testing/ 
20120714-1043/Configure.xml
   Uploaded: /Users/clausklein/Downloads/CmakeMakeBuildDir/Testing/ 
20120714-1043/Test.xml

   Submission successful
Errors while running CTest

And I have just the same errors with Nina generator!

claus-kleins-macbook-pro:CmakeMakeBuildDir clausklein$ sw_vers
ProductName:Mac OS X
ProductVersion: 10.5.8
BuildVersion:   9L30


On 08.07.2012, at 14:47, Richard Wackerbarth wrote:

If we need to test some other configurations, just let me know which  
repositories/branches I should use for testing.


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

[cmake-developers] Why not disable the Unix Makefiles generator for Darwin?

2012-07-14 Thread Claus Klein

I am wondering why Nina generator is disabled on Darwin.
I have just the same problems with Unix Makefile generator?

Or it would be nice to enable Ninja too for Darwin, I need it to cross  
compile my projects ...


Claus

See

http://open.cdash.org/index.php?project=CMakedisplay=projectfiltercount=3showfilters=1filtercombine=andfield1=buildname/stringcompare1=65value1=Darwin-i386field2=site/stringcompare2=61value2=claus-kleins-macbook-pro.localfield3=buildstamp/stringcompare3=66value3=Experimentalcollapse=0

The test is based on current nightly build.

But I use the newest MacPorts gcc-4.7:

$ sw_vers
ProductName:Mac OS X
ProductVersion: 10.5.8
BuildVersion:   9L30

$ i386-apple-darwin9-gcc-4.7.1 --version
i386-apple-darwin9-gcc-4.7.1 (MacPorts gcc47 4.7.1_1) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.

I make sure, that this generator and tools are used while cmake  
selftest!


export CC=/opt/local/bin/i386-apple-darwin9-gcc-mp-4.7
export CXX=/opt/local/bin/i386-apple-darwin9-g++-mp-4.7
export MAKECOMMAND=/opt/local/bin/gmake

# configure
/opt/local/bin/cmake -G Unix Makefiles - 
DCMAKE_TEST_GENERATOR:STRING=Unix Makefiles \
-DCMAKE_TEST_MAKEPROGRAM:FILEPATH=${MAKECOMMAND} - 
DCMAKE_ENABLE_NINJA:BOOL=ON \

-DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} \
-DCMAKE_LINKER:FILEPATH=/opt/local/bin/ld \
-DCMAKE_AR:FILEPATH=/opt/local/bin/i386-apple-darwin9-gcc-ar- 
mp-4.7 \
-DCMAKE_RANLIB:FILEPATH=/opt/local/bin/i386-apple-darwin9-gcc- 
ranlib-mp-4.7 \

-DMAKECOMMAND:STRING=${MAKECOMMAND} \
-DCMAKE_FIND_ROOT_PATH=/opt/local/libexec/gcc/i386-apple- 
darwin9/4.7.1/;/opt/local/bin \

\
-DBUILD_CursesDialog:BOOL=ON -DBUILD_QtDialog:BOOL=OFF \
../cmake


gmake Experimental
...


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake] LINK_LIBRARIES not spilled to response file

2012-07-09 Thread Claus Klein

I have added a patch that should help. (Tested on Darwin only)

Please check it for Windows before apply.

Claus

On 09.07.2012, at 12:13, Zaheer Chothia wrote:


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

--Zaheer


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] cmake selftest use different compiler and binutils as configured on Darwin

2012-07-08 Thread Claus Klein


On 07.07.2012, at 21:34, Nicolas Desprès wrote:


I advice you to install the Apple command line tools for xcode and
stop to use gcc.


I have removed the path to /opt/local/bin and tested xcode without  
ninja:

http://open.cdash.org/viewTest.php?onlyfailedbuildid=2423850

It is not clear to me what is intended with cmake selftest?

 * If Xcode generator is selected, sure the Bundle and other Xcode  
test should run


 * If I configure a different tool chain, i.e. mac port gcc-4.7 with  
all tool under /opt/local/bin,

it is an ERROR to run Bundle, Architecture, and ObjC++ tests!

Perhaps I must set a different CMAKE_SYSTEM_NAME, but which one?

#FIXME   -DCMAKE_SYSTEM_NAME=Darwin-GNU \
 -DCMAKE_C_COMPILER=/opt/local/libexec/ccache/gcc \
 -DCMAKE_CXX_COMPILER=/opt/local/libexec/ccache/g++ \

IMO it is a use case like cross compiling!
I need a chance to control what happens.

Claus

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] cmake selftest use different compiler and binutils as configured on Darwin

2012-07-08 Thread Claus Klein

This thread is not about ninja.

Its about cmake self build and cmake self test after build!

I have same results with Unix Makefiles generator when I use the  
same toolchain;


http://open.cdash.org/testDetails.php?test=152892528build=2424062
http://open.cdash.org/testDetails.php?test=152794057build=2421596

The biggest problem is that ctest does not use my configured tools!
I have to restrict the exported path to handle that right?

Claus

On 08.07.2012, at 14:47, Richard Wackerbarth wrote:


Gentlemen:

If you think that you have something that is working on OSX with  
ninja,
we need to arrange to get it into next (assuming that it doesn't  
break anything else)
At this point, it would not be enabled (by default), but some of the  
test systems on the nightly dashboard intentionally enable it to see  
how well it fairs.


I am currently running two OSX tests, both with cmake from the  
next branch. One uses an older version of ninja that seemed stable  
and the other uses the latest nightly sources from the ninja  
repository.


If we need to test some other configurations, just let me know which  
repositories/branches I should use for testing.


Richard

On Jul 8, 2012, at 5:04 AM, Claus Klein wrote:

On 07.07.2012, at 21:34, Nicolas Desprès wrote:


I advice you to install the Apple command line tools for xcode and
stop to use gcc.


I have removed the path to /opt/local/bin and tested xcode without  
ninja:

http://open.cdash.org/viewTest.php?onlyfailedbuildid=2423850




--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

[cmake-developers] cmake selftest use different compiler and binutils as configured on Darwin

2012-07-07 Thread Claus Klein
I tried to check if ninja works now on Darwin, but some tests still  
fails.


I use this configuration, but I have the gcc-4.7 installed too under / 
opt/local/bin.


/usr/local/bin/cmake -G Ninja -DCMAKE_TEST_GENERATOR:STRING=Ninja \
-DCMAKE_TEST_MAKEPROGRAM:FILEPATH=${MAKECOMMAND} - 
DCMAKE_ENABLE_NINJA:BOOL=ON \
-DCMAKE_C_COMPILER=/opt/local/libexec/ccache/gcc-4.2 - 
DCMAKE_CXX_COMPILER=/opt/local/libexec/ccache/g++-4.2 \

-DCMAKE_LINKER:FILEPATH=/usr/bin/ld \
-DCMAKE_AR:FILEPATH=/usr/bin/ar \
-DCMAKE_RANLIB:FILEPATH=/usr/bin/ranlib \
-DMAKECOMMAND:STRING=${MAKECOMMAND} -d stats \
-DBUILD_CursesDialog:BOOL=ON -DBUILD_QtDialog:BOOL=OFF \
../cmake


The build works fine, but some test still fails!
see http://open.cdash.org/viewTest.php?onlyfailedbuildid=2421596

As you can see at build command, the configured binutils are not used  
while test?



Than I tried this:
claus-kleins-macbook-pro:CmakeNinjaBuildDir clausklein$ /Users/ 
clausklein/Downloads/CmakeNinjaBuildDir/bin/ctest --build-and-test / 
Users/clausklein/Downloads/cmake/Tests/Architecture /Users/ 
clausklein/Downloads/CmakeNinjaBuildDir/Tests/Architecture --build- 
two-config --build-generator Ninja --build-makeprogram /opt/ 
local/bin/ninja --build-options -DCMAKE_C_COMPILER=/opt/local/ 
libexec/ccache/gcc-4.2 -DCMAKE_CXX_COMPILER=/opt/local/libexec/ 
ccache/g++-4.2 -DCMAKE_LINKER:FILEPATH=/usr/bin/ld - 
DCMAKE_AR:FILEPATH=/usr/bin/ar -DCMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
Internal cmake changing into directory: /Users/clausklein/Downloads/ 
CmakeNinjaBuildDir/Tests/Architecture

 CMake output ==
is_xcode4='0'
archs=''
arch0='i386'
arch1='ppc'
Configuring
Configuring done
Generating
Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

CMAKE_CXX_COMPILER


Build files have been written to: /Users/clausklein/Downloads/ 
CmakeNinjaBuildDir/Tests/Architecture

is_xcode4='0'
archs=''
arch0='i386'
arch1='ppc'
Configuring
Configuring done
Generating
Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

CMAKE_CXX_COMPILER


Build files have been written to: /Users/clausklein/Downloads/ 
CmakeNinjaBuildDir/Tests/Architecture

 End CMake output ==
Change Dir: /Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ 
Architecture


Run Clean Command:/opt/local/bin/ninja -t clean
Cleaning... 5 files.

Run Build Command:/opt/local/bin/ninja
[1/4] Building C object CMakeFiles/foo.dir/foo.c.o
[2/4] Linking C static library libfoo.a
[3/4] Building C object CMakeFiles/bar.dir/bar.c.o
[4/4] Linking C executable Architecture
FAILED: :  /opt/local/libexec/ccache/gcc-4.2  -arch ppc -isysroot / 
Developer/SDKs/MacOSX10.5.sdk -Wl,-search_paths_first -Wl,- 
headerpad_max_install_names  CMakeFiles/bar.dir/bar.c.o  -o  
Architecture libfoo.a  :

ld warning: in libfoo.a, file is not of required architecture
Undefined symbols:
  _foo, referenced from:
  _main in bar.c.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
ninja: build stopped: subcommand failed.
claus-kleins-macbook-pro:CmakeNinjaBuildDir clausklein$

What goes wrong with this test?

//Regards
Claus





--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] Ninja passes all tests on OS X

2012-07-07 Thread Claus Klein

On 07.07.2012, at 20:54, Nicolas Desprès wrote:


I have pushed the re-factor patch. Let me know what do you think. I
have tested on Linux and MacOSX with the Makefile and Ninja generator
and both work fine.


Which OS version and Tools do you have installed?

I merged in your patch and have still Problems?

see http://open.cdash.org/viewTest.php?onlyfailedbuildid=2421596

Claus



--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] cmake selftest use different compiler and binutils as configured on Darwin

2012-07-07 Thread Claus Klein

Thanks Nico,

I can live with the tools installed with mac ports.

I only tried to test Ninja with Cmake. And it works fine for me.
I will ignore this 5 errors while cmake selftest. ;-)

All other thinks I works with do fine without xcode ...

But IMO, cmake should use the configured tool chain it was build with  
while it test.


And cmake should test which feature is available with this configured  
tools, or not?


//Regards
Claus

On 07.07.2012, at 21:34, Nicolas Desprès wrote:


Hi Claus,

Have a look here: http://kennethreitz.com/xcode-gcc-and-homebrew.html
I advice you to install the Apple command line tools for xcode and
stop to use gcc.

Cheers,
Nico


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake] CMake 2.8.9-rc1 ready for testing!

2012-07-02 Thread Claus Klein

Yes, you are right.

My fault, I was really not up to date.

It works fine with your fix.

Thanks
Claus

On 27.06.2012, at 20:07, Peter Kümmel wrote:

Works also here on Windows, Ubuntu 12.04, and Mac 10.8 (gcc-4.2,  
i386),

at least when I use cmake as sources.

Are you sure your sources are up to date? Recently I fixed
another(?) crash reported by you:

https://github.com/syntheticpp/CMake/commit/2fb07fc44c49da70a609fbc0df013c0301e9f36a 
#Source/cmExtraEclipseCDT4Generator.cxx


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake] CMake 2.8.9-rc1 ready for testing!

2012-06-26 Thread Claus Klein

Hi Dave,

I found one more Ninja issue;

The Ninja Eclipse Generator crashes while make target generation. No  
Idea why, but this helps for now:


diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/ 
cmExtraEclipseCDT4Generator.cxx

index ab11307..b9e360b 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -964,6 +964,11 @@ void  
cmExtraEclipseCDT4Generator::CreateCProjectFile() const

it != this-GlobalGenerator-GetLocalGenerators().end();
++it)
 {
+if (std::string(Ninja) == generator-GetName())
+  {
+  break;// FIXME with Ninja it crashes! For now not relay  
needed! ck

+  }
+
 const cmTargets targets = (*it)-GetMakefile()-GetTargets();
 cmMakefile* makefile=(*it)-GetMakefile();
 std::string subdir = (*it)-Convert(makefile- 
GetCurrentOutputDirectory(),

claus-kleins-macbook-pro:cmake clausklein$



//Regards
Claus





On 26.06.2012, at 16:39, David Cole wrote:


Thanks.

I've pushed a fix and merged it to 'next' -- we'll get it into rc2.

 http://cmake.org/gitweb?p=3Dcmake.git;a=3Dcommitdiff;h=3Db163c45445ce75eb=
68d0835b24d4c90ad5b9f6f7



--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake] CMake 2.8.9-rc1 ready for testing!

2012-06-26 Thread Claus Klein
Yes, on MSYS it works too.

I will try to debug it at the Weekend,
I have no Time befor sunday.

Sorry
Claus

With regards
Claus

On 26.06.2012, at 23:00, Bill Hoffman bill.hoff...@kitware.com wrote:

 On 6/26/2012 2:42 PM, Claus Klein wrote:
 yes, sure,
 
 On Darwin, I simply do:
 
 cmake -G 'Eclipse CDT4 - Ninja'
 -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=1 ../LMX
 
 That works with any cmake project I work.
 
 Nightly build on
 uname -a
 Darwin claus-kleins-macbook-pro.local 9.8.0 Darwin Kernel Version 9.8.0:
 Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
 i386 MacBookPro5,1 Darwin
 
 
 Can you run cmake in gdb with a debug build and get the exact location of the 
 crash?
 
 It is working on my windows box...
 
 -Bill
 
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Ninja/Win32: Negating UsingMinGW default to support Windows hosted cross compilers

2012-06-22 Thread Claus Klein

You are right,

in general backslashes as path separator are not needed on windows  
except for cmd.ex cd buildin.


It is a quote character in strings and make always trouble on bash and  
make!


Claus

On 22.06.2012, at 20:15, OKUMURA Yuki wrote:


Hi list,

Current CMake Ninja generator will translate backslashes in the path
into forward slashes iff you are using MinGW(= Windows hosted Windows
compiler).
I feel this behavior should be default because Windows hosted
cross-compilers -- Android NDK for example -- also require this path
translation but they never recognized as MinGW.

Attached patch implements this and my life became much happier with
CMake+Ninja :)
I think this change would break non-MSVC and non-GNU toolchain (e.g.
bcc32) though.

(To implement it precisely, every Ninja generator has to know whether
to escape response file which will feed to the compiler/linker/...
I posted around this before at Ninja-build group:
https://groups.google.com/d/msg/ninja-build/KrxvzcSJQbY/140CDdXKGVIJ
Of course, current workaround; not to use backslashes in the filenames
for MinGW; is smart enough but it would break if user fed too many -D
options to the compiler and rspfile used.)

Any thoughts?
-- oku
0001-Ninja-win32-Negate-UsingMinGW-default.patch--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] -GNinja on Windows

2012-06-09 Thread Claus Klein

Hi Peter,

I agree, we need your/our changes at  upstream!

I will switch to our github:

https://github.com/syntheticpp/ninja


On little more about ninja bootstrap:
Original bootstrap.py generated target rule:
ninja -t clean
does a really distclean. The re2c generted files are removed too!

To be save, I added a rule to build/update them if needed:

#
set (RE2C_FOUND FALSE)
find_program (RE2C_EXECUTABLE re2c)
if (RE2C_EXECUTABLE)
set (RE2C_FOUND TRUE)
set (RE2C_FLAGS -b -i --no-generation-date)

# build src/depfile_parser.cc: re2c src/depfile_parser.in.cc
# build src/lexer.cc: re2c src/lexer.in.cc
foreach(_in depfile_parser.in.cc lexer.in.cc)
string(REGEX REPLACE .in.cc .cc _out ${_in})
message(STATUS Generate re2c src/${_in} -o src/${_out})

 # CMake atrocity: if none of these OUTPUT files is used in a  
target in
 # the current CMakeLists.txt file, the ADD_CUSTOM_COMMAND is  
plainly

 # ignored and left out of the make files.
add_custom_command(OUTPUT ${srcdir}/${_out}
COMMAND ${RE2C_EXECUTABLE} ${${RE2C_FLAGS}} -o ${srcdir}/$ 
{_out} ${srcdir}/${_in}

DEPENDS ${srcdir}/${_in}
)
endforeach()
endif (RE2C_EXECUTABLE)


claus-kleins-macbook-pro:build clausklein$ ninja -d explain
ninja: no work to do.
claus-kleins-macbook-pro:build clausklein$ touch ../src/lexer.in.cc
claus-kleins-macbook-pro:build clausklein$ ninja -d explain
ninja explain: restat of output ../src/lexer.cc older than inputs
ninja explain: ../src/lexer.cc is dirty
ninja explain: ../src/lexer.cc is dirty
ninja explain: CMakeFiles/ninja_lib.dir/src/lexer.cc.o is dirty
ninja explain: libninja_lib.a is dirty
ninja explain: ninja is dirty
ninja explain: libninja_lib.a is dirty
[4/4] Linking CXX executable ninja
claus-kleins-macbook-pro:build clausklein$

//Regards
Claus



On 08.06.2012, at 23:13, Peter Kümmel wrote:


Will it merged later?
Can you please apply my time-stamp patch?


More interesting would be to bring it upstream.



P.S.
I tried to compile it with your CMakeLists.txt file, but it needs  
love on linux (UNIX) build hosts.


Oh, yes, thanks. The last day I'm only on windows.



//Regards
Claus





--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] -GNinja on Windows

2012-06-09 Thread Claus Klein


On 09.06.2012, at 10:25, Peter Kümmel wrote:


On 09.06.2012 10:02, Claus Klein wrote:

Hi Peter,

I agree, we need your/our changes at upstream!

I will switch to our github:

https://github.com/syntheticpp/ninja



In times of git there is no our repository any more.


Yes, I know, I meant your repo... (clone)



You could simply fork martine/ninja and push you changes
into your fork. Then, when you think something should go
upstream, create a merge request.


I work with git not so long, but its cool and I will do this! ;-)


Thanks,
Claus--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] -GNinja on Windows

2012-06-08 Thread Claus Klein
Hi Peter,can you please explain what is the state of your ninja fork.Is is sync with origin ninja?Will it merged later?Can you please apply my time-stamp patch?P.S.I tried to compile it with your CMakeLists.txt file, but it needs love on linux (UNIX) build hosts. //RegardsClaus

ninja-use-stat64.patch
Description: Binary data


CMakeLists.patch
Description: Binary data
 On 07.06.2012, at 23:46, Peter Kümmel wrote:Guessing configuration NoConfigStart 82: BuildDepends1/1 Test #82: BuildDepends . Passed 5.06 sec;)Bill, this was a great idea with cldeps!Only small patches for cldeps and cmake and we now have dependency tracking for msvc.A cldeps binary is here:http://sourceforge.net/projects/cmakescript/files/cldeps.exeCode is in misc/ also a CMakeLists.txthttps://github.com/syntheticpp/ninja/tree/cldepsCMake:http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=1d40729eaa35dd643efdf5e793e6a541e890f33aThe only thing to do is to figure out the prefix of /showIncludes, it's hard coded atm:https://github.com/syntheticpp/ninja/blob/cldeps/misc/cldeps.cc#L150and to pass it to cldeps.Cheers,Peter

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

[cmake-developers] Canonical include pathes within ninja files

2012-06-07 Thread Claus Klein
Hi Peter,I would like to know your opinion aboutCanonical path'sWhile testing with ninja generator, I found same rules with nonCanonical include pathes.a simple example from my test program:"/tmp/some/deep/application/folder/../configuration/instance/../instance/myfile.cfg""/tmp/some/deep/application/configuration/instance/myfile.cfg"realpath - /private/tmp/some/deep/application/configuration/instance/myfile.cfg (which does not yet exists!)see manrealpath -- returns the canonicalized absolute pathnamehttp://www.kernel.org/doc/man-pages/online/pages/man3/realpath.3.htmlNow the real questions:1.) How can this done in a portable make insight cmake?	I know only boost!2.) And should it done?	IMO yes! (It would be more clear and faster when we generate canonical path entries.) //RegardsClaus Klein 

pathTricks.cpp
Description: Binary data
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] Canonical include pathes within ninja files

2012-06-07 Thread Claus Klein
Hi Peter,It seem not so important, but is it wanted that ninja generator creates relative targets to PROJECT_BINARY_DIR?claus-kleins-macbook-pro:Example clausklein$ ninja -t query Hello/libHello.a Hello/libHello.a: input: CXX_STATIC_LIBRARY_LINKER  Hello/CMakeFiles/Hello.dir/hello.o outputs:  Demo/CMakeFiles/helloDemo.dir/demo.o  Demo/CMakeFiles/helloDemo.dir/demo_b.o  Demo/helloDemo  Hello  libHello.a  allclaus-kleins-macbook-pro:Example clausklein$The phony targes are OK, but all libs, obj, deps, and exe files use relative paths.I had problems in eclipse with relative paths, you should know.It works as expected on shell.This patch fix the ninja call without path and prevents the use ofstd::ostringstreamIt include a test with realpath, but this is disabled for now.

NinjaRuleFilesCleanup.patch
Description: Binary data
My other question about the not normalized include paths below could I solve.I had simply to change the CMakeLists.txt of a subproject:claus-kleins-macbook-pro:LMX clausklein$ bzr diff examples/properties/CMakeLists.txt=== modified file 'examples/properties/CMakeLists.txt'--- examples/properties/CMakeLists.txt	2011-05-10 06:13:29 ++++ examples/properties/CMakeLists.txt	2012-06-07 18:00:26 +@@ -6,7 +6,8 @@set(LIBLMX Lmx)#FIXME find_library(LIBLMX Lmx ../../supporting-software/lib)-include_directories(../../supporting-software/include)+#XXX include_directories(../../supporting-software/include)+include_directories(${PRJECT_DIR}/supporting-software/include)# Tell CMake to build an executableadd_executable(testlmx properties.2.2.2-test.cpp properties.2.2.2.cpp PropertyExtensions.cpp PropertyParser.cpp) //RegardsClaus On 07.06.2012, at 12:15, Claus Klein wrote:Hi Peter,I would like to know your opinion aboutCanonical path'sWhile testing with ninja generator, I found same rules with nonCanonical include pathes.a simple example from my test program:"/tmp/some/deep/application/folder/../configuration/instance/../instance/myfile.cfg""/tmp/some/deep/application/configuration/instance/myfile.cfg"realpath - /private/tmp/some/deep/application/configuration/instance/myfile.cfg (which does not yet exists!)see manrealpath -- returns the canonicalized absolute pathnamehttp://www.kernel.org/doc/man-pages/online/pages/man3/realpath.3.htmlNow the real questions:1.) How can this done in a portable make insight cmake?	I know only boost!2.) And should it done?	IMO yes! (It would be more clear and faster when we generate canonical path entries.) //RegardsClaus Klein pathTricks.cpp--Powered by www.kitware.comVisit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.htmlPlease keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQFollow this link to subscribe/unsubscribe:http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] -GNinja on Windows

2012-06-06 Thread Claus Klein

Hi Peter,

Today I have tried to work with ninja on MSYS.

I have a view questions:

1. Is cmake build on MSYS or build on windows when you test with it  
the ninja generator?

I tried the windows version, but it fails, 

2. MSYS has a bash sh program, why is cmd /c used at a unix like  
environment?
	It is not fast to start a a shell the old stupid dos cmd shell again  
and to have the cmdline length problems again!


3. The gcc, ar, and other binutils  I found are quite actual and the  
@response file options are known
	But it is a bash, not command, so only posix path separator must be  
used, '\' and spaces must be quoted!


IMO cmake, at least the ninja generator should respect this, than it  
works.



An other question about dependancy generation on Windows and MSYS:

I found the Makefile Generator creates dep files on MSYS, but the gcc  
can do it by the way? He, wait?
It is it an open  issue for the Nina generator to not create depend  
files on Windows with cl when cmake know to do it?


//Regards
Claus


That was the result of my test, but the cmake sources are not right  
sync with yours!


CMake Error at c:/Programme/CMake2.8/share/cmake-2.8/Modules/ 
CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler C:/Wascana/mingw/bin/gcc.exe is not able to  
compile a

  simple test program.

  It fails with the following output:

   Change Dir: C:/downloads/ftplibpp-2.0.2-ck/build/CMakeFiles/CMakeTmp


  Run Build Command:C:/Wascana/msys/bin/ninja.exe  
cmTryCompileExec2945905931


  [1/2] Building C object
  CMakeFiles\cmTryCompileExec2945905931.dir\testCCompiler.c.obj


  [2/2] Linking C executable cmTryCompileExec2945905931.exe


  FAILED: cmd.exe /c cd.   c:\Programme\CMake2.8\bin\cmake.exe -E  
remove -f

  CMakeFiles\cmTryCompileExec2945905931.dir/objects.a 
  C:\Wascana\mingw\bin\ar.exe cr
  CMakeFiles\cmTryCompileExec2945905931.dir/objects.a
  @cmTryCompileExec2945905931.exe.rsp  C:\Wascana\mingw\bin\gcc.exe
  -Wl,--whole-archive CMakeFiles\cmTryCompileExec2945905931.dir/ 
objects.a

  -Wl,--no-whole-archive -o cmTryCompileExec2945905931.exe
  -Wl,--out-implib,libcmTryCompileExec2945905931.dll.a
  -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 - 
luser32

  -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32
  -ladvapi32  cd.

  C:\Wascana\mingw\bin\ar.exe:
  CMakeFilescmTryCompileExec2945905931.dirtestCCompiler.c.obj: No  
such file

  or directory

  ninja: build stopped: subcommand failed.


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

On 06.06.2012, at 18:08, Peter Kümmel wrote:


On 06.06.2012 16:27, Bill Hoffman wrote:


I will change the dashboard to use ninja
master.  Right now it is still using your branch on git and is  
failing a

bunch of tests.


Now cmake prepends cmd.exe /c  and the branched ninja also, so we  
have

cmd.exe /c cmd.exe /c cd which makes no sense.

Peter
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] -GNinja on Windows

2012-06-06 Thread Claus Klein

Yes, without any problem.

But it was the MSYS Makefile generator if I remember right.

And as I said, cmake generates the dependency file and response files  
itself while generation I think!

The are extra cmake files for that at CMakeFiles tree.

(gcc was not used, it seems a regex solution by cmake)

//Regards
Claus Klein


On 06.06.2012, at 21:14, Peter Kümmel wrote:


Hi Claus,

I only build with MSVC or mingw without MSYS. I never tried MinGW  
Makefile generator on msys,

does this work?


--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] Welcome to June, time for the next release candidate

2012-06-05 Thread Claus Klein
I would like to have the Ninja generator enabled on all Platforms.
It is importand for cross Development, not only as native Build Tool!

With regards
Claus

On 04.06.2012, at 23:13, David Cole david.c...@kitware.com wrote:

 We are preparing to build CMake 2.8.9, release candidate one, in the next few 
 days (or possibly as late as next week).
 
 Is there any pending/outstanding work that anybody thinks is critical for 
 inclusion in CMake 2.8.9?
 
 (I don't want to trigger a flurry of activity by sending this out... but I 
 suppose it's better to have it before we decide to cut rc1 than after. ;-)
 
 
 Thanks,
 David
 
 --
 
 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers