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] How to prevent semicolons in pkg-config.pc files generated with configure_file?

2013-06-28 Thread Claus Klein
Thanks Eike,

that helps, but I can't understand why it is necessary?

Within the trace message output there was no semicolon, see below.

My first try was this:
message(EXTRA_LIBS=${EXTRA_LIBS})   # = 
EXTRA_LIBS=/usr/lib/libpthread.dylib/usr/lib/libcrypto.dylib   # OK but no 
spaces
message(EXTRA_LIBS=${EXTRA_LIBS}) #  
EXTRA_LIBS=/usr/lib/libpthread.dylib;/usr/lib/libcrypto.dylib# fault! with 
';'

Than I changed my code and got this output:


On 28.06.2013, at 19:06, Rolf Eike Beer wrote:

 # 
 # trace
 message( STATUS SNMP_PP_LIBS=${LIBS})
 message( STATUS SNMP_PP_LDFLAGS=${LINKFLAGS})
 #
 # -- SNMP_PP_LIBS=-lpthread -lcryptoOK, with 
 spaces and no ';'
 # -- SNMP_PP_LDFLAGS=-L/usr/lib 
 # ...
 ## configure_file(snmp++-3.pc.in snmp++-3.pc @ONLY)
 # -- Generating snmp++-3.pc file for pkg-config ...
 #
 # Libs.private: @LIBS@ @LINKFLAGS@
 # ... expands to:
 # Libs.private: -lpthread ;-lcrypto  -L/usr/lib
 #^
 # How can I prevent this?
 
 string(REPLACE ;   LIBS ${LIBS})
 
 Eike
 -- 


Is there a better way to create a pkg-config file?

IMHO, It would be nice if the FindPkgConfig.cmake module could create pc file 
too.

something like:
pkg_create_module(PREFIX PATH [QUIET] MODULE )

it should be the reversed function of:
pkg_search_module (LIBXML  libxml2)

Is this possible?

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

[CMake] cmake-gui is not able to create a project on mac os x

2012-08-31 Thread Claus Klein


What is the different between  cmake.app and cmake-gui?

When i try to create a new project with cmake-gui started from shell  
it always fail.


But the GUI version from /Application works fine.

claus-kleins-macbook-pro:ftplib clausklein$ cmake-gui -G Ninja /Users/ 
clausklein/Workspace/cpp/ftplibpp-2.0.2

claus-kleins-macbook-pro:ftplib clausklein$ which cmake-gui
/usr/bin/cmake-gui
claus-kleins-macbook-pro:ftplib clausklein$ ls -lrta /usr/bin/cmake-gui
lrwxr-xr-x 1 root staff 52 Aug 17 06:52 /usr/bin/cmake-gui - / 
Applications/CMake 2.8-9.app/Contents/bin/cmake-gui

claus-kleins-macbook-pro:ftplib clausklein$ cmake-gui --version
/Applications/cmake
CMake Error: CMake executable cannot be found at /Applications/cmake
cmake version 2.8.9
claus-kleins-macbook-pro:ftplib clausklein$ cmake --version
cmake version 2.8.9
claus-kleins-macbook-pro:ftplib clausklein$



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


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] ADD_DEPENDENCIES() and NonExisitngDependent is NOT an error?

2012-07-26 Thread Claus Klein

We use a complex cmake project with a lot of build order dependencies.
If something is misspelled, I would expect that cmake find this error.


Example:

cmake_minimum_required(VERSION 2.8.5)
project(ftplibcpp CXX)

add_executable(ftpList ftpList.cpp)
target_link_libraries(ftpList ftpcpp ${LIBS})

ADD_DEPENDENCIES(ftpList ftpcpp;NonExisitngDependent)   # this is ok  
for cmake but should be an error?
ADD_DEPENDENCIES(NonExistingTarget ftpcpp;NonExisitngDependent) #  
cmake ERROR


-

CMake Error at CMakeLists.txt:8 (ADD_DEPENDENCIES):
  add_dependencies Adding dependency to non-existent target:
  NonExistingTarget

...

IMO this should be too an error if one of the dependency targets does  
not exist at a cmake project.


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


[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] Cross-compilation for windows on Darwin with nighlty build fails

2012-07-14 Thread Claus Klein

Hi Eric,

I have the same behavior from command line and GUI.

The orig. project setup was: project(ftplibcpp)

with project(ftplibcpp CXX) it works:

claus-kleins-macbook-pro:build clausklein$ /opt/local/bin/cmake - 
DCMAKE_TOOLCHAIN_FILE=/Users/clausklein/Toolchain-cross-mingw32- 
linux.cmake ..

-- The CXX compiler identification is GNU 3.4.5
-- Check for working CXX compiler: /opt/local/bin/i386-mingw32-g++
-- Check for working CXX compiler: /opt/local/bin/i386-mingw32-g++ --  
works

-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/clausklein/Workspace/cpp/ 
ftplibpp-2.0.2/build


claus-kleins-macbook-pro:build clausklein$ rm -rf *

with language not set it fails:

claus-kleins-macbook-pro:build clausklein$ /opt/local/bin/cmake - 
DCMAKE_TOOLCHAIN_FILE=/Users/clausklein/Toolchain-cross-mingw32- 
linux.cmake ..

-- The C compiler identification is GNU 3.4.5
-- The CXX compiler identification is GNU 3.4.5
CMake Error at /Applications/CMake 2.8-8.app/Contents/share/cmake-2.8/ 
Modules/CMakeFindBinUtils.cmake:71 (MESSAGE):

  Could not find install_name_tool, please check your installation.
Call Stack (most recent call first):
  /Applications/CMake 2.8-8.app/Contents/share/cmake-2.8/Modules/ 
CMakeDetermineCXXCompiler.cmake:177 (INCLUDE)

  CMakeLists.txt:3 (project)


CMake Error: Error required internal CMake variable not set, cmake may  
be not be built correctly.

Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file:/Users/clausklein/ 
Workspace/cpp/ftplibpp-2.0.2/build/CMakeFiles/CMakeCXXCompiler.cmake

-- Configuring incomplete, errors occurred!
claus-kleins-macbook-pro:build clausklein$

#

The interesting this is that this works too without language setting:

/opt/local/bin/cmake -G Unix Makefiles \
-DCMAKE_SYSTEM_NAME=Windows -DCMAKE_INSTALL_PREFIX=C:/usr \
-DCMAKE_RC_COMPILER:FILEPATH=/opt/local/bin/i386-mingw32-windres \
-DCMAKE_CXX_COMPILER=/opt/local/bin/i386-mingw32-g++ \
-DCMAKE_C_COMPILER=/opt/local/bin/i386-mingw32-gcc \
-DCMAKE_FIND_ROOT_PATH=/opt/local/i386-mingw32/bin \
--check-system-vars \
..

Thank you for help :))

Claus

cmake_minimum_required(VERSION 2.8.5)
project(ftplibcpp CXX)
###FIXME project(ftplibcpp)

option(BUILD_SHARED_LIBS Build shared libraries off)

add_definitions(-DNOLFS)
add_definitions(-DNOSSL)

# Where to put all the LIBRARY targets when built.  This variable is used to
# initialize the LIBRARY_OUTPUT_DIRECTORY property on all the targets.
#FIXME set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)

# Make sure the linker can find the ftpcpp library once it is built.
link_directories(${LIBRARY_OUTPUT_PATH})

# Where to put all the RUNTIME targets when built.  This variable is used to
# initialize the RUNTIME_OUTPUT_DIRECTORY property on all the targets.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)

# Tell CMake to build a library from ftplib.cpp and fetchurl.cpp
add_library(ftpcpp ftplib.cpp fetchurl.cpp)
set_target_properties(ftpcpp PROPERTIES DEBUG_POSTFIX D)

if (NOT MSVC AND NOT MINGW )
  if (NOT BUILD_SHARED_LIBS)
# Create ftpcpp executable with NO dynamic dependency at all:
# or for all execuatables: LDFLAGS=-static cmake ..
set_target_properties(ftpcpp PROPERTIES LINK_FLAGS -static)
  endif (NOT BUILD_SHARED_LIBS)
else ()
  set(LIBS wsock32)
  if (BUILD_SHARED_LIBS)
target_link_libraries(ftpcpp ${LIBS})
  endif (BUILD_SHARED_LIBS)
endif ()

# install the lib
install(TARGETS ftpcpp DESTINATION lib)

# use the lib to build bin
add_executable(ftpList ftpList.cpp)
target_link_libraries(ftpList ftpcpp ${LIBS})

add_executable(ftpGet ftpGet.cpp)
target_link_libraries(ftpGet ftpcpp ${LIBS})

add_executable(ftpPut ftpPut.cpp)
target_link_libraries(ftpPut ftpcpp ${LIBS})

# install the bin
install(TARGETS ftpPut ftpGet ftpList DESTINATION bin)





On 14.07.2012, at 12:22, Eric Noulard wrote:


2012/7/13 Claus Klein claus.kl...@arcormail.de:

Can anyone please help?

Thanks in advance
Best Regards
Claus

With this CMAKE_TOOLCHAIN_FILE it just works, but there is always  
an error

the first time cmake configure step is started from GUI:


Do you have the same error with command line cmake?
[...]


# FIXME on APPLE this is needed too? (CmakeFindBinUtils.cmke)
set(CMAKE_INSTALL_NAME_TOOL ${USER_ROOT_PATH}/install_name_tool)


FindBinUtils should find this one on his own as soon as C or C++  
compiler

