Re: [CMake] get_prerequisites() - fails with No such file or directory

2016-01-07 Thread rozelak

Sorry po re-posting, the formatting in the previous message was badly corupted 
... :-(
 
__ Původní zpráva: 

Od: <roze...@volny.cz>
Komu: <cmake@cmake.org>
Datum: 07.01.2016 10:25
Předmět: Re: [CMake]get_prerequisites() - fails with No such file or directory


When get_prerequisites() is not called, the build works correctly. So, did I do 
anything wrong?

get_prerequisites needs to be called at install time and not CMake time.

Look at install(CODE "")

-Bill

 
 
Hello Bill,thank you for your answer. I guessed that this is the problem, but I didn't know about install(CODE ...) directive. Thank you!So, now I have used:  install(CODE 
"include(GetPrerequisites)get_prerequisites(${LOC} PREREQS 0 0 \"\" \"\")message(\"---> prerequisites: 
${PREREQS} for ${LOC}\")foreach(D in ${PREREQS})message(\" >>> ${D}\")endforeach()   
 "   )as it stopped to report the error - seems to work for the first look. However, there are no dependencies listed (at least under windows, where I need it 
primarily):Install the project...echo >nul && "C:\Program Files (x86)\CMake\bin\cmake.exe" -P cmake_install.cmake-- Install configuration: 
"Release"-- Installing: t:/smazat/x86_32_windows/./SpeechTechTTS_Python.dll---> prerequisites:  for T:/smazat/SpeechTechTTS_Python.dll>>>Manual 
invocation of 'dumpbin /
dependents SpeechTechTTS_Python.dll' returns:Microsoft (R) COFF/PE Dumper 
Version 12.00.40629.0Copyright (C) Microsoft Corporation.  All rights 
reserved.Dump of file SpeechTechTTS_Python.dllFile Type: DLLImage 
has the following dependencies:expat.dllpython27.dll
KERNEL32.dllSummary7000 .data6E000 .rdata7000 
.reloc1000 .rsrc7E000 .text2000 _RDATAWhy none of 
dependent DLL are listed, even when exclude_system option is set to 0?Thank you 
again,Dan 

-- 

Powered by www.kitware.com

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

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

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

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

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

Re: [CMake] get_prerequisites() - fails with No such file or directory

2016-01-07 Thread rozelak

When get_prerequisites() is not called, the build works correctly. So, did I do 
anything wrong?

get_prerequisites needs to be called at install time and not CMake time.

Look at install(CODE "")

-Bill

 
Hello Bill,thank you for your answer. I guessed that this is the problem, but I didn't know about install(CODE ...) directive. Thank you!So, now I have used:  install(CODE "include(GetPrerequisites)get_prerequisites(${LOC} PREREQS 0 0 \"\" \"\")message(\"---> prerequisites: ${PREREQS} for ${LOC}\")foreach(D in ${PREREQS})message(\" >>> ${D}\")endforeach()"   )ans it stopped to report the error - seems to work for the first look. However, there are no dependencies listed (at least under windows, where I need it primarily):Install the project...echo >nul && "C:\Program Files (x86)\CMake\bin\cmake.exe" -P cmake_install.cmake-- Install configuration: "Release"-- Installing: t:/smazat/x86_32_windows/./SpeechTechTTS_Python.dll---> prerequisites:  for T:/smazat/SpeechTechTTS_Python.dll>>>Manual invocation of 'dumpbin 
/dependents SpeechTechTTS_Python.dll' returns:Microsoft (R) COFF/PE Dumper Version 12.00.40629.0Copyright (C) Microsoft Corporation.  All rights reserved.Dump of file SpeechTechTTS_Python.dllFile Type: DLLImage has the following dependencies:expat.dllpython27.dllKERNEL32.dllSummary7000 .data6E000 .rdata7000 .reloc1000 .rsrc7E000 .text2000 _RDATAWhy none of dependent DLL are listed, even when exclude_system option is set to 0?Thank you again,Dan
-- 

Powered by www.kitware.com

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

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

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

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

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

[CMake] get_prerequisites() - fails with No such file or directory

2016-01-06 Thread rozelak

Hallo.I try to use get_prerequisites() and it seems that it is called before the target is created. The CMake code snipped is as follows:  
  set(SRC_FILES )# Make libadd_library(  OUTPUT SHARED ${SRCS_FILES})target_link_libraries(OUTPUT 
${PROJECT_LIBRARIES})target_link_libraries(OUTPUT ${PYTHON_LIBRARIES})# Installinstall(TARGETS   OUTPUT   RUNTIME 
DESTINATION ./ COMPONENT Runtime   LIBRARY DESTINATION ./ COMPONENT Runtime)# ---
include(GetPrerequisites)string(TOUPPER ${CMAKE_BUILD_TYPE} CONFIG)get_target_property(LOC OUTPUT LOCATION_${CONFIG})##
message("---> location = ${LOC}")##get_prerequisites(${LOC} PREREQS 0 0 "" "")##
message("---> prerequisites: ${PREREQS}")foreach(D ${PREREQS})message("---> ${D}")
endforeach()###but it seems that get_prerequisites() is called before the target is created (the sources are compiled and library is 
link
ed). It results in the following error messages.Under Linux:-- The C compiler identification is GNU 4.8.3-- The CXX compiler identification is GNU 4.8.3-- Check for working C compiler: /usr/bin/cc-- Check for working C compiler: /usr/bin/cc -- works-- Detecting C compiler ABI info-- Detecting C compiler ABI info - done-- Check for working CXX compiler: /usr/bin/c++-- Check for working CXX compiler: /usr/bin/c++ -- works-- Detecting CXX compiler ABI info-- Detecting CXX compiler ABI info - done...CMake Warning (dev) at CMakeLists.txt:171 (get_target_property):  Policy CMP0026 is not set: Disallow use of the LOCATION target property.  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy  command to set the policy and suppress this warning.  The LOCATION property should not be read from target  "SpeechTechTTS_Python".  Use the target name directly with  add_custom_command, or use the 
generator expression $, as  appropriate.This warning is for project developers.  Use -Wno-dev to suppress it.---> location = /tmp/smazat_2/SpeechTechTTS_Python.sowarning: target '/tmp/smazat_2/SpeechTechTTS_Python.so' does not exist...ldd: /tmp/smazat_2/SpeechTechTTS_Python.so: No such file or directory---> prerequisites:-- Configuring done-- Generating doneUnder windows:-- The C compiler identification is MSVC 18.0.40629.0-- The CXX compiler identification is MSVC 18.0.40629.0-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works-- Detecting C compiler ABI info-- Detecting C compiler ABI info - done-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe-- Check for working CXX compiler: C:/Program Files (x

86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works-- Detecting CXX compiler ABI info-- 
Detecting CXX compiler ABI info - done-- Detecting CXX compile features-- Detecting CXX compile 
features - done...CMake Warning (dev) at CMakeLists.txt:171 (get_target_property):  Policy 
CMP0026 is not set: Disallow use of the LOCATION target property.  Run "cmake --help-policy 
CMP0026" for policy details.  Use the cmake_policy  command to set the policy and suppress this 
warning.  The LOCATION property should not be read from target  "SpeechTechTTS_Python".  
Use the target name directly with  add_custom_command, or use the generator expression 
$, as  appropriate.This warning is for project developers.  Use -Wno-dev to 
suppress it.---> location = T:/smazat/SpeechTechTTS_Python.dllwarning: target 
'T:/smazat/SpeechTechTTS_Python.dll' does not exist...CMake Error at C:/Program Files 
(x86)/CMake/share/cmake-3
.4/Modules/GetPrerequisites.cmake:798 (message):  C:/Program Files (x86)/Microsoft 
Visual Studio 12.0/VC/bin/dumpbin.exe  failed: 1181-- Configuring incomplete, 
errors occurred!See also "T:/smazat/CMakeFiles/CMakeOutput.log".  
Microsoft (R) COFF/PE Dumper Version 12.00.40629.0  Copyright (C) Microsoft 
Corporation.  All rights reserved.  Dump of file T:/smazat/SpeechTechTTS_Python.dll   
   LINK : fatal error LNK1181: cannot open input file  
'T:/smazat/SpeechTechTTS_Python.dll'Call Stack (most recent call first):  
CMakeLists.txt:174 (get_prerequisites)When get_prerequisites() is not called, the build 
works correctly. So, did I do anything wrong?Thank you very much. Best regards,Dan T.P.S. 
I use cmake 3.0.2 under Linux and 3.4.0-rc2 on windows.
-- 

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 

Re: [CMake] get_prerequisites() - fails with No such file or directory

2016-01-06 Thread Bill Hoffman

On 1/6/2016 6:14 AM, roze...@volny.cz wrote:

When get_prerequisites() is not called, the build works correctly. So, did I do 
anything wrong?

 get_prerequisites needs to be called at install time and not CMake time.

Look at install(CODE "")

-Bill

--

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