has been found (this is not working for fortran, see:
http://public.kitware.com/Bug/view.php?id=13379)



# CMake Error at /Applications/CMake
2.8-8.app/Contents/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake:71
(MESSAGE):
#   Could not find install_name_tool, please check your installation.

# Call Stack (most recent call first

Re: [CMake] Cross-compilation for windows on Darwin with nighlty build fails

2012-07-13 Thread Claus Klein

Can anyone please help?

Thanks in advance
Best Regards
Claus

With this CMAKE_TOOLCHAIN_FILE it just works, but there is always an  
error the first time cmake configure step is started from GUI:


#
# CMAKE_TOOLCHAIN_FILE
#
# the name of the target operating system
set(CMAKE_SYSTEM_NAME Windows)

# Choose an appropriate compiler prefix

# for classical mingw32
# see http://www.mingw.org/
set(COMPILER_PREFIX i386-mingw32)
### set(COMPILER_PREFIX i586-mingw32msvc)

# for 32 or 64 bits mingw-w64
# see http://mingw-w64.sourceforge.net/
## set(COMPILER_PREFIX i686-w64-mingw32)
## set(COMPILER_PREFIX x86_64-w64-mingw32


# here is the target environment located
set(USER_ROOT_PATH /opt/local/bin)
set(CMAKE_INSTALL_PREFIX /opt/local/${COMPILER_PREFIX} CACHE PATH   
FORCE )

set(CMAKE_FIND_ROOT_PATH ${DCMAKE_INSTALL_PREFIX} ${USER_ROOT_PATH} )


# which compilers to use for C and C++ (with path!)
## find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc)
set(CMAKE_C_COMPILER ${USER_ROOT_PATH}/${COMPILER_PREFIX}-gcc)
## find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++)
set(CMAKE_CXX_COMPILER ${USER_ROOT_PATH}/${COMPILER_PREFIX}-g++)

# FIXME for Windows, windres is needed too! (with path!)
## find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres)
set(CMAKE_RC_COMPILER ${USER_ROOT_PATH}/${COMPILER_PREFIX}-windres)

# FIXME on APPLE this is needed too? (CmakeFindBinUtils.cmke)
set(CMAKE_INSTALL_NAME_TOOL ${USER_ROOT_PATH}/install_name_tool)

# CMake Error at /Applications/CMake 2.8-8.app/Contents/share/ 
cmake-2.8/Modules/CMakeFindBinUtils.cmake:71 (MESSAGE):
#   Could not find install_name_tool, please check your installation.	 


# Call Stack (most recent call first):
#   /Applications/CMake 2.8-8.app/Contents/share/cmake-2.8/Modules/ 
CMakeDetermineCXXCompiler.cmake:177 (INCLUDE)

#   CMakeLists.txt:3 (project)



# adjust the default behaviour of the FIND_XXX() commands:
# search NEVER for programs in the build host directories!
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# search headers and libraries in the target environment only.
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


On 12.07.2012, at 23:05, Claus Klein wrote:


I found a way, but now the CMAKE_EXECUTABLE_SUFFIX is not empty?


--

Powered by www.kitware.com

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

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

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


[CMake] Cross-compilation for windows on Darwin with nighlty build fails

2012-07-12 Thread Claus Klein
I tried with the current nightly cmake binary to cross compile with  
mingw tools on Darwin.


But it fails and I have no right idea what goes wrong.

First, the rc compile was not found:

+ cmake -G 'Unix Makefiles' -DCMAKE_C_COMPILER=i386-mingw32-gcc - 
DCMAKE_CXX_COMPILER=i386-mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows-GNU - 
DCMAKE_INSTALL_PREFIX=C:/usr --check-system-vars ..
Also check system files when warning about unused and uninitialized  
variables.

-- The C compiler identification is GNU 3.4.5
-- The CXX compiler identification is GNU 3.4.5
CMake Error: your RC compiler: CMAKE_RC_COMPILER-NOTFOUND was not  
found.   Please set CMAKE_RC_COMPILER to a valid compiler path or name.

-- Check for working C compiler: /opt/local/bin/i386-mingw32-gcc
CMake Error at /usr/local/share/cmake-2.8/Modules/ 
CMakeRCInformation.cmake:22 (GET_FILENAME_COMPONENT):

  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  /usr/local/share/cmake-2.8/Modules/Platform/Windows-GNU.cmake:60  
(enable_language)
  /usr/local/share/cmake-2.8/Modules/ 
CMakeSystemSpecificInformation.cmake:36 (INCLUDE)

  CMakeLists.txt:2 (PROJECT)


CMake Error: CMAKE_RC_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working C compiler: /opt/local/bin/i386-mingw32-gcc --  
broken
CMake Error at /usr/local/share/cmake-2.8/Modules/ 
CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler /opt/local/bin/i386-mingw32-gcc is not able to  
compile a

  simple test program.

---

Than I defined it and the host binutils are used:

+ cmake -G 'Unix Makefiles' -DCMAKE_C_COMPILER=i386-mingw32-gcc - 
DCMAKE_CXX_COMPILER=i386-mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows-GNU - 
DCMAKE_INSTALL_PREFIX=C:/usr -DCMAKE_RC_COMPILER=i386-mingw32-windres  
--check-system-vars ..
Also check system files when warning about unused and uninitialized  
variables.

-- The C compiler identification is GNU 3.4.5
-- The CXX compiler identification is GNU 3.4.5
-- Check for working C compiler: /opt/local/bin/i386-mingw32-gcc
-- Check for working C compiler: /opt/local/bin/i386-mingw32-gcc --  
works

-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/local/bin/i386-mingw32-g++
-- Check for working CXX compiler: /opt/local/bin/i386-mingw32-g++ --  
works

-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
MINGW
-- Configuring done
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_RC_COMPILER= i386-mingw32-windres

-- The C compiler identification is GNU 3.4.5
-- The CXX compiler identification is GNU 3.4.5
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - no
-- Check for working C compiler: /opt/local/bin/i386-mingw32-gcc
-- Check for working C compiler: /opt/local/bin/i386-mingw32-gcc --  
works

-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag -  
no

-- Check for working CXX compiler: /opt/local/bin/i386-mingw32-g++
-- Check for working CXX compiler: /opt/local/bin/i386-mingw32-g++ --  
works

-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
MINGW
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/clausklein/Workspace/cpp/ 
ftplibpp-2.0.2/build

+ exit
claus-kleins-macbook-pro:build clausklein$ !gre
grep -w FILEPATH CMakeCache.txt
CMAKE_AR:FILEPATH=/opt/local/bin/ar
CMAKE_CXX_COMPILER:FILEPATH=/opt/local/bin/i386-mingw32-g++
CMAKE_C_COMPILER:FILEPATH=/opt/local/bin/i386-mingw32-gcc
CMAKE_INSTALL_NAME_TOOL:FILEPATH=/opt/local/bin/install_name_tool
CMAKE_LINKER:FILEPATH=/opt/local/bin/ld
CMAKE_MAKE_PROGRAM:FILEPATH=/opt/local/bin/gmake
CMAKE_NM:FILEPATH=/opt/local/bin/nm
CMAKE_OBJCOPY:FILEPATH=CMAKE_OBJCOPY-NOTFOUND
CMAKE_OBJDUMP:FILEPATH=CMAKE_OBJDUMP-NOTFOUND
CMAKE_RANLIB:FILEPATH=/opt/local/bin/ranlib
CMAKE_RC_COMPILER:FILEPATH=i386-mingw32-windres
CMAKE_STRIP:FILEPATH=/opt/local/bin/strip
CMAKE_XCODE_SELECT:FILEPATH=/usr/bin/xcode-select
claus-kleins-macbook-pro:build clausklein$

--

A a third try I defined all binutils too:


cmake -G Unix Makefiles \
-DCMAKE_C_COMPILER=i386-mingw32-gcc -DCMAKE_CXX_COMPILER=i386- 
mingw32-g++ \

-DCMAKE_SYSTEM_NAME=Windows-GNU -DCMAKE_INSTALL_PREFIX=C:/usr \
--check-system-vars \

Re: [CMake] Cross-compilation for windows on Darwin with nighlty build fails

2012-07-12 Thread Claus Klein

I found a way, but now the CMAKE_EXECUTABLE_SUFFIX is not empty?

/opt/local/bin/cmake -G Unix Makefiles \
-DCMAKE_C_COMPILER=/opt/local/bin/i386-mingw32-gcc - 
DCMAKE_CXX_COMPILER=/opt/local/bin/i386-mingw32-g++ \

-DCMAKE_SYSTEM_NAME=Windows-GNU -DCMAKE_INSTALL_PREFIX=C:/usr \
--check-system-vars \
-DCMAKE_RC_COMPILER:FILEPATH=/opt/local/bin/i386-mingw32-windres \
..

claus-kleins-macbook-pro:build clausklein$ ls -lrta lib/* bin/*
-rw-r--r-- 1 clausklein staff  28606 Jul 12 22:59 lib/libftpcpp.a
-rwxr-xr-x 1 clausklein staff 280615 Jul 12 22:59 bin/ftpList
-rwxr-xr-x 1 clausklein staff 279929 Jul 12 22:59 bin/ftpGet
-rwxr-xr-x 1 clausklein staff 279242 Jul 12 22:59 bin/ftpPut
claus-kleins-macbook-pro:build clausklein$ !gre
grep -w FILEPATH CMakeCache.txt
CMAKE_AR:FILEPATH=/opt/local/bin/i386-mingw32-ar
CMAKE_CXX_COMPILER:FILEPATH=/opt/local/bin/i386-mingw32-g++
CMAKE_C_COMPILER:FILEPATH=/opt/local/bin/i386-mingw32-gcc
CMAKE_INSTALL_NAME_TOOL:FILEPATH=/opt/local/bin/install_name_tool
CMAKE_LINKER:FILEPATH=/opt/local/bin/i386-mingw32-ld
CMAKE_MAKE_PROGRAM:FILEPATH=/opt/local/bin/gmake
CMAKE_NM:FILEPATH=/opt/local/bin/i386-mingw32-nm
CMAKE_OBJCOPY:FILEPATH=/opt/local/bin/i386-mingw32-objcopy
CMAKE_OBJDUMP:FILEPATH=/opt/local/bin/i386-mingw32-objdump
CMAKE_RANLIB:FILEPATH=/opt/local/bin/i386-mingw32-ranlib
CMAKE_RC_COMPILER:FILEPATH=/opt/local/bin/i386-mingw32-windres
CMAKE_STRIP:FILEPATH=/opt/local/bin/i386-mingw32-strip
claus-kleins-macbook-pro:build clausklein$

On 12.07.2012, at 22:23, Claus Klein wrote:


The ranlib and ar from build host is used.

Any idea what I should try or do would 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://www.cmake.org/mailman/listinfo/cmake


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


Re: [CMake] Nina Generator on Windows generates too long link cmd lines

2012-06-04 Thread Claus Klein

Yes, at least the old Darwin ar does not support this option!

claus-kleins-macbook-pro:ninja clausklein$ /usr/bin/ar -h
usage:  ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
claus-kleins-macbook-pro:ninja clausklein$

I think, solaris and BSD will have the same version, but not sure.

This future needs a runtime test, IMO

Claus

On 03.06.2012, at 22:55, Peter Kümmel wrote:


On 03.06.2012 01:02, Claus Klein wrote:

Hi Peter,

after a quick test with our code, I found again the problem with unix
ar utile for static libs. it does not support a linker response file!


Are you sure? Here (Ubuntu) ar lists @file as option.



And is is not clear to me who sets this cache values:
CMAKE_CXX_RESPONSE_FILE_LINK_FLAG:STRING=-Wl,@
CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL=TRUE
CMAKE_C_RESPONSE_FILE_LINK_FLAG:STRING=-Wl,@
CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL=TRUE


In the depths of the macro files interpreted at runtime.
You have to search for the strings in ...\CMake 2.8\share\cmake-2.8



I have found a problem if ninja is not at a std path installed. So  
the

rules.ninja files should use the absolute path to ninja executable.

Here my final Version.

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


--

Powered by www.kitware.com

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

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

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


Re: [CMake] Nina Generator on Windows generates too long link cmd lines

2012-06-03 Thread Claus Klein

Hi Peter,

I have tried it myself, but with different luck.

The Kdevelop works, but EclipseGenerator crashes while generating ...

May you have a look at it?

Claus



NinjaAddToKdevelopGenerator.patch
Description: Binary data


NinjaAddToEclipseGenerator.patch
Description: Binary data


On 02.06.2012, at 18:58, Claus Klein wrote:


Hi Peter,

thanks for the commit. I will do my tests with this code again.

But I have 2 more questions:

It is possible to use Nina with Kdevelop and Eclipse generators too?
And, too give more people a chance to test with ninja, is it  
possible to enable it at nightly builds for Windows and MAS-OS?


I have not Qt develop tools installed on Windows. But I want the  
GUI ;-))

So it would be nice if I could download the nightly binaries.

Claus


On 02.06.2012, at 14:58, Peter Kümmel wrote:


On 02.06.2012 12:03, Peter Kümmel wrote:

Hi Claus,

great you've started working on this!

I fixed your TODO and pusjed it to stage:
http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=242f152c392882c88c47f4bcc3dc52a3431d2968

CMake could now be build with msvc and mingw (when  
CMAKE_RC_COMPILER is set).




But it breaks mingw, because ar.exe doesn't like single backslashes  
in the rsp file.
With attached patch also mingw works. At least with -j1, otherwise  
there a access conflicts.


I've no idea how other build systems handle this.

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


--

Powered by www.kitware.com

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

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

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


--

Powered by www.kitware.com

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

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

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

Re: [CMake] Nina Generator on Windows generates too long link cmd lines

2012-06-03 Thread Claus Klein

I found the problem.

Now Eclipse and Ninja works too. .-))



NinjaAddToEclipseGenerator.patch
Description: Binary data




//Regards
Claus

On 03.06.2012, at 12:15, Claus Klein wrote:


Hi Peter,

I have tried it myself, but with different luck.

The Kdevelop works, but EclipseGenerator crashes while generating ...

May you have a look at it?

Claus

NinjaAddToKdevelopGenerator.patchNinjaAddToEclipseGenerator.patch
On 02.06.2012, at 18:58, Claus Klein wrote:


Hi Peter,

thanks for the commit. I will do my tests with this code again.

But I have 2 more questions:

It is possible to use Nina with Kdevelop and Eclipse generators too?
And, too give more people a chance to test with ninja, is it  
possible to enable it at nightly builds for Windows and MAS-OS?


I have not Qt develop tools installed on Windows. But I want the  
GUI ;-))

So it would be nice if I could download the nightly binaries.

Claus


On 02.06.2012, at 14:58, Peter Kümmel wrote:


On 02.06.2012 12:03, Peter Kümmel wrote:

Hi Claus,

great you've started working on this!

I fixed your TODO and pusjed it to stage:
http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=242f152c392882c88c47f4bcc3dc52a3431d2968

CMake could now be build with msvc and mingw (when  
CMAKE_RC_COMPILER is set).




But it breaks mingw, because ar.exe doesn't like single  
backslashes in the rsp file.
With attached patch also mingw works. At least with -j1, otherwise  
there a access conflicts.


I've no idea how other build systems handle this.

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


--

Powered by www.kitware.com

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

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

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


--

Powered by www.kitware.com

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

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

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


--

Powered by www.kitware.com

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

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

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

Re: [CMake] Nina Generator on Windows generates too long link cmd lines

2012-06-02 Thread Claus Klein

Hi Peter,

thanks for the commit. I will do my tests with this code again.

But I have 2 more questions:

It is possible to use Nina with Kdevelop and Eclipse generators too?
And, too give more people a chance to test with ninja, is it possible  
to enable it at nightly builds for Windows and MAS-OS?


I have not Qt develop tools installed on Windows. But I want the  
GUI ;-))

So it would be nice if I could download the nightly binaries.

Claus


On 02.06.2012, at 14:58, Peter Kümmel wrote:


On 02.06.2012 12:03, Peter Kümmel wrote:

Hi Claus,

great you've started working on this!

I fixed your TODO and pusjed it to stage:
http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=242f152c392882c88c47f4bcc3dc52a3431d2968

CMake could now be build with msvc and mingw (when  
CMAKE_RC_COMPILER is set).




But it breaks mingw, because ar.exe doesn't like single backslashes  
in the rsp file.
With attached patch also mingw works. At least with -j1, otherwise  
there a access conflicts.


I've no idea how other build systems handle this.

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


--

Powered by www.kitware.com

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

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

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


Re: [CMake] Nina Generator on Windows generates too long link cmd lines

2012-06-02 Thread Claus Klein

Hi Peter,

after a quick test with our code, I found again the problem with unix  
ar utile for static libs. it does not support a linker response file!


And is is not clear to me who sets this cache values:
CMAKE_CXX_RESPONSE_FILE_LINK_FLAG:STRING=-Wl,@
CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL=TRUE
CMAKE_C_RESPONSE_FILE_LINK_FLAG:STRING=-Wl,@
CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL=TRUE

I have found a problem if ninja is not at a std path installed. So the  
rules.ninja files should use the absolute path to ninja executable.


Here my final Version.

Claus



NinjaUseResponseFile.patch
Description: Binary data



On 02.06.2012, at 12:03, Peter Kümmel wrote:


Hi Claus,

great you've started working on this!

I fixed your TODO and pusjed it to stage:
http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=242f152c392882c88c47f4bcc3dc52a3431d2968

CMake could now be build with msvc and mingw (when CMAKE_RC_COMPILER  
is set).


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


--

Powered by www.kitware.com

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

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

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

Re: [CMake] Nina Generator on Windows generates too long link cmd lines

2012-06-01 Thread Claus Klein

Hi Bill,

I have tried to prepare a patch. It generates links rules like that:

# Rule for linking CXX executable.
rule CXX_EXECUTABLE_LINKER
  command = $PRE_LINK  /opt/local/libexec/ccache/g++   $FLAGS -Wl,- 
search_paths_first -Wl,-headerpad_max_install_names $LINK_FLAGS -Wl,@ 
$out.rsp  -o $out $LINK_LIBRARIES  $POST_BUILD

  description = Linking CXX executable $out
  rspfile = $out.rsp
  rspfile_content = $in

Please read carefully my comments, not all may be right now.
It may used as a prototype. I dit basic test only, it works at least  
on win32 and on my macbook. Pleas check.


Claus


NinjaGeneratorBuildCommandLine.patch
Description: Binary data


NinjaUseResponseFile.patch
Description: Binary data



On 30.05.2012, at 19:50, Bill Hoffman wrote:


On 5/30/2012 1:07 PM, Peter Kuemmel wrote:




The cmake code needs to be updated to use the native ninja response
files.   If you are interested in this work, I can help you figure  
out

where to make the changes.

-Bill


Have you started working on this? And is there somewhere already a  
branch?

If not, where is the best place for such a branch, github or stage?

Peter

No, no not much actual work...


However, what needs to be done is this:

http://martine.github.com/ninja/manual.html#_rule_variables
rspfile, rspfile_content
rule link
 command = link.exe /OUT$out [usual link flags here] @$out.rsp
 rspfile = $out.rsp
 rspfile_content = $in

We have to add this code to the cmNinjaNormalTargetGenerator.cxx

I think this method will also have to be updated to know about  
rspfiles:

cmGlobalNinjaGenerator::WriteRule


Claus did this by hand and it worked:

rule CXX_EXECUTABLE_LINKER
 #XXX command = cmd.exe /c $PRE_LINK  C:\Programme\CMake2.8\bin 
\cmake.exe -E vs_link_exe c:\PROGRA~1\MICROS~4\VC\bin\link.exe / 
nologo /OUT:$out /DEBUG /PDB:$TARGET_PDB /IMPLIB:$TARGET_IMPLIB / 
version:0.0  @$out.rsp  $POST_BUILD
 command = cmd.exe /c $PRE_LINK  C:\PROGRA~1\MICROS~4\VC\bin 
\link.exe /nologo /OUT:$out /DEBUG /PDB:$TARGET_PDB /IMPLIB: 
$TARGET_IMPLIB /version:0.0  @$out.rsp  $POST_BUILD

 description = Linking CXX executable $out
 rspfile = $out.rsp
 rspfile_content = $FLAGS $LINK_FLAGS $LINK_LIBRARIES $in



--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoff...@kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
--

Powered by www.kitware.com

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

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

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


--

Powered by www.kitware.com

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

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

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

[CMake] Nina Generator on Windows generates too long link cmd lines

2012-05-29 Thread Claus Klein

Hi All,

I am working with Nightly cmake build with ninja enabled on windows.
While testing a real complex project build, code generation and  
compiling works, but linking fails.


The command line with a view pre and post build rules including a huge  
count of libs and linkerflags is to long.

The hole link command is about 16K long!

Could it possible to generate a custom rule for each $PRE_LINK and  
each $POST_BUILD command?

And to use a linker script like with visual studio projects?

The same project with visual studio 2005 generator works fine.

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


Re: [CMake] Nina Generator on Windows generates too long link cmd lines

2012-05-29 Thread Claus Klein
Hi Bill

Yes send me the patches please

Claus

On 29.05.2012, at 23:12, Bill Hoffman bill.hoff...@kitware.com wrote:

 On 5/29/2012 4:00 PM, Claus Klein wrote:
 Hi All,
 
 I am working with Nightly cmake build with ninja enabled on windows.
 While testing a real complex project build, code generation and
 compiling works, but linking fails.
 
 The command line with a view pre and post build rules including a huge
 count of libs and linkerflags is to long.
 The hole link command is about 16K long!
 
 Could it possible to generate a custom rule for each $PRE_LINK and each
 $POST_BUILD command?
 And to use a linker script like with visual studio projects?
 
 The same project with visual studio 2005 generator works fine.
 
 
 Another reason the windows ninja is disabled by default... :)
 
 What ninja branch are you using?  It needs to use response files.
 
 
 This ninja adds the response files:
 http://sourceforge.net/projects/cmakescript/files/ninja.exe/download
 
 The cmake code needs to be updated to use the native ninja response files.   
 If you are interested in this work, I can help you figure out where to make 
 the changes.
 
 -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://www.cmake.org/mailman/listinfo/cmake
--

Powered by www.kitware.com

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

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

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


Re: [CMake] Why is Ninja generator disabled by default?

2012-05-28 Thread Claus Klein
Please tack a lock at my builds tooAll of this errors are NOT caused by ninja!http://open.cdash.org/buildSummary.php?buildid=2315144But with ninja I get the same result.Some of the errors are caused by the fact that I use the current gcc47 compiler (build with macports), which does not understand the -arch options used by this tests!For the X11 error here is a patch which fix it (missing include)The others, no idea, but this is a makefile project, not ninja!With regards,Claus

TestsX11HelloWorldX11.patch
Description: Binary data
On 22.05.2012, at 13:02, David Cole wrote:Please take a look at the CMake dashboard: http://open.cdash.org/index.php?project=CMakeI will allow the ninja generator to be enabled by default after interested parties fix all the failing tests in the "Nightly Expected" section related to the ninja generator submissions. Honestly, I was opposed to the ninja generator being merged to 'master' and enabled at all because of the failing tests on our dashboard. Luckily for all you ninja fans out there, I do not have dictator powers. ;-) DavidOn Mon, May 21, 2012 at 4:27 PM, Andreas Mohr a...@lisas.de wrote: Hi,  On Mon, May 21, 2012 at 10:40:03AM -0400, cmake-requ...@cmake.org wrote:  From: David Cole david.c...@kitware.com  I agree with Bill here -- we cannot turn it on by default until it works  sufficiently for typical use cases.  So, what would be needed to turn CMake on by default? 'cause it does not "work sufficiently for typical use cases" :- /asbestos_suit   While there might be backwards compatibility reasons for only actually having Ninja truly enabled once it truly works (after all after some years certain user code may resort to merely checking whether the feature is provided or not, rather than doing sufficiently precise checks "well, in this CMake pre-beta it actually was still broken, and 3 days later they fixed it"), I cannot help but wonder whether this configuration (build-time disabling rather than a slightly special way of runtime disabling) is hindering progress a bit due to artificially limiting developer uptake. OTOH people who tend to like playing with certain bleeding edge things (like me) are actually able to enable it manually - it's just somewhat more effort:   For specialized use cases, if you know you want to turn it on, you can  easily re-build a CMake of your own that has it enabled. Simply turn on the  advanced cache option CMAKE_ENABLE_NINJA when configuring CMake.   Andreas Mohr  --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://www.cmake.org/mailman/listinfo/cmake--

Powered by www.kitware.com

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

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

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

[CMake] cmake self test fails on Darwin - 9.8.0 - i386 with gcc47 and spaces in path

2012-05-27 Thread Claus Klein

Hi all,

while testing the ninja generator I created a reference binary tree  
with gmake an gcc47 installed with macports.


I created a new empty dir with

mkdir /Users/clausklein/Downloads/My Cmake Test
and created the makefiles with a build scripts.

It seems that the spaces in CWD makes trouble while make test?

#!/bin/sh

MAKECOMMAND=/opt/local/bin/gmake

set -x
set -e

/usr/local/bin/cmake -G Eclipse CDT4 - Unix Makefiles - 
DCMAKE_TEST_GENERATOR:STRING=Ninja \
-DCMAKE_TEST_MAKEPROGRAM:FILEPATH=${MAKECOMMAND} - 
DCMAKE_ENABLE_NINJA:BOOL=ON \

-DBUILD_CursesDialog:BOOL=OFF -DBUILD_QtDialog:BOOL=OFF \
-DMAKECOMMAND:STRING=${MAKECOMMAND} --ignore-errors --no-builtin- 
rules \

../cmake

time ${MAKECOMMAND} --silent --no-builtin-rules -B

# real  3m34.380s
# user  2m57.410s
# sys   0m29.289s

time ${MAKECOMMAND} --silent --no-builtin-rules

# real  0m1.911s
# user  0m1.060s
# sys   0m0.746s


# exit


${MAKECOMMAND} --no-builtin-rules test
# ...
# 56% tests passed, 104 tests failed out of 236
#
# Label Time Summary:
# Label1=   0.07 sec
# Label2=   0.07 sec
#
# Total Test time (real) = 584.77 sec
#
# The following tests FAILED:
#24 - CommandLineTest (Failed)
#25 - FindPackageTest (Failed)
#26 - FindModulesExecuteAll (Failed)
#27 - StringFileTest (Failed)
#28 - TryCompile (Failed)
#29 - TarTest (Failed)
#30 - SystemInformation (Failed)
#31 - MathTest (Failed)
#32 - Simple (Failed)
#33 - PreOrder (Failed)
#35 - FortranOnly (Failed)
#36 - VSGNUFortran (Failed)
#37 - COnly (Failed)
#38 - CxxOnly (Failed)
#39 - IPO (Failed)
#40 - OutDir (Failed)
#41 - ObjectLibrary (Failed)
#42 - NewlineArgs (Failed)
#43 - SetLang (Failed)
#44 - ExternalOBJ (Failed)
#45 - LoadCommand (Failed)
#46 - LinkDirectory (Failed)
#47 - LinkLanguage (Failed)
#48 - LinkLine (Failed)
#49 - MacroTest (Failed)
#50 - FunctionTest (Failed)
#51 - ReturnTest (Failed)
#52 - Properties (Failed)
#53 - Assembler (Failed)
#54 - SourceGroups (Failed)
#55 - Preprocess (Failed)
#56 - ExportImport (Failed)
#57 - Unset (Failed)
#58 - PolicyScope (Failed)
#61 - Architecture (Failed)
#62 - BundleUtilities (Failed)
#63 - Qt4Deploy (Failed)
#66 - Module.CheckTypeSize (Failed)
#67 - Module.GenerateExportHeader (Failed)
#68 - LinkFlags-prepare (Failed)
#75 - SubProject (Failed)
#76 - SubProject-Stage2 (Failed)
#77 - Framework (Failed)
#78 - TargetName (Failed)
#79 - LibName (Failed)
#80 - CustComDepend (Failed)
#81 - ArgumentExpansion (Failed)
#82 - CustomCommand (Failed)
#83 - CustomCommandWorkingDirectory (Failed)
#84 - OutOfSource (Failed)
#85 - BuildDepends (Failed)
#86 - SimpleInstall (Failed)
#87 - SimpleInstall-Stage2 (Failed)
#88 - CPackComponents (Failed)
#89 - CPackComponentsForAll-ZIP-default (Failed)
#90 - CPackComponentsForAll-ZIP-OnePackPerGroup (Failed)
#91 - CPackComponentsForAll-ZIP-IgnoreGroup (Failed)
#92 - CPackComponentsForAll-ZIP-AllInOne (Failed)
#93 - CPackComponentsForAll-DragNDrop-default (Failed)
#94 - CPackComponentsForAll-DragNDrop-OnePackPerGroup (Failed)
#95 - CPackComponentsForAll-DragNDrop-IgnoreGroup (Failed)
#96 - CPackComponentsForAll-DragNDrop-AllInOne (Failed)
#97 - CPackTestAllGenerators (Failed)
#98 - X11 (Failed)
#   102 - LoadedCommandOneConfig (Failed)
#   103 - complex (Failed)
#   104 - complexOneConfig (Failed)
#   105 - Example (Failed)
#   106 - Environment (Failed)
#   107 - QtAutomoc (Failed)
#   108 - ExternalProject (Failed)
#   109 - TutorialStep1 (Failed)
#   110 - TutorialStep2 (Failed)
#   111 - TutorialStep3 (Failed)
#   112 - TutorialStep4 (Failed)
#   113 - TutorialStep5 (Failed)
#   114 - TutorialStep6 (Failed)
#   115 - TutorialStep7 (Failed)
#   116 - testing (Failed)
#   117 - wrapping (Failed)
#   118 - qtwrapping (Failed)
#   119 - testdriver1 (Failed)
#   120 - testdriver2 (Failed)
#   121 - testdriver3 (Failed)
#   122 - Dependency (Failed)
#   123 - JumpWithLibOut (Failed)
#   124 - JumpNoLibOut (Failed)
#   125 - Plugin (Failed)
#   126 - linkorder1 (Failed)
#   127 - linkorder2 (Failed)
#   128 - SubDirSpaces (Failed)
#   129 - SubDir (Failed)
#   130 - CheckCompilerRelatedVariables (Failed)
#   131 - BundleTest (Failed)
#   132 - CFBundleTest (Failed)
#   133 - ObjC++ (Failed)
#   134 - BundleGeneratorTest (Failed)
#   140 - TestsWorkingDirectory (Failed)
#   163 - CMakeCommands.target_link_libraries 

[CMake] cmake self build with ninja works on Darwin, but a view tests fail

2012-05-27 Thread Claus Klein

Hi all,

I tried to build cmake with ninja generator enabled and build cmake  
itself with ninja.


Nice, it works ;-))

Only a view tests fails, but most of the problems are NOT caused by  
ninja.


It seems, that while testing, cmake on Darwin use options only valid  
for old native apple gcc?


But I use gcc47 installed with macports!

Here is my test script:

#!/bin/sh

MAKECOMMAND=/opt/local/bin/ninja

set -x
set -e

/usr/local/bin/cmake -G Ninja -DCMAKE_TEST_GENERATOR:STRING=Ninja \
-DCMAKE_TEST_MAKEPROGRAM:FILEPATH=${MAKECOMMAND} - 
DCMAKE_ENABLE_NINJA:BOOL=ON \

-DBUILD_CursesDialog:BOOL=OFF -DBUILD_QtDialog:BOOL=OFF \
-DMAKECOMMAND:STRING=${MAKECOMMAND} -d stats \
../cmake

time ${MAKECOMMAND} clean

# Cleaning... 783 files.

time ${MAKECOMMAND} -d stats

# + /opt/local/bin/ninja -d stats
# ...
# [405/405] Generating ../Docs/cmake.txt
# metriccount   avg (us)total (ms)
# .ninja parse  2   5540.5  11.1
# canonicalize str  29860.3 1.0
# canonicalize path 29860.2 0.5
# lookup node   29860.1 0.4
# .ninja_log load   1   5449.0  5.4
# node stat 10145.2 5.3
# depfile load  378 7.8 2.9
#
# path-node hash load 0.73 (1131 entries / 1543 buckets)
#
# real  1m55.262s
# user  3m1.512s
# sys   0m26.803s

time ${MAKECOMMAND} -d stats -d explain

# + /opt/local/bin/ninja -d stats -d explain
# ninja: no work to do.
# metriccount   avg (us)total (ms)
# .ninja parse  2   5645.0  11.3
# canonicalize str  29860.3 1.0
# canonicalize path 10624   0.2 1.9
# lookup node   10624   0.2 2.1
# .ninja_log load   1   4944.0  4.9
# node stat 15656.9 10.8
# depfile load  378 52.419.8
#
# path-node hash load 0.55 (1682 entries / 3079 buckets)
#
# real  0m0.057s
# user  0m0.030s
# sys   0m0.023s


exit


${MAKECOMMAND} test

# Total Test time (real) = 860.22 sec

# The following tests FAILED:
#54 - ExportImport (Failed)
#59 - Architecture (Failed)
#61 - Qt4Deploy (Failed)
#83 - BuildDepends (Failed)
#93 - CPackComponentsForAll-DragNDrop-IgnoreGroup (Failed)
#94 - CPackComponentsForAll-DragNDrop-AllInOne (Failed)
#96 - X11 (Failed)
#   128 - BundleTest (Failed)
#   129 - CFBundleTest (Failed)
#   130 - ObjC++ (Failed)
#   230 - CMake.CheckSourceTree (Failed)
# Errors while running CTest
# ninja: build stopped: subcommand failed.


I have prepared a small patch to fix the X11 test.

For the others, I need  your help please.
I attach the logs of my manually started tests as info.

With regards
Claus




TestsX11HelloWorldX11.patch
Description: Binary data


#54 - ExportImport (Failed)

cd /Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport
claus-kleins-macbook-pro:ExportImport clausklein$ ninja
[2/5] Generating ExportProject
loading initial cache file 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/InitialCache.cmake
Internal cmake changing into directory: 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/Export
 CMake output ==
Configuring
Configuring done
Generating
Generating done
Build files have been written to: 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/Export
 End CMake output ==
Change Dir: 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/Export

Run Build Command:/opt/local/bin/ninja install
[1/1] Install the project...
-- Install configuration: 
-- Installing: 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/Root/bin/testExe1-4
-- Installing: 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/Root/bin/testExe1
-- Installing: 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/Root/lib/libtestLib1.a
-- Installing: 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/Root/lib/libtestLib2.a
-- Installing: 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/Root/bin/testExe2
-- Installing: 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/Root/lib/libtestLib3lib.1.2.dylib
-- Installing: 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/Root/lib/libtestLib3lib.3.dylib
-- Installing: 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/Root/Frameworks/testLib4.framework
-- Installing: 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/Root/Frameworks/testLib4.framework/Versions
-- Installing: 
/Users/clausklein/Downloads/CmakeNinjaBuildDir/Tests/ExportImport/Root/Frameworks/testLib4.framework/Versions/A
-- Installing: 

Re: [CMake] cmake self build with ninja works on Darwin, but a view tests fail

2012-05-27 Thread Claus Klein

Hi Richard,

do you mean I shall do:

make Experimental
# or
ninja Experimental

ot my binary dir?

Claus


On 27.05.2012, at 12:36, Richard Wackerbarth wrote:


Claus,

Can you try to set this up to submit to the dashboard?

Since you think that many of the problems are not related to Ninja,  
please also try it without using ninja, but rather Unix makefiles  
and everything else the same. It will be interesting to see what  
fails under those conditions. Again, submitting to the dashboard is  
a better way to document the particulars of the failure.


Richard

On May 27, 2012, at 5:26 AM, Claus Klein wrote:
Only a view tests fails, but most of the problems are NOT caused by  
ninja.


It seems, that while testing, cmake on Darwin use options only  
valid for old native apple gcc?


But I use gcc47 installed with macports!


--

Powered by www.kitware.com

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

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

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

Re: [CMake] cmake self build with ninja works on Darwin, but a view tests fail

2012-05-27 Thread Claus Klein

Ok,
done.

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

On 27.05.2012, at 12:36, Richard Wackerbarth wrote:


Claus,

Can you try to set this up to submit to the dashboard?

Since you think that many of the problems are not related to Ninja,  
please also try it without using ninja, but rather Unix makefiles  
and everything else the same. It will be interesting to see what  
fails under those conditions. Again, submitting to the dashboard is  
a better way to document the particulars of the failure.


Richard

On May 27, 2012, at 5:26 AM, Claus Klein wrote:
Only a view tests fails, but most of the problems are NOT caused by  
ninja.


It seems, that while testing, cmake on Darwin use options only  
valid for old native apple gcc?


But I use gcc47 installed with macports!


--

Powered by www.kitware.com

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

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

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

Re: [CMake] cmake self test fails on Darwin - 9.8.0 - i386 with gcc47 and spaces in path

2012-05-27 Thread Claus Klein

I have uploaded my test result:
http://open.cdash.org/viewTest.php?onlyfailedbuildid=2312336
Claus

On 27.05.2012, at 12:10, Claus Klein wrote:


Hi all,

while testing the ninja generator I created a reference binary tree  
with gmake an gcc47 installed with macports.


I created a new empty dir with

mkdir /Users/clausklein/Downloads/My Cmake Test
and created the makefiles with a build scripts.

It seems that the spaces in CWD makes trouble while make test?


No space problem!

/Users/clausklein/Downloads/CmakeBuildDir/bin/ctest --build-and-test  
/Users/clausklein/Downloads/cmake/Tests/CommandLineTest /Users/ 
clausklein/Downloads/CmakeBuildDir/Tests/CommandLineTest --build-two- 
config --build-generator Ninja --build-makeprogram /opt/local/ 
bin/gmake --build-project CommandLineTest --test-command  
CommandLineTest


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

Re: [CMake] cmake self test fails on Darwin - 9.8.0 - i386 with gcc47 and spaces in path

2012-05-27 Thread Claus Klein

Hi Richard,

I have set it to i386.
I have Xcode 3.1 installed year ago to bootstrap macports.
I never use it!

This problems for example are caused that my gcc47 compiler is used to  
compile objectc++, but it is not build to do this!


All this errors are have the this kind of reason, none of them is  
caused from ninja.


And without ninja, I have more trouble as I want.

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

// Regards
Claus


Run Build Command:/opt/local/bin/ninja
[1/2] Building CXX object CMakeFiles/ObjC++.dir/objc++.mm.o
FAILED: /opt/local/bin/c++ -MMD -MT CMakeFiles/ObjC++.dir/objc+ 
+.mm.o -MF CMakeFiles/ObjC++.dir/objc++.mm.o.d -o CMakeFiles/ObjC+ 
+.dir/objc++.mm.o -c /Users/clausklein/Downloads/cmake/Tests/ObjC++/ 
objc++.mm
/Users/clausklein/Downloads/cmake/Tests/ObjC++/objc++.mm:1:21: fatal  
error: iostream.h: No such file or directory

compilation terminated.
ninja: build stopped: subcommand failed.

#

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
FAILED: /opt/local/bin/gcc   -arch ppc -isysroot /Developer/SDKs/ 
MacOSX10.5.sdk -MMD -MT CMakeFiles/bar.dir/bar.c.o -MF CMakeFiles/ 
bar.dir/bar.c.o.d -o CMakeFiles/bar.dir/bar.c.o   -c /Users/clausklein/ 
Downloads/cmake/Tests/Architecture/bar.c

gcc: error: unrecognized option '-arch'
ninja: build stopped: subcommand failed.



On 27.05.2012, at 15:06, Richard Wackerbarth wrote:

The first thing that I notice is that you do not seem to have Xcode  
4 installed.
Since your compiler does not handle ppc code, you need to set  
CMAKE_OSX_ARCHITECTURES to keep your compiler happy.


Also, I readily cannot tell from the dashboard if you are using  
ninja. Please use Unix makefiles first so that we can sort out  
problems related to your compiler installation. Then, once you have  
those issues addressed, we can take a look at ninja.


Richard

On May 27, 2012, at 7:21 AM, Claus Klein wrote:


I have uploaded my test result:
http://open.cdash.org/viewTest.php?onlyfailedbuildid=2312336
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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] cmake self test fails on Darwin - 9.8.0 - i386 with gcc47 and spaces in path

2012-05-27 Thread Claus Klein

done, now it works better.

Same with and without ninja!

Claus

On 27.05.2012, at 18:24, Richard Wackerbarth wrote:

You need to clean out your build tree. You have things left over  
from the previous builds using ninja.


Internal cmake changing into directory: /Users/clausklein/Downloads/ 
My Cmake Test/Tests/Architecture Error: cmake execution failed CMake  
Error: Error: generator : Unix Makefiles Does not match the  
generator used previously: Ninja Either remove the CMakeCache.txt  
file or choose a different binary directory.
Keep a separate build tree for Unix makefiles and for Ninja builds.  
You can use the same source tree if you wish.


Richard

On May 27, 2012, at 11:19 AM, Claus Klein wrote:


Hi Richard,

I have set it to i386.
I have Xcode 3.1 installed year ago to bootstrap macports.
I never use it!

This problems for example are caused that my gcc47 compiler is used  
to compile objectc++, but it is not build to do this!


All this errors are have the this kind of reason, none of them is  
caused from ninja.


And without ninja, I have more trouble as I want.

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

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

Re: [CMake] Why is Ninja generator disabled by default?

2012-05-22 Thread Claus Klein

it works on my macbook:

/usr/local/CMake 2.8-8.app/Contents/bin/cmake --version
cmake version 2.8.8.20120520-g4742e

claus-kleins-macbook-pro:CompileCommandOutput clausklein$ /usr/local/ 
CMake 2.8-8.app/Contents/bin/cmake -G Ninja -DMAKE_SUPPORTS_SPACES=1

-- The CXX compiler identification is GNU 4.7.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag -  
yes

-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/clausklein/Downloads/cmake/ 
Tests/CompileCommandOutput


claus-kleins-macbook-pro:CompileCommandOutput clausklein$ ninja -d  
explain
ninja explain: output CMakeFiles/test1.dir/file_with_spaces.cxx.o  
doesn't exist

ninja explain: CMakeFiles/test1.dir/file_with_spaces.cxx.o is dirty
ninja explain: output CMakeFiles/test2.dir/relative.cxx.o doesn't exist
ninja explain: CMakeFiles/test2.dir/relative.cxx.o is dirty
ninja explain: output CMakeFiles/CompileCommandOutput.dir/ 
compile_command_output.cxx.o doesn't exist
ninja explain: CMakeFiles/CompileCommandOutput.dir/ 
compile_command_output.cxx.o is dirty

ninja explain: libtest1.a is dirty
ninja explain: libtest2.dylib is dirty
ninja explain: CompileCommandOutput is dirty
ninja explain: libtest1.a is dirty
ninja explain: libtest2.dylib is dirty
[6/6] Linking CXX executable CompileCommandOutput
claus-kleins-macbook-pro:CompileCommandOutput clausklein$

claus-kleins-macbook-pro:CompileCommandOutput clausklein$ touch file\  
with\ spaces.cxx
claus-kleins-macbook-pro:CompileCommandOutput clausklein$ ninja -d  
explain
ninja explain: output CMakeFiles/test1.dir/file_with_spaces.cxx.o  
older than most recent input file with spaces.cxx (1337723824000  
vs 1337723927000)

ninja explain: CMakeFiles/test1.dir/file_with_spaces.cxx.o is dirty
ninja explain: libtest1.a is dirty
ninja explain: CompileCommandOutput is dirty
ninja explain: libtest1.a is dirty
[3/3] Linking CXX executable CompileCommandOutput
claus-kleins-macbook-pro:CompileCommandOutput clausklein$


On 22.05.2012, at 13:35, Richard Wackerbarth wrote:

One of the differences that shows up in the dashboard is that there  
is a compile test which passes with normal Unix file paths, but  
fails when there is a space in one of the directory names. Perhaps  
we need to add an explicit test for everyone, ninja or otherwise, to  
test that compiles work with spaces in the path. I have a feeling  
that we may find additional failures.


On May 22, 2012, at 6:02 AM, David Cole wrote:


Please take a look at the CMake dashboard:

  http://open.cdash.org/index.php?project=CMake

I will allow the ninja generator to be enabled by default after  
interested parties fix all the failing tests in the Nightly  
Expected section related to the ninja generator submissions.


Honestly, I was opposed to the ninja generator being merged to  
'master' and enabled at all because of the failing tests on our  
dashboard. Luckily for all you ninja fans out there, I do not have  
dictator powers. ;-)



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


--

Powered by www.kitware.com

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

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

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

Re: [CMake] Why is Ninja generator disabled by default?

2012-05-20 Thread Claus Klein
Hi Bill,thank youfor that info.Indeed, the only major issue I can see is the problem with broken CMakeLists.txt files.http://public.kitware.com/Bug/view.php?id=13105But the solution is quit simple: cmake must add the missing include rules.ninja to the generated build.ninja file.You should know, many people do cross-compile on an UNIX like host (including macos), because it is mutch faster than Windows.With mingw or ppc toolchains build with busybox it is quiet easy (and fast)In these case, the ninja generator can double the build speed again!It is so fast, that the time-stamp resolution with secs is not enough, I have situations, where I need the nsec resolution too while building!I have provided a patch for ninja to used stat64() and a higher resolutions than secs.So for me nina works quiet well on OSX with gcc (tested with macports gcc V4.x, V4.6, V4.7 and mingw).The xcode IDE use a very old gcc, I would never use it!As IDE I use Eclipse and NetBeens, it works well with ninja ( with a makefile stub or direct)On Windows I use cygwin, mingw and gnu tools with Eclipse too, but I prefer a UNIX like development host.So please, there is no reason to disable the ninja generator by default.With regards,Clausp.s. try this script on an unix like system with this CMakeLists file to see what happens if the system is very fast.

bootstrap.sh
Description: Binary data
cmake_minimum_required(VERSION 2.8)
project(ninja_reconfigure_destroy_test CXX)

if(NOT CMAKE_GENERATOR MATCHES Ninja)
  message(FATAL_ERROR CMAKE_GENERATOR is not set to Ninja!)
endif(NOT CMAKE_GENERATOR MATCHES Ninja)

file(WRITE test.cpp
int main()
{
  return 0;
})

set(file_list
  test.cpp
#FIXME test_not_existing_file.cpp # == TODO: UNCOMMENT THIS LINE after 
first successfully build!
)

add_executable(test ${file_list})

On 18.05.2012, at 23:48, Bill Hoffman wrote:On 5/18/2012 5:37 PM, Claus Klein wrote:Hi,I downloaded the newest version 2.8 of cmake for MACOS and dit not foundthe new generator for ninja.So I downloaded the sources and build it myself.It seems to work fine and just 2 times faster than with make.Why is it disabled?See my post here:http://www.cmake.org/pipermail/cmake/2012-May/050304.htmlI assume you are on windows or Mac.So, if you are 2 times faster on windows it is because incremental builds are totally broken (although I suspect it will still be faster)... On the mac, you would be ok as long as the project does not create frameworks or app bundles.-Bill--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://www.cmake.org/mailman/listinfo/cmake--

Powered by www.kitware.com

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

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

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

[CMake] Why is Ninja generator disabled by default?

2012-05-18 Thread Claus Klein

Hi,

I downloaded the newest version 2.8 of cmake for MACOS and dit not  
found the new generator for ninja.


So I downloaded the sources and build it myself.

It seems to work fine and just 2 times faster than with make.

Why is it disabled?


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


Re: [CMake] Cmake 2.8.2 Bug under windows

2010-08-24 Thread Claus Klein

Hi Brad,

I have tested this version today, but the problem still exist!

Best regards,
Claus

On 23.08.2010, at 14:13, Brad King wrote:


On 08/21/2010 03:31 AM, Claus Klein wrote:

can you please check if this may related also to this BUG:

http://cmake.org/Bug/view.php?id=11153

It happens on Windows only at a root dir.


That looks like the same problem.  Please try our nightly build
version cmake-2.8.2.20100819-gc7c6:

http://www.cmake.org/files/dev/cmake-2.8.2.20100819-gc7c6-win32- 
x86.exe


Thanks,
-Brad


___
Powered by www.kitware.com

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

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

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


Re: [CMake] How to add CORBA idl files to Visual Studio source group

2010-08-22 Thread Claus Klein

Ok,
I found the solution myself; I have to add:
set_source_files_properties(interface1.idl PROPERTIES HEADER_FILE_ONLY  
TRUE)


But I do not understand why this is needed with VS2005?
By the way, the REGULAR_EXPRESSION does not work?

I have to use the FILES parameter to group the idl files!
That is really strange.

Claus

On 19.08.2010, at 22:59, Claus Klein wrote:


Hi,

I have a project with CORBA idl files, which will be compiled with a  
tao idl compiler to source and header files via a:


add_custom_command(OUTPUT output1 [output2 ...] ...)

I defined a source group with:

source_group(idlfiles REGULAR_EXPRESSION *.idl)

The generated source are added  with ohter source to build libs  and  
executables for different subsystems:


 add_library(interfacelib1 interface1.idl interface1C.cpp   ).

I add the idl files too. The idlfiles group was filled with my idl  
files. OK, that was my intention.

That works with header files, but not with idl files:

When I compile the project, there are build error because the VS2005  
does not know who to compile the .idl files?


All works fine without the idl file in the source list of the libs.  
But can't see the idl file in the VS project.


Is there an other way to get the idl files to a source group under  
there library projects?



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


___
Powered by www.kitware.com

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

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

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

Re: [CMake] Cmake 2.8.2 Bug under windows

2010-08-21 Thread Claus Klein

Hi,

can you please check if this may related also to this BUG:

http://cmake.org/Bug/view.php?id=11153

It happens on Windows only at a root dir.

Thanks,
Claus

On 16.08.2010, at 15:31, Brad King wrote:


On 08/13/2010 06:03 PM, J Decker wrote:

Yes, this patch fixes the problem thank you.


Thanks for testing it.  I've committed upstream.

-Brad
___
Powered by www.kitware.com

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

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

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


___
Powered by www.kitware.com

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

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

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


[CMake] How to add CORBA idl files to Visual Studio source group

2010-08-19 Thread Claus Klein

Hi,

I have a project with CORBA idl files, which will be compiled with a  
tao idl compiler to source and header files via a:


add_custom_command(OUTPUT output1 [output2 ...] ...)

I defined a source group with:

source_group(idlfiles REGULAR_EXPRESSION *.idl)

The generated source are added  with ohter source to build libs  and  
executables for different subsystems:


 add_library(interfacelib1 interface1.idl interface1C.cpp   ).

I add the idl files too. The idlfiles group was filled with my idl  
files. OK, that was my intention.

That works with header files, but not with idl files:

When I compile the project, there are build error because the VS2005  
does not know who to compile the .idl files?


All works fine without the idl file in the source list of the libs.  
But can't see the idl file in the VS project.


Is there an other way to get the idl files to a source group under  
there library projects?



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


Re: [CMake] cmake out of source build writes build files at source dirs?

2010-08-19 Thread Claus Klein

Hi Alex,

No, I dit not write a bug report yet.

The 10994 seems an other problem, I have the CMakeLists.txt at the  
root dir, together with my build subdir.
So my binary build tree is located at inside the source tree at  
project root.

And this is the root of the substituded drive.

Claus

On 17.08.2010, at 22:42, Alexander Neundorf wrote:


On Monday 16 August 2010, Bo Thorsen wrote:

Hi Claus,

If you didn't already, please post this to http://cmake.org/Bug  
instead.

The CMake people usually don't take bug reports from this list.


Is this related to this one ?
http://public.kitware.com/Bug/view.php?id=10994

Alex
___
Powered by www.kitware.com

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

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

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


___
Powered by www.kitware.com

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

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

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


Re: [CMake] cmake out of source build writes build files at source dirs?

2010-08-19 Thread Claus Klein

Ok, done

http://cmake.org/Bug/view.php?id=11153

//regards
Claus

On 16.08.2010, at 09:28, Bo Thorsen wrote:


Hi Claus,

If you didn't already, please post this to http://cmake.org/Bug  
instead. The CMake people usually don't take bug reports from this  
list.


Bo.

Den 28-07-2010 20:34, Claus Klein skrev:

Today, I discovered than in the special case of a substituted
PROJECT_SOURCE_DIR,
all build files for subdir packages are created in PROJECT_SOURCE_DIR
and not at the PROJECT_BINARY_DIR.

I use windows cmd shell
subst w: z:/some/deep/path/to/source/dir

Than I create a new build dir:

cd /d w:/
mkdir build
cd build
cmake ..


after that, all subdirs of the source dir are created as
w:/buildsubdir1
w:/buildsubdir2
...
filled with the cmake build files.

I tested cmake 2.8.0, 2.8.1 and 2.8.2 version. all have the same  
behaviour!

The created project builds fine too.

It seems that the PROJECT_BINARY_DIR and the subdir paths are
concatenated without a path separator.

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




Bo Thorsen.
Monty Program AB.

--

MariaDB: MySQL replacement
Community developed. Feature enhanced. Backward compatible.
___
Powered by www.kitware.com

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

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

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


___
Powered by www.kitware.com

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

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

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


[CMake] cmake out of source build writes build files at source dirs?

2010-07-28 Thread Claus Klein
Today, I discovered than in the special case of a substituted  
PROJECT_SOURCE_DIR,
all build files for subdir packages are created in PROJECT_SOURCE_DIR  
and not at the PROJECT_BINARY_DIR.


I use windows cmd shell
 subst w: z:/some/deep/path/to/source/dir

Than I create a new build dir:

cd /d w:/
mkdir build
cd build
cmake ..


after that, all subdirs of the source dir are created as
w:/buildsubdir1
w:/buildsubdir2
...
filled with the cmake build files.

I tested cmake 2.8.0, 2.8.1 and 2.8.2 version. all have the same  
behaviour!

The created project builds fine too.

It seems that the PROJECT_BINARY_DIR and the subdir paths are  
concatenated without a path separator.


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


[CMake] How to add a lib in a target/tool independent way?

2010-07-20 Thread Claus Klein
I have a cpp project with some lib targets and executables, which  
depends on the libs and the header files.
I want to link the libs from my build/src tree and not the installed  
versions.


With this snip below from my CMakeFile.txt it works on my MacBook and  
cygwin after a make clean,
but with MVS2005, it will always try to link the desD.lib and not the  
desD.dll?


Note: When I first build static libs and than change the option to  
shared libs without make clean,

   it find the static libs and use them what is not intended by me!
Q: is there a whay to control which libs are found (e.g.) only static  
or shared one?


AGENTPP_LIBRARY  agent++
 AGENTXPP_LIBRARY agentx++
 BUILD_SHARED_LIBSON
 CMAKE_BUILD_TYPE
 CMAKE_INSTALL_PREFIX /usr/local
 CMAKE_OSX_ARCHITECTURES
 CMAKE_OSX_DEPLOYMENT_TARGET  10.5
 CMAKE_OSX_SYSROOT/Developer/SDKs/MacOSX10.5.sdk
 CMAKE_USE_RELATIVE_PATHS OFF
 DES_LIBRARY  des
 SNMP_PP_LIBRARY  snmp++
 USE_DOXYGEN  OFF
 USE_LIBDES   ON
 USE_PROXY_FORWARDER  ON


#--
option(BUILD_SHARED_LIBS Build shared libraries ON)
option(USE_LIBDES Use the provided libdes implementation ON)

set( CMAKE_DEBUG_POSTFIX D CACHE STRING Postfix added to the debug  
version of libraries and executables )


# add the libdes library?
if (USE_LIBDES)
  add_subdirectory (libdes)
  find_library(DES_LIBRARY des HINTS ${PROJECT_SOURCE_DIR}/libdes  
NO_DEFAULT_PATH)

  if (${DES_LIBRARY} STREQUAL DES_LIBRARY-NOTFOUND)
set (DES_LIBRARY des CACHE FILEPATH path to the local des lib  
FORCE)

  endif()
  include_directories (${PROJECT_SOURCE_DIR}/libdes)
  link_directories (${PROJECT_SOURCE_DIR}/libdes)
  set (EXTRA_LIBS ${EXTRA_LIBS} ${DES_LIBRARY})
else (USE_LIBDES)
  find_library(CRYPTO_LIBRARY crypto)
  set (EXTRA_LIBS ${EXTRA_LIBS} ${CRYPTO_LIBRARY})
  add_definitions(-D_USE_OPENSSL)
endif (USE_LIBDES)

add_subdirectory (snmp++/src)
if (USE_LIBDES)
  add_dependencies(snmp++ des)
endif (USE_LIBDES)
#--

Why is Win32 (MS) always a Problem?

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


[CMake] FindCppUnit.cmake

2010-03-31 Thread Claus Klein

Hi,

I was missing a right cmake module to find CppUnit lib and header files.

Perhaps this is useful for the next cmake release?

It works with pkgconfig if available, but too without, tested on Win32  
and MAC.


regards,
Claus


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

Re: [CMake] error while stage install of crosscompiled binaries

2010-01-12 Thread Claus Klein

Alexander Neundorf schrieb:
...
So indeed a relative CMAKE_INSTALL_PREFIX is interpreted relative to the build 
dir.


Do you think this should be handled differently ?
Then c:/usr would have to be translated at some point to /c:/usr if cross 
compiling on some UNIX.

Would this make sense ?

Alex

_

Hi Alex,

No, I think it is good as it is, but it is important to document this feature 
while crosscompiling!

For me it was unexpected. The build error was caused by another reason 
(DESTINATION or SOURCE was also absolute)
as I explained in my other response. In this case, the error was good.

The device prefix is also not a good idea in zip archives which should be 
extracted on Windows.

I wrote this

In case you crosscompile on an UNIX build host for a window target system(i.e. 
minGW):

.. Attention:: If a windows drive letter is given with CMAKE_INSTALL_PREFIX, 
	the files are installed under builddir/C:/usr/... when you do 'make install' only!
	So create a zip archive from usr (without C:/) and it works on Windows XP, nice  ;-) 

For me the only open question is what happens in this case on windows? 
But I work not on Windows if I have a choice.


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


Re: [CMake] error while stage install of crosscompiled binaries

2010-01-09 Thread Claus Klein

Hi all,

now I got it:

There are 3 different problems:
1.) never use an absolute DESTINATION path with INSTALL commands!
 	###XXX### INSTALL( FILES cmake/FindLibSmi.cmake DESTINATION $ 
{CMAKE_ROOT}/Modules )


2.) never use an absolute source Path!
	###XXX### INSTALL( FILES ${CMAKE_BINARY_DIR}/libsmi.pc DESTINATION  
lib/pkgconfig )


3) never use a Windows drive letter in one of this paths as C:/usr
with CMAKE_INSTALL_PREFIX=C:/usr
	###XXX### INSTALL( FILES smi.conf-example DESTINATION $ 
{CMAKE_INSTALL_PREFIX}/${CMAKE_SYSTEMCONFIG} )


If not, you will get problems in some cases like crosscompile:

test -d build/CMakeFiles  rm -rf build/*
cd build  cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc - 
DCMAKE_CXX_COMPILER=i386-mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows .. \

 make 21 | tee ../crosscompile.log

. . . .

+ make DESTDIR=/tmp/libsmi install/local
+ tee ../temp-install.log
[  1%] Built target generate_dump_svg_script_h
[  3%] Built target backend_smi_bison
[  5%] Built target backend_sming_bison
[  6%] Built target backend_smi_flex
[  8%] Built target backend_sming_flex
[  8%] Built target generated
[ 34%] Built target smi
[ 37%] Built target smidiff
[ 87%] Built target smidump
[ 91%] Built target smilint
[ 94%] Built target smiquery
[100%] Built target smixlate
Installing only the local directory...
-- Install configuration: Release
CMake Error at cmake_install.cmake:31 (FILE):
  file cannot create directory:
  /tmp/libsmi/Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09- 
cmake/build/C:/usr/lib/pkgconfig.

  Maybe need administrative privileges.


make: *** [install/local] Error 1
+ cmake -DCMAKE_INSTALL_PREFIX=C:/usr -DCMAKE_INSTALL_LOCAL_ONLY=1 -P  
cmake_install.cmake

+ tee ../temp-install.log
-- Install configuration: Release
-- Installing: /Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09- 
cmake/build/C:/usr/lib/pkgconfig/libsmi.pc
-- Installing: /Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09- 
cmake/build/C:/usr/lib/pkgconfig/libsmi.pc
-- Installing: /Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09- 
cmake/build/C:/usr/etc/smi/smi.conf/smi.conf-example
-- Installing: /Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09- 
cmake/build/C:/usr/C:/usr/etc/smi/smi.conf/smi.conf-example   
really bad!
-- Installing: /Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09- 
cmake/build/C:/usr/share/cmake/Modules/FindLibSmi.cmake

-- Installing: /opt/local/share/cmake-2.8/Modules/FindLibSmi.cmake
CMake Error at cmake_install.cmake:51 (FILE):
  file INSTALL cannot copy file
  /Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09-cmake/cmake/ 
FindLibSmi.cmake

  to /opt/local/share/cmake-2.8/Modules/FindLibSmi.cmake.


+ cmake -DCMAKE_INSTALL_PREFIX=/tmp/libsmi/usr - 
DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake

+ tee ../temp-install.log
-- Install configuration: Release
-- Up-to-date: /tmp/libsmi/usr/lib/pkgconfig/libsmi.pc
-- Installing: /tmp/libsmi/usr/lib/pkgconfig/libsmi.pc
-- Up-to-date: /tmp/libsmi/usr/etc/smi/smi.conf/smi.conf-example
-- Installing: /tmp/libsmi/usr/C:/usr/etc/smi/smi.conf/smi.conf-example
-- Up-to-date: /tmp/libsmi/usr/share/cmake/Modules/FindLibSmi.cmake
-- Installing: /opt/local/share/cmake-2.8/Modules/FindLibSmi.cmake
CMake Error at cmake_install.cmake:51 (FILE):
  file INSTALL cannot copy file
  /Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09-cmake/cmake/ 
FindLibSmi.cmake

  to /opt/local/share/cmake-2.8/Modules/FindLibSmi.cmake.


+ exit
claus-kleins-macbook-pro:libsmi-latejuly09-cmake clausklein$

I hope you see that something should changed with make install.

//regards

Claus


On 08.01.2010, at 22:26, Claus Klein wrote:


Hi David,

Yes, this works fine when I change the CMAKE_INSTALL_PREFIX at  
CMakeCache.txt, sure.


There is only one fault: the config files will be rebuild with the  
wrong path before install :-((



At least, I know 2 packages, NetSnmp and LibSmi, they has to be  
compiled with fix absolute paths,
including the device name on Windows, that is not my idea! It would  
be better to use a ConfigFile and
the program can be install at any place. But they is a history and  
they needs there MIB's.
(What is the current drive to find this config file when I start c:/ 
usr/bin/smilint from d:/workdir?)


When I add the string replace command to the cmake_install.cmake  
file, it works as a quick hack.
This should only remove the drive string in the middle, not the  
beginning of the PREFIX path:


STRING(REGEX REPLACE /[A-Za-z]:/ / CMAKE_INSTALL_PREFIX $ 
{CMAKE_INSTALL_PREFIX})


But I know that this can't be the general solution.


I did not see any DESTDIR in this file, so I think it will be set as  
parameter or in environment?

Only if DESTDIR is given, this drive name has to be replace.

Where is the DESTDIR prepended to the PREFIX?
Is there a template for this generated cmake_install.cmake?

Claus

On 08.01.2010, at 17:49, David Cole wrote:

On Fri, Jan 8, 2010 at 12:37 AM, Claus Klein claus.kl

Re: [CMake] error while stage install of crosscompiled binaries

2010-01-08 Thread Claus Klein

Hi David,

Yes, this works fine when I change the CMAKE_INSTALL_PREFIX at  
CMakeCache.txt, sure.


There is only one fault: the config files will be rebuild with the  
wrong path before install :-((



At least, I know 2 packages, NetSnmp and LibSmi, they has to be  
compiled with fix absolute paths,
including the device name on Windows, that is not my idea! It would be  
better to use a ConfigFile and
the program can be install at any place. But they is a history and  
they needs there MIB's.
(What is the current drive to find this config file when I start c:/ 
usr/bin/smilint from d:/workdir?)


When I add the string replace command to the cmake_install.cmake file,  
it works as a quick hack.
This should only remove the drive string in the middle, not the  
beginning of the PREFIX path:


STRING(REGEX REPLACE /[A-Za-z]:/ / CMAKE_INSTALL_PREFIX $ 
{CMAKE_INSTALL_PREFIX})


But I know that this can't be the general solution.


I did not see any DESTDIR in this file, so I think it will be set as  
parameter or in environment?

Only if DESTDIR is given, this drive name has to be replace.

Where is the DESTDIR prepended to the PREFIX?
Is there a template for this generated cmake_install.cmake?

Claus

On 08.01.2010, at 17:49, David Cole wrote:

On Fri, Jan 8, 2010 at 12:37 AM, Claus Klein  
claus.kl...@arcormail.de wrote:


On 08.01.2010, at 02:25, Alexander Neundorf wrote:

On Thursday 07 January 2010, Claus Klein wrote:
Hi

i want to install a cross compiled (build host is a MAC OS X) project
to a temporary state dir to get an archive to distribute the binaries.
The target is win32 (mingw), compiled to be installed at c:/usr as
CMAKE_INSTALL_PREFIX.
This prefix is used while compile the binaries, so I can't change it.

I think, that when I use DESTDIR while make DESTDIR=/tmp/cmake
install, the device (C:) should be removed before to use it as part
of a path like this:

STRING(REGEX REPLACE [A-Za-z:/]  CMAKE_INSTALL_PREFIX $
{CMAKE_INSTALL_PREFIX})

head cmake_install.cmake
# Install script for directory: /Users/clausklein/Workspace/c/libsmi/
trunk
#
# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
 SET(CMAKE_INSTALL_PREFIX C:/usr)
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
STRING(REGEX REPLACE /$  CMAKE_INSTALL_PREFIX $
{CMAKE_INSTALL_PREFIX})
. . . .

As you can see,  PREFIX is appended to DESDIR without modification.
which is wrong in this special case.

Yes. So you would suggest to remove the drive letter from  
CMAKE_INSTALL_PREFIX

when installing with DESTDIR set ?

Alex

Yes

I think it is never a valid path in this case to on Windows itself:

i.e. C:/tmp/cmake/C:/usr/lib/pkgconfig

I want to create a zip archive at /tmp/cmake to install it on  
Windows under C:/


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


Can you try setting CMAKE_INSTALL_PREFIX to just /usr instead of  
C:/usr to see if you can get what you want in that manner...?




___
Powered by www.kitware.com

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

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

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

Re: [CMake] Cross compil and DESTDIR

2010-01-07 Thread Claus Klein

Hi Paul,

yes, I do it in this way and it works good.

Only if the target system is Windows, there may be a Problem if prefix  
is something like C:/programs  ...



But in most embedded unix like systems, there is no problem.

Claus



On 07.01.2010, at 21:30, Paul Chavent wrote:


Hi cmake mailing list !

When i cross compile with autotools, i used to do
$ ./configure --prefix=/usr/local ...
$ make install DESTDIR=${SYSROOT}

Now, with cmake i do
$ cmake source_dir -DCMAKE_INSTALL_PREFIX=/usr/local ...
$ make install DESTDIR=${SYSROOT}

Is it a good practice ?
What is the right way for doing a compilation for a foreign  
(embedded) filesystem ?



Thank for your help.

Paul.
___
Powered by www.kitware.com

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

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

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


___
Powered by www.kitware.com

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

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

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


Re: [CMake] error while stage install of crosscompiled binaries

2010-01-07 Thread Claus Klein


On 08.01.2010, at 02:25, Alexander Neundorf wrote:


On Thursday 07 January 2010, Claus Klein wrote:

Hi

i want to install a cross compiled (build host is a MAC OS X) project
to a temporary state dir to get an archive to distribute the  
binaries.

The target is win32 (mingw), compiled to be installed at c:/usr as
CMAKE_INSTALL_PREFIX.
This prefix is used while compile the binaries, so I can't change it.

I think, that when I use DESTDIR while make DESTDIR=/tmp/cmake
install, the device (C:) should be removed before to use it as part
of a path like this:

STRING(REGEX REPLACE [A-Za-z:/]  CMAKE_INSTALL_PREFIX $
{CMAKE_INSTALL_PREFIX})

head cmake_install.cmake
# Install script for directory: /Users/clausklein/Workspace/c/libsmi/
trunk
#
# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
  SET(CMAKE_INSTALL_PREFIX C:/usr)
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
STRING(REGEX REPLACE /$  CMAKE_INSTALL_PREFIX $
{CMAKE_INSTALL_PREFIX})
. . . .

As you can see,  PREFIX is appended to DESDIR without modification.
which is wrong in this special case.


Yes. So you would suggest to remove the drive letter from  
CMAKE_INSTALL_PREFIX

when installing with DESTDIR set ?

Alex


Yes

I think it is never a valid path in this case to on Windows itself:

i.e. C:/tmp/cmake/C:/usr/lib/pkgconfig

I want to create a zip archive at /tmp/cmake to install it on Windows  
under C:/


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


Re: [CMake] mingw crosscompile error: invalid option `macosx-version-min=10.5' ?

2010-01-06 Thread Claus Klein

Hi Alex,

The problem occurs always when I run cmake again, no matter of Windows  
or Windows-gcc is used.

But I found in CMakeCache.txt this UNINITIALIZED values.

claus-kleins-macbook-pro:build clausklein$ grep UNINITIALIZED  
CMakeCache.txt

CMAKE_CROSSCOMPILING:UNINITIALIZED=1
CMAKE_SYSTEM_NAME:UNINITIALIZED=Windows-gcc
claus-kleins-macbook-pro:build clausklein$

Perhaps this his the reason?

Claus

On 04.01.2010, at 19:22, Alexander Neundorf wrote:


On Sunday 03 January 2010, Claus Klein wrote:

I have problems to crosscompile on MAC-OS for MinGW.
How kann I prevent this strange compiler flag on a Darwin Plattform?

Thanks

Claus
-

cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc -DCMAKE_CXX_COMPILER=i386-
mingw32-g++ --debug-trycompile --debug-output -
DCMAKE_SYSTEM_NAME=Windows-gcc ..


CMAKE_SYSTEM_NAME should be set to Windows, not Windows-gcc,  
because there

is not operating system Windows-gcc in cmake (it tries to load
Modules/Platform/${CMAKE_SYSTEM_NAME}.cmake).

In this case it should not load Darwin.cmake at all.

Does it work better if you do this ?

Alex


___
Powered by www.kitware.com

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

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

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


Re: [CMake] mingw crosscompile error: invalid option `macosx-version-min=10.5' ?

2010-01-06 Thread Claus Klein

Yes, I did it again and again with rm -rf build.
Same result!

As I said: The problem occurs always when I run cmake again, no  
matter of Windows or Windows-gcc is used.


Claus

On 06.01.2010, at 20:23, Alexander Neundorf wrote:


On Wednesday 06 January 2010, Claus Klein wrote:

Hi Alex,

The problem occurs always when I run cmake again, no matter of  
Windows

or Windows-gcc is used.
But I found in CMakeCache.txt this UNINITIALIZED values.

claus-kleins-macbook-pro:build clausklein$ grep UNINITIALIZED
CMakeCache.txt
CMAKE_CROSSCOMPILING:UNINITIALIZED=1
CMAKE_SYSTEM_NAME:UNINITIALIZED=Windows-gcc
claus-kleins-macbook-pro:build clausklein$

Perhaps this his the reason?


You need to start from a fresh build tree from scratch.
And you need to use Windows as system name, otherwise it cannot  
work.


Alex


___
Powered by www.kitware.com

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

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

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


[CMake] error while stage install of crosscompiled binaries

2010-01-06 Thread Claus Klein

Hi

i want to install a cross compiled (build host is a MAC OS X) project  
to a temporary state dir to get an archive to distribute the binaries.
The target is win32 (mingw), compiled to be installed at c:/usr as  
CMAKE_INSTALL_PREFIX.

This prefix is used while compile the binaries, so I can't change it.

I think, that when I use DESTDIR while make DESTDIR=/tmp/cmake   
install, the device (C:) should be removed before to use it as part  
of a path like this:


STRING(REGEX REPLACE [A-Za-z:/]  CMAKE_INSTALL_PREFIX $ 
{CMAKE_INSTALL_PREFIX})


head cmake_install.cmake
# Install script for directory: /Users/clausklein/Workspace/c/libsmi/ 
trunk

#
# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
  SET(CMAKE_INSTALL_PREFIX C:/usr)
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
STRING(REGEX REPLACE /$  CMAKE_INSTALL_PREFIX $ 
{CMAKE_INSTALL_PREFIX})

. . . .

As you can see,  PREFIX is appended to DESDIR without modification.  
which is wrong in this special case.
I am not sure if the file is wrong generated or called with wrong  
parameters?



Any ideas about this?

//regards

Claus
--

This happens on my Mac Os X:
claus-kleins-macbook-pro:build clausklein$ make DESTDIR=/tmp/cmake  
install

[ 30%] Built target smi
[ 34%] Built target smidiff
[ 87%] Built target smidump
[ 90%] Built target smilint
[ 94%] Built target smiquery
[100%] Built target smixlate
Install the project...
-- Install configuration: Release
CMake Error at cmake_install.cmake:31 (FILE):
  file cannot create directory:
  /tmp/cmake/Users/clausklein/Workspace/c/libsmi/trunk/build/C:/usr/ 
lib/pkgconfig.

  Maybe need administrative privileges.


make: *** [install] Error 1


___
Powered by www.kitware.com

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

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

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


Re: [CMake] mingw crosscompile error: invalid option `macosx-version-min=10.5' ?

2010-01-05 Thread Claus Klein

Hi Alex,

I have used this system_name because I found this file:

claus-kleins-macbook-pro:Platform clausklein$ grep -iw mingw *.cmake
Windows-gcc.cmake:SET(CMAKE_EXTRA_LINK_EXTENSIONS .lib) # MinGW can  
also link to a MS .lib

Windows-gcc.cmake:IF(MINGW)
Windows-gcc.cmake:ENDIF(MINGW)
Windows-gcc.cmake:IF(MSYS OR MINGW)
Windows-gcc.cmake:ENDIF(MSYS OR MINGW)
Windows-gcc.cmake:IF(MSYS OR MINGW)
Windows-gcc.cmake:ENDIF(MSYS OR MINGW)
WindowsPaths.cmake:  # MinGW (useful when cross compiling from linux  
with CMAKE_FIND_ROOT_PATH set)
WindowsPaths.cmake:# mingw can also link against dlls which can also  
be in /bin, so list this too

claus-kleins-macbook-pro:Platform clausklein$ ls -l $PWD/Windows-gcc*
-rw-r--r--  2 root  admin  4097 13 Nov 19:32 /opt/local/share/ 
cmake-2.8/Modules/Platform/Windows-gcc.cmake

claus-kleins-macbook-pro:Platform clausklein$

Note: I was crosscompiling for MinGW

//regards
Claus

On 04.01.2010, at 19:22, Alexander Neundorf wrote:


On Sunday 03 January 2010, Claus Klein wrote:

I have problems to crosscompile on MAC-OS for MinGW.
How kann I prevent this strange compiler flag on a Darwin Plattform?

Thanks

Claus
-

cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc -DCMAKE_CXX_COMPILER=i386-
mingw32-g++ --debug-trycompile --debug-output -
DCMAKE_SYSTEM_NAME=Windows-gcc ..


CMAKE_SYSTEM_NAME should be set to Windows, not Windows-gcc,  
because there

is not operating system Windows-gcc in cmake (it tries to load
Modules/Platform/${CMAKE_SYSTEM_NAME}.cmake).

In this case it should not load Darwin.cmake at all.

Does it work better if you do this ?

Alex


___
Powered by www.kitware.com

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

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

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


Re: [CMake] mingw crosscompile error: invalid option `macosx-version-min=10.5' ?

2010-01-03 Thread Claus Klein

Thanks Bart,

I have xcode installed, but not every compiler on my MAC compiles for  
MAC-OS.
I have mingw32 installed from macports, and the target is Win32, so  
this option test


-mmacosx-version-min= The earliest MacOS X version on which this  
program will run


makes no sence and not every compiler on a MAC support this!

-

claus-kleins-macbook-pro:gcc clausklein$ for c in gcc powerpc-apple- 
darwin9-gcc-4.2.1 i386-mingw32-gcc; do which $c; $c --version; $c -- 
target-help 21 | grep -w MacOS; done

/usr/bin/gcc
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There  
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR  
PURPOSE.


  -mmacosx-version-min= The earliest MacOS X version on which  
this program will run

/usr/bin/powerpc-apple-darwin9-gcc-4.2.1
powerpc-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5566)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There  
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR  
PURPOSE.


  -mmacosx-version-min=   The earliest MacOS X version on which  
this

/opt/local/bin/i386-mingw32-gcc
i386-mingw32-gcc (GCC) 3.4.5 (mingw-vista special r2)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There  
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR  
PURPOSE.


claus-kleins-macbook-pro:gcc clausklein$ !tre
tree -d
.
|-- darwin
|   |-- i386
|   |-- ppc
|   |-- ppc64
|   `-- x86_64
|-- i686-apple-darwin9
|   |-- 4.0.1
|   |   `-- install-tools
|   `-- 4.2.1
|   `-- install-tools
`-- powerpc-apple-darwin9
|-- 4.0.1
|   `-- install-tools
`-- 4.2.1
`-- install-tools

15 directories
claus-kleins-macbook-pro:gcc clausklein$ pwd
/Developer/usr/libexec/gcc
claus-kleins-macbook-pro:gcc clausklein$
-

One aspect of Cross-compiling is to compile for an other architecture  
and another OS, I think.


Claus

On 03.01.2010, at 03:36, Bart Nabbe wrote:

i think you do not have the 10.5software development code from apple  
installed.

it comes with xcode if you select the 10.5 sdk
this is from memory, so just give it a brief check.

On Jan 2, 2010, at 18:30, Claus Klein wrote:


I have problems to crosscompile on MAC-OS for MinGW.
How kann I prevent this strange compiler flag on a Darwin Plattform?

Thanks

Claus
-

cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc -DCMAKE_CXX_COMPILER=i386- 
mingw32-g++ --debug-trycompile --debug-output - 
DCMAKE_SYSTEM_NAME=Windows-gcc ..


___
Powered by www.kitware.com

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

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

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


Re: [CMake] mingw crosscompile error: invalid option `macosx-version-min=10.5' ?

2010-01-03 Thread Claus Klein

No, I can't find this option in any cmake file.

It seems the detecting if we are CROSS_COMPILING does not work well on  
DARWIN?
Wenn the error occured, CMAKE_OSX_DEPLOYMENT_TARGET is set in  
CMakeCache.txt:

...
-- Configuring incomplete, errors occurred!
claus-kleins-macbook-pro:build clausklein$ grep OSX CMakeCache.txt
//Build architectures for OSX
CMAKE_OSX_ARCHITECTURES:STRING=
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.5
CMAKE_OSX_SYSROOT:PATH=/Developer/SDKs/MacOSX10.5.sdk

Then only this helps:

cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc -DCMAKE_CXX_COMPILER=i386- 
mingw32-g++  -DCMAKE_SYSTEM_NAME=Windows-gcc - 
DCMAKE_OSX_DEPLOYMENT_TARGET='' ..


Initial, this works too, but not if CMAKE_OSX_DEPLOYMENT_TARGET is set:

cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc -DCMAKE_CXX_COMPILER=i386- 
mingw32-g++  -DCMAKE_SYSTEM_NAME=Windows-gcc -DCMAKE_CROSSCOMPILING=1 ..

-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /opt/local/bin/i386-mingw32-gcc
-- Check for working C compiler: /opt/local/bin/i386-mingw32-gcc --  
works

-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/local/bin/i386-mingw32-g++
-- Check for working CXX compiler: /opt/local/bin/i386-mingw32-g++ --  
works

-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/clausklein/Workspace/cmake/ 
GNU_style/build


Thanks to all

Claus

On 03.01.2010, at 17:42, Michael Jackson wrote:

This is probably a bug in the Darwin-gcc.cmake file that gets  
called to initialize all the compilers and flags. There is a bunch  
of code which tries to figure out which OS X version you are  
compiling for and what flags to use. I say this because there  
probably needs to be an

IF( NOT CROSS_COMPILING)

ENDIF()

around that whole section.

What you can do is look in CMake 2.6-4.app/Contents/share/cmake-2.6/ 
Modules/Platform/Darwin.cmake


Put some MESSAGE(STATUS I AM HERE ) in that file to try and track  
down what modules are being compiled. If you get something working,  
post a patch back to the list so the fixes can be incorporated into  
the next release. You will DEFINITELY want to submit a bug report at

http://public.kitware.com/Bug/view_all_bug_page.php

Mike

On Jan 3, 2010, at 8:22 AM, Claus Klein wrote:


Thanks Bart,

I have xcode installed, but not every compiler on my MAC compiles  
for MAC-OS.
I have mingw32 installed from macports, and the target is Win32, so  
this option test


-mmacosx-version-min= The earliest MacOS X version on which  
this program will run


makes no sence and not every compiler on a MAC support this!

-

claus-kleins-macbook-pro:gcc clausklein$ for c in gcc powerpc-apple- 
darwin9-gcc-4.2.1 i386-mingw32-gcc; do which $c; $c --version; $c -- 
target-help 21 | grep -w MacOS; done

/usr/bin/gcc
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.   
There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR  
PURPOSE.


-mmacosx-version-min= The earliest MacOS X version on which  
this program will run

/usr/bin/powerpc-apple-darwin9-gcc-4.2.1
powerpc-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5566)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.   
There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR  
PURPOSE.


-mmacosx-version-min=   The earliest MacOS X version on which  
this

/opt/local/bin/i386-mingw32-gcc
i386-mingw32-gcc (GCC) 3.4.5 (mingw-vista special r2)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.   
There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR  
PURPOSE.


claus-kleins-macbook-pro:gcc clausklein$ !tre
tree -d
.
|-- darwin
|   |-- i386
|   |-- ppc
|   |-- ppc64
|   `-- x86_64
|-- i686-apple-darwin9
|   |-- 4.0.1
|   |   `-- install-tools
|   `-- 4.2.1
|   `-- install-tools
`-- powerpc-apple-darwin9
  |-- 4.0.1
  |   `-- install-tools
  `-- 4.2.1
  `-- install-tools

15 directories
claus-kleins-macbook-pro:gcc clausklein$ pwd
/Developer/usr/libexec/gcc
claus-kleins-macbook-pro:gcc clausklein$
-

One aspect of Cross-compiling is to compile for an other  
architecture and another OS, I think.


Claus

On 03.01.2010, at 03:36, Bart Nabbe wrote:

i think you do not have the 10.5software development code from  
apple installed.

it comes with xcode if you select the 10.5 sdk
this is from memory, so just give it a brief check.

On Jan 2, 2010, at 18:30, Claus Klein wrote:


I have problems to crosscompile on MAC-OS for MinGW.
How kann I prevent

[CMake] mingw crosscompile error: invalid option `macosx-version-min=10.5' ?

2010-01-02 Thread Claus Klein

I have problems to crosscompile on MAC-OS for MinGW.
How kann I prevent this strange compiler flag on a Darwin Plattform?

Thanks

Claus
-

cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc -DCMAKE_CXX_COMPILER=i386- 
mingw32-g++ --debug-trycompile --debug-output - 
DCMAKE_SYSTEM_NAME=Windows-gcc ..

debug trycompile on
Running with debug output on.
-- The C compiler identification is GNU
   Called from: [2]	/opt/local/share/cmake-2.8/Modules/ 
CMakeDetermineCCompiler.cmake
[1]	/Users/clausklein/Workspace/cmake/GNU_style/ 
CMakeLists.txt

-- The CXX compiler identification is GNU
   Called from: [2]	/opt/local/share/cmake-2.8/Modules/ 
CMakeDetermineCXXCompiler.cmake
[1]	/Users/clausklein/Workspace/cmake/GNU_style/ 
CMakeLists.txt

-- Checking whether C compiler has -isysroot
   Called from: [3]	/opt/local/share/cmake-2.8/Modules/Platform/ 
Darwin-GNU-C.cmake
[2]	/opt/local/share/cmake-2.8/Modules/ 
CMakeCInformation.cmake
[1]	/Users/clausklein/Workspace/cmake/GNU_style/ 
CMakeLists.txt

-- Checking whether C compiler has -isysroot - yes
   Called from: [3]	/opt/local/share/cmake-2.8/Modules/Platform/ 
Darwin-GNU-C.cmake
[2]	/opt/local/share/cmake-2.8/Modules/ 
CMakeCInformation.cmake
[1]	/Users/clausklein/Workspace/cmake/GNU_style/ 
CMakeLists.txt

-- Check for working C compiler: /opt/local/bin/i386-mingw32-gcc
   Called from: [2]	/opt/local/share/cmake-2.8/Modules/ 
CMakeTestCCompiler.cmake
[1]	/Users/clausklein/Workspace/cmake/GNU_style/ 
CMakeLists.txt
-- Check for working C compiler: /opt/local/bin/i386-mingw32-gcc --  
broken
   Called from: [2]	/opt/local/share/cmake-2.8/Modules/ 
CMakeTestCCompiler.cmake
[1]	/Users/clausklein/Workspace/cmake/GNU_style/ 
CMakeLists.txt
CMake Error at /opt/local/share/cmake-2.8/Modules/ 
CMakeTestCCompiler.cmake:50 (MESSAGE):
  The C compiler /opt/local/bin/i386-mingw32-gcc is not able to  
compile a

  simple test program.

  It fails with the following output:

   Change Dir: /Users/clausklein/Workspace/cmake/GNU_style/build/ 
CMakeFiles/CMakeTmp




  Run Build Command:/opt/local/bin/gmake cmTryCompileExec/fast

  /opt/local/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
  CMakeFiles/cmTryCompileExec.dir/build

  gmake[1]: Entering directory
  `/Users/clausklein/Workspace/cmake/GNU_style/build/CMakeFiles/ 
CMakeTmp'


  /opt/local/bin/cmake -E cmake_progress_report
  /Users/clausklein/Workspace/cmake/GNU_style/build/CMakeFiles/ 
CMakeTmp/CMakeFiles

  1

  Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o

  /opt/local/bin/i386-mingw32-gcc -mmacosx-version-min=10.5 -o
  CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c
  /Users/clausklein/Workspace/cmake/GNU_style/build/CMakeFiles/ 
CMakeTmp/testCCompiler.c



  cc1: error: invalid option `macosx-version-min=10.5'

  gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o]  
Fehler 1


  gmake[1]: Leaving directory
  `/Users/clausklein/Workspace/cmake/GNU_style/build/CMakeFiles/ 
CMakeTmp'


  gmake: *** [cmTryCompileExec/fast] Fehler 2





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


   Called from: [2]	/opt/local/share/cmake-2.8/Modules/ 
CMakeTestCCompiler.cmake
[1]	/Users/clausklein/Workspace/cmake/GNU_style/ 
CMakeLists.txt

-- Configuring incomplete, errors occurred!
macbook-pro:build 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://www.cmake.org/mailman/listinfo/cmake


[CMake] example how to find a library with PKG_CHECK_MODULES and FIND_PACKAGE_HANDLE_STANDARD_ARGS

2009-12-29 Thread Claus Klein

according to

Notes to authors of FindXXX.cmake files

We would like all FindXXX.cmake files to produce consistent variable  
names.


Please use the following consistent variable names for general use.

XXX_FOUND :
Set to false, or undefined, if we haven't found, or don't want to use  
XXX.

XXX_YYY_FOUND :
If False, optional YYY part of XXX sytem is not available.
XXX_INCLUDE_DIRS :
The final set of include directories listed in one variable for use by  
client code. This should not be a cache entry!

XXX_LIBRARIES :
The libraries to link against to use XXX. These should include full  
paths. This should not be a cache entry!

XXX_LIBRARY_DIRS : Optionally
The final set of library directories listed in one variable for use by  
client code. This should not be a cache entry!

XXX_DEFINITIONS :
Definitions to use when compiling code that uses XXX.
Note

This really shouldn't include options such as (-DHAS_JPEG) that a  
client source-code file uses to decide whether to #include jpeg.h.  
Too, it must not include any compiler flags like -O3 -Wall to be tool  
independent!

A FindXXX.cmake module will typically be loaded by the command:

FIND_PACKAGE(XXX [major[.minor[.patch[.tweak [EXACT]
 [QUIET] [[REQUIRED|COMPONENTS] [components...]])
If any version numbers are given to the command it will set the  
following variables before loading the module:


XXX_FIND_VERSION   = full requested version string
XXX_FIND_VERSION_MAJOR = major version if requested, else 0
XXX_FIND_VERSION_MINOR = minor version if requested, else 0
XXX_FIND_VERSION_PATCH = patch version if requested, else 0
XXX_FIND_VERSION_TWEAK = tweak version if requested, else 0
XXX_FIND_VERSION_COUNT = number of version components, 0 to 4
XXX_FIND_VERSION_EXACT = true if EXACT option was given
If the find module supports versioning it should locate a version of  
the package that is compatible with the version requested. If a  
compatible version of the package cannot be found the module should  
not report success. The version of the package found should be stored  
in XXX_VERSION... version variables documented by the module.


If the QUIET option is given to the command it will set the variable  
XXX_FIND_QUIETLY to true before loading the FindXXX.cmake module. If  
this variable is set the module should not complain about not being  
able to find the package.


If the REQUIRED option is given to the command it will set the  
variable XXX_FIND_REQUIRED to true before loading the FindXXX.cmake  
module. If this variable is set the module should issue a FATAL_ERROR  
if the package cannot be found. For each package-specific component,  
say YYY, listed after the REQUIRED option a  
variableXXX_FIND_REQUIRED_YYY to true.


The set of components listed after either the REQUIRED option or the  
COMPONENTS option will be specified in a XXX_FIND_COMPONENTS variable.  
This can be used by theFindXXX.cmake module to determine which sub- 
components of the package must be found.


If neither the QUIET nor REQUIRED options are given then the  
FindXXX.cmake module should look for the package and complain without  
error if the module is not found.


Tip

To get this behaviour you can use the  
FIND_PACKAGE_HANDLE_STANDARD_ARGS() macro, as an example see  
FindLibSmi.cmake.

# - Find LIBSMI
# Find the native LIBSMI includes and library
# This module defines
#  LIBSMI_INCLUDE_DIR, where to find smi.h, etc.
#  LIBSMI_LIBRARY, the LIBSMI library with full path.
#  LIBSMI_FOUND, If false, do not try to use LIBSMI.
# also defined, but not for general use are
#  LIBSMI_LIBRARIES, The libraries needed to use LIBSMI.
#  LIBSMI_LIBRARY_DIRS, where to find the LIBSMI library.
#  LIBSMI_DEFINITIONS - You should add_definitons($ 
{LIBSMI_DEFINITIONS}) before
#   compiling code that includes netsnmp library  
files.


INCLUDE(FindPkgConfig)
IF (PKG_CONFIG_FOUND)
  IF (LIBSMI_FIND_REQUIRED AND LIBSMI_FIND_VERSION)
SET(_PACKAGE_ARGS libsmi=${LIBSMI_FIND_VERSION} REQUIRED)
  else ()
SET(_PACKAGE_ARGS libsmi)
  ENDIF ()
  PKG_CHECK_MODULES(LIBSMI ${_PACKAGE_ARGS})
ENDIF (PKG_CONFIG_FOUND)
SET(LIBSMI_DEFINITIONS ${LIBSMI_CFLAGS_OTHER})

FIND_PATH(LIBSMI_INCLUDE_DIR smi.h HINTS ${LIBSMI_INCLUDE_DIRS})

FIND_LIBRARY(LIBSMI_LIBRARY NAMES smi HINTS ${LIBSMI_LIBRARY_DIRS})
IF (NOT PKG_CONFIG_FOUND)
  SET(LIBSMI_LIBRARIES smi)
  GET_FILENAME_COMPONENT(LIBSMI_LIBRARY_DIRS ${LIBSMI_LIBRARY} PATH)
ENDIF (NOT PKG_CONFIG_FOUND)

# handle the QUIETLY and REQUIRED arguments and set LIBSMI_FOUND to  
TRUE if all

# listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSMI DEFAULT_MSG LIBSMI_LIBRARY  
LIBSMI_INCLUDE_DIR

LIBSMI_LIBRARIES LIBSMI_LIBRARY_DIRS)
MARK_AS_ADVANCED(LIBSMI_LIBRARY LIBSMI_INCLUDE_DIR
LIBSMI_LIBRARIES LIBSMI_LIBRARY_DIRS LIBSMI_DEFINITIONS)




I have tried to get the most of the information 

Re: [CMake] what is the right way to set CMAKE_USE_RELATIVE_PATHS?

2009-12-21 Thread Claus Klein

John Drescher schrieb:

On Mon, Dec 21, 2009 at 3:50 PM, Claus Klein claus.kl...@arcormail.de wrote:
  

Hi all,

I tried to use:
  set(CMAKE_USE_RELATIVE_PATHS ON)
in my CMakeLists.txt.

But I noticed, that some cmake variables can't be changed in that way.
In the CMakeCache.txt, it is still OFF?



I have no idea about CMAKE_USE_RELATIVE_PATHS since I have never
needed/wanted to use that however for the other cases that it appears
the CMake does not let me change a value I usually get around this
using the following examples:

SET (CMAKE_INSTALL_PREFIX ${PGM_FILES}/UPMC/${CMAKE_PROJECT_NAME}
CACHE STRING Default Install Path FORCE)


IF (MAKE_DEBUGRELEASE)
SET (CMAKE_CONFIGURATION_TYPES Debug;RelWithDebInfo CACHE STRING
Debug;RelWithDebInfo FORCE)
SET (RELEASE_BUILD_NAME RelWithDebInfo)
ELSE(MAKE_DEBUGRELEASE)
SET (CMAKE_CONFIGURATION_TYPES Debug;Release CACHE STRING
Debug;Release FORCE)
SET (RELEASE_BUILD_NAME Release)
ENDIF (MAKE_DEBUGRELEASE)


The keys are CACHE and FORCE.


John
  

Thanks John,

I know the FORCE option.
But I tried to understand for which CMake variables I have to use FORCE 
and why?
Is it really necessary to write so much configuration when I simply want 
to change a default value?


For the CMAKE_BUILD_TYPE it is documented, quote from CMake FAQ:

IF(NOT CMAKE_BUILD_TYPE)
 SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
 Choose the type of build, options are: None Debug Release RelWithDebInfo 
MinSizeRel.
 FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)


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


Re: [CMake] what is the right way to set CMAKE_USE_RELATIVE_PATHS?

2009-12-21 Thread Claus Klein

Hi Aashish,

yes the set command is well explained. Thanks.

But for some CMAKE variables this not true!

I guess that GUI vars have always set with FORCE?

Claus

Aashish Chaudhary schrieb:

Is this useful?

http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:set




___
Powered by www.kitware.com

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

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

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


Re: [CMake] what is the right way to set CMAKE_USE_RELATIVE_PATHS?

2009-12-21 Thread Claus Klein

Hi Micheal,

I know the discusion about CMAKE_USE_RELATIVE_PATHS, for all my test 
under cygwin and MAC-OX with gmake and gcc, it works!

Only the setting is a little tricky ;-)

There are good reasons to use this option, at leased the shorter log files.

Claus

Michael Jackson schrieb:
There are lots of questions on this CMake variable and the consensus 
is DO NOT USE IT. PERIOD. The implementation is basically broken for 
all but the most trivial case.

_
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio

On Dec 21, 2009, at 3:59 PM, John Drescher wrote:

On Mon, Dec 21, 2009 at 3:50 PM, Claus Klein 
claus.kl...@arcormail.de wrote:

Hi all,

I tried to use:
  set(CMAKE_USE_RELATIVE_PATHS ON)
in my CMakeLists.txt.

But I noticed, that some cmake variables can't be changed in that way.
In the CMakeCache.txt, it is still OFF?




___
Powered by www.kitware.com

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

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

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


Re: [CMake] Re: Demonstrated CMake.. received a few comments

2007-01-23 Thread Claus Klein
On Tuesday 23 January 2007 18:10, kitts wrote:
 On Tuesday 23 January 2007 00:03 IST, kitts wrote:
  2) On windows, we would like to use VS as the IDE and KDevelop on linux.
  Both are capable of crosscompiling (use non-native compilers). I think
  this is only possible by setting CMAKE_C_COMPILER to the compiler to use?
 
 I tested this today and alas, it doesn't work. :-(
 
For me it works, but there are some points to know:

cd ~/src/wzdftpd/trunk/build  rm -f CMakeCache.txt 
+ CC=/tools/LinuxPpcCDK/bin/powerpc-linux-gcc
+ CXX=/tools/LinuxPpcCDK/bin/powerpc-linux-g++
+ AR=/tools/LinuxPpcCDK/bin/powerpc-linux-ar
+ PKG_CONFIG_PATH=/tools/LinuxPpcCDK/lib/pkgconfig
+ CMAKE_LIBRARY_PATH=/tools/LinuxPpcCDK/lib:/tools/LinuxPpcCDK/usr/lib
+ CMAKE_INCLUDE_PATH=/tools/LinuxPpcCDK/include:/tools/LinuxPpcCDK/usr/include
+ cmake -DWITH_OpenSSL=ON -DWITH_TCLDev=OFF -DWITH_PerlDev=OFF 
-DWITH_GnuTLS=OFF -DWITH_PostgreSQL=OFF -DWITH_MySQL=OFF -DWITH_Zeroconf=OFF 
-DWITH_TESTS=OFF ..
-- Check for working C compiler: /tools/LinuxPpcCDK/bin/powerpc-linux-gcc
-- Check for working C compiler: /tools/LinuxPpcCDK/bin/powerpc-linux-gcc -- 
works
-- Check size of void*
-- Check size of void* - done
-- Found OpenSSL: /tools/LinuxPpcCDK/lib/libssl.so
-- Looking for pthread.h
-- Looking for pthread.h - found
...

You cannot change CMAKE_C_COMPILER without deleting the entire binary tree
and starting over. Once the compiler is set, it's set. This is one of the
few cmake variables that you cannot change once it has been set.

I found only one hint in http://www.cmake.org/Wiki/CMake_Useful_Variables
about cross-compile.

 CMake wasn't designed with cross-compiling in mind was it? I'm sure hoping 
 it fills this gap. I like it so much better than the competition. :-)
That is my opinion too.

PS: I use buildroot for our project, (see http://buildroot.uclibc.org/ ),
   to build the toolchain, the root-file system and the Application.

Bye
Claus
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] HowTo 'Getting Started Cross compilation with cmake' needed

2007-01-20 Thread Claus Klein
On Saturday 20 January 2007 15:04, Alexander Neundorf wrote:
 Hi,
 
 Von: Peter Soetens [EMAIL PROTECTED]
 
 ...
   I miss some features needed for cross-compiling, linking and
   installing to
   a stage dir. The PKGCONFIG(package includedir libdir linkflags
   cflags),
   for example, the --define-variable option can't be used.
   pkg-config(1) support that:
  
   P3linux:/etc/apt # PKG_CONFIG_PATH=/tools/build_i386/root/lib/pkgconfig
   pkg-config  --print-errors
  --define-variable=prefix=/tools/build_i386/root/
   --cflags --libs dbus-1 -I/tools/build_i386/root//include/dbus-1.0
   -I/tools/build_i386/root//lib/dbus-1.0/include 
   -L/tools/build_i386/root//lib -ldbus-1
  
   P3linux:/etc/apt # pkg-config  --print-errors  --cflags --libs dbus-1
   -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include 
   -L/usr/local/lib -ldbus-1
  
  I agree here as well. PKGCONFIG support in cmake is work in progress
  though.
 
 Are you still using the old UsePkgconfig.cmake or did you already switch to 
 find_package(PkgConfig), which is much more powerful ?
Yes, it is better

 
   As a last point, it wout be nice if cmake generates  makefiles
   according to:
  http://www.gnu.org/prep/standards/standards.html#Makefile-Conventions
  
   I think, most people expect this as common standard, or not?
  
  This is a major issue (read:disagreement) on this list. I expected this
  as well, but the cmake team has their own reasoning.
 
 Yes, and I don't see why anybody would be interested in the inner details of 
 the makefiles.
 The makefiles as they are currently generated are much superior to the ones 
 generated by the GNU auto toolchain.
 They are portable to different OS and different make's, and contain correct 
 and complete dependencies, progress report, 
 colored output, why should I care whether their contents conform to some GNU 
 standard ? 
 
 Bye
 Alex
 

The commen targets should always supported.

I agree partly about the makevariables like CC, CFLAGS,... , 
but I was confuesed why the generated makefiles uses sometime '$(CXX_FLAGS)' :

[EMAIL PROTECTED]:~/src/CMake/Tests/Tutorial/Step3/build grep c++ 
CMakeFiles/Tutorial.dir/build.make
/usr/bin/c++   $(CXX_FLAGS) -o CMakeFiles/Tutorial.dir/tutorial.o -c 
/home/claus/src/CMake/Tests/Tutorial/Step3/tutorial.cxx
/usr/bin/c++  $(CXX_FLAGS) -E 
/home/claus/src/CMake/Tests/Tutorial/Step3/tutorial.cxx  
CMakeFiles/Tutorial.dir/tutorial.i
/usr/bin/c++  $(CXX_FLAGS) -S 
/home/claus/src/CMake/Tests/Tutorial/Step3/tutorial.cxx -o 
CMakeFiles/Tutorial.dir/tutorial.s
/usr/bin/c++  -fPIC $(Tutorial_OBJECTS) 
$(Tutorial_EXTERNAL_OBJECTS)  -o Tutorial -rdynamic 
-L/home/claus/src/CMake/Tests/Tutorial/Step3/build/MathFunctions -Wl,-Bstatic 
-lMathFunctions -Wl,-Bdynamic 
-Wl,-rpath,/home/claus/src/CMake/Tests/Tutorial/Step3/build/MathFunctions
/usr/bin/c++  -fPIC $(Tutorial_OBJECTS) 
$(Tutorial_EXTERNAL_OBJECTS)  -o CMakeFiles/CMakeRelink.dir/Tutorial -rdynamic 
-L/home/claus/src/CMake/Tests/Tutorial/Step3/build/MathFunctions -Wl,-Bstatic 
-lMathFunctions -Wl,-Bdynamic
[EMAIL PROTECTED]:~/src/CMake/Tests/Tutorial/Step3/build 

As long the dependencies are OK and the makefiles are always new generated if I 
change a cmake Variable, all is OK.

But this is not true for the compiler used!

I noted, that when I change the CMAKE_CXX_COMPILER value, the old compiler will 
be used?

Bye
Claus 
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


  1   2   